@makeswift/runtime 0.8.10 → 0.9.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 (552) hide show
  1. package/dist/Box.cjs.js +6 -4
  2. package/dist/Box.cjs.js.map +1 -1
  3. package/dist/Box.es.js +6 -4
  4. package/dist/Box.es.js.map +1 -1
  5. package/dist/Button.cjs.js +6 -4
  6. package/dist/Button.cjs.js.map +1 -1
  7. package/dist/Button.es.js +6 -4
  8. package/dist/Button.es.js.map +1 -1
  9. package/dist/Carousel.cjs.js +9 -7
  10. package/dist/Carousel.cjs.js.map +1 -1
  11. package/dist/Carousel.es.js +9 -7
  12. package/dist/Carousel.es.js.map +1 -1
  13. package/dist/Countdown.cjs.js +6 -4
  14. package/dist/Countdown.cjs.js.map +1 -1
  15. package/dist/Countdown.es.js +6 -4
  16. package/dist/Countdown.es.js.map +1 -1
  17. package/dist/Divider.cjs.js +6 -4
  18. package/dist/Divider.cjs.js.map +1 -1
  19. package/dist/Divider.es.js +6 -4
  20. package/dist/Divider.es.js.map +1 -1
  21. package/dist/Embed.cjs.js +6 -4
  22. package/dist/Embed.cjs.js.map +1 -1
  23. package/dist/Embed.es.js +6 -4
  24. package/dist/Embed.es.js.map +1 -1
  25. package/dist/Form.cjs.js +6 -4
  26. package/dist/Form.cjs.js.map +1 -1
  27. package/dist/Form.es.js +6 -4
  28. package/dist/Form.es.js.map +1 -1
  29. package/dist/Image.cjs.js +6 -4
  30. package/dist/Image.cjs.js.map +1 -1
  31. package/dist/Image.es.js +6 -4
  32. package/dist/Image.es.js.map +1 -1
  33. package/dist/LiveProvider.cjs.js +8 -6
  34. package/dist/LiveProvider.cjs.js.map +1 -1
  35. package/dist/LiveProvider.es.js +7 -5
  36. package/dist/LiveProvider.es.js.map +1 -1
  37. package/dist/Navigation.cjs.js +6 -4
  38. package/dist/Navigation.cjs.js.map +1 -1
  39. package/dist/Navigation.es.js +6 -4
  40. package/dist/Navigation.es.js.map +1 -1
  41. package/dist/PreviewProvider.cjs.js +51 -34
  42. package/dist/PreviewProvider.cjs.js.map +1 -1
  43. package/dist/PreviewProvider.es.js +23 -6
  44. package/dist/PreviewProvider.es.js.map +1 -1
  45. package/dist/ReadOnlyText.cjs.js +72 -67
  46. package/dist/ReadOnlyText.cjs.js.map +1 -1
  47. package/dist/ReadOnlyText.es.js +18 -13
  48. package/dist/ReadOnlyText.es.js.map +1 -1
  49. package/dist/ReadOnlyTextV2.cjs.js +136 -91
  50. package/dist/ReadOnlyTextV2.cjs.js.map +1 -1
  51. package/dist/ReadOnlyTextV2.es.js +82 -37
  52. package/dist/ReadOnlyTextV2.es.js.map +1 -1
  53. package/dist/Root.cjs.js +6 -4
  54. package/dist/Root.cjs.js.map +1 -1
  55. package/dist/Root.es.js +6 -4
  56. package/dist/Root.es.js.map +1 -1
  57. package/dist/SocialLinks.cjs.js +6 -4
  58. package/dist/SocialLinks.cjs.js.map +1 -1
  59. package/dist/SocialLinks.es.js +6 -4
  60. package/dist/SocialLinks.es.js.map +1 -1
  61. package/dist/Text.cjs.js +7 -5
  62. package/dist/Text.cjs.js.map +1 -1
  63. package/dist/Text.es.js +7 -5
  64. package/dist/Text.es.js.map +1 -1
  65. package/dist/Video.cjs.js +6 -4
  66. package/dist/Video.cjs.js.map +1 -1
  67. package/dist/Video.es.js +6 -4
  68. package/dist/Video.es.js.map +1 -1
  69. package/dist/actions.cjs.js +16 -1
  70. package/dist/actions.cjs.js.map +1 -1
  71. package/dist/actions.es.js +14 -2
  72. package/dist/actions.es.js.map +1 -1
  73. package/dist/builder.cjs.js +7 -2
  74. package/dist/builder.cjs.js.map +1 -1
  75. package/dist/builder.es.js +7 -2
  76. package/dist/builder.es.js.map +1 -1
  77. package/dist/components.cjs.js +8 -6
  78. package/dist/components.cjs.js.map +1 -1
  79. package/dist/components.es.js +8 -6
  80. package/dist/components.es.js.map +1 -1
  81. package/dist/constants.cjs.js +0 -408
  82. package/dist/constants.cjs.js.map +1 -1
  83. package/dist/constants.es.js +1 -372
  84. package/dist/constants.es.js.map +1 -1
  85. package/dist/control-serialization.cjs.js +84 -41
  86. package/dist/control-serialization.cjs.js.map +1 -1
  87. package/dist/control-serialization.es.js +44 -1
  88. package/dist/control-serialization.es.js.map +1 -1
  89. package/dist/controls.cjs.js +58 -50
  90. package/dist/controls.cjs.js.map +1 -1
  91. package/dist/controls.es.js +8 -3
  92. package/dist/controls.es.js.map +1 -1
  93. package/dist/index.cjs.js +534 -495
  94. package/dist/index.cjs.js.map +1 -1
  95. package/dist/index.cjs10.js +372 -0
  96. package/dist/index.cjs10.js.map +1 -0
  97. package/dist/index.cjs2.js +10 -8
  98. package/dist/index.cjs2.js.map +1 -1
  99. package/dist/index.cjs5.js +2 -480
  100. package/dist/index.cjs5.js.map +1 -1
  101. package/dist/index.cjs6.js +6 -7
  102. package/dist/index.cjs6.js.map +1 -1
  103. package/dist/index.cjs7.js +17 -39
  104. package/dist/index.cjs7.js.map +1 -1
  105. package/dist/index.cjs8.js +14 -180
  106. package/dist/index.cjs8.js.map +1 -1
  107. package/dist/index.cjs9.js +191 -265
  108. package/dist/index.cjs9.js.map +1 -1
  109. package/dist/index.es.js +299 -260
  110. package/dist/index.es.js.map +1 -1
  111. package/dist/index.es10.js +365 -0
  112. package/dist/index.es10.js.map +1 -0
  113. package/dist/index.es2.js +5 -3
  114. package/dist/index.es2.js.map +1 -1
  115. package/dist/index.es5.js +3 -471
  116. package/dist/index.es5.js.map +1 -1
  117. package/dist/index.es6.js +4 -5
  118. package/dist/index.es6.js.map +1 -1
  119. package/dist/index.es7.js +17 -37
  120. package/dist/index.es7.js.map +1 -1
  121. package/dist/index.es8.js +13 -175
  122. package/dist/index.es8.js.map +1 -1
  123. package/dist/index.es9.js +188 -262
  124. package/dist/index.es9.js.map +1 -1
  125. package/dist/leaf.cjs.js +4 -4
  126. package/dist/leaf.cjs.js.map +1 -1
  127. package/dist/leaf.es.js +1 -1
  128. package/dist/leaf.es.js.map +1 -1
  129. package/dist/main.cjs.js +8 -4
  130. package/dist/main.cjs.js.map +1 -1
  131. package/dist/main.es.js +6 -5
  132. package/dist/main.es.js.map +1 -1
  133. package/dist/next.cjs.js +6 -4
  134. package/dist/next.cjs.js.map +1 -1
  135. package/dist/next.es.js +6 -4
  136. package/dist/next.es.js.map +1 -1
  137. package/dist/prop-controllers.cjs.js +11 -7
  138. package/dist/prop-controllers.cjs.js.map +1 -1
  139. package/dist/prop-controllers.es.js +7 -3
  140. package/dist/prop-controllers.es.js.map +1 -1
  141. package/dist/{descriptors.cjs.js → react-page.cjs.js} +1559 -102
  142. package/dist/react-page.cjs.js.map +1 -0
  143. package/dist/{descriptors.es.js → react-page.es.js} +1469 -80
  144. package/dist/react-page.es.js.map +1 -0
  145. package/dist/react.cjs.js +6 -4
  146. package/dist/react.cjs.js.map +1 -1
  147. package/dist/react.es.js +6 -4
  148. package/dist/react.es.js.map +1 -1
  149. package/dist/slate.cjs.js +17 -11
  150. package/dist/slate.cjs.js.map +1 -1
  151. package/dist/slate.es.js +7 -5
  152. package/dist/slate.es.js.map +1 -1
  153. package/dist/state/breakpoints.cjs.js.map +1 -1
  154. package/dist/state/breakpoints.es.js.map +1 -1
  155. package/dist/text-input.cjs.js +0 -6
  156. package/dist/text-input.cjs.js.map +1 -1
  157. package/dist/text-input.es.js +1 -5
  158. package/dist/text-input.es.js.map +1 -1
  159. package/dist/types/src/api/graphql/documents/queries.d.ts.map +1 -1
  160. package/dist/types/src/api/graphql/generated/types.d.ts +36 -44
  161. package/dist/types/src/api/graphql/generated/types.d.ts.map +1 -1
  162. package/dist/types/src/api/graphql/types.d.ts +2 -2
  163. package/dist/types/src/api/graphql/types.d.ts.map +1 -1
  164. package/dist/types/src/api/react.d.ts +3 -3
  165. package/dist/types/src/api/react.d.ts.map +1 -1
  166. package/dist/types/src/builder/serialization/control-serialization.d.ts +66 -66
  167. package/dist/types/src/builder/serialization/control-serialization.d.ts.map +1 -1
  168. package/dist/types/src/builder/serialization/controls/rich-text-v2.d.ts +5 -0
  169. package/dist/types/src/builder/serialization/controls/rich-text-v2.d.ts.map +1 -0
  170. package/dist/types/src/builder/serialization/controls/types.d.ts +3 -3
  171. package/dist/types/src/builder/serialization/controls/types.d.ts.map +1 -1
  172. package/dist/types/src/builder/serialization/function-serialization.d.ts +4 -4
  173. package/dist/types/src/builder/serialization/function-serialization.d.ts.map +1 -1
  174. package/dist/types/src/components/builtin/Box/animations.d.ts +1 -1
  175. package/dist/types/src/components/builtin/Box/animations.d.ts.map +1 -1
  176. package/dist/types/src/components/builtin/Box/components/Placeholder/index.d.ts +1 -1
  177. package/dist/types/src/components/builtin/Box/components/Placeholder/index.d.ts.map +1 -1
  178. package/dist/types/src/components/builtin/Box/constants.d.ts +1 -1
  179. package/dist/types/src/components/builtin/Box/constants.d.ts.map +1 -1
  180. package/dist/types/src/components/builtin/Button/Button.d.ts +3 -3
  181. package/dist/types/src/components/builtin/Button/Button.d.ts.map +1 -1
  182. package/dist/types/src/components/builtin/Button/contants.d.ts +1 -1
  183. package/dist/types/src/components/builtin/Button/contants.d.ts.map +1 -1
  184. package/dist/types/src/components/builtin/Carousel/Carousel.d.ts +1 -1
  185. package/dist/types/src/components/builtin/Carousel/Carousel.d.ts.map +1 -1
  186. package/dist/types/src/components/builtin/Carousel/register.d.ts.map +1 -1
  187. package/dist/types/src/components/builtin/Countdown/Countdown.d.ts +1 -1
  188. package/dist/types/src/components/builtin/Countdown/Countdown.d.ts.map +1 -1
  189. package/dist/types/src/components/builtin/Countdown/register.d.ts.map +1 -1
  190. package/dist/types/src/components/builtin/Divider/Divider.d.ts +2 -2
  191. package/dist/types/src/components/builtin/Divider/Divider.d.ts.map +1 -1
  192. package/dist/types/src/components/builtin/Divider/register.d.ts.map +1 -1
  193. package/dist/types/src/components/builtin/Embed/Embed.d.ts +1 -1
  194. package/dist/types/src/components/builtin/Embed/Embed.d.ts.map +1 -1
  195. package/dist/types/src/components/builtin/Embed/register.d.ts.map +1 -1
  196. package/dist/types/src/components/builtin/Form/Form.d.ts +2 -2
  197. package/dist/types/src/components/builtin/Form/Form.d.ts.map +1 -1
  198. package/dist/types/src/components/builtin/Form/components/Field/components/Checkbox/index.d.ts +2 -2
  199. package/dist/types/src/components/builtin/Form/components/Field/components/Checkbox/index.d.ts.map +1 -1
  200. package/dist/types/src/components/builtin/Form/components/Field/components/CheckboxTableField/index.d.ts +1 -1
  201. package/dist/types/src/components/builtin/Form/components/Field/components/CheckboxTableField/index.d.ts.map +1 -1
  202. package/dist/types/src/components/builtin/Form/components/Field/components/EmailTableField/index.d.ts +1 -1
  203. package/dist/types/src/components/builtin/Form/components/Field/components/EmailTableField/index.d.ts.map +1 -1
  204. package/dist/types/src/components/builtin/Form/components/Field/components/Input/index.d.ts +1 -1
  205. package/dist/types/src/components/builtin/Form/components/Field/components/Input/index.d.ts.map +1 -1
  206. package/dist/types/src/components/builtin/Form/components/Field/components/Label/index.d.ts +2 -2
  207. package/dist/types/src/components/builtin/Form/components/Field/components/Label/index.d.ts.map +1 -1
  208. package/dist/types/src/components/builtin/Form/components/Field/components/LongTextTableField/index.d.ts +1 -1
  209. package/dist/types/src/components/builtin/Form/components/Field/components/LongTextTableField/index.d.ts.map +1 -1
  210. package/dist/types/src/components/builtin/Form/components/Field/components/MultipleSelectTableField/index.d.ts +1 -1
  211. package/dist/types/src/components/builtin/Form/components/Field/components/MultipleSelectTableField/index.d.ts.map +1 -1
  212. package/dist/types/src/components/builtin/Form/components/Field/components/NumberTableField/index.d.ts +1 -1
  213. package/dist/types/src/components/builtin/Form/components/Field/components/NumberTableField/index.d.ts.map +1 -1
  214. package/dist/types/src/components/builtin/Form/components/Field/components/PhoneNumberTableField/index.d.ts +1 -1
  215. package/dist/types/src/components/builtin/Form/components/Field/components/PhoneNumberTableField/index.d.ts.map +1 -1
  216. package/dist/types/src/components/builtin/Form/components/Field/components/RadioButton/index.d.ts +1 -1
  217. package/dist/types/src/components/builtin/Form/components/Field/components/RadioButton/index.d.ts.map +1 -1
  218. package/dist/types/src/components/builtin/Form/components/Field/components/SingleLineTextTableField/index.d.ts +1 -1
  219. package/dist/types/src/components/builtin/Form/components/Field/components/SingleLineTextTableField/index.d.ts.map +1 -1
  220. package/dist/types/src/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnRadioButtonGroup/index.d.ts +1 -1
  221. package/dist/types/src/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnRadioButtonGroup/index.d.ts.map +1 -1
  222. package/dist/types/src/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnSingleSelect/index.d.ts +1 -1
  223. package/dist/types/src/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnSingleSelect/index.d.ts.map +1 -1
  224. package/dist/types/src/components/builtin/Form/components/Field/components/SingleSelectTableField/index.d.ts +1 -1
  225. package/dist/types/src/components/builtin/Form/components/Field/components/SingleSelectTableField/index.d.ts.map +1 -1
  226. package/dist/types/src/components/builtin/Form/components/Field/components/TextArea/index.d.ts +1 -1
  227. package/dist/types/src/components/builtin/Form/components/Field/components/TextArea/index.d.ts.map +1 -1
  228. package/dist/types/src/components/builtin/Form/components/Field/components/URLTableField/index.d.ts +1 -1
  229. package/dist/types/src/components/builtin/Form/components/Field/components/URLTableField/index.d.ts.map +1 -1
  230. package/dist/types/src/components/builtin/Form/components/Field/index.d.ts +2 -2
  231. package/dist/types/src/components/builtin/Form/components/Field/index.d.ts.map +1 -1
  232. package/dist/types/src/components/builtin/Form/components/Placeholder/index.d.ts +1 -1
  233. package/dist/types/src/components/builtin/Form/components/Placeholder/index.d.ts.map +1 -1
  234. package/dist/types/src/components/builtin/Form/context/FormContext.d.ts +5 -5
  235. package/dist/types/src/components/builtin/Form/context/FormContext.d.ts.map +1 -1
  236. package/dist/types/src/components/builtin/Form/register.d.ts.map +1 -1
  237. package/dist/types/src/components/builtin/Form/types.d.ts +13 -13
  238. package/dist/types/src/components/builtin/Form/types.d.ts.map +1 -1
  239. package/dist/types/src/components/builtin/Image/Image.d.ts +1 -1
  240. package/dist/types/src/components/builtin/Image/Image.d.ts.map +1 -1
  241. package/dist/types/src/components/builtin/Navigation/Navigation.d.ts +1 -1
  242. package/dist/types/src/components/builtin/Navigation/Navigation.d.ts.map +1 -1
  243. package/dist/types/src/components/builtin/Navigation/components/DropDownButton/index.d.ts +3 -3
  244. package/dist/types/src/components/builtin/Navigation/components/DropDownButton/index.d.ts.map +1 -1
  245. package/dist/types/src/components/builtin/Navigation/components/LinksPlaceholder/index.d.ts +1 -1
  246. package/dist/types/src/components/builtin/Navigation/components/LinksPlaceholder/index.d.ts.map +1 -1
  247. package/dist/types/src/components/builtin/Navigation/components/MobileMenu/components/MobileDropDownButton/index.d.ts +3 -3
  248. package/dist/types/src/components/builtin/Navigation/components/MobileMenu/components/MobileDropDownButton/index.d.ts.map +1 -1
  249. package/dist/types/src/components/builtin/Navigation/components/MobileMenu/index.d.ts +1 -1
  250. package/dist/types/src/components/builtin/Navigation/components/MobileMenu/index.d.ts.map +1 -1
  251. package/dist/types/src/components/builtin/Navigation/register.d.ts.map +1 -1
  252. package/dist/types/src/components/builtin/Root/Root.d.ts +1 -1
  253. package/dist/types/src/components/builtin/Root/Root.d.ts.map +1 -1
  254. package/dist/types/src/components/builtin/SocialLinks/SocialLinks.d.ts +1 -1
  255. package/dist/types/src/components/builtin/SocialLinks/SocialLinks.d.ts.map +1 -1
  256. package/dist/types/src/components/builtin/SocialLinks/components/SocialLinksPlaceholder/index.d.ts +1 -1
  257. package/dist/types/src/components/builtin/SocialLinks/components/SocialLinksPlaceholder/index.d.ts.map +1 -1
  258. package/dist/types/src/components/builtin/SocialLinks/register.d.ts.map +1 -1
  259. package/dist/types/src/components/builtin/Text/EditableText/editable-text.d.ts +1 -1
  260. package/dist/types/src/components/builtin/Text/EditableText/editable-text.d.ts.map +1 -1
  261. package/dist/types/src/components/builtin/Text/ReadOnlyText.d.ts +3 -3
  262. package/dist/types/src/components/builtin/Text/ReadOnlyText.d.ts.map +1 -1
  263. package/dist/types/src/components/builtin/Text/Text.d.ts +1 -1
  264. package/dist/types/src/components/builtin/Text/Text.d.ts.map +1 -1
  265. package/dist/types/src/components/builtin/Text/components/Element/block.d.ts +2 -2
  266. package/dist/types/src/components/builtin/Text/components/Element/block.d.ts.map +1 -1
  267. package/dist/types/src/components/builtin/Text/components/Element/inline.d.ts +1 -1
  268. package/dist/types/src/components/builtin/Text/components/Element/inline.d.ts.map +1 -1
  269. package/dist/types/src/components/builtin/Text/components/Leaf/leaf.d.ts +5 -5
  270. package/dist/types/src/components/builtin/Text/components/Leaf/leaf.d.ts.map +1 -1
  271. package/dist/types/src/components/builtin/Video/Video.d.ts +1 -1
  272. package/dist/types/src/components/builtin/Video/Video.d.ts.map +1 -1
  273. package/dist/types/src/components/builtin/Video/register.d.ts.map +1 -1
  274. package/dist/types/src/components/hooks/useBackgrounds.d.ts +8 -8
  275. package/dist/types/src/components/hooks/useBackgrounds.d.ts.map +1 -1
  276. package/dist/types/src/components/hooks/useBorder.d.ts +3 -3
  277. package/dist/types/src/components/hooks/useBorder.d.ts.map +1 -1
  278. package/dist/types/src/components/hooks/useBoxShadow.d.ts +3 -3
  279. package/dist/types/src/components/hooks/useBoxShadow.d.ts.map +1 -1
  280. package/dist/types/src/components/page/BodySnippet.d.ts +1 -1
  281. package/dist/types/src/components/page/BodySnippet.d.ts.map +1 -1
  282. package/dist/types/src/components/page/Page.d.ts +1 -1
  283. package/dist/types/src/components/page/Page.d.ts.map +1 -1
  284. package/dist/types/src/components/shared/BackgroundsContainer/components/BackgroundVideo/index.d.ts +1 -1
  285. package/dist/types/src/components/shared/BackgroundsContainer/components/BackgroundVideo/index.d.ts.map +1 -1
  286. package/dist/types/src/components/shared/BackgroundsContainer/components/Backgrounds/index.d.ts +1 -1
  287. package/dist/types/src/components/shared/BackgroundsContainer/components/Backgrounds/index.d.ts.map +1 -1
  288. package/dist/types/src/components/shared/BackgroundsContainer/components/Parallax/index.d.ts +1 -1
  289. package/dist/types/src/components/shared/BackgroundsContainer/components/Parallax/index.d.ts.map +1 -1
  290. package/dist/types/src/components/shared/BackgroundsContainer/index.d.ts +1 -1
  291. package/dist/types/src/components/shared/BackgroundsContainer/index.d.ts.map +1 -1
  292. package/dist/types/src/components/shared/FallbackComponent/FallbackComponent.d.ts +1 -1
  293. package/dist/types/src/components/shared/FallbackComponent/FallbackComponent.d.ts.map +1 -1
  294. package/dist/types/src/components/shared/GutterContainer/index.d.ts +2 -2
  295. package/dist/types/src/components/shared/GutterContainer/index.d.ts.map +1 -1
  296. package/dist/types/src/components/shared/Link/index.d.ts +1 -1
  297. package/dist/types/src/components/shared/Link/index.d.ts.map +1 -1
  298. package/dist/types/src/components/shared/grid-item.d.ts +2 -2
  299. package/dist/types/src/components/shared/grid-item.d.ts.map +1 -1
  300. package/dist/types/src/components/utils/drop-first.d.ts +1 -1
  301. package/dist/types/src/components/utils/drop-first.d.ts.map +1 -1
  302. package/dist/types/src/components/utils/types.d.ts +2 -2
  303. package/dist/types/src/components/utils/types.d.ts.map +1 -1
  304. package/dist/types/src/controls/checkbox.d.ts +3 -3
  305. package/dist/types/src/controls/checkbox.d.ts.map +1 -1
  306. package/dist/types/src/controls/color.d.ts +3 -3
  307. package/dist/types/src/controls/color.d.ts.map +1 -1
  308. package/dist/types/src/controls/combobox.d.ts +5 -5
  309. package/dist/types/src/controls/combobox.d.ts.map +1 -1
  310. package/dist/types/src/controls/control.d.ts +6 -4
  311. package/dist/types/src/controls/control.d.ts.map +1 -1
  312. package/dist/types/src/controls/image.d.ts +4 -4
  313. package/dist/types/src/controls/image.d.ts.map +1 -1
  314. package/dist/types/src/controls/link.d.ts +8 -8
  315. package/dist/types/src/controls/link.d.ts.map +1 -1
  316. package/dist/types/src/controls/list.d.ts +6 -6
  317. package/dist/types/src/controls/list.d.ts.map +1 -1
  318. package/dist/types/src/controls/number.d.ts +3 -3
  319. package/dist/types/src/controls/number.d.ts.map +1 -1
  320. package/dist/types/src/controls/rich-text/dto-types.d.ts +4 -4
  321. package/dist/types/src/controls/rich-text/dto-types.d.ts.map +1 -1
  322. package/dist/types/src/controls/rich-text/rich-text.d.ts +11 -11
  323. package/dist/types/src/controls/rich-text/rich-text.d.ts.map +1 -1
  324. package/dist/types/src/controls/rich-text/translation.d.ts +1 -1
  325. package/dist/types/src/controls/rich-text/translation.d.ts.map +1 -1
  326. package/dist/types/src/controls/rich-text-v2/rich-text-v2.d.ts +39 -18
  327. package/dist/types/src/controls/rich-text-v2/rich-text-v2.d.ts.map +1 -1
  328. package/dist/types/src/controls/select.d.ts +5 -5
  329. package/dist/types/src/controls/select.d.ts.map +1 -1
  330. package/dist/types/src/controls/shape.d.ts +5 -5
  331. package/dist/types/src/controls/shape.d.ts.map +1 -1
  332. package/dist/types/src/controls/slot.d.ts +17 -8
  333. package/dist/types/src/controls/slot.d.ts.map +1 -1
  334. package/dist/types/src/controls/style.d.ts +18 -18
  335. package/dist/types/src/controls/style.d.ts.map +1 -1
  336. package/dist/types/src/controls/text-area.d.ts +3 -3
  337. package/dist/types/src/controls/text-area.d.ts.map +1 -1
  338. package/dist/types/src/controls/text-input.d.ts +3 -3
  339. package/dist/types/src/controls/text-input.d.ts.map +1 -1
  340. package/dist/types/src/controls/types.d.ts +5 -5
  341. package/dist/types/src/controls/types.d.ts.map +1 -1
  342. package/dist/types/src/css/border-radius.d.ts +2 -2
  343. package/dist/types/src/css/border-radius.d.ts.map +1 -1
  344. package/dist/types/src/css/border.d.ts +2 -2
  345. package/dist/types/src/css/border.d.ts.map +1 -1
  346. package/dist/types/src/css/length-percentage.d.ts +2 -2
  347. package/dist/types/src/css/length-percentage.d.ts.map +1 -1
  348. package/dist/types/src/css/length.d.ts +1 -1
  349. package/dist/types/src/css/length.d.ts.map +1 -1
  350. package/dist/types/src/css/margin.d.ts +2 -2
  351. package/dist/types/src/css/margin.d.ts.map +1 -1
  352. package/dist/types/src/css/padding.d.ts +2 -2
  353. package/dist/types/src/css/padding.d.ts.map +1 -1
  354. package/dist/types/src/index.d.ts +2 -1
  355. package/dist/types/src/index.d.ts.map +1 -1
  356. package/dist/types/src/next/api-handler/handlers/element-tree.d.ts +3 -3
  357. package/dist/types/src/next/api-handler/handlers/element-tree.d.ts.map +1 -1
  358. package/dist/types/src/next/api-handler/handlers/fonts.d.ts +5 -5
  359. package/dist/types/src/next/api-handler/handlers/fonts.d.ts.map +1 -1
  360. package/dist/types/src/next/api-handler/handlers/manifest.d.ts +6 -4
  361. package/dist/types/src/next/api-handler/handlers/manifest.d.ts.map +1 -1
  362. package/dist/types/src/next/api-handler/handlers/proxy-preview-mode.d.ts +2 -2
  363. package/dist/types/src/next/api-handler/handlers/proxy-preview-mode.d.ts.map +1 -1
  364. package/dist/types/src/next/api-handler/handlers/revalidate.d.ts +3 -3
  365. package/dist/types/src/next/api-handler/handlers/revalidate.d.ts.map +1 -1
  366. package/dist/types/src/next/api-handler/index.d.ts +5 -4
  367. package/dist/types/src/next/api-handler/index.d.ts.map +1 -1
  368. package/dist/types/src/next/client.d.ts +15 -15
  369. package/dist/types/src/next/client.d.ts.map +1 -1
  370. package/dist/types/src/next/dynamic.d.ts +4 -4
  371. package/dist/types/src/next/dynamic.d.ts.map +1 -1
  372. package/dist/types/src/next/index.d.ts +10 -7
  373. package/dist/types/src/next/index.d.ts.map +1 -1
  374. package/dist/types/src/next/preview-mode.d.ts +18 -4
  375. package/dist/types/src/next/preview-mode.d.ts.map +1 -1
  376. package/dist/types/src/prop-controllers/descriptors.d.ts +179 -179
  377. package/dist/types/src/prop-controllers/descriptors.d.ts.map +1 -1
  378. package/dist/types/src/prop-controllers/instances.d.ts +17 -17
  379. package/dist/types/src/prop-controllers/instances.d.ts.map +1 -1
  380. package/dist/types/src/runtimes/react/components/LiveProvider.d.ts +1 -1
  381. package/dist/types/src/runtimes/react/components/LiveProvider.d.ts.map +1 -1
  382. package/dist/types/src/runtimes/react/components/PreviewProvider.d.ts +1 -1
  383. package/dist/types/src/runtimes/react/components/PreviewProvider.d.ts.map +1 -1
  384. package/dist/types/src/runtimes/react/components/render-hook.d.ts +1 -1
  385. package/dist/types/src/runtimes/react/components/render-hook.d.ts.map +1 -1
  386. package/dist/types/src/runtimes/react/controls/checkbox.d.ts +1 -1
  387. package/dist/types/src/runtimes/react/controls/checkbox.d.ts.map +1 -1
  388. package/dist/types/src/runtimes/react/controls/color.d.ts +1 -1
  389. package/dist/types/src/runtimes/react/controls/color.d.ts.map +1 -1
  390. package/dist/types/src/runtimes/react/controls/combobox.d.ts +1 -1
  391. package/dist/types/src/runtimes/react/controls/combobox.d.ts.map +1 -1
  392. package/dist/types/src/runtimes/react/controls/control.d.ts +2 -2
  393. package/dist/types/src/runtimes/react/controls/control.d.ts.map +1 -1
  394. package/dist/types/src/runtimes/react/controls/image.d.ts +3 -3
  395. package/dist/types/src/runtimes/react/controls/image.d.ts.map +1 -1
  396. package/dist/types/src/runtimes/react/controls/link.d.ts +2 -2
  397. package/dist/types/src/runtimes/react/controls/link.d.ts.map +1 -1
  398. package/dist/types/src/runtimes/react/controls/list.d.ts +3 -3
  399. package/dist/types/src/runtimes/react/controls/list.d.ts.map +1 -1
  400. package/dist/types/src/runtimes/react/controls/number.d.ts +1 -1
  401. package/dist/types/src/runtimes/react/controls/number.d.ts.map +1 -1
  402. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/editable-text-v2.d.ts +3 -3
  403. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/editable-text-v2.d.ts.map +1 -1
  404. package/dist/types/src/runtimes/react/controls/rich-text-v2/ReadOnlyTextV2.d.ts +7 -4
  405. package/dist/types/src/runtimes/react/controls/rich-text-v2/ReadOnlyTextV2.d.ts.map +1 -1
  406. package/dist/types/src/runtimes/react/controls/rich-text-v2/rich-text-v2.d.ts +2 -2
  407. package/dist/types/src/runtimes/react/controls/rich-text-v2/rich-text-v2.d.ts.map +1 -1
  408. package/dist/types/src/runtimes/react/controls/rich-text.d.ts +2 -2
  409. package/dist/types/src/runtimes/react/controls/rich-text.d.ts.map +1 -1
  410. package/dist/types/src/runtimes/react/controls/select.d.ts +1 -1
  411. package/dist/types/src/runtimes/react/controls/select.d.ts.map +1 -1
  412. package/dist/types/src/runtimes/react/controls/shape.d.ts +2 -2
  413. package/dist/types/src/runtimes/react/controls/shape.d.ts.map +1 -1
  414. package/dist/types/src/runtimes/react/controls/slot.d.ts +4 -4
  415. package/dist/types/src/runtimes/react/controls/slot.d.ts.map +1 -1
  416. package/dist/types/src/runtimes/react/controls/style.d.ts +1 -1
  417. package/dist/types/src/runtimes/react/controls/style.d.ts.map +1 -1
  418. package/dist/types/src/runtimes/react/controls/text-area.d.ts +1 -1
  419. package/dist/types/src/runtimes/react/controls/text-area.d.ts.map +1 -1
  420. package/dist/types/src/runtimes/react/controls/text-input.d.ts +1 -1
  421. package/dist/types/src/runtimes/react/controls/text-input.d.ts.map +1 -1
  422. package/dist/types/src/runtimes/react/controls.d.ts +8 -8
  423. package/dist/types/src/runtimes/react/controls.d.ts.map +1 -1
  424. package/dist/types/src/runtimes/react/element-imperative-handle.d.ts +1 -1
  425. package/dist/types/src/runtimes/react/element-imperative-handle.d.ts.map +1 -1
  426. package/dist/types/src/runtimes/react/find-dom-node.d.ts +1 -1
  427. package/dist/types/src/runtimes/react/find-dom-node.d.ts.map +1 -1
  428. package/dist/types/src/runtimes/react/index.d.ts +10 -8
  429. package/dist/types/src/runtimes/react/index.d.ts.map +1 -1
  430. package/dist/types/src/slate/BlockPlugin/constants.d.ts.map +1 -0
  431. package/dist/types/src/slate/BlockPlugin/dedent.d.ts.map +1 -0
  432. package/dist/types/src/slate/BlockPlugin/indent.d.ts.map +1 -0
  433. package/dist/types/src/slate/BlockPlugin/index.d.ts +56 -2
  434. package/dist/types/src/slate/BlockPlugin/index.d.ts.map +1 -1
  435. package/dist/types/src/slate/BlockPlugin/setBlockKeyForDevice.d.ts +1 -1
  436. package/dist/types/src/slate/BlockPlugin/setBlockKeyForDevice.d.ts.map +1 -1
  437. package/dist/types/src/slate/{ListPlugin → BlockPlugin}/toggleList.d.ts +2 -2
  438. package/dist/types/src/slate/BlockPlugin/toggleList.d.ts.map +1 -0
  439. package/dist/types/src/slate/BlockPlugin/types.d.ts +3 -3
  440. package/dist/types/src/slate/BlockPlugin/types.d.ts.map +1 -1
  441. package/dist/types/src/slate/BlockPlugin/unwrapInline.d.ts +1 -1
  442. package/dist/types/src/slate/BlockPlugin/unwrapInline.d.ts.map +1 -1
  443. package/dist/types/src/slate/{ListPlugin → BlockPlugin}/unwrapList.d.ts +1 -1
  444. package/dist/types/src/slate/BlockPlugin/unwrapList.d.ts.map +1 -0
  445. package/dist/types/src/slate/BlockPlugin/utils/filterForSubtreeRoots.d.ts.map +1 -0
  446. package/dist/types/src/slate/BlockPlugin/utils/getSelectedListItems.d.ts.map +1 -0
  447. package/dist/types/src/slate/BlockPlugin/utils/location.d.ts.map +1 -0
  448. package/dist/types/src/slate/BlockPlugin/wrapInline.d.ts +1 -1
  449. package/dist/types/src/slate/BlockPlugin/wrapInline.d.ts.map +1 -1
  450. package/dist/types/src/slate/{ListPlugin → BlockPlugin}/wrapList.d.ts +2 -2
  451. package/dist/types/src/slate/BlockPlugin/wrapList.d.ts.map +1 -0
  452. package/dist/types/src/slate/BuilderPlugin/index.d.ts +1 -1
  453. package/dist/types/src/slate/BuilderPlugin/index.d.ts.map +1 -1
  454. package/dist/types/src/slate/InlineModePlugin/index.d.ts +6 -2
  455. package/dist/types/src/slate/InlineModePlugin/index.d.ts.map +1 -1
  456. package/dist/types/src/slate/TypographyPlugin/clearActiveTypographyStyle.d.ts +1 -1
  457. package/dist/types/src/slate/TypographyPlugin/clearActiveTypographyStyle.d.ts.map +1 -1
  458. package/dist/types/src/slate/TypographyPlugin/clearDeviceActiveTypography.d.ts +1 -1
  459. package/dist/types/src/slate/TypographyPlugin/clearDeviceActiveTypography.d.ts.map +1 -1
  460. package/dist/types/src/slate/TypographyPlugin/detachActiveTypography.d.ts +2 -2
  461. package/dist/types/src/slate/TypographyPlugin/detachActiveTypography.d.ts.map +1 -1
  462. package/dist/types/src/slate/TypographyPlugin/index.d.ts +2 -2
  463. package/dist/types/src/slate/TypographyPlugin/index.d.ts.map +1 -1
  464. package/dist/types/src/slate/TypographyPlugin/setActiveTypographyId.d.ts +1 -1
  465. package/dist/types/src/slate/TypographyPlugin/setActiveTypographyId.d.ts.map +1 -1
  466. package/dist/types/src/slate/TypographyPlugin/setActiveTypographyStyle.d.ts +1 -1
  467. package/dist/types/src/slate/TypographyPlugin/setActiveTypographyStyle.d.ts.map +1 -1
  468. package/dist/types/src/slate/index.d.ts +1 -1
  469. package/dist/types/src/slate/index.d.ts.map +1 -1
  470. package/dist/types/src/slate/selectors.d.ts +1 -1
  471. package/dist/types/src/slate/selectors.d.ts.map +1 -1
  472. package/dist/types/{types/slate.d.ts → src/slate/types.d.ts} +42 -35
  473. package/dist/types/src/slate/types.d.ts.map +1 -0
  474. package/dist/types/src/slate/utils/editor.d.ts +1 -1
  475. package/dist/types/src/slate/utils/editor.d.ts.map +1 -1
  476. package/dist/types/src/slate/utils/element.d.ts +1 -2
  477. package/dist/types/src/slate/utils/element.d.ts.map +1 -1
  478. package/dist/types/src/state/actions.d.ts +66 -41
  479. package/dist/types/src/state/actions.d.ts.map +1 -1
  480. package/dist/types/src/state/makeswift-api-client.d.ts +5 -5
  481. package/dist/types/src/state/makeswift-api-client.d.ts.map +1 -1
  482. package/dist/types/src/state/modules/api-resources.d.ts +2 -2
  483. package/dist/types/src/state/modules/api-resources.d.ts.map +1 -1
  484. package/dist/types/src/state/modules/box-models.d.ts +2 -2
  485. package/dist/types/src/state/modules/box-models.d.ts.map +1 -1
  486. package/dist/types/src/state/modules/breakpoints.d.ts +9 -9
  487. package/dist/types/src/state/modules/breakpoints.d.ts.map +1 -1
  488. package/dist/types/src/state/modules/builder-edit-mode.d.ts +2 -2
  489. package/dist/types/src/state/modules/builder-edit-mode.d.ts.map +1 -1
  490. package/dist/types/src/state/modules/components-meta.d.ts +27 -3
  491. package/dist/types/src/state/modules/components-meta.d.ts.map +1 -1
  492. package/dist/types/src/state/modules/element-imperative-handles.d.ts +1 -1
  493. package/dist/types/src/state/modules/element-imperative-handles.d.ts.map +1 -1
  494. package/dist/types/src/state/modules/is-in-builder.d.ts +1 -1
  495. package/dist/types/src/state/modules/is-in-builder.d.ts.map +1 -1
  496. package/dist/types/src/state/modules/is-preview.d.ts +1 -1
  497. package/dist/types/src/state/modules/is-preview.d.ts.map +1 -1
  498. package/dist/types/src/state/modules/locales.d.ts +16 -0
  499. package/dist/types/src/state/modules/locales.d.ts.map +1 -0
  500. package/dist/types/src/state/modules/pointer.d.ts +2 -2
  501. package/dist/types/src/state/modules/pointer.d.ts.map +1 -1
  502. package/dist/types/src/state/modules/prop-controller-handles.d.ts +1 -1
  503. package/dist/types/src/state/modules/prop-controller-handles.d.ts.map +1 -1
  504. package/dist/types/src/state/modules/prop-controllers.d.ts +1 -1
  505. package/dist/types/src/state/modules/prop-controllers.d.ts.map +1 -1
  506. package/dist/types/src/state/modules/react-components.d.ts +2 -2
  507. package/dist/types/src/state/modules/react-components.d.ts.map +1 -1
  508. package/dist/types/src/state/modules/read-only-documents.d.ts +7 -7
  509. package/dist/types/src/state/modules/read-only-documents.d.ts.map +1 -1
  510. package/dist/types/src/state/modules/read-write-documents.d.ts +1 -1
  511. package/dist/types/src/state/modules/read-write-documents.d.ts.map +1 -1
  512. package/dist/types/src/state/react-builder-preview.d.ts +7 -6
  513. package/dist/types/src/state/react-builder-preview.d.ts.map +1 -1
  514. package/dist/types/src/state/react-page.d.ts +15 -7
  515. package/dist/types/src/state/react-page.d.ts.map +1 -1
  516. package/dist/types/src/state/react-page.test.d.ts +3 -0
  517. package/dist/types/src/state/react-page.test.d.ts.map +1 -0
  518. package/dist/types/src/utils/isErrorWithMessage.d.ts +1 -1
  519. package/dist/types/src/utils/isErrorWithMessage.d.ts.map +1 -1
  520. package/package.json +8 -4
  521. package/dist/descriptors.cjs.js.map +0 -1
  522. package/dist/descriptors.es.js.map +0 -1
  523. package/dist/element.cjs.js +0 -55
  524. package/dist/element.cjs.js.map +0 -1
  525. package/dist/element.es.js +0 -54
  526. package/dist/element.es.js.map +0 -1
  527. package/dist/introspection.cjs.js +0 -329
  528. package/dist/introspection.cjs.js.map +0 -1
  529. package/dist/introspection.es.js +0 -315
  530. package/dist/introspection.es.js.map +0 -1
  531. package/dist/slate.cjs2.js +0 -46
  532. package/dist/slate.cjs2.js.map +0 -1
  533. package/dist/slate.es2.js +0 -44
  534. package/dist/slate.es2.js.map +0 -1
  535. package/dist/types/src/slate/ListPlugin/constants.d.ts.map +0 -1
  536. package/dist/types/src/slate/ListPlugin/dedent.d.ts.map +0 -1
  537. package/dist/types/src/slate/ListPlugin/indent.d.ts.map +0 -1
  538. package/dist/types/src/slate/ListPlugin/index.d.ts +0 -17
  539. package/dist/types/src/slate/ListPlugin/index.d.ts.map +0 -1
  540. package/dist/types/src/slate/ListPlugin/toggleList.d.ts.map +0 -1
  541. package/dist/types/src/slate/ListPlugin/unwrapList.d.ts.map +0 -1
  542. package/dist/types/src/slate/ListPlugin/utils/filterForSubtreeRoots.d.ts.map +0 -1
  543. package/dist/types/src/slate/ListPlugin/utils/getSelectedListItems.d.ts.map +0 -1
  544. package/dist/types/src/slate/ListPlugin/utils/location.d.ts.map +0 -1
  545. package/dist/types/src/slate/ListPlugin/wrapList.d.ts.map +0 -1
  546. package/dist/types/types/slate.d.ts.map +0 -1
  547. /package/dist/types/src/slate/{ListPlugin → BlockPlugin}/constants.d.ts +0 -0
  548. /package/dist/types/src/slate/{ListPlugin → BlockPlugin}/dedent.d.ts +0 -0
  549. /package/dist/types/src/slate/{ListPlugin → BlockPlugin}/indent.d.ts +0 -0
  550. /package/dist/types/src/slate/{ListPlugin → BlockPlugin}/utils/filterForSubtreeRoots.d.ts +0 -0
  551. /package/dist/types/src/slate/{ListPlugin → BlockPlugin}/utils/getSelectedListItems.d.ts +0 -0
  552. /package/dist/types/src/slate/{ListPlugin → BlockPlugin}/utils/location.d.ts +0 -0
