@makeswift/runtime 0.9.12 → 0.10.1

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 (244) hide show
  1. package/dist/Box.cjs.js +3 -0
  2. package/dist/Box.cjs.js.map +1 -1
  3. package/dist/Box.es.js +4 -1
  4. package/dist/Box.es.js.map +1 -1
  5. package/dist/Button.cjs.js +3 -2
  6. package/dist/Button.cjs.js.map +1 -1
  7. package/dist/Button.es.js +4 -3
  8. package/dist/Button.es.js.map +1 -1
  9. package/dist/Carousel.cjs.js +3 -2
  10. package/dist/Carousel.cjs.js.map +1 -1
  11. package/dist/Carousel.es.js +4 -3
  12. package/dist/Carousel.es.js.map +1 -1
  13. package/dist/Countdown.cjs.js +3 -0
  14. package/dist/Countdown.cjs.js.map +1 -1
  15. package/dist/Countdown.es.js +4 -1
  16. package/dist/Countdown.es.js.map +1 -1
  17. package/dist/Divider.cjs.js +3 -0
  18. package/dist/Divider.cjs.js.map +1 -1
  19. package/dist/Divider.es.js +4 -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 +13 -12
  26. package/dist/Form.cjs.js.map +1 -1
  27. package/dist/Form.es.js +5 -4
  28. package/dist/Form.es.js.map +1 -1
  29. package/dist/Image.cjs.js +11 -10
  30. package/dist/Image.cjs.js.map +1 -1
  31. package/dist/Image.es.js +11 -10
  32. package/dist/Image.es.js.map +1 -1
  33. package/dist/LiveProvider.cjs.js +3 -0
  34. package/dist/LiveProvider.cjs.js.map +1 -1
  35. package/dist/LiveProvider.es.js +5 -2
  36. package/dist/LiveProvider.es.js.map +1 -1
  37. package/dist/Navigation.cjs.js +11 -10
  38. package/dist/Navigation.cjs.js.map +1 -1
  39. package/dist/Navigation.es.js +11 -10
  40. package/dist/Navigation.es.js.map +1 -1
  41. package/dist/PreviewProvider.cjs.js +10 -6
  42. package/dist/PreviewProvider.cjs.js.map +1 -1
  43. package/dist/PreviewProvider.es.js +9 -5
  44. package/dist/PreviewProvider.es.js.map +1 -1
  45. package/dist/ReadOnlyText.cjs.js +19 -26
  46. package/dist/ReadOnlyText.cjs.js.map +1 -1
  47. package/dist/ReadOnlyText.es.js +15 -22
  48. package/dist/ReadOnlyText.es.js.map +1 -1
  49. package/dist/ReadOnlyTextV2.cjs.js +29 -26
  50. package/dist/ReadOnlyTextV2.cjs.js.map +1 -1
  51. package/dist/ReadOnlyTextV2.es.js +28 -25
  52. package/dist/ReadOnlyTextV2.es.js.map +1 -1
  53. package/dist/Root.cjs.js +3 -0
  54. package/dist/Root.cjs.js.map +1 -1
  55. package/dist/Root.es.js +4 -1
  56. package/dist/Root.es.js.map +1 -1
  57. package/dist/SocialLinks.cjs.js +6 -5
  58. package/dist/SocialLinks.cjs.js.map +1 -1
  59. package/dist/SocialLinks.es.js +7 -6
  60. package/dist/SocialLinks.es.js.map +1 -1
  61. package/dist/Text.cjs.js +12 -71
  62. package/dist/Text.cjs.js.map +1 -1
  63. package/dist/Text.es.js +13 -64
  64. package/dist/Text.es.js.map +1 -1
  65. package/dist/Video.cjs.js +1 -0
  66. package/dist/Video.cjs.js.map +1 -1
  67. package/dist/Video.es.js +2 -1
  68. package/dist/Video.es.js.map +1 -1
  69. package/dist/actions.cjs.js +2 -2
  70. package/dist/actions.cjs.js.map +1 -1
  71. package/dist/actions.es.js +2 -2
  72. package/dist/actions.es.js.map +1 -1
  73. package/dist/builder.cjs.js +2 -0
  74. package/dist/builder.cjs.js.map +1 -1
  75. package/dist/builder.es.js +2 -0
  76. package/dist/builder.es.js.map +1 -1
  77. package/dist/components.cjs.js +3 -2
  78. package/dist/components.cjs.js.map +1 -1
  79. package/dist/components.es.js +3 -2
  80. package/dist/components.es.js.map +1 -1
  81. package/dist/control-serialization.es.js +1 -1
  82. package/dist/controls.cjs.js +8 -8
  83. package/dist/controls.es.js +4 -2
  84. package/dist/controls.es.js.map +1 -1
  85. package/dist/index.cjs.js +280 -216
  86. package/dist/index.cjs.js.map +1 -1
  87. package/dist/index.cjs3.js +21 -107
  88. package/dist/index.cjs3.js.map +1 -1
  89. package/dist/index.cjs4.js +16 -57
  90. package/dist/index.cjs4.js.map +1 -1
  91. package/dist/index.cjs5.js +53 -242
  92. package/dist/index.cjs5.js.map +1 -1
  93. package/dist/index.cjs6.js +0 -41
  94. package/dist/index.cjs6.js.map +1 -1
  95. package/dist/index.cjs7.js +376 -14
  96. package/dist/index.cjs7.js.map +1 -1
  97. package/dist/index.cjs8.js +275 -11
  98. package/dist/index.cjs8.js.map +1 -1
  99. package/dist/index.es.js +274 -209
  100. package/dist/index.es.js.map +1 -1
  101. package/dist/index.es2.js +2 -2
  102. package/dist/index.es3.js +22 -103
  103. package/dist/index.es3.js.map +1 -1
  104. package/dist/index.es4.js +16 -57
  105. package/dist/index.es4.js.map +1 -1
  106. package/dist/index.es5.js +53 -240
  107. package/dist/index.es5.js.map +1 -1
  108. package/dist/index.es6.js +1 -36
  109. package/dist/index.es6.js.map +1 -1
  110. package/dist/index.es7.js +372 -16
  111. package/dist/index.es7.js.map +1 -1
  112. package/dist/index.es8.js +270 -10
  113. package/dist/index.es8.js.map +1 -1
  114. package/dist/main.cjs.js +2 -0
  115. package/dist/main.cjs.js.map +1 -1
  116. package/dist/main.es.js +2 -0
  117. package/dist/main.es.js.map +1 -1
  118. package/dist/next.cjs.js +3 -0
  119. package/dist/next.cjs.js.map +1 -1
  120. package/dist/next.es.js +4 -1
  121. package/dist/next.es.js.map +1 -1
  122. package/dist/prop-controllers.cjs.js +2 -0
  123. package/dist/prop-controllers.cjs.js.map +1 -1
  124. package/dist/prop-controllers.es.js +2 -0
  125. package/dist/prop-controllers.es.js.map +1 -1
  126. package/dist/react-page.cjs.js +1450 -65
  127. package/dist/react-page.cjs.js.map +1 -1
  128. package/dist/react-page.es.js +1427 -66
  129. package/dist/react-page.es.js.map +1 -1
  130. package/dist/react.cjs.js +3 -0
  131. package/dist/react.cjs.js.map +1 -1
  132. package/dist/react.es.js +3 -0
  133. package/dist/react.es.js.map +1 -1
  134. package/dist/slate.cjs.js +33 -391
  135. package/dist/slate.cjs.js.map +1 -1
  136. package/dist/slate.es.js +15 -376
  137. package/dist/slate.es.js.map +1 -1
  138. package/dist/text-input.cjs.js +0 -22
  139. package/dist/text-input.cjs.js.map +1 -1
  140. package/dist/text-input.es.js +1 -18
  141. package/dist/text-input.es.js.map +1 -1
  142. package/dist/types/src/components/builtin/Text/Text.d.ts +3 -4
  143. package/dist/types/src/components/builtin/Text/Text.d.ts.map +1 -1
  144. package/dist/types/src/components/builtin/Text/register.d.ts.map +1 -1
  145. package/dist/types/src/controls/rich-text/fixtures/v2-data-types.d.ts.map +1 -1
  146. package/dist/types/src/controls/rich-text/rich-text.d.ts +0 -1
  147. package/dist/types/src/controls/rich-text/rich-text.d.ts.map +1 -1
  148. package/dist/types/src/controls/rich-text/translation.d.ts.map +1 -1
  149. package/dist/types/src/controls/rich-text-v2/plugin.d.ts +29 -0
  150. package/dist/types/src/controls/rich-text-v2/plugin.d.ts.map +1 -0
  151. package/dist/types/src/controls/rich-text-v2/rich-text-v2.d.ts +17 -31
  152. package/dist/types/src/controls/rich-text-v2/rich-text-v2.d.ts.map +1 -1
  153. package/dist/types/src/next/api-handler/index.d.ts.map +1 -1
  154. package/dist/types/src/next/client.d.ts.map +1 -1
  155. package/dist/types/src/next/index.d.ts.map +1 -1
  156. package/dist/types/src/prop-controllers/descriptors.d.ts +1 -1
  157. package/dist/types/src/prop-controllers/descriptors.d.ts.map +1 -1
  158. package/dist/types/src/prop-controllers/introspection.d.ts.map +1 -1
  159. package/dist/types/src/runtimes/react/controls/control.d.ts +1 -1
  160. package/dist/types/src/runtimes/react/controls/control.d.ts.map +1 -1
  161. package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/EditableText/editable-text.d.ts +4 -3
  162. package/dist/types/src/runtimes/react/controls/rich-text/EditableText/editable-text.d.ts.map +1 -0
  163. package/dist/types/src/runtimes/react/controls/rich-text/EditableText/index.d.ts.map +1 -0
  164. package/dist/types/src/runtimes/react/controls/rich-text/EditableText/useSyncDOMSelection.d.ts.map +1 -0
  165. package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/EditableText/useSyncWithBuilder.d.ts +1 -1
  166. package/dist/types/src/runtimes/react/controls/rich-text/EditableText/useSyncWithBuilder.d.ts.map +1 -0
  167. package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/ReadOnlyText.d.ts +2 -2
  168. package/dist/types/src/runtimes/react/controls/rich-text/ReadOnlyText.d.ts.map +1 -0
  169. package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Element/block.d.ts +1 -1
  170. package/dist/types/src/runtimes/react/controls/rich-text/components/Element/block.d.ts.map +1 -0
  171. package/dist/types/src/runtimes/react/controls/rich-text/components/Element/element.d.ts.map +1 -0
  172. package/dist/types/src/runtimes/react/controls/rich-text/components/Element/index.d.ts.map +1 -0
  173. package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Element/inline.d.ts +1 -1
  174. package/dist/types/src/runtimes/react/controls/rich-text/components/Element/inline.d.ts.map +1 -0
  175. package/dist/types/src/runtimes/react/controls/rich-text/components/Leaf/index.d.ts.map +1 -0
  176. package/dist/types/src/runtimes/react/controls/rich-text/components/Leaf/leaf.d.ts.map +1 -0
  177. package/dist/types/src/runtimes/react/controls/rich-text/components/index.d.ts.map +1 -0
  178. package/dist/types/src/runtimes/react/controls/rich-text/index.d.ts +2 -0
  179. package/dist/types/src/runtimes/react/controls/rich-text/index.d.ts.map +1 -0
  180. package/dist/types/src/runtimes/react/controls/{rich-text.d.ts → rich-text/rich-text.d.ts} +1 -1
  181. package/dist/types/src/runtimes/react/controls/rich-text/rich-text.d.ts.map +1 -0
  182. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/editable-text-v2.d.ts.map +1 -1
  183. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-element.d.ts +2 -1
  184. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-element.d.ts.map +1 -1
  185. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-leaf.d.ts +2 -1
  186. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-leaf.d.ts.map +1 -1
  187. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/useRemoteChanges.d.ts.map +1 -1
  188. package/dist/types/src/runtimes/react/controls/rich-text-v2/ReadOnlyTextV2.d.ts +2 -1
  189. package/dist/types/src/runtimes/react/controls/rich-text-v2/ReadOnlyTextV2.d.ts.map +1 -1
  190. package/dist/types/src/slate/BlockPlugin/index.d.ts +3 -3
  191. package/dist/types/src/slate/BlockPlugin/index.d.ts.map +1 -1
  192. package/dist/types/src/slate/InlineModePlugin/index.d.ts +6 -4
  193. package/dist/types/src/slate/InlineModePlugin/index.d.ts.map +1 -1
  194. package/dist/types/src/slate/InlinePlugin/index.d.ts +3 -3
  195. package/dist/types/src/slate/InlinePlugin/index.d.ts.map +1 -1
  196. package/dist/types/src/slate/InlinePlugin/types.d.ts +1 -1
  197. package/dist/types/src/slate/InlinePlugin/types.d.ts.map +1 -1
  198. package/dist/types/src/slate/LinkPlugin/index.d.ts +3 -3
  199. package/dist/types/src/slate/LinkPlugin/index.d.ts.map +1 -1
  200. package/dist/types/src/slate/LinkPlugin/linkPluginWithoutRenderElement.d.ts +16 -0
  201. package/dist/types/src/slate/LinkPlugin/linkPluginWithoutRenderElement.d.ts.map +1 -0
  202. package/dist/types/src/slate/TextAlignPlugin/index.d.ts +3 -3
  203. package/dist/types/src/slate/TypographyPlugin/index.d.ts +3 -3
  204. package/dist/types/src/slate/TypographyPlugin/index.d.ts.map +1 -1
  205. package/dist/types/src/slate/types.d.ts +1 -10
  206. package/dist/types/src/slate/types.d.ts.map +1 -1
  207. package/dist/types/src/slate/utils/element.d.ts.map +1 -1
  208. package/dist/types/src/state/actions.d.ts +2 -1
  209. package/dist/types/src/state/actions.d.ts.map +1 -1
  210. package/dist/types/src/state/modules/locales.d.ts.map +1 -1
  211. package/dist/types/src/state/react-builder-preview.d.ts.map +1 -1
  212. package/package.json +1 -1
  213. package/dist/index.cjs10.js +0 -390
  214. package/dist/index.cjs10.js.map +0 -1
  215. package/dist/index.cjs9.js +0 -295
  216. package/dist/index.cjs9.js.map +0 -1
  217. package/dist/index.es10.js +0 -383
  218. package/dist/index.es10.js.map +0 -1
  219. package/dist/index.es9.js +0 -288
  220. package/dist/index.es9.js.map +0 -1
  221. package/dist/types/src/components/builtin/Text/EditableText/editable-text.d.ts.map +0 -1
  222. package/dist/types/src/components/builtin/Text/EditableText/index.d.ts.map +0 -1
  223. package/dist/types/src/components/builtin/Text/EditableText/useSyncDOMSelection.d.ts.map +0 -1
  224. package/dist/types/src/components/builtin/Text/EditableText/useSyncWithBuilder.d.ts.map +0 -1
  225. package/dist/types/src/components/builtin/Text/ReadOnlyText.d.ts.map +0 -1
  226. package/dist/types/src/components/builtin/Text/components/Element/block.d.ts.map +0 -1
  227. package/dist/types/src/components/builtin/Text/components/Element/element.d.ts.map +0 -1
  228. package/dist/types/src/components/builtin/Text/components/Element/index.d.ts.map +0 -1
  229. package/dist/types/src/components/builtin/Text/components/Element/inline.d.ts.map +0 -1
  230. package/dist/types/src/components/builtin/Text/components/Leaf/index.d.ts.map +0 -1
  231. package/dist/types/src/components/builtin/Text/components/Leaf/leaf.d.ts.map +0 -1
  232. package/dist/types/src/components/builtin/Text/components/index.d.ts.map +0 -1
  233. package/dist/types/src/runtimes/react/controls/rich-text.d.ts.map +0 -1
  234. package/dist/types.cjs2.js +0 -765
  235. package/dist/types.cjs2.js.map +0 -1
  236. package/dist/types.es2.js +0 -748
  237. package/dist/types.es2.js.map +0 -1
  238. /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/EditableText/index.d.ts +0 -0
  239. /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/EditableText/useSyncDOMSelection.d.ts +0 -0
  240. /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Element/element.d.ts +0 -0
  241. /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Element/index.d.ts +0 -0
  242. /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Leaf/index.d.ts +0 -0
  243. /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Leaf/leaf.d.ts +0 -0
  244. /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/index.d.ts +0 -0
