@builder.io/sdk-react 0.4.4 → 0.5.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 (406) hide show
  1. package/dist/{sdk/blocks → blocks}/BaseText.d.ts +0 -1
  2. package/dist/{sdk/blocks → blocks}/BaseText.js +2 -2
  3. package/dist/{sdk/blocks → blocks}/button/button.d.ts +3 -2
  4. package/dist/{sdk/blocks → blocks}/button/button.js +3 -5
  5. package/dist/blocks/button/component-info.d.ts +2 -0
  6. package/dist/{sdk/blocks → blocks}/button/component-info.js +9 -13
  7. package/dist/blocks/columns/columns.d.ts +16 -0
  8. package/dist/{sdk/blocks → blocks}/columns/columns.js +15 -21
  9. package/dist/blocks/columns/component-info.d.ts +2 -0
  10. package/dist/{sdk/blocks → blocks}/columns/component-info.js +62 -83
  11. package/dist/blocks/custom-code/component-info.d.ts +2 -0
  12. package/dist/{sdk/blocks → blocks}/custom-code/component-info.js +7 -11
  13. package/dist/{sdk/blocks → blocks}/custom-code/custom-code.d.ts +0 -1
  14. package/dist/{sdk/blocks → blocks}/custom-code/custom-code.js +1 -1
  15. package/dist/blocks/embed/component-info.d.ts +2 -0
  16. package/dist/{sdk/blocks → blocks}/embed/component-info.js +8 -15
  17. package/dist/{sdk/blocks → blocks}/embed/embed.d.ts +0 -1
  18. package/dist/{sdk/blocks → blocks}/embed/embed.js +1 -1
  19. package/dist/blocks/embed/helpers.js +2 -0
  20. package/dist/blocks/form/component-info.d.ts +2 -0
  21. package/dist/{sdk/blocks → blocks}/form/component-info.js +94 -129
  22. package/dist/blocks/form/form.d.ts +2 -0
  23. package/dist/blocks/form/form.js +6 -0
  24. package/dist/blocks/fragment/component-info.d.ts +2 -0
  25. package/dist/{sdk/blocks → blocks}/fragment/component-info.js +1 -1
  26. package/dist/{sdk/blocks → blocks}/fragment/fragment.d.ts +0 -1
  27. package/dist/{sdk/blocks → blocks}/fragment/fragment.js +1 -1
  28. package/dist/blocks/helpers.d.ts +13 -0
  29. package/dist/blocks/helpers.js +40 -0
  30. package/dist/blocks/image/component-info.d.ts +2 -0
  31. package/dist/{sdk/blocks → blocks}/image/component-info.js +33 -63
  32. package/dist/{sdk/blocks → blocks}/image/image.d.ts +0 -1
  33. package/dist/{sdk/blocks → blocks}/image/image.helpers.js +2 -11
  34. package/dist/{sdk/blocks → blocks}/image/image.js +7 -7
  35. package/dist/blocks/img/component-info.d.ts +2 -0
  36. package/dist/{sdk/blocks → blocks}/img/component-info.js +4 -6
  37. package/dist/{sdk/blocks → blocks}/img/img.d.ts +3 -2
  38. package/dist/{sdk/blocks → blocks}/img/img.js +1 -1
  39. package/dist/blocks/input/component-info.d.ts +2 -0
  40. package/dist/{sdk/blocks → blocks}/input/component-info.js +15 -40
  41. package/dist/{sdk/blocks → blocks}/input/input.d.ts +3 -2
  42. package/dist/{sdk/blocks → blocks}/input/input.js +1 -1
  43. package/dist/blocks/raw-text/component-info.d.ts +2 -0
  44. package/dist/{sdk/blocks → blocks}/raw-text/component-info.js +3 -5
  45. package/dist/{sdk/blocks → blocks}/raw-text/raw-text.d.ts +0 -1
  46. package/dist/blocks/raw-text/raw-text.js +6 -0
  47. package/dist/blocks/section/component-info.d.ts +2 -0
  48. package/dist/{sdk/blocks → blocks}/section/component-info.js +13 -18
  49. package/dist/{sdk/blocks → blocks}/section/section.d.ts +3 -2
  50. package/dist/{sdk/blocks → blocks}/section/section.js +1 -1
  51. package/dist/blocks/select/component-info.d.ts +2 -0
  52. package/dist/{sdk/blocks → blocks}/select/component-info.js +22 -34
  53. package/dist/{sdk/blocks → blocks}/select/select.d.ts +3 -2
  54. package/dist/{sdk/blocks → blocks}/select/select.js +1 -1
  55. package/dist/blocks/submit-button/component-info.d.ts +2 -0
  56. package/dist/{sdk/blocks → blocks}/submit-button/component-info.js +5 -7
  57. package/dist/{sdk/blocks → blocks}/submit-button/submit-button.d.ts +3 -2
  58. package/dist/{sdk/blocks → blocks}/submit-button/submit-button.js +1 -1
  59. package/dist/blocks/symbol/component-info.d.ts +2 -0
  60. package/dist/{sdk/blocks → blocks}/symbol/component-info.js +12 -17
  61. package/dist/blocks/symbol/symbol.d.ts +23 -0
  62. package/dist/blocks/symbol/symbol.helpers.d.ts +14 -0
  63. package/dist/blocks/symbol/symbol.helpers.js +31 -0
  64. package/dist/blocks/symbol/symbol.js +45 -0
  65. package/dist/blocks/text/component-info.d.ts +2 -0
  66. package/dist/{sdk/blocks → blocks}/text/component-info.js +6 -7
  67. package/dist/{sdk/blocks → blocks}/text/text.d.ts +1 -2
  68. package/dist/{sdk/blocks → blocks}/text/text.js +2 -2
  69. package/dist/blocks/textarea/component-info.d.ts +2 -0
  70. package/dist/{sdk/blocks → blocks}/textarea/component-info.js +13 -19
  71. package/dist/{sdk/blocks → blocks}/textarea/textarea.d.ts +3 -2
  72. package/dist/{sdk/blocks → blocks}/textarea/textarea.js +1 -1
  73. package/dist/blocks/video/component-info.d.ts +2 -0
  74. package/dist/{sdk/blocks → blocks}/video/component-info.js +35 -55
  75. package/dist/{sdk/blocks → blocks}/video/video.d.ts +1 -1
  76. package/dist/{sdk/blocks → blocks}/video/video.js +2 -2
  77. package/dist/components/block/block.d.ts +9 -0
  78. package/dist/components/block/block.helpers.d.ts +13 -0
  79. package/dist/{sdk/components/render-block/render-block.helpers.js → components/block/block.helpers.js} +12 -29
  80. package/dist/components/block/block.js +94 -0
  81. package/dist/{sdk/components/render-block → components/block/components}/block-styles.d.ts +2 -3
  82. package/dist/{sdk/components/render-block → components/block/components}/block-styles.js +23 -24
  83. package/dist/components/block/components/block-wrapper.d.ts +16 -0
  84. package/dist/components/block/components/block-wrapper.js +36 -0
  85. package/dist/components/block/components/component-ref/component-ref.d.ts +3 -0
  86. package/dist/components/block/components/component-ref/component-ref.helpers.d.ts +28 -0
  87. package/dist/components/block/components/component-ref/component-ref.helpers.js +22 -0
  88. package/dist/components/block/components/component-ref/component-ref.js +23 -0
  89. package/dist/components/block/components/interactive-element.d.ts +11 -0
  90. package/dist/components/block/components/interactive-element.js +20 -0
  91. package/dist/components/block/components/repeated-block.d.ts +9 -0
  92. package/dist/components/block/components/repeated-block.js +11 -0
  93. package/dist/components/blocks/blocks-wrapper.d.ts +10 -0
  94. package/dist/{sdk/components/render-blocks.js → components/blocks/blocks-wrapper.js} +6 -13
  95. package/dist/components/blocks/blocks.d.ts +8 -0
  96. package/dist/components/blocks/blocks.js +11 -0
  97. package/dist/components/content/components/enable-editor.d.ts +9 -0
  98. package/dist/{sdk/components/render-content/render-content.js → components/content/components/enable-editor.js} +69 -140
  99. package/dist/components/content/components/styles.d.ts +8 -0
  100. package/dist/{sdk/components/render-content/components/render-styles.helpers.d.ts → components/content/components/styles.helpers.d.ts} +1 -1
  101. package/dist/{sdk/components/render-content/components/render-styles.helpers.js → components/content/components/styles.helpers.js} +3 -4
  102. package/dist/{sdk/components/render-content/components/render-styles.js → components/content/components/styles.js} +7 -7
  103. package/dist/components/content/content.d.ts +3 -0
  104. package/dist/components/content/content.helpers.d.ts +7 -0
  105. package/dist/components/content/content.helpers.js +30 -0
  106. package/dist/components/content/content.js +79 -0
  107. package/dist/components/content/content.types.d.ts +24 -0
  108. package/dist/components/content/index.d.ts +1 -0
  109. package/dist/components/content/index.js +1 -0
  110. package/dist/components/content-variants/content-variants.d.ts +9 -0
  111. package/dist/components/content-variants/content-variants.js +46 -0
  112. package/dist/components/content-variants/content-variants.types.d.ts +20 -0
  113. package/dist/components/content-variants/helpers.d.ts +41 -0
  114. package/dist/{sdk/components/render-content-variants → components/content-variants}/helpers.js +46 -41
  115. package/dist/components/inlined-script.d.ts +6 -0
  116. package/dist/components/inlined-script.js +6 -0
  117. package/dist/components/inlined-styles.d.ts +6 -0
  118. package/dist/{sdk/components/render-inlined-styles.js → components/inlined-styles.js} +3 -3
  119. package/dist/{sdk/constants → constants}/builder-registered-components.js +34 -13
  120. package/dist/{sdk/constants → constants}/device-sizes.js +9 -8
  121. package/dist/constants/sdk-version.d.ts +1 -0
  122. package/dist/constants/sdk-version.js +1 -0
  123. package/dist/{sdk/context → context}/builder.context.js +1 -1
  124. package/dist/{sdk/context → context}/types.d.ts +1 -1
  125. package/dist/functions/acorn_interpreter.d.ts +1 -0
  126. package/dist/functions/acorn_interpreter.js +3027 -0
  127. package/dist/functions/apply-patch-with-mutation.d.ts +10 -0
  128. package/dist/functions/apply-patch-with-mutation.js +54 -0
  129. package/dist/functions/apply-patch-with-mutation.test.js +53 -0
  130. package/dist/functions/evaluate/acorn.d.ts +0 -0
  131. package/dist/functions/evaluate/acorn.js +2432 -0
  132. package/dist/{sdk/functions → functions/evaluate}/evaluate.d.ts +5 -2
  133. package/dist/functions/evaluate/evaluate.js +70 -0
  134. package/dist/functions/evaluate/evaluate.test.js +23 -0
  135. package/dist/functions/evaluate/index.d.ts +1 -0
  136. package/dist/functions/evaluate/index.js +1 -0
  137. package/dist/functions/evaluate/interpreter.d.ts +2 -0
  138. package/dist/functions/evaluate/interpreter.js +3853 -0
  139. package/dist/functions/evaluate/non-node-runtime.d.ts +2 -0
  140. package/dist/functions/evaluate/non-node-runtime.js +84 -0
  141. package/dist/functions/evaluate/types.d.ts +10 -0
  142. package/dist/functions/evaluate.d.ts +23 -0
  143. package/dist/{sdk/functions → functions}/evaluate.js +28 -9
  144. package/dist/{sdk/functions → functions}/evaluate.test.js +11 -5
  145. package/dist/{sdk/functions → functions}/extract-text-styles.js +2 -14
  146. package/dist/{sdk/functions → functions}/get-block-actions-handler.js +3 -3
  147. package/dist/{sdk/functions → functions}/get-block-actions.d.ts +1 -0
  148. package/dist/functions/get-block-actions.js +28 -0
  149. package/dist/{sdk/functions → functions}/get-block-component-options.js +1 -1
  150. package/dist/functions/get-block-properties.d.ts +6 -0
  151. package/dist/{sdk/functions → functions}/get-block-properties.js +15 -9
  152. package/dist/{sdk/functions → functions}/get-builder-search-params/fn.test.js +1 -1
  153. package/dist/{sdk/functions → functions}/get-builder-search-params/index.js +3 -7
  154. package/dist/{sdk/functions → functions}/get-content/generate-content-url.js +7 -5
  155. package/dist/{sdk/functions → functions}/get-content/generate-content-url.test.js +31 -17
  156. package/dist/{sdk/functions → functions}/get-content/index.d.ts +2 -6
  157. package/dist/{sdk/functions → functions}/get-content/index.js +26 -6
  158. package/dist/functions/get-content/processCookies.d.ts +2 -0
  159. package/dist/functions/get-content/processCookies.js +3 -0
  160. package/dist/{sdk/functions → functions}/get-processed-block.d.ts +1 -1
  161. package/dist/{sdk/functions → functions}/get-processed-block.js +11 -7
  162. package/dist/{sdk/functions → functions}/get-processed-block.test.js +8 -6
  163. package/dist/{sdk/functions → functions}/get-react-native-block-styles.d.ts +1 -1
  164. package/dist/{sdk/functions → functions}/get-react-native-block-styles.js +2 -2
  165. package/dist/{sdk/functions → functions}/if-target.d.ts +1 -1
  166. package/dist/{sdk/functions → functions}/if-target.js +1 -1
  167. package/dist/functions/is-editing.js +5 -0
  168. package/dist/functions/is-non-node-server.d.ts +4 -0
  169. package/dist/functions/is-non-node-server.js +8 -0
  170. package/dist/{sdk/functions → functions}/on-change.js +1 -1
  171. package/dist/{sdk/functions → functions}/on-change.test.js +13 -3
  172. package/dist/{sdk/functions → functions}/register-component.d.ts +2 -1
  173. package/dist/functions/register-component.js +38 -0
  174. package/dist/{sdk/functions → functions}/register.js +2 -2
  175. package/dist/{sdk/functions → functions}/sanitize-react-native-block-styles.js +13 -5
  176. package/dist/{sdk/functions → functions}/set-editor-settings.js +1 -1
  177. package/dist/functions/set.js +14 -0
  178. package/dist/{sdk/functions → functions}/set.test.js +9 -3
  179. package/dist/{sdk/functions → functions}/track/helpers.js +6 -11
  180. package/dist/{sdk/functions → functions}/track/index.js +26 -14
  181. package/dist/{sdk/functions → functions}/track/interaction.js +15 -16
  182. package/dist/functions/transform-block-properties.d.ts +1 -0
  183. package/dist/{sdk/functions → functions}/transform-block-properties.js +2 -0
  184. package/dist/{sdk/helpers → helpers}/ab-tests.d.ts +2 -2
  185. package/dist/{sdk/helpers → helpers}/ab-tests.js +48 -30
  186. package/dist/{sdk/helpers → helpers}/canTrack.js +1 -1
  187. package/dist/{sdk/helpers → helpers}/cookie.d.ts +2 -2
  188. package/dist/{sdk/helpers → helpers}/cookie.js +13 -26
  189. package/dist/{sdk/helpers → helpers}/css.d.ts +1 -1
  190. package/dist/{sdk/helpers → helpers}/css.js +1 -1
  191. package/dist/{sdk/helpers → helpers}/flatten.js +8 -8
  192. package/dist/{sdk/helpers → helpers}/localStorage.d.ts +2 -2
  193. package/dist/{sdk/helpers → helpers}/localStorage.js +2 -2
  194. package/dist/{sdk/helpers → helpers}/logger.js +1 -1
  195. package/dist/helpers/preview-lru-cache/get.d.ts +1 -0
  196. package/dist/helpers/preview-lru-cache/get.js +7 -0
  197. package/dist/helpers/preview-lru-cache/helpers.d.ts +1 -0
  198. package/dist/helpers/preview-lru-cache/helpers.js +9 -0
  199. package/dist/helpers/preview-lru-cache/init.d.ts +6 -0
  200. package/dist/helpers/preview-lru-cache/init.js +15 -0
  201. package/dist/helpers/preview-lru-cache/set.d.ts +7 -0
  202. package/dist/helpers/preview-lru-cache/set.js +9 -0
  203. package/dist/helpers/preview-lru-cache/types.d.ts +12 -0
  204. package/dist/helpers/preview-lru-cache/types.js +6 -0
  205. package/dist/{sdk/helpers → helpers}/sessionId.d.ts +2 -2
  206. package/dist/{sdk/helpers → helpers}/sessionId.js +11 -4
  207. package/dist/{sdk/helpers → helpers}/uuid.js +1 -1
  208. package/dist/{sdk/helpers → helpers}/visitorId.d.ts +1 -1
  209. package/dist/{sdk/helpers → helpers}/visitorId.js +7 -4
  210. package/dist/{sdk/index-helpers → index-helpers}/blocks-exports.d.ts +2 -2
  211. package/dist/{sdk/index-helpers → index-helpers}/blocks-exports.js +2 -2
  212. package/dist/{sdk/index.d.ts → index.d.ts} +2 -2
  213. package/dist/{sdk/index.js → index.js} +1 -1
  214. package/dist/scripts/init-editing.js +110 -0
  215. package/dist/types/builder-props.d.ts +9 -0
  216. package/dist/{sdk/types → types}/components.d.ts +8 -2
  217. package/dist/types/enforced-partials.d.ts +21 -0
  218. package/dist/types/targets.d.ts +1 -0
  219. package/dist/{server/types → types}/typescript.d.ts +6 -0
  220. package/package.json +6 -13
  221. package/dist/sdk/blocks/button/component-info.d.ts +0 -2
  222. package/dist/sdk/blocks/columns/columns.d.ts +0 -16
  223. package/dist/sdk/blocks/columns/component-info.d.ts +0 -2
  224. package/dist/sdk/blocks/custom-code/component-info.d.ts +0 -2
  225. package/dist/sdk/blocks/embed/component-info.d.ts +0 -2
  226. package/dist/sdk/blocks/embed/helpers.js +0 -6
  227. package/dist/sdk/blocks/form/component-info.d.ts +0 -2
  228. package/dist/sdk/blocks/form/form.d.ts +0 -40
  229. package/dist/sdk/blocks/form/form.js +0 -203
  230. package/dist/sdk/blocks/fragment/component-info.d.ts +0 -2
  231. package/dist/sdk/blocks/image/component-info.d.ts +0 -2
  232. package/dist/sdk/blocks/img/component-info.d.ts +0 -2
  233. package/dist/sdk/blocks/input/component-info.d.ts +0 -2
  234. package/dist/sdk/blocks/raw-text/component-info.d.ts +0 -2
  235. package/dist/sdk/blocks/raw-text/raw-text.js +0 -6
  236. package/dist/sdk/blocks/section/component-info.d.ts +0 -2
  237. package/dist/sdk/blocks/select/component-info.d.ts +0 -2
  238. package/dist/sdk/blocks/submit-button/component-info.d.ts +0 -2
  239. package/dist/sdk/blocks/symbol/component-info.d.ts +0 -2
  240. package/dist/sdk/blocks/symbol/symbol.d.ts +0 -21
  241. package/dist/sdk/blocks/symbol/symbol.js +0 -69
  242. package/dist/sdk/blocks/text/component-info.d.ts +0 -2
  243. package/dist/sdk/blocks/textarea/component-info.d.ts +0 -2
  244. package/dist/sdk/blocks/util.d.ts +0 -4
  245. package/dist/sdk/blocks/util.js +0 -13
  246. package/dist/sdk/blocks/video/component-info.d.ts +0 -2
  247. package/dist/sdk/components/render-block/render-block.d.ts +0 -9
  248. package/dist/sdk/components/render-block/render-block.helpers.d.ts +0 -12
  249. package/dist/sdk/components/render-block/render-block.js +0 -115
  250. package/dist/sdk/components/render-block/render-component.d.ts +0 -17
  251. package/dist/sdk/components/render-block/render-component.js +0 -11
  252. package/dist/sdk/components/render-block/render-repeated-block.d.ts +0 -9
  253. package/dist/sdk/components/render-block/render-repeated-block.js +0 -11
  254. package/dist/sdk/components/render-blocks.d.ts +0 -10
  255. package/dist/sdk/components/render-content/builder-editing.d.ts +0 -3
  256. package/dist/sdk/components/render-content/builder-editing.js +0 -6
  257. package/dist/sdk/components/render-content/components/render-styles.d.ts +0 -9
  258. package/dist/sdk/components/render-content/index.d.ts +0 -1
  259. package/dist/sdk/components/render-content/index.js +0 -1
  260. package/dist/sdk/components/render-content/render-content.d.ts +0 -4
  261. package/dist/sdk/components/render-content/render-content.helpers.d.ts +0 -7
  262. package/dist/sdk/components/render-content/render-content.helpers.js +0 -30
  263. package/dist/sdk/components/render-content/render-content.types.d.ts +0 -38
  264. package/dist/sdk/components/render-content-variants/helpers.d.ts +0 -17
  265. package/dist/sdk/components/render-content-variants/render-content-variants.d.ts +0 -5
  266. package/dist/sdk/components/render-content-variants/render-content-variants.js +0 -37
  267. package/dist/sdk/components/render-inlined-styles.d.ts +0 -7
  268. package/dist/sdk/constants/sdk-version.d.ts +0 -1
  269. package/dist/sdk/constants/sdk-version.js +0 -1
  270. package/dist/sdk/functions/get-block-actions.js +0 -15
  271. package/dist/sdk/functions/get-block-properties.d.ts +0 -7
  272. package/dist/sdk/functions/get-content/ab-testing.d.ts +0 -5
  273. package/dist/sdk/functions/get-content/ab-testing.js +0 -78
  274. package/dist/sdk/functions/is-editing.js +0 -7
  275. package/dist/sdk/functions/register-component.js +0 -26
  276. package/dist/sdk/functions/set.js +0 -21
  277. package/dist/sdk/functions/transform-block-properties.d.ts +0 -1
  278. package/dist/sdk/scripts/init-editing.js +0 -102
  279. package/dist/sdk/types/targets.d.ts +0 -3
  280. package/dist/sdk/types/typescript.d.ts +0 -5
  281. package/dist/server/functions/get-builder-search-params/index.d.ts +0 -6
  282. package/dist/server/functions/get-builder-search-params/index.js +0 -36
  283. package/dist/server/functions/get-content/ab-testing.d.ts +0 -5
  284. package/dist/server/functions/get-content/ab-testing.js +0 -78
  285. package/dist/server/functions/get-content/generate-content-url.d.ts +0 -2
  286. package/dist/server/functions/get-content/generate-content-url.js +0 -31
  287. package/dist/server/functions/get-content/generate-content-url.test.js +0 -82
  288. package/dist/server/functions/get-content/index.d.ts +0 -11
  289. package/dist/server/functions/get-content/index.js +0 -40
  290. package/dist/server/functions/get-content/types.d.ts +0 -45
  291. package/dist/server/functions/get-fetch.d.ts +0 -1
  292. package/dist/server/functions/get-fetch.js +0 -11
  293. package/dist/server/functions/get-global-this.d.ts +0 -4
  294. package/dist/server/functions/get-global-this.js +0 -15
  295. package/dist/server/functions/is-browser.d.ts +0 -1
  296. package/dist/server/functions/is-browser.js +0 -3
  297. package/dist/server/helpers/ab-tests.d.ts +0 -8
  298. package/dist/server/helpers/ab-tests.js +0 -5
  299. package/dist/server/helpers/cookie.d.ts +0 -15
  300. package/dist/server/helpers/cookie.js +0 -65
  301. package/dist/server/helpers/flatten.d.ts +0 -6
  302. package/dist/server/helpers/flatten.js +0 -19
  303. package/dist/server/helpers/logger.d.ts +0 -5
  304. package/dist/server/helpers/logger.js +0 -6
  305. package/dist/server/helpers/nullable.d.ts +0 -2
  306. package/dist/server/helpers/nullable.js +0 -1
  307. package/dist/server/helpers/url.d.ts +0 -6
  308. package/dist/server/helpers/url.js +0 -15
  309. package/dist/server/types/api-version.d.ts +0 -2
  310. package/dist/server/types/api-version.js +0 -1
  311. package/dist/server/types/builder-block.d.ts +0 -66
  312. package/dist/server/types/builder-content.d.ts +0 -46
  313. package/dist/server/types/can-track.d.ts +0 -3
  314. package/dist/server/types/input.d.ts +0 -121
  315. package/dist/server/types/typescript.js +0 -1
  316. /package/dist/{sdk/blocks → blocks}/embed/helpers.d.ts +0 -0
  317. /package/dist/{sdk/blocks → blocks}/image/image.helpers.d.ts +0 -0
  318. /package/dist/{sdk/components/render-block → components/block}/types.d.ts +0 -0
  319. /package/dist/{sdk/components/render-block → components/block}/types.js +0 -0
  320. /package/dist/{sdk/context/types.js → components/content/content.types.js} +0 -0
  321. /package/dist/{sdk/components/render-content → components/content}/wrap-component-ref.d.ts +0 -0
  322. /package/dist/{sdk/components/render-content → components/content}/wrap-component-ref.js +0 -0
  323. /package/dist/{sdk/components/render-content/render-content.types.js → components/content-variants/content-variants.types.js} +0 -0
  324. /package/dist/{sdk/constants → constants}/builder-registered-components.d.ts +0 -0
  325. /package/dist/{sdk/constants → constants}/device-sizes.d.ts +0 -0
  326. /package/dist/{sdk/constants → constants}/target.d.ts +0 -0
  327. /package/dist/{sdk/constants → constants}/target.js +0 -0
  328. /package/dist/{sdk/context → context}/builder.context.d.ts +0 -0
  329. /package/dist/{sdk/functions/get-content → context}/types.js +0 -0
  330. /package/dist/{sdk/functions/evaluate.test.d.ts → functions/apply-patch-with-mutation.test.d.ts} +0 -0
  331. /package/dist/{sdk/functions → functions}/camel-to-kebab-case.d.ts +0 -0
  332. /package/dist/{sdk/functions → functions}/camel-to-kebab-case.js +0 -0
  333. /package/dist/{sdk/functions/get-content/generate-content-url.test.d.ts → functions/evaluate/evaluate.test.d.ts} +0 -0
  334. /package/dist/{server/functions/get-content → functions/evaluate}/types.js +0 -0
  335. /package/dist/{sdk/functions/get-builder-search-params/fn.test.d.ts → functions/evaluate.test.d.ts} +0 -0
  336. /package/dist/{sdk/functions → functions}/event-handler-name.d.ts +0 -0
  337. /package/dist/{sdk/functions → functions}/event-handler-name.js +0 -0
  338. /package/dist/{sdk/functions → functions}/extract-text-styles.d.ts +0 -0
  339. /package/dist/{sdk/functions → functions}/fast-clone.d.ts +0 -0
  340. /package/dist/{sdk/functions → functions}/fast-clone.js +0 -0
  341. /package/dist/{sdk/functions → functions}/get-block-actions-handler.d.ts +0 -0
  342. /package/dist/{sdk/functions → functions}/get-block-component-options.d.ts +0 -0
  343. /package/dist/{sdk/functions/get-processed-block.test.d.ts → functions/get-builder-search-params/fn.test.d.ts} +0 -0
  344. /package/dist/{sdk/functions → functions}/get-builder-search-params/index.d.ts +0 -0
  345. /package/dist/{sdk/functions → functions}/get-content/generate-content-url.d.ts +0 -0
  346. /package/dist/{server/functions → functions}/get-content/generate-content-url.test.d.ts +0 -0
  347. /package/dist/{sdk/functions → functions}/get-content/types.d.ts +0 -0
  348. /package/dist/{sdk/functions/on-change.test.d.ts → functions/get-content/types.js} +0 -0
  349. /package/dist/{sdk/functions → functions}/get-fetch.d.ts +0 -0
  350. /package/dist/{sdk/functions → functions}/get-fetch.js +0 -0
  351. /package/dist/{sdk/functions → functions}/get-global-this.d.ts +0 -0
  352. /package/dist/{sdk/functions → functions}/get-global-this.js +0 -0
  353. /package/dist/{sdk/functions/set.test.d.ts → functions/get-processed-block.test.d.ts} +0 -0
  354. /package/dist/{sdk/functions → functions}/is-browser.d.ts +0 -0
  355. /package/dist/{sdk/functions → functions}/is-browser.js +0 -0
  356. /package/dist/{sdk/functions → functions}/is-editing.d.ts +0 -0
  357. /package/dist/{sdk/functions → functions}/is-iframe.d.ts +0 -0
  358. /package/dist/{sdk/functions → functions}/is-iframe.js +0 -0
  359. /package/dist/{sdk/functions → functions}/is-previewing.d.ts +0 -0
  360. /package/dist/{sdk/functions → functions}/is-previewing.js +0 -0
  361. /package/dist/{sdk/functions → functions}/on-change.d.ts +0 -0
  362. /package/dist/{sdk/helpers/url.test.d.ts → functions/on-change.test.d.ts} +0 -0
  363. /package/dist/{sdk/functions → functions}/register.d.ts +0 -0
  364. /package/dist/{sdk/functions → functions}/sanitize-react-native-block-styles.d.ts +0 -0
  365. /package/dist/{sdk/functions → functions}/set-editor-settings.d.ts +0 -0
  366. /package/dist/{sdk/functions → functions}/set.d.ts +0 -0
  367. /package/dist/{sdk/types/builder-block.js → functions/set.test.d.ts} +0 -0
  368. /package/dist/{sdk/functions → functions}/track/helpers.d.ts +0 -0
  369. /package/dist/{sdk/functions → functions}/track/index.d.ts +0 -0
  370. /package/dist/{sdk/functions → functions}/track/interaction.d.ts +0 -0
  371. /package/dist/{sdk/functions → functions}/transform-block.d.ts +0 -0
  372. /package/dist/{sdk/functions → functions}/transform-block.js +0 -0
  373. /package/dist/{sdk/helpers → helpers}/canTrack.d.ts +0 -0
  374. /package/dist/{sdk/helpers → helpers}/flatten.d.ts +0 -0
  375. /package/dist/{sdk/helpers → helpers}/logger.d.ts +0 -0
  376. /package/dist/{sdk/helpers → helpers}/nullable.d.ts +0 -0
  377. /package/dist/{sdk/helpers → helpers}/nullable.js +0 -0
  378. /package/dist/{sdk/helpers → helpers}/time.d.ts +0 -0
  379. /package/dist/{sdk/helpers → helpers}/time.js +0 -0
  380. /package/dist/{sdk/helpers → helpers}/url.d.ts +0 -0
  381. /package/dist/{sdk/helpers → helpers}/url.js +0 -0
  382. /package/dist/{sdk/types/builder-content.js → helpers/url.test.d.ts} +0 -0
  383. /package/dist/{sdk/helpers → helpers}/url.test.js +0 -0
  384. /package/dist/{sdk/helpers → helpers}/uuid.d.ts +0 -0
  385. /package/dist/{sdk/index-helpers → index-helpers}/top-of-file.d.ts +0 -0
  386. /package/dist/{sdk/index-helpers → index-helpers}/top-of-file.js +0 -0
  387. /package/dist/{sdk/scripts → scripts}/init-editing.d.ts +0 -0
  388. /package/dist/{sdk/types → types}/api-version.d.ts +0 -0
  389. /package/dist/{sdk/types → types}/api-version.js +0 -0
  390. /package/dist/{sdk/types → types}/builder-block.d.ts +0 -0
  391. /package/dist/{server/types → types}/builder-block.js +0 -0
  392. /package/dist/{sdk/types → types}/builder-content.d.ts +0 -0
  393. /package/dist/{server/types → types}/builder-content.js +0 -0
  394. /package/dist/{sdk/types/can-track.js → types/builder-props.js} +0 -0
  395. /package/dist/{sdk/types → types}/can-track.d.ts +0 -0
  396. /package/dist/{server/types → types}/can-track.js +0 -0
  397. /package/dist/{sdk/types → types}/components.js +0 -0
  398. /package/dist/{sdk/types → types}/deep-partial.d.ts +0 -0
  399. /package/dist/{sdk/types → types}/deep-partial.js +0 -0
  400. /package/dist/{sdk/types → types}/element.d.ts +0 -0
  401. /package/dist/{sdk/types → types}/element.js +0 -0
  402. /package/dist/{sdk/types/input.js → types/enforced-partials.js} +0 -0
  403. /package/dist/{sdk/types → types}/input.d.ts +0 -0
  404. /package/dist/{server/types → types}/input.js +0 -0
  405. /package/dist/{sdk/types → types}/targets.js +0 -0
  406. /package/dist/{sdk/types → types}/typescript.js +0 -0