package/dist/index.es.js CHANGED
@@ -34,32 +34,34 @@ var __publicField = (obj, key, value) => {
34
34
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
35
35
  return value;
36
36
  };
37
- var _c;
37
+ var _e;
38
38
  import * as React from "react";
39
39
  import { useEffect, createContext, useContext, useState, useMemo, useRef, Children, createElement, forwardRef, memo, useId, useCallback, useImperativeHandle, Component, Suspense } from "react";
40
40
  import { useSyncExternalStoreWithSelector } from "use-sync-external-store/shim/with-selector";
41
41
  import dynamic from "next/dynamic";
42
- import { a as createDocumentReference, g as getPropControllerDescriptors, i as isElementReference, M as MakeswiftComponentType, b as isPropControllersHandle, d as getComponentPropControllerDescriptors, e as getPropControllers, f as configureStore$1, h as copyElementTree, j as getBreakpoints, k as getDocument, l as getElementId, m as getIsPreview, n as getIsInBuilder, o as getReactComponent, p as getBuilderEditMode } from "./constants.es.js";
43
- import { A as ActionTypes, k as apiResourceFulfilled, l as registerComponentEffect, n as registerReactComponentEffect, o as registerComponentHandleEffect, p as mountComponentEffect } from "./actions.es.js";
42
+ import { a as createDocumentReference, g as getPropControllerDescriptors, b as isElementReference, e as getElementSwatchIds, f as getFileIds, h as getTypographyIds, j as getTableIds, k as getPageIds, l as getElementChildren, S as ShapeControlType, L as ListControlType, m as Types, E as ElementID, B as Backgrounds, W as Width, n as ResponsiveIconRadioGroup, M as Margin, P as Padding, o as Border, p as BorderRadius, q as Shadows, G as GapY, r as GapX, s as ResponsiveSelect, t as ResponsiveNumber, u as Checkbox, v as Grid, w as TextInput, x 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 getBorderSwatchIds, _ as isNonNullable, $ as getBoxShadowsSwatchIds, a0 as getResponsiveColorSwatchIds, a1 as StyleControlProperty, a2 as ImageControlValueFormat, a3 as isPropControllersHandle, a4 as StyleControlType, a5 as RichTextV2ControlType, a6 as RichTextControlType, a7 as SlotControlType, a8 as LinkControlType, a9 as ImageControlType, aa as ColorControlType, ab as SelectControlType, ac as getComponentPropControllerDescriptors, ad as getPropControllers, ae as BorderPropControllerFormat, af as ShadowsPropControllerFormat, ag as BorderRadiusPropControllerFormat, ah as MarginPropControllerFormat, ai as PaddingPropControllerFormat, aj as WidthPropControllerFormat, ak as configureStore$1, al as copyElementTree, am as getBreakpoints, an as getDocument, ao as getElementId, ap as getIsPreview, aq as getIsInBuilder, ar as getReactComponent, as as getBuilderEditMode } from "./react-page.es.js";
43
+ import { A as ActionTypes, n as apiResourceFulfilled, o as registerComponentEffect, p as registerReactComponentEffect, q as registerComponentHandleEffect, t as mountComponentEffect } from "./actions.es.js";
44
44
  import { cache, cx } from "@emotion/css";
