@makeswift/runtime 0.9.12 → 0.10.0

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 (235) 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 +6 -3
  42. package/dist/PreviewProvider.cjs.js.map +1 -1
  43. package/dist/PreviewProvider.es.js +5 -2
  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/builder.cjs.js +2 -0
  70. package/dist/builder.cjs.js.map +1 -1
  71. package/dist/builder.es.js +2 -0
  72. package/dist/builder.es.js.map +1 -1
  73. package/dist/components.cjs.js +3 -2
  74. package/dist/components.cjs.js.map +1 -1
  75. package/dist/components.es.js +3 -2
  76. package/dist/components.es.js.map +1 -1
  77. package/dist/control-serialization.es.js +1 -1
  78. package/dist/controls.cjs.js +8 -8
  79. package/dist/controls.es.js +4 -2
  80. package/dist/controls.es.js.map +1 -1
  81. package/dist/index.cjs.js +276 -213
  82. package/dist/index.cjs.js.map +1 -1
  83. package/dist/index.cjs3.js +21 -107
  84. package/dist/index.cjs3.js.map +1 -1
  85. package/dist/index.cjs4.js +16 -57
  86. package/dist/index.cjs4.js.map +1 -1
  87. package/dist/index.cjs5.js +53 -242
  88. package/dist/index.cjs5.js.map +1 -1
  89. package/dist/index.cjs6.js +0 -41
  90. package/dist/index.cjs6.js.map +1 -1
  91. package/dist/index.cjs7.js +376 -14
  92. package/dist/index.cjs7.js.map +1 -1
  93. package/dist/index.cjs8.js +275 -11
  94. package/dist/index.cjs8.js.map +1 -1
  95. package/dist/index.es.js +270 -206
  96. package/dist/index.es.js.map +1 -1
  97. package/dist/index.es2.js +2 -2
  98. package/dist/index.es3.js +22 -103
  99. package/dist/index.es3.js.map +1 -1
  100. package/dist/index.es4.js +16 -57
  101. package/dist/index.es4.js.map +1 -1
  102. package/dist/index.es5.js +53 -240
  103. package/dist/index.es5.js.map +1 -1
  104. package/dist/index.es6.js +1 -36
  105. package/dist/index.es6.js.map +1 -1
  106. package/dist/index.es7.js +372 -16
  107. package/dist/index.es7.js.map +1 -1
  108. package/dist/index.es8.js +270 -10
  109. package/dist/index.es8.js.map +1 -1
  110. package/dist/main.cjs.js +2 -0
  111. package/dist/main.cjs.js.map +1 -1
  112. package/dist/main.es.js +2 -0
  113. package/dist/main.es.js.map +1 -1
  114. package/dist/next.cjs.js +3 -0
  115. package/dist/next.cjs.js.map +1 -1
  116. package/dist/next.es.js +4 -1
  117. package/dist/next.es.js.map +1 -1
  118. package/dist/prop-controllers.cjs.js +2 -0
  119. package/dist/prop-controllers.cjs.js.map +1 -1
  120. package/dist/prop-controllers.es.js +2 -0
  121. package/dist/prop-controllers.es.js.map +1 -1
  122. package/dist/react-page.cjs.js +1450 -65
  123. package/dist/react-page.cjs.js.map +1 -1
  124. package/dist/react-page.es.js +1427 -66
  125. package/dist/react-page.es.js.map +1 -1
  126. package/dist/react.cjs.js +3 -0
  127. package/dist/react.cjs.js.map +1 -1
  128. package/dist/react.es.js +3 -0
  129. package/dist/react.es.js.map +1 -1
  130. package/dist/slate.cjs.js +33 -391
  131. package/dist/slate.cjs.js.map +1 -1
  132. package/dist/slate.es.js +15 -376
  133. package/dist/slate.es.js.map +1 -1
  134. package/dist/text-input.cjs.js +0 -22
  135. package/dist/text-input.cjs.js.map +1 -1
  136. package/dist/text-input.es.js +1 -18
  137. package/dist/text-input.es.js.map +1 -1
  138. package/dist/types/src/components/builtin/Text/Text.d.ts +3 -4
  139. package/dist/types/src/components/builtin/Text/Text.d.ts.map +1 -1
  140. package/dist/types/src/components/builtin/Text/register.d.ts.map +1 -1
  141. package/dist/types/src/controls/rich-text/fixtures/v2-data-types.d.ts.map +1 -1
  142. package/dist/types/src/controls/rich-text/rich-text.d.ts +0 -1
  143. package/dist/types/src/controls/rich-text/rich-text.d.ts.map +1 -1
  144. package/dist/types/src/controls/rich-text/translation.d.ts.map +1 -1
  145. package/dist/types/src/controls/rich-text-v2/plugin.d.ts +29 -0
  146. package/dist/types/src/controls/rich-text-v2/plugin.d.ts.map +1 -0
  147. package/dist/types/src/controls/rich-text-v2/rich-text-v2.d.ts +17 -31
  148. package/dist/types/src/controls/rich-text-v2/rich-text-v2.d.ts.map +1 -1
  149. package/dist/types/src/next/client.d.ts.map +1 -1
  150. package/dist/types/src/prop-controllers/descriptors.d.ts +1 -1
  151. package/dist/types/src/prop-controllers/descriptors.d.ts.map +1 -1
  152. package/dist/types/src/prop-controllers/introspection.d.ts.map +1 -1
  153. package/dist/types/src/runtimes/react/controls/control.d.ts +1 -1
  154. package/dist/types/src/runtimes/react/controls/control.d.ts.map +1 -1
  155. package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/EditableText/editable-text.d.ts +4 -3
  156. package/dist/types/src/runtimes/react/controls/rich-text/EditableText/editable-text.d.ts.map +1 -0
  157. package/dist/types/src/runtimes/react/controls/rich-text/EditableText/index.d.ts.map +1 -0
  158. package/dist/types/src/runtimes/react/controls/rich-text/EditableText/useSyncDOMSelection.d.ts.map +1 -0
  159. package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/EditableText/useSyncWithBuilder.d.ts +1 -1
  160. package/dist/types/src/runtimes/react/controls/rich-text/EditableText/useSyncWithBuilder.d.ts.map +1 -0
  161. package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/ReadOnlyText.d.ts +2 -2
  162. package/dist/types/src/runtimes/react/controls/rich-text/ReadOnlyText.d.ts.map +1 -0
  163. package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Element/block.d.ts +1 -1
  164. package/dist/types/src/runtimes/react/controls/rich-text/components/Element/block.d.ts.map +1 -0
  165. package/dist/types/src/runtimes/react/controls/rich-text/components/Element/element.d.ts.map +1 -0
  166. package/dist/types/src/runtimes/react/controls/rich-text/components/Element/index.d.ts.map +1 -0
  167. package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Element/inline.d.ts +1 -1
  168. package/dist/types/src/runtimes/react/controls/rich-text/components/Element/inline.d.ts.map +1 -0
  169. package/dist/types/src/runtimes/react/controls/rich-text/components/Leaf/index.d.ts.map +1 -0
  170. package/dist/types/src/runtimes/react/controls/rich-text/components/Leaf/leaf.d.ts.map +1 -0
  171. package/dist/types/src/runtimes/react/controls/rich-text/components/index.d.ts.map +1 -0
  172. package/dist/types/src/runtimes/react/controls/rich-text/index.d.ts +2 -0
  173. package/dist/types/src/runtimes/react/controls/rich-text/index.d.ts.map +1 -0
  174. package/dist/types/src/runtimes/react/controls/{rich-text.d.ts → rich-text/rich-text.d.ts} +1 -1
  175. package/dist/types/src/runtimes/react/controls/rich-text/rich-text.d.ts.map +1 -0
  176. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/editable-text-v2.d.ts.map +1 -1
  177. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-element.d.ts +2 -1
  178. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-element.d.ts.map +1 -1
  179. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-leaf.d.ts +2 -1
  180. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-leaf.d.ts.map +1 -1
  181. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/useRemoteChanges.d.ts.map +1 -1
  182. package/dist/types/src/runtimes/react/controls/rich-text-v2/ReadOnlyTextV2.d.ts +2 -1
  183. package/dist/types/src/runtimes/react/controls/rich-text-v2/ReadOnlyTextV2.d.ts.map +1 -1
  184. package/dist/types/src/slate/BlockPlugin/index.d.ts +3 -3
  185. package/dist/types/src/slate/BlockPlugin/index.d.ts.map +1 -1
  186. package/dist/types/src/slate/InlineModePlugin/index.d.ts +6 -4
  187. package/dist/types/src/slate/InlineModePlugin/index.d.ts.map +1 -1
  188. package/dist/types/src/slate/InlinePlugin/index.d.ts +3 -3
  189. package/dist/types/src/slate/InlinePlugin/index.d.ts.map +1 -1
  190. package/dist/types/src/slate/InlinePlugin/types.d.ts +1 -1
  191. package/dist/types/src/slate/InlinePlugin/types.d.ts.map +1 -1
  192. package/dist/types/src/slate/LinkPlugin/index.d.ts +3 -3
  193. package/dist/types/src/slate/LinkPlugin/index.d.ts.map +1 -1
  194. package/dist/types/src/slate/LinkPlugin/linkPluginWithoutRenderElement.d.ts +16 -0
  195. package/dist/types/src/slate/LinkPlugin/linkPluginWithoutRenderElement.d.ts.map +1 -0
  196. package/dist/types/src/slate/TextAlignPlugin/index.d.ts +3 -3
  197. package/dist/types/src/slate/TypographyPlugin/index.d.ts +3 -3
  198. package/dist/types/src/slate/TypographyPlugin/index.d.ts.map +1 -1
  199. package/dist/types/src/slate/types.d.ts +1 -10
  200. package/dist/types/src/slate/types.d.ts.map +1 -1
  201. package/dist/types/src/slate/utils/element.d.ts.map +1 -1
  202. package/dist/types/src/state/modules/locales.d.ts.map +1 -1
  203. package/package.json +1 -1
  204. package/dist/index.cjs10.js +0 -390
  205. package/dist/index.cjs10.js.map +0 -1
  206. package/dist/index.cjs9.js +0 -295
  207. package/dist/index.cjs9.js.map +0 -1
  208. package/dist/index.es10.js +0 -383
  209. package/dist/index.es10.js.map +0 -1
  210. package/dist/index.es9.js +0 -288
  211. package/dist/index.es9.js.map +0 -1
  212. package/dist/types/src/components/builtin/Text/EditableText/editable-text.d.ts.map +0 -1
  213. package/dist/types/src/components/builtin/Text/EditableText/index.d.ts.map +0 -1
  214. package/dist/types/src/components/builtin/Text/EditableText/useSyncDOMSelection.d.ts.map +0 -1
  215. package/dist/types/src/components/builtin/Text/EditableText/useSyncWithBuilder.d.ts.map +0 -1
  216. package/dist/types/src/components/builtin/Text/ReadOnlyText.d.ts.map +0 -1
  217. package/dist/types/src/components/builtin/Text/components/Element/block.d.ts.map +0 -1
  218. package/dist/types/src/components/builtin/Text/components/Element/element.d.ts.map +0 -1
  219. package/dist/types/src/components/builtin/Text/components/Element/index.d.ts.map +0 -1
  220. package/dist/types/src/components/builtin/Text/components/Element/inline.d.ts.map +0 -1
  221. package/dist/types/src/components/builtin/Text/components/Leaf/index.d.ts.map +0 -1
  222. package/dist/types/src/components/builtin/Text/components/Leaf/leaf.d.ts.map +0 -1
  223. package/dist/types/src/components/builtin/Text/components/index.d.ts.map +0 -1
  224. package/dist/types/src/runtimes/react/controls/rich-text.d.ts.map +0 -1
  225. package/dist/types.cjs2.js +0 -765
  226. package/dist/types.cjs2.js.map +0 -1
  227. package/dist/types.es2.js +0 -748
  228. package/dist/types.es2.js.map +0 -1
  229. /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/EditableText/index.d.ts +0 -0
  230. /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/EditableText/useSyncDOMSelection.d.ts +0 -0
  231. /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Element/element.d.ts +0 -0
  232. /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Element/index.d.ts +0 -0
  233. /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Leaf/index.d.ts +0 -0
  234. /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Leaf/leaf.d.ts +0 -0
  235. /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
  });
