@builder.io/sdk-react 2.0.23 → 2.0.24-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 (489) hide show
  1. package/lib/browser/blocks-exports.cjs +6 -6
  2. package/lib/browser/blocks-exports.mjs +43 -38
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +1 -1
  5. package/lib/browser/{server-entry-e7cbd2fc.js → server-entry-c147474a.js} +1 -1
  6. package/lib/browser/{server-entry-3855428f.cjs → server-entry-e66059f2.cjs} +1 -1
  7. package/lib/browser/server-entry.cjs +1 -1
  8. package/lib/browser/server-entry.mjs +1 -1
  9. package/lib/edge/{accordion-57df597a.js → accordion-5efe1f76.js} +1 -1
  10. package/lib/edge/{accordion-91147fe9.cjs → accordion-6cefa683.cjs} +1 -1
  11. package/lib/edge/{blocks-263c1bb6.js → blocks-47ceb648.js} +18 -13
  12. package/lib/edge/{blocks-98b19deb.cjs → blocks-ce41f8e2.cjs} +3 -3
  13. package/lib/edge/blocks-exports.cjs +1 -1
  14. package/lib/edge/blocks-exports.mjs +2 -2
  15. package/lib/edge/{button-ff78ab2a.cjs → button-375ad1e4.cjs} +1 -1
  16. package/lib/edge/{button-d681583e.js → button-68dc9c15.js} +2 -2
  17. package/lib/edge/{columns-d6892637.cjs → columns-2ced7464.cjs} +1 -1
  18. package/lib/edge/{columns-a50c2c9f.js → columns-fa195aa5.js} +4 -4
  19. package/lib/edge/{content-variants-83a1241a.cjs → content-variants-12e2c711.cjs} +1 -1
  20. package/lib/edge/{content-variants-978a8be6.js → content-variants-b2ab5645.js} +11 -11
  21. package/lib/edge/{evaluate-f8347208.cjs → evaluate-71f3ff34.cjs} +1 -1
  22. package/lib/edge/{evaluate-b7da3191.js → evaluate-822680d7.js} +1 -1
  23. package/lib/edge/{form-32085b13.js → form-785f87de.js} +4 -4
  24. package/lib/edge/{form-bb1f8672.cjs → form-eb6df3c0.cjs} +1 -1
  25. package/lib/edge/{get-class-prop-name-956dc1ac.cjs → get-class-prop-name-20feabab.cjs} +1 -1
  26. package/lib/edge/{get-class-prop-name-8c8a1b1c.js → get-class-prop-name-dba1cf23.js} +1 -1
  27. package/lib/edge/{img-ce324880.js → img-9409566a.js} +1 -1
  28. package/lib/edge/{img-9e702744.cjs → img-df10057c.cjs} +1 -1
  29. package/lib/edge/index.cjs +1 -1
  30. package/lib/edge/index.mjs +1 -1
  31. package/lib/edge/{input-c5dda333.js → input-175da017.js} +1 -1
  32. package/lib/edge/{input-09bbebbb.cjs → input-ad5251cd.cjs} +1 -1
  33. package/lib/edge/{select-235baf48.cjs → select-c59da945.cjs} +1 -1
  34. package/lib/edge/{select-8936ea79.js → select-e6904df2.js} +1 -1
  35. package/lib/edge/{server-entry-f0d7962f.cjs → server-entry-2d057cd0.cjs} +1 -1
  36. package/lib/edge/{server-entry-b3befa52.js → server-entry-7d728f1e.js} +1 -1
  37. package/lib/edge/server-entry.cjs +1 -1
  38. package/lib/edge/server-entry.mjs +1 -1
  39. package/lib/edge/{slot-375680d2.cjs → slot-27d61c78.cjs} +1 -1
  40. package/lib/edge/{slot-30e6c2aa.js → slot-a7fc3fa3.js} +4 -4
  41. package/lib/edge/{symbol-73a9d7cb.cjs → symbol-5cf11265.cjs} +1 -1
  42. package/lib/edge/{symbol-0deda8a7.js → symbol-d41cf7c4.js} +2 -2
  43. package/lib/edge/{tabs-ffc5ae5d.cjs → tabs-3a710ab1.cjs} +1 -1
  44. package/lib/edge/{tabs-577ba54e.js → tabs-81ccc6f8.js} +4 -4
  45. package/lib/edge/{text-0a14d566.js → text-345dd047.js} +2 -2
  46. package/lib/edge/{text-3dd73c6e.cjs → text-59e297e6.cjs} +1 -1
  47. package/lib/node/blocks-exports.cjs +21 -21
  48. package/lib/node/blocks-exports.mjs +52 -46
  49. package/lib/node/index.cjs +1 -1
  50. package/lib/node/index.mjs +26 -25
  51. package/lib/node/init.cjs +1 -1
  52. package/lib/node/init.mjs +8 -6
  53. package/lib/node/{server-entry-a7139d8f.cjs → server-entry-1c1c1459.cjs} +1 -1
  54. package/lib/node/{server-entry-fa11b353.js → server-entry-8956b57e.js} +1 -1
  55. package/lib/node/server-entry.cjs +1 -1
  56. package/lib/node/server-entry.mjs +1 -1
  57. package/lib/node/{should-force-browser-runtime-in-node-ddb84649.js → setIvm-2e562b9e.js} +41 -55
  58. package/lib/node/{should-force-browser-runtime-in-node-0bf7076b.cjs → setIvm-bf4f998d.cjs} +4 -4
  59. package/lib/node/setIvm.cjs +1 -0
  60. package/lib/node/setIvm.mjs +5 -0
  61. package/lib/node/should-force-browser-runtime-in-node-a23d3cc4.js +17 -0
  62. package/lib/node/should-force-browser-runtime-in-node-ce6ededa.cjs +1 -0
  63. package/package.json +3 -2
  64. package/types/blocks/textarea/component-info.d.ts +2 -0
  65. package/types/blocks/textarea/index.d.ts +1 -0
  66. package/types/blocks/textarea/textarea.d.ts +13 -0
  67. package/types/cjs/blocks/BaseText.d.cts +6 -0
  68. package/types/cjs/blocks/button/button.d.cts +4 -0
  69. package/types/cjs/blocks/button/button.types.d.cts +7 -0
  70. package/types/cjs/blocks/button/component-info.d.cts +2 -0
  71. package/types/cjs/blocks/button/index.d.cts +1 -0
  72. package/types/cjs/blocks/columns/columns.d.cts +4 -0
  73. package/types/cjs/blocks/columns/columns.types.d.cts +15 -0
  74. package/types/cjs/blocks/columns/component-info.d.cts +2 -0
  75. package/types/cjs/blocks/columns/helpers.d.cts +1 -0
  76. package/types/cjs/blocks/columns/index.d.cts +1 -0
  77. package/types/cjs/blocks/custom-code/component-info.d.cts +2 -0
  78. package/types/cjs/blocks/custom-code/custom-code.d.cts +7 -0
  79. package/types/cjs/blocks/custom-code/index.d.cts +1 -0
  80. package/types/cjs/blocks/embed/component-info.d.cts +2 -0
  81. package/types/cjs/blocks/embed/embed.d.cts +6 -0
  82. package/types/cjs/blocks/embed/helpers.d.cts +1 -0
  83. package/types/cjs/blocks/embed/index.d.cts +1 -0
  84. package/types/cjs/blocks/form/form/component-info.d.cts +2 -0
  85. package/types/cjs/blocks/form/form/form.d.cts +33 -0
  86. package/types/cjs/blocks/form/form/index.d.cts +1 -0
  87. package/types/cjs/blocks/form/input/component-info.d.cts +2 -0
  88. package/types/cjs/blocks/form/input/index.d.cts +1 -0
  89. package/types/cjs/blocks/form/input/input.d.cts +15 -0
  90. package/types/cjs/blocks/form/select/component-info.d.cts +2 -0
  91. package/types/cjs/blocks/form/select/index.d.cts +1 -0
  92. package/types/cjs/blocks/form/select/select.d.cts +16 -0
  93. package/types/cjs/blocks/form/submit-button/component-info.d.cts +2 -0
  94. package/types/cjs/blocks/form/submit-button/index.d.cts +1 -0
  95. package/types/cjs/blocks/form/submit-button/submit-button.d.cts +10 -0
  96. package/types/cjs/blocks/fragment/component-info.d.cts +2 -0
  97. package/types/cjs/blocks/fragment/fragment.d.cts +4 -0
  98. package/types/cjs/blocks/fragment/fragment.types.d.cts +5 -0
  99. package/types/cjs/blocks/fragment/index.d.cts +1 -0
  100. package/types/cjs/blocks/helpers.d.cts +13 -0
  101. package/types/cjs/blocks/image/component-info.d.cts +2 -0
  102. package/types/cjs/blocks/image/image.d.cts +4 -0
  103. package/types/cjs/blocks/image/image.helpers.d.cts +1 -0
  104. package/types/cjs/blocks/image/image.types.d.cts +19 -0
  105. package/types/cjs/blocks/image/index.d.cts +1 -0
  106. package/types/cjs/blocks/img/component-info.d.cts +2 -0
  107. package/types/cjs/blocks/img/img.d.cts +14 -0
  108. package/types/cjs/blocks/img/index.d.cts +1 -0
  109. package/types/cjs/blocks/raw-text/component-info.d.cts +2 -0
  110. package/types/cjs/blocks/raw-text/index.d.cts +1 -0
  111. package/types/cjs/blocks/raw-text/raw-text.d.cts +7 -0
  112. package/types/cjs/blocks/section/component-info.d.cts +2 -0
  113. package/types/cjs/blocks/section/index.d.cts +1 -0
  114. package/types/cjs/blocks/section/section.d.cts +4 -0
  115. package/types/cjs/blocks/section/section.types.d.cts +6 -0
  116. package/types/cjs/blocks/slot/component-info.d.cts +2 -0
  117. package/types/cjs/blocks/slot/index.d.cts +1 -0
  118. package/types/cjs/blocks/slot/slot.d.cts +8 -0
  119. package/types/cjs/blocks/symbol/component-info.d.cts +2 -0
  120. package/types/cjs/blocks/symbol/index.d.cts +1 -0
  121. package/types/cjs/blocks/symbol/symbol.d.cts +4 -0
  122. package/types/cjs/blocks/symbol/symbol.helpers.d.cts +14 -0
  123. package/types/cjs/blocks/symbol/symbol.types.d.cts +18 -0
  124. package/types/cjs/blocks/tabs/component-info.d.cts +2 -0
  125. package/types/cjs/blocks/tabs/index.d.cts +1 -0
  126. package/types/cjs/blocks/tabs/tabs.d.cts +4 -0
  127. package/types/cjs/blocks/tabs/tabs.types.d.cts +13 -0
  128. package/types/cjs/blocks/text/component-info.d.cts +2 -0
  129. package/types/cjs/blocks/text/index.d.cts +1 -0
  130. package/types/cjs/blocks/text/text.d.cts +4 -0
  131. package/types/cjs/blocks/text/text.types.d.cts +4 -0
  132. package/types/cjs/blocks/textarea/component-info.d.cts +2 -0
  133. package/types/cjs/blocks/textarea/index.d.cts +1 -0
  134. package/types/cjs/blocks/textarea/textarea.d.cts +13 -0
  135. package/types/cjs/blocks/video/component-info.d.cts +2 -0
  136. package/types/cjs/blocks/video/index.d.cts +1 -0
  137. package/types/cjs/blocks/video/video.d.cts +4 -0
  138. package/types/cjs/blocks/video/video.types.d.cts +21 -0
  139. package/types/cjs/components/block/animator.d.cts +5 -0
  140. package/types/cjs/components/block/block.d.cts +11 -0
  141. package/types/cjs/components/block/block.helpers.d.cts +18 -0
  142. package/types/cjs/components/block/components/block-styles.d.cts +9 -0
  143. package/types/cjs/components/block/components/block-wrapper.d.cts +15 -0
  144. package/types/cjs/components/block/components/component-ref/component-ref.d.cts +4 -0
  145. package/types/cjs/components/block/components/component-ref/component-ref.helpers.d.cts +31 -0
  146. package/types/cjs/components/block/components/interactive-element.d.cts +14 -0
  147. package/types/cjs/components/block/components/repeated-block.d.cts +8 -0
  148. package/types/cjs/components/block/types.d.cts +6 -0
  149. package/types/cjs/components/blocks/blocks-wrapper.d.cts +19 -0
  150. package/types/cjs/components/blocks/blocks.d.cts +4 -0
  151. package/types/cjs/components/blocks/blocks.types.d.cts +7 -0
  152. package/types/cjs/components/blocks/index.d.cts +1 -0
  153. package/types/cjs/components/content/components/enable-editor.d.cts +10 -0
  154. package/types/cjs/components/content/components/styles.d.cts +10 -0
  155. package/types/cjs/components/content/components/styles.helpers.d.cts +17 -0
  156. package/types/cjs/components/content/content.d.cts +4 -0
  157. package/types/cjs/components/content/content.helpers.d.cts +7 -0
  158. package/types/cjs/components/content/content.types.d.cts +13 -0
  159. package/types/cjs/components/content/contentProps.types.d.cts +17 -0
  160. package/types/cjs/components/content/index.d.cts +1 -0
  161. package/types/cjs/components/content/wrap-component-ref.d.cts +6 -0
  162. package/types/cjs/components/content-variants/content-variants.d.cts +10 -0
  163. package/types/cjs/components/content-variants/content-variants.types.d.cts +71 -0
  164. package/types/cjs/components/content-variants/helpers.d.cts +41 -0
  165. package/types/cjs/components/content-variants/index.d.cts +1 -0
  166. package/types/cjs/components/content-variants/inlined-fns.d.cts +14 -0
  167. package/types/cjs/components/dynamic-div.d.cts +15 -0
  168. package/types/cjs/components/dynamic-renderer/dynamic-renderer.d.cts +9 -0
  169. package/types/cjs/components/dynamic-renderer/dynamic-renderer.helpers.d.cts +1 -0
  170. package/types/cjs/components/error-boundary.d.cts +11 -0
  171. package/types/cjs/components/inlined-script.d.cts +7 -0
  172. package/types/cjs/components/inlined-styles.d.cts +7 -0
  173. package/types/cjs/constants/builder-registered-components.d.cts +6 -0
  174. package/types/cjs/constants/device-sizes.d.cts +13 -0
  175. package/types/cjs/constants/extra-components.d.cts +7 -0
  176. package/types/cjs/constants/sdk-version.d.cts +1 -0
  177. package/types/cjs/constants/target.d.cts +2 -0
  178. package/types/cjs/context/builder.context.d.cts +3 -0
  179. package/types/cjs/context/components.context.d.cts +3 -0
  180. package/types/cjs/context/index.d.cts +1 -0
  181. package/types/cjs/context/types.d.cts +36 -0
  182. package/types/cjs/functions/apply-patch-with-mutation.d.cts +10 -0
  183. package/types/cjs/functions/camel-to-kebab-case.d.cts +1 -0
  184. package/types/cjs/functions/deopt.d.cts +4 -0
  185. package/types/cjs/functions/evaluate/browser-runtime/browser.d.cts +8 -0
  186. package/types/cjs/functions/evaluate/browser-runtime/index.d.cts +1 -0
  187. package/types/cjs/functions/evaluate/choose-eval.d.cts +6 -0
  188. package/types/cjs/functions/evaluate/edge-runtime/acorn-interpreter.d.cts +2 -0
  189. package/types/cjs/functions/evaluate/edge-runtime/edge-runtime.d.cts +2 -0
  190. package/types/cjs/functions/evaluate/edge-runtime/index.d.cts +1 -0
  191. package/types/cjs/functions/evaluate/evaluate.d.cts +4 -0
  192. package/types/cjs/functions/evaluate/helpers.d.cts +25 -0
  193. package/types/cjs/functions/evaluate/index.d.cts +1 -0
  194. package/types/cjs/functions/evaluate/node-runtime/index.d.cts +1 -0
  195. package/types/cjs/functions/evaluate/node-runtime/init.d.cts +13 -0
  196. package/types/cjs/functions/evaluate/node-runtime/node-runtime.d.cts +11 -0
  197. package/types/cjs/functions/evaluate/node-runtime/safeDynamicRequire.d.cts +6 -0
  198. package/types/cjs/functions/evaluate/placeholder-runtime.d.cts +2 -0
  199. package/types/cjs/functions/evaluate/should-force-browser-runtime-in-node.d.cts +1 -0
  200. package/types/cjs/functions/event-handler-name.d.cts +1 -0
  201. package/types/cjs/functions/extract-text-styles.d.cts +4 -0
  202. package/types/cjs/functions/fast-clone.d.cts +4 -0
  203. package/types/cjs/functions/fetch-builder-props.d.cts +53 -0
  204. package/types/cjs/functions/get-block-actions-handler.d.cts +8 -0
  205. package/types/cjs/functions/get-block-actions.d.cts +10 -0
  206. package/types/cjs/functions/get-block-component-options.d.cts +2 -0
  207. package/types/cjs/functions/get-block-properties.d.cts +10 -0
  208. package/types/cjs/functions/get-builder-search-params/index.d.cts +9 -0
  209. package/types/cjs/functions/get-class-prop-name.d.cts +1 -0
  210. package/types/cjs/functions/get-content/generate-content-url.d.cts +2 -0
  211. package/types/cjs/functions/get-content/index.d.cts +18 -0
  212. package/types/cjs/functions/get-content/types.d.cts +139 -0
  213. package/types/cjs/functions/get-env.d.cts +2 -0
  214. package/types/cjs/functions/get-fetch.d.cts +1 -0
  215. package/types/cjs/functions/get-global-this.d.cts +4 -0
  216. package/types/cjs/functions/get-processed-block.d.cts +10 -0
  217. package/types/cjs/functions/get-style.d.cts +12 -0
  218. package/types/cjs/functions/get.d.cts +1 -0
  219. package/types/cjs/functions/is-browser.d.cts +1 -0
  220. package/types/cjs/functions/is-edge-runtime.d.cts +4 -0
  221. package/types/cjs/functions/is-editing.d.cts +2 -0
  222. package/types/cjs/functions/is-from-trusted-host.d.cts +3 -0
  223. package/types/cjs/functions/is-iframe.d.cts +1 -0
  224. package/types/cjs/functions/is-node-runtime.d.cts +4 -0
  225. package/types/cjs/functions/is-previewing.d.cts +2 -0
  226. package/types/cjs/functions/on-change.d.cts +7 -0
  227. package/types/cjs/functions/register-component.d.cts +6 -0
  228. package/types/cjs/functions/register.d.cts +16 -0
  229. package/types/cjs/functions/set-editor-settings.d.cts +4 -0
  230. package/types/cjs/functions/set.d.cts +7 -0
  231. package/types/cjs/functions/track/helpers.d.cts +5 -0
  232. package/types/cjs/functions/track/index.d.cts +51 -0
  233. package/types/cjs/functions/track/interaction.d.cts +13 -0
  234. package/types/cjs/functions/transform-block-properties.d.cts +7 -0
  235. package/types/cjs/functions/transform-block.d.cts +2 -0
  236. package/types/cjs/functions/transform-style-property.d.cts +7 -0
  237. package/types/cjs/helpers/ab-tests.d.cts +9 -0
  238. package/types/cjs/helpers/canTrack.d.cts +1 -0
  239. package/types/cjs/helpers/cookie.d.cts +19 -0
  240. package/types/cjs/helpers/css.d.cts +7 -0
  241. package/types/cjs/helpers/flatten.d.cts +16 -0
  242. package/types/cjs/helpers/localStorage.d.cts +9 -0
  243. package/types/cjs/helpers/logger.d.cts +7 -0
  244. package/types/cjs/helpers/nullable.d.cts +2 -0
  245. package/types/cjs/helpers/omit.d.cts +1 -0
  246. package/types/cjs/helpers/preview-lru-cache/get.d.cts +2 -0
  247. package/types/cjs/helpers/preview-lru-cache/helpers.d.cts +1 -0
  248. package/types/cjs/helpers/preview-lru-cache/init.d.cts +6 -0
  249. package/types/cjs/helpers/preview-lru-cache/set.d.cts +7 -0
  250. package/types/cjs/helpers/preview-lru-cache/types.d.cts +1 -0
  251. package/types/cjs/helpers/search/search.d.cts +5 -0
  252. package/types/cjs/helpers/sessionId.d.cts +6 -0
  253. package/types/cjs/helpers/subscribe-to-editor.d.cts +35 -0
  254. package/types/cjs/helpers/time.d.cts +1 -0
  255. package/types/cjs/helpers/url.d.cts +6 -0
  256. package/types/cjs/helpers/uuid.d.cts +8 -0
  257. package/types/cjs/helpers/visitorId.d.cts +6 -0
  258. package/types/cjs/index-helpers/blocks-exports.d.cts +14 -0
  259. package/types/cjs/index-helpers/top-of-file.d.cts +1 -0
  260. package/types/cjs/index.d.cts +10 -0
  261. package/types/cjs/scripts/init-editing.d.cts +7 -0
  262. package/types/cjs/server-index.d.cts +39 -0
  263. package/types/cjs/types/api-version.d.cts +2 -0
  264. package/types/cjs/types/builder-block.d.cts +84 -0
  265. package/types/cjs/types/builder-content.d.cts +44 -0
  266. package/types/cjs/types/builder-props.d.cts +12 -0
  267. package/types/cjs/types/can-track.d.cts +3 -0
  268. package/types/cjs/types/components.d.cts +110 -0
  269. package/types/cjs/types/deep-partial.d.cts +3 -0
  270. package/types/cjs/types/element.d.cts +59 -0
  271. package/types/cjs/types/enforced-partials.d.cts +26 -0
  272. package/types/cjs/types/input.d.cts +122 -0
  273. package/types/cjs/types/targets.d.cts +1 -0
  274. package/types/cjs/types/typescript.d.cts +8 -0
  275. package/types/components/blocks/blocks-wrapper.d.ts +1 -0
  276. package/types/components/blocks/blocks.types.d.ts +2 -1
  277. package/types/constants/sdk-version.d.ts +1 -1
  278. package/types/esm/blocks/BaseText.d.mts +6 -0
  279. package/types/esm/blocks/button/button.d.mts +4 -0
  280. package/types/esm/blocks/button/button.types.d.mts +7 -0
  281. package/types/esm/blocks/button/component-info.d.mts +2 -0
  282. package/types/esm/blocks/button/index.d.mts +1 -0
  283. package/types/esm/blocks/columns/columns.d.mts +4 -0
  284. package/types/esm/blocks/columns/columns.types.d.mts +15 -0
  285. package/types/esm/blocks/columns/component-info.d.mts +2 -0
  286. package/types/esm/blocks/columns/helpers.d.mts +1 -0
  287. package/types/esm/blocks/columns/index.d.mts +1 -0
  288. package/types/esm/blocks/custom-code/component-info.d.mts +2 -0
  289. package/types/esm/blocks/custom-code/custom-code.d.mts +7 -0
  290. package/types/esm/blocks/custom-code/index.d.mts +1 -0
  291. package/types/esm/blocks/embed/component-info.d.mts +2 -0
  292. package/types/esm/blocks/embed/embed.d.mts +6 -0
  293. package/types/esm/blocks/embed/helpers.d.mts +1 -0
  294. package/types/esm/blocks/embed/index.d.mts +1 -0
  295. package/types/esm/blocks/form/form/component-info.d.mts +2 -0
  296. package/types/esm/blocks/form/form/form.d.mts +33 -0
  297. package/types/esm/blocks/form/form/index.d.mts +1 -0
  298. package/types/esm/blocks/form/input/component-info.d.mts +2 -0
  299. package/types/esm/blocks/form/input/index.d.mts +1 -0
  300. package/types/esm/blocks/form/input/input.d.mts +15 -0
  301. package/types/esm/blocks/form/select/component-info.d.mts +2 -0
  302. package/types/esm/blocks/form/select/index.d.mts +1 -0
  303. package/types/esm/blocks/form/select/select.d.mts +16 -0
  304. package/types/esm/blocks/form/submit-button/component-info.d.mts +2 -0
  305. package/types/esm/blocks/form/submit-button/index.d.mts +1 -0
  306. package/types/esm/blocks/form/submit-button/submit-button.d.mts +10 -0
  307. package/types/esm/blocks/fragment/component-info.d.mts +2 -0
  308. package/types/esm/blocks/fragment/fragment.d.mts +4 -0
  309. package/types/esm/blocks/fragment/fragment.types.d.mts +5 -0
  310. package/types/esm/blocks/fragment/index.d.mts +1 -0
  311. package/types/esm/blocks/helpers.d.mts +13 -0
  312. package/types/esm/blocks/image/component-info.d.mts +2 -0
  313. package/types/esm/blocks/image/image.d.mts +4 -0
  314. package/types/esm/blocks/image/image.helpers.d.mts +1 -0
  315. package/types/esm/blocks/image/image.types.d.mts +19 -0
  316. package/types/esm/blocks/image/index.d.mts +1 -0
  317. package/types/esm/blocks/img/component-info.d.mts +2 -0
  318. package/types/esm/blocks/img/img.d.mts +14 -0
  319. package/types/esm/blocks/img/index.d.mts +1 -0
  320. package/types/esm/blocks/raw-text/component-info.d.mts +2 -0
  321. package/types/esm/blocks/raw-text/index.d.mts +1 -0
  322. package/types/esm/blocks/raw-text/raw-text.d.mts +7 -0
  323. package/types/esm/blocks/section/component-info.d.mts +2 -0
  324. package/types/esm/blocks/section/index.d.mts +1 -0
  325. package/types/esm/blocks/section/section.d.mts +4 -0
  326. package/types/esm/blocks/section/section.types.d.mts +6 -0
  327. package/types/esm/blocks/slot/component-info.d.mts +2 -0
  328. package/types/esm/blocks/slot/index.d.mts +1 -0
  329. package/types/esm/blocks/slot/slot.d.mts +8 -0
  330. package/types/esm/blocks/symbol/component-info.d.mts +2 -0
  331. package/types/esm/blocks/symbol/index.d.mts +1 -0
  332. package/types/esm/blocks/symbol/symbol.d.mts +4 -0
  333. package/types/esm/blocks/symbol/symbol.helpers.d.mts +14 -0
  334. package/types/esm/blocks/symbol/symbol.types.d.mts +18 -0
  335. package/types/esm/blocks/tabs/component-info.d.mts +2 -0
  336. package/types/esm/blocks/tabs/index.d.mts +1 -0
  337. package/types/esm/blocks/tabs/tabs.d.mts +4 -0
  338. package/types/esm/blocks/tabs/tabs.types.d.mts +13 -0
  339. package/types/esm/blocks/text/component-info.d.mts +2 -0
  340. package/types/esm/blocks/text/index.d.mts +1 -0
  341. package/types/esm/blocks/text/text.d.mts +4 -0
  342. package/types/esm/blocks/text/text.types.d.mts +4 -0
  343. package/types/esm/blocks/textarea/component-info.d.mts +2 -0
  344. package/types/esm/blocks/textarea/index.d.mts +1 -0
  345. package/types/esm/blocks/textarea/textarea.d.mts +13 -0
  346. package/types/esm/blocks/video/component-info.d.mts +2 -0
  347. package/types/esm/blocks/video/index.d.mts +1 -0
  348. package/types/esm/blocks/video/video.d.mts +4 -0
  349. package/types/esm/blocks/video/video.types.d.mts +21 -0
  350. package/types/esm/components/block/animator.d.mts +5 -0
  351. package/types/esm/components/block/block.d.mts +11 -0
  352. package/types/esm/components/block/block.helpers.d.mts +18 -0
  353. package/types/esm/components/block/components/block-styles.d.mts +9 -0
  354. package/types/esm/components/block/components/block-wrapper.d.mts +15 -0
  355. package/types/esm/components/block/components/component-ref/component-ref.d.mts +4 -0
  356. package/types/esm/components/block/components/component-ref/component-ref.helpers.d.mts +31 -0
  357. package/types/esm/components/block/components/interactive-element.d.mts +14 -0
  358. package/types/esm/components/block/components/repeated-block.d.mts +8 -0
  359. package/types/esm/components/block/types.d.mts +6 -0
  360. package/types/esm/components/blocks/blocks-wrapper.d.mts +19 -0
  361. package/types/esm/components/blocks/blocks.d.mts +4 -0
  362. package/types/esm/components/blocks/blocks.types.d.mts +7 -0
  363. package/types/esm/components/blocks/index.d.mts +1 -0
  364. package/types/esm/components/content/components/enable-editor.d.mts +10 -0
  365. package/types/esm/components/content/components/styles.d.mts +10 -0
  366. package/types/esm/components/content/components/styles.helpers.d.mts +17 -0
  367. package/types/esm/components/content/content.d.mts +4 -0
  368. package/types/esm/components/content/content.helpers.d.mts +7 -0
  369. package/types/esm/components/content/content.types.d.mts +13 -0
  370. package/types/esm/components/content/contentProps.types.d.mts +17 -0
  371. package/types/esm/components/content/index.d.mts +1 -0
  372. package/types/esm/components/content/wrap-component-ref.d.mts +6 -0
  373. package/types/esm/components/content-variants/content-variants.d.mts +10 -0
  374. package/types/esm/components/content-variants/content-variants.types.d.mts +71 -0
  375. package/types/esm/components/content-variants/helpers.d.mts +41 -0
  376. package/types/esm/components/content-variants/index.d.mts +1 -0
  377. package/types/esm/components/content-variants/inlined-fns.d.mts +14 -0
  378. package/types/esm/components/dynamic-div.d.mts +15 -0
  379. package/types/esm/components/dynamic-renderer/dynamic-renderer.d.mts +9 -0
  380. package/types/esm/components/dynamic-renderer/dynamic-renderer.helpers.d.mts +1 -0
  381. package/types/esm/components/error-boundary.d.mts +11 -0
  382. package/types/esm/components/inlined-script.d.mts +7 -0
  383. package/types/esm/components/inlined-styles.d.mts +7 -0
  384. package/types/esm/constants/builder-registered-components.d.mts +6 -0
  385. package/types/esm/constants/device-sizes.d.mts +13 -0
  386. package/types/esm/constants/extra-components.d.mts +7 -0
  387. package/types/esm/constants/sdk-version.d.mts +1 -0
  388. package/types/esm/constants/target.d.mts +2 -0
  389. package/types/esm/context/builder.context.d.mts +3 -0
  390. package/types/esm/context/components.context.d.mts +3 -0
  391. package/types/esm/context/index.d.mts +1 -0
  392. package/types/esm/context/types.d.mts +36 -0
  393. package/types/esm/functions/apply-patch-with-mutation.d.mts +10 -0
  394. package/types/esm/functions/camel-to-kebab-case.d.mts +1 -0
  395. package/types/esm/functions/deopt.d.mts +4 -0
  396. package/types/esm/functions/evaluate/browser-runtime/browser.d.mts +8 -0
  397. package/types/esm/functions/evaluate/browser-runtime/index.d.mts +1 -0
  398. package/types/esm/functions/evaluate/choose-eval.d.mts +6 -0
  399. package/types/esm/functions/evaluate/edge-runtime/acorn-interpreter.d.mts +2 -0
  400. package/types/esm/functions/evaluate/edge-runtime/edge-runtime.d.mts +2 -0
  401. package/types/esm/functions/evaluate/edge-runtime/index.d.mts +1 -0
  402. package/types/esm/functions/evaluate/evaluate.d.mts +4 -0
  403. package/types/esm/functions/evaluate/helpers.d.mts +25 -0
  404. package/types/esm/functions/evaluate/index.d.mts +1 -0
  405. package/types/esm/functions/evaluate/node-runtime/index.d.mts +1 -0
  406. package/types/esm/functions/evaluate/node-runtime/init.d.mts +13 -0
  407. package/types/esm/functions/evaluate/node-runtime/node-runtime.d.mts +11 -0
  408. package/types/esm/functions/evaluate/node-runtime/safeDynamicRequire.d.mts +6 -0
  409. package/types/esm/functions/evaluate/placeholder-runtime.d.mts +2 -0
  410. package/types/esm/functions/evaluate/should-force-browser-runtime-in-node.d.mts +1 -0
  411. package/types/esm/functions/event-handler-name.d.mts +1 -0
  412. package/types/esm/functions/extract-text-styles.d.mts +4 -0
  413. package/types/esm/functions/fast-clone.d.mts +4 -0
  414. package/types/esm/functions/fetch-builder-props.d.mts +53 -0
  415. package/types/esm/functions/get-block-actions-handler.d.mts +8 -0
  416. package/types/esm/functions/get-block-actions.d.mts +10 -0
  417. package/types/esm/functions/get-block-component-options.d.mts +2 -0
  418. package/types/esm/functions/get-block-properties.d.mts +10 -0
  419. package/types/esm/functions/get-builder-search-params/index.d.mts +9 -0
  420. package/types/esm/functions/get-class-prop-name.d.mts +1 -0
  421. package/types/esm/functions/get-content/generate-content-url.d.mts +2 -0
  422. package/types/esm/functions/get-content/index.d.mts +18 -0
  423. package/types/esm/functions/get-content/types.d.mts +139 -0
  424. package/types/esm/functions/get-env.d.mts +2 -0
  425. package/types/esm/functions/get-fetch.d.mts +1 -0
  426. package/types/esm/functions/get-global-this.d.mts +4 -0
  427. package/types/esm/functions/get-processed-block.d.mts +10 -0
  428. package/types/esm/functions/get-style.d.mts +12 -0
  429. package/types/esm/functions/get.d.mts +1 -0
  430. package/types/esm/functions/is-browser.d.mts +1 -0
  431. package/types/esm/functions/is-edge-runtime.d.mts +4 -0
  432. package/types/esm/functions/is-editing.d.mts +2 -0
  433. package/types/esm/functions/is-from-trusted-host.d.mts +3 -0
  434. package/types/esm/functions/is-iframe.d.mts +1 -0
  435. package/types/esm/functions/is-node-runtime.d.mts +4 -0
  436. package/types/esm/functions/is-previewing.d.mts +2 -0
  437. package/types/esm/functions/on-change.d.mts +7 -0
  438. package/types/esm/functions/register-component.d.mts +6 -0
  439. package/types/esm/functions/register.d.mts +16 -0
  440. package/types/esm/functions/set-editor-settings.d.mts +4 -0
  441. package/types/esm/functions/set.d.mts +7 -0
  442. package/types/esm/functions/track/helpers.d.mts +5 -0
  443. package/types/esm/functions/track/index.d.mts +51 -0
  444. package/types/esm/functions/track/interaction.d.mts +13 -0
  445. package/types/esm/functions/transform-block-properties.d.mts +7 -0
  446. package/types/esm/functions/transform-block.d.mts +2 -0
  447. package/types/esm/functions/transform-style-property.d.mts +7 -0
  448. package/types/esm/helpers/ab-tests.d.mts +9 -0
  449. package/types/esm/helpers/canTrack.d.mts +1 -0
  450. package/types/esm/helpers/cookie.d.mts +19 -0
  451. package/types/esm/helpers/css.d.mts +7 -0
  452. package/types/esm/helpers/flatten.d.mts +16 -0
  453. package/types/esm/helpers/localStorage.d.mts +9 -0
  454. package/types/esm/helpers/logger.d.mts +7 -0
  455. package/types/esm/helpers/nullable.d.mts +2 -0
  456. package/types/esm/helpers/omit.d.mts +1 -0
  457. package/types/esm/helpers/preview-lru-cache/get.d.mts +2 -0
  458. package/types/esm/helpers/preview-lru-cache/helpers.d.mts +1 -0
  459. package/types/esm/helpers/preview-lru-cache/init.d.mts +6 -0
  460. package/types/esm/helpers/preview-lru-cache/set.d.mts +7 -0
  461. package/types/esm/helpers/preview-lru-cache/types.d.mts +1 -0
  462. package/types/esm/helpers/search/search.d.mts +5 -0
  463. package/types/esm/helpers/sessionId.d.mts +6 -0
  464. package/types/esm/helpers/subscribe-to-editor.d.mts +35 -0
  465. package/types/esm/helpers/time.d.mts +1 -0
  466. package/types/esm/helpers/url.d.mts +6 -0
  467. package/types/esm/helpers/uuid.d.mts +8 -0
  468. package/types/esm/helpers/visitorId.d.mts +6 -0
  469. package/types/esm/index-helpers/blocks-exports.d.mts +14 -0
  470. package/types/esm/index-helpers/top-of-file.d.mts +1 -0
  471. package/types/esm/index.d.mts +10 -0
  472. package/types/esm/index.d.mts.d.mts +10 -0
  473. package/types/esm/scripts/init-editing.d.mts +7 -0
  474. package/types/esm/server-index.d.mts +39 -0
  475. package/types/esm/types/api-version.d.mts +2 -0
  476. package/types/esm/types/builder-block.d.mts +84 -0
  477. package/types/esm/types/builder-content.d.mts +44 -0
  478. package/types/esm/types/builder-props.d.mts +12 -0
  479. package/types/esm/types/can-track.d.mts +3 -0
  480. package/types/esm/types/components.d.mts +110 -0
  481. package/types/esm/types/deep-partial.d.mts +3 -0
  482. package/types/esm/types/element.d.mts +59 -0
  483. package/types/esm/types/enforced-partials.d.mts +26 -0
  484. package/types/esm/types/input.d.mts +122 -0
  485. package/types/esm/types/targets.d.mts +1 -0
  486. package/types/esm/types/typescript.d.mts +8 -0
  487. package/types/functions/evaluate/node-runtime/init.d.ts +2 -0
  488. package/types/functions/evaluate/node-runtime/setIvm.d.ts +1 -0
  489. package/types/helpers/sdk-headers.d.ts +5 -0