45
45
  import { serializeStyles } from "@emotion/serialize";
46
46
  import { registerStyles, insertStyles } from "@emotion/utils";
47
47
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
48
- import { S as ShapeControlType, L as ListControlType, T as Types, E as ElementID, B as Backgrounds, W as Width, f as ResponsiveIconRadioGroup, M as Margin, P as Padding, g as Border, h as BorderRadius, i as Shadows, G as GapY, j as GapX, k as ResponsiveSelect, l as ResponsiveNumber, m as Checkbox, n as Grid, o as TextInput, p as Link, q as ResponsiveColor, s as TextStyle, t as Images, N as Number$1, D as Date$1, F as Font, u as ResponsiveLength, v as TextArea, w as Table, x as TableFormFields, y as Image, z as ResponsiveOpacity, A as NavigationLinks, H as SocialLinks, J as RichText, V as Video, K as StyleControlProperty, O as ImageControlValueFormat, Q as StyleControlType, U as RichTextV2ControlType, X as RichTextControlType, b as SlotControlType, Y as LinkControlType, I as ImageControlType, C as ColorControlType, Z as BorderPropControllerFormat, _ as ShadowsPropControllerFormat, $ as BorderRadiusPropControllerFormat, a0 as MarginPropControllerFormat, a1 as PaddingPropControllerFormat, a2 as WidthPropControllerFormat } from "./descriptors.es.js";
49
- import { S as SelectControlType, T as TextAreaControlType, a as TextInputControlType, N as NumberControlType, C as CheckboxControlType } from "./text-input.es.js";
48
+ import { T as TextAreaControlType, a as TextInputControlType, N as NumberControlType, C as CheckboxControlType } from "./text-input.es.js";
50
49
  import { C as ComboboxControlType } from "./combobox.es.js";