@@ -1,6 +0,0 @@
1
- /**
2
- * Only gets one level up from hostname
3
- * wwww.example.com -> example.com
4
- * www.example.co.uk -> example.co.uk
5
- */
6
- export declare const getTopLevelDomain: (host: string) => string;
@@ -1,15 +0,0 @@
1
- /**
2
- * Only gets one level up from hostname
3
- * wwww.example.com -> example.com
4
- * www.example.co.uk -> example.co.uk
5
- */
6
- export const getTopLevelDomain = (host) => {
7
- if (host === 'localhost' || host === '127.0.0.1') {
8
- return host;
9
- }
10
- const parts = host.split('.');
11
- if (parts.length > 2) {
12
- return parts.slice(1).join('.');
13
- }
14
- return host;
15
- };
@@ -1,2 +0,0 @@
1
- export type ApiVersion = 'v2' | 'v3';
2
- export declare const DEFAULT_API_VERSION: ApiVersion;
@@ -1 +0,0 @@
1
- export const DEFAULT_API_VERSION = 'v3';
@@ -1,66 +0,0 @@
1
- type JSONValue = string | number | boolean | JSONObject | JSONArray;
2
- interface JSONObject {
3
- [x: string]: JSONValue;
4
- }
5
- interface JSONArray extends Array<JSONValue> {
6
- }
7
- /** @todo typedoc this */
8
- export interface BuilderBlock {
9
- '@type': '@builder.io/sdk:Element';
10
- '@version'?: number;
11
- id?: string;
12
- tagName?: string;
13
- layerName?: string;
14
- groupLocked?: boolean;
15
- layerLocked?: boolean;
16
- /** @todo make alias for properties.class */
17
- class?: string;
18
- children?: BuilderBlock[];
19
- responsiveStyles?: {
20
- large?: Partial<CSSStyleDeclaration>;
21
- medium?: Partial<CSSStyleDeclaration>;
22
- small?: Partial<CSSStyleDeclaration>;
23
- /** @deprecated */
24
- xsmall?: Partial<CSSStyleDeclaration>;
25
- };
26
- component?: {
27
- name: string;
28
- options?: any;
29
- tag?: string;
30
- };
31
- bindings?: {
32
- [key: string]: string;
33
- };
34
- meta?: {
35
- [key: string]: JSONValue;
36
- };
37
- actions?: {
38
- [key: string]: string;
39
- };
40
- properties?: {
41
- [key: string]: string;
42
- };
43
- code?: {
44
- bindings?: {
45
- [key: string]: string;
46
- };
47
- actions?: {
48
- [key: string]: string;
49
- };
50
- };
51
- repeat?: {
52
- collection: string;
53
- itemName?: string;
54
- } | null;
55
- animations?: any[];
56
- style?: Partial<CSSStyleDeclaration>;
57
- /**
58
- * generated by the "Hide If" binding
59
- */
60
- hide?: boolean;
61
- /**
62
- * generated by the "Show If" binding
63
- */
64
- show?: boolean;
65
- }
66
- export {};
@@ -1,46 +0,0 @@
1
- import type { BuilderBlock } from './builder-block.js';
2
- import type { Input } from './input.js';
3
- import type { Nullable } from './typescript.js';
4
- export interface Breakpoints {
5
- small: number;
6
- medium: number;
7
- }
8
- export interface BuilderContentVariation {
9
- data?: {
10
- title?: string;
11
- blocks?: BuilderBlock[];
12
- inputs?: Input[];
13
- state?: {
14
- [key: string]: any;
15
- };
16
- jsCode?: string;
17
- tsCode?: string;
18
- httpRequests?: {
19
- [key: string]: string;
20
- };
21
- [key: string]: any;
22
- };
23
- name?: string;
24
- testRatio?: number;
25
- id?: string;
26
- meta?: {
27
- breakpoints?: Nullable<Breakpoints>;
28
- [key: string]: any;
29
- };
30
- }
31
- export interface BuilderContent extends BuilderContentVariation {
32
- '@version'?: number;
33
- id?: string;
34
- name?: string;
35
- published?: 'published' | 'draft' | 'archived';
36
- modelId?: string;
37
- priority?: number;
38
- lastUpdated?: number;
39
- startDate?: number;
40
- endDate?: number;
41
- variations?: {
42
- [id: string]: BuilderContentVariation | undefined;
43
- };
44
- testVariationId?: string;
45
- testVariationName?: string;
46
- }
@@ -1,3 +0,0 @@
1
- export type CanTrack = {
2
- canTrack: boolean;
3
- };
@@ -1,121 +0,0 @@
1
- export interface Input {
2
- /** This is the name of the component prop this input represents */
3
- name: string;
4
- /** A friendlier name to show in the UI if the component prop name is not ideal for end users */
5
- friendlyName?: string;
6
- /** @hidden @deprecated */
7
- description?: string;
8
- /** A default value to use */
9
- defaultValue?: any;
10
- /**
11
- * The type of input to use, such as 'text'
12
- *
13
- * See all available inputs [here](https://www.builder.io/c/docs/custom-react-components#input-types)
14
- * and you can create your own custom input types and associated editor UIs with [plugins](https://www.builder.io/c/docs/extending/plugins)
15
- */
16
- type: string;
17
- /** Is this input mandatory or not */
18
- required?: boolean;
19
- /** @hidden */
20
- autoFocus?: boolean;
21
- subFields?: Input[];
22
- /**
23
- * Additional text to render in the UI to give guidance on how to use this
24
- *
25
- * @example
26
- * ```js
27
- * helperText: 'Be sure to use a proper URL, starting with "https://"'
28
- * 111
29
- */
30
- helperText?: string;
31
- /** @hidden */
32
- allowedFileTypes?: string[];
33
- /** @hidden */
34
- imageHeight?: number;
35
- /** @hidden */
36
- imageWidth?: number;
37
- /** @hidden */
38
- mediaHeight?: number;
39
- /** @hidden */
40
- mediaWidth?: number;
41
- /** @hidden */
42
- hideFromUI?: boolean;
43
- /** @hidden */
44
- modelId?: string;
45
- /**
46
- * Number field type validation maximum accepted input
47
- */
48
- max?: number;
49
- /**
50
- * Number field type validation minimum accepted input
51
- */
52
- min?: number;
53
- /**
54
- * Number field type step size when using arrows
55
- */
56
- step?: number;
57
- /**
58
- * Set this to `true` to show the editor for this input when
59
- * children of this component are selected. This is useful for things
60
- * like Tabs, such that users may not always select the Tabs component
61
- * directly but will still be looking for how to add additional tabs
62
- */
63
- broadcast?: boolean;
64
- /**
65
- * Set this to `true` to show the editor for this input when
66
- * group locked parents of this component are selected. This is useful
67
- * to bubble up important inputs for locked groups, like text and images
68
- */
69
- bubble?: boolean;
70
- /**
71
- * Set this to `true` if you want this component to be translatable
72
- */
73
- localized?: boolean;
74
- /** @hidden */
75
- options?: {
76
- [key: string]: any;
77
- };
78
- /**
79
- * For "text" input type, specifying an enum will show a dropdown of options instead
80
- */
81
- enum?: string[] | {
82
- label: string;
83
- value: any;
84
- helperText?: string;
85
- }[];
86
- /** Regex field validation for all string types (text, longText, html, url, etc) */
87
- regex?: {
88
- /** pattern to test, like "^\/[a-z]$" */
89
- pattern: string;
90
- /** flags for the RegExp constructor, e.g. "gi" */
91
- options?: string;
92
- /**
93
- * Friendly message to display to end-users if the regex fails, e.g.
94
- * "You must use a relative url starting with '/...' "
95
- */
96
- message: string;
97
- };
98
- /**
99
- * Set this to `true` to put this under the "show more" section of
100
- * the options editor. Useful for things that are more advanced
101
- * or more rarely used and don't need to be too prominent
102
- */
103
- advanced?: boolean;
104
- /** @hidden */
105
- /** @hidden */
106
- code?: boolean;
107
- /** @hidden */
108
- richText?: boolean;
109
- /** @hidden */
110
- showIf?: ((options: Map<string, any>) => boolean) | string;
111
- /** @hidden */
112
- copyOnAdd?: boolean;
113
- /**
114
- * Use optionally with inputs of type `reference`. Restricts the content entry picker to a specific model by name.
115
- */
116
- model?: string;
117
- valueType?: {
118
- type?: string;
119
- };
120
- onChange?: ((options: Map<string, any>) => void | Promise<void>) | string;
121
- }
@@ -1 +0,0 @@
1
- export {};
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes