@builder.io/sdk-react 0.2.2 → 0.2.3-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (659) hide show
  1. package/dist/react/cjs/blocks/BaseText.d.ts +2 -0
  2. package/dist/react/cjs/blocks/BaseText.js +11 -0
  3. package/dist/react/cjs/blocks/button/button.d.ts +2 -0
  4. package/dist/react/cjs/blocks/button/button.js +15 -0
  5. package/dist/react/cjs/blocks/button/component-info.d.ts +38 -0
  6. package/dist/react/cjs/blocks/button/component-info.js +41 -0
  7. package/dist/react/cjs/blocks/columns/columns.d.ts +2 -0
  8. package/dist/react/cjs/blocks/columns/columns.js +133 -0
  9. package/dist/react/cjs/blocks/columns/component-info.d.ts +176 -0
  10. package/dist/react/cjs/blocks/columns/component-info.js +243 -0
  11. package/dist/react/cjs/blocks/custom-code/component-info.d.ts +31 -0
  12. package/dist/react/cjs/blocks/custom-code/component-info.js +31 -0
  13. package/dist/react/cjs/blocks/custom-code/custom-code.d.ts +2 -0
  14. package/dist/react/cjs/blocks/custom-code/custom-code.js +53 -0
  15. package/dist/react/cjs/blocks/embed/component-info.d.ts +22 -0
  16. package/dist/react/cjs/blocks/embed/component-info.js +46 -0
  17. package/dist/react/cjs/blocks/embed/embed.d.ts +2 -0
  18. package/dist/react/cjs/blocks/embed/embed.js +44 -0
  19. package/dist/react/cjs/blocks/embed/helpers.d.ts +1 -0
  20. package/dist/react/cjs/blocks/embed/helpers.js +10 -0
  21. package/dist/react/cjs/blocks/form/component-info.d.ts +235 -0
  22. package/dist/react/cjs/blocks/form/component-info.js +262 -0
  23. package/dist/react/cjs/blocks/form/form.d.ts +2 -0
  24. package/dist/react/cjs/blocks/form/form.js +205 -0
  25. package/dist/react/cjs/blocks/fragment/component-info.d.ts +8 -0
  26. package/dist/react/cjs/blocks/fragment/component-info.js +11 -0
  27. package/dist/react/cjs/blocks/fragment/fragment.d.ts +2 -0
  28. package/dist/react/cjs/blocks/fragment/fragment.js +8 -0
  29. package/dist/react/cjs/blocks/image/component-info.d.ts +114 -0
  30. package/dist/react/cjs/blocks/image/component-info.js +151 -0
  31. package/dist/react/cjs/blocks/image/image.d.ts +2 -0
  32. package/dist/react/cjs/blocks/image/image.helpers.d.ts +1 -0
  33. package/dist/react/cjs/blocks/image/image.helpers.js +49 -0
  34. package/dist/react/cjs/blocks/image/image.js +84 -0
  35. package/dist/react/cjs/blocks/img/component-info.d.ts +15 -0
  36. package/dist/react/cjs/blocks/img/component-info.js +20 -0
  37. package/dist/react/cjs/blocks/img/img.d.ts +2 -0
  38. package/dist/react/cjs/blocks/img/img.js +12 -0
  39. package/dist/react/cjs/blocks/input/component-info.d.ts +66 -0
  40. package/dist/react/cjs/blocks/input/component-info.js +74 -0
  41. package/dist/react/cjs/blocks/input/input.d.ts +2 -0
  42. package/dist/react/cjs/blocks/input/input.js +9 -0
  43. package/dist/react/cjs/blocks/raw-text/component-info.d.ts +10 -0
  44. package/dist/react/cjs/blocks/raw-text/component-info.js +16 -0
  45. package/dist/react/cjs/blocks/raw-text/raw-text.d.ts +2 -0
  46. package/dist/react/cjs/blocks/raw-text/raw-text.js +8 -0
  47. package/dist/react/cjs/blocks/section/component-info.d.ts +43 -0
  48. package/dist/react/cjs/blocks/section/component-info.js +49 -0
  49. package/dist/react/cjs/blocks/section/section.d.ts +2 -0
  50. package/dist/react/cjs/blocks/section/section.js +19 -0
  51. package/dist/react/cjs/blocks/select/component-info.d.ts +61 -0
  52. package/dist/react/cjs/blocks/select/component-info.js +59 -0
  53. package/dist/react/cjs/blocks/select/select.d.ts +2 -0
  54. package/dist/react/cjs/blocks/select/select.js +9 -0
  55. package/dist/react/cjs/blocks/submit-button/component-info.d.ts +23 -0
  56. package/dist/react/cjs/blocks/submit-button/component-info.js +28 -0
  57. package/dist/react/cjs/blocks/submit-button/submit-button.d.ts +2 -0
  58. package/dist/react/cjs/blocks/submit-button/submit-button.js +8 -0
  59. package/dist/react/cjs/blocks/symbol/component-info.d.ts +35 -0
  60. package/dist/react/cjs/blocks/symbol/component-info.js +43 -0
  61. package/dist/react/cjs/blocks/symbol/symbol.d.ts +2 -0
  62. package/dist/react/cjs/blocks/symbol/symbol.js +73 -0
  63. package/dist/react/cjs/blocks/text/component-info.d.ts +19 -0
  64. package/dist/react/cjs/blocks/text/component-info.js +24 -0
  65. package/dist/react/cjs/blocks/text/text.d.ts +2 -0
  66. package/dist/react/cjs/blocks/text/text.js +10 -0
  67. package/dist/react/cjs/blocks/textarea/component-info.d.ts +53 -0
  68. package/dist/react/cjs/blocks/textarea/component-info.js +47 -0
  69. package/dist/react/cjs/blocks/textarea/textarea.d.ts +2 -0
  70. package/dist/react/cjs/blocks/textarea/textarea.js +8 -0
  71. package/dist/react/cjs/blocks/util.d.ts +1 -0
  72. package/dist/react/cjs/blocks/util.js +9 -0
  73. package/dist/react/cjs/blocks/video/component-info.d.ts +80 -0
  74. package/dist/react/cjs/blocks/video/component-info.js +106 -0
  75. package/dist/react/cjs/blocks/video/video.d.ts +2 -0
  76. package/dist/react/cjs/blocks/video/video.js +52 -0
  77. package/dist/react/cjs/components/render-block/block-styles.d.ts +2 -0
  78. package/dist/react/cjs/components/render-block/block-styles.js +66 -0
  79. package/dist/react/cjs/components/render-block/render-block.d.ts +2 -0
  80. package/dist/react/cjs/components/render-block/render-block.helpers.d.ts +13 -0
  81. package/dist/react/cjs/components/render-block/render-block.helpers.js +125 -0
  82. package/dist/react/cjs/components/render-block/render-block.js +134 -0
  83. package/dist/react/cjs/components/render-block/render-component.d.ts +2 -0
  84. package/dist/react/cjs/components/render-block/render-component.js +14 -0
  85. package/dist/react/cjs/components/render-block/render-repeated-block.d.ts +2 -0
  86. package/dist/react/cjs/components/render-block/render-repeated-block.js +20 -0
  87. package/dist/react/cjs/components/render-block/types.d.ts +0 -0
  88. package/dist/react/cjs/components/render-blocks.d.ts +2 -0
  89. package/dist/react/cjs/components/render-blocks.js +49 -0
  90. package/dist/react/cjs/components/render-content/builder-editing.d.ts +2 -0
  91. package/dist/react/cjs/components/render-content/builder-editing.js +8 -0
  92. package/dist/react/cjs/components/render-content/components/render-styles.d.ts +2 -0
  93. package/dist/react/cjs/components/render-content/components/render-styles.helpers.d.ts +7 -0
  94. package/dist/react/cjs/components/render-content/components/render-styles.helpers.js +55 -0
  95. package/dist/react/cjs/components/render-content/components/render-styles.js +34 -0
  96. package/dist/react/cjs/components/render-content/index.d.ts +2 -0
  97. package/dist/react/cjs/components/render-content/index.js +5 -0
  98. package/dist/react/cjs/components/render-content/render-content.d.ts +2 -0
  99. package/dist/react/cjs/components/render-content/render-content.helpers.d.ts +9 -0
  100. package/dist/react/cjs/components/render-content/render-content.helpers.js +42 -0
  101. package/dist/react/cjs/components/render-content/render-content.js +297 -0
  102. package/dist/react/cjs/components/render-content/render-content.types.d.ts +0 -0
  103. package/dist/react/cjs/components/render-inlined-styles.d.ts +2 -0
  104. package/dist/react/cjs/components/render-inlined-styles.js +19 -0
  105. package/dist/react/cjs/constants/builder-registered-components.d.ts +1 -0
  106. package/dist/react/cjs/constants/builder-registered-components.js +55 -0
  107. package/dist/react/cjs/constants/device-sizes.d.ts +21 -0
  108. package/dist/react/cjs/constants/device-sizes.js +49 -0
  109. package/dist/react/cjs/constants/target.d.ts +1 -0
  110. package/dist/react/cjs/constants/target.js +5 -0
  111. package/dist/react/cjs/context/builder.context.d.ts +11 -0
  112. package/dist/react/cjs/context/builder.context.js +16 -0
  113. package/dist/react/cjs/context/types.d.ts +0 -0
  114. package/dist/react/cjs/functions/camel-to-kebab-case.d.ts +1 -0
  115. package/dist/react/cjs/functions/camel-to-kebab-case.js +5 -0
  116. package/dist/react/cjs/functions/evaluate.d.ts +7 -0
  117. package/dist/react/cjs/functions/evaluate.js +25 -0
  118. package/dist/react/cjs/functions/event-handler-name.d.ts +1 -0
  119. package/dist/react/cjs/functions/event-handler-name.js +8 -0
  120. package/dist/react/cjs/functions/extract-text-styles.d.ts +1 -0
  121. package/dist/react/cjs/functions/extract-text-styles.js +23 -0
  122. package/dist/react/cjs/functions/fast-clone.d.ts +1 -0
  123. package/dist/react/cjs/functions/fast-clone.js +5 -0
  124. package/dist/react/cjs/functions/get-block-actions-handler.d.ts +1 -0
  125. package/dist/react/cjs/functions/get-block-actions-handler.js +12 -0
  126. package/dist/react/cjs/functions/get-block-actions.d.ts +1 -0
  127. package/dist/react/cjs/functions/get-block-actions.js +19 -0
  128. package/dist/react/cjs/functions/get-block-component-options.d.ts +1 -0
  129. package/dist/react/cjs/functions/get-block-component-options.js +29 -0
  130. package/dist/react/cjs/functions/get-block-properties.d.ts +1 -0
  131. package/dist/react/cjs/functions/get-block-properties.js +54 -0
  132. package/dist/react/cjs/functions/get-builder-search-params/fn.test.d.ts +1 -0
  133. package/dist/react/cjs/functions/get-builder-search-params/fn.test.js +15 -0
  134. package/dist/react/cjs/functions/get-builder-search-params/index.d.ts +4 -0
  135. package/dist/react/cjs/functions/get-builder-search-params/index.js +39 -0
  136. package/dist/react/cjs/functions/get-content/ab-testing.d.ts +1 -0
  137. package/dist/react/cjs/functions/get-content/ab-testing.js +89 -0
  138. package/dist/react/cjs/functions/get-content/generate-content-url.d.ts +1 -0
  139. package/dist/react/cjs/functions/get-content/generate-content-url.js +48 -0
  140. package/dist/react/cjs/functions/get-content/generate-content-url.test.d.ts +1 -0
  141. package/dist/react/cjs/functions/get-content/generate-content-url.test.js +84 -0
  142. package/dist/react/cjs/functions/get-content/index.d.ts +2 -0
  143. package/dist/react/cjs/functions/get-content/index.js +88 -0
  144. package/dist/react/cjs/functions/get-content/types.d.ts +0 -0
  145. package/dist/react/cjs/functions/get-fetch.d.ts +1 -0
  146. package/dist/react/cjs/functions/get-fetch.js +15 -0
  147. package/dist/react/cjs/functions/get-global-this.d.ts +1 -0
  148. package/dist/react/cjs/functions/get-global-this.js +19 -0
  149. package/dist/react/cjs/functions/get-processed-block.d.ts +6 -0
  150. package/dist/react/cjs/functions/get-processed-block.js +52 -0
  151. package/dist/react/cjs/functions/get-processed-block.test.d.ts +1 -0
  152. package/dist/react/cjs/functions/get-processed-block.test.js +34 -0
  153. package/dist/react/cjs/functions/get-react-native-block-styles.d.ts +5 -0
  154. package/dist/react/cjs/functions/get-react-native-block-styles.js +30 -0
  155. package/dist/react/cjs/functions/if-target.d.ts +5 -0
  156. package/dist/react/cjs/functions/if-target.js +13 -0
  157. package/dist/react/cjs/functions/is-browser.d.ts +1 -0
  158. package/dist/react/cjs/functions/is-browser.js +7 -0
  159. package/dist/react/cjs/functions/is-editing.d.ts +1 -0
  160. package/dist/react/cjs/functions/is-editing.js +9 -0
  161. package/dist/react/cjs/functions/is-iframe.d.ts +1 -0
  162. package/dist/react/cjs/functions/is-iframe.js +8 -0
  163. package/dist/react/cjs/functions/is-previewing.d.ts +1 -0
  164. package/dist/react/cjs/functions/is-previewing.js +15 -0
  165. package/dist/react/cjs/functions/on-change.d.ts +2 -0
  166. package/dist/react/cjs/functions/on-change.js +28 -0
  167. package/dist/react/cjs/functions/on-change.test.d.ts +1 -0
  168. package/dist/react/cjs/functions/on-change.test.js +21 -0
  169. package/dist/react/cjs/functions/register-component.d.ts +6 -0
  170. package/dist/react/cjs/functions/register-component.js +65 -0
  171. package/dist/react/cjs/functions/register.d.ts +1 -0
  172. package/dist/react/cjs/functions/register.js +31 -0
  173. package/dist/react/cjs/functions/sanitize-react-native-block-styles.d.ts +1 -0
  174. package/dist/react/cjs/functions/sanitize-react-native-block-styles.js +71 -0
  175. package/dist/react/cjs/functions/set-editor-settings.d.ts +1 -0
  176. package/dist/react/cjs/functions/set-editor-settings.js +16 -0
  177. package/dist/react/cjs/functions/set.d.ts +1 -0
  178. package/dist/react/cjs/functions/set.js +12 -0
  179. package/dist/react/cjs/functions/set.test.d.ts +1 -0
  180. package/dist/react/cjs/functions/set.test.js +18 -0
  181. package/dist/react/cjs/functions/track/helpers.d.ts +5 -0
  182. package/dist/react/cjs/functions/track/helpers.js +53 -0
  183. package/dist/react/cjs/functions/track/index.d.ts +2 -0
  184. package/dist/react/{functions/track.js → cjs/functions/track/index.js} +21 -12
  185. package/dist/react/cjs/functions/track/interaction.d.ts +14 -0
  186. package/dist/react/cjs/functions/track/interaction.js +51 -0
  187. package/dist/react/cjs/functions/transform-block-properties.d.ts +1 -0
  188. package/dist/react/cjs/functions/transform-block-properties.js +7 -0
  189. package/dist/react/cjs/functions/transform-block.d.ts +1 -0
  190. package/dist/react/cjs/functions/transform-block.js +7 -0
  191. package/dist/react/cjs/helpers/ab-tests.d.ts +9 -0
  192. package/dist/react/cjs/helpers/ab-tests.js +10 -0
  193. package/dist/react/cjs/helpers/cookie.d.ts +2 -0
  194. package/dist/react/cjs/helpers/cookie.js +74 -0
  195. package/dist/react/cjs/helpers/css.d.ts +7 -0
  196. package/dist/react/cjs/helpers/css.js +33 -0
  197. package/dist/react/cjs/helpers/flatten.d.ts +1 -0
  198. package/dist/react/cjs/helpers/flatten.js +35 -0
  199. package/dist/react/cjs/helpers/localStorage.d.ts +9 -0
  200. package/dist/react/cjs/helpers/localStorage.js +31 -0
  201. package/dist/react/cjs/helpers/logger.d.ts +5 -0
  202. package/dist/react/cjs/helpers/logger.js +10 -0
  203. package/dist/react/cjs/helpers/nullable.d.ts +1 -0
  204. package/dist/react/cjs/helpers/nullable.js +5 -0
  205. package/dist/react/cjs/helpers/sessionId.d.ts +6 -0
  206. package/dist/react/cjs/helpers/sessionId.js +51 -0
  207. package/dist/react/cjs/helpers/time.d.ts +1 -0
  208. package/dist/react/cjs/helpers/time.js +6 -0
  209. package/dist/react/cjs/helpers/url.d.ts +1 -0
  210. package/dist/react/cjs/helpers/url.js +14 -0
  211. package/dist/react/cjs/helpers/url.test.d.ts +1 -0
  212. package/dist/react/cjs/helpers/url.test.js +23 -0
  213. package/dist/react/cjs/helpers/uuid.d.ts +2 -0
  214. package/dist/react/cjs/helpers/uuid.js +14 -0
  215. package/dist/react/cjs/helpers/visitorId.d.ts +8 -0
  216. package/dist/react/cjs/helpers/visitorId.js +33 -0
  217. package/dist/react/cjs/index-helpers/blocks-exports.js +23 -0
  218. package/dist/react/cjs/index-helpers/top-of-file.d.ts +2 -0
  219. package/dist/react/cjs/index-helpers/top-of-file.js +5 -0
  220. package/dist/react/cjs/index.d.ts +11 -0
  221. package/dist/react/cjs/index.js +28 -0
  222. package/dist/react/cjs/scripts/init-editing.d.ts +2 -0
  223. package/dist/react/cjs/scripts/init-editing.js +97 -0
  224. package/dist/react/cjs/types/api-version.d.ts +1 -0
  225. package/dist/react/cjs/types/api-version.js +5 -0
  226. package/dist/react/cjs/types/builder-block.d.ts +0 -0
  227. package/dist/react/cjs/types/builder-content.d.ts +0 -0
  228. package/dist/react/cjs/types/can-track.d.ts +0 -0
  229. package/dist/react/cjs/types/components.d.ts +0 -0
  230. package/dist/react/cjs/types/deep-partial.d.ts +0 -0
  231. package/dist/react/cjs/types/element.d.ts +0 -0
  232. package/dist/react/cjs/types/input.d.ts +0 -0
  233. package/dist/react/cjs/types/targets.d.ts +0 -0
  234. package/dist/react/cjs/types/typescript.d.ts +0 -0
  235. package/dist/react/esm/blocks/BaseText.d.ts +2 -0
  236. package/dist/react/{blocks → esm/blocks}/BaseText.js +1 -0
  237. package/dist/react/esm/blocks/button/button.d.ts +2 -0
  238. package/dist/react/{blocks → esm/blocks}/button/button.js +1 -0
  239. package/dist/react/esm/blocks/button/component-info.d.ts +38 -0
  240. package/dist/react/esm/blocks/columns/columns.d.ts +2 -0
  241. package/dist/react/{blocks → esm/blocks}/columns/columns.js +1 -0
  242. package/dist/react/esm/blocks/columns/component-info.d.ts +176 -0
  243. package/dist/react/esm/blocks/custom-code/component-info.d.ts +31 -0
  244. package/dist/react/esm/blocks/custom-code/custom-code.d.ts +2 -0
  245. package/dist/react/{blocks → esm/blocks}/custom-code/custom-code.js +1 -0
  246. package/dist/react/esm/blocks/embed/component-info.d.ts +22 -0
  247. package/dist/react/esm/blocks/embed/embed.d.ts +2 -0
  248. package/dist/react/{blocks → esm/blocks}/embed/embed.js +1 -0
  249. package/dist/react/esm/blocks/embed/helpers.d.ts +1 -0
  250. package/dist/react/esm/blocks/form/component-info.d.ts +235 -0
  251. package/dist/react/esm/blocks/form/form.d.ts +2 -0
  252. package/dist/react/{blocks → esm/blocks}/form/form.js +1 -0
  253. package/dist/react/esm/blocks/fragment/component-info.d.ts +8 -0
  254. package/dist/react/esm/blocks/fragment/fragment.d.ts +2 -0
  255. package/dist/react/{blocks → esm/blocks}/fragment/fragment.js +1 -0
  256. package/dist/react/esm/blocks/image/component-info.d.ts +114 -0
  257. package/dist/react/esm/blocks/image/image.d.ts +2 -0
  258. package/dist/react/esm/blocks/image/image.helpers.d.ts +1 -0
  259. package/dist/react/{blocks → esm/blocks}/image/image.js +1 -0
  260. package/dist/react/esm/blocks/img/component-info.d.ts +15 -0
  261. package/dist/react/esm/blocks/img/img.d.ts +2 -0
  262. package/dist/react/{blocks → esm/blocks}/img/img.js +1 -0
  263. package/dist/react/esm/blocks/input/component-info.d.ts +66 -0
  264. package/dist/react/esm/blocks/input/input.d.ts +2 -0
  265. package/dist/react/{blocks → esm/blocks}/input/input.js +1 -0
  266. package/dist/react/esm/blocks/raw-text/component-info.d.ts +10 -0
  267. package/dist/react/esm/blocks/raw-text/raw-text.d.ts +2 -0
  268. package/dist/react/{blocks → esm/blocks}/raw-text/raw-text.js +1 -0
  269. package/dist/react/esm/blocks/section/component-info.d.ts +43 -0
  270. package/dist/react/esm/blocks/section/section.d.ts +2 -0
  271. package/dist/react/{blocks → esm/blocks}/section/section.js +1 -0
  272. package/dist/react/esm/blocks/select/component-info.d.ts +61 -0
  273. package/dist/react/esm/blocks/select/select.d.ts +2 -0
  274. package/dist/react/{blocks → esm/blocks}/select/select.js +1 -0
  275. package/dist/react/esm/blocks/submit-button/component-info.d.ts +23 -0
  276. package/dist/react/esm/blocks/submit-button/submit-button.d.ts +2 -0
  277. package/dist/react/{blocks → esm/blocks}/submit-button/submit-button.js +1 -0
  278. package/dist/react/esm/blocks/symbol/component-info.d.ts +35 -0
  279. package/dist/react/esm/blocks/symbol/symbol.d.ts +2 -0
  280. package/dist/react/{blocks → esm/blocks}/symbol/symbol.js +1 -0
  281. package/dist/react/esm/blocks/text/component-info.d.ts +19 -0
  282. package/dist/react/esm/blocks/text/text.d.ts +2 -0
  283. package/dist/react/{blocks → esm/blocks}/text/text.js +1 -0
  284. package/dist/react/esm/blocks/textarea/component-info.d.ts +53 -0
  285. package/dist/react/esm/blocks/textarea/textarea.d.ts +2 -0
  286. package/dist/react/{blocks → esm/blocks}/textarea/textarea.js +1 -0
  287. package/dist/react/esm/blocks/util.d.ts +1 -0
  288. package/dist/react/esm/blocks/video/component-info.d.ts +80 -0
  289. package/dist/react/esm/blocks/video/video.d.ts +2 -0
  290. package/dist/react/{blocks → esm/blocks}/video/video.js +1 -0
  291. package/dist/react/esm/components/render-block/block-styles.d.ts +2 -0
  292. package/dist/react/{components → esm/components}/render-block/block-styles.js +1 -0
  293. package/dist/react/esm/components/render-block/render-block.d.ts +2 -0
  294. package/dist/react/esm/components/render-block/render-block.helpers.d.ts +13 -0
  295. package/dist/react/{components → esm/components}/render-block/render-block.js +1 -0
  296. package/dist/react/esm/components/render-block/render-component.d.ts +2 -0
  297. package/dist/react/{components → esm/components}/render-block/render-component.js +1 -0
  298. package/dist/react/esm/components/render-block/render-repeated-block.d.ts +2 -0
  299. package/dist/react/{components → esm/components}/render-block/render-repeated-block.js +1 -0
  300. package/dist/react/esm/components/render-block/types.d.ts +0 -0
  301. package/dist/react/esm/components/render-block/types.js +1 -0
  302. package/dist/react/esm/components/render-blocks.d.ts +2 -0
  303. package/dist/react/{components → esm/components}/render-blocks.js +1 -0
  304. package/dist/react/esm/components/render-content/builder-editing.d.ts +2 -0
  305. package/dist/react/{components → esm/components}/render-content/builder-editing.js +1 -0
  306. package/dist/react/esm/components/render-content/components/render-styles.d.ts +2 -0
  307. package/dist/react/esm/components/render-content/components/render-styles.helpers.d.ts +7 -0
  308. package/dist/react/{components → esm/components}/render-content/components/render-styles.js +1 -0
  309. package/dist/react/esm/components/render-content/index.d.ts +2 -0
  310. package/dist/react/esm/components/render-content/render-content.d.ts +2 -0
  311. package/dist/react/esm/components/render-content/render-content.helpers.d.ts +9 -0
  312. package/dist/react/{components → esm/components}/render-content/render-content.js +1 -0
  313. package/dist/react/esm/components/render-content/render-content.types.d.ts +0 -0
  314. package/dist/react/esm/components/render-content/render-content.types.js +1 -0
  315. package/dist/react/esm/components/render-inlined-styles.d.ts +2 -0
  316. package/dist/react/{components → esm/components}/render-inlined-styles.js +1 -0
  317. package/dist/react/esm/constants/builder-registered-components.d.ts +1 -0
  318. package/dist/react/esm/constants/device-sizes.d.ts +21 -0
  319. package/dist/react/esm/constants/target.d.ts +1 -0
  320. package/dist/react/esm/context/builder.context.d.ts +11 -0
  321. package/dist/react/esm/context/types.d.ts +0 -0
  322. package/dist/react/esm/context/types.js +1 -0
  323. package/dist/react/esm/functions/camel-to-kebab-case.d.ts +1 -0
  324. package/dist/react/esm/functions/evaluate.d.ts +7 -0
  325. package/dist/react/esm/functions/event-handler-name.d.ts +1 -0
  326. package/dist/react/esm/functions/extract-text-styles.d.ts +1 -0
  327. package/dist/react/esm/functions/fast-clone.d.ts +1 -0
  328. package/dist/react/esm/functions/get-block-actions-handler.d.ts +1 -0
  329. package/dist/react/esm/functions/get-block-actions.d.ts +1 -0
  330. package/dist/react/esm/functions/get-block-component-options.d.ts +1 -0
  331. package/dist/react/esm/functions/get-block-properties.d.ts +1 -0
  332. package/dist/react/esm/functions/get-builder-search-params/fn.test.d.ts +1 -0
  333. package/dist/react/esm/functions/get-builder-search-params/index.d.ts +4 -0
  334. package/dist/react/esm/functions/get-content/ab-testing.d.ts +1 -0
  335. package/dist/react/esm/functions/get-content/generate-content-url.d.ts +1 -0
  336. package/dist/react/esm/functions/get-content/generate-content-url.test.d.ts +1 -0
  337. package/dist/react/esm/functions/get-content/index.d.ts +2 -0
  338. package/dist/react/{functions → esm/functions}/get-content/index.js +1 -1
  339. package/dist/react/esm/functions/get-content/types.d.ts +0 -0
  340. package/dist/react/esm/functions/get-content/types.js +1 -0
  341. package/dist/react/esm/functions/get-fetch.d.ts +1 -0
  342. package/dist/react/esm/functions/get-global-this.d.ts +1 -0
  343. package/dist/react/esm/functions/get-processed-block.d.ts +6 -0
  344. package/dist/react/esm/functions/get-processed-block.test.d.ts +1 -0
  345. package/dist/react/esm/functions/get-react-native-block-styles.d.ts +5 -0
  346. package/dist/react/esm/functions/if-target.d.ts +5 -0
  347. package/dist/react/esm/functions/is-browser.d.ts +1 -0
  348. package/dist/react/esm/functions/is-editing.d.ts +1 -0
  349. package/dist/react/esm/functions/is-iframe.d.ts +1 -0
  350. package/dist/react/esm/functions/is-previewing.d.ts +1 -0
  351. package/dist/react/esm/functions/on-change.d.ts +2 -0
  352. package/dist/react/esm/functions/on-change.test.d.ts +1 -0
  353. package/dist/react/esm/functions/register-component.d.ts +6 -0
  354. package/dist/react/esm/functions/register.d.ts +1 -0
  355. package/dist/react/esm/functions/sanitize-react-native-block-styles.d.ts +1 -0
  356. package/dist/react/esm/functions/set-editor-settings.d.ts +1 -0
  357. package/dist/react/esm/functions/set.d.ts +1 -0
  358. package/dist/react/esm/functions/set.test.d.ts +1 -0
  359. package/dist/react/esm/functions/track/helpers.d.ts +5 -0
  360. package/dist/react/esm/functions/track/index.d.ts +2 -0
  361. package/dist/react/esm/functions/track/interaction.d.ts +14 -0
  362. package/dist/react/esm/functions/transform-block-properties.d.ts +1 -0
  363. package/dist/react/esm/functions/transform-block.d.ts +1 -0
  364. package/dist/react/esm/helpers/ab-tests.d.ts +9 -0
  365. package/dist/react/esm/helpers/cookie.d.ts +2 -0
  366. package/dist/react/esm/helpers/css.d.ts +7 -0
  367. package/dist/react/esm/helpers/flatten.d.ts +1 -0
  368. package/dist/react/esm/helpers/localStorage.d.ts +9 -0
  369. package/dist/react/esm/helpers/logger.d.ts +5 -0
  370. package/dist/react/esm/helpers/nullable.d.ts +1 -0
  371. package/dist/react/esm/helpers/sessionId.d.ts +6 -0
  372. package/dist/react/esm/helpers/time.d.ts +1 -0
  373. package/dist/react/esm/helpers/url.d.ts +1 -0
  374. package/dist/react/esm/helpers/url.test.d.ts +1 -0
  375. package/dist/react/esm/helpers/uuid.d.ts +2 -0
  376. package/dist/react/esm/helpers/visitorId.d.ts +8 -0
  377. package/dist/react/esm/index-helpers/blocks-exports.d.ts +11 -0
  378. package/dist/react/esm/index-helpers/blocks-exports.js +11 -0
  379. package/dist/react/esm/index-helpers/top-of-file.d.ts +2 -0
  380. package/dist/react/esm/index.d.ts +11 -0
  381. package/dist/react/esm/scripts/init-editing.d.ts +2 -0
  382. package/dist/react/esm/types/api-version.d.ts +1 -0
  383. package/dist/react/esm/types/builder-block.d.ts +0 -0
  384. package/dist/react/esm/types/builder-block.js +1 -0
  385. package/dist/react/esm/types/builder-content.d.ts +0 -0
  386. package/dist/react/esm/types/builder-content.js +1 -0
  387. package/dist/react/esm/types/can-track.d.ts +0 -0
  388. package/dist/react/esm/types/can-track.js +1 -0
  389. package/dist/react/esm/types/components.d.ts +0 -0
  390. package/dist/react/esm/types/components.js +1 -0
  391. package/dist/react/esm/types/deep-partial.d.ts +0 -0
  392. package/dist/react/esm/types/deep-partial.js +1 -0
  393. package/dist/react/esm/types/element.d.ts +0 -0
  394. package/dist/react/esm/types/element.js +1 -0
  395. package/dist/react/esm/types/input.d.ts +0 -0
  396. package/dist/react/esm/types/input.js +1 -0
  397. package/dist/react/esm/types/targets.d.ts +0 -0
  398. package/dist/react/esm/types/targets.js +1 -0
  399. package/dist/react/esm/types/typescript.d.ts +0 -0
  400. package/dist/react/esm/types/typescript.js +1 -0
  401. package/dist/rsc/blocks/BaseText.d.ts +2 -0
  402. package/dist/rsc/blocks/button/button.d.ts +2 -0
  403. package/dist/rsc/blocks/button/component-info.d.ts +38 -0
  404. package/dist/rsc/blocks/columns/columns.d.ts +2 -0
  405. package/dist/rsc/blocks/columns/component-info.d.ts +176 -0
  406. package/dist/rsc/blocks/custom-code/component-info.d.ts +31 -0
  407. package/dist/rsc/blocks/custom-code/custom-code.d.ts +2 -0
  408. package/dist/rsc/blocks/embed/component-info.d.ts +22 -0
  409. package/dist/rsc/blocks/embed/embed.d.ts +2 -0
  410. package/dist/rsc/blocks/embed/helpers.d.ts +1 -0
  411. package/dist/rsc/blocks/form/component-info.d.ts +235 -0
  412. package/dist/rsc/blocks/form/form.d.ts +2 -0
  413. package/dist/rsc/blocks/fragment/component-info.d.ts +8 -0
  414. package/dist/rsc/blocks/fragment/fragment.d.ts +2 -0
  415. package/dist/rsc/blocks/image/component-info.d.ts +114 -0
  416. package/dist/rsc/blocks/image/image.d.ts +2 -0
  417. package/dist/rsc/blocks/image/image.helpers.d.ts +1 -0
  418. package/dist/rsc/blocks/img/component-info.d.ts +15 -0
  419. package/dist/rsc/blocks/img/img.d.ts +2 -0
  420. package/dist/rsc/blocks/input/component-info.d.ts +66 -0
  421. package/dist/rsc/blocks/input/input.d.ts +2 -0
  422. package/dist/rsc/blocks/raw-text/component-info.d.ts +10 -0
  423. package/dist/rsc/blocks/raw-text/raw-text.d.ts +2 -0
  424. package/dist/rsc/blocks/section/component-info.d.ts +43 -0
  425. package/dist/rsc/blocks/section/section.d.ts +2 -0
  426. package/dist/rsc/blocks/select/component-info.d.ts +61 -0
  427. package/dist/rsc/blocks/select/select.d.ts +2 -0
  428. package/dist/rsc/blocks/submit-button/component-info.d.ts +23 -0
  429. package/dist/rsc/blocks/submit-button/submit-button.d.ts +2 -0
  430. package/dist/rsc/blocks/symbol/component-info.d.ts +35 -0
  431. package/dist/rsc/blocks/symbol/symbol.d.ts +2 -0
  432. package/dist/rsc/blocks/text/component-info.d.ts +19 -0
  433. package/dist/rsc/blocks/text/text.d.ts +2 -0
  434. package/dist/rsc/blocks/textarea/component-info.d.ts +53 -0
  435. package/dist/rsc/blocks/textarea/textarea.d.ts +2 -0
  436. package/dist/rsc/blocks/util.d.ts +1 -0
  437. package/dist/rsc/blocks/video/component-info.d.ts +80 -0
  438. package/dist/rsc/blocks/video/video.d.ts +2 -0
  439. package/dist/rsc/components/render-block/block-styles.d.ts +2 -0
  440. package/dist/rsc/components/render-block/render-block.d.ts +2 -0
  441. package/dist/rsc/components/render-block/render-block.helpers.d.ts +10 -0
  442. package/dist/rsc/components/render-block/render-component.d.ts +2 -0
  443. package/dist/rsc/components/render-block/render-repeated-block.d.ts +2 -0
  444. package/dist/rsc/components/render-block/types.d.ts +0 -0
  445. package/dist/rsc/components/render-blocks.d.ts +2 -0
  446. package/dist/rsc/components/render-content/builder-editing.d.ts +27 -0
  447. package/dist/rsc/components/render-content/components/render-styles.d.ts +2 -0
  448. package/dist/rsc/components/render-content/components/render-styles.helpers.d.ts +7 -0
  449. package/dist/rsc/components/render-content/index.d.ts +2 -0
  450. package/dist/rsc/components/render-content/render-content.d.ts +2 -0
  451. package/dist/rsc/components/render-content/render-content.helpers.d.ts +9 -0
  452. package/dist/rsc/components/render-content/render-content.types.d.ts +0 -0
  453. package/dist/rsc/components/render-inlined-styles.d.ts +2 -0
  454. package/dist/rsc/constants/builder-registered-components.d.ts +1 -0
  455. package/dist/rsc/constants/device-sizes.d.ts +21 -0
  456. package/dist/rsc/constants/target.d.ts +1 -0
  457. package/dist/rsc/context/builder.context.d.ts +11 -0
  458. package/dist/rsc/context/types.d.ts +0 -0
  459. package/dist/rsc/functions/camel-to-kebab-case.d.ts +1 -0
  460. package/dist/rsc/functions/evaluate.d.ts +1 -0
  461. package/dist/rsc/functions/event-handler-name.d.ts +1 -0
  462. package/dist/rsc/functions/extract-text-styles.d.ts +1 -0
  463. package/dist/rsc/functions/fast-clone.d.ts +1 -0
  464. package/dist/rsc/functions/get-block-actions-handler.d.ts +1 -0
  465. package/dist/rsc/functions/get-block-actions.d.ts +1 -0
  466. package/dist/rsc/functions/get-block-component-options.d.ts +1 -0
  467. package/dist/rsc/functions/get-block-properties.d.ts +1 -0
  468. package/dist/rsc/functions/get-builder-search-params/fn.test.d.ts +1 -0
  469. package/dist/rsc/functions/get-builder-search-params/index.d.ts +4 -0
  470. package/dist/rsc/functions/get-content/ab-testing.d.ts +1 -0
  471. package/dist/rsc/functions/get-content/generate-content-url.d.ts +1 -0
  472. package/dist/rsc/functions/get-content/generate-content-url.test.d.ts +1 -0
  473. package/dist/rsc/functions/get-content/index.d.ts +2 -0
  474. package/dist/rsc/functions/get-content/index.js +1 -1
  475. package/dist/rsc/functions/get-content/types.d.ts +0 -0
  476. package/dist/rsc/functions/get-fetch.d.ts +1 -0
  477. package/dist/rsc/functions/get-global-this.d.ts +1 -0
  478. package/dist/rsc/functions/get-processed-block.d.ts +6 -0
  479. package/dist/rsc/functions/get-processed-block.test.d.ts +1 -0
  480. package/dist/rsc/functions/get-react-native-block-styles.d.ts +5 -0
  481. package/dist/rsc/functions/if-target.d.ts +5 -0
  482. package/dist/rsc/functions/is-browser.d.ts +1 -0
  483. package/dist/rsc/functions/is-editing.d.ts +1 -0
  484. package/dist/rsc/functions/is-iframe.d.ts +1 -0
  485. package/dist/rsc/functions/is-previewing.d.ts +1 -0
  486. package/dist/rsc/functions/on-change.d.ts +2 -0
  487. package/dist/rsc/functions/on-change.test.d.ts +1 -0
  488. package/dist/rsc/functions/register-component.d.ts +6 -0
  489. package/dist/rsc/functions/register.d.ts +1 -0
  490. package/dist/rsc/functions/sanitize-react-native-block-styles.d.ts +1 -0
  491. package/dist/rsc/functions/set-editor-settings.d.ts +1 -0
  492. package/dist/rsc/functions/set.d.ts +1 -0
  493. package/dist/rsc/functions/set.test.d.ts +1 -0
  494. package/dist/rsc/functions/track/helpers.d.ts +5 -0
  495. package/dist/rsc/functions/track/index.d.ts +2 -0
  496. package/dist/rsc/functions/track/interaction.d.ts +14 -0
  497. package/dist/rsc/functions/transform-block-properties.d.ts +1 -0
  498. package/dist/rsc/functions/transform-block.d.ts +1 -0
  499. package/dist/rsc/helpers/ab-tests.d.ts +9 -0
  500. package/dist/rsc/helpers/cookie.d.ts +2 -0
  501. package/dist/rsc/helpers/css.d.ts +7 -0
  502. package/dist/rsc/helpers/flatten.d.ts +1 -0
  503. package/dist/rsc/helpers/localStorage.d.ts +9 -0
  504. package/dist/rsc/helpers/logger.d.ts +5 -0
  505. package/dist/rsc/helpers/nullable.d.ts +1 -0
  506. package/dist/rsc/helpers/sessionId.d.ts +6 -0
  507. package/dist/rsc/helpers/time.d.ts +1 -0
  508. package/dist/rsc/helpers/url.d.ts +1 -0
  509. package/dist/rsc/helpers/url.test.d.ts +1 -0
  510. package/dist/rsc/helpers/uuid.d.ts +2 -0
  511. package/dist/rsc/helpers/visitorId.d.ts +8 -0
  512. package/dist/rsc/index-helpers/blocks-exports.d.ts +11 -0
  513. package/dist/rsc/index-helpers/top-of-file.d.ts +2 -0
  514. package/dist/rsc/index.d.ts +11 -0
  515. package/dist/rsc/scripts/init-editing.d.ts +2 -0
  516. package/dist/rsc/types/api-version.d.ts +1 -0
  517. package/dist/rsc/types/builder-block.d.ts +0 -0
  518. package/dist/rsc/types/builder-content.d.ts +0 -0
  519. package/dist/rsc/types/can-track.d.ts +0 -0
  520. package/dist/rsc/types/components.d.ts +0 -0
  521. package/dist/rsc/types/deep-partial.d.ts +0 -0
  522. package/dist/rsc/types/element.d.ts +0 -0
  523. package/dist/rsc/types/input.d.ts +0 -0
  524. package/dist/rsc/types/targets.d.ts +0 -0
  525. package/dist/rsc/types/typescript.d.ts +0 -0
  526. package/package.json +8 -9
  527. package/packages/react/src/blocks/BaseText.jsx +1 -0
  528. package/packages/react/src/blocks/button/button.jsx +1 -0
  529. package/packages/react/src/blocks/columns/columns.jsx +1 -0
  530. package/packages/react/src/blocks/custom-code/custom-code.jsx +1 -0
  531. package/packages/react/src/blocks/embed/embed.jsx +1 -0
  532. package/packages/react/src/blocks/form/form.jsx +1 -0
  533. package/packages/react/src/blocks/fragment/fragment.jsx +1 -0
  534. package/packages/react/src/blocks/image/image.jsx +1 -0
  535. package/packages/react/src/blocks/img/img.jsx +1 -0
  536. package/packages/react/src/blocks/input/input.jsx +1 -0
  537. package/packages/react/src/blocks/raw-text/raw-text.jsx +1 -0
  538. package/packages/react/src/blocks/section/section.jsx +1 -0
  539. package/packages/react/src/blocks/select/select.jsx +1 -0
  540. package/packages/react/src/blocks/submit-button/submit-button.jsx +1 -0
  541. package/packages/react/src/blocks/symbol/symbol.jsx +1 -0
  542. package/packages/react/src/blocks/text/text.jsx +1 -0
  543. package/packages/react/src/blocks/textarea/textarea.jsx +1 -0
  544. package/packages/react/src/blocks/video/video.jsx +1 -0
  545. package/packages/react/src/components/render-block/block-styles.jsx +1 -0
  546. package/packages/react/src/components/render-block/render-block.jsx +1 -0
  547. package/packages/react/src/components/render-block/render-component.jsx +1 -0
  548. package/packages/react/src/components/render-block/render-repeated-block.jsx +1 -0
  549. package/packages/react/src/components/render-blocks.jsx +1 -0
  550. package/packages/react/src/components/render-content/builder-editing.jsx +1 -0
  551. package/packages/react/src/components/render-content/components/render-styles.jsx +1 -0
  552. package/packages/react/src/components/render-content/render-content.jsx +1 -0
  553. package/packages/react/src/components/render-inlined-styles.jsx +1 -0
  554. package/packages/react/src/functions/get-content/index.js +1 -1
  555. package/packages/rsc/src/functions/get-content/index.js +1 -1
  556. package/tsconfig.base.json +8 -3
  557. package/tsconfig.react-cjs.json +10 -0
  558. package/tsconfig.react-esm.json +10 -0
  559. package/dist/react/components/render-block/render-component-with-context.js +0 -27
  560. package/dist/react/components/render-content-variants/helpers.js +0 -98
  561. package/dist/react/components/render-content-variants/render-content-variants.js +0 -45
  562. package/dist/react/functions/get-block-tag.js +0 -4
  563. package/tsconfig.react.json +0 -7
  564. /package/dist/react/{components → cjs/components}/render-block/types.js +0 -0
  565. /package/dist/react/{components → cjs/components}/render-content/render-content.types.js +0 -0
  566. /package/dist/react/{context → cjs/context}/types.js +0 -0
  567. /package/dist/react/{functions → cjs/functions}/get-content/types.js +0 -0
  568. /package/dist/react/{index-helpers/blocks-exports.js → cjs/index-helpers/blocks-exports.d.ts} +0 -0
  569. /package/dist/react/{types → cjs/types}/builder-block.js +0 -0
  570. /package/dist/react/{types → cjs/types}/builder-content.js +0 -0
  571. /package/dist/react/{types → cjs/types}/can-track.js +0 -0
  572. /package/dist/react/{types → cjs/types}/components.js +0 -0
  573. /package/dist/react/{types → cjs/types}/deep-partial.js +0 -0
  574. /package/dist/react/{types → cjs/types}/element.js +0 -0
  575. /package/dist/react/{types → cjs/types}/input.js +0 -0
  576. /package/dist/react/{types → cjs/types}/targets.js +0 -0
  577. /package/dist/react/{types → cjs/types}/typescript.js +0 -0
  578. /package/dist/react/{blocks → esm/blocks}/button/component-info.js +0 -0
  579. /package/dist/react/{blocks → esm/blocks}/columns/component-info.js +0 -0
  580. /package/dist/react/{blocks → esm/blocks}/custom-code/component-info.js +0 -0
  581. /package/dist/react/{blocks → esm/blocks}/embed/component-info.js +0 -0
  582. /package/dist/react/{blocks → esm/blocks}/embed/helpers.js +0 -0
  583. /package/dist/react/{blocks → esm/blocks}/form/component-info.js +0 -0
  584. /package/dist/react/{blocks → esm/blocks}/fragment/component-info.js +0 -0
  585. /package/dist/react/{blocks → esm/blocks}/image/component-info.js +0 -0
  586. /package/dist/react/{blocks → esm/blocks}/image/image.helpers.js +0 -0
  587. /package/dist/react/{blocks → esm/blocks}/img/component-info.js +0 -0
  588. /package/dist/react/{blocks → esm/blocks}/input/component-info.js +0 -0
  589. /package/dist/react/{blocks → esm/blocks}/raw-text/component-info.js +0 -0
  590. /package/dist/react/{blocks → esm/blocks}/section/component-info.js +0 -0
  591. /package/dist/react/{blocks → esm/blocks}/select/component-info.js +0 -0
  592. /package/dist/react/{blocks → esm/blocks}/submit-button/component-info.js +0 -0
  593. /package/dist/react/{blocks → esm/blocks}/symbol/component-info.js +0 -0
  594. /package/dist/react/{blocks → esm/blocks}/text/component-info.js +0 -0
  595. /package/dist/react/{blocks → esm/blocks}/textarea/component-info.js +0 -0
  596. /package/dist/react/{blocks → esm/blocks}/util.js +0 -0
  597. /package/dist/react/{blocks → esm/blocks}/video/component-info.js +0 -0
  598. /package/dist/react/{components → esm/components}/render-block/render-block.helpers.js +0 -0
  599. /package/dist/react/{components → esm/components}/render-content/components/render-styles.helpers.js +0 -0
  600. /package/dist/react/{components → esm/components}/render-content/index.js +0 -0
  601. /package/dist/react/{components → esm/components}/render-content/render-content.helpers.js +0 -0
  602. /package/dist/react/{constants → esm/constants}/builder-registered-components.js +0 -0
  603. /package/dist/react/{constants → esm/constants}/device-sizes.js +0 -0
  604. /package/dist/react/{constants → esm/constants}/target.js +0 -0
  605. /package/dist/react/{context → esm/context}/builder.context.js +0 -0
  606. /package/dist/react/{functions → esm/functions}/camel-to-kebab-case.js +0 -0
  607. /package/dist/react/{functions → esm/functions}/evaluate.js +0 -0
  608. /package/dist/react/{functions → esm/functions}/event-handler-name.js +0 -0
  609. /package/dist/react/{functions → esm/functions}/extract-text-styles.js +0 -0
  610. /package/dist/react/{functions → esm/functions}/fast-clone.js +0 -0
  611. /package/dist/react/{functions → esm/functions}/get-block-actions-handler.js +0 -0
  612. /package/dist/react/{functions → esm/functions}/get-block-actions.js +0 -0
  613. /package/dist/react/{functions → esm/functions}/get-block-component-options.js +0 -0
  614. /package/dist/react/{functions → esm/functions}/get-block-properties.js +0 -0
  615. /package/dist/react/{functions → esm/functions}/get-builder-search-params/fn.test.js +0 -0
  616. /package/dist/react/{functions → esm/functions}/get-builder-search-params/index.js +0 -0
  617. /package/dist/react/{functions → esm/functions}/get-content/ab-testing.js +0 -0
  618. /package/dist/react/{functions → esm/functions}/get-content/generate-content-url.js +0 -0
  619. /package/dist/react/{functions → esm/functions}/get-content/generate-content-url.test.js +0 -0
  620. /package/dist/react/{functions → esm/functions}/get-fetch.js +0 -0
  621. /package/dist/react/{functions → esm/functions}/get-global-this.js +0 -0
  622. /package/dist/react/{functions → esm/functions}/get-processed-block.js +0 -0
  623. /package/dist/react/{functions → esm/functions}/get-processed-block.test.js +0 -0
  624. /package/dist/react/{functions → esm/functions}/get-react-native-block-styles.js +0 -0
  625. /package/dist/react/{functions → esm/functions}/if-target.js +0 -0
  626. /package/dist/react/{functions → esm/functions}/is-browser.js +0 -0
  627. /package/dist/react/{functions → esm/functions}/is-editing.js +0 -0
  628. /package/dist/react/{functions → esm/functions}/is-iframe.js +0 -0
  629. /package/dist/react/{functions → esm/functions}/is-previewing.js +0 -0
  630. /package/dist/react/{functions → esm/functions}/on-change.js +0 -0
  631. /package/dist/react/{functions → esm/functions}/on-change.test.js +0 -0
  632. /package/dist/react/{functions → esm/functions}/register-component.js +0 -0
  633. /package/dist/react/{functions → esm/functions}/register.js +0 -0
  634. /package/dist/react/{functions → esm/functions}/sanitize-react-native-block-styles.js +0 -0
  635. /package/dist/react/{functions → esm/functions}/set-editor-settings.js +0 -0
  636. /package/dist/react/{functions → esm/functions}/set.js +0 -0
  637. /package/dist/react/{functions → esm/functions}/set.test.js +0 -0
  638. /package/dist/react/{functions → esm/functions}/track/helpers.js +0 -0
  639. /package/dist/react/{functions → esm/functions}/track/index.js +0 -0
  640. /package/dist/react/{functions → esm/functions}/track/interaction.js +0 -0
  641. /package/dist/react/{functions → esm/functions}/transform-block-properties.js +0 -0
  642. /package/dist/react/{functions → esm/functions}/transform-block.js +0 -0
  643. /package/dist/react/{helpers → esm/helpers}/ab-tests.js +0 -0
  644. /package/dist/react/{helpers → esm/helpers}/cookie.js +0 -0
  645. /package/dist/react/{helpers → esm/helpers}/css.js +0 -0
  646. /package/dist/react/{helpers → esm/helpers}/flatten.js +0 -0
  647. /package/dist/react/{helpers → esm/helpers}/localStorage.js +0 -0
  648. /package/dist/react/{helpers → esm/helpers}/logger.js +0 -0
  649. /package/dist/react/{helpers → esm/helpers}/nullable.js +0 -0
  650. /package/dist/react/{helpers → esm/helpers}/sessionId.js +0 -0
  651. /package/dist/react/{helpers → esm/helpers}/time.js +0 -0
  652. /package/dist/react/{helpers → esm/helpers}/url.js +0 -0
  653. /package/dist/react/{helpers → esm/helpers}/url.test.js +0 -0
  654. /package/dist/react/{helpers → esm/helpers}/uuid.js +0 -0
  655. /package/dist/react/{helpers → esm/helpers}/visitorId.js +0 -0
  656. /package/dist/react/{index-helpers → esm/index-helpers}/top-of-file.js +0 -0
  657. /package/dist/react/{index.js → esm/index.js} +0 -0
  658. /package/dist/react/{scripts → esm/scripts}/init-editing.js +0 -0
  659. /package/dist/react/{types → esm/types}/api-version.js +0 -0
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getFontCss = exports.getCss = void 0;
4
+ const getCssFromFont = (font) => {
5
+ var _a, _b;
6
+ const family = font.family + (font.kind && !font.kind.includes("#") ? ", " + font.kind : "");
7
+ const name = family.split(",")[0];
8
+ const url = (_b = font.fileUrl) != null ? _b : (_a = font == null ? void 0 : font.files) == null ? void 0 : _a.regular;
9
+ let str = "";
10
+ if (url && family && name) {
11
+ str += `
12
+ @font-face {
13
+ font-family: "${family}";
14
+ src: local("${name}"), url('${url}') format('woff2');
15
+ font-display: fallback;
16
+ font-weight: 400;
17
+ }
18
+ `.trim();
19
+ }
20
+ if (font.files) {
21
+ for (const weight in font.files) {
22
+ const isNumber = String(Number(weight)) === weight;
23
+ if (!isNumber) {
24
+ continue;
25
+ }
26
+ const weightUrl = font.files[weight];
27
+ if (weightUrl && weightUrl !== url) {
28
+ str += `
29
+ @font-face {
30
+ font-family: "${family}";
31
+ src: url('${weightUrl}') format('woff2');
32
+ font-display: fallback;
33
+ font-weight: ${weight};
34
+ }
35
+ `.trim();
36
+ }
37
+ }
38
+ }
39
+ return str;
40
+ };
41
+ const getFontCss = ({ customFonts }) => {
42
+ var _a;
43
+ return ((_a = customFonts == null ? void 0 : customFonts.map((font) => getCssFromFont(font))) == null ? void 0 : _a.join(" ")) || "";
44
+ };
45
+ exports.getFontCss = getFontCss;
46
+ const getCss = ({ cssCode, contentId }) => {
47
+ if (!cssCode) {
48
+ return "";
49
+ }
50
+ if (!contentId) {
51
+ return cssCode;
52
+ }
53
+ return (cssCode == null ? void 0 : cssCode.replace(/&/g, `div[builder-content-id="${contentId}"]`)) || "";
54
+ };
55
+ exports.getCss = getCss;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ "use client";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const React = require("react");
5
+ const react_1 = require("react");
6
+ const render_inlined_styles_1 = require("../../render-inlined-styles");
7
+ const render_styles_helpers_1 = require("./render-styles.helpers");
8
+ const render_styles_helpers_2 = require("./render-styles.helpers");
9
+ function RenderContentStyles(props) {
10
+ const [injectedStyles, setInjectedStyles] = (0, react_1.useState)(() => `
11
+ ${(0, render_styles_helpers_1.getCss)({
12
+ cssCode: props.cssCode,
13
+ contentId: props.contentId,
14
+ })}
15
+ ${(0, render_styles_helpers_2.getFontCss)({
16
+ customFonts: props.customFonts,
17
+ })}
18
+
19
+ .builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
20
+ margin: 0;
21
+ }
22
+ .builder-text > p, .builder-text > .builder-paragraph {
23
+ color: inherit;
24
+ line-height: inherit;
25
+ letter-spacing: inherit;
26
+ font-weight: inherit;
27
+ font-size: inherit;
28
+ text-align: inherit;
29
+ font-family: inherit;
30
+ }
31
+ `);
32
+ return React.createElement(render_inlined_styles_1.default, { styles: injectedStyles });
33
+ }
34
+ exports.default = RenderContentStyles;
@@ -0,0 +1,2 @@
1
+ export { default2 as default };
2
+ import { default as default2 } from "./render-content";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = void 0;
4
+ const render_content_1 = require("./render-content");
5
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return render_content_1.default; } });
@@ -0,0 +1,2 @@
1
+ export default RenderContent;
2
+ declare function RenderContent(props: any): JSX.Element;
@@ -0,0 +1,9 @@
1
+ export function getContentInitialValue({ content, data }: {
2
+ content: any;
3
+ data: any;
4
+ }): any;
5
+ export function getContextStateInitialValue({ content, data, locale }: {
6
+ content: any;
7
+ data: any;
8
+ locale: any;
9
+ }): any;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getContextStateInitialValue = exports.getContentInitialValue = void 0;
4
+ var __defProp = Object.defineProperty;
5
+ var __defProps = Object.defineProperties;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
+ var __spreadValues = (a, b) => {
12
+ for (var prop in b || (b = {}))
13
+ if (__hasOwnProp.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ if (__getOwnPropSymbols)
16
+ for (var prop of __getOwnPropSymbols(b)) {
17
+ if (__propIsEnum.call(b, prop))
18
+ __defNormalProp(a, prop, b[prop]);
19
+ }
20
+ return a;
21
+ };
22
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
23
+ const getContextStateInitialValue = ({ content, data, locale }) => {
24
+ var _a, _b, _c;
25
+ const defaultValues = {};
26
+ (_b = (_a = content == null ? void 0 : content.data) == null ? void 0 : _a.inputs) == null ? void 0 : _b.forEach((input) => {
27
+ var _a2;
28
+ if (input.name && input.defaultValue !== void 0 && ((_a2 = content == null ? void 0 : content.data) == null ? void 0 : _a2.state) && content.data.state[input.name] === void 0) {
29
+ defaultValues[input.name] = input.defaultValue;
30
+ }
31
+ });
32
+ const stateToUse = __spreadValues(__spreadValues(__spreadValues({}, (_c = content == null ? void 0 : content.data) == null ? void 0 : _c.state), data), locale ? { locale } : {});
33
+ return __spreadValues(__spreadValues({}, defaultValues), stateToUse);
34
+ };
35
+ exports.getContextStateInitialValue = getContextStateInitialValue;
36
+ const getContentInitialValue = ({ content, data }) => {
37
+ return !content ? void 0 : __spreadProps(__spreadValues({}, content), {
38
+ data: __spreadValues(__spreadValues({}, content == null ? void 0 : content.data), data),
39
+ meta: content == null ? void 0 : content.meta
40
+ });
41
+ };
42
+ exports.getContentInitialValue = getContentInitialValue;
@@ -0,0 +1,297 @@
1
+ "use strict";
2
+ "use client";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const React = require("react");
5
+ const react_1 = require("react");
6
+ const builder_registered_components_js_1 = require("../../constants/builder-registered-components.js");
7
+ const evaluate_js_1 = require("../../functions/evaluate.js");
8
+ const index_js_1 = require("../../functions/get-content/index.js");
9
+ const get_fetch_js_1 = require("../../functions/get-fetch.js");
10
+ const is_browser_js_1 = require("../../functions/is-browser.js");
11
+ const is_editing_js_1 = require("../../functions/is-editing.js");
12
+ const is_previewing_js_1 = require("../../functions/is-previewing.js");
13
+ const register_component_js_1 = require("../../functions/register-component.js");
14
+ const index_js_2 = require("../../functions/track/index.js");
15
+ const render_blocks_1 = require("../render-blocks");
16
+ const render_styles_1 = require("./components/render-styles");
17
+ const builder_context_js_1 = require("../../context/builder.context.js");
18
+ const init_editing_js_1 = require("../../scripts/init-editing.js");
19
+ const nullable_js_1 = require("../../helpers/nullable.js");
20
+ const interaction_js_1 = require("../../functions/track/interaction.js");
21
+ const render_content_helpers_js_1 = require("./render-content.helpers.js");
22
+ const target_js_1 = require("../../constants/target.js");
23
+ const logger_js_1 = require("../../helpers/logger.js");
24
+ function RenderContent(props) {
25
+ const elementRef = (0, react_1.useRef)(null);
26
+ const [forceReRenderCount, setForceReRenderCount] = (0, react_1.useState)(() => 0);
27
+ const [overrideContent, setOverrideContent] = (0, react_1.useState)(() => null);
28
+ const [useContent, setUseContent] = (0, react_1.useState)(() => (0, render_content_helpers_js_1.getContentInitialValue)({
29
+ content: props.content,
30
+ data: props.data,
31
+ }));
32
+ function mergeNewContent(newContent) {
33
+ setUseContent({
34
+ ...useContent,
35
+ ...newContent,
36
+ data: {
37
+ ...useContent?.data,
38
+ ...newContent?.data,
39
+ },
40
+ meta: {
41
+ ...useContent?.meta,
42
+ ...newContent?.meta,
43
+ breakpoints: newContent?.meta?.breakpoints || useContent?.meta?.breakpoints,
44
+ },
45
+ });
46
+ }
47
+ function setBreakpoints(breakpoints) {
48
+ setUseContent({
49
+ ...useContent,
50
+ meta: {
51
+ ...useContent?.meta,
52
+ breakpoints,
53
+ },
54
+ });
55
+ }
56
+ const [update, setUpdate] = (0, react_1.useState)(() => 0);
57
+ const [canTrackToUse, setCanTrackToUse] = (0, react_1.useState)(() => (0, nullable_js_1.checkIsDefined)(props.canTrack) ? props.canTrack : true);
58
+ const [contentState, setContentState] = (0, react_1.useState)(() => (0, render_content_helpers_js_1.getContextStateInitialValue)({
59
+ content: props.content,
60
+ data: props.data,
61
+ locale: props.locale,
62
+ }));
63
+ function setContextState(newState) {
64
+ setContentState(newState);
65
+ }
66
+ const [allRegisteredComponents, setAllRegisteredComponents] = (0, react_1.useState)(() => [
67
+ ...(0, builder_registered_components_js_1.getDefaultRegisteredComponents)(),
68
+ // While this `components` object is deprecated, we must maintain support for it.
69
+ // Since users are able to override our default components, we need to make sure that we do not break such
70
+ // existing usage.
71
+ // This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
72
+ // which is the new standard way of providing custom components, and must therefore take precedence.
73
+ ...register_component_js_1.components,
74
+ ...(props.customComponents || []),
75
+ ].reduce((acc, curr) => ({
76
+ ...acc,
77
+ [curr.name]: curr,
78
+ }), {}));
79
+ function processMessage(event) {
80
+ const { data } = event;
81
+ if (data) {
82
+ switch (data.type) {
83
+ case "builder.configureSdk": {
84
+ const messageContent = data.data;
85
+ const { breakpoints, contentId } = messageContent;
86
+ if (!contentId || contentId !== useContent?.id) {
87
+ return;
88
+ }
89
+ if (breakpoints) {
90
+ setBreakpoints(breakpoints);
91
+ }
92
+ setForceReRenderCount(forceReRenderCount + 1); // This is a hack to force Qwik to re-render.
93
+ break;
94
+ }
95
+ case "builder.contentUpdate": {
96
+ const messageContent = data.data;
97
+ const key = messageContent.key ||
98
+ messageContent.alias ||
99
+ messageContent.entry ||
100
+ messageContent.modelName;
101
+ const contentData = messageContent.data;
102
+ if (key === props.model) {
103
+ mergeNewContent(contentData);
104
+ setForceReRenderCount(forceReRenderCount + 1); // This is a hack to force Qwik to re-render.
105
+ }
106
+ break;
107
+ }
108
+ case "builder.patchUpdates": {
109
+ // TODO
110
+ break;
111
+ }
112
+ }
113
+ }
114
+ }
115
+ function evaluateJsCode() {
116
+ // run any dynamic JS code attached to content
117
+ const jsCode = useContent?.data?.jsCode;
118
+ if (jsCode) {
119
+ (0, evaluate_js_1.evaluate)({
120
+ code: jsCode,
121
+ context: props.context || {},
122
+ state: contentState,
123
+ });
124
+ }
125
+ }
126
+ const [httpReqsData, setHttpReqsData] = (0, react_1.useState)(() => ({}));
127
+ const [clicked, setClicked] = (0, react_1.useState)(() => false);
128
+ function onClick(event) {
129
+ if (useContent) {
130
+ const variationId = useContent?.testVariationId;
131
+ const contentId = useContent?.id;
132
+ (0, index_js_2._track)({
133
+ type: "click",
134
+ canTrack: canTrackToUse,
135
+ contentId,
136
+ apiKey: props.apiKey,
137
+ variationId: variationId !== contentId ? variationId : undefined,
138
+ ...(0, interaction_js_1.getInteractionPropertiesForEvent)(event),
139
+ unique: !clicked,
140
+ });
141
+ }
142
+ if (!clicked) {
143
+ setClicked(true);
144
+ }
145
+ }
146
+ function evalExpression(expression) {
147
+ return expression.replace(/{{([^}]+)}}/g, (_match, group) => (0, evaluate_js_1.evaluate)({
148
+ code: group,
149
+ context: props.context || {},
150
+ state: contentState,
151
+ }));
152
+ }
153
+ function handleRequest({ url, key }) {
154
+ (0, get_fetch_js_1.fetch)(url)
155
+ .then((response) => response.json())
156
+ .then((json) => {
157
+ const newState = {
158
+ ...contentState,
159
+ [key]: json,
160
+ };
161
+ setContextState(newState);
162
+ })
163
+ .catch((err) => {
164
+ console.error("error fetching dynamic data", url, err);
165
+ });
166
+ }
167
+ function runHttpRequests() {
168
+ const requests = useContent?.data?.httpRequests ?? {};
169
+ Object.entries(requests).forEach(([key, url]) => {
170
+ if (url && (!httpReqsData[key] || (0, is_editing_js_1.isEditing)())) {
171
+ const evaluatedUrl = evalExpression(url);
172
+ handleRequest({
173
+ url: evaluatedUrl,
174
+ key,
175
+ });
176
+ }
177
+ });
178
+ }
179
+ function emitStateUpdate() {
180
+ if ((0, is_editing_js_1.isEditing)()) {
181
+ window.dispatchEvent(new CustomEvent("builder:component:stateChange", {
182
+ detail: {
183
+ state: contentState,
184
+ ref: {
185
+ name: props.model,
186
+ },
187
+ },
188
+ }));
189
+ }
190
+ }
191
+ (0, react_1.useEffect)(() => {
192
+ if (!props.apiKey) {
193
+ logger_js_1.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop.");
194
+ }
195
+ if ((0, is_browser_js_1.isBrowser)()) {
196
+ if ((0, is_editing_js_1.isEditing)()) {
197
+ setForceReRenderCount(forceReRenderCount + 1);
198
+ (0, init_editing_js_1.registerInsertMenu)();
199
+ (0, init_editing_js_1.setupBrowserForEditing)({
200
+ ...(props.locale
201
+ ? {
202
+ locale: props.locale,
203
+ }
204
+ : {}),
205
+ ...(props.includeRefs
206
+ ? {
207
+ includeRefs: props.includeRefs,
208
+ }
209
+ : {}),
210
+ });
211
+ Object.values(allRegisteredComponents).forEach((registeredComponent) => {
212
+ const message = (0, register_component_js_1.createRegisterComponentMessage)(registeredComponent);
213
+ window.parent?.postMessage(message, "*");
214
+ });
215
+ window.addEventListener("message", processMessage);
216
+ window.addEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate);
217
+ }
218
+ if (useContent) {
219
+ const variationId = useContent?.testVariationId;
220
+ const contentId = useContent?.id;
221
+ (0, index_js_2._track)({
222
+ type: "impression",
223
+ canTrack: canTrackToUse,
224
+ contentId,
225
+ apiKey: props.apiKey,
226
+ variationId: variationId !== contentId ? variationId : undefined,
227
+ });
228
+ }
229
+ // override normal content in preview mode
230
+ if ((0, is_previewing_js_1.isPreviewing)()) {
231
+ const searchParams = new URL(location.href).searchParams;
232
+ const searchParamPreviewModel = searchParams.get("builder.preview");
233
+ const searchParamPreviewId = searchParams.get(`builder.preview.${searchParamPreviewModel}`);
234
+ const previewApiKey = searchParams.get("apiKey") || searchParams.get("builder.space");
235
+ /**
236
+ * Make sure that:
237
+ * - the preview model name is the same as the one we're rendering, since there can be multiple models rendered * at the same time, e.g. header/page/footer. * - the API key is the same, since we don't want to preview content from other organizations.
238
+ * - if there is content, that the preview ID is the same as that of the one we receive.
239
+ *
240
+ * TO-DO: should we only update the state when there is a change?
241
+ **/
242
+ if (searchParamPreviewModel === props.model &&
243
+ previewApiKey === props.apiKey &&
244
+ (!props.content || searchParamPreviewId === props.content.id)) {
245
+ (0, index_js_1.getContent)({
246
+ model: props.model,
247
+ apiKey: props.apiKey,
248
+ apiVersion: props.apiVersion,
249
+ }).then((content) => {
250
+ if (content) {
251
+ mergeNewContent(content);
252
+ }
253
+ });
254
+ }
255
+ }
256
+ evaluateJsCode();
257
+ runHttpRequests();
258
+ emitStateUpdate();
259
+ }
260
+ }, []);
261
+ (0, react_1.useEffect)(() => {
262
+ if (props.content) {
263
+ mergeNewContent(props.content);
264
+ }
265
+ }, [props.content]);
266
+ (0, react_1.useEffect)(() => {
267
+ evaluateJsCode();
268
+ }, [useContent?.data?.jsCode, contentState]);
269
+ (0, react_1.useEffect)(() => {
270
+ runHttpRequests();
271
+ }, [useContent?.data?.httpRequests]);
272
+ (0, react_1.useEffect)(() => {
273
+ emitStateUpdate();
274
+ }, [contentState]);
275
+ (0, react_1.useEffect)(() => {
276
+ return () => {
277
+ if ((0, is_browser_js_1.isBrowser)()) {
278
+ window.removeEventListener("message", processMessage);
279
+ window.removeEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate);
280
+ }
281
+ };
282
+ }, []);
283
+ return (React.createElement(builder_context_js_1.default.Provider, { value: {
284
+ content: useContent,
285
+ state: contentState,
286
+ setState: setContextState,
287
+ context: props.context || {},
288
+ apiKey: props.apiKey,
289
+ apiVersion: props.apiVersion,
290
+ registeredComponents: allRegisteredComponents,
291
+ } }, useContent ? (React.createElement(React.Fragment, null,
292
+ React.createElement("div", { ref: elementRef, onClick: (event) => onClick(event), "builder-content-id": useContent?.id, "builder-model": props.model },
293
+ target_js_1.TARGET !== "reactNative" ? (React.createElement(React.Fragment, null,
294
+ React.createElement(render_styles_1.default, { contentId: useContent?.id, cssCode: useContent?.data?.cssCode, customFonts: useContent?.data?.customFonts }))) : null,
295
+ React.createElement(render_blocks_1.default, { blocks: useContent?.data?.blocks, key: forceReRenderCount })))) : null));
296
+ }
297
+ exports.default = RenderContent;
@@ -0,0 +1,2 @@
1
+ export default RenderInlinedStyles;
2
+ declare function RenderInlinedStyles(props: any): JSX.Element;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ "use client";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const React = require("react");
5
+ const target_js_1 = require("../constants/target.js");
6
+ function RenderInlinedStyles(props) {
7
+ function tag() {
8
+ // NOTE: we have to obfusctate the name of the tag due to a limitation in the svelte-preprocessor plugin.
9
+ // https://github.com/sveltejs/vite-plugin-svelte/issues/315#issuecomment-1109000027
10
+ return "sty" + "le";
11
+ }
12
+ function injectedStyleScript() {
13
+ return `<${tag()}>${props.styles}</${tag()}>`;
14
+ }
15
+ const TagRef = tag();
16
+ return (React.createElement(React.Fragment, null, target_js_1.TARGET === "svelte" || target_js_1.TARGET === "qwik" ? (React.createElement(React.Fragment, null,
17
+ React.createElement(TagRef, { dangerouslySetInnerHTML: { __html: props.styles } }))) : (React.createElement(TagRef, null, props.styles))));
18
+ }
19
+ exports.default = RenderInlinedStyles;
@@ -0,0 +1 @@
1
+ export function getDefaultRegisteredComponents(): any[];
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getDefaultRegisteredComponents = void 0;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
8
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
+ var __spreadValues = (a, b) => {
10
+ for (var prop in b || (b = {}))
11
+ if (__hasOwnProp.call(b, prop))
12
+ __defNormalProp(a, prop, b[prop]);
13
+ if (__getOwnPropSymbols)
14
+ for (var prop of __getOwnPropSymbols(b)) {
15
+ if (__propIsEnum.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ }
18
+ return a;
19
+ };
20
+ const button_1 = require("../blocks/button/button");
21
+ const component_info_js_1 = require("../blocks/button/component-info.js");
22
+ const columns_1 = require("../blocks/columns/columns");
23
+ const component_info_js_2 = require("../blocks/columns/component-info.js");
24
+ const component_info_js_3 = require("../blocks/fragment/component-info.js");
25
+ const fragment_1 = require("../blocks/fragment/fragment");
26
+ const component_info_js_4 = require("../blocks/image/component-info.js");
27
+ const image_1 = require("../blocks/image/image");
28
+ const component_info_js_5 = require("../blocks/section/component-info.js");
29
+ const section_1 = require("../blocks/section/section");
30
+ const component_info_js_6 = require("../blocks/symbol/component-info.js");
31
+ const symbol_1 = require("../blocks/symbol/symbol");
32
+ const component_info_js_7 = require("../blocks/text/component-info.js");
33
+ const text_1 = require("../blocks/text/text");
34
+ const component_info_js_8 = require("../blocks/video/component-info.js");
35
+ const video_1 = require("../blocks/video/video");
36
+ const component_info_js_9 = require("../blocks/embed/component-info.js");
37
+ const embed_1 = require("../blocks/embed/embed");
38
+ const img_1 = require("../blocks/img/img");
39
+ const component_info_js_10 = require("../blocks/img/component-info.js");
40
+ const custom_code_1 = require("../blocks/custom-code/custom-code");
41
+ const component_info_js_11 = require("../blocks/custom-code/component-info.js");
42
+ const getDefaultRegisteredComponents = () => [
43
+ __spreadValues({ component: button_1.default }, component_info_js_1.componentInfo),
44
+ __spreadValues({ component: columns_1.default }, component_info_js_2.componentInfo),
45
+ __spreadValues({ component: custom_code_1.default }, component_info_js_11.componentInfo),
46
+ __spreadValues({ component: embed_1.default }, component_info_js_9.componentInfo),
47
+ __spreadValues({ component: fragment_1.default }, component_info_js_3.componentInfo),
48
+ __spreadValues({ component: image_1.default }, component_info_js_4.componentInfo),
49
+ __spreadValues({ component: img_1.default }, component_info_js_10.componentInfo),
50
+ __spreadValues({ component: section_1.default }, component_info_js_5.componentInfo),
51
+ __spreadValues({ component: symbol_1.default }, component_info_js_6.componentInfo),
52
+ __spreadValues({ component: text_1.default }, component_info_js_7.componentInfo),
53
+ __spreadValues({ component: video_1.default }, component_info_js_8.componentInfo)
54
+ ];
55
+ exports.getDefaultRegisteredComponents = getDefaultRegisteredComponents;
@@ -0,0 +1,21 @@
1
+ export function getMaxWidthQueryForSize(size: any, sizeValues?: {
2
+ small: {
3
+ min: number;
4
+ default: number;
5
+ max: number;
6
+ };
7
+ medium: {
8
+ min: number;
9
+ default: number;
10
+ max: number;
11
+ };
12
+ large: {
13
+ min: number;
14
+ default: number;
15
+ max: number;
16
+ };
17
+ }): string;
18
+ export function getSizesForBreakpoints({ small, medium }: {
19
+ small: any;
20
+ medium: any;
21
+ }): any;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSizesForBreakpoints = exports.getMaxWidthQueryForSize = void 0;
4
+ const fast_clone_1 = require("../functions/fast-clone");
5
+ const SIZES = {
6
+ small: {
7
+ min: 320,
8
+ default: 321,
9
+ max: 640
10
+ },
11
+ medium: {
12
+ min: 641,
13
+ default: 642,
14
+ max: 991
15
+ },
16
+ large: {
17
+ min: 990,
18
+ default: 991,
19
+ max: 1200
20
+ }
21
+ };
22
+ const getMaxWidthQueryForSize = (size, sizeValues = SIZES) => `@media (max-width: ${sizeValues[size].max}px)`;
23
+ exports.getMaxWidthQueryForSize = getMaxWidthQueryForSize;
24
+ const getSizesForBreakpoints = ({ small, medium }) => {
25
+ const newSizes = (0, fast_clone_1.fastClone)(SIZES);
26
+ if (!small || !medium) {
27
+ return newSizes;
28
+ }
29
+ const smallMin = Math.floor(small / 2);
30
+ newSizes.small = {
31
+ max: small,
32
+ min: smallMin,
33
+ default: smallMin + 1
34
+ };
35
+ const mediumMin = newSizes.small.max + 1;
36
+ newSizes.medium = {
37
+ max: medium,
38
+ min: mediumMin,
39
+ default: mediumMin + 1
40
+ };
41
+ const largeMin = newSizes.medium.max + 1;
42
+ newSizes.large = {
43
+ max: 2e3,
44
+ min: largeMin,
45
+ default: largeMin + 1
46
+ };
47
+ return newSizes;
48
+ };
49
+ exports.getSizesForBreakpoints = getSizesForBreakpoints;
@@ -0,0 +1 @@
1
+ export const TARGET: "react";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TARGET = void 0;
4
+ const TARGET = "react";
5
+ exports.TARGET = TARGET;
@@ -0,0 +1,11 @@
1
+ export { stdin_default as default };
2
+ declare var stdin_default: import("react").Context<{
3
+ content: null;
4
+ context: {};
5
+ state: {};
6
+ setState(): void;
7
+ apiKey: null;
8
+ apiVersion: undefined;
9
+ registeredComponents: {};
10
+ inheritedStyles: {};
11
+ }>;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = void 0;
4
+ const react_1 = require("react");
5
+ var stdin_default = (0, react_1.createContext)({
6
+ content: null,
7
+ context: {},
8
+ state: {},
9
+ setState() {
10
+ },
11
+ apiKey: null,
12
+ apiVersion: void 0,
13
+ registeredComponents: {},
14
+ inheritedStyles: {}
15
+ });
16
+ exports.default = stdin_default;
File without changes
@@ -0,0 +1 @@
1
+ export function camelToKebabCase(string: any): any;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.camelToKebabCase = void 0;
4
+ const camelToKebabCase = (string) => string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
5
+ exports.camelToKebabCase = camelToKebabCase;