50
+ import "slate";
51
+ import { getBaseBreakpoint, findBreakpointOverride, DefaultBreakpointID, join, getBreakpoint, getBreakpointMediaQuery, parseBreakpointsInput } from "./state/breakpoints.es.js";
52
+ import "is-hotkey";
53
+ import "slate-react";
51
54
  import { useSyncExternalStore } from "use-sync-external-store/shim";
52
55
  import { createStore, applyMiddleware } from "redux";
53
56
  import thunk from "redux-thunk";
54
57
  import { A as APIResourceType } from "./types.es.js";
55
- import { b as getElementSwatchIds, c as getFileIds, d as getTypographyIds, e as getTableIds, f as getPageIds, a as getElementChildren, h as getBorderSwatchIds, j as isNonNullable, k as getBoxShadowsSwatchIds, l as getResponsiveColorSwatchIds } from "./introspection.es.js";
56
- import { getBaseBreakpoint, findBreakpointOverride, DefaultBreakpointID, join, getBreakpoint, getBreakpointMediaQuery, parseBreakpointsInput } from "./state/breakpoints.es.js";
57
58
  import { g as getBox, i as isMeasurable, m as measure } from "./box-models.es.js";
58
59
  import ColorHelper from "color";
59
60
  import scrollIntoView from "scroll-into-view-if-needed";
60
61
  import { findDOMNode } from "react-dom";
61
62
  import parse from "html-react-parser";
62
63
  import Head from "next/head";
64
+ import { z } from "zod";
63
65
  import createEmotionServer from "@emotion/server/create-instance";
64
66
  import NextDocument, { Html, Head as Head$1, Main, NextScript } from "next/document";
65
67
  import Cors from "cors";
@@ -67,8 +69,46 @@ import { match } from "path-to-regexp";
67
69
  import { serialize } from "cookie";
68
70
  import { createProxyServer } from "http-proxy";
69
71
  import { parse as parse$1 } from "set-cookie-parser";
72
+ import { M as MakeswiftComponentType } from "./constants.es.js";
70
73
  import { v4 } from "uuid";
71
74
  import ipsum from "corporate-ipsum";
75
+ function is(x, y) {
76
+ if (x === y)
77
+ return x !== 0 || y !== 0 || 1 / x === 1 / y;
78
+ return x !== x && y !== y;
79
+ }
80
+ const { hasOwnProperty: hasOwnProperty$1 } = Object.prototype;
81
+ const shallowEqual = (a, b) => {
82
+ if (is(a, b))
83
+ return true;
84
+ if (typeof a !== "object" || a === null || typeof b !== "object" || b === null)
85
+ return false;
86
+ const keysA = Object.keys(a);
87
+ const keysB = Object.keys(b);
88
+ if (keysA.length !== keysB.length)
89
+ return false;
90
+ for (let i = 0; i < keysA.length; i += 1) {
91
+ if (!hasOwnProperty$1.call(b, keysA[i]) || !is(a[keysA[i]], b[keysA[i]]))
92
+ return false;
93
+ }
94
+ return true;
95
+ };
96
+ const { hasOwnProperty } = Object.prototype;
97
+ const deepEqual = (a, b) => {
98
+ if (shallowEqual(a, b))
99
+ return true;
100
+ if (typeof a !== "object" || a === null || typeof b !== "object" || b === null)
101
+ return false;
102
+ const keysA = Object.keys(a);
103
+ const keysB = Object.keys(b);
104
+ if (keysA.length !== keysB.length)
105
+ return false;
106
+ for (let i = 0; i < keysA.length; i += 1) {
107
+ if (!hasOwnProperty.call(b, keysA[i]) || !deepEqual(a[keysA[i]], b[keysA[i]]))
108
+ return false;
109
+ }
110
+ return true;
111
+ };
72
112
  const SCRIPT_TAG = "script";
73
113
  function BodySnippet({
74
114
  code,
@@ -113,43 +153,6 @@ function BodySnippet({
113
153
  }, [code, cleanup]);
114
154
  return null;
115
155
  }
116
- function is(x, y) {
117
- if (x === y)
118
- return x !== 0 || y !== 0 || 1 / x === 1 / y;
119
- return x !== x && y !== y;
120
- }
121
- const { hasOwnProperty: hasOwnProperty$1 } = Object.prototype;
122
- const shallowEqual = (a, b) => {
123
- if (is(a, b))
124
- return true;
125
- if (typeof a !== "object" || a === null || typeof b !== "object" || b === null)
126
- return false;
127
- const keysA = Object.keys(a);
128
- const keysB = Object.keys(b);
129
- if (keysA.length !== keysB.length)
130
- return false;
131
- for (let i = 0; i < keysA.length; i += 1) {
132
- if (!hasOwnProperty$1.call(b, keysA[i]) || !is(a[keysA[i]], b[keysA[i]]))
133
- return false;
134
- }
135
- return true;
136
- };
137
- const { hasOwnProperty } = Object.prototype;
138
- const deepEqual = (a, b) => {
139
- if (shallowEqual(a, b))
140
- return true;
141
- if (typeof a !== "object" || a === null || typeof b !== "object" || b === null)
142
- return false;
143
- const keysA = Object.keys(a);
144
- const keysB = Object.keys(b);
145
- if (keysA.length !== keysB.length)
146
- return false;
147
- for (let i = 0; i < keysA.length; i += 1) {
148
- if (!hasOwnProperty.call(b, keysA[i]) || !deepEqual(a[keysA[i]], b[keysA[i]]))
149
- return false;
150
- }
151
- return true;
152
- };
153
156
  function getInitialState(serializedState = {
154
157
  Swatch: [],
155
158
  File: [],
@@ -278,15 +281,6 @@ class GraphQLClient {
278
281
  return body.data;
279
282
  }
280
283
  }
281
- const SwatchFragment = `
282
- fragment Swatch on Swatch {
283
- __typename
284
- id
285
- hue
286
- saturation
287
- lightness
288
- }
289
- `;
290
284
  const FileFragment = `
291
285
  fragment File on File {
292
286
  __typename
@@ -370,16 +364,7 @@ const TableFragment = `
370
364
  }
371
365
  `;
372
366
  const IntrospectedResourcesQuery = `
373
- query IntrospectedResources(
374
- $swatchIds: [ID!]!
375
- $fileIds: [ID!]!
376
- $pageIds: [ID!]!
377
- $tableIds: [ID!]!
378
- ) {
379
- swatches(ids: $swatchIds) {
380
- ...Swatch
381
- }
382
-
367
+ query IntrospectedResources($fileIds: [ID!]!, $pageIds: [ID!]!, $tableIds: [ID!]!) {
383
368
  files(ids: $fileIds) {
384
369
  ...File
385
370
  }
@@ -393,20 +378,10 @@ const IntrospectedResourcesQuery = `
393
378
  }
394
379
  }
395
380
 
396
- ${SwatchFragment}
397
381
  ${FileFragment}
398
382
  ${PagePathnameSliceFragment}
399
383
  ${TableFragment}
400
384
  `;
401
- const SwatchQuery = `
402
- query Swatch($swatchId: ID!) {
403
- swatch(id: $swatchId) {
404
- ...Swatch
405
- }
406
- }
407
-
408
- ${SwatchFragment}
409
- `;
410
385
  const FileQuery = `
411
386
  query File($fileId: ID!) {
412
387
  file(id: $fileId) {
@@ -755,12 +730,120 @@ function useCachedSite(siteId) {
755
730
  const site = useSyncExternalStore(client.subscribe, getSnapshot, getSnapshot);
756
731
  return site;
757
732
  }
733
+ const makeswiftSiteVersionSchema = z.enum(["Live", "Working"]);
734
+ const MakeswiftSiteVersion = makeswiftSiteVersionSchema.Enum;
735
+ const makeswiftPreviewDataSchema = z.object({
736
+ makeswift: z.literal(true),
737
+ unstable_siteVersion: makeswiftSiteVersionSchema
738
+ });
739
+ function getMakeswiftSiteVersion(previewData) {
740
+ const result = makeswiftPreviewDataSchema.safeParse(previewData);
741
+ if (result.success)
742
+ return result.data.unstable_siteVersion;
743
+ return null;
744
+ }
745
+ function PreviewModeScript({
746
+ isPreview = false,
747
+ appOrigin = "https://app.makeswift.com"
748
+ }) {
749
+ const previewModeScript = `
750
+ const isPreview = ${isPreview}
751
+ const appOrigin = '${appOrigin.replace("'", "\\'")}'
752
+ const searchParamName = 'x-makeswift-preview-mode'
753
+ const headerName = 'X-Makeswift-Preview-Mode'
754
+ const originalUrl = new URL(window.location.href)
755
+
756
+ if (window.parent !== window) {
757
+ window.addEventListener('message', event => {
758
+ if (event.origin === appOrigin && event.data.type === 'makeswift_preview_mode') {
759
+ const { secret } = event.data
760
+
761
+ if (!isPreview && !originalUrl.searchParams.has(searchParamName)) {
762
+ const url = new URL(originalUrl)
763
+
764
+ url.searchParams.set(searchParamName, secret)
765
+
766
+ window.location.replace(url)
767
+ } else {
768
+ const originalFetch = window.fetch
769
+
770
+ window.fetch = function patchedFetch(resource, options) {
771
+ const request = new Request(resource, options)
772
+
773
+ if (new URL(request.url).origin !== window.location.origin) {
774
+ return originalFetch.call(this, resource, options)
775
+ }
776
+
777
+ return originalFetch.call(
778
+ this,
779
+ new Request(request, { headers: { [headerName]: secret } }),
780
+ )
781
+ }
782
+ }
783
+ }
784
+ })
785
+
786
+ window.parent.postMessage({ type: 'makeswift_preview_mode' }, appOrigin)
787
+ }
788
+
789
+ if (originalUrl.searchParams.has(searchParamName)) {
790
+ const url = new URL(originalUrl)
791
+
792
+ url.searchParams.delete(searchParamName)
793
+
794
+ window.history.replaceState(null, '', url)
795
+ }
796
+ `;
797
+ const makeswiftConnectionCheckScript = `
798
+ const appOrigin = '${appOrigin.replace("'", "\\'")}'
799
+
800
+ if (window.parent !== window) {
801
+ window.addEventListener('message', event => {
802
+ if (
803
+ event.origin === appOrigin &&
804
+ event.data.type === '${ActionTypes.MAKESWIFT_CONNECTION_INIT}'
805
+ ) {
806
+ setInterval(() => {
807
+ window.parent.postMessage({
808
+ type: '${ActionTypes.MAKESWIFT_CONNECTION_CHECK}',
809
+ payload: {
810
+ currentUrl: window.location.href
811
+ }
812
+ }, appOrigin)
813
+ }, 20)
814
+ }
815
+ })
816
+
817
+ window.parent.postMessage({ type: '${ActionTypes.MAKESWIFT_CONNECTION_INIT}' }, appOrigin)
818
+ }
819
+ `;
820
+ return /* @__PURE__ */ jsxs(Fragment, {
821
+ children: [/* @__PURE__ */ jsx("script", {
822
+ id: "makeswift-preview-mode",
823
+ type: "module",
824
+ dangerouslySetInnerHTML: {
825
+ __html: previewModeScript
826
+ }
827
+ }), /* @__PURE__ */ jsx("script", {
828
+ id: "makeswift-connection-check",
829
+ type: "module",
830
+ dangerouslySetInnerHTML: {
831
+ __html: makeswiftConnectionCheckScript
832
+ }
833
+ })]
834
+ });
835
+ }
758
836
  class Makeswift {
759
- constructor(apiKey, { apiOrigin = "https://api.makeswift.com", runtime } = {}) {
837
+ constructor(apiKey, {
838
+ apiOrigin = "https://api.makeswift.com",
839
+ runtime = ReactRuntime,
840
+ unstable_previewData
841
+ } = {}) {
760
842
  __publicField(this, "apiKey");
761
843
  __publicField(this, "apiOrigin");
762
844
  __publicField(this, "graphqlClient");
763
845
  __publicField(this, "runtime");
846
+ __publicField(this, "siteVersion");
764
847
  if (typeof apiKey !== "string") {
765
848
  throw new Error(`The Makeswift client must be passed a valid Makeswift site API key: \`new Makeswift('<makeswift_site_api_key>')\`
766
849
  Received "${apiKey}" instead.`);
@@ -773,17 +856,27 @@ Received "${apiKey}" instead.`);
773
856
  }
774
857
  this.graphqlClient = new GraphQLClient(new URL("graphql", apiOrigin).href);
775
858
  this.runtime = runtime;
859
+ this.siteVersion = getMakeswiftSiteVersion(unstable_previewData);
776
860
  }
777
861
  async fetch(path, init) {
862
+ var _a;
778
863
  const response = await fetch(new URL(path, this.apiOrigin).toString(), __spreadProps(__spreadValues({}, init), {
779
- headers: __spreadProps(__spreadValues({}, init == null ? void 0 : init.headers), { ["X-API-Key"]: this.apiKey })
864
+ headers: __spreadValues({
865
+ ["X-API-Key"]: this.apiKey,
866
+ "Makeswift-Site-API-Key": this.apiKey,
867
+ "Makeswift-Site-Version": (_a = this.siteVersion) != null ? _a : MakeswiftSiteVersion.Live
868
+ }, init == null ? void 0 : init.headers)
780
869
  }));
781
870
  return response;
782
871
  }
783
- async getPages(params = {}) {
784
- const searchParams = new URLSearchParams(params);
785
- const response = await this.fetch(`/v1/pages?${searchParams}`);
872
+ async getPages() {
873
+ const response = await this.fetch(`/v2/pages`, {
874
+ headers: {
875
+ "Makeswift-Site-Version": MakeswiftSiteVersion.Live
876
+ }
877
+ });
786
878
  if (!response.ok) {
879
+ console.error("Failed to get pages", await response.json());
787
880
  throw new Error(`Failed to get pages with error: "${response.statusText}"`);
788
881
  }
789
882
  const json = await response.json();
@@ -793,13 +886,35 @@ Received "${apiKey}" instead.`);
793
886
  const result = await this.graphqlClient.request(TypographiesQuery, { typographyIds });
794
887
  return result.typographies;
795
888
  }