package/dist/index.cjs.js CHANGED
@@ -67,6 +67,9 @@ var setCookieParser = require("set-cookie-parser");
67
67
  var constants = require("./constants.cjs.js");
68
68
  var uuid = require("uuid");
69
69
  var ipsum = require("corporate-ipsum");
70
+ require("is-hotkey");
71
+ require("slate-react");
72
+ var NextLink = require("next/link");
70
73
  function _interopDefaultLegacy(e) {
71
74
  return e && typeof e === "object" && "default" in e ? e : { "default": e };
72
75
  }
@@ -101,6 +104,7 @@ var createEmotionServer__default = /* @__PURE__ */ _interopDefaultLegacy(createE
101
104
  var NextDocument__default = /* @__PURE__ */ _interopDefaultLegacy(NextDocument);
102
105
  var Cors__default = /* @__PURE__ */ _interopDefaultLegacy(Cors);
103
106
  var ipsum__default = /* @__PURE__ */ _interopDefaultLegacy(ipsum);
107
+ var NextLink__default = /* @__PURE__ */ _interopDefaultLegacy(NextLink);
104
108
  const SCRIPT_TAG = "script";
105
109
  function BodySnippet({
106
110
  code,
@@ -145,43 +149,6 @@ function BodySnippet({
145
149
  }, [code, cleanup]);
146
150
  return null;
147
151
  }
148
- function is(x, y) {
149
- if (x === y)
150
- return x !== 0 || y !== 0 || 1 / x === 1 / y;
151
- return x !== x && y !== y;
152
- }
153
- const { hasOwnProperty: hasOwnProperty$1 } = Object.prototype;
154
- const shallowEqual = (a, b) => {
155
- if (is(a, b))
156
- return true;
157
- if (typeof a !== "object" || a === null || typeof b !== "object" || b === null)
158
- return false;
159
- const keysA = Object.keys(a);
160
- const keysB = Object.keys(b);
161
- if (keysA.length !== keysB.length)
162
- return false;
163
- for (let i = 0; i < keysA.length; i += 1) {
164
- if (!hasOwnProperty$1.call(b, keysA[i]) || !is(a[keysA[i]], b[keysA[i]]))
165
- return false;
166
- }
167
- return true;
168
- };
169
- const { hasOwnProperty } = Object.prototype;
170
- const deepEqual = (a, b) => {
171
- if (shallowEqual(a, b))
172
- return true;
173
- if (typeof a !== "object" || a === null || typeof b !== "object" || b === null)
174
- return false;
175
- const keysA = Object.keys(a);
176
- const keysB = Object.keys(b);
177
- if (keysA.length !== keysB.length)
178
- return false;
179
- for (let i = 0; i < keysA.length; i += 1) {
180
- if (!hasOwnProperty.call(b, keysA[i]) || !deepEqual(a[keysA[i]], b[keysA[i]]))
181
- return false;
182
- }
183
- return true;
184
- };
185
152
  function getInitialState(serializedState = {
186
153
  Swatch: [],
187
154
  File: [],
@@ -216,7 +183,7 @@ function reducer$1(state = getInitialState(), action) {
216
183
  }
217
184
  case actions.ActionTypes.CHANGE_API_RESOURCE: {
218
185
  const existingApiResource = getAPIResource$1(state, action.payload.resource.__typename, action.payload.resource.id);
219
- if (deepEqual(existingApiResource, action.payload.resource))
186
+ if (reactPage.deepEqual(existingApiResource, action.payload.resource))
220
187
  return state;
221
188
  return new Map(state).set(action.payload.resource.__typename, new Map(state.get(action.payload.resource.__typename)).set(action.payload.resource.id, action.payload.resource));
222
189
  }
@@ -657,7 +624,7 @@ function Page$1({
657
624
  return;
658
625
  const oldSnippets = snippets.map(filterUsedSnippetProperties);
659
626
  const newSnippets = cachedPage.snippets.map(filterUsedSnippetProperties);
660
- if (deepEqual(newSnippets, oldSnippets))
627
+ if (reactPage.deepEqual(newSnippets, oldSnippets))
661
628
  return;
662
629
  setSnippets(cachedPage.snippets);
663
630
  }, [cachedPage]);
@@ -1121,12 +1088,19 @@ Received "${apiKey}" instead.`);
1121
1088
  preview: previewOverride = false,
1122
1089
  unstable_locale
1123
1090
  } = {}) {
1124
- var _a;
1091
+ var _a, _b;
1125
1092
  const isUsingVersioning = this.siteVersion != null;
1126
1093
  const siteVersion = (_a = this.siteVersion) != null ? _a : previewOverride ? MakeswiftSiteVersion.Working : MakeswiftSiteVersion.Live;
1094
+ const defaultLocale = (_b = reactPage.getDefaultLocale(this.runtime.store.getState())) == null ? void 0 : _b.toString();
1095
+ const locale = unstable_locale === defaultLocale ? null : unstable_locale;
1127
1096
  const searchParams = new URLSearchParams();
1128
- if (unstable_locale)
1129
- searchParams.set("locale", unstable_locale);
1097
+ if (locale) {
1098
+ const locales = reactPage.getLocales(this.runtime.store.getState()).map((locale2) => locale2.toString());
1099
+ if (!locales.includes(locale)) {
1100
+ throw new Error(`Locale "${locale}" is not included in the locales: ${locales}. Please add the locale to the locales on the ReactRuntime.`);
1101
+ }
1102
+ searchParams.set("locale", locale);
1103
+ }
1130
1104
  const response = await this.fetch(`/${isUsingVersioning ? "v3" : "v2"}/pages/${encodeURIComponent(pathname)}/document?${searchParams.toString()}`, {
1131
1105
  headers: { "Makeswift-Site-Version": siteVersion }
1132
1106
  });
@@ -1137,7 +1111,7 @@ Received "${apiKey}" instead.`);
1137
1111
  throw new Error(`Failed to get page snapshot with error: "${response.statusText}"`);
1138
1112
  }
1139
1113
  const document2 = await response.json();
1140
- const { cacheData, localizedResourcesMap } = await this.introspect(document2.data, previewOverride, unstable_locale);
1114
+ const { cacheData, localizedResourcesMap } = await this.introspect(document2.data, previewOverride, locale != null ? locale : void 0);
1141
1115
  const apiOrigin = this.apiOrigin.href;
1142
1116
  const preview = siteVersion === MakeswiftSiteVersion.Working;
1143
1117
  return {
@@ -1146,7 +1120,7 @@ Received "${apiKey}" instead.`);
1146
1120
  apiOrigin,
1147
1121
  preview,
1148
1122
  localizedResourcesMap,
1149
- locale: unstable_locale != null ? unstable_locale : null
1123
+ locale: locale != null ? locale : null
1150
1124
  };
1151
1125
  }
1152
1126
  async getSwatch(swatchId) {
@@ -1240,7 +1214,7 @@ async function fonts(_req, res, { getFonts } = {}) {
1240
1214
  const fonts2 = (_a = await (getFonts == null ? void 0 : getFonts())) != null ? _a : [];
1241
1215
  return res.json(fonts2);
1242
1216
  }
1243
- const version = "0.9.12";
1217
+ const version = "0.10.1";
1244
1218
  async function handler(req, res, { apiKey, unstable_siteVersions }) {
1245
1219
  if (req.query.secret !== apiKey) {
1246
1220
  return res.status(401).json({ message: "Unauthorized" });
@@ -1380,7 +1354,7 @@ Read more about dynamic catch-all routes here: https://nextjs.org/docs/routing/d
1380
1354
  return client.getGlobalElement(m.params.id).then(handleResource);
1381
1355
  }
1382
1356
  if (m = matches("/localized-global-elements/:globalElementId/:locale")) {
1383
- return client.getLocalizedGlobalElement(m.params.globalElementId, m.params.locale).then(handleResource);
1357
+ return client.getLocalizedGlobalElement(m.params.globalElementId, m.params.locale).then((resource) => resource === null ? res.json({ message: "Not Found" }) : res.json(resource));
1384
1358
  }
1385
1359
  if (m = matches("/page-pathname-slices/:id")) {
1386
1360
  return client.getPagePathnameSlice(m.params.id).then(handleResource);
@@ -1513,7 +1487,8 @@ const Page = React.memo(({
1513
1487
  const client = React.useMemo(() => new MakeswiftClient({
1514
1488
  uri: new URL("graphql", snapshot.apiOrigin).href,
1515
1489
  cacheData: snapshot.cacheData,
1516
- localizedResourcesMap: snapshot.localizedResourcesMap
1490
+ localizedResourcesMap: snapshot.localizedResourcesMap,
1491
+ locale: snapshot.locale ? new Intl.Locale(snapshot.locale) : void 0
1517
1492
  }), [snapshot]);
1518
1493
  const rootElements = /* @__PURE__ */ new Map([[snapshot.document.id, snapshot.document.data]]);
1519
1494
  snapshot.document.localizedPages.forEach((localizedPage) => {
@@ -2416,6 +2391,211 @@ function registerComponent$2(runtime) {
2416
2391
  }
2417
2392
  });
2418
2393
  }
2394
+ function useSwatch(swatchId) {
2395
+ const client = useMakeswiftClient();
2396
+ const readSwatch = () => swatchId == null ? null : client.readSwatch(swatchId);
2397
+ const swatch = shim.useSyncExternalStore(client.subscribe, readSwatch, readSwatch);
2398
+ React.useEffect(() => {
2399
+ if (swatchId != null)
2400
+ client.fetchSwatch(swatchId).catch(console.error);
2401
+ }, [client, swatchId]);
2402
+ return swatch;
2403
+ }
2404
+ function useSwatches(swatchIds) {
2405
+ const client = useMakeswiftClient();
2406
+ const lastSnapshot = React.useRef();
2407
+ function getSnapshot() {
2408
+ const swatches2 = swatchIds.map((swatchId) => client.readSwatch(swatchId));
2409
+ if (lastSnapshot.current != null && lastSnapshot.current.length === swatches2.length && lastSnapshot.current.every((swatch, idx) => swatches2[idx] === swatch)) {
2410
+ return lastSnapshot.current;
2411
+ }
2412
+ return lastSnapshot.current = swatches2;
2413
+ }
2414
+ const swatches = shim.useSyncExternalStore(client.subscribe, getSnapshot, getSnapshot);
2415
+ React.useEffect(() => {
2416
+ Promise.all(swatchIds.map((swatchId) => client.fetchSwatch(swatchId))).catch(console.error);
2417
+ }, [client, swatchIds]);
2418
+ return swatches;
2419
+ }
2420
+ function useFile(fileId) {
2421
+ const client = useMakeswiftClient();
2422
+ const readFile = () => fileId == null ? null : client.readFile(fileId);
2423
+ const file = shim.useSyncExternalStore(client.subscribe, readFile, readFile);
2424
+ React.useEffect(() => {
2425
+ if (fileId != null)
2426
+ client.fetchFile(fileId);
2427
+ }, [client, fileId]);
2428
+ return file;
2429
+ }
2430
+ function useFiles(fileIds) {
2431
+ const client = useMakeswiftClient();
2432
+ const lastSnapshot = React.useRef();
2433
+ function getSnapshot() {
2434
+ const files2 = fileIds.map((fileId) => client.readFile(fileId));
2435
+ if (lastSnapshot.current != null && lastSnapshot.current.length === files2.length && lastSnapshot.current.every((file, idx) => files2[idx] === file)) {
2436
+ return lastSnapshot.current;
2437
+ }
2438
+ return lastSnapshot.current = files2;
2439
+ }
2440
+ const files = shim.useSyncExternalStore(client.subscribe, getSnapshot, getSnapshot);
2441
+ React.useEffect(() => {
2442
+ Promise.all(fileIds.map((fileId) => client.fetchFile(fileId))).catch(console.error);
2443
+ }, [client, fileIds]);
2444
+ return files;
2445
+ }
2446
+ function useTypography(typographyId) {
2447
+ const client = useMakeswiftClient();
2448
+ const readTypography = () => typographyId == null ? null : client.readTypography(typographyId);
2449
+ const typography = shim.useSyncExternalStore(client.subscribe, readTypography, readTypography);
2450
+ React.useEffect(() => {
2451
+ if (typographyId != null)
2452
+ client.fetchTypography(typographyId).catch(console.error);
2453
+ }, [client, typographyId]);
2454
+ return typography;
2455
+ }
2456
+ function useGlobalElement(globalElementId) {
2457
+ const client = useMakeswiftClient();
2458
+ const readGlobalElement = () => globalElementId == null ? null : client.readGlobalElement(globalElementId);
2459
+ const globalElement = shim.useSyncExternalStore(client.subscribe, readGlobalElement, readGlobalElement);
2460
+ React.useEffect(() => {
2461
+ if (globalElementId != null)
2462
+ client.fetchGlobalElement(globalElementId).catch(console.error);
2463
+ }, [client, globalElementId]);
2464
+ return globalElement;
2465
+ }
2466
+ function useLocalizedGlobalElement(globalElementId) {
2467
+ const client = useMakeswiftClient();
2468
+ const readLocalizedGlobalElement = () => globalElementId == null ? null : client.readLocalizedGlobalElement(globalElementId);
2469
+ const localizedGlobalElement = shim.useSyncExternalStore(client.subscribe, readLocalizedGlobalElement, readLocalizedGlobalElement);
2470
+ React.useEffect(() => {
2471
+ if (globalElementId != null) {
2472
+ client.fetchLocalizedGlobalElement(globalElementId).catch(console.error);
2473
+ }
2474
+ }, [client, globalElementId]);
2475
+ return localizedGlobalElement;
2476
+ }
2477
+ function usePagePathnameSlice(pageId) {
2478
+ const client = useMakeswiftClient();
2479
+ const readPagePathnameSlice = () => pageId == null ? null : client.readPagePathnameSlice(pageId);
2480
+ const pagePathnameSlice = shim.useSyncExternalStore(client.subscribe, readPagePathnameSlice, readPagePathnameSlice);
2481
+ React.useEffect(() => {
2482
+ if (pageId != null)
2483
+ client.fetchPagePathnameSlice(pageId).catch(console.error);
2484
+ }, [client, pageId]);
2485
+ return pagePathnameSlice;
2486
+ }
2487
+ function useTable(tableId) {
2488
+ const client = useMakeswiftClient();
2489
+ const readTable = () => tableId == null ? null : client.readTable(tableId);
2490
+ const table = shim.useSyncExternalStore(client.subscribe, readTable, readTable);
2491
+ React.useEffect(() => {
2492
+ if (tableId != null)
2493
+ client.fetchTable(tableId).catch(console.error);
2494
+ }, [client, tableId]);
2495
+ return table;
2496
+ }
2497
+ const Link = React.forwardRef(function Link2(_e, ref) {
2498
+ var _f = _e, {
2499
+ link,
2500
+ onClick = () => {
2501
+ }
2502
+ } = _f, restOfProps = __objRest(_f, [
2503
+ "link",
2504
+ "onClick"
2505
+ ]);
2506
+ var _a;
2507
+ const pageId = link && link.type === "OPEN_PAGE" ? link.payload.pageId : null;
2508
+ const page = usePagePathnameSlice(pageId != null ? pageId : null);
2509
+ const elementKey = (link == null ? void 0 : link.type) === "SCROLL_TO_ELEMENT" ? (_a = link.payload.elementIdConfig) == null ? void 0 : _a.elementKey : null;
2510
+ const elementId = useElementId(elementKey);
2511
+ let useNextLink;
2512
+ let href;
2513
+ let target;
2514
+ let block;
2515
+ if (link) {
2516
+ switch (link.type) {
2517
+ case "OPEN_PAGE": {
2518
+ if (page) {
2519
+ useNextLink = true;
2520
+ href = `/${page.pathname}`;
2521
+ }
2522
+ target = link.payload.openInNewTab ? "_blank" : "_self";
2523
+ break;
2524
+ }
2525
+ case "OPEN_URL": {
2526
+ useNextLink = true;
2527
+ href = link.payload.url;
2528
+ target = link.payload.openInNewTab ? "_blank" : "_self";
2529
+ break;
2530
+ }
2531
+ case "SEND_EMAIL": {
2532
+ useNextLink = false;
2533
+ const {
2534
+ to,
2535
+ subject = "",
2536
+ body = ""
2537
+ } = link.payload;
2538
+ if (to != null)
2539
+ href = `mailto:${to}?subject=${subject}&body=${body}`;
2540
+ break;
2541
+ }
2542
+ case "CALL_PHONE": {
2543
+ useNextLink = false;
2544
+ href = `tel:${link.payload.phoneNumber}`;
2545
+ break;
2546
+ }
2547
+ case "SCROLL_TO_ELEMENT": {
2548
+ useNextLink = false;
2549
+ href = `#${elementId != null ? elementId : ""}`;
2550
+ block = link.payload.block;
2551
+ break;
2552
+ }
2553
+ default:
2554
+ throw new RangeError(`Invalid link type "${link.type}."`);
2555
+ }
2556
+ }
2557
+ function handleClick(event) {
2558
+ onClick(event);
2559
+ if (event.defaultPrevented)
2560
+ return;
2561
+ if (event.currentTarget.isContentEditable)
2562
+ return event.preventDefault();
2563
+ if (link && link.type === "SCROLL_TO_ELEMENT") {
2564
+ let hash;
2565
+ try {
2566
+ if (href != null)
2567
+ hash = new URL(`http://www.example.com/${href}`).hash;
2568
+ } catch (error) {
2569
+ console.error(`Link received invalid href: ${href}`, error);
2570
+ }
2571
+ if (href != null && hash != null && href === hash) {
2572
+ event.preventDefault();
2573
+ const view = event.view;
2574
+ scrollIntoView__default["default"](view.document.querySelector(hash), {
2575
+ behavior: "smooth",
2576
+ block
2577
+ });
2578
+ if (view.location.hash !== hash)
2579
+ view.history.pushState({}, "", hash);
2580
+ }
2581
+ }
2582
+ }
2583
+ if (useNextLink && href != null) {
2584
+ return /* @__PURE__ */ jsxRuntime.jsx(NextLink__default["default"], __spreadProps(__spreadValues({}, restOfProps), {
2585
+ ref,
2586
+ target,
2587
+ onClick: handleClick,
2588
+ href,
2589
+ legacyBehavior: false
2590
+ }));
2591
+ }
2592
+ return /* @__PURE__ */ jsxRuntime.jsx("a", __spreadProps(__spreadValues({}, restOfProps), {
2593
+ ref,
2594
+ href,
2595
+ target,
2596
+ onClick: handleClick
2597
+ }));
2598
+ });
2419
2599
  function registerComponent$1(runtime) {
2420
2600
  return runtime.registerComponent(forwardNextDynamicRef((patch) => dynamic__default["default"](() => patch(Promise.resolve().then(function() {
2421
2601
  return require("./Text.cjs.js");
@@ -2424,52 +2604,36 @@ function registerComponent$1(runtime) {
2424
2604
  label: "Text",
2425
2605
  props: {
2426
2606
  id: reactPage.ElementID(),
2427
- text: reactPage.RichText(() => ({
2428
- preset: {
2429
- document: {
2430
- object: "document",
2431
- nodes: [
2607
+ text: reactPage.RichText({
2608
+ unstable_defaultValue: [
2609
+ {
2610
+ type: reactPage.BlockType.Default,
2611
+ children: [
2432
2612
  {
2433
- object: "block",
2434
- type: "paragraph",
2435
- nodes: [
2436
- {
2437
- object: "text",
2438
- text: ipsum__default["default"](3),
2439
- marks: [
2613
+ text: ipsum__default["default"](3),
2614
+ typography: {
2615
+ style: [
2616
+ {
2617
+ deviceId: state_breakpoints.getBaseBreakpoint(runtime.getBreakpoints()).id,
2618
+ value: {
2619
+ fontWeight: 400,
2620
+ fontSize: { value: 18, unit: "px" },
2621
+ lineHeight: 1.5
2622
+ }
2623
+ },
2624
+ ...runtime.getBreakpoints().some(({ id }) => id === state_breakpoints.DefaultBreakpointID.Mobile) ? [
2440
2625
  {
2441
- object: "mark",
2442
- type: "typography",
2443
- data: {
2444
- value: {
2445
- id: null,
2446
- style: [
2447
- {
2448
- deviceId: state_breakpoints.getBaseBreakpoint(runtime.getBreakpoints()).id,
2449
- value: {
2450
- fontWeight: 400,
2451
- fontSize: { value: 18, unit: "px" },
2452
- lineHeight: 1.5
2453
- }
2454
- },
2455
- ...runtime.getBreakpoints().some(({ id }) => id === state_breakpoints.DefaultBreakpointID.Mobile) ? [
2456
- {
2457
- deviceId: state_breakpoints.DefaultBreakpointID.Mobile,
2458
- value: { fontSize: { value: 16, unit: "px" } }
2459
- }
2460
- ] : []
2461
- ]
2462
- }
2463
- }
2626
+ deviceId: state_breakpoints.DefaultBreakpointID.Mobile,
2627
+ value: { fontSize: { value: 16, unit: "px" } }
2464
2628
  }
2465
- ]
2466
- }
2467
- ]
2629
+ ] : []
2630
+ ]
2631
+ }
2468
2632
  }
2469
2633
  ]
2470
2634
  }
2471
- }
2472
- })),
2635
+ ]
2636
+ }),
2473
2637
  width: reactPage.Width({
2474
2638
  format: reactPage.Width.Format.ClassName,
2475
2639
  preset: [
@@ -2600,111 +2764,8 @@ const FallbackComponent = React.forwardRef(function FallbackComponent2({
2600
2764
  function isNonNullable(value) {
2601
2765
  return value != null;
2602
2766
  }
2603
- function useSwatch(swatchId) {
2604
- const client = useMakeswiftClient();
2605
- const readSwatch = () => swatchId == null ? null : client.readSwatch(swatchId);
2606
- const swatch = shim.useSyncExternalStore(client.subscribe, readSwatch, readSwatch);
2607
- React.useEffect(() => {
2608
- if (swatchId != null)
2609
- client.fetchSwatch(swatchId).catch(console.error);
2610
- }, [client, swatchId]);
2611
- return swatch;
2612
- }
2613
- function useSwatches(swatchIds) {
2614
- const client = useMakeswiftClient();
2615
- const lastSnapshot = React.useRef();
2616
- function getSnapshot() {
2617
- const swatches2 = swatchIds.map((swatchId) => client.readSwatch(swatchId));
2618
- if (lastSnapshot.current != null && lastSnapshot.current.length === swatches2.length && lastSnapshot.current.every((swatch, idx) => swatches2[idx] === swatch)) {
2619
- return lastSnapshot.current;
2620
- }
2621
- return lastSnapshot.current = swatches2;
2622
- }
2623
- const swatches = shim.useSyncExternalStore(client.subscribe, getSnapshot, getSnapshot);
2624
- React.useEffect(() => {
2625
- Promise.all(swatchIds.map((swatchId) => client.fetchSwatch(swatchId))).catch(console.error);
2626
- }, [client, swatchIds]);
2627
- return swatches;
2628
- }
2629
- function useFile(fileId) {
2630
- const client = useMakeswiftClient();
2631
- const readFile = () => fileId == null ? null : client.readFile(fileId);
2632
- const file = shim.useSyncExternalStore(client.subscribe, readFile, readFile);
2633
- React.useEffect(() => {
2634
- if (fileId != null)
2635
- client.fetchFile(fileId);
2636
- }, [client, fileId]);
2637
- return file;
2638
- }
2639
- function useFiles(fileIds) {
2640
- const client = useMakeswiftClient();
2641
- const lastSnapshot = React.useRef();
2642
- function getSnapshot() {
2643
- const files2 = fileIds.map((fileId) => client.readFile(fileId));
2644
- if (lastSnapshot.current != null && lastSnapshot.current.length === files2.length && lastSnapshot.current.every((file, idx) => files2[idx] === file)) {
2645
- return lastSnapshot.current;
2646
- }
2647
- return lastSnapshot.current = files2;
2648
- }
2649
- const files = shim.useSyncExternalStore(client.subscribe, getSnapshot, getSnapshot);
2650
- React.useEffect(() => {
2651
- Promise.all(fileIds.map((fileId) => client.fetchFile(fileId))).catch(console.error);
2652
- }, [client, fileIds]);
2653
- return files;
2654
- }
2655
- function useTypography(typographyId) {
2656
- const client = useMakeswiftClient();
2657
- const readTypography = () => typographyId == null ? null : client.readTypography(typographyId);
2658
- const typography = shim.useSyncExternalStore(client.subscribe, readTypography, readTypography);
2659
- React.useEffect(() => {
2660
- if (typographyId != null)
2661
- client.fetchTypography(typographyId).catch(console.error);
2662
- }, [client, typographyId]);
2663
- return typography;
2664
- }
2665
- function useGlobalElement(globalElementId) {
2666
- const client = useMakeswiftClient();
2667
- const readGlobalElement = () => globalElementId == null ? null : client.readGlobalElement(globalElementId);
2668
- const globalElement = shim.useSyncExternalStore(client.subscribe, readGlobalElement, readGlobalElement);
2669
- React.useEffect(() => {
2670
- if (globalElementId != null)
2671
- client.fetchGlobalElement(globalElementId).catch(console.error);
2672
- }, [client, globalElementId]);
2673
- return globalElement;
2674
- }
2675
- function useLocalizedGlobalElement(globalElementId) {
2676
- const client = useMakeswiftClient();
2677
- const readLocalizedGlobalElement = () => globalElementId == null ? null : client.readLocalizedGlobalElement(globalElementId);
2678
- const localizedGlobalElement = shim.useSyncExternalStore(client.subscribe, readLocalizedGlobalElement, readLocalizedGlobalElement);
2679
- React.useEffect(() => {
2680
- if (globalElementId != null) {
2681
- client.fetchLocalizedGlobalElement(globalElementId).catch(console.error);
2682
- }
2683
- }, [client, globalElementId]);
2684
- return localizedGlobalElement;
2685
- }
2686
- function usePagePathnameSlice(pageId) {
2687
- const client = useMakeswiftClient();
2688
- const readPagePathnameSlice = () => pageId == null ? null : client.readPagePathnameSlice(pageId);
2689
- const pagePathnameSlice = shim.useSyncExternalStore(client.subscribe, readPagePathnameSlice, readPagePathnameSlice);
2690
- React.useEffect(() => {
2691
- if (pageId != null)
2692
- client.fetchPagePathnameSlice(pageId).catch(console.error);
2693
- }, [client, pageId]);
2694
- return pagePathnameSlice;
2695
- }
2696
- function useTable(tableId) {
2697
- const client = useMakeswiftClient();
2698
- const readTable = () => tableId == null ? null : client.readTable(tableId);
2699
- const table = shim.useSyncExternalStore(client.subscribe, readTable, readTable);
2700
- React.useEffect(() => {
2701
- if (tableId != null)
2702
- client.fetchTable(tableId).catch(console.error);
2703
- }, [client, tableId]);
2704
- return table;
2705
- }
2706
- function mapSideColor(swatches, _e) {
2707
- var _f = _e, { color } = _f, restOfSide = __objRest(_f, ["color"]);
2767
+ function mapSideColor(swatches, _g) {
2768
+ var _h = _g, { color } = _h, restOfSide = __objRest(_h, ["color"]);
2708
2769
  return __spreadProps(__spreadValues({}, restOfSide), {
2709
2770
  color: color && {
2710
2771
  alpha: color.alpha,
@@ -3084,7 +3145,7 @@ function useFormattedStyle(styleControlData, controlDefinition, control) {
3084
3145
  return;
3085
3146
  const element = document.querySelector(`.${guid}`);
3086
3147
  const measuredBoxModel = element == null ? null : boxModels.getBox(element);
3087
- if (!deepEqual(currentBoxModel, measuredBoxModel)) {
3148
+ if (!reactPage.deepEqual(currentBoxModel, measuredBoxModel)) {
3088
3149
  currentBoxModel = measuredBoxModel;
3089
3150
  control.changeBoxModel(currentBoxModel);
3090
3151
  }
@@ -3236,8 +3297,11 @@ function ListControlValue({
3236
3297
  function useNumber(numberControlData, controlDefinition) {
3237
3298
  return numberControlData != null ? numberControlData : controlDefinition.config.defaultValue;
3238
3299
  }
3239
- const Text = forwardNextDynamicRef((patch) => dynamic__default["default"](() => patch(Promise.resolve().then(function() {
3240
- return require("./index.cjs8.js");
3300
+ const EditableText$1 = forwardNextDynamicRef((patch) => dynamic__default["default"](() => patch(Promise.resolve().then(function() {
3301
+ return require("./index.cjs7.js");
3302
+ }))));
3303
+ const ReadOnlyText$1 = forwardNextDynamicRef((patch) => dynamic__default["default"](() => patch(Promise.resolve().then(function() {
3304
+ return require("./ReadOnlyText.cjs.js");
3241
3305
  }))));
3242
3306
  function useRichText(data, control) {
3243
3307
  const textCallbackRef = React.useCallback((handle) => {
@@ -3247,13 +3311,17 @@ function useRichText(data, control) {
3247
3311
  text: control
3248
3312
  });
3249
3313
  }, [control]);
3250
- return /* @__PURE__ */ jsxRuntime.jsx(Text, {
3314
+ const isPreview = useIsPreview();
3315
+ return isPreview ? /* @__PURE__ */ jsxRuntime.jsx(EditableText$1, {
3316
+ text: data,
3317
+ ref: textCallbackRef
3318
+ }) : /* @__PURE__ */ jsxRuntime.jsx(ReadOnlyText$1, {
3251
3319
  text: data,
3252
3320
  ref: textCallbackRef
3253
3321
  });
3254
3322
  }
3255
3323
  const EditableText = forwardNextDynamicRef((patch) => dynamic__default["default"](() => patch(Promise.resolve().then(function() {
3256
- return require("./index.cjs9.js");
3324
+ return require("./index.cjs8.js");
3257
3325
  }))));
3258
3326
  const ReadOnlyText = forwardNextDynamicRef((patch) => dynamic__default["default"](() => patch(Promise.resolve().then(function() {
3259
3327
  return require("./ReadOnlyTextV2.cjs.js");
@@ -3302,7 +3370,7 @@ function pollBoxModel({
3302
3370
  let currentBoxModel = null;
3303
3371
  const handleAnimationFrameRequest = () => {
3304
3372
  const measuredBoxModel = boxModels.getBox(element);
3305
- if (!deepEqual(currentBoxModel, measuredBoxModel)) {
3373
+ if (!reactPage.deepEqual(currentBoxModel, measuredBoxModel)) {
3306
3374
  currentBoxModel = measuredBoxModel;
3307
3375
  onBoxModelChange(currentBoxModel);
3308
3376
  }
@@ -3332,13 +3400,13 @@ function useSlot(data, control) {
3332
3400
  }, element.key))
3333
3401
  });
3334
3402
  }
3335
- function Slot(_g) {
3336
- var _h = _g, {
3403
+ function Slot(_i) {
3404
+ var _j = _i, {
3337
3405
  as,
3338
3406
  control,
3339
3407
  children,
3340
3408
  className
3341
- } = _h, restOfProps = __objRest(_h, [
3409
+ } = _j, restOfProps = __objRest(_j, [
3342
3410
  "as",
3343
3411
  "control",
3344
3412
  "children",
@@ -3367,15 +3435,15 @@ function Slot(_g) {
3367
3435
  }
3368
3436
  Slot.Placeholder = SlotPlaceholder;
3369
3437
  Slot.Item = SlotItem;
3370
- function SlotItem(_i) {
3371
- var _j = _i, {
3438
+ function SlotItem(_k) {
3439
+ var _l = _k, {
3372
3440
  as,
3373
3441
  control,
3374
3442
  grid,
3375
3443
  index,
3376
3444
  children,
3377
3445
  className
3378
- } = _j, restOfProps = __objRest(_j, [
3446
+ } = _l, restOfProps = __objRest(_l, [
3379
3447
  "as",
3380
3448
  "control",
3381
3449
  "grid",
@@ -3660,7 +3728,7 @@ function ControlValue({
3660
3728
  parameters: [data, definition],
3661
3729
  children: (value) => children(value)
3662
3730
  }, definition.type);
3663
- case textInput.SelectControlType:
3731
+ case reactPage.SelectControlType:
3664
3732
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3665
3733
  hook: useSelectControlValue,
3666
3734
  parameters: [data, definition],
@@ -3672,7 +3740,7 @@ function ControlValue({
3672
3740
  parameters: [data, definition],
3673
3741
  children: (value) => children(value)
3674
3742
  }, definition.type);
3675
- case textInput.IconRadioGroupControlType:
3743
+ case reactPage.IconRadioGroupControlType:
3676
3744
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3677
3745
  hook: useIconRadioGroupValue,
3678
3746
  parameters: [data, definition],
@@ -3792,9 +3860,9 @@ function PropsValue({
3792
3860
  case textInput.NumberControlType:
3793
3861
  case textInput.TextInputControlType:
3794
3862
  case textInput.TextAreaControlType:
3795
- case textInput.SelectControlType:
3863
+ case reactPage.SelectControlType:
3796
3864
  case reactPage.ColorControlType:
3797
- case textInput.IconRadioGroupControlType:
3865
+ case reactPage.IconRadioGroupControlType:
3798
3866
  case reactPage.ImageControlType:
3799
3867
  case combobox.ComboboxControlType:
3800
3868
  case reactPage.ShapeControlType:
@@ -4093,10 +4161,10 @@ const PreviewProvider = dynamic__default["default"](() => Promise.resolve().then
4093
4161
  const LiveProvider = dynamic__default["default"](() => Promise.resolve().then(function() {
4094
4162
  return require("./LiveProvider.cjs.js");
4095
4163
  }));
4096
- function RuntimeProvider(_k) {
4097
- var _l = _k, {
4164
+ function RuntimeProvider(_m) {
4165
+ var _n = _m, {
4098
4166
  preview
4099
- } = _l, props = __objRest(_l, [
4167
+ } = _n, props = __objRest(_n, [
4100
4168
  "preview"
4101
4169
  ]);
4102
4170
  return preview ? /* @__PURE__ */ jsxRuntime.jsx(PreviewProvider, __spreadValues({}, props)) : /* @__PURE__ */ jsxRuntime.jsx(LiveProvider, __spreadValues({}, props));
@@ -4313,6 +4381,7 @@ exports.Document = Document$1;
4313
4381
  exports.DocumentReference = DocumentReference;
4314
4382
  exports.Element = Element$1;
4315
4383
  exports.ElementImperativeHandle = ElementImperativeHandle;
4384
+ exports.Link = Link;
4316
4385
  exports.Makeswift = Makeswift;
4317
4386
  exports.MakeswiftApiHandler = MakeswiftApiHandler;
4318
4387
  exports.MakeswiftProvider = MakeswiftProvider;
@@ -4327,28 +4396,23 @@ exports.Shapes = Shapes;
4327
4396
  exports.Sizes = Sizes;
4328
4397
  exports.StoreContext = StoreContext;
4329
4398
  exports.colorToString = colorToString;
4330
- exports.deepEqual = deepEqual;
4331
4399
  exports.forwardNextDynamicRef = forwardNextDynamicRef;
4332
4400
  exports.getServerSideProps = getServerSideProps;
4333
4401
  exports.getStaticPaths = getStaticPaths;
4334
4402
  exports.getStaticProps = getStaticProps;
4335
4403
  exports.isNonNullable = isNonNullable;
4336
4404
  exports.pollBoxModel = pollBoxModel;
4337
- exports.shallowEqual = shallowEqual;
4338
4405
  exports.useBorder = useBorder;
4339
4406
  exports.useBoxShadow = useBoxShadow;
4340
4407
  exports.useBreakpoints = useBreakpoints;
4341
4408
  exports.useBuilderEditMode = useBuilderEditMode;
4342
- exports.useElementId = useElementId;
4343
4409
  exports.useEnhancedTypography = useEnhancedTypography;
4344
4410
  exports.useFile = useFile;
4345
4411
  exports.useFiles = useFiles;
4346
4412
  exports.useFormContext = useFormContext;
4347
4413
  exports.useIsInBuilder = useIsInBuilder;
4348
- exports.useIsPreview = useIsPreview;
4349
4414
  exports.useMakeswiftClient = useMakeswiftClient;
4350
4415
  exports.usePageId = usePageId;
4351
- exports.usePagePathnameSlice = usePagePathnameSlice;
4352
4416
  exports.useResponsiveColor = useResponsiveColor;
4353
4417
  exports.useResponsiveGridItem = useResponsiveGridItem;
4354
4418
  exports.useResponsiveStyle = useResponsiveStyle;