@@ -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.0";
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" });
@@ -2416,6 +2390,211 @@ function registerComponent$2(runtime) {
2416
2390
  }
2417
2391
  });
2418
2392
  }
2393
+ function useSwatch(swatchId) {
2394
+ const client = useMakeswiftClient();
2395
+ const readSwatch = () => swatchId == null ? null : client.readSwatch(swatchId);
2396
+ const swatch = shim.useSyncExternalStore(client.subscribe, readSwatch, readSwatch);
2397
+ React.useEffect(() => {
2398
+ if (swatchId != null)
2399
+ client.fetchSwatch(swatchId).catch(console.error);
2400
+ }, [client, swatchId]);
2401
+ return swatch;
2402
+ }
2403
+ function useSwatches(swatchIds) {
2404
+ const client = useMakeswiftClient();
2405
+ const lastSnapshot = React.useRef();
2406
+ function getSnapshot() {
2407
+ const swatches2 = swatchIds.map((swatchId) => client.readSwatch(swatchId));
2408
+ if (lastSnapshot.current != null && lastSnapshot.current.length === swatches2.length && lastSnapshot.current.every((swatch, idx) => swatches2[idx] === swatch)) {
2409
+ return lastSnapshot.current;
2410
+ }
2411
+ return lastSnapshot.current = swatches2;
2412
+ }
2413
+ const swatches = shim.useSyncExternalStore(client.subscribe, getSnapshot, getSnapshot);
2414
+ React.useEffect(() => {
2415
+ Promise.all(swatchIds.map((swatchId) => client.fetchSwatch(swatchId))).catch(console.error);
2416
+ }, [client, swatchIds]);
2417
+ return swatches;
2418
+ }
2419
+ function useFile(fileId) {
2420
+ const client = useMakeswiftClient();
2421
+ const readFile = () => fileId == null ? null : client.readFile(fileId);
2422
+ const file = shim.useSyncExternalStore(client.subscribe, readFile, readFile);
2423
+ React.useEffect(() => {
2424
+ if (fileId != null)
2425
+ client.fetchFile(fileId);
2426
+ }, [client, fileId]);
2427
+ return file;
2428
+ }
2429
+ function useFiles(fileIds) {
2430
+ const client = useMakeswiftClient();
2431
+ const lastSnapshot = React.useRef();
2432
+ function getSnapshot() {
2433
+ const files2 = fileIds.map((fileId) => client.readFile(fileId));
2434
+ if (lastSnapshot.current != null && lastSnapshot.current.length === files2.length && lastSnapshot.current.every((file, idx) => files2[idx] === file)) {
2435
+ return lastSnapshot.current;
2436
+ }
2437
+ return lastSnapshot.current = files2;
2438
+ }
2439
+ const files = shim.useSyncExternalStore(client.subscribe, getSnapshot, getSnapshot);
2440
+ React.useEffect(() => {
2441
+ Promise.all(fileIds.map((fileId) => client.fetchFile(fileId))).catch(console.error);
2442
+ }, [client, fileIds]);
2443
+ return files;
2444
+ }
2445
+ function useTypography(typographyId) {
2446
+ const client = useMakeswiftClient();
2447
+ const readTypography = () => typographyId == null ? null : client.readTypography(typographyId);
2448
+ const typography = shim.useSyncExternalStore(client.subscribe, readTypography, readTypography);
2449
+ React.useEffect(() => {
2450
+ if (typographyId != null)
2451
+ client.fetchTypography(typographyId).catch(console.error);
2452
+ }, [client, typographyId]);
2453
+ return typography;
2454
+ }
2455
+ function useGlobalElement(globalElementId) {
2456
+ const client = useMakeswiftClient();
2457
+ const readGlobalElement = () => globalElementId == null ? null : client.readGlobalElement(globalElementId);
2458
+ const globalElement = shim.useSyncExternalStore(client.subscribe, readGlobalElement, readGlobalElement);
2459
+ React.useEffect(() => {
2460
+ if (globalElementId != null)
2461
+ client.fetchGlobalElement(globalElementId).catch(console.error);
2462
+ }, [client, globalElementId]);
2463
+ return globalElement;
2464
+ }
2465
+ function useLocalizedGlobalElement(globalElementId) {
2466
+ const client = useMakeswiftClient();
2467
+ const readLocalizedGlobalElement = () => globalElementId == null ? null : client.readLocalizedGlobalElement(globalElementId);
2468
+ const localizedGlobalElement = shim.useSyncExternalStore(client.subscribe, readLocalizedGlobalElement, readLocalizedGlobalElement);
2469
+ React.useEffect(() => {
2470
+ if (globalElementId != null) {
2471
+ client.fetchLocalizedGlobalElement(globalElementId).catch(console.error);
2472
+ }
2473
+ }, [client, globalElementId]);
2474
+ return localizedGlobalElement;
2475
+ }
2476
+ function usePagePathnameSlice(pageId) {
2477
+ const client = useMakeswiftClient();
2478
+ const readPagePathnameSlice = () => pageId == null ? null : client.readPagePathnameSlice(pageId);
2479
+ const pagePathnameSlice = shim.useSyncExternalStore(client.subscribe, readPagePathnameSlice, readPagePathnameSlice);
2480
+ React.useEffect(() => {
2481
+ if (pageId != null)
2482
+ client.fetchPagePathnameSlice(pageId).catch(console.error);
2483
+ }, [client, pageId]);
2484
+ return pagePathnameSlice;
2485
+ }
2486
+ function useTable(tableId) {
2487
+ const client = useMakeswiftClient();
2488
+ const readTable = () => tableId == null ? null : client.readTable(tableId);
2489
+ const table = shim.useSyncExternalStore(client.subscribe, readTable, readTable);
2490
+ React.useEffect(() => {
2491
+ if (tableId != null)
2492
+ client.fetchTable(tableId).catch(console.error);
2493
+ }, [client, tableId]);
2494
+ return table;
2495
+ }
2496
+ const Link = React.forwardRef(function Link2(_e, ref) {
2497
+ var _f = _e, {
2498
+ link,
2499
+ onClick = () => {
2500
+ }
2501
+ } = _f, restOfProps = __objRest(_f, [
2502
+ "link",
2503
+ "onClick"
2504
+ ]);
2505
+ var _a;
2506
+ const pageId = link && link.type === "OPEN_PAGE" ? link.payload.pageId : null;
2507
+ const page = usePagePathnameSlice(pageId != null ? pageId : null);
2508
+ const elementKey = (link == null ? void 0 : link.type) === "SCROLL_TO_ELEMENT" ? (_a = link.payload.elementIdConfig) == null ? void 0 : _a.elementKey : null;
2509
+ const elementId = useElementId(elementKey);
2510
+ let useNextLink;
2511
+ let href;
2512
+ let target;
2513
+ let block;
2514
+ if (link) {
2515
+ switch (link.type) {
2516
+ case "OPEN_PAGE": {
2517
+ if (page) {
2518
+ useNextLink = true;
2519
+ href = `/${page.pathname}`;
2520
+ }
2521
+ target = link.payload.openInNewTab ? "_blank" : "_self";
2522
+ break;
2523
+ }
2524
+ case "OPEN_URL": {
2525
+ useNextLink = true;
2526
+ href = link.payload.url;
2527
+ target = link.payload.openInNewTab ? "_blank" : "_self";
2528
+ break;
2529
+ }
2530
+ case "SEND_EMAIL": {
2531
+ useNextLink = false;
2532
+ const {
2533
+ to,
2534
+ subject = "",
2535
+ body = ""
2536
+ } = link.payload;
2537
+ if (to != null)
2538
+ href = `mailto:${to}?subject=${subject}&body=${body}`;
2539
+ break;
2540
+ }
2541
+ case "CALL_PHONE": {
2542
+ useNextLink = false;
2543
+ href = `tel:${link.payload.phoneNumber}`;
2544
+ break;
2545
+ }
2546
+ case "SCROLL_TO_ELEMENT": {
2547
+ useNextLink = false;
2548
+ href = `#${elementId != null ? elementId : ""}`;
2549
+ block = link.payload.block;
2550
+ break;
2551
+ }
2552
+ default:
2553
+ throw new RangeError(`Invalid link type "${link.type}."`);
2554
+ }
2555
+ }
2556
+ function handleClick(event) {
2557
+ onClick(event);
2558
+ if (event.defaultPrevented)
2559
+ return;
2560
+ if (event.currentTarget.isContentEditable)
2561
+ return event.preventDefault();
2562
+ if (link && link.type === "SCROLL_TO_ELEMENT") {
2563
+ let hash;
2564
+ try {
2565
+ if (href != null)
2566
+ hash = new URL(`http://www.example.com/${href}`).hash;
2567
+ } catch (error) {
2568
+ console.error(`Link received invalid href: ${href}`, error);
2569
+ }
2570
+ if (href != null && hash != null && href === hash) {
2571
+ event.preventDefault();
2572
+ const view = event.view;
2573
+ scrollIntoView__default["default"](view.document.querySelector(hash), {
2574
+ behavior: "smooth",
2575
+ block
2576
+ });
2577
+ if (view.location.hash !== hash)
2578
+ view.history.pushState({}, "", hash);
2579
+ }
2580
+ }
2581
+ }
2582
+ if (useNextLink && href != null) {
2583
+ return /* @__PURE__ */ jsxRuntime.jsx(NextLink__default["default"], __spreadProps(__spreadValues({}, restOfProps), {
2584
+ ref,
2585
+ target,
2586
+ onClick: handleClick,
2587
+ href,
2588
+ legacyBehavior: false
2589
+ }));
2590
+ }
2591
+ return /* @__PURE__ */ jsxRuntime.jsx("a", __spreadProps(__spreadValues({}, restOfProps), {
2592
+ ref,
2593
+ href,
2594
+ target,
2595
+ onClick: handleClick
2596
+ }));
2597
+ });
2419
2598
  function registerComponent$1(runtime) {
2420
2599
  return runtime.registerComponent(forwardNextDynamicRef((patch) => dynamic__default["default"](() => patch(Promise.resolve().then(function() {
2421
2600
  return require("./Text.cjs.js");
@@ -2424,52 +2603,36 @@ function registerComponent$1(runtime) {
2424
2603
  label: "Text",
2425
2604
  props: {
2426
2605
  id: reactPage.ElementID(),
2427
- text: reactPage.RichText(() => ({
2428
- preset: {
2429
- document: {
2430
- object: "document",
2431
- nodes: [
2606
+ text: reactPage.RichText({
2607
+ unstable_defaultValue: [
2608
+ {
2609
+ type: reactPage.BlockType.Default,
2610
+ children: [
2432
2611
  {
2433
- object: "block",
2434
- type: "paragraph",
2435
- nodes: [
2436
- {
2437
- object: "text",
2438
- text: ipsum__default["default"](3),
2439
- marks: [
2612
+ text: ipsum__default["default"](3),
2613
+ typography: {
2614
+ style: [
2615
+ {
2616
+ deviceId: state_breakpoints.getBaseBreakpoint(runtime.getBreakpoints()).id,
2617
+ value: {
2618
+ fontWeight: 400,
2619
+ fontSize: { value: 18, unit: "px" },
2620
+ lineHeight: 1.5
2621
+ }
2622
+ },
2623
+ ...runtime.getBreakpoints().some(({ id }) => id === state_breakpoints.DefaultBreakpointID.Mobile) ? [
2440
2624
  {
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
- }
2625
+ deviceId: state_breakpoints.DefaultBreakpointID.Mobile,
2626
+ value: { fontSize: { value: 16, unit: "px" } }
2464
2627
  }
2465
- ]
2466
- }
2467
- ]
2628
+ ] : []
2629
+ ]
2630
+ }
2468
2631
  }
2469
2632
  ]
2470
2633
  }
2471
- }
2472
- })),
2634
+ ]
2635
+ }),
2473
2636
  width: reactPage.Width({
2474
2637
  format: reactPage.Width.Format.ClassName,
2475
2638
  preset: [
@@ -2600,111 +2763,8 @@ const FallbackComponent = React.forwardRef(function FallbackComponent2({
2600
2763
  function isNonNullable(value) {
2601
2764
  return value != null;
2602
2765
  }
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"]);
2766
+ function mapSideColor(swatches, _g) {
2767
+ var _h = _g, { color } = _h, restOfSide = __objRest(_h, ["color"]);
2708
2768
  return __spreadProps(__spreadValues({}, restOfSide), {
2709
2769
  color: color && {
2710
2770
  alpha: color.alpha,
@@ -3084,7 +3144,7 @@ function useFormattedStyle(styleControlData, controlDefinition, control) {
3084
3144
  return;
3085
3145
  const element = document.querySelector(`.${guid}`);
3086
3146
  const measuredBoxModel = element == null ? null : boxModels.getBox(element);
3087
- if (!deepEqual(currentBoxModel, measuredBoxModel)) {
3147
+ if (!reactPage.deepEqual(currentBoxModel, measuredBoxModel)) {
3088
3148
  currentBoxModel = measuredBoxModel;
3089
3149
  control.changeBoxModel(currentBoxModel);
3090
3150
  }
@@ -3236,8 +3296,11 @@ function ListControlValue({
3236
3296
  function useNumber(numberControlData, controlDefinition) {
3237
3297
  return numberControlData != null ? numberControlData : controlDefinition.config.defaultValue;
3238
3298
  }
3239
- const Text = forwardNextDynamicRef((patch) => dynamic__default["default"](() => patch(Promise.resolve().then(function() {
3240
- return require("./index.cjs8.js");
3299
+ const EditableText$1 = forwardNextDynamicRef((patch) => dynamic__default["default"](() => patch(Promise.resolve().then(function() {
3300
+ return require("./index.cjs7.js");
3301
+ }))));
3302
+ const ReadOnlyText$1 = forwardNextDynamicRef((patch) => dynamic__default["default"](() => patch(Promise.resolve().then(function() {
3303
+ return require("./ReadOnlyText.cjs.js");
3241
3304
  }))));
3242
3305
  function useRichText(data, control) {
3243
3306
  const textCallbackRef = React.useCallback((handle) => {
@@ -3247,13 +3310,17 @@ function useRichText(data, control) {
3247
3310
  text: control
3248
3311
  });
3249
3312
  }, [control]);
3250
- return /* @__PURE__ */ jsxRuntime.jsx(Text, {
3313
+ const isPreview = useIsPreview();
3314
+ return isPreview ? /* @__PURE__ */ jsxRuntime.jsx(EditableText$1, {
3315
+ text: data,
3316
+ ref: textCallbackRef
3317
+ }) : /* @__PURE__ */ jsxRuntime.jsx(ReadOnlyText$1, {
3251
3318
  text: data,
3252
3319
  ref: textCallbackRef
3253
3320
  });
3254
3321
  }
3255
3322
  const EditableText = forwardNextDynamicRef((patch) => dynamic__default["default"](() => patch(Promise.resolve().then(function() {
3256
- return require("./index.cjs9.js");
3323
+ return require("./index.cjs8.js");
3257
3324
  }))));
3258
3325
  const ReadOnlyText = forwardNextDynamicRef((patch) => dynamic__default["default"](() => patch(Promise.resolve().then(function() {
3259
3326
  return require("./ReadOnlyTextV2.cjs.js");
@@ -3302,7 +3369,7 @@ function pollBoxModel({
3302
3369
  let currentBoxModel = null;
3303
3370
  const handleAnimationFrameRequest = () => {
3304
3371
  const measuredBoxModel = boxModels.getBox(element);
3305
- if (!deepEqual(currentBoxModel, measuredBoxModel)) {
3372
+ if (!reactPage.deepEqual(currentBoxModel, measuredBoxModel)) {
3306
3373
  currentBoxModel = measuredBoxModel;
3307
3374
  onBoxModelChange(currentBoxModel);
3308
3375
  }
@@ -3332,13 +3399,13 @@ function useSlot(data, control) {
3332
3399
  }, element.key))
3333
3400
  });
3334
3401
  }
3335
- function Slot(_g) {
3336
- var _h = _g, {
3402
+ function Slot(_i) {
3403
+ var _j = _i, {
3337
3404
  as,
3338
3405
  control,
3339
3406
  children,
3340
3407
  className
3341
- } = _h, restOfProps = __objRest(_h, [
3408
+ } = _j, restOfProps = __objRest(_j, [
3342
3409
  "as",
3343
3410
  "control",
3344
3411
  "children",
@@ -3367,15 +3434,15 @@ function Slot(_g) {
3367
3434
  }
3368
3435
  Slot.Placeholder = SlotPlaceholder;
3369
3436
  Slot.Item = SlotItem;
3370
- function SlotItem(_i) {
3371
- var _j = _i, {
3437
+ function SlotItem(_k) {
3438
+ var _l = _k, {
3372
3439
  as,
3373
3440
  control,
3374
3441
  grid,
3375
3442
  index,
3376
3443
  children,
3377
3444
  className
3378
- } = _j, restOfProps = __objRest(_j, [
3445
+ } = _l, restOfProps = __objRest(_l, [
3379
3446
  "as",
3380
3447
  "control",
3381
3448
  "grid",
@@ -3660,7 +3727,7 @@ function ControlValue({
3660
3727
  parameters: [data, definition],
3661
3728
  children: (value) => children(value)
3662
3729
  }, definition.type);
3663
- case textInput.SelectControlType:
3730
+ case reactPage.SelectControlType:
3664
3731
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3665
3732
  hook: useSelectControlValue,
3666
3733
  parameters: [data, definition],
@@ -3672,7 +3739,7 @@ function ControlValue({
3672
3739
  parameters: [data, definition],
3673
3740
  children: (value) => children(value)
3674
3741
  }, definition.type);
3675
- case textInput.IconRadioGroupControlType:
3742
+ case reactPage.IconRadioGroupControlType:
3676
3743
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3677
3744
  hook: useIconRadioGroupValue,
3678
3745
  parameters: [data, definition],
@@ -3792,9 +3859,9 @@ function PropsValue({
3792
3859
  case textInput.NumberControlType:
3793
3860
  case textInput.TextInputControlType:
3794
3861
  case textInput.TextAreaControlType:
3795
- case textInput.SelectControlType:
3862
+ case reactPage.SelectControlType:
3796
3863
  case reactPage.ColorControlType:
3797
- case textInput.IconRadioGroupControlType:
3864
+ case reactPage.IconRadioGroupControlType:
3798
3865
  case reactPage.ImageControlType:
3799
3866
  case combobox.ComboboxControlType:
3800
3867
  case reactPage.ShapeControlType:
@@ -4093,10 +4160,10 @@ const PreviewProvider = dynamic__default["default"](() => Promise.resolve().then
4093
4160
  const LiveProvider = dynamic__default["default"](() => Promise.resolve().then(function() {
4094
4161
  return require("./LiveProvider.cjs.js");
4095
4162
  }));
4096
- function RuntimeProvider(_k) {
4097
- var _l = _k, {
4163
+ function RuntimeProvider(_m) {
4164
+ var _n = _m, {
4098
4165
  preview
4099
- } = _l, props = __objRest(_l, [
4166
+ } = _n, props = __objRest(_n, [
4100
4167
  "preview"
4101
4168
  ]);
4102
4169
  return preview ? /* @__PURE__ */ jsxRuntime.jsx(PreviewProvider, __spreadValues({}, props)) : /* @__PURE__ */ jsxRuntime.jsx(LiveProvider, __spreadValues({}, props));
@@ -4313,6 +4380,7 @@ exports.Document = Document$1;
4313
4380
  exports.DocumentReference = DocumentReference;
4314
4381
  exports.Element = Element$1;
4315
4382
  exports.ElementImperativeHandle = ElementImperativeHandle;
4383
+ exports.Link = Link;
4316
4384
  exports.Makeswift = Makeswift;
4317
4385
  exports.MakeswiftApiHandler = MakeswiftApiHandler;
4318
4386
  exports.MakeswiftProvider = MakeswiftProvider;
@@ -4327,28 +4395,23 @@ exports.Shapes = Shapes;
4327
4395
  exports.Sizes = Sizes;
4328
4396
  exports.StoreContext = StoreContext;
4329
4397
  exports.colorToString = colorToString;
4330
- exports.deepEqual = deepEqual;
4331
4398
  exports.forwardNextDynamicRef = forwardNextDynamicRef;
4332
4399
  exports.getServerSideProps = getServerSideProps;
4333
4400
  exports.getStaticPaths = getStaticPaths;
4334
4401
  exports.getStaticProps = getStaticProps;
4335
4402
  exports.isNonNullable = isNonNullable;
4336
4403
  exports.pollBoxModel = pollBoxModel;
4337
- exports.shallowEqual = shallowEqual;
4338
4404
  exports.useBorder = useBorder;
4339
4405
  exports.useBoxShadow = useBoxShadow;
4340
4406
  exports.useBreakpoints = useBreakpoints;
4341
4407
  exports.useBuilderEditMode = useBuilderEditMode;
4342
- exports.useElementId = useElementId;
4343
4408
  exports.useEnhancedTypography = useEnhancedTypography;
4344
4409
  exports.useFile = useFile;
4345
4410
  exports.useFiles = useFiles;
4346
4411
  exports.useFormContext = useFormContext;
4347
4412
  exports.useIsInBuilder = useIsInBuilder;
4348
- exports.useIsPreview = useIsPreview;
4349
4413
  exports.useMakeswiftClient = useMakeswiftClient;
4350
4414
  exports.usePageId = usePageId;
4351
- exports.usePagePathnameSlice = usePagePathnameSlice;
4352
4415
  exports.useResponsiveColor = useResponsiveColor;
4353
4416
  exports.useResponsiveGridItem = useResponsiveGridItem;
4354
4417
  exports.useResponsiveStyle = useResponsiveStyle;