@makeswift/runtime 0.10.10 → 0.10.12

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 (145) hide show
  1. package/dist/Box.cjs.js +1 -0
  2. package/dist/Box.cjs.js.map +1 -1
  3. package/dist/Box.es.js +2 -1
  4. package/dist/Box.es.js.map +1 -1
  5. package/dist/Button.cjs.js +1 -0
  6. package/dist/Button.cjs.js.map +1 -1
  7. package/dist/Button.es.js +2 -1
  8. package/dist/Button.es.js.map +1 -1
  9. package/dist/Carousel.cjs.js +1 -0
  10. package/dist/Carousel.cjs.js.map +1 -1
  11. package/dist/Carousel.es.js +2 -1
  12. package/dist/Carousel.es.js.map +1 -1
  13. package/dist/Countdown.cjs.js +1 -0
  14. package/dist/Countdown.cjs.js.map +1 -1
  15. package/dist/Countdown.es.js +2 -1
  16. package/dist/Countdown.es.js.map +1 -1
  17. package/dist/Divider.cjs.js +1 -0
  18. package/dist/Divider.cjs.js.map +1 -1
  19. package/dist/Divider.es.js +2 -1
  20. package/dist/Divider.es.js.map +1 -1
  21. package/dist/Embed.cjs.js +1 -0
  22. package/dist/Embed.cjs.js.map +1 -1
  23. package/dist/Embed.es.js +2 -1
  24. package/dist/Embed.es.js.map +1 -1
  25. package/dist/Form.cjs.js +1 -0
  26. package/dist/Form.cjs.js.map +1 -1
  27. package/dist/Form.es.js +2 -1
  28. package/dist/Form.es.js.map +1 -1
  29. package/dist/Image.cjs.js +19 -3
  30. package/dist/Image.cjs.js.map +1 -1
  31. package/dist/Image.es.js +20 -4
  32. package/dist/Image.es.js.map +1 -1
  33. package/dist/LiveProvider.cjs.js +1 -0
  34. package/dist/LiveProvider.cjs.js.map +1 -1
  35. package/dist/LiveProvider.es.js +2 -1
  36. package/dist/LiveProvider.es.js.map +1 -1
  37. package/dist/Navigation.cjs.js +1 -0
  38. package/dist/Navigation.cjs.js.map +1 -1
  39. package/dist/Navigation.es.js +2 -1
  40. package/dist/Navigation.es.js.map +1 -1
  41. package/dist/PreviewProvider.cjs.js +1 -0
  42. package/dist/PreviewProvider.cjs.js.map +1 -1
  43. package/dist/PreviewProvider.es.js +2 -1
  44. package/dist/PreviewProvider.es.js.map +1 -1
  45. package/dist/ReadOnlyText.cjs.js +1 -0
  46. package/dist/ReadOnlyText.cjs.js.map +1 -1
  47. package/dist/ReadOnlyText.es.js +2 -1
  48. package/dist/ReadOnlyText.es.js.map +1 -1
  49. package/dist/ReadOnlyTextV2.cjs.js +1 -0
  50. package/dist/ReadOnlyTextV2.cjs.js.map +1 -1
  51. package/dist/ReadOnlyTextV2.es.js +2 -1
  52. package/dist/ReadOnlyTextV2.es.js.map +1 -1
  53. package/dist/Root.cjs.js +1 -0
  54. package/dist/Root.cjs.js.map +1 -1
  55. package/dist/Root.es.js +2 -1
  56. package/dist/Root.es.js.map +1 -1
  57. package/dist/SocialLinks.cjs.js +1 -0
  58. package/dist/SocialLinks.cjs.js.map +1 -1
  59. package/dist/SocialLinks.es.js +2 -1
  60. package/dist/SocialLinks.es.js.map +1 -1
  61. package/dist/Video.cjs.js +1 -0
  62. package/dist/Video.cjs.js.map +1 -1
  63. package/dist/Video.es.js +2 -1
  64. package/dist/Video.es.js.map +1 -1
  65. package/dist/builder.cjs.js +1 -0
  66. package/dist/builder.cjs.js.map +1 -1
  67. package/dist/builder.es.js +1 -0
  68. package/dist/builder.es.js.map +1 -1
  69. package/dist/components.cjs.js +1 -0
  70. package/dist/components.cjs.js.map +1 -1
  71. package/dist/components.es.js +1 -0
  72. package/dist/components.es.js.map +1 -1
  73. package/dist/control-serialization.cjs.js +1 -0
  74. package/dist/control-serialization.cjs.js.map +1 -1
  75. package/dist/control-serialization.es.js +2 -1
  76. package/dist/control-serialization.es.js.map +1 -1
  77. package/dist/controls.cjs.js +2 -1
  78. package/dist/controls.cjs.js.map +1 -1
  79. package/dist/controls.es.js +2 -1
  80. package/dist/controls.es.js.map +1 -1
  81. package/dist/index.cjs.js +30 -31
  82. package/dist/index.cjs.js.map +1 -1
  83. package/dist/index.cjs2.js +1 -0
  84. package/dist/index.cjs2.js.map +1 -1
  85. package/dist/index.cjs8.js +1 -0
  86. package/dist/index.cjs8.js.map +1 -1
  87. package/dist/index.cjs9.js +1 -0
  88. package/dist/index.cjs9.js.map +1 -1
  89. package/dist/index.es.js +31 -32
  90. package/dist/index.es.js.map +1 -1
  91. package/dist/index.es2.js +2 -1
  92. package/dist/index.es2.js.map +1 -1
  93. package/dist/index.es4.js +1 -1
  94. package/dist/index.es5.js +1 -1
  95. package/dist/index.es6.js +1 -1
  96. package/dist/index.es8.js +2 -1
  97. package/dist/index.es8.js.map +1 -1
  98. package/dist/index.es9.js +2 -1
  99. package/dist/index.es9.js.map +1 -1
  100. package/dist/main.cjs.js +1 -0
  101. package/dist/main.cjs.js.map +1 -1
  102. package/dist/main.es.js +1 -0
  103. package/dist/main.es.js.map +1 -1
  104. package/dist/next.cjs.js +1 -0
  105. package/dist/next.cjs.js.map +1 -1
  106. package/dist/next.es.js +1 -0
  107. package/dist/next.es.js.map +1 -1
  108. package/dist/prop-controllers.cjs.js +2 -0
  109. package/dist/prop-controllers.cjs.js.map +1 -1
  110. package/dist/prop-controllers.es.js +2 -1
  111. package/dist/prop-controllers.es.js.map +1 -1
  112. package/dist/react-page.cjs.js +16 -13
  113. package/dist/react-page.cjs.js.map +1 -1
  114. package/dist/react-page.es.js +19 -17
  115. package/dist/react-page.es.js.map +1 -1
  116. package/dist/react.cjs.js +1 -0
  117. package/dist/react.cjs.js.map +1 -1
  118. package/dist/react.es.js +1 -0
  119. package/dist/react.es.js.map +1 -1
  120. package/dist/slate.cjs.js +1 -0
  121. package/dist/slate.cjs.js.map +1 -1
  122. package/dist/slate.es.js +2 -1
  123. package/dist/slate.es.js.map +1 -1
  124. package/dist/toText.cjs.js +1 -0
  125. package/dist/toText.cjs.js.map +1 -1
  126. package/dist/toText.es.js +2 -1
  127. package/dist/toText.es.js.map +1 -1
  128. package/dist/types/src/components/builtin/Image/Image.d.ts.map +1 -1
  129. package/dist/types/src/next/api-handler/handlers/manifest.d.ts +3 -2
  130. package/dist/types/src/next/api-handler/handlers/manifest.d.ts.map +1 -1
  131. package/dist/types/src/next/api-handler/index.d.ts +2 -2
  132. package/dist/types/src/next/api-handler/index.d.ts.map +1 -1
  133. package/dist/types/src/next/client.d.ts +4 -2
  134. package/dist/types/src/next/client.d.ts.map +1 -1
  135. package/dist/types/src/next/index.d.ts.map +1 -1
  136. package/dist/types/src/next/preview-mode.d.ts +3 -3
  137. package/dist/types/src/prop-controllers/copy/image.d.ts +2 -2
  138. package/dist/types/src/prop-controllers/copy/image.d.ts.map +1 -1
  139. package/dist/types/src/prop-controllers/descriptors.d.ts +16 -1
  140. package/dist/types/src/prop-controllers/descriptors.d.ts.map +1 -1
  141. package/dist/types/src/prop-controllers/index.d.ts +2 -1
  142. package/dist/types/src/prop-controllers/index.d.ts.map +1 -1
  143. package/dist/types/src/prop-controllers/introspection.d.ts.map +1 -1
  144. package/dist/types/types/locale.d.ts +1 -1
  145. package/package.json +2 -1
