@prismicio/next 2.2.2 → 2.2.3-canary.1abb259

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.
Files changed (178) hide show
  1. package/dist/PrismicNextImage.cjs +16 -20
  2. package/dist/PrismicNextImage.cjs.map +1 -1
  3. package/dist/PrismicNextImage.d.cts +14 -23
  4. package/dist/PrismicNextImage.d.cts.map +1 -0
  5. package/dist/PrismicNextImage.d.ts +14 -23
  6. package/dist/PrismicNextImage.d.ts.map +1 -0
  7. package/dist/PrismicNextImage.js +11 -15
  8. package/dist/PrismicNextImage.js.map +1 -1
  9. package/dist/PrismicNextLink.cjs +7 -8
  10. package/dist/PrismicNextLink.cjs.map +1 -1
  11. package/dist/PrismicNextLink.d.cts +10 -10
  12. package/dist/PrismicNextLink.d.cts.map +1 -0
  13. package/dist/PrismicNextLink.d.ts +10 -10
  14. package/dist/PrismicNextLink.d.ts.map +1 -0
  15. package/dist/PrismicNextLink.js +3 -4
  16. package/dist/PrismicNextLink.js.map +1 -1
  17. package/dist/PrismicPreview.cjs +13 -15
  18. package/dist/PrismicPreview.cjs.map +1 -1
  19. package/dist/PrismicPreview.d.cts +12 -14
  20. package/dist/PrismicPreview.d.cts.map +1 -0
  21. package/dist/PrismicPreview.d.ts +12 -14
  22. package/dist/PrismicPreview.d.ts.map +1 -0
  23. package/dist/PrismicPreview.js +8 -10
  24. package/dist/PrismicPreview.js.map +1 -1
  25. package/dist/PrismicPreviewClient.cjs +5 -9
  26. package/dist/PrismicPreviewClient.cjs.map +1 -1
  27. package/dist/PrismicPreviewClient.js +6 -10
  28. package/dist/PrismicPreviewClient.js.map +1 -1
  29. package/dist/SliceSimulator.cjs +6 -8
  30. package/dist/SliceSimulator.cjs.map +1 -1
  31. package/dist/SliceSimulator.d.cts +3 -6
  32. package/dist/SliceSimulator.d.cts.map +1 -0
  33. package/dist/SliceSimulator.d.ts +3 -6
  34. package/dist/SliceSimulator.d.ts.map +1 -0
  35. package/dist/SliceSimulator.js +4 -6
  36. package/dist/SliceSimulator.js.map +1 -1
  37. package/dist/SliceSimulatorWrapper.cjs +3 -7
  38. package/dist/SliceSimulatorWrapper.cjs.map +1 -1
  39. package/dist/SliceSimulatorWrapper.js +2 -6
  40. package/dist/SliceSimulatorWrapper.js.map +1 -1
  41. package/dist/_virtual/{rolldown_runtime.cjs → _rolldown/runtime.cjs} +8 -14
  42. package/dist/createLocaleRedirect.cjs +2 -3
  43. package/dist/createLocaleRedirect.cjs.map +1 -1
  44. package/dist/createLocaleRedirect.d.cts.map +1 -0
  45. package/dist/createLocaleRedirect.d.ts.map +1 -0
  46. package/dist/createLocaleRedirect.js +1 -2
  47. package/dist/createLocaleRedirect.js.map +1 -1
  48. package/dist/enableAutoPreviews.cjs +4 -6
  49. package/dist/enableAutoPreviews.cjs.map +1 -1
  50. package/dist/enableAutoPreviews.d.cts +2 -4
  51. package/dist/enableAutoPreviews.d.cts.map +1 -0
  52. package/dist/enableAutoPreviews.d.ts +2 -4
  53. package/dist/enableAutoPreviews.d.ts.map +1 -0
  54. package/dist/enableAutoPreviews.js +3 -5
  55. package/dist/enableAutoPreviews.js.map +1 -1
  56. package/dist/exitPreview.cjs +11 -13
  57. package/dist/exitPreview.cjs.map +1 -1
  58. package/dist/exitPreview.d.cts +9 -10
  59. package/dist/exitPreview.d.cts.map +1 -0
  60. package/dist/exitPreview.d.ts +9 -10
  61. package/dist/exitPreview.d.ts.map +1 -0
  62. package/dist/exitPreview.js +11 -12
  63. package/dist/exitPreview.js.map +1 -1
  64. package/dist/getSlices.cjs +2 -3
  65. package/dist/getSlices.cjs.map +1 -1
  66. package/dist/getSlices.d.cts.map +1 -0
  67. package/dist/getSlices.d.ts.map +1 -0
  68. package/dist/getSlices.js +1 -2
  69. package/dist/getSlices.js.map +1 -1
  70. package/dist/imgixLoader.cjs +4 -5
  71. package/dist/imgixLoader.cjs.map +1 -1
  72. package/dist/imgixLoader.d.cts +3 -4
  73. package/dist/imgixLoader.d.cts.map +1 -0
  74. package/dist/imgixLoader.d.ts +3 -4
  75. package/dist/imgixLoader.d.ts.map +1 -0
  76. package/dist/imgixLoader.js +3 -4
  77. package/dist/imgixLoader.js.map +1 -1
  78. package/dist/index.cjs +12 -12
  79. package/dist/index.js +1 -2
  80. package/dist/lib/devMsg.cjs +8 -11
  81. package/dist/lib/devMsg.cjs.map +1 -1
  82. package/dist/lib/devMsg.js +7 -10
  83. package/dist/lib/devMsg.js.map +1 -1
  84. package/dist/lib/resolveDefaultExport.cjs +9 -14
  85. package/dist/lib/resolveDefaultExport.cjs.map +1 -1
  86. package/dist/lib/resolveDefaultExport.js +9 -13
  87. package/dist/lib/resolveDefaultExport.js.map +1 -1
  88. package/dist/package.cjs +7 -8
  89. package/dist/package.js +2 -2
  90. package/dist/pages/PrismicPreview.cjs +12 -14
  91. package/dist/pages/PrismicPreview.cjs.map +1 -1
  92. package/dist/pages/PrismicPreview.d.cts +12 -14
  93. package/dist/pages/PrismicPreview.d.cts.map +1 -0
  94. package/dist/pages/PrismicPreview.d.ts +12 -14
  95. package/dist/pages/PrismicPreview.d.ts.map +1 -0
  96. package/dist/pages/PrismicPreview.js +8 -10
  97. package/dist/pages/PrismicPreview.js.map +1 -1
  98. package/dist/pages/SliceSimulator.cjs +5 -6
  99. package/dist/pages/SliceSimulator.cjs.map +1 -1
  100. package/dist/pages/SliceSimulator.d.cts +10 -13
  101. package/dist/pages/SliceSimulator.d.cts.map +1 -0
  102. package/dist/pages/SliceSimulator.d.ts +10 -13
  103. package/dist/pages/SliceSimulator.d.ts.map +1 -0
  104. package/dist/pages/SliceSimulator.js +3 -4
  105. package/dist/pages/SliceSimulator.js.map +1 -1
  106. package/dist/pages/enableAutoPreviews.cjs +4 -5
  107. package/dist/pages/enableAutoPreviews.cjs.map +1 -1
  108. package/dist/pages/enableAutoPreviews.d.cts +6 -8
  109. package/dist/pages/enableAutoPreviews.d.cts.map +1 -0
  110. package/dist/pages/enableAutoPreviews.d.ts +6 -8
  111. package/dist/pages/enableAutoPreviews.d.ts.map +1 -0
  112. package/dist/pages/enableAutoPreviews.js +4 -4
  113. package/dist/pages/enableAutoPreviews.js.map +1 -1
  114. package/dist/pages/exitPreview.cjs +10 -12
  115. package/dist/pages/exitPreview.cjs.map +1 -1
  116. package/dist/pages/exitPreview.d.cts +9 -10
  117. package/dist/pages/exitPreview.d.cts.map +1 -0
  118. package/dist/pages/exitPreview.d.ts +9 -10
  119. package/dist/pages/exitPreview.d.ts.map +1 -0
  120. package/dist/pages/exitPreview.js +10 -11
  121. package/dist/pages/exitPreview.js.map +1 -1
  122. package/dist/pages/redirectToPreviewURL.cjs +1 -2
  123. package/dist/pages/redirectToPreviewURL.cjs.map +1 -1
  124. package/dist/pages/redirectToPreviewURL.d.cts +8 -11
  125. package/dist/pages/redirectToPreviewURL.d.cts.map +1 -0
  126. package/dist/pages/redirectToPreviewURL.d.ts +8 -11
  127. package/dist/pages/redirectToPreviewURL.d.ts.map +1 -0
  128. package/dist/pages/redirectToPreviewURL.js +1 -1
  129. package/dist/pages/redirectToPreviewURL.js.map +1 -1
  130. package/dist/pages/setPreviewData.cjs +2 -3
  131. package/dist/pages/setPreviewData.cjs.map +1 -1
  132. package/dist/pages/setPreviewData.d.cts.map +1 -0
  133. package/dist/pages/setPreviewData.d.ts.map +1 -0
  134. package/dist/pages/setPreviewData.js +1 -2
  135. package/dist/pages/setPreviewData.js.map +1 -1
  136. package/dist/pages/types.d.cts +3 -9
  137. package/dist/pages/types.d.cts.map +1 -0
  138. package/dist/pages/types.d.ts +3 -9
  139. package/dist/pages/types.d.ts.map +1 -0
  140. package/dist/pages.cjs +12 -12
  141. package/dist/pages.js +1 -2
  142. package/dist/redirectToPreviewURL.cjs +3 -4
  143. package/dist/redirectToPreviewURL.cjs.map +1 -1
  144. package/dist/redirectToPreviewURL.d.cts +4 -7
  145. package/dist/redirectToPreviewURL.d.cts.map +1 -0
  146. package/dist/redirectToPreviewURL.d.ts +4 -7
  147. package/dist/redirectToPreviewURL.d.ts.map +1 -0
  148. package/dist/redirectToPreviewURL.js +2 -3
  149. package/dist/redirectToPreviewURL.js.map +1 -1
  150. package/dist/types.d.cts +1 -2
  151. package/dist/types.d.cts.map +1 -0
  152. package/dist/types.d.ts +1 -2
  153. package/dist/types.d.ts.map +1 -0
  154. package/package.json +34 -36
  155. package/src/PrismicNextImage.tsx +113 -134
  156. package/src/PrismicNextLink.tsx +43 -45
  157. package/src/PrismicPreview.tsx +28 -29
  158. package/src/PrismicPreviewClient.tsx +42 -44
  159. package/src/SliceSimulator.tsx +38 -43
  160. package/src/SliceSimulatorWrapper.tsx +15 -25
  161. package/src/createLocaleRedirect.ts +3 -3
  162. package/src/enableAutoPreviews.ts +15 -16
  163. package/src/exitPreview.ts +12 -13
  164. package/src/getSlices.ts +6 -10
  165. package/src/imgixLoader.ts +10 -10
  166. package/src/index.ts +18 -21
  167. package/src/lib/devMsg.ts +9 -11
  168. package/src/lib/resolveDefaultExport.ts +9 -13
  169. package/src/pages/PrismicPreview.tsx +47 -51
  170. package/src/pages/SliceSimulator.tsx +35 -37
  171. package/src/pages/enableAutoPreviews.ts +17 -17
  172. package/src/pages/exitPreview.ts +17 -18
  173. package/src/pages/index.ts +20 -23
  174. package/src/pages/redirectToPreviewURL.ts +22 -33
  175. package/src/pages/setPreviewData.ts +7 -7
  176. package/src/pages/types.ts +16 -20
  177. package/src/redirectToPreviewURL.ts +21 -30
  178. package/src/types.ts +12 -13
@@ -1 +1 @@
1
- {"version":3,"file":"SliceSimulatorWrapper.js","names":[],"sources":["../src/SliceSimulatorWrapper.tsx"],"sourcesContent":["import {\n\tdisableEventHandler,\n\tgetDefaultProps,\n\tonClickHandler,\n\tsimulatorClass,\n\tsimulatorRootClass,\n} from \"@prismicio/simulator/kit\";\nimport type { SliceSimulatorProps } from \"@prismicio/simulator/kit\";\nimport type { FC, ReactNode } from \"react\";\n\ntype SliceSimulatorWrapperProps = SliceSimulatorProps & {\n\tchildren: ReactNode;\n\tclassName?: string;\n\tmessage?: string;\n\thasSlices: boolean;\n};\n\n/**\n * A wrapper for the slice simulator that isolates the given children from the\n * page's layout.\n */\nexport const SliceSimulatorWrapper: FC<SliceSimulatorWrapperProps> = ({\n\tclassName,\n\tchildren,\n\tzIndex,\n\tbackground,\n\tmessage,\n\thasSlices,\n}) => {\n\tconst defaultProps = getDefaultProps();\n\n\treturn (\n\t\t<div\n\t\t\tclassName={[simulatorClass, className].filter(Boolean).join(\" \")}\n\t\t\tstyle={{\n\t\t\t\tzIndex:\n\t\t\t\t\ttypeof zIndex === \"undefined\"\n\t\t\t\t\t\t? defaultProps.zIndex\n\t\t\t\t\t\t: (zIndex ?? undefined),\n\t\t\t\tposition: \"fixed\",\n\t\t\t\ttop: 0,\n\t\t\t\tleft: 0,\n\t\t\t\twidth: \"100%\",\n\t\t\t\theight: \"100vh\",\n\t\t\t\toverflow: \"auto\",\n\t\t\t\tbackground:\n\t\t\t\t\ttypeof background === \"undefined\"\n\t\t\t\t\t\t? defaultProps.background\n\t\t\t\t\t\t: (background ?? undefined),\n\t\t\t}}\n\t\t>\n\t\t\t{message ? (\n\t\t\t\t<article dangerouslySetInnerHTML={{ __html: message }} />\n\t\t\t) : hasSlices ? (\n\t\t\t\t<div\n\t\t\t\t\tid=\"root\"\n\t\t\t\t\tclassName={simulatorRootClass}\n\t\t\t\t\tonClickCapture={onClickHandler as unknown as React.MouseEventHandler}\n\t\t\t\t\tonSubmitCapture={\n\t\t\t\t\t\tdisableEventHandler as unknown as React.FormEventHandler\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t) : null}\n\t\t</div>\n\t);\n};\n"],"mappings":";;;;;;;;AAqBA,MAAa,yBAAyD,EACrE,WACA,UACA,QACA,YACA,SACA,gBACK;CACL,MAAM,eAAe,iBAAiB;AAEtC,QACC,oBAAC;EACA,WAAW,CAAC,gBAAgB,UAAU,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI;EAChE,OAAO;GACN,QACC,OAAO,WAAW,cACf,aAAa,SACZ,UAAU;GACf,UAAU;GACV,KAAK;GACL,MAAM;GACN,OAAO;GACP,QAAQ;GACR,UAAU;GACV,YACC,OAAO,eAAe,cACnB,aAAa,aACZ,cAAc;GACnB;YAEA,UACA,oBAAC,aAAQ,yBAAyB,EAAE,QAAQ,SAAS,GAAI,GACtD,YACH,oBAAC;GACA,IAAG;GACH,WAAW;GACX,gBAAgB;GAChB,iBACC;GAGA;IACI,GACH;GACC"}
1
+ {"version":3,"file":"SliceSimulatorWrapper.js","names":[],"sources":["../src/SliceSimulatorWrapper.tsx"],"sourcesContent":["import {\n\tdisableEventHandler,\n\tgetDefaultProps,\n\tonClickHandler,\n\tsimulatorClass,\n\tsimulatorRootClass,\n} from \"@prismicio/simulator/kit\"\nimport type { SliceSimulatorProps } from \"@prismicio/simulator/kit\"\nimport type { FC, ReactNode } from \"react\"\n\ntype SliceSimulatorWrapperProps = SliceSimulatorProps & {\n\tchildren: ReactNode\n\tclassName?: string\n\tmessage?: string\n\thasSlices: boolean\n}\n\n/** A wrapper for the slice simulator that isolates the given children from the page's layout. */\nexport const SliceSimulatorWrapper: FC<SliceSimulatorWrapperProps> = ({\n\tclassName,\n\tchildren,\n\tzIndex,\n\tbackground,\n\tmessage,\n\thasSlices,\n}) => {\n\tconst defaultProps = getDefaultProps()\n\n\treturn (\n\t\t<div\n\t\t\tclassName={[simulatorClass, className].filter(Boolean).join(\" \")}\n\t\t\tstyle={{\n\t\t\t\tzIndex: typeof zIndex === \"undefined\" ? defaultProps.zIndex : (zIndex ?? undefined),\n\t\t\t\tposition: \"fixed\",\n\t\t\t\ttop: 0,\n\t\t\t\tleft: 0,\n\t\t\t\twidth: \"100%\",\n\t\t\t\theight: \"100vh\",\n\t\t\t\toverflow: \"auto\",\n\t\t\t\tbackground:\n\t\t\t\t\ttypeof background === \"undefined\" ? defaultProps.background : (background ?? undefined),\n\t\t\t}}\n\t\t>\n\t\t\t{message ? (\n\t\t\t\t<article dangerouslySetInnerHTML={{ __html: message }} />\n\t\t\t) : hasSlices ? (\n\t\t\t\t<div\n\t\t\t\t\tid=\"root\"\n\t\t\t\t\tclassName={simulatorRootClass}\n\t\t\t\t\tonClickCapture={onClickHandler as unknown as React.MouseEventHandler}\n\t\t\t\t\tonSubmitCapture={disableEventHandler as unknown as React.FormEventHandler}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t) : null}\n\t\t</div>\n\t)\n}\n"],"mappings":";;;;AAkBA,MAAa,yBAAyD,EACrE,WACA,UACA,QACA,YACA,SACA,gBACK;CACL,MAAM,eAAe,iBAAiB;AAEtC,QACC,oBAAC,OAAD;EACC,WAAW,CAAC,gBAAgB,UAAU,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI;EAChE,OAAO;GACN,QAAQ,OAAO,WAAW,cAAc,aAAa,SAAU,UAAU,KAAA;GACzE,UAAU;GACV,KAAK;GACL,MAAM;GACN,OAAO;GACP,QAAQ;GACR,UAAU;GACV,YACC,OAAO,eAAe,cAAc,aAAa,aAAc,cAAc,KAAA;GAC9E;YAEA,UACA,oBAAC,WAAD,EAAS,yBAAyB,EAAE,QAAQ,SAAS,EAAI,CAAA,GACtD,YACH,oBAAC,OAAD;GACC,IAAG;GACH,WAAW;GACX,gBAAgB;GAChB,iBAAiB;GAEhB;GACI,CAAA,GACH;EACC,CAAA"}
@@ -1,4 +1,4 @@
1
- //#region rolldown:runtime
1
+ //#region \0rolldown/runtime.js
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -6,16 +6,12 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
8
  var __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from === "object" || typeof from === "function") {
10
- for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
- key = keys[i];
12
- if (!__hasOwnProp.call(to, key) && key !== except) {
13
- __defProp(to, key, {
14
- get: ((k) => from[k]).bind(null, key),
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- }
9
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
+ key = keys[i];
11
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
+ get: ((k) => from[k]).bind(null, key),
13
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
+ });
19
15
  }
20
16
  return to;
21
17
  };
@@ -23,7 +19,5 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
23
19
  value: mod,
24
20
  enumerable: true
25
21
  }) : target, mod));
26
-
27
22
  //#endregion
28
-
29
- exports.__toESM = __toESM;
23
+ exports.__toESM = __toESM;
@@ -1,5 +1,4 @@
1
- const require_devMsg = require('./lib/devMsg.cjs');
2
-
1
+ const require_devMsg = require("./lib/devMsg.cjs");
3
2
  //#region src/createLocaleRedirect.ts
4
3
  /**
5
4
  * @deprecated `createLocaleRedirect()` has been removed due to performance
@@ -8,7 +7,7 @@ const require_devMsg = require('./lib/devMsg.cjs');
8
7
  function createLocaleRedirect() {
9
8
  throw new Error(`createLocaleRedirect() has been removed due to performance issues. See ${require_devMsg.devMsg("replace-createLocaleRedirect")} for more details.`);
10
9
  }
11
-
12
10
  //#endregion
13
11
  exports.createLocaleRedirect = createLocaleRedirect;
12
+
14
13
  //# sourceMappingURL=createLocaleRedirect.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"createLocaleRedirect.cjs","names":["devMsg"],"sources":["../src/createLocaleRedirect.ts"],"sourcesContent":["import { devMsg } from \"./lib/devMsg\";\n\n/**\n * @deprecated `createLocaleRedirect()` has been removed due to performance\n * issues.\n */\nexport function createLocaleRedirect(): never {\n\tthrow new Error(\n\t\t`createLocaleRedirect() has been removed due to performance issues. See ${devMsg(\n\t\t\t\"replace-createLocaleRedirect\",\n\t\t)} for more details.`,\n\t);\n}\n/**\n * @deprecated `createLocaleRedirect()` has been removed due to performance\n * issues.\n */\nexport type CreateLocaleRedirectConfig = never;\n"],"mappings":";;;;;;;AAMA,SAAgB,uBAA8B;AAC7C,OAAM,IAAI,MACT,0EAA0EA,sBACzE,+BACA,CAAC,oBACF"}
1
+ {"version":3,"file":"createLocaleRedirect.cjs","names":["devMsg"],"sources":["../src/createLocaleRedirect.ts"],"sourcesContent":["import { devMsg } from \"./lib/devMsg\"\n\n/**\n * @deprecated `createLocaleRedirect()` has been removed due to performance\n * issues.\n */\nexport function createLocaleRedirect(): never {\n\tthrow new Error(\n\t\t`createLocaleRedirect() has been removed due to performance issues. See ${devMsg(\n\t\t\t\"replace-createLocaleRedirect\",\n\t\t)} for more details.`,\n\t)\n}\n/**\n * @deprecated `createLocaleRedirect()` has been removed due to performance\n * issues.\n */\nexport type CreateLocaleRedirectConfig = never\n"],"mappings":";;;;;;AAMA,SAAgB,uBAA8B;AAC7C,OAAM,IAAI,MACT,0EAA0EA,eAAAA,OACzE,+BACA,CAAC,oBACF"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createLocaleRedirect.d.cts","names":[],"sources":["../src/createLocaleRedirect.ts"],"mappings":";;AAMA;;;iBAAgB,oBAAA,CAAA;;AAWhB;;;KAAY,0BAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createLocaleRedirect.d.ts","names":[],"sources":["../src/createLocaleRedirect.ts"],"mappings":";;AAMA;;;iBAAgB,oBAAA,CAAA;;AAWhB;;;KAAY,0BAAA"}
@@ -1,5 +1,4 @@
1
1
  import { devMsg } from "./lib/devMsg.js";
2
-
3
2
  //#region src/createLocaleRedirect.ts
4
3
  /**
5
4
  * @deprecated `createLocaleRedirect()` has been removed due to performance
@@ -8,7 +7,7 @@ import { devMsg } from "./lib/devMsg.js";
8
7
  function createLocaleRedirect() {
9
8
  throw new Error(`createLocaleRedirect() has been removed due to performance issues. See ${devMsg("replace-createLocaleRedirect")} for more details.`);
10
9
  }
11
-
12
10
  //#endregion
13
11
  export { createLocaleRedirect };
12
+
14
13
  //# sourceMappingURL=createLocaleRedirect.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createLocaleRedirect.js","names":[],"sources":["../src/createLocaleRedirect.ts"],"sourcesContent":["import { devMsg } from \"./lib/devMsg\";\n\n/**\n * @deprecated `createLocaleRedirect()` has been removed due to performance\n * issues.\n */\nexport function createLocaleRedirect(): never {\n\tthrow new Error(\n\t\t`createLocaleRedirect() has been removed due to performance issues. See ${devMsg(\n\t\t\t\"replace-createLocaleRedirect\",\n\t\t)} for more details.`,\n\t);\n}\n/**\n * @deprecated `createLocaleRedirect()` has been removed due to performance\n * issues.\n */\nexport type CreateLocaleRedirectConfig = never;\n"],"mappings":";;;;;;;AAMA,SAAgB,uBAA8B;AAC7C,OAAM,IAAI,MACT,0EAA0E,OACzE,+BACA,CAAC,oBACF"}
1
+ {"version":3,"file":"createLocaleRedirect.js","names":[],"sources":["../src/createLocaleRedirect.ts"],"sourcesContent":["import { devMsg } from \"./lib/devMsg\"\n\n/**\n * @deprecated `createLocaleRedirect()` has been removed due to performance\n * issues.\n */\nexport function createLocaleRedirect(): never {\n\tthrow new Error(\n\t\t`createLocaleRedirect() has been removed due to performance issues. See ${devMsg(\n\t\t\t\"replace-createLocaleRedirect\",\n\t\t)} for more details.`,\n\t)\n}\n/**\n * @deprecated `createLocaleRedirect()` has been removed due to performance\n * issues.\n */\nexport type CreateLocaleRedirectConfig = never\n"],"mappings":";;;;;;AAMA,SAAgB,uBAA8B;AAC7C,OAAM,IAAI,MACT,0EAA0E,OACzE,+BACA,CAAC,oBACF"}
@@ -1,16 +1,14 @@
1
- const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
1
+ require("./_virtual/_rolldown/runtime.cjs");
2
2
  let _prismicio_client = require("@prismicio/client");
3
-
4
3
  //#region src/enableAutoPreviews.ts
5
4
  /**
6
- * Configures a Prismic client to automatically query draft content during a
7
- * preview session.
5
+ * Configures a Prismic client to automatically query draft content during a preview session.
8
6
  *
9
7
  * @param config - Configuration for the function.
10
8
  */
11
9
  function enableAutoPreviews(config) {
12
10
  config.client.queryContentFromRef(async () => {
13
- const { cookies, draftMode } = await import("next/headers");
11
+ const { cookies, draftMode } = await import("next/headers.js");
14
12
  let isDraftModeEnabled = false;
15
13
  try {
16
14
  isDraftModeEnabled = (await draftMode()).isEnabled;
@@ -24,7 +22,7 @@ function enableAutoPreviews(config) {
24
22
  return cookie;
25
23
  });
26
24
  }
27
-
28
25
  //#endregion
29
26
  exports.enableAutoPreviews = enableAutoPreviews;
27
+
30
28
  //# sourceMappingURL=enableAutoPreviews.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"enableAutoPreviews.cjs","names":["prismicCookie"],"sources":["../src/enableAutoPreviews.ts"],"sourcesContent":["import { type Client, cookie as prismicCookie } from \"@prismicio/client\";\n\n/** Configuration for `enableAutoPreviews`. */\nexport type EnableAutoPreviewsConfig = {\n\t/** Prismic client with which automatic previews will be enabled. */\n\t// `Pick` is used to use the smallest possible subset of\n\t// `prismic.Client`. Doing this reduces the surface area for breaking\n\t// type changes.\n\tclient: Pick<Client, \"queryContentFromRef\" | \"enableAutoPreviewsFromReq\">;\n};\n\n/**\n * Configures a Prismic client to automatically query draft content during a\n * preview session.\n *\n * @param config - Configuration for the function.\n */\nexport function enableAutoPreviews(config: EnableAutoPreviewsConfig): void {\n\t// We use a function value so the cookie is checked on every\n\t// request. We don't have a static value to read from.\n\tconfig.client.queryContentFromRef(async () => {\n\t\t// Need this to avoid the following Next.js build-time error:\n\t\t// You're importing a component that needs next/headers. That only works\n\t\t// in a Server Component which is not supported in the pages/ directory.\n\t\tconst { cookies, draftMode } = await import(\"next/headers\");\n\n\t\tlet isDraftModeEnabled = false;\n\t\ttry {\n\t\t\tisDraftModeEnabled = (await draftMode()).isEnabled;\n\t\t} catch {\n\t\t\t// `draftMode()` may have been called in a palce that\n\t\t\t// does not have access to its async storage. This\n\t\t\t// occurs in places like `generateStaticParams()`. We\n\t\t\t// can ignore this case.\n\t\t\treturn;\n\t\t}\n\t\tif (!isDraftModeEnabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst cookie = (await cookies()).get(prismicCookie.preview)?.value;\n\t\tif (!cookie) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst isActiveCookie = cookie.includes(\"websitePreviewId=\");\n\t\tif (!isActiveCookie) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn cookie;\n\t});\n}\n"],"mappings":";;;;;;;;;;AAiBA,SAAgB,mBAAmB,QAAwC;AAG1E,QAAO,OAAO,oBAAoB,YAAY;EAI7C,MAAM,EAAE,SAAS,cAAc,MAAM,OAAO;EAE5C,IAAI,qBAAqB;AACzB,MAAI;AACH,yBAAsB,MAAM,WAAW,EAAE;UAClC;AAKP;;AAED,MAAI,CAAC,mBACJ;EAGD,MAAM,UAAU,MAAM,SAAS,EAAE,IAAIA,yBAAc,QAAQ,EAAE;AAC7D,MAAI,CAAC,OACJ;AAID,MAAI,CADmB,OAAO,SAAS,oBAAoB,CAE1D;AAGD,SAAO;GACN"}
1
+ {"version":3,"file":"enableAutoPreviews.cjs","names":["prismicCookie"],"sources":["../src/enableAutoPreviews.ts"],"sourcesContent":["import { type Client, cookie as prismicCookie } from \"@prismicio/client\"\n\n/** Configuration for `enableAutoPreviews`. */\nexport type EnableAutoPreviewsConfig = {\n\t/** Prismic client with which automatic previews will be enabled. */\n\t// `Pick` is used to use the smallest possible subset of\n\t// `prismic.Client`. Doing this reduces the surface area for breaking\n\t// type changes.\n\tclient: Pick<Client, \"queryContentFromRef\" | \"enableAutoPreviewsFromReq\">\n}\n\n/**\n * Configures a Prismic client to automatically query draft content during a preview session.\n *\n * @param config - Configuration for the function.\n */\nexport function enableAutoPreviews(config: EnableAutoPreviewsConfig): void {\n\t// We use a function value so the cookie is checked on every\n\t// request. We don't have a static value to read from.\n\tconfig.client.queryContentFromRef(async () => {\n\t\t// Need this to avoid the following Next.js build-time error:\n\t\t// You're importing a component that needs next/headers. That only works\n\t\t// in a Server Component which is not supported in the pages/ directory.\n\t\tconst { cookies, draftMode } = await import(\"next/headers\")\n\n\t\tlet isDraftModeEnabled = false\n\t\ttry {\n\t\t\tisDraftModeEnabled = (await draftMode()).isEnabled\n\t\t} catch {\n\t\t\t// `draftMode()` may have been called in a palce that\n\t\t\t// does not have access to its async storage. This\n\t\t\t// occurs in places like `generateStaticParams()`. We\n\t\t\t// can ignore this case.\n\t\t\treturn\n\t\t}\n\t\tif (!isDraftModeEnabled) {\n\t\t\treturn\n\t\t}\n\n\t\tconst cookie = (await cookies()).get(prismicCookie.preview)?.value\n\t\tif (!cookie) {\n\t\t\treturn\n\t\t}\n\n\t\tconst isActiveCookie = cookie.includes(\"websitePreviewId=\")\n\t\tif (!isActiveCookie) {\n\t\t\treturn\n\t\t}\n\n\t\treturn cookie\n\t})\n}\n"],"mappings":";;;;;;;;AAgBA,SAAgB,mBAAmB,QAAwC;AAG1E,QAAO,OAAO,oBAAoB,YAAY;EAI7C,MAAM,EAAE,SAAS,cAAc,MAAM,OAAO;EAE5C,IAAI,qBAAqB;AACzB,MAAI;AACH,yBAAsB,MAAM,WAAW,EAAE;UAClC;AAKP;;AAED,MAAI,CAAC,mBACJ;EAGD,MAAM,UAAU,MAAM,SAAS,EAAE,IAAIA,kBAAAA,OAAc,QAAQ,EAAE;AAC7D,MAAI,CAAC,OACJ;AAID,MAAI,CADmB,OAAO,SAAS,oBAAoB,CAE1D;AAGD,SAAO;GACN"}
@@ -3,12 +3,10 @@ import { Client } from "@prismicio/client";
3
3
  //#region src/enableAutoPreviews.d.ts
4
4
  /** Configuration for `enableAutoPreviews`. */
5
5
  type EnableAutoPreviewsConfig = {
6
- /** Prismic client with which automatic previews will be enabled. */
7
- client: Pick<Client, "queryContentFromRef" | "enableAutoPreviewsFromReq">;
6
+ /** Prismic client with which automatic previews will be enabled. */client: Pick<Client, "queryContentFromRef" | "enableAutoPreviewsFromReq">;
8
7
  };
9
8
  /**
10
- * Configures a Prismic client to automatically query draft content during a
11
- * preview session.
9
+ * Configures a Prismic client to automatically query draft content during a preview session.
12
10
  *
13
11
  * @param config - Configuration for the function.
14
12
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enableAutoPreviews.d.cts","names":[],"sources":["../src/enableAutoPreviews.ts"],"mappings":";;;;KAGY,wBAAA;EAAA,oEAKX,MAAA,EAAQ,IAAA,CAAK,MAAA;AAAA;;;;;;iBAQE,kBAAA,CAAmB,MAAA,EAAQ,wBAAA"}
@@ -3,12 +3,10 @@ import { Client } from "@prismicio/client";
3
3
  //#region src/enableAutoPreviews.d.ts
4
4
  /** Configuration for `enableAutoPreviews`. */
5
5
  type EnableAutoPreviewsConfig = {
6
- /** Prismic client with which automatic previews will be enabled. */
7
- client: Pick<Client, "queryContentFromRef" | "enableAutoPreviewsFromReq">;
6
+ /** Prismic client with which automatic previews will be enabled. */client: Pick<Client, "queryContentFromRef" | "enableAutoPreviewsFromReq">;
8
7
  };
9
8
  /**
10
- * Configures a Prismic client to automatically query draft content during a
11
- * preview session.
9
+ * Configures a Prismic client to automatically query draft content during a preview session.
12
10
  *
13
11
  * @param config - Configuration for the function.
14
12
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enableAutoPreviews.d.ts","names":[],"sources":["../src/enableAutoPreviews.ts"],"mappings":";;;;KAGY,wBAAA;EAAA,oEAKX,MAAA,EAAQ,IAAA,CAAK,MAAA;AAAA;;;;;;iBAQE,kBAAA,CAAmB,MAAA,EAAQ,wBAAA"}
@@ -1,15 +1,13 @@
1
1
  import { cookie } from "@prismicio/client";
2
-
3
2
  //#region src/enableAutoPreviews.ts
4
3
  /**
5
- * Configures a Prismic client to automatically query draft content during a
6
- * preview session.
4
+ * Configures a Prismic client to automatically query draft content during a preview session.
7
5
  *
8
6
  * @param config - Configuration for the function.
9
7
  */
10
8
  function enableAutoPreviews(config) {
11
9
  config.client.queryContentFromRef(async () => {
12
- const { cookies, draftMode } = await import("next/headers");
10
+ const { cookies, draftMode } = await import("next/headers.js");
13
11
  let isDraftModeEnabled = false;
14
12
  try {
15
13
  isDraftModeEnabled = (await draftMode()).isEnabled;
@@ -23,7 +21,7 @@ function enableAutoPreviews(config) {
23
21
  return cookie$1;
24
22
  });
25
23
  }
26
-
27
24
  //#endregion
28
25
  export { enableAutoPreviews };
26
+
29
27
  //# sourceMappingURL=enableAutoPreviews.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"enableAutoPreviews.js","names":["cookie","prismicCookie"],"sources":["../src/enableAutoPreviews.ts"],"sourcesContent":["import { type Client, cookie as prismicCookie } from \"@prismicio/client\";\n\n/** Configuration for `enableAutoPreviews`. */\nexport type EnableAutoPreviewsConfig = {\n\t/** Prismic client with which automatic previews will be enabled. */\n\t// `Pick` is used to use the smallest possible subset of\n\t// `prismic.Client`. Doing this reduces the surface area for breaking\n\t// type changes.\n\tclient: Pick<Client, \"queryContentFromRef\" | \"enableAutoPreviewsFromReq\">;\n};\n\n/**\n * Configures a Prismic client to automatically query draft content during a\n * preview session.\n *\n * @param config - Configuration for the function.\n */\nexport function enableAutoPreviews(config: EnableAutoPreviewsConfig): void {\n\t// We use a function value so the cookie is checked on every\n\t// request. We don't have a static value to read from.\n\tconfig.client.queryContentFromRef(async () => {\n\t\t// Need this to avoid the following Next.js build-time error:\n\t\t// You're importing a component that needs next/headers. That only works\n\t\t// in a Server Component which is not supported in the pages/ directory.\n\t\tconst { cookies, draftMode } = await import(\"next/headers\");\n\n\t\tlet isDraftModeEnabled = false;\n\t\ttry {\n\t\t\tisDraftModeEnabled = (await draftMode()).isEnabled;\n\t\t} catch {\n\t\t\t// `draftMode()` may have been called in a palce that\n\t\t\t// does not have access to its async storage. This\n\t\t\t// occurs in places like `generateStaticParams()`. We\n\t\t\t// can ignore this case.\n\t\t\treturn;\n\t\t}\n\t\tif (!isDraftModeEnabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst cookie = (await cookies()).get(prismicCookie.preview)?.value;\n\t\tif (!cookie) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst isActiveCookie = cookie.includes(\"websitePreviewId=\");\n\t\tif (!isActiveCookie) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn cookie;\n\t});\n}\n"],"mappings":";;;;;;;;;AAiBA,SAAgB,mBAAmB,QAAwC;AAG1E,QAAO,OAAO,oBAAoB,YAAY;EAI7C,MAAM,EAAE,SAAS,cAAc,MAAM,OAAO;EAE5C,IAAI,qBAAqB;AACzB,MAAI;AACH,yBAAsB,MAAM,WAAW,EAAE;UAClC;AAKP;;AAED,MAAI,CAAC,mBACJ;EAGD,MAAMA,YAAU,MAAM,SAAS,EAAE,IAAIC,OAAc,QAAQ,EAAE;AAC7D,MAAI,CAACD,SACJ;AAID,MAAI,CADmBA,SAAO,SAAS,oBAAoB,CAE1D;AAGD,SAAOA;GACN"}
1
+ {"version":3,"file":"enableAutoPreviews.js","names":["cookie","prismicCookie"],"sources":["../src/enableAutoPreviews.ts"],"sourcesContent":["import { type Client, cookie as prismicCookie } from \"@prismicio/client\"\n\n/** Configuration for `enableAutoPreviews`. */\nexport type EnableAutoPreviewsConfig = {\n\t/** Prismic client with which automatic previews will be enabled. */\n\t// `Pick` is used to use the smallest possible subset of\n\t// `prismic.Client`. Doing this reduces the surface area for breaking\n\t// type changes.\n\tclient: Pick<Client, \"queryContentFromRef\" | \"enableAutoPreviewsFromReq\">\n}\n\n/**\n * Configures a Prismic client to automatically query draft content during a preview session.\n *\n * @param config - Configuration for the function.\n */\nexport function enableAutoPreviews(config: EnableAutoPreviewsConfig): void {\n\t// We use a function value so the cookie is checked on every\n\t// request. We don't have a static value to read from.\n\tconfig.client.queryContentFromRef(async () => {\n\t\t// Need this to avoid the following Next.js build-time error:\n\t\t// You're importing a component that needs next/headers. That only works\n\t\t// in a Server Component which is not supported in the pages/ directory.\n\t\tconst { cookies, draftMode } = await import(\"next/headers\")\n\n\t\tlet isDraftModeEnabled = false\n\t\ttry {\n\t\t\tisDraftModeEnabled = (await draftMode()).isEnabled\n\t\t} catch {\n\t\t\t// `draftMode()` may have been called in a palce that\n\t\t\t// does not have access to its async storage. This\n\t\t\t// occurs in places like `generateStaticParams()`. We\n\t\t\t// can ignore this case.\n\t\t\treturn\n\t\t}\n\t\tif (!isDraftModeEnabled) {\n\t\t\treturn\n\t\t}\n\n\t\tconst cookie = (await cookies()).get(prismicCookie.preview)?.value\n\t\tif (!cookie) {\n\t\t\treturn\n\t\t}\n\n\t\tconst isActiveCookie = cookie.includes(\"websitePreviewId=\")\n\t\tif (!isActiveCookie) {\n\t\t\treturn\n\t\t}\n\n\t\treturn cookie\n\t})\n}\n"],"mappings":";;;;;;;AAgBA,SAAgB,mBAAmB,QAAwC;AAG1E,QAAO,OAAO,oBAAoB,YAAY;EAI7C,MAAM,EAAE,SAAS,cAAc,MAAM,OAAO;EAE5C,IAAI,qBAAqB;AACzB,MAAI;AACH,yBAAsB,MAAM,WAAW,EAAE;UAClC;AAKP;;AAED,MAAI,CAAC,mBACJ;EAGD,MAAMA,YAAU,MAAM,SAAS,EAAE,IAAIC,OAAc,QAAQ,EAAE;AAC7D,MAAI,CAACD,SACJ;AAID,MAAI,CADmBA,SAAO,SAAS,oBAAoB,CAE1D;AAGD,SAAOA;GACN"}
@@ -1,27 +1,25 @@
1
-
2
1
  //#region src/exitPreview.ts
3
2
  /**
4
- * Ends a Prismic preview session within a Next.js app. This function should be
5
- * used in a Router Handler.
3
+ * Ends a Prismic preview session within a Next.js app. This function should be used in a Router
4
+ * Handler.
6
5
  *
7
6
  * @example
7
+ * ```typescript
8
+ * // src/app/api/exit-preview/route.js
8
9
  *
9
- * ```typescript
10
- * // src/app/api/exit-preview/route.js
11
- *
12
- * import { exitPreview } from "@prismicio/next";
10
+ * import { exitPreview } from "@prismicio/next"
13
11
  *
14
- * export async function GET() {
15
- * return await exitPreview();
16
- * }
17
- * ```
12
+ * export async function GET() {
13
+ * return await exitPreview()
14
+ * }
15
+ * ```
18
16
  */
19
17
  async function exitPreview() {
20
- const { draftMode } = await import("next/headers");
18
+ const { draftMode } = await import("next/headers.js");
21
19
  (await draftMode()).disable();
22
20
  return new Response(JSON.stringify({ success: true }), { headers: { "Cache-Control": "no-store" } });
23
21
  }
24
-
25
22
  //#endregion
26
23
  exports.exitPreview = exitPreview;
24
+
27
25
  //# sourceMappingURL=exitPreview.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"exitPreview.cjs","names":[],"sources":["../src/exitPreview.ts"],"sourcesContent":["/**\n * Ends a Prismic preview session within a Next.js app. This function should be\n * used in a Router Handler.\n *\n * @example\n *\n * ```typescript\n * // src/app/api/exit-preview/route.js\n *\n * import { exitPreview } from \"@prismicio/next\";\n *\n * export async function GET() {\n * \treturn await exitPreview();\n * }\n * ```\n */\nexport async function exitPreview(): Promise<Response> {\n\t// Need this to avoid the following Next.js build-time error:\n\t// You're importing a component that needs next/headers. That only works\n\t// in a Server Component which is not supported in the pages/ directory.\n\tconst { draftMode } = await import(\"next/headers\");\n\n\t(await draftMode()).disable();\n\n\t// `Cache-Control` header is used to prevent CDN-level caching.\n\treturn new Response(JSON.stringify({ success: true }), {\n\t\theaders: {\n\t\t\t\"Cache-Control\": \"no-store\",\n\t\t},\n\t});\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAgBA,eAAsB,cAAiC;CAItD,MAAM,EAAE,cAAc,MAAM,OAAO;AAEnC,EAAC,MAAM,WAAW,EAAE,SAAS;AAG7B,QAAO,IAAI,SAAS,KAAK,UAAU,EAAE,SAAS,MAAM,CAAC,EAAE,EACtD,SAAS,EACR,iBAAiB,YACjB,EACD,CAAC"}
1
+ {"version":3,"file":"exitPreview.cjs","names":[],"sources":["../src/exitPreview.ts"],"sourcesContent":["/**\n * Ends a Prismic preview session within a Next.js app. This function should be used in a Router\n * Handler.\n *\n * @example\n * \t```typescript\n * \t// src/app/api/exit-preview/route.js\n *\n * \timport { exitPreview } from \"@prismicio/next\"\n *\n * \texport async function GET() {\n * \t\treturn await exitPreview()\n * \t}\n * \t```\n */\nexport async function exitPreview(): Promise<Response> {\n\t// Need this to avoid the following Next.js build-time error:\n\t// You're importing a component that needs next/headers. That only works\n\t// in a Server Component which is not supported in the pages/ directory.\n\tconst { draftMode } = await import(\"next/headers\")\n\n\t;(await draftMode()).disable()\n\n\t// `Cache-Control` header is used to prevent CDN-level caching.\n\treturn new Response(JSON.stringify({ success: true }), {\n\t\theaders: {\n\t\t\t\"Cache-Control\": \"no-store\",\n\t\t},\n\t})\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAeA,eAAsB,cAAiC;CAItD,MAAM,EAAE,cAAc,MAAM,OAAO;AAElC,EAAC,MAAM,WAAW,EAAE,SAAS;AAG9B,QAAO,IAAI,SAAS,KAAK,UAAU,EAAE,SAAS,MAAM,CAAC,EAAE,EACtD,SAAS,EACR,iBAAiB,YACjB,EACD,CAAC"}
@@ -1,19 +1,18 @@
1
1
  //#region src/exitPreview.d.ts
2
2
  /**
3
- * Ends a Prismic preview session within a Next.js app. This function should be
4
- * used in a Router Handler.
3
+ * Ends a Prismic preview session within a Next.js app. This function should be used in a Router
4
+ * Handler.
5
5
  *
6
6
  * @example
7
+ * ```typescript
8
+ * // src/app/api/exit-preview/route.js
7
9
  *
8
- * ```typescript
9
- * // src/app/api/exit-preview/route.js
10
+ * import { exitPreview } from "@prismicio/next"
10
11
  *
11
- * import { exitPreview } from "@prismicio/next";
12
- *
13
- * export async function GET() {
14
- * return await exitPreview();
15
- * }
16
- * ```
12
+ * export async function GET() {
13
+ * return await exitPreview()
14
+ * }
15
+ * ```
17
16
  */
18
17
  declare function exitPreview(): Promise<Response>;
19
18
  //#endregion
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exitPreview.d.cts","names":[],"sources":["../src/exitPreview.ts"],"mappings":";;AAeA;;;;;;;;;;;;;;iBAAsB,WAAA,CAAA,GAAe,OAAA,CAAQ,QAAA"}
@@ -1,19 +1,18 @@
1
1
  //#region src/exitPreview.d.ts
2
2
  /**
3
- * Ends a Prismic preview session within a Next.js app. This function should be
4
- * used in a Router Handler.
3
+ * Ends a Prismic preview session within a Next.js app. This function should be used in a Router
4
+ * Handler.
5
5
  *
6
6
  * @example
7
+ * ```typescript
8
+ * // src/app/api/exit-preview/route.js
7
9
  *
8
- * ```typescript
9
- * // src/app/api/exit-preview/route.js
10
+ * import { exitPreview } from "@prismicio/next"
10
11
  *
11
- * import { exitPreview } from "@prismicio/next";
12
- *
13
- * export async function GET() {
14
- * return await exitPreview();
15
- * }
16
- * ```
12
+ * export async function GET() {
13
+ * return await exitPreview()
14
+ * }
15
+ * ```
17
16
  */
18
17
  declare function exitPreview(): Promise<Response>;
19
18
  //#endregion
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exitPreview.d.ts","names":[],"sources":["../src/exitPreview.ts"],"mappings":";;AAeA;;;;;;;;;;;;;;iBAAsB,WAAA,CAAA,GAAe,OAAA,CAAQ,QAAA"}
@@ -1,26 +1,25 @@
1
1
  //#region src/exitPreview.ts
2
2
  /**
3
- * Ends a Prismic preview session within a Next.js app. This function should be
4
- * used in a Router Handler.
3
+ * Ends a Prismic preview session within a Next.js app. This function should be used in a Router
4
+ * Handler.
5
5
  *
6
6
  * @example
7
+ * ```typescript
8
+ * // src/app/api/exit-preview/route.js
7
9
  *
8
- * ```typescript
9
- * // src/app/api/exit-preview/route.js
10
+ * import { exitPreview } from "@prismicio/next"
10
11
  *
11
- * import { exitPreview } from "@prismicio/next";
12
- *
13
- * export async function GET() {
14
- * return await exitPreview();
15
- * }
16
- * ```
12
+ * export async function GET() {
13
+ * return await exitPreview()
14
+ * }
15
+ * ```
17
16
  */
18
17
  async function exitPreview() {
19
- const { draftMode } = await import("next/headers");
18
+ const { draftMode } = await import("next/headers.js");
20
19
  (await draftMode()).disable();
21
20
  return new Response(JSON.stringify({ success: true }), { headers: { "Cache-Control": "no-store" } });
22
21
  }
23
-
24
22
  //#endregion
25
23
  export { exitPreview };
24
+
26
25
  //# sourceMappingURL=exitPreview.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"exitPreview.js","names":[],"sources":["../src/exitPreview.ts"],"sourcesContent":["/**\n * Ends a Prismic preview session within a Next.js app. This function should be\n * used in a Router Handler.\n *\n * @example\n *\n * ```typescript\n * // src/app/api/exit-preview/route.js\n *\n * import { exitPreview } from \"@prismicio/next\";\n *\n * export async function GET() {\n * \treturn await exitPreview();\n * }\n * ```\n */\nexport async function exitPreview(): Promise<Response> {\n\t// Need this to avoid the following Next.js build-time error:\n\t// You're importing a component that needs next/headers. That only works\n\t// in a Server Component which is not supported in the pages/ directory.\n\tconst { draftMode } = await import(\"next/headers\");\n\n\t(await draftMode()).disable();\n\n\t// `Cache-Control` header is used to prevent CDN-level caching.\n\treturn new Response(JSON.stringify({ success: true }), {\n\t\theaders: {\n\t\t\t\"Cache-Control\": \"no-store\",\n\t\t},\n\t});\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAgBA,eAAsB,cAAiC;CAItD,MAAM,EAAE,cAAc,MAAM,OAAO;AAEnC,EAAC,MAAM,WAAW,EAAE,SAAS;AAG7B,QAAO,IAAI,SAAS,KAAK,UAAU,EAAE,SAAS,MAAM,CAAC,EAAE,EACtD,SAAS,EACR,iBAAiB,YACjB,EACD,CAAC"}
1
+ {"version":3,"file":"exitPreview.js","names":[],"sources":["../src/exitPreview.ts"],"sourcesContent":["/**\n * Ends a Prismic preview session within a Next.js app. This function should be used in a Router\n * Handler.\n *\n * @example\n * \t```typescript\n * \t// src/app/api/exit-preview/route.js\n *\n * \timport { exitPreview } from \"@prismicio/next\"\n *\n * \texport async function GET() {\n * \t\treturn await exitPreview()\n * \t}\n * \t```\n */\nexport async function exitPreview(): Promise<Response> {\n\t// Need this to avoid the following Next.js build-time error:\n\t// You're importing a component that needs next/headers. That only works\n\t// in a Server Component which is not supported in the pages/ directory.\n\tconst { draftMode } = await import(\"next/headers\")\n\n\t;(await draftMode()).disable()\n\n\t// `Cache-Control` header is used to prevent CDN-level caching.\n\treturn new Response(JSON.stringify({ success: true }), {\n\t\theaders: {\n\t\t\t\"Cache-Control\": \"no-store\",\n\t\t},\n\t})\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAeA,eAAsB,cAAiC;CAItD,MAAM,EAAE,cAAc,MAAM,OAAO;AAElC,EAAC,MAAM,WAAW,EAAE,SAAS;AAG9B,QAAO,IAAI,SAAS,KAAK,UAAU,EAAE,SAAS,MAAM,CAAC,EAAE,EACtD,SAAS,EACR,iBAAiB,YACjB,EACD,CAAC"}
@@ -1,12 +1,11 @@
1
- const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
1
+ require("./_virtual/_rolldown/runtime.cjs");
2
2
  let _prismicio_simulator_kit = require("@prismicio/simulator/kit");
3
3
  let lz_string = require("lz-string");
4
-
5
4
  //#region src/getSlices.ts
6
5
  const getSlices = (state) => {
7
6
  return state ? JSON.parse((0, lz_string.decompressFromEncodedURIComponent)(state)) : (0, _prismicio_simulator_kit.getDefaultSlices)();
8
7
  };
9
-
10
8
  //#endregion
11
9
  exports.getSlices = getSlices;
10
+
12
11
  //# sourceMappingURL=getSlices.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"getSlices.cjs","names":[],"sources":["../src/getSlices.ts"],"sourcesContent":["import { getDefaultSlices } from \"@prismicio/simulator/kit\";\nimport type { StateEvents, StateEventType } from \"@prismicio/simulator/kit\";\nimport { decompressFromEncodedURIComponent } from \"lz-string\";\n\nexport const getSlices = (\n\tstate: string | null | undefined,\n): StateEvents[StateEventType.Slices] => {\n\treturn state\n\t\t? JSON.parse(decompressFromEncodedURIComponent(state))\n\t\t: getDefaultSlices();\n};\n"],"mappings":";;;;;AAIA,MAAa,aACZ,UACwC;AACxC,QAAO,QACJ,KAAK,uDAAwC,MAAM,CAAC,mDAClC"}
1
+ {"version":3,"file":"getSlices.cjs","names":[],"sources":["../src/getSlices.ts"],"sourcesContent":["import { getDefaultSlices } from \"@prismicio/simulator/kit\"\nimport type { StateEvents, StateEventType } from \"@prismicio/simulator/kit\"\nimport { decompressFromEncodedURIComponent } from \"lz-string\"\n\nexport const getSlices = (state: string | null | undefined): StateEvents[StateEventType.Slices] => {\n\treturn state ? JSON.parse(decompressFromEncodedURIComponent(state)) : getDefaultSlices()\n}\n"],"mappings":";;;;AAIA,MAAa,aAAa,UAAyE;AAClG,QAAO,QAAQ,KAAK,OAAA,GAAA,UAAA,mCAAwC,MAAM,CAAC,IAAA,GAAA,yBAAA,mBAAqB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSlices.d.cts","names":[],"sources":["../src/getSlices.ts"],"mappings":";;;cAIa,SAAA,GAAa,KAAA,gCAAmC,WAAA,CAAY,cAAA,CAAe,MAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSlices.d.ts","names":[],"sources":["../src/getSlices.ts"],"mappings":";;;cAIa,SAAA,GAAa,KAAA,gCAAmC,WAAA,CAAY,cAAA,CAAe,MAAA"}
package/dist/getSlices.js CHANGED
@@ -1,11 +1,10 @@
1
1
  import { getDefaultSlices } from "@prismicio/simulator/kit";
2
2
  import { decompressFromEncodedURIComponent } from "lz-string";
3
-
4
3
  //#region src/getSlices.ts
5
4
  const getSlices = (state) => {
6
5
  return state ? JSON.parse(decompressFromEncodedURIComponent(state)) : getDefaultSlices();
7
6
  };
8
-
9
7
  //#endregion
10
8
  export { getSlices };
9
+
11
10
  //# sourceMappingURL=getSlices.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getSlices.js","names":[],"sources":["../src/getSlices.ts"],"sourcesContent":["import { getDefaultSlices } from \"@prismicio/simulator/kit\";\nimport type { StateEvents, StateEventType } from \"@prismicio/simulator/kit\";\nimport { decompressFromEncodedURIComponent } from \"lz-string\";\n\nexport const getSlices = (\n\tstate: string | null | undefined,\n): StateEvents[StateEventType.Slices] => {\n\treturn state\n\t\t? JSON.parse(decompressFromEncodedURIComponent(state))\n\t\t: getDefaultSlices();\n};\n"],"mappings":";;;;AAIA,MAAa,aACZ,UACwC;AACxC,QAAO,QACJ,KAAK,MAAM,kCAAkC,MAAM,CAAC,GACpD,kBAAkB"}
1
+ {"version":3,"file":"getSlices.js","names":[],"sources":["../src/getSlices.ts"],"sourcesContent":["import { getDefaultSlices } from \"@prismicio/simulator/kit\"\nimport type { StateEvents, StateEventType } from \"@prismicio/simulator/kit\"\nimport { decompressFromEncodedURIComponent } from \"lz-string\"\n\nexport const getSlices = (state: string | null | undefined): StateEvents[StateEventType.Slices] => {\n\treturn state ? JSON.parse(decompressFromEncodedURIComponent(state)) : getDefaultSlices()\n}\n"],"mappings":";;;AAIA,MAAa,aAAa,UAAyE;AAClG,QAAO,QAAQ,KAAK,MAAM,kCAAkC,MAAM,CAAC,GAAG,kBAAkB"}
@@ -1,10 +1,9 @@
1
- const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
1
+ require("./_virtual/_rolldown/runtime.cjs");
2
2
  let imgix_url_builder = require("imgix-url-builder");
3
-
4
3
  //#region src/imgixLoader.ts
5
4
  /**
6
- * A `next/image` loader for Imgix, which Prismic uses, with an optional
7
- * collection of default Imgix parameters.
5
+ * A `next/image` loader for Imgix, which Prismic uses, with an optional collection of default Imgix
6
+ * parameters.
8
7
  *
9
8
  * @see To learn about `next/image` loaders: https://nextjs.org/docs/api-reference/next/image#loader
10
9
  * @see To learn about Imgix's URL API: https://docs.imgix.com/apis/rendering
@@ -18,7 +17,7 @@ const imgixLoader = (args) => {
18
17
  if (args.quality) params.q = args.quality;
19
18
  return (0, imgix_url_builder.buildURL)(args.src, params);
20
19
  };
21
-
22
20
  //#endregion
23
21
  exports.imgixLoader = imgixLoader;
22
+
24
23
  //# sourceMappingURL=imgixLoader.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"imgixLoader.cjs","names":[],"sources":["../src/imgixLoader.ts"],"sourcesContent":["import type { ImageLoaderProps } from \"next/image\";\nimport type { ImgixURLParams } from \"imgix-url-builder\";\nimport { buildURL } from \"imgix-url-builder\";\n\n/**\n * A `next/image` loader for Imgix, which Prismic uses, with an optional\n * collection of default Imgix parameters.\n *\n * @see To learn about `next/image` loaders: https://nextjs.org/docs/api-reference/next/image#loader\n * @see To learn about Imgix's URL API: https://docs.imgix.com/apis/rendering\n */\nexport const imgixLoader = (args: ImageLoaderProps): string => {\n\tconst url = new URL(args.src);\n\n\tconst params: ImgixURLParams = {\n\t\tfit: (url.searchParams.get(\"fit\") as ImgixURLParams[\"fit\"]) || \"max\",\n\t\tw: args.width,\n\t\th: undefined,\n\t};\n\n\tif (args.quality) {\n\t\tparams.q = args.quality;\n\t}\n\n\treturn buildURL(args.src, params);\n};\n"],"mappings":";;;;;;;;;;;AAWA,MAAa,eAAe,SAAmC;CAG9D,MAAM,SAAyB;EAC9B,KAHW,IAAI,IAAI,KAAK,IAAI,CAGlB,aAAa,IAAI,MAAM,IAA8B;EAC/D,GAAG,KAAK;EACR,GAAG;EACH;AAED,KAAI,KAAK,QACR,QAAO,IAAI,KAAK;AAGjB,wCAAgB,KAAK,KAAK,OAAO"}
1
+ {"version":3,"file":"imgixLoader.cjs","names":[],"sources":["../src/imgixLoader.ts"],"sourcesContent":["import type { ImgixURLParams } from \"imgix-url-builder\"\nimport { buildURL } from \"imgix-url-builder\"\nimport type { ImageLoaderProps } from \"next/image\"\n\n/**\n * A `next/image` loader for Imgix, which Prismic uses, with an optional collection of default Imgix\n * parameters.\n *\n * @see To learn about `next/image` loaders: https://nextjs.org/docs/api-reference/next/image#loader\n * @see To learn about Imgix's URL API: https://docs.imgix.com/apis/rendering\n */\nexport const imgixLoader = (args: ImageLoaderProps): string => {\n\tconst url = new URL(args.src)\n\n\tconst params: ImgixURLParams = {\n\t\tfit: (url.searchParams.get(\"fit\") as ImgixURLParams[\"fit\"]) || \"max\",\n\t\tw: args.width,\n\t\th: undefined,\n\t}\n\n\tif (args.quality) {\n\t\tparams.q = args.quality\n\t}\n\n\treturn buildURL(args.src, params)\n}\n"],"mappings":";;;;;;;;;;AAWA,MAAa,eAAe,SAAmC;CAG9D,MAAM,SAAyB;EAC9B,KAHW,IAAI,IAAI,KAAK,IAAI,CAGlB,aAAa,IAAI,MAAM,IAA8B;EAC/D,GAAG,KAAK;EACR,GAAG,KAAA;EACH;AAED,KAAI,KAAK,QACR,QAAO,IAAI,KAAK;AAGjB,SAAA,GAAA,kBAAA,UAAgB,KAAK,KAAK,OAAO"}
@@ -1,10 +1,9 @@
1
- import { ImageLoaderProps } from "next/image";
1
+ import { ImageLoaderProps } from "next/image.js";
2
2
 
3
3
  //#region src/imgixLoader.d.ts
4
-
5
4
  /**
6
- * A `next/image` loader for Imgix, which Prismic uses, with an optional
7
- * collection of default Imgix parameters.
5
+ * A `next/image` loader for Imgix, which Prismic uses, with an optional collection of default Imgix
6
+ * parameters.
8
7
  *
9
8
  * @see To learn about `next/image` loaders: https://nextjs.org/docs/api-reference/next/image#loader
10
9
  * @see To learn about Imgix's URL API: https://docs.imgix.com/apis/rendering
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imgixLoader.d.cts","names":[],"sources":["../src/imgixLoader.ts"],"mappings":";;;;;AAWA;;;;;cAAa,WAAA,GAAe,IAAA,EAAM,gBAAA"}
@@ -1,10 +1,9 @@
1
- import { ImageLoaderProps } from "next/image";
1
+ import { ImageLoaderProps } from "next/image.js";
2
2
 
3
3
  //#region src/imgixLoader.d.ts
4
-
5
4
  /**
6
- * A `next/image` loader for Imgix, which Prismic uses, with an optional
7
- * collection of default Imgix parameters.
5
+ * A `next/image` loader for Imgix, which Prismic uses, with an optional collection of default Imgix
6
+ * parameters.
8
7
  *
9
8
  * @see To learn about `next/image` loaders: https://nextjs.org/docs/api-reference/next/image#loader
10
9
  * @see To learn about Imgix's URL API: https://docs.imgix.com/apis/rendering
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imgixLoader.d.ts","names":[],"sources":["../src/imgixLoader.ts"],"mappings":";;;;;AAWA;;;;;cAAa,WAAA,GAAe,IAAA,EAAM,gBAAA"}
@@ -1,9 +1,8 @@
1
1
  import { buildURL } from "imgix-url-builder";
2
-
3
2
  //#region src/imgixLoader.ts
4
3
  /**
5
- * A `next/image` loader for Imgix, which Prismic uses, with an optional
6
- * collection of default Imgix parameters.
4
+ * A `next/image` loader for Imgix, which Prismic uses, with an optional collection of default Imgix
5
+ * parameters.
7
6
  *
8
7
  * @see To learn about `next/image` loaders: https://nextjs.org/docs/api-reference/next/image#loader
9
8
  * @see To learn about Imgix's URL API: https://docs.imgix.com/apis/rendering
@@ -17,7 +16,7 @@ const imgixLoader = (args) => {
17
16
  if (args.quality) params.q = args.quality;
18
17
  return buildURL(args.src, params);
19
18
  };
20
-
21
19
  //#endregion
22
20
  export { imgixLoader };
21
+
23
22
  //# sourceMappingURL=imgixLoader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"imgixLoader.js","names":[],"sources":["../src/imgixLoader.ts"],"sourcesContent":["import type { ImageLoaderProps } from \"next/image\";\nimport type { ImgixURLParams } from \"imgix-url-builder\";\nimport { buildURL } from \"imgix-url-builder\";\n\n/**\n * A `next/image` loader for Imgix, which Prismic uses, with an optional\n * collection of default Imgix parameters.\n *\n * @see To learn about `next/image` loaders: https://nextjs.org/docs/api-reference/next/image#loader\n * @see To learn about Imgix's URL API: https://docs.imgix.com/apis/rendering\n */\nexport const imgixLoader = (args: ImageLoaderProps): string => {\n\tconst url = new URL(args.src);\n\n\tconst params: ImgixURLParams = {\n\t\tfit: (url.searchParams.get(\"fit\") as ImgixURLParams[\"fit\"]) || \"max\",\n\t\tw: args.width,\n\t\th: undefined,\n\t};\n\n\tif (args.quality) {\n\t\tparams.q = args.quality;\n\t}\n\n\treturn buildURL(args.src, params);\n};\n"],"mappings":";;;;;;;;;;AAWA,MAAa,eAAe,SAAmC;CAG9D,MAAM,SAAyB;EAC9B,KAHW,IAAI,IAAI,KAAK,IAAI,CAGlB,aAAa,IAAI,MAAM,IAA8B;EAC/D,GAAG,KAAK;EACR,GAAG;EACH;AAED,KAAI,KAAK,QACR,QAAO,IAAI,KAAK;AAGjB,QAAO,SAAS,KAAK,KAAK,OAAO"}
1
+ {"version":3,"file":"imgixLoader.js","names":[],"sources":["../src/imgixLoader.ts"],"sourcesContent":["import type { ImgixURLParams } from \"imgix-url-builder\"\nimport { buildURL } from \"imgix-url-builder\"\nimport type { ImageLoaderProps } from \"next/image\"\n\n/**\n * A `next/image` loader for Imgix, which Prismic uses, with an optional collection of default Imgix\n * parameters.\n *\n * @see To learn about `next/image` loaders: https://nextjs.org/docs/api-reference/next/image#loader\n * @see To learn about Imgix's URL API: https://docs.imgix.com/apis/rendering\n */\nexport const imgixLoader = (args: ImageLoaderProps): string => {\n\tconst url = new URL(args.src)\n\n\tconst params: ImgixURLParams = {\n\t\tfit: (url.searchParams.get(\"fit\") as ImgixURLParams[\"fit\"]) || \"max\",\n\t\tw: args.width,\n\t\th: undefined,\n\t}\n\n\tif (args.quality) {\n\t\tparams.q = args.quality\n\t}\n\n\treturn buildURL(args.src, params)\n}\n"],"mappings":";;;;;;;;;AAWA,MAAa,eAAe,SAAmC;CAG9D,MAAM,SAAyB;EAC9B,KAHW,IAAI,IAAI,KAAK,IAAI,CAGlB,aAAa,IAAI,MAAM,IAA8B;EAC/D,GAAG,KAAK;EACR,GAAG,KAAA;EACH;AAED,KAAI,KAAK,QACR,QAAO,IAAI,KAAK;AAGjB,QAAO,SAAS,KAAK,KAAK,OAAO"}
package/dist/index.cjs CHANGED
@@ -1,14 +1,14 @@
1
- const require_exitPreview = require('./exitPreview.cjs');
2
- const require_PrismicPreview = require('./PrismicPreview.cjs');
3
- const require_PrismicNextLink = require('./PrismicNextLink.cjs');
4
- const require_enableAutoPreviews = require('./enableAutoPreviews.cjs');
5
- const require_redirectToPreviewURL = require('./redirectToPreviewURL.cjs');
6
- const require_imgixLoader = require('./imgixLoader.cjs');
7
- const require_PrismicNextImage = require('./PrismicNextImage.cjs');
8
- const require_getSlices = require('./getSlices.cjs');
9
- const require_SliceSimulator = require('./SliceSimulator.cjs');
10
- const require_createLocaleRedirect = require('./createLocaleRedirect.cjs');
11
-
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_exitPreview = require("./exitPreview.cjs");
3
+ const require_PrismicPreview = require("./PrismicPreview.cjs");
4
+ const require_PrismicNextLink = require("./PrismicNextLink.cjs");
5
+ const require_enableAutoPreviews = require("./enableAutoPreviews.cjs");
6
+ const require_redirectToPreviewURL = require("./redirectToPreviewURL.cjs");
7
+ const require_imgixLoader = require("./imgixLoader.cjs");
8
+ const require_PrismicNextImage = require("./PrismicNextImage.cjs");
9
+ const require_getSlices = require("./getSlices.cjs");
10
+ const require_SliceSimulator = require("./SliceSimulator.cjs");
11
+ const require_createLocaleRedirect = require("./createLocaleRedirect.cjs");
12
12
  exports.PrismicNextImage = require_PrismicNextImage.PrismicNextImage;
13
13
  exports.PrismicNextLink = require_PrismicNextLink.PrismicNextLink;
14
14
  exports.PrismicPreview = require_PrismicPreview.PrismicPreview;
@@ -18,4 +18,4 @@ exports.enableAutoPreviews = require_enableAutoPreviews.enableAutoPreviews;
18
18
  exports.exitPreview = require_exitPreview.exitPreview;
19
19
  exports.getSlices = require_getSlices.getSlices;
20
20
  exports.imgixLoader = require_imgixLoader.imgixLoader;
21
- exports.redirectToPreviewURL = require_redirectToPreviewURL.redirectToPreviewURL;
21
+ exports.redirectToPreviewURL = require_redirectToPreviewURL.redirectToPreviewURL;
package/dist/index.js CHANGED
@@ -8,5 +8,4 @@ import { PrismicNextImage } from "./PrismicNextImage.js";
8
8
  import { getSlices } from "./getSlices.js";
9
9
  import { SliceSimulator } from "./SliceSimulator.js";
10
10
  import { createLocaleRedirect } from "./createLocaleRedirect.js";
11
-
12
- export { PrismicNextImage, PrismicNextLink, PrismicPreview, SliceSimulator, createLocaleRedirect, enableAutoPreviews, exitPreview, getSlices, imgixLoader, redirectToPreviewURL };
11
+ export { PrismicNextImage, PrismicNextLink, PrismicPreview, SliceSimulator, createLocaleRedirect, enableAutoPreviews, exitPreview, getSlices, imgixLoader, redirectToPreviewURL };