796
- async getIntrospectedResources(introspectedResourceIds) {
889
+ async getSwatches(ids, preview) {
890
+ var _a;
891
+ const url = new URL(`v1/swatches/bulk`, this.apiOrigin);
892
+ ids.forEach((id) => {
893
+ url.searchParams.append("ids", id);
894
+ });
895
+ const response = await this.fetch(url.pathname + url.search, {
896
+ headers: {
897
+ "Makeswift-Site-Version": (_a = this.siteVersion) != null ? _a : preview ? MakeswiftSiteVersion.Working : MakeswiftSiteVersion.Live
898
+ }
899
+ });
900
+ if (!response.ok) {
901
+ console.error("Failed to get swatches", await response.json());
902
+ return [];
903
+ }
904
+ return await response.json();
905
+ }
906
+ async getIntrospectedResources(_a, preview) {
907
+ var _b = _a, {
908
+ swatchIds
909
+ } = _b, introspectedResourceIds = __objRest(_b, [
910
+ "swatchIds"
911
+ ]);
797
912
  const result = await this.graphqlClient.request(IntrospectedResourcesQuery, introspectedResourceIds);
798
- return result;
913
+ const swatches = await this.getSwatches(swatchIds, preview);
914
+ return __spreadProps(__spreadValues({}, result), { swatches });
799
915
  }
800
- async introspect(element) {
801
- var _a;
802
- const runtime = (_a = this.runtime) != null ? _a : ReactRuntime;
916
+ async introspect(element, preview) {
917
+ const runtime = this.runtime;
803
918
  const descriptors = getPropControllerDescriptors(runtime.store.getState());
804
919
  const swatchIds = /* @__PURE__ */ new Set();
805
920
  const fileIds = /* @__PURE__ */ new Set();
@@ -875,8 +990,8 @@ Received "${apiKey}" instead.`);
875
990
  const typographies = await this.getTypographies([...typographyIds]);
876
991
  typographies.forEach((typography) => {
877
992
  typography == null ? void 0 : typography.style.forEach((style) => {
878
- var _a2;
879
- const swatchId = (_a2 = style.value.color) == null ? void 0 : _a2.swatchId;
993
+ var _a;
994
+ const swatchId = (_a = style.value.color) == null ? void 0 : _a.swatchId;
880
995
  if (swatchId != null)
881
996
  swatchIds.add(swatchId);
882
997
  });
@@ -886,44 +1001,44 @@ Received "${apiKey}" instead.`);
886
1001
  fileIds: [...fileIds],
887
1002
  tableIds: [...tableIds],
888
1003
  pageIds: [...pageIds]
889
- });
1004
+ }, preview);
890
1005
  const pagePathnameSlices = pagePathnamesById.map((pagePathnameSlice) => pagePathnameSlice && __spreadProps(__spreadValues({}, pagePathnameSlice), {
891
1006
  id: Buffer.from(`Page:${pagePathnameSlice.id}`).toString("base64")
892
1007
  }));
893
1008
  return {
894
1009
  [APIResourceType.Swatch]: [...swatchIds].map((id) => {
895
- var _a2;
1010
+ var _a;
896
1011
  return {
897
1012
  id,
898
- value: (_a2 = swatches.find((swatch) => (swatch == null ? void 0 : swatch.id) === id)) != null ? _a2 : null
1013
+ value: (_a = swatches.find((swatch) => (swatch == null ? void 0 : swatch.id) === id)) != null ? _a : null
899
1014
  };
900
1015
  }),
901
1016
  [APIResourceType.File]: [...fileIds].map((id) => {
902
- var _a2;
1017
+ var _a;
903
1018
  return {
904
1019
  id,
905
- value: (_a2 = files.find((file) => (file == null ? void 0 : file.id) === id)) != null ? _a2 : null
1020
+ value: (_a = files.find((file) => (file == null ? void 0 : file.id) === id)) != null ? _a : null
906
1021
  };
907
1022
  }),
908
1023
  [APIResourceType.Typography]: [...typographyIds].map((id) => {
909
- var _a2;
1024
+ var _a;
910
1025
  return {
911
1026
  id,
912
- value: (_a2 = typographies.find((typography) => (typography == null ? void 0 : typography.id) === id)) != null ? _a2 : null
1027
+ value: (_a = typographies.find((typography) => (typography == null ? void 0 : typography.id) === id)) != null ? _a : null
913
1028
  };
914
1029
  }),
915
1030
  [APIResourceType.Table]: [...tableIds].map((id) => {
916
- var _a2;
1031
+ var _a;
917
1032
  return {
918
1033
  id,
919
- value: (_a2 = tables.find((table) => (table == null ? void 0 : table.id) === id)) != null ? _a2 : null
1034
+ value: (_a = tables.find((table) => (table == null ? void 0 : table.id) === id)) != null ? _a : null
920
1035
  };
921
1036
  }),
922
1037
  [APIResourceType.PagePathnameSlice]: [...pageIds].map((id) => {
923
- var _a2;
1038
+ var _a;
924
1039
  return {
925
1040
  id,
926
- value: (_a2 = pagePathnameSlices.find((pagePathnameSlice) => (pagePathnameSlice == null ? void 0 : pagePathnameSlice.id) === id)) != null ? _a2 : null
1041
+ value: (_a = pagePathnameSlices.find((pagePathnameSlice) => (pagePathnameSlice == null ? void 0 : pagePathnameSlice.id) === id)) != null ? _a : null
927
1042
  };
928
1043
  }),
929
1044
  [APIResourceType.GlobalElement]: [...globalElements.entries()].map(([id, value]) => ({
@@ -932,31 +1047,33 @@ Received "${apiKey}" instead.`);
932
1047
  }))
933
1048
  };
934
1049
  }
935
- async createSnapshot(document2, preview) {
936
- const cacheData = await this.introspect(document2.data);
937
- return { document: document2, apiOrigin: this.apiOrigin.href, cacheData, preview };
938
- }
939
- async getPageSnapshotByPageId(pageId, { preview = false } = {}) {
940
- const searchParams = new URLSearchParams({ preview: String(preview) });
941
- const response = await this.fetch(`/v1/pages/${pageId}/document?${searchParams}`);
1050
+ async getPageSnapshot(pathname, { preview: previewOverride = false } = {}) {
1051
+ var _a;
1052
+ const siteVersion = (_a = this.siteVersion) != null ? _a : previewOverride ? MakeswiftSiteVersion.Working : MakeswiftSiteVersion.Live;
1053
+ const response = await this.fetch(`/v2/pages/${encodeURIComponent(pathname)}/document`, {
1054
+ headers: { "Makeswift-Site-Version": siteVersion }
1055
+ });
942
1056
  if (!response.ok) {
943
1057
  if (response.status === 404)
944
1058
  return null;
945
- throw new Error(`Failed to get snapshot with error: "${response.statusText}"`);
1059
+ console.error("Failed to get page snapshot", await response.json());
1060
+ throw new Error(`Failed to get page snapshot with error: "${response.statusText}"`);
946
1061
  }
947
1062
  const document2 = await response.json();
948
- return await this.createSnapshot(document2, preview);
949
- }
950
- async getPageSnapshot(path, { preview } = {}) {
951
- const [page] = await this.getPages({ path });
952
- if (page == null)
953
- return null;
954
- const snapshot = this.getPageSnapshotByPageId(page.id, { preview });
955
- return snapshot;
1063
+ const cacheData = await this.introspect(document2.data, previewOverride);
1064
+ const apiOrigin = this.apiOrigin.href;
1065
+ const preview = siteVersion === MakeswiftSiteVersion.Working;
1066
+ return { document: document2, cacheData, apiOrigin, preview };
956
1067
  }
957
1068
  async getSwatch(swatchId) {
958
- const result = await this.graphqlClient.request(SwatchQuery, { swatchId });
959
- return result.swatch;
1069
+ const response = await this.fetch(`v1/swatches/${swatchId}`);
1070
+ if (!response.ok) {
1071
+ if (response.status !== 404)
1072
+ console.error("Failed to get swatch", await response.json());
1073
+ return null;
1074
+ }
1075
+ const swatch = await response.json();
1076
+ return swatch;
960
1077
  }
961
1078
  async getFile(fileId) {
962
1079
  const result = await this.graphqlClient.request(FileQuery, { fileId });
@@ -980,97 +1097,6 @@ Received "${apiKey}" instead.`);
980
1097
  return result.table;
981
1098
  }
982
1099
  }
983
- function PreviewModeScript({
984
- isPreview = false,
985
- appOrigin = "https://app.makeswift.com"
986
- }) {
987
- const previewModeScript = `
988
- const isPreview = ${isPreview}
989
- const appOrigin = '${appOrigin.replace("'", "\\'")}'
990
- const searchParamName = 'x-makeswift-preview-mode'
991
- const headerName = 'X-Makeswift-Preview-Mode'
992
- const originalUrl = new URL(window.location.href)
993
-
994
- if (window.parent !== window) {
995
- window.addEventListener('message', event => {
996
- if (event.origin === appOrigin && event.data.type === 'makeswift_preview_mode') {
997
- const { secret } = event.data
998
-
999
- if (!isPreview && !originalUrl.searchParams.has(searchParamName)) {
1000
- const url = new URL(originalUrl)
1001
-
1002
- url.searchParams.set(searchParamName, secret)
1003
-
1004
- window.location.replace(url)
1005
- } else {
1006
- const originalFetch = window.fetch
1007
-
1008
- window.fetch = function patchedFetch(resource, options) {
1009
- const request = new Request(resource, options)
1010
-
1011
- if (new URL(request.url).origin !== window.location.origin) {
1012
- return originalFetch.call(this, resource, options)
1013
- }
1014
-
1015
- return originalFetch.call(
1016
- this,
1017
- new Request(request, { headers: { [headerName]: secret } }),
1018
- )
1019
- }
1020
- }
1021
- }
1022
- })
1023
-
1024
- window.parent.postMessage({ type: 'makeswift_preview_mode' }, appOrigin)
1025
- }
1026
-
1027
- if (originalUrl.searchParams.has(searchParamName)) {
1028
- const url = new URL(originalUrl)
1029
-
1030
- url.searchParams.delete(searchParamName)
1031
-
1032
- window.history.replaceState(null, '', url)
1033
- }
1034
- `;
1035
- const makeswiftConnectionCheckScript = `
1036
- const appOrigin = '${appOrigin.replace("'", "\\'")}'
1037
-
1038
- if (window.parent !== window) {
1039
- window.addEventListener('message', event => {
1040
- if (
1041
- event.origin === appOrigin &&
1042
- event.data.type === '${ActionTypes.MAKESWIFT_CONNECTION_INIT}'
1043
- ) {
1044
- setInterval(() => {
1045
- window.parent.postMessage({
1046
- type: '${ActionTypes.MAKESWIFT_CONNECTION_CHECK}',
1047
- payload: {
1048
- currentUrl: window.location.href
1049
- }
1050
- }, appOrigin)
1051
- }, 20)
1052
- }
1053
- })
1054
-
1055
- window.parent.postMessage({ type: '${ActionTypes.MAKESWIFT_CONNECTION_INIT}' }, appOrigin)
1056
- }
1057
- `;
1058
- return /* @__PURE__ */ jsxs(Fragment, {
1059
- children: [/* @__PURE__ */ jsx("script", {
1060
- id: "makeswift-preview-mode",
1061
- type: "module",
1062
- dangerouslySetInnerHTML: {
1063
- __html: previewModeScript
1064
- }
1065
- }), /* @__PURE__ */ jsx("script", {
1066
- id: "makeswift-connection-check",
1067
- type: "module",
1068
- dangerouslySetInnerHTML: {
1069
- __html: makeswiftConnectionCheckScript
1070
- }
1071
- })]
1072
- });
1073
- }
1074
1100
  class Document$1 extends NextDocument {
1075
1101
  static async getInitialProps(ctx) {
1076
1102
  const initialProps = await NextDocument.getInitialProps(ctx);
@@ -1125,8 +1151,8 @@ async function fonts(_req, res, { getFonts } = {}) {
1125
1151
  const fonts2 = (_a = await (getFonts == null ? void 0 : getFonts())) != null ? _a : [];
1126
1152
  return res.json(fonts2);
1127
1153
  }
1128
- const version = "0.8.10";
1129
- async function handler(req, res, { apiKey }) {
1154
+ const version = "0.9.0";
1155
+ async function handler(req, res, { apiKey, unstable_siteVersions }) {
1130
1156
  if (req.query.secret !== apiKey) {
1131
1157
  return res.status(401).json({ message: "Unauthorized" });
1132
1158
  }
@@ -1136,7 +1162,8 @@ async function handler(req, res, { apiKey }) {
1136
1162
  interactionMode: true,
1137
1163
  clientSideNavigation: true,
1138
1164
  elementFromPoint: false,
1139
- customBreakpoints: true
1165
+ customBreakpoints: true,
1166
+ unstable_siteVersions
1140
1167
  });
1141
1168
  }
1142
1169
  async function proxyPreviewMode(req, res, { apiKey }) {
@@ -1167,7 +1194,11 @@ async function proxyPreviewMode(req, res, { apiKey }) {
1167
1194
  const proto = isForwardedProtoHttps || isForwardedSSL ? "https" : "http";
1168
1195
  let target = `${proto}://${host}`;
1169
1196
  const secure = process.env["NODE_ENV"] === "production";
1170
- const setCookie = res.setPreviewData({ makeswift: true }).getHeader("Set-Cookie");
1197
+ const previewData = {
1198
+ makeswift: true,
1199
+ unstable_siteVersion: MakeswiftSiteVersion.Working
1200
+ };
1201
+ const setCookie = res.setPreviewData(previewData).getHeader("Set-Cookie");
1171
1202
  res.removeHeader("Set-Cookie");
1172
1203
  if (!Array.isArray(setCookie))
1173
1204
  return res.status(500).send("Internal Server Error");
@@ -1209,7 +1240,8 @@ Read more here: https://nextjs.org/blog/next-12-2#on-demand-incremental-static-r
1209
1240
  function MakeswiftApiHandler(apiKey, {
1210
1241
  appOrigin = "https://app.makeswift.com",
1211
1242
  apiOrigin = "https://api.makeswift.com",
1212
- getFonts
1243
+ getFonts,
1244
+ unstable_siteVersions = false
1213
1245
  } = {}) {
1214
1246
  const cors = Cors({ origin: appOrigin });
1215
1247
  if (typeof apiKey !== "string") {
@@ -1231,12 +1263,12 @@ Received "${apiKey}" instead.`);
1231
1263
  Received "${makeswift}" for the \`makeswift\` param instead.
1232
1264
  Read more about dynamic catch-all routes here: https://nextjs.org/docs/routing/dynamic-routes#catch-all-routes`);
1233
1265
  }
1234
- const client = new Makeswift(apiKey, { apiOrigin });
1266
+ const client = new Makeswift(apiKey, { apiOrigin, unstable_previewData: req.previewData });
1235
1267
  const action = "/" + makeswift.join("/");
1236
1268
  const matches = (pattern) => match(pattern, { decode: decodeURIComponent })(action);
1237
1269
  let m;
1238
1270
  if (matches("/manifest"))
1239
- return handler(req, res, { apiKey });
1271
+ return handler(req, res, { apiKey, unstable_siteVersions });
1240
1272
  if (matches("/revalidate"))
1241
1273
  return revalidate(req, res, { apiKey });
1242
1274
  if (matches("/proxy-preview-mode"))
@@ -1273,10 +1305,10 @@ function saveForwardedRef(props, ref) {
1273
1305
  [FORWARDED_NEXT_DYNAMIC_REF_KEY]: ref
1274
1306
  });
1275
1307
  }
1276
- function loadForwardedRef(_a) {
1277
- var _b = _a, {
1308
+ function loadForwardedRef(_c) {
1309
+ var _d = _c, {
1278
1310
  [FORWARDED_NEXT_DYNAMIC_REF_KEY]: ref
1279
- } = _b, props = __objRest(_b, [
1311
+ } = _d, props = __objRest(_d, [
1280
1312
  __restKey(FORWARDED_NEXT_DYNAMIC_REF_KEY)
1281
1313
  ]);
1282
1314
  return __spreadProps(__spreadValues({}, props), {
@@ -1339,14 +1371,15 @@ async function getStaticPaths() {
1339
1371
  }
1340
1372
  const REVALIDATE_SECONDS = 1;
1341
1373
  async function getStaticProps(ctx) {
1342
- var _a, _b, _c2;
1374
+ var _a, _b, _c;
1343
1375
  deprecationWarning("getStaticProps");
1344
1376
  const makeswift = new Makeswift(getApiKey(), {
1345
- apiOrigin: getApiOrigin()
1377
+ apiOrigin: getApiOrigin(),
1378
+ unstable_previewData: ctx.previewData
1346
1379
  });
1347
1380
  const path = "/" + ((_b = (_a = ctx.params) == null ? void 0 : _a.path) != null ? _b : []).join("/");
1348
1381
  const snapshot = await makeswift.getPageSnapshot(path, {
1349
- preview: ((_c2 = ctx.previewData) == null ? void 0 : _c2.makeswift) === true
1382
+ preview: ((_c = ctx.previewData) == null ? void 0 : _c.makeswift) === true
1350
1383
  });
1351
1384
  if (snapshot == null)
1352
1385
  return {
@@ -1364,7 +1397,8 @@ async function getServerSideProps(ctx) {
1364
1397
  var _a, _b;
1365
1398
  deprecationWarning("getServerSideProps");
1366
1399
  const makeswift = new Makeswift(getApiKey(), {
1367
- apiOrigin: getApiOrigin()
1400
+ apiOrigin: getApiOrigin(),
1401
+ unstable_previewData: ctx.previewData
1368
1402
  });
1369
1403
  const path = "/" + ((_b = (_a = ctx.params) == null ? void 0 : _a.path) != null ? _b : []).join("/");
1370
1404
  const snapshot = await makeswift.getPageSnapshot(path, {
@@ -1617,7 +1651,7 @@ function registerComponent$a(runtime) {
1617
1651
  return runtime.registerComponent(forwardNextDynamicRef((patch) => dynamic(() => patch(import("./Carousel.es.js")))), {
1618
1652
  type: MakeswiftComponentType.Carousel,
1619
1653
  label: "Carousel",
1620
- icon: "Carousel40",
1654
+ icon: ComponentIcon.Carousel,
1621
1655
  props: {
1622
1656
  id: ElementID(),
1623
1657
  images: Images({
@@ -1715,7 +1749,7 @@ function registerComponent$9(runtime) {
1715
1749
  return runtime.registerComponent(forwardNextDynamicRef((patch) => dynamic(() => patch(import("./Countdown.es.js")))), {
1716
1750
  type: MakeswiftComponentType.Countdown,
1717
1751
  label: "Countdown",
1718
- icon: "Countdown40",
1752
+ icon: ComponentIcon.Countdown,
1719
1753
  props: {
1720
1754
  id: ElementID(),
1721
1755
  date: Date$1(() => ({
@@ -1807,7 +1841,7 @@ function registerComponent$8(runtime) {
1807
1841
  return runtime.registerComponent(forwardNextDynamicRef((patch) => dynamic(() => patch(import("./Divider.es.js")))), {
1808
1842
  type: MakeswiftComponentType.Divider,
1809
1843
  label: "Divider",
1810
- icon: "Divider40",
1844
+ icon: ComponentIcon.Divider,
1811
1845
  props: {
1812
1846
  id: ElementID(),
1813
1847
  variant: ResponsiveSelect({
@@ -1839,7 +1873,7 @@ function registerComponent$7(runtime) {
1839
1873
  return runtime.registerComponent(forwardNextDynamicRef((patch) => dynamic(() => patch(import("./Embed.es.js")))), {
1840
1874
  type: MakeswiftComponentType.Embed,
1841
1875
  label: "Embed",
1842
- icon: "Code40",
1876
+ icon: ComponentIcon.Code,
1843
1877
  props: {
1844
1878
  id: ElementID(),
1845
1879
  html: TextArea({ label: "Code", rows: 20 }),
@@ -1876,7 +1910,7 @@ function registerComponent$6(runtime) {
1876
1910
  return runtime.registerComponent(forwardNextDynamicRef((patch) => dynamic(() => patch(import("./Form.es.js")))), {
1877
1911
  type: MakeswiftComponentType.Form,
1878
1912
  label: "Form",
1879
- icon: "Form40",
1913
+ icon: ComponentIcon.Form,
1880
1914
  props: {
1881
1915
  id: ElementID(),
1882
1916
  tableId: Table(),
@@ -2021,7 +2055,7 @@ function registerComponent$4(runtime) {
2021
2055
  return runtime.registerComponent(forwardNextDynamicRef((patch) => dynamic(() => patch(import("./Navigation.es.js")))), {
2022
2056
  type: MakeswiftComponentType.Navigation,
2023
2057
  label: "Navigation",
2024
- icon: "Navigation40",
2058
+ icon: ComponentIcon.Navigation,
2025
2059
  props: {
2026
2060
  id: ElementID(),
2027
2061
  links: NavigationLinks(),
@@ -2139,7 +2173,7 @@ function registerComponent$2(runtime) {
2139
2173
  return runtime.registerComponent(forwardNextDynamicRef((patch) => dynamic(() => patch(import("./SocialLinks.es.js")))), {
2140
2174
  type: MakeswiftComponentType.SocialLinks,
2141
2175
  label: "Social Links",
2142
- icon: "SocialLinks40",
2176
+ icon: ComponentIcon.SocialLinks,
2143
2177
  props: {
2144
2178
  id: ElementID(),
2145
2179
  links: SocialLinks({
@@ -2346,7 +2380,7 @@ function registerComponent(runtime) {
2346
2380
  return runtime.registerComponent(forwardNextDynamicRef((patch) => dynamic(() => patch(import("./Video.es.js")))), {
2347
2381
  type: MakeswiftComponentType.Video,
2348
2382
  label: "Video",
2349
- icon: "Video40",
2383
+ icon: ComponentIcon.Video,
2350
2384
  props: {
2351
2385
  id: ElementID(),
2352
2386
  video: Video({ preset: { controls: true } }),
@@ -2391,7 +2425,7 @@ function registerBuiltinComponents(runtime) {
2391
2425
  }
2392
2426
  const isServer = typeof window === "undefined";
2393
2427
  const useInsertionEffectSpecifier = "useInsertionEffect";
2394
- const useInsertionEffect = (_c = React[useInsertionEffectSpecifier]) != null ? _c : React.useLayoutEffect;
2428
+ const useInsertionEffect = (_e = React[useInsertionEffectSpecifier]) != null ? _e : React.useLayoutEffect;
2395
2429
  function useStyle(style) {
2396
2430
  const serialized = serializeStyles([style], cache.registered);
2397
2431
  registerStyles(cache, serialized, false);
@@ -2545,8 +2579,8 @@ function useTable(tableId) {
2545
2579
  }, [client, tableId]);
2546
2580
  return table;
2547
2581
  }
2548
- function mapSideColor(swatches, _d) {
2549
- var _e = _d, { color } = _e, restOfSide = __objRest(_e, ["color"]);
2582
+ function mapSideColor(swatches, _f) {
2583
+ var _g = _f, { color } = _g, restOfSide = __objRest(_g, ["color"]);
2550
2584
  return __spreadProps(__spreadValues({}, restOfSide), {
2551
2585
  color: color && {
2552
2586
  alpha: color.alpha,
@@ -2642,10 +2676,10 @@ function lengthDataToString(data) {
2642
2676
  return data;
2643
2677
  }
2644
2678
  function paddingPropertyDataToStyle(data, defaultValue = {}) {
2645
- var _a, _b, _c2, _d;
2679
+ var _a, _b, _c, _d;
2646
2680
  const paddingTop = (_a = data.paddingTop) != null ? _a : defaultValue.paddingTop;
2647
2681
  const paddingRight = (_b = data.paddingRight) != null ? _b : defaultValue.paddingRight;
2648
- const paddingBottom = (_c2 = data.paddingBottom) != null ? _c2 : defaultValue.paddingBottom;
2682
+ const paddingBottom = (_c = data.paddingBottom) != null ? _c : defaultValue.paddingBottom;
2649
2683
  const paddingLeft = (_d = data.paddingLeft) != null ? _d : defaultValue.paddingLeft;
2650
2684
  const style = {};
2651
2685
  if (paddingTop != null)
@@ -2659,10 +2693,10 @@ function paddingPropertyDataToStyle(data, defaultValue = {}) {
2659
2693
  return style;
2660
2694
  }
2661
2695
  function marginPropertyDataToStyle(data, defaultValue = {}) {
2662
- var _a, _b, _c2, _d;
2696
+ var _a, _b, _c, _d;
2663
2697
  const marginTop = (_a = data.marginTop) != null ? _a : defaultValue.marginTop;
2664
2698
  const marginRight = (_b = data.marginRight) != null ? _b : defaultValue.marginRight;
2665
- const marginBottom = (_c2 = data.marginBottom) != null ? _c2 : defaultValue.marginBottom;
2699
+ const marginBottom = (_c = data.marginBottom) != null ? _c : defaultValue.marginBottom;
2666
2700
  const marginLeft = (_d = data.marginLeft) != null ? _d : defaultValue.marginLeft;
2667
2701
  const style = {};
2668
2702
  if (marginTop != null)
@@ -2683,10 +2717,10 @@ function lengthPercentageDataToString(data) {
2683
2717
  return data;
2684
2718
  }
2685
2719
  function borderRadiusPropertyDataToStyle(data, defaultValue = {}) {
2686
- var _a, _b, _c2, _d;
2720
+ var _a, _b, _c, _d;
2687
2721
  const borderTopLeftRadius = (_a = data.borderTopLeftRadius) != null ? _a : defaultValue.borderTopLeftRadius;
2688
2722
  const borderTopRightRadius = (_b = data.borderTopRightRadius) != null ? _b : defaultValue.borderTopRightRadius;
2689
- const borderBottomRightRadius = (_c2 = data.borderBottomRightRadius) != null ? _c2 : defaultValue.borderBottomRightRadius;
2723
+ const borderBottomRightRadius = (_c = data.borderBottomRightRadius) != null ? _c : defaultValue.borderBottomRightRadius;
2690
2724
  const borderBottomLeftRadius = (_d = data.borderBottomLeftRadius) != null ? _d : defaultValue.borderBottomLeftRadius;
2691
2725
  const style = {};
2692
2726
  if (borderTopLeftRadius != null) {
@@ -2707,10 +2741,10 @@ function colorToString(color) {
2707
2741
  return color && color.swatch ? `hsla(${color.swatch.hue},${color.swatch.saturation}%,${color.swatch.lightness}%,${color.alpha})` : "";
2708
2742
  }
2709
2743
  function borderPropertyDataToStyle(data, defaultValue = {}) {
2710
- var _a, _b, _c2, _d;
2744
+ var _a, _b, _c, _d;
2711
2745
  const borderTop = (_a = data.borderTop) != null ? _a : defaultValue.borderTop;
2712
2746
  const borderRight = (_b = data.borderRight) != null ? _b : defaultValue.borderRight;
2713
- const borderBottom = (_c2 = data.borderBottom) != null ? _c2 : defaultValue.borderBottom;
2747
+ const borderBottom = (_c = data.borderBottom) != null ? _c : defaultValue.borderBottom;
2714
2748
  const borderLeft = (_d = data.borderLeft) != null ? _d : defaultValue.borderLeft;
2715
2749
  const style = {};
2716
2750
  if (borderTop != null)
@@ -2876,14 +2910,14 @@ function useStyleControlCssObject(style, controlDefinition) {
2876
2910
  style == null ? void 0 : style.borderRadius,
2877
2911
  style == null ? void 0 : style.textStyle
2878
2912
  ], ([width, margin, padding, border, borderRadius, textStyle]) => {
2879
- var _a, _b, _c2, _d, _e, _f, _g, _h, _i, _j, _k;
2913
+ var _a, _b, _c, _d, _e2, _f, _g, _h, _i, _j, _k;
2880
2914
  return __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, properties.includes(StyleControlProperty.Width) && {
2881
2915
  width: (_a = widthToString(width)) != null ? _a : "100%"
2882
2916
  }), properties.includes(StyleControlProperty.Margin) && marginPropertyDataToStyle(margin != null ? margin : defaultMargin, defaultMargin)), properties.includes(StyleControlProperty.Padding) && paddingPropertyDataToStyle(padding != null ? padding : defaultPadding, defaultPadding)), properties.includes(StyleControlProperty.Border) && {
2883
2917
  borderTop: (_b = borderSideToString2(border == null ? void 0 : border.borderTop)) != null ? _b : "0 solid black",
2884
- borderRight: (_c2 = borderSideToString2(border == null ? void 0 : border.borderRight)) != null ? _c2 : "0 solid black",
2918
+ borderRight: (_c = borderSideToString2(border == null ? void 0 : border.borderRight)) != null ? _c : "0 solid black",
2885
2919
  borderBottom: (_d = borderSideToString2(border == null ? void 0 : border.borderBottom)) != null ? _d : "0 solid black",
2886
- borderLeft: (_e = borderSideToString2(border == null ? void 0 : border.borderLeft)) != null ? _e : "0 solid black"
2920
+ borderLeft: (_e2 = borderSideToString2(border == null ? void 0 : border.borderLeft)) != null ? _e2 : "0 solid black"
2887
2921
  }), properties.includes(StyleControlProperty.BorderRadius) && {
2888
2922
  borderTopLeftRadius: (_f = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderTopLeftRadius)) != null ? _f : 0,
2889
2923
  borderTopRightRadius: (_g = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderTopRightRadius)) != null ? _g : 0,
@@ -3075,7 +3109,7 @@ function ListControlValue({
3075
3109
  function useNumber(numberControlData, controlDefinition) {
3076
3110
  return numberControlData != null ? numberControlData : controlDefinition.config.defaultValue;
3077
3111
  }
3078
- const Text = forwardNextDynamicRef((patch) => dynamic(() => patch(import("./index.es7.js"))));
3112
+ const Text = forwardNextDynamicRef((patch) => dynamic(() => patch(import("./index.es8.js"))));
3079
3113
  function useRichText(data, control) {
3080
3114
  const textCallbackRef = useCallback((handle) => {
3081
3115
  var _a;
@@ -3089,7 +3123,7 @@ function useRichText(data, control) {
3089
3123
  ref: textCallbackRef
3090
3124
  });
3091
3125
  }
3092
- const EditableText = forwardNextDynamicRef((patch) => dynamic(() => patch(import("./index.es8.js"))));
3126
+ const EditableText = forwardNextDynamicRef((patch) => dynamic(() => patch(import("./index.es9.js"))));
3093
3127
  const ReadOnlyText = forwardNextDynamicRef((patch) => dynamic(() => patch(import("./ReadOnlyTextV2.es.js"))));
3094
3128
  function useRichTextV2(data, control) {
3095
3129
  const isPreview = useIsPreview();
@@ -3097,7 +3131,8 @@ function useRichTextV2(data, control) {
3097
3131
  text: data,
3098
3132
  control
3099
3133
  }) : /* @__PURE__ */ jsx(ReadOnlyText, {
3100
- text: data
3134
+ text: data,
3135
+ control
3101
3136
  });
3102
3137
  }
3103
3138
  function useSelectControlValue(data, definition) {
@@ -3155,13 +3190,13 @@ function useSlot(data, control) {
3155
3190
  }, element.key))
3156
3191
  });
3157
3192
  }
3158
- function Slot(_f) {
3159
- var _g = _f, {
3193
+ function Slot(_h) {
3194
+ var _i = _h, {
3160
3195
  as,
3161
3196
  control,
3162
3197
  children,
3163
3198
  className
3164
- } = _g, restOfProps = __objRest(_g, [
3199
+ } = _i, restOfProps = __objRest(_i, [
3165
3200
  "as",
3166
3201
  "control",
3167
3202
  "children",
@@ -3190,15 +3225,15 @@ function Slot(_f) {
3190
3225
  }
3191
3226
  Slot.Placeholder = SlotPlaceholder;
3192
3227
  Slot.Item = SlotItem;
3193
- function SlotItem(_h) {
3194
- var _i = _h, {
3228
+ function SlotItem(_j) {
3229
+ var _k = _j, {
3195
3230
  as,
3196
3231
  control,
3197
3232
  grid,
3198
3233
  index,
3199
3234
  children,
3200
3235
  className
3201
- } = _i, restOfProps = __objRest(_i, [
3236
+ } = _k, restOfProps = __objRest(_k, [
3202
3237
  "as",
3203
3238
  "control",
3204
3239
  "grid",
@@ -3424,7 +3459,7 @@ function PropsValue({
3424
3459
  return getPropControllers(state, documentKey, element.key);
3425
3460
  });
3426
3461
  return Object.entries(propControllerDescriptorsRef.current).reduceRight((renderFn, [propName, descriptor]) => (propsValue) => {
3427
- var _a2, _b, _c2, _d;
3462
+ var _a2, _b, _c, _d;
3428
3463
  switch (descriptor.type) {
3429
3464
  case CheckboxControlType:
3430
3465
  case NumberControlType:
@@ -3466,7 +3501,7 @@ function PropsValue({
3466
3501
  }, descriptor.type);
3467
3502
  }
3468
3503
  case RichTextV2ControlType: {
3469
- const control = (_c2 = propControllers == null ? void 0 : propControllers[propName]) != null ? _c2 : null;
3504
+ const control = (_c = propControllers == null ? void 0 : propControllers[propName]) != null ? _c : null;
3470
3505
  return /* @__PURE__ */ jsx(RenderHook, {
3471
3506
  hook: useRichTextV2,
3472
3507
  parameters: [props[propName], control],
@@ -3660,18 +3695,22 @@ function isDomNodeHandle(value) {
3660
3695
  }
3661
3696
  class ReactRuntime {
3662
3697
  constructor({
3663
- breakpoints
3664
- }) {
3698
+ breakpoints,
3699
+ unstable_i18n
3700
+ } = {}) {
3665
3701
  __publicField(this, "store");
3666
3702
  this.store = configureStore$1({
3667
- breakpoints: breakpoints ? parseBreakpointsInput(breakpoints) : void 0
3703
+ breakpoints: breakpoints ? parseBreakpointsInput(breakpoints) : void 0,
3704
+ locales: unstable_i18n ? __spreadProps(__spreadValues({}, unstable_i18n), {
3705
+ locale: null
3706
+ }) : void 0
3668
3707
  });
3669
3708
  registerBuiltinComponents(this);
3670
3709
  }
3671
3710
  static registerComponent(component, {
3672
3711
  type,
3673
3712
  label,
3674
- icon = "Cube40",
3713
+ icon = ComponentIcon.Code,
3675
3714
  hidden = false,
3676
3715
  props
3677
3716
  }) {
@@ -3695,7 +3734,7 @@ class ReactRuntime {
3695
3734
  registerComponent(component, {
3696
3735
  type,
3697
3736
  label,
3698
- icon = "Cube40",
3737
+ icon = ComponentIcon.Cube,
3699
3738
  hidden = false,
3700
3739
  props
3701
3740
  }) {
@@ -3722,10 +3761,10 @@ registerBuiltinComponents(ReactRuntime);
3722
3761
  const StoreContext = createContext(ReactRuntime.store);
3723
3762
  const PreviewProvider = dynamic(() => import("./PreviewProvider.es.js"));
3724
3763
  const LiveProvider = dynamic(() => import("./LiveProvider.es.js"));
3725
- function RuntimeProvider(_j) {
3726
- var _k = _j, {
3764
+ function RuntimeProvider(_l) {
3765
+ var _m = _l, {
3727
3766
  preview
3728
- } = _k, props = __objRest(_k, [
3767
+ } = _m, props = __objRest(_m, [
3729
3768
  "preview"
3730
3769
  ]);
3731
3770
  return preview ? /* @__PURE__ */ jsx(PreviewProvider, __spreadValues({}, props)) : /* @__PURE__ */ jsx(LiveProvider, __spreadValues({}, props));