@@ -1,8 +1,8 @@
1
- import { isEditing, isBrowser, getUserAttributes, TARGET, logger, MSG_PREFIX, checkIsDefined } from "./server-entry-fa11b353.js";
1
+ import { isEditing, isBrowser, getUserAttributes, TARGET, logger, MSG_PREFIX } from "./server-entry-8956b57e.js";
2
2
  const getFunctionArguments = ({
3
3
  builder: e,
4
4
  context: t,
5
- event: r,
5
+ event: s,
6
6
  state: n
7
7
  }) => Object.entries({
8
8
  state: n,
@@ -10,7 +10,7 @@ const getFunctionArguments = ({
10
10
  // legacy
11
11
  builder: e,
12
12
  context: t,
13
- event: r
13
+ event: s
14
14
  }), getBuilderGlobals = () => ({
15
15
  isEditing: isEditing(),
16
16
  isBrowser: isBrowser(),
@@ -22,25 +22,25 @@ const getFunctionArguments = ({
22
22
  function flattenState({
23
23
  rootState: e,
24
24
  localState: t,
25
- rootSetState: r
25
+ rootSetState: s
26
26
  }) {
27
27
  return new Proxy(e, {
28
- get: (n, o) => {
29
- if (t && o in t)
30
- return t[o];
31
- const s = n[o];
32
- return typeof s == "object" && s !== null ? flattenState({
33
- rootState: s,
28
+ get: (n, r) => {
29
+ if (t && r in t)
30
+ return t[r];
31
+ const o = n[r];
32
+ return typeof o == "object" && o !== null ? flattenState({
33
+ rootState: o,
34
34
  localState: void 0,
35
- rootSetState: r ? (i) => {
36
- n[o] = i, r(n);
35
+ rootSetState: s ? (i) => {
36
+ n[r] = i, s(n);
37
37
  } : void 0
38
- }) : s;
38
+ }) : o;
39
39
  },
40
- set: (n, o, s) => {
41
- if (t && o in t)
40
+ set: (n, r, o) => {
41
+ if (t && r in t)
42
42
  throw new Error("Writing to local state is not allowed as it is read-only.");
43
- return n[o] = s, r == null || r(n), !0;
43
+ return n[r] = o, s == null || s(n), !0;
44
44
  }
45
45
  });
46
46
  }
@@ -53,11 +53,11 @@ const SDK_NAME_FOR_TARGET = (() => {
53
53
  default:
54
54
  return TARGET;
55
55
  }
56
- })(), SDK_NAME = `@builder.io/sdk-${SDK_NAME_FOR_TARGET}`, fastClone = (e) => JSON.parse(JSON.stringify(e)), set = (e, t, r) => {
56
+ })(), SDK_NAME = `@builder.io/sdk-${SDK_NAME_FOR_TARGET}`, fastClone = (e) => JSON.parse(JSON.stringify(e)), set = (e, t, s) => {
57
57
  if (Object(e) !== e)
58
58
  return e;
59
59
  const n = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
60
- return n.slice(0, -1).reduce((o, s, i) => Object(o[s]) === o[s] ? o[s] : o[s] = Math.abs(Number(n[i + 1])) >> 0 === +n[i + 1] ? [] : {}, e)[n[n.length - 1]] = r, e;
60
+ return n.slice(0, -1).reduce((r, o, i) => Object(r[o]) === r[o] ? r[o] : r[o] = Math.abs(Number(n[i + 1])) >> 0 === +n[i + 1] ? [] : {}, e)[n[n.length - 1]] = s, e;
61
61
  }, noop = () => {
62
62
  };
63
63
  let safeDynamicRequire = noop;
@@ -95,10 +95,10 @@ var refToProxy = (obj) => {
95
95
  code: e,
96
96
  args: t
97
97
  }) => {
98
- const r = t.map(([n]) => `var ${n} = refToProxy(${getSyncValName(n)}); `).join("");
98
+ const s = t.map(([n]) => `var ${n} = refToProxy(${getSyncValName(n)}); `).join("");
99
99
  return `
100
100
  ${REF_TO_PROXY_FN}
101
- ${r}
101
+ ${s}
102
102
  function theFunction() {
103
103
  ${e}
104
104
  }
@@ -138,64 +138,51 @@ const setIvm = (e, t = {}) => {
138
138
  function setIsolateContext(e = {
139
139
  memoryLimit: 128
140
140
  }) {
141
- const t = getIvm(), n = new t.Isolate(e).createContextSync(), o = n.global;
142
- return o.setSync("global", o.derefInto()), o.setSync("log", function(...s) {
143
- console.log(...s);
144
- }), o.setSync(INJECTED_IVM_GLOBAL, t), IVM_CONTEXT = n, n;
141
+ const t = getIvm(), n = new t.Isolate(e).createContextSync(), r = n.global;
142
+ return r.setSync("global", r.derefInto()), r.setSync("log", function(...o) {
143
+ console.log(...o);
144
+ }), r.setSync(INJECTED_IVM_GLOBAL, t), IVM_CONTEXT = n, n;
145
145
  }
146
146
  const getIsolateContext = () => IVM_CONTEXT || setIsolateContext(), runInNode = ({
147
147
  code: e,
148
148
  builder: t,
149
- context: r,
149
+ context: s,
150
150
  event: n,
151
- localState: o,
152
- rootSetState: s,
151
+ localState: r,
152
+ rootSetState: o,
153
153
  rootState: i
154
154
  }) => {
155
- const E = getIvm(), I = fastClone({
155
+ const I = getIvm(), _ = fastClone({
156
156
  ...i,
157
- ...o
157
+ ...r
158
158
  }), l = getFunctionArguments({
159
159
  builder: t,
160
- context: r,
160
+ context: s,
161
161
  event: n,
162
- state: I
163
- }), a = getIsolateContext(), d = a.global;
164
- d.setSync(BUILDER_SET_STATE_NAME, function(c, u) {
165
- set(i, c, u), s == null || s(i);
162
+ state: _
163
+ }), a = getIsolateContext(), E = a.global;
164
+ E.setSync(BUILDER_SET_STATE_NAME, function(c, u) {
165
+ set(i, c, u), o == null || o(i);
166
166
  }), l.forEach(([c, u]) => {
167
- const y = typeof u == "object" ? new E.Reference(
167
+ const f = typeof u == "object" ? new I.Reference(
168
168
  // workaround: methods with default values for arguments is not being cloned over
169
169
  c === "builder" ? {
170
170
  ...u,
171
171
  getUserAttributes: () => u.getUserAttributes()
172
172
  } : u
173
173
  ) : null;
174
- d.setSync(getSyncValName(c), y);
174
+ E.setSync(getSyncValName(c), f);
175
175
  });
176
- const N = processCode({
176
+ const d = processCode({
177
177
  code: e,
178
178
  args: l
179
- }), f = a.evalClosureSync(N);
179
+ }), y = a.evalClosureSync(d);
180
180
  try {
181
- return JSON.parse(f);
181
+ return JSON.parse(y);
182
182
  } catch {
183
- return f;
183
+ return y;
184
184
  }
185
185
  };
186
- function isNodeRuntime() {
187
- var e;
188
- return typeof process != "undefined" && checkIsDefined((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
189
- }
190
- const shouldForceBrowserRuntimeInNode = ({
191
- shouldLogWarning: e
192
- }) => {
193
- var o;
194
- if (!isNodeRuntime())
195
- return !1;
196
- const t = process.arch === "arm64", r = process.version.startsWith("v20"), n = (o = process.env.NODE_OPTIONS) == null ? void 0 : o.includes("--no-node-snapshot");
197
- return t && r && !n ? (e && logger.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "), !0) : !1;
198
- };
199
186
  export {
200
187
  fastClone,
201
188
  flattenState,
@@ -204,6 +191,5 @@ export {
204
191
  parseCode,
205
192
  runInNode,
206
193
  set,
207
- setIvm,
208
- shouldForceBrowserRuntimeInNode
194
+ setIvm
209
195
  };
@@ -1,4 +1,4 @@
1
- "use strict";const serverEntry=require("./server-entry-a7139d8f.cjs"),getFunctionArguments=({builder:e,context:t,event:o,state:n})=>Object.entries({state:n,Builder:e,builder:e,context:t,event:o}),getBuilderGlobals=()=>({isEditing:serverEntry.isEditing(),isBrowser:serverEntry.isBrowser(),isServer:!serverEntry.isBrowser(),getUserAttributes:()=>serverEntry.getUserAttributes()}),parseCode=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e;function flattenState({rootState:e,localState:t,rootSetState:o}){return new Proxy(e,{get:(n,r)=>{if(t&&r in t)return t[r];const s=n[r];return typeof s=="object"&&s!==null?flattenState({rootState:s,localState:void 0,rootSetState:o?i=>{n[r]=i,o(n)}:void 0}):s},set:(n,r,s)=>{if(t&&r in t)throw new Error("Writing to local state is not allowed as it is read-only.");return n[r]=s,o==null||o(n),!0}})}const SDK_NAME_FOR_TARGET=(()=>{switch(serverEntry.TARGET){case"rsc":return"react-nextjs";case"reactNative":return"react-native";default:return serverEntry.TARGET}})(),SDK_NAME=`@builder.io/sdk-${SDK_NAME_FOR_TARGET}`,fastClone=e=>JSON.parse(JSON.stringify(e)),set=(e,t,o)=>{if(Object(e)!==e)return e;const n=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return n.slice(0,-1).reduce((r,s,i)=>Object(r[s])===r[s]?r[s]:r[s]=Math.abs(Number(n[i+1]))>>0===+n[i+1]?[]:{},e)[n[n.length-1]]=o,e},noop=()=>{};let safeDynamicRequire=noop;try{safeDynamicRequire=eval("require")}catch(e){}const getSyncValName=e=>`bldr_${e}_sync`,BUILDER_SET_STATE_NAME="BUILDER_SET_STATE",INJECTED_IVM_GLOBAL="BUILDER_IVM",REF_TO_PROXY_FN=`
1
+ "use strict";const serverEntry=require("./server-entry-1c1c1459.cjs"),getFunctionArguments=({builder:e,context:t,event:s,state:n})=>Object.entries({state:n,Builder:e,builder:e,context:t,event:s}),getBuilderGlobals=()=>({isEditing:serverEntry.isEditing(),isBrowser:serverEntry.isBrowser(),isServer:!serverEntry.isBrowser(),getUserAttributes:()=>serverEntry.getUserAttributes()}),parseCode=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e;function flattenState({rootState:e,localState:t,rootSetState:s}){return new Proxy(e,{get:(n,r)=>{if(t&&r in t)return t[r];const o=n[r];return typeof o=="object"&&o!==null?flattenState({rootState:o,localState:void 0,rootSetState:s?i=>{n[r]=i,s(n)}:void 0}):o},set:(n,r,o)=>{if(t&&r in t)throw new Error("Writing to local state is not allowed as it is read-only.");return n[r]=o,s==null||s(n),!0}})}const SDK_NAME_FOR_TARGET=(()=>{switch(serverEntry.TARGET){case"rsc":return"react-nextjs";case"reactNative":return"react-native";default:return serverEntry.TARGET}})(),SDK_NAME=`@builder.io/sdk-${SDK_NAME_FOR_TARGET}`,fastClone=e=>JSON.parse(JSON.stringify(e)),set=(e,t,s)=>{if(Object(e)!==e)return e;const n=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return n.slice(0,-1).reduce((r,o,i)=>Object(r[o])===r[o]?r[o]:r[o]=Math.abs(Number(n[i+1]))>>0===+n[i+1]?[]:{},e)[n[n.length-1]]=s,e},noop=()=>{};let safeDynamicRequire=noop;try{safeDynamicRequire=eval("require")}catch(e){}const getSyncValName=e=>`bldr_${e}_sync`,BUILDER_SET_STATE_NAME="BUILDER_SET_STATE",INJECTED_IVM_GLOBAL="BUILDER_IVM",REF_TO_PROXY_FN=`
2
2
  var refToProxy = (obj) => {
3
3
  if (typeof obj !== 'object' || obj === null) {
4
4
  return obj;
@@ -24,9 +24,9 @@ var refToProxy = (obj) => {
24
24
  }
25
25
  })
26
26
  }
27
- `,processCode=({code:e,args:t})=>{const o=t.map(([n])=>`var ${n} = refToProxy(${getSyncValName(n)}); `).join("");return`
27
+ `,processCode=({code:e,args:t})=>{const s=t.map(([n])=>`var ${n} = refToProxy(${getSyncValName(n)}); `).join("");return`
28
28
  ${REF_TO_PROXY_FN}
29
- ${o}
29
+ ${s}
30
30
  function theFunction() {
31
31
  ${e}
32
32
  }
@@ -45,4 +45,4 @@ if (typeof output === 'object' && output !== null) {
45
45
  ${SHOULD_MENTION_INITIALIZE_SCRIPT?`- import and call \`initializeNodeRuntime()\` from "${SDK_NAME}/node/init".`:""}
46
46
  - add the following import: \`await import('isolated-vm')\`.
47
47
 
48
- For more information, visit https://builder.io/c/docs/integration-tips#enabling-data-bindings-in-node-environments`;throw new Error(e)};function setIsolateContext(e={memoryLimit:128}){const t=getIvm(),n=new t.Isolate(e).createContextSync(),r=n.global;return r.setSync("global",r.derefInto()),r.setSync("log",function(...s){console.log(...s)}),r.setSync(INJECTED_IVM_GLOBAL,t),IVM_CONTEXT=n,n}const getIsolateContext=()=>IVM_CONTEXT||setIsolateContext(),runInNode=({code:e,builder:t,context:o,event:n,localState:r,rootSetState:s,rootState:i})=>{const y=getIvm(),f=fastClone({...i,...r}),l=getFunctionArguments({builder:t,context:o,event:n,state:f}),a=getIsolateContext(),d=a.global;d.setSync(BUILDER_SET_STATE_NAME,function(c,u){set(i,c,u),s==null||s(i)}),l.forEach(([c,u])=>{const N=typeof u=="object"?new y.Reference(c==="builder"?{...u,getUserAttributes:()=>u.getUserAttributes()}:u):null;d.setSync(getSyncValName(c),N)});const I=processCode({code:e,args:l}),E=a.evalClosureSync(I);try{return JSON.parse(E)}catch{return E}};function isNodeRuntime(){var e;return typeof process!="undefined"&&serverEntry.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const shouldForceBrowserRuntimeInNode=({shouldLogWarning:e})=>{var r;if(!isNodeRuntime())return!1;const t=process.arch==="arm64",o=process.version.startsWith("v20"),n=(r=process.env.NODE_OPTIONS)==null?void 0:r.includes("--no-node-snapshot");return t&&o&&!n?(e&&serverEntry.logger.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "),!0):!1};exports.fastClone=fastClone;exports.flattenState=flattenState;exports.getBuilderGlobals=getBuilderGlobals;exports.getFunctionArguments=getFunctionArguments;exports.parseCode=parseCode;exports.runInNode=runInNode;exports.set=set;exports.setIvm=setIvm;exports.shouldForceBrowserRuntimeInNode=shouldForceBrowserRuntimeInNode;
48
+ For more information, visit https://builder.io/c/docs/integration-tips#enabling-data-bindings-in-node-environments`;throw new Error(e)};function setIsolateContext(e={memoryLimit:128}){const t=getIvm(),n=new t.Isolate(e).createContextSync(),r=n.global;return r.setSync("global",r.derefInto()),r.setSync("log",function(...o){console.log(...o)}),r.setSync(INJECTED_IVM_GLOBAL,t),IVM_CONTEXT=n,n}const getIsolateContext=()=>IVM_CONTEXT||setIsolateContext(),runInNode=({code:e,builder:t,context:s,event:n,localState:r,rootSetState:o,rootState:i})=>{const I=getIvm(),d=fastClone({...i,...r}),l=getFunctionArguments({builder:t,context:s,event:n,state:d}),a=getIsolateContext(),y=a.global;y.setSync(BUILDER_SET_STATE_NAME,function(c,u){set(i,c,u),o==null||o(i)}),l.forEach(([c,u])=>{const f=typeof u=="object"?new I.Reference(c==="builder"?{...u,getUserAttributes:()=>u.getUserAttributes()}:u):null;y.setSync(getSyncValName(c),f)});const _=processCode({code:e,args:l}),E=a.evalClosureSync(_);try{return JSON.parse(E)}catch{return E}};exports.fastClone=fastClone;exports.flattenState=flattenState;exports.getBuilderGlobals=getBuilderGlobals;exports.getFunctionArguments=getFunctionArguments;exports.parseCode=parseCode;exports.runInNode=runInNode;exports.set=set;exports.setIvm=setIvm;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./setIvm-bf4f998d.cjs");require("./server-entry-1c1c1459.cjs");exports.setIvm=e.setIvm;
@@ -0,0 +1,5 @@
1
+ import { setIvm as t } from "./setIvm-2e562b9e.js";
2
+ import "./server-entry-8956b57e.js";
3
+ export {
4
+ t as setIvm
5
+ };
@@ -0,0 +1,17 @@
1
+ import { checkIsDefined as i, logger as t } from "./server-entry-8956b57e.js";
2
+ function a() {
3
+ var o;
4
+ return typeof process != "undefined" && i((o = process == null ? void 0 : process.versions) == null ? void 0 : o.node);
5
+ }
6
+ const d = ({
7
+ shouldLogWarning: o
8
+ }) => {
9
+ var e;
10
+ if (!a())
11
+ return !1;
12
+ const s = process.arch === "arm64", n = process.version.startsWith("v20"), r = (e = process.env.NODE_OPTIONS) == null ? void 0 : e.includes("--no-node-snapshot");
13
+ return s && n && !r ? (o && t.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "), !0) : !1;
14
+ };
15
+ export {
16
+ d as shouldForceBrowserRuntimeInNode
17
+ };
@@ -0,0 +1 @@
1
+ "use strict";const s=require("./server-entry-1c1c1459.cjs");function t(){var e;return typeof process!="undefined"&&s.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const c=({shouldLogWarning:e})=>{var o;if(!t())return!1;const n=process.arch==="arm64",r=process.version.startsWith("v20"),i=(o=process.env.NODE_OPTIONS)==null?void 0:o.includes("--no-node-snapshot");return n&&r&&!i?(e&&s.logger.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "),!0):!1};exports.shouldForceBrowserRuntimeInNode=c;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-react",
3
3
  "description": "Builder.io SDK for React",
4
- "version": "2.0.23",
4
+ "version": "2.0.24-1",
5
5
  "homepage": "https://github.com/BuilderIO/builder/tree/main/packages/sdks/output/react",
6
6
  "type": "module",
7
7
  "repository": {
@@ -148,5 +148,6 @@
148
148
  ]
149
149
  }
150
150
  }
151
- }
151
+ },
152
+ "stableVersion": "2.0.23"
152
153
  }
@@ -0,0 +1,2 @@
1
+ import type { ComponentInfo } from '../../types/components';
2
+ export declare const componentInfo: ComponentInfo;
@@ -0,0 +1 @@
1
+ export { default } from './textarea';
@@ -0,0 +1,13 @@
1
+ import * as React from "react";
2
+ /**
3
+ * This import is used by the Svelte SDK. Do not remove.
4
+ */
5
+ export interface TextareaProps {
6
+ attributes?: any;
7
+ name?: string;
8
+ value?: string;
9
+ defaultValue?: string;
10
+ placeholder?: string;
11
+ }
12
+ declare function Textarea(props: TextareaProps): React.JSX.Element;
13
+ export default Textarea;
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ export interface BaseTextProps {
3
+ text: string;
4
+ }
5
+ declare function BaseText(props: BaseTextProps): React.JSX.Element;
6
+ export default BaseText;
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import type { ButtonProps } from "./button.types.js";
3
+ declare function Button(props: ButtonProps): React.JSX.Element;
4
+ export default Button;
@@ -0,0 +1,7 @@
1
+ import type { BuilderLinkComponentProp } from '../../types/builder-props.js';
2
+ export interface ButtonProps extends BuilderLinkComponentProp {
3
+ attributes?: any;
4
+ text?: string;
5
+ link?: string;
6
+ openLinkInNewTab?: boolean;
7
+ }
@@ -0,0 +1,2 @@
1
+ import type { ComponentInfo } from '../../types/components.js';
2
+ export declare const componentInfo: ComponentInfo;
@@ -0,0 +1 @@
1
+ export { default } from './button.js';
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import type { ColumnProps } from "./columns.types.js";
3
+ declare function Columns(props: ColumnProps): React.JSX.Element;
4
+ export default Columns;
@@ -0,0 +1,15 @@
1
+ import type { BuilderBlock } from '../../types/builder-block.js';
2
+ import type { BuilderComponentsProp, BuilderDataProps, BuilderLinkComponentProp } from '../../types/builder-props.js';
3
+ export type Column = {
4
+ blocks: BuilderBlock[];
5
+ width?: number;
6
+ link?: string;
7
+ };
8
+ type StackColumnsAt = 'tablet' | 'mobile' | 'never';
9
+ export interface ColumnProps extends BuilderComponentsProp, BuilderLinkComponentProp, BuilderDataProps {
10
+ columns?: Column[];
11
+ space?: number;
12
+ stackColumnsAt?: StackColumnsAt;
13
+ reverseColumnsWhenStacked?: boolean;
14
+ }
15
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { ComponentInfo } from '../../types/components.js';
2
+ export declare const componentInfo: ComponentInfo;
@@ -0,0 +1 @@
1
+ export declare const getColumnsClass: (id?: string) => string;
@@ -0,0 +1 @@
1
+ export { default } from './columns.js';
@@ -0,0 +1,2 @@
1
+ import type { ComponentInfo } from '../../types/components.js';
2
+ export declare const componentInfo: ComponentInfo;
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ export interface CustomCodeProps {
3
+ code: string;
4
+ replaceNodes?: boolean;
5
+ }
6
+ declare function CustomCode(props: CustomCodeProps): React.JSX.Element;
7
+ export default CustomCode;
@@ -0,0 +1 @@
1
+ export { default } from './custom-code.js';
@@ -0,0 +1,2 @@
1
+ import type { ComponentInfo } from '../../types/components.js';
2
+ export declare const componentInfo: ComponentInfo;
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ export interface EmbedProps {
3
+ content: string;
4
+ }
5
+ declare function Embed(props: EmbedProps): React.JSX.Element;
6
+ export default Embed;
@@ -0,0 +1 @@
1
+ export declare const isJsScript: (script: HTMLScriptElement) => boolean;
@@ -0,0 +1 @@
1
+ export { default } from './embed.js';
@@ -0,0 +1,2 @@
1
+ import type { ComponentInfo } from '../../../types/components.js';
2
+ export declare const componentInfo: ComponentInfo;
@@ -0,0 +1,33 @@
1
+ import * as React from "react";
2
+ /**
3
+ * This import is used by the Svelte SDK. Do not remove.
4
+ */
5
+ export type FormProps = BuilderDataProps & BuilderComponentsProp & BuilderLinkComponentProp & {
6
+ attributes?: any;
7
+ name?: string;
8
+ action?: string;
9
+ validate?: boolean;
10
+ method?: string;
11
+ sendSubmissionsTo?: string;
12
+ sendSubmissionsToEmail?: string;
13
+ sendWithJs?: boolean;
14
+ contentType?: string;
15
+ customHeaders?: {
16
+ [key: string]: string;
17
+ };
18
+ successUrl?: string;
19
+ previewState?: FormState;
20
+ successMessage?: BuilderBlock[];
21
+ errorMessage?: BuilderBlock[];
22
+ sendingMessage?: BuilderBlock[];
23
+ resetFormOnSubmit?: boolean;
24
+ errorMessagePath?: string;
25
+ };
26
+ /**
27
+ * This import is used by the Svelte SDK. Do not remove.
28
+ */
29
+ export type FormState = "unsubmitted" | "sending" | "success" | "error";
30
+ import type { BuilderBlock } from "../../../types/builder-block.js";
31
+ import type { BuilderComponentsProp, BuilderDataProps, BuilderLinkComponentProp } from "../../../types/builder-props.js";
32
+ declare function FormComponent(props: FormProps): React.JSX.Element;
33
+ export default FormComponent;
@@ -0,0 +1 @@
1
+ export { default } from './form.js';
@@ -0,0 +1,2 @@
1
+ import type { ComponentInfo } from '../../../types/components.js';
2
+ export declare const componentInfo: ComponentInfo;
@@ -0,0 +1 @@
1
+ export { default } from './input.js';
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ /**
3
+ * This import is used by the Svelte SDK. Do not remove.
4
+ */
5
+ export interface FormInputProps {
6
+ type?: string;
7
+ attributes?: any;
8
+ name?: string;
9
+ value?: string;
10
+ placeholder?: string;
11
+ defaultValue?: string;
12
+ required?: boolean;
13
+ }
14
+ declare function FormInputComponent(props: FormInputProps): React.JSX.Element;
15
+ export default FormInputComponent;
@@ -0,0 +1,2 @@
1
+ import type { ComponentInfo } from '../../../types/components.js';
2
+ export declare const componentInfo: ComponentInfo;
@@ -0,0 +1 @@
1
+ export { default } from './select.js';
@@ -0,0 +1,16 @@
1
+ import * as React from "react";
2
+ /**
3
+ * This import is used by the Svelte SDK. Do not remove.
4
+ */
5
+ export interface FormSelectProps {
6
+ options?: {
7
+ name?: string;
8
+ value: string;
9
+ }[];
10
+ attributes?: any;
11
+ name?: string;
12
+ value?: string;
13
+ defaultValue?: string;
14
+ }
15
+ declare function SelectComponent(props: FormSelectProps): React.JSX.Element;
16
+ export default SelectComponent;
@@ -0,0 +1,2 @@
1
+ import type { ComponentInfo } from '../../../types/components.js';
2
+ export declare const componentInfo: ComponentInfo;
@@ -0,0 +1 @@
1
+ export { default } from './submit-button.js';
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ /**
3
+ * This import is used by the Svelte SDK. Do not remove.
4
+ */
5
+ export interface ButtonProps {
6
+ attributes?: any;
7
+ text?: string;
8
+ }
9
+ declare function SubmitButton(props: ButtonProps): React.JSX.Element;
10
+ export default SubmitButton;
@@ -0,0 +1,2 @@
1
+ import type { ComponentInfo } from '../../types/components.js';
2
+ export declare const componentInfo: ComponentInfo;
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import type { FragmentProps } from "./fragment.types.js";
3
+ declare function FragmentComponent(props: FragmentProps): React.JSX.Element;
4
+ export default FragmentComponent;
@@ -0,0 +1,5 @@
1
+ export interface FragmentProps {
2
+ maxWidth?: number;
3
+ attributes?: any;
4
+ children?: any;
5
+ }
@@ -0,0 +1 @@
1
+ export { default } from './fragment.js';
@@ -0,0 +1,13 @@
1
+ export declare function filterAttrs(attrs: {
2
+ [index: string]: any;
3
+ }, prefix: string, isEvent: boolean): {
4
+ [index: string]: any;
5
+ };
6
+ /**
7
+ * Svelte SDK: workaround to dynamically provide event handlers to components/elements.
8
+ * https://svelte.dev/repl/1246699e266f41218a8eeb45b9b58b54?version=3.24.1
9
+ */
10
+ export declare function setAttrs(node: HTMLElement, attrs?: Record<string, (event: Event) => void>): {
11
+ update(attrs?: {}): void;
12
+ destroy(): void;
13
+ };
@@ -0,0 +1,2 @@
1
+ import type { ComponentInfo } from '../../types/components.js';
2
+ export declare const componentInfo: ComponentInfo;
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import type { ImageProps } from "./image.types.js";
3
+ declare function Image(props: ImageProps): React.JSX.Element;
4
+ export default Image;
@@ -0,0 +1 @@
1
+ export declare function getSrcSet(url: string): string;
@@ -0,0 +1,19 @@
1
+ import type { BuilderBlock } from '../../types/builder-block.js';
2
+ export interface ImageProps {
3
+ className?: string;
4
+ image: string;
5
+ sizes?: string;
6
+ lazy?: boolean;
7
+ height?: number;
8
+ width?: number;
9
+ altText?: string;
10
+ backgroundSize?: 'cover' | 'contain';
11
+ backgroundPosition?: string;
12
+ srcset?: string;
13
+ aspectRatio?: number;
14
+ children?: any;
15
+ fitContent?: boolean;
16
+ builderBlock?: BuilderBlock;
17
+ noWebp?: boolean;
18
+ src?: string;
19
+ }
@@ -0,0 +1 @@
1
+ export { default } from './image.js';
@@ -0,0 +1,2 @@
1
+ import type { ComponentInfo } from '../../types/components.js';
2
+ export declare const componentInfo: ComponentInfo;
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ /**
3
+ * This import is used by the Svelte SDK. Do not remove.
4
+ */
5
+ export interface ImgProps {
6
+ attributes?: any;
7
+ imgSrc?: string;
8
+ image?: string;
9
+ altText?: string;
10
+ backgroundSize?: "cover" | "contain";
11
+ backgroundPosition?: "center" | "top" | "left" | "right" | "bottom" | "top left" | "top right" | "bottom left" | "bottom right";
12
+ }
13
+ declare function ImgComponent(props: ImgProps): React.JSX.Element;
14
+ export default ImgComponent;
@@ -0,0 +1 @@
1
+ export { default } from './img.js';
@@ -0,0 +1,2 @@
1
+ import type { ComponentInfo } from '../../types/components.js';
2
+ export declare const componentInfo: ComponentInfo;
@@ -0,0 +1 @@
1
+ export { default } from './raw-text.js';
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ export interface RawTextProps {
3
+ attributes?: any;
4
+ text?: string;
5
+ }
6
+ declare function RawText(props: RawTextProps): React.JSX.Element;
7
+ export default RawText;
@@ -0,0 +1,2 @@
1
+ import type { ComponentInfo } from '../../types/components.js';
2
+ export declare const componentInfo: ComponentInfo;
@@ -0,0 +1 @@
1
+ export { default } from './section.js';
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import type { SectionProps } from "./section.types.js";
3
+ declare function SectionComponent(props: SectionProps): React.JSX.Element;
4
+ export default SectionComponent;