package/dist/index.es.js CHANGED
@@ -38,13 +38,14 @@ import * as React from "react";
38
38
  import { useEffect, createContext, useContext, useState, useMemo, useRef, Children, createElement, forwardRef, memo, useId, useCallback, useImperativeHandle, Component, Suspense } from "react";
39
39
  import { useSyncExternalStoreWithSelector } from "use-sync-external-store/shim/with-selector";
40
40
  import dynamic from "next/dynamic";
41
- import { a as deepEqual, b as createDocumentReference, g as getPropControllerDescriptors, e as isElementReference, f as getDefaultLocale, h as getLocales, j as getSwatchIds, k as getFileIds, l as getTypographyIds, m as getTableIds, n as getPageIds, o as getElementChildren, E as ElementID, B as Backgrounds, W as Width, p as ResponsiveIconRadioGroup, M as Margin, P as Padding, q as Border, r as BorderRadius, S as Shadows, G as GapY, s as GapX, t as ResponsiveSelect, u as ResponsiveNumber, v as Checkbox, w as Grid, x as TextInput, L as Link, y as ResponsiveColor, z as TextStyle, C as ComponentIcon, I as Images, N as Number$1, D as Date$1, F as Font, A as ResponsiveLength, H as TextArea, J as Table, K as TableFormFields, O as Image, Q as ResponsiveOpacity, U as NavigationLinks, V as SocialLinks, X as RichText, Y as Video, Z as useStyle, _ as getBorderSwatchIds, $ as getBoxShadowsSwatchIds, a0 as getResponsiveColorSwatchIds, a1 as StyleControlProperty, a2 as ImageControlValueFormat, a3 as isPropControllersHandle, a4 as isRichTextV1Data, a5 as isNonNullable$1, a6 as TypographyControlType, a7 as StyleControlType, a8 as RichTextV2ControlType, a9 as RichTextControlType, aa as SlotControlType, ab as StyleV2ControlType, ac as ListControlType, ad as ShapeControlType, ae as LinkControlType, af as ImageControlType, ag as IconRadioGroupControlType, ah as ColorControlType, ai as SelectControlType, aj as getComponentPropControllerDescriptors, ak as getPropControllers, al as Types, am as BorderPropControllerFormat, an as ShadowsPropControllerFormat, ao as BorderRadiusPropControllerFormat, ap as MarginPropControllerFormat, aq as PaddingPropControllerFormat, ar as WidthPropControllerFormat, as as configureStore$1, at as copyElementTree, au as getBreakpoints, av as parseLocalesInput, aw as getDocument, ax as getElementId, ay as getIsInBuilder, az as getReactComponent, aA as getBuilderEditMode, aB as getIsPreview } from "./react-page.es.js";
41
+ import { b as deepEqual, e as createDocumentReference, g as getPropControllerDescriptors, f as isElementReference, h as getDefaultLocale, j as getLocales, k as getSwatchIds, l as getFileIds, m as getTypographyIds, n as getTableIds, o as getPageIds, p as getElementChildren, E as ElementID, B as Backgrounds, W as Width, q as ResponsiveIconRadioGroup, M as Margin, P as Padding, r as Border, s as BorderRadius, S as Shadows, G as GapY, t as GapX, u as ResponsiveSelect, v as ResponsiveNumber, w as Checkbox, x as Grid, y as TextInput, L as Link, z as ResponsiveColor, A as TextStyle, C as ComponentIcon, I as Images, N as Number$1, D as Date$1, F as Font, H as ResponsiveLength, J as TextArea, K as Table, O as TableFormFields, Q as Image, U as ResponsiveOpacity, V as NavigationLinks, X as SocialLinks, Y as RichText, Z as Video, _ as useStyle, $ as getBorderSwatchIds, a0 as getBoxShadowsSwatchIds, a1 as getResponsiveColorSwatchIds, a2 as StyleControlProperty, a3 as ImageControlValueFormat, a4 as isPropControllersHandle, a5 as isRichTextV1Data, a6 as isNonNullable$1, a7 as TypographyControlType, a8 as StyleControlType, a9 as RichTextV2ControlType, aa as RichTextControlType, ab as SlotControlType, ac as StyleV2ControlType, ad as ListControlType, ae as ShapeControlType, af as LinkControlType, ag as ImageControlType, ah as IconRadioGroupControlType, ai as ColorControlType, aj as SelectControlType, ak as getComponentPropControllerDescriptors, al as getPropControllers, am as Types, an as BorderPropControllerFormat, ao as ShadowsPropControllerFormat, ap as BorderRadiusPropControllerFormat, aq as MarginPropControllerFormat, ar as PaddingPropControllerFormat, as as WidthPropControllerFormat, at as configureStore$1, au as copyElementTree, av as getBreakpoints, aw as parseLocalesInput, ax as getDocument, ay as getElementId, az as getIsInBuilder, aA as getReactComponent, aB as getBuilderEditMode, aC as getIsPreview } from "./react-page.es.js";
42
42
  import { A as ActionTypes, o as apiResourceFulfilled, p as registerComponentEffect, q as registerReactComponentEffect, t as registerComponentHandleEffect, v as mountComponentEffect } from "./actions.es.js";
43
43
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
44
44
  import { T as TextAreaControlType, a as TextInputControlType, N as NumberControlType, C as CheckboxControlType } from "./text-input.es.js";
45
45
  import { C as ComboboxControlType } from "./combobox.es.js";
46
46
  import { v4 } from "uuid";
47
47
  import "slate";
48
+ import "ts-pattern";
48
49
  import { useSyncExternalStore } from "use-sync-external-store/shim";
49
50
  import { createStore, applyMiddleware } from "redux";
50
51
  import thunk from "redux-thunk";
@@ -669,12 +670,12 @@ const makeswiftSiteVersionSchema = z.enum(["Live", "Working"]);
669
670
  const MakeswiftSiteVersion = makeswiftSiteVersionSchema.Enum;
670
671
  const makeswiftPreviewDataSchema = z.object({
671
672
  makeswift: z.literal(true),
672
- unstable_siteVersion: makeswiftSiteVersionSchema
673
+ siteVersion: makeswiftSiteVersionSchema
673
674
  });
674
675
  function getMakeswiftSiteVersion(previewData) {
675
676
  const result = makeswiftPreviewDataSchema.safeParse(previewData);
676
677
  if (result.success)
677
- return result.data.unstable_siteVersion;
678
+ return result.data.siteVersion;
678
679
  return null;
679
680
  }
680
681
  function PreviewModeScript({
@@ -772,7 +773,7 @@ class Makeswift {
772
773
  constructor(apiKey, {
773
774
  apiOrigin = "https://api.makeswift.com",
774
775
  runtime = ReactRuntime,
775
- unstable_previewData
776
+ siteVersion
776
777
  } = {}) {
777
778
  __publicField(this, "apiKey");
778
779
  __publicField(this, "apiOrigin");
@@ -791,7 +792,11 @@ Received "${apiKey}" instead.`);
791
792
  }
792
793
  this.graphqlClient = new GraphQLClient(new URL("graphql", apiOrigin).href);
793
794
  this.runtime = runtime;
794
- this.siteVersion = getMakeswiftSiteVersion(unstable_previewData);
795
+ this.siteVersion = siteVersion != null ? siteVersion : null;
796
+ }
797
+ static getSiteVersion(previewData) {
798
+ var _a;
799
+ return (_a = getMakeswiftSiteVersion(previewData)) != null ? _a : MakeswiftSiteVersion.Live;
795
800
  }
796
801
  async fetch(path, init) {
797
802
  var _a;
@@ -805,8 +810,7 @@ Received "${apiKey}" instead.`);
805
810
  return response;
806
811
  }
807
812
  async getPages() {
808
- const isUsingVersioning = this.siteVersion != null;
809
- const response = await this.fetch(`/${isUsingVersioning ? "v3" : "v2"}/pages`, {
813
+ const response = await this.fetch(`/${this.siteVersion == null ? "v2" : "v3"}/pages`, {
810
814
  headers: {
811
815
  "Makeswift-Site-Version": MakeswiftSiteVersion.Live
812
816
  }
@@ -820,8 +824,7 @@ Received "${apiKey}" instead.`);
820
824
  }
821
825
  async getTypographies(typographyIds, preview) {
822
826
  var _a;
823
- const isUsingVersioning = this.siteVersion != null;
824
- const url = new URL(`${isUsingVersioning ? "v2" : "v1"}/typographies/bulk`, this.apiOrigin);
827
+ const url = new URL(`${this.siteVersion == null ? "v1" : "v2"}/typographies/bulk`, this.apiOrigin);
825
828
  typographyIds.forEach((id) => {
826
829
  url.searchParams.append("ids", id);
827
830
  });
@@ -839,8 +842,7 @@ Received "${apiKey}" instead.`);
839
842
  }
840
843
  async getSwatches(ids, preview) {
841
844
  var _a;
842
- const isUsingVersioning = this.siteVersion != null;
843
- const url = new URL(`${isUsingVersioning ? "v2" : "v1"}/swatches/bulk`, this.apiOrigin);
845
+ const url = new URL(`${this.siteVersion == null ? "v1" : "v2"}/swatches/bulk`, this.apiOrigin);
844
846
  ids.forEach((id) => {
845
847
  url.searchParams.append("ids", id);
846
848
  });
@@ -993,7 +995,6 @@ Received "${apiKey}" instead.`);
993
995
  unstable_locale
994
996
  } = {}) {
995
997
  var _a, _b, _c;
996
- const isUsingVersioning = this.siteVersion != null;
997
998
  const siteVersion = (_a = this.siteVersion) != null ? _a : previewOverride ? MakeswiftSiteVersion.Working : MakeswiftSiteVersion.Live;
998
999
  const defaultLocale = (_b = getDefaultLocale(this.runtime.store.getState())) == null ? void 0 : _b.toString();
999
1000
  const locale = unstable_locale === defaultLocale ? null : unstable_locale;
@@ -1005,7 +1006,7 @@ Received "${apiKey}" instead.`);
1005
1006
  }
1006
1007
  searchParams.set("locale", locale);
1007
1008
  }
1008
- const response = await this.fetch(`/${isUsingVersioning ? "v3" : "v2"}/pages/${encodeURIComponent(pathname)}/document?${searchParams.toString()}`, {
1009
+ const response = await this.fetch(`/${this.siteVersion == null ? "v2" : "v3"}/pages/${encodeURIComponent(pathname)}/document?${searchParams.toString()}`, {
1009
1010
  headers: { "Makeswift-Site-Version": siteVersion }
1010
1011
  });
1011
1012
  if (!response.ok) {
@@ -1029,8 +1030,7 @@ Received "${apiKey}" instead.`);
1029
1030
  };
1030
1031
  }
1031
1032
  async getSwatch(swatchId) {
1032
- const isUsingVersioning = this.siteVersion != null;
1033
- const response = await this.fetch(`${isUsingVersioning ? "v2" : "v1"}/swatches/${swatchId}`);
1033
+ const response = await this.fetch(`${this.siteVersion == null ? "v1" : "v2"}/swatches/${swatchId}`);
1034
1034
  if (!response.ok) {
1035
1035
  if (response.status !== 404)
1036
1036
  console.error("Failed to get swatch", await response.json());
@@ -1044,8 +1044,7 @@ Received "${apiKey}" instead.`);
1044
1044
  return result.file;
1045
1045
  }
1046
1046
  async getTypography(typographyId) {
1047
- const isUsingVersioning = this.siteVersion != null;
1048
- const response = await this.fetch(`${isUsingVersioning ? "v2" : "v1"}/typographies/${typographyId}`);
1047
+ const response = await this.fetch(`${this.siteVersion == null ? "v1" : "v2"}/typographies/${typographyId}`);
1049
1048
  if (!response.ok) {
1050
1049
  if (response.status !== 404)
1051
1050
  console.error("Failed to get typography", await response.json());
@@ -1055,8 +1054,7 @@ Received "${apiKey}" instead.`);
1055
1054
  return typography;
1056
1055
  }
1057
1056
  async getGlobalElement(globalElementId) {
1058
- const isUsingVersioning = this.siteVersion != null;
1059
- const response = await this.fetch(`${isUsingVersioning ? "v2" : "v1"}/global-elements/${globalElementId}`);
1057
+ const response = await this.fetch(`${this.siteVersion == null ? "v1" : "v2"}/global-elements/${globalElementId}`);
1060
1058
  if (!response.ok) {
1061
1059
  if (response.status !== 404)
1062
1060
  console.error("Failed to get global element", await response.json());
@@ -1066,8 +1064,7 @@ Received "${apiKey}" instead.`);
1066
1064
  return globalElement;
1067
1065
  }
1068
1066
  async getLocalizedGlobalElement(globalElementId, locale) {
1069
- const isUsingVersioning = this.siteVersion != null;
1070
- const response = await this.fetch(`${isUsingVersioning ? "v2" : "v1"}/localized-global-elements/${globalElementId}?locale=${locale}`);
1067
+ const response = await this.fetch(`${this.siteVersion == null ? "v1" : "v2"}/localized-global-elements/${globalElementId}?locale=${locale}`);
1071
1068
  if (!response.ok) {
1072
1069
  if (response.status !== 404)
1073
1070
  console.error("Failed to get localized global element", await response.json());
@@ -1159,8 +1156,8 @@ async function fonts(_req, res, { getFonts } = {}) {
1159
1156
  const fonts2 = (_a = await (getFonts == null ? void 0 : getFonts())) != null ? _a : [];
1160
1157
  return res.json(fonts2);
1161
1158
  }
1162
- const version = "0.10.10";
1163
- async function handler(req, res, { apiKey, unstable_siteVersions }) {
1159
+ const version = "0.10.12";
1160
+ async function handler(req, res, { apiKey, siteVersions }) {
1164
1161
  if (req.query.secret !== apiKey) {
1165
1162
  return res.status(401).json({ message: "Unauthorized" });
1166
1163
  }
@@ -1171,7 +1168,8 @@ async function handler(req, res, { apiKey, unstable_siteVersions }) {
1171
1168
  clientSideNavigation: true,
1172
1169
  elementFromPoint: false,
1173
1170
  customBreakpoints: true,
1174
- unstable_siteVersions,
1171
+ siteVersions,
1172
+ unstable_siteVersions: siteVersions,
1175
1173
  localizedPageSSR: true
1176
1174
  });
1177
1175
  }
@@ -1216,7 +1214,7 @@ async function proxyPreviewMode(req, res, { apiKey }) {
1216
1214
  const secure = process.env["NODE_ENV"] === "production";
1217
1215
  const previewData = {
1218
1216
  makeswift: true,
1219
- unstable_siteVersion: MakeswiftSiteVersion.Working
1217
+ siteVersion: MakeswiftSiteVersion.Working
1220
1218
  };
1221
1219
  const setCookie = res.setPreviewData(previewData).getHeader("Set-Cookie");
1222
1220
  res.removeHeader("Set-Cookie");
@@ -1261,7 +1259,7 @@ function MakeswiftApiHandler(apiKey, {
1261
1259
  appOrigin = "https://app.makeswift.com",
1262
1260
  apiOrigin = "https://api.makeswift.com",
1263
1261
  getFonts,
1264
- unstable_siteVersions = false
1262
+ siteVersions = false
1265
1263
  } = {}) {
1266
1264
  const cors = Cors({ origin: appOrigin });
1267
1265
  if (typeof apiKey !== "string") {
@@ -1283,12 +1281,15 @@ Received "${apiKey}" instead.`);
1283
1281
  Received "${makeswift}" for the \`makeswift\` param instead.
1284
1282
  Read more about dynamic catch-all routes here: https://nextjs.org/docs/routing/dynamic-routes#catch-all-routes`);
1285
1283
  }
1286
- const client = new Makeswift(apiKey, { apiOrigin, unstable_previewData: req.previewData });
1284
+ const client = new Makeswift(apiKey, {
1285
+ apiOrigin,
1286
+ siteVersion: siteVersions ? Makeswift.getSiteVersion(req.previewData) : void 0
1287
+ });
1287
1288
  const action = "/" + makeswift.join("/");
1288
1289
  const matches = (pattern) => match(pattern, { decode: decodeURIComponent })(action);
1289
1290
  let m;
1290
1291
  if (matches("/manifest"))
1291
- return handler(req, res, { apiKey, unstable_siteVersions });
1292
+ return handler(req, res, { apiKey, siteVersions });
1292
1293
  if (matches("/revalidate"))
1293
1294
  return revalidate(req, res, { apiKey });
1294
1295
  if (matches("/proxy-preview-mode"))
@@ -1397,8 +1398,7 @@ async function getStaticProps(ctx) {
1397
1398
  var _a, _b, _c;
1398
1399
  deprecationWarning("getStaticProps");
1399
1400
  const makeswift = new Makeswift(getApiKey(), {
1400
- apiOrigin: getApiOrigin(),
1401
- unstable_previewData: ctx.previewData
1401
+ apiOrigin: getApiOrigin()
1402
1402
  });
1403
1403
  const path = "/" + ((_b = (_a = ctx.params) == null ? void 0 : _a.path) != null ? _b : []).join("/");
1404
1404
  const snapshot = await makeswift.getPageSnapshot(path, {
@@ -1420,8 +1420,7 @@ async function getServerSideProps(ctx) {
1420
1420
  var _a, _b;
1421
1421
  deprecationWarning("getServerSideProps");
1422
1422
  const makeswift = new Makeswift(getApiKey(), {
1423
- apiOrigin: getApiOrigin(),
1424
- unstable_previewData: ctx.previewData
1423
+ apiOrigin: getApiOrigin()
1425
1424
  });
1426
1425
  const path = "/" + ((_b = (_a = ctx.params) == null ? void 0 : _a.path) != null ? _b : []).join("/");
1427
1426
  const snapshot = await makeswift.getPageSnapshot(path, {