@builder.io/sdk-svelte 1.0.19 → 1.0.21

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 (694) hide show
  1. package/lib/browser/blocks/BaseText.svelte +11 -11
  2. package/lib/browser/blocks/button/button.svelte +2 -2
  3. package/lib/browser/blocks/button/button.svelte.d.ts +1 -1
  4. package/lib/browser/blocks/button/button.types.d.ts +1 -1
  5. package/lib/browser/blocks/button/component-info.d.ts +1 -1
  6. package/lib/browser/blocks/columns/columns.svelte +15 -15
  7. package/lib/browser/blocks/columns/columns.svelte.d.ts +1 -1
  8. package/lib/browser/blocks/columns/columns.types.d.ts +2 -2
  9. package/lib/browser/blocks/columns/component-info.d.ts +1 -1
  10. package/lib/browser/blocks/custom-code/component-info.d.ts +1 -1
  11. package/lib/browser/blocks/embed/component-info.d.ts +1 -1
  12. package/lib/browser/blocks/embed/embed.svelte +1 -1
  13. package/lib/browser/blocks/form/form/component-info.d.ts +1 -1
  14. package/lib/browser/blocks/form/form/form.svelte +6 -7
  15. package/lib/browser/blocks/form/input/component-info.d.ts +1 -1
  16. package/lib/browser/blocks/form/input/input.svelte +3 -3
  17. package/lib/browser/blocks/form/select/component-info.d.ts +1 -1
  18. package/lib/browser/blocks/form/select/select.svelte +4 -4
  19. package/lib/browser/blocks/form/submit-button/component-info.d.ts +1 -1
  20. package/lib/browser/blocks/form/submit-button/submit-button.svelte +2 -2
  21. package/lib/browser/blocks/fragment/component-info.d.ts +1 -1
  22. package/lib/browser/blocks/fragment/fragment.svelte.d.ts +1 -1
  23. package/lib/browser/blocks/image/component-info.d.ts +1 -1
  24. package/lib/browser/blocks/image/image.svelte +14 -14
  25. package/lib/browser/blocks/image/image.svelte.d.ts +1 -1
  26. package/lib/browser/blocks/image/image.types.d.ts +1 -1
  27. package/lib/browser/blocks/img/component-info.d.ts +1 -1
  28. package/lib/browser/blocks/img/img.svelte +14 -14
  29. package/lib/browser/blocks/raw-text/component-info.d.ts +1 -1
  30. package/lib/browser/blocks/section/component-info.d.ts +1 -1
  31. package/lib/browser/blocks/section/section.svelte +13 -13
  32. package/lib/browser/blocks/section/section.svelte.d.ts +1 -1
  33. package/lib/browser/blocks/slot/component-info.d.ts +1 -1
  34. package/lib/browser/blocks/slot/slot.svelte +12 -13
  35. package/lib/browser/blocks/slot/slot.svelte.d.ts +1 -2
  36. package/lib/browser/blocks/symbol/component-info.d.ts +1 -1
  37. package/lib/browser/blocks/symbol/symbol.helpers.d.ts +2 -2
  38. package/lib/browser/blocks/symbol/symbol.helpers.js +2 -2
  39. package/lib/browser/blocks/symbol/symbol.svelte +6 -6
  40. package/lib/browser/blocks/symbol/symbol.svelte.d.ts +2 -2
  41. package/lib/browser/blocks/symbol/symbol.types.d.ts +2 -2
  42. package/lib/browser/blocks/text/component-info.d.ts +1 -1
  43. package/lib/browser/blocks/text/text.svelte +11 -11
  44. package/lib/browser/blocks/text/text.svelte.d.ts +1 -1
  45. package/lib/browser/blocks/textarea/component-info.d.ts +1 -1
  46. package/lib/browser/blocks/textarea/textarea.svelte +2 -2
  47. package/lib/browser/blocks/video/component-info.d.ts +1 -1
  48. package/lib/browser/blocks/video/video.svelte +19 -19
  49. package/lib/browser/blocks/video/video.svelte.d.ts +1 -1
  50. package/lib/browser/blocks/video/video.types.d.ts +1 -1
  51. package/lib/browser/components/block/animator.d.ts +1 -1
  52. package/lib/browser/components/block/block.helpers.d.ts +4 -4
  53. package/lib/browser/components/block/block.helpers.js +4 -4
  54. package/lib/browser/components/block/block.svelte +4 -4
  55. package/lib/browser/components/block/components/block-styles.svelte +5 -5
  56. package/lib/browser/components/block/components/block-wrapper.svelte +2 -2
  57. package/lib/browser/components/block/components/block-wrapper.svelte.d.ts +2 -2
  58. package/lib/browser/components/block/components/component-ref/component-ref.helpers.d.ts +3 -3
  59. package/lib/browser/components/block/components/component-ref/component-ref.helpers.js +1 -1
  60. package/lib/browser/components/block/components/component-ref/component-ref.svelte +2 -2
  61. package/lib/browser/components/block/components/component-ref/component-ref.svelte.d.ts +1 -1
  62. package/lib/browser/components/block/components/interactive-element.svelte +3 -3
  63. package/lib/browser/components/block/components/repeated-block.svelte +1 -1
  64. package/lib/browser/components/block/components/repeated-block.svelte.d.ts +1 -1
  65. package/lib/browser/components/block/types.d.ts +2 -2
  66. package/lib/browser/components/blocks/blocks-wrapper.svelte +12 -12
  67. package/lib/browser/components/blocks/blocks.svelte +2 -2
  68. package/lib/browser/components/blocks/blocks.svelte.d.ts +1 -1
  69. package/lib/browser/components/blocks/blocks.types.d.ts +1 -1
  70. package/lib/browser/components/content/components/enable-editor.svelte +22 -22
  71. package/lib/browser/components/content/components/enable-editor.svelte.d.ts +7 -7
  72. package/lib/browser/components/content/components/styles.svelte +1 -1
  73. package/lib/browser/components/content/components/styles.svelte.d.ts +1 -1
  74. package/lib/browser/components/content/content.helpers.d.ts +3 -3
  75. package/lib/browser/components/content/content.svelte +7 -7
  76. package/lib/browser/components/content/content.svelte.d.ts +1 -1
  77. package/lib/browser/components/content/content.types.d.ts +2 -2
  78. package/lib/browser/components/content/contentProps.types.d.ts +2 -2
  79. package/lib/browser/components/content-variants/content-variants.svelte +4 -4
  80. package/lib/browser/components/content-variants/content-variants.svelte.d.ts +1 -1
  81. package/lib/browser/components/content-variants/content-variants.types.d.ts +4 -4
  82. package/lib/browser/components/content-variants/helpers.d.ts +5 -5
  83. package/lib/browser/components/content-variants/helpers.js +3 -3
  84. package/lib/browser/components/dynamic-renderer/dynamic-renderer.svelte +3 -3
  85. package/lib/browser/constants/builder-registered-components.d.ts +1 -1
  86. package/lib/browser/constants/builder-registered-components.js +17 -17
  87. package/lib/browser/constants/device-sizes.js +1 -1
  88. package/lib/browser/constants/extra-components.d.ts +1 -1
  89. package/lib/browser/constants/extra-components.js +17 -17
  90. package/lib/browser/constants/sdk-version.d.ts +1 -1
  91. package/lib/browser/constants/sdk-version.js +1 -1
  92. package/lib/browser/constants/target.d.ts +1 -1
  93. package/lib/browser/context/index.d.ts +1 -1
  94. package/lib/browser/context/index.js +1 -1
  95. package/lib/browser/context/types.d.ts +4 -4
  96. package/lib/browser/functions/evaluate/browser-runtime/browser.d.ts +2 -2
  97. package/lib/browser/functions/evaluate/browser-runtime/browser.js +1 -1
  98. package/lib/browser/functions/evaluate/browser-runtime/index.d.ts +1 -1
  99. package/lib/browser/functions/evaluate/browser-runtime/index.js +1 -1
  100. package/lib/browser/functions/evaluate/choose-eval.d.ts +1 -1
  101. package/lib/browser/functions/evaluate/choose-eval.js +3 -3
  102. package/lib/browser/functions/evaluate/edge-runtime/edge-runtime.d.ts +1 -1
  103. package/lib/browser/functions/evaluate/edge-runtime/edge-runtime.js +4 -4
  104. package/lib/browser/functions/evaluate/edge-runtime/index.d.ts +1 -1
  105. package/lib/browser/functions/evaluate/edge-runtime/index.js +1 -1
  106. package/lib/browser/functions/evaluate/evaluate.d.ts +1 -1
  107. package/lib/browser/functions/evaluate/evaluate.js +3 -3
  108. package/lib/browser/functions/evaluate/helpers.d.ts +3 -3
  109. package/lib/browser/functions/evaluate/helpers.js +3 -3
  110. package/lib/browser/functions/evaluate/index.d.ts +1 -1
  111. package/lib/browser/functions/evaluate/index.js +1 -1
  112. package/lib/browser/functions/evaluate/node-runtime/index.d.ts +1 -1
  113. package/lib/browser/functions/evaluate/node-runtime/index.js +1 -1
  114. package/lib/browser/functions/evaluate/node-runtime/init.d.ts +10 -0
  115. package/lib/browser/functions/evaluate/node-runtime/init.js +26 -0
  116. package/lib/browser/functions/evaluate/node-runtime/node-runtime.d.ts +7 -1
  117. package/lib/browser/functions/evaluate/node-runtime/node-runtime.js +36 -10
  118. package/lib/browser/functions/evaluate/placeholder-runtime.d.ts +1 -1
  119. package/lib/browser/functions/evaluate/should-force-browser-runtime-in-node.js +2 -2
  120. package/lib/browser/functions/fetch-builder-props.d.ts +3 -3
  121. package/lib/browser/functions/fetch-builder-props.js +2 -2
  122. package/lib/browser/functions/get-block-actions-handler.d.ts +2 -2
  123. package/lib/browser/functions/get-block-actions-handler.js +1 -1
  124. package/lib/browser/functions/get-block-actions.d.ts +2 -2
  125. package/lib/browser/functions/get-block-actions.js +3 -3
  126. package/lib/browser/functions/get-block-component-options.d.ts +1 -1
  127. package/lib/browser/functions/get-block-properties.d.ts +2 -2
  128. package/lib/browser/functions/get-block-properties.js +3 -3
  129. package/lib/browser/functions/get-builder-search-params/index.d.ts +1 -1
  130. package/lib/browser/functions/get-builder-search-params/index.js +2 -2
  131. package/lib/browser/functions/get-class-prop-name.js +1 -1
  132. package/lib/browser/functions/get-content/generate-content-url.d.ts +1 -1
  133. package/lib/browser/functions/get-content/generate-content-url.js +4 -4
  134. package/lib/browser/functions/get-content/index.d.ts +2 -2
  135. package/lib/browser/functions/get-content/index.js +8 -8
  136. package/lib/browser/functions/get-content/types.d.ts +3 -3
  137. package/lib/browser/functions/get-fetch.js +1 -1
  138. package/lib/browser/functions/get-processed-block.d.ts +2 -2
  139. package/lib/browser/functions/get-processed-block.js +4 -4
  140. package/lib/browser/functions/get-style.d.ts +2 -2
  141. package/lib/browser/functions/get-style.js +3 -3
  142. package/lib/browser/functions/is-edge-runtime.js +2 -2
  143. package/lib/browser/functions/is-editing.d.ts +1 -1
  144. package/lib/browser/functions/is-editing.js +3 -3
  145. package/lib/browser/functions/is-iframe.js +1 -1
  146. package/lib/browser/functions/is-node-runtime.js +1 -1
  147. package/lib/browser/functions/is-previewing.d.ts +1 -1
  148. package/lib/browser/functions/is-previewing.js +3 -3
  149. package/lib/browser/functions/register-component.d.ts +1 -1
  150. package/lib/browser/functions/register-component.js +1 -1
  151. package/lib/browser/functions/register.d.ts +2 -2
  152. package/lib/browser/functions/register.js +1 -1
  153. package/lib/browser/functions/set-editor-settings.js +1 -1
  154. package/lib/browser/functions/track/helpers.js +2 -2
  155. package/lib/browser/functions/track/index.d.ts +2 -2
  156. package/lib/browser/functions/track/index.js +7 -7
  157. package/lib/browser/functions/transform-block-properties.d.ts +2 -2
  158. package/lib/browser/functions/transform-block.d.ts +1 -1
  159. package/lib/browser/functions/transform-style-property.d.ts +2 -2
  160. package/lib/browser/helpers/ab-tests.d.ts +3 -3
  161. package/lib/browser/helpers/ab-tests.js +4 -4
  162. package/lib/browser/helpers/canTrack.js +1 -1
  163. package/lib/browser/helpers/cookie.d.ts +1 -1
  164. package/lib/browser/helpers/cookie.js +4 -4
  165. package/lib/browser/helpers/css.js +2 -2
  166. package/lib/browser/helpers/localStorage.d.ts +2 -2
  167. package/lib/browser/helpers/localStorage.js +1 -1
  168. package/lib/browser/helpers/logger.d.ts +1 -0
  169. package/lib/browser/helpers/logger.js +1 -1
  170. package/lib/browser/helpers/preview-lru-cache/get.d.ts +1 -1
  171. package/lib/browser/helpers/preview-lru-cache/set.d.ts +1 -1
  172. package/lib/browser/helpers/sessionId.d.ts +1 -1
  173. package/lib/browser/helpers/sessionId.js +3 -3
  174. package/lib/browser/helpers/subscribe-to-editor.d.ts +3 -3
  175. package/lib/browser/helpers/subscribe-to-editor.js +4 -4
  176. package/lib/browser/helpers/visitorId.d.ts +1 -1
  177. package/lib/browser/helpers/visitorId.js +3 -3
  178. package/lib/browser/index-helpers/blocks-exports.d.ts +11 -11
  179. package/lib/browser/index-helpers/blocks-exports.js +11 -11
  180. package/lib/browser/index.d.ts +3 -3
  181. package/lib/browser/index.js +3 -3
  182. package/lib/browser/scripts/init-editing.js +5 -5
  183. package/lib/browser/server-index.d.ts +27 -27
  184. package/lib/browser/server-index.js +11 -11
  185. package/lib/browser/types/builder-content.d.ts +3 -3
  186. package/lib/browser/types/builder-props.d.ts +2 -2
  187. package/lib/browser/types/components.d.ts +2 -2
  188. package/lib/browser/types/enforced-partials.d.ts +1 -1
  189. package/lib/edge/blocks/BaseText.svelte +11 -11
  190. package/lib/edge/blocks/button/button.svelte +2 -2
  191. package/lib/edge/blocks/button/button.svelte.d.ts +1 -1
  192. package/lib/edge/blocks/button/button.types.d.ts +1 -1
  193. package/lib/edge/blocks/button/component-info.d.ts +1 -1
  194. package/lib/edge/blocks/columns/columns.svelte +15 -15
  195. package/lib/edge/blocks/columns/columns.svelte.d.ts +1 -1
  196. package/lib/edge/blocks/columns/columns.types.d.ts +2 -2
  197. package/lib/edge/blocks/columns/component-info.d.ts +1 -1
  198. package/lib/edge/blocks/custom-code/component-info.d.ts +1 -1
  199. package/lib/edge/blocks/embed/component-info.d.ts +1 -1
  200. package/lib/edge/blocks/embed/embed.svelte +1 -1
  201. package/lib/edge/blocks/form/form/component-info.d.ts +1 -1
  202. package/lib/edge/blocks/form/form/form.svelte +6 -7
  203. package/lib/edge/blocks/form/input/component-info.d.ts +1 -1
  204. package/lib/edge/blocks/form/input/input.svelte +3 -3
  205. package/lib/edge/blocks/form/select/component-info.d.ts +1 -1
  206. package/lib/edge/blocks/form/select/select.svelte +4 -4
  207. package/lib/edge/blocks/form/submit-button/component-info.d.ts +1 -1
  208. package/lib/edge/blocks/form/submit-button/submit-button.svelte +2 -2
  209. package/lib/edge/blocks/fragment/component-info.d.ts +1 -1
  210. package/lib/edge/blocks/fragment/fragment.svelte.d.ts +1 -1
  211. package/lib/edge/blocks/image/component-info.d.ts +1 -1
  212. package/lib/edge/blocks/image/image.svelte +14 -14
  213. package/lib/edge/blocks/image/image.svelte.d.ts +1 -1
  214. package/lib/edge/blocks/image/image.types.d.ts +1 -1
  215. package/lib/edge/blocks/img/component-info.d.ts +1 -1
  216. package/lib/edge/blocks/img/img.svelte +14 -14
  217. package/lib/edge/blocks/raw-text/component-info.d.ts +1 -1
  218. package/lib/edge/blocks/section/component-info.d.ts +1 -1
  219. package/lib/edge/blocks/section/section.svelte +13 -13
  220. package/lib/edge/blocks/section/section.svelte.d.ts +1 -1
  221. package/lib/edge/blocks/slot/component-info.d.ts +1 -1
  222. package/lib/edge/blocks/slot/slot.svelte +12 -13
  223. package/lib/edge/blocks/slot/slot.svelte.d.ts +1 -2
  224. package/lib/edge/blocks/symbol/component-info.d.ts +1 -1
  225. package/lib/edge/blocks/symbol/symbol.helpers.d.ts +2 -2
  226. package/lib/edge/blocks/symbol/symbol.helpers.js +2 -2
  227. package/lib/edge/blocks/symbol/symbol.svelte +6 -6
  228. package/lib/edge/blocks/symbol/symbol.svelte.d.ts +2 -2
  229. package/lib/edge/blocks/symbol/symbol.types.d.ts +2 -2
  230. package/lib/edge/blocks/text/component-info.d.ts +1 -1
  231. package/lib/edge/blocks/text/text.svelte +11 -11
  232. package/lib/edge/blocks/text/text.svelte.d.ts +1 -1
  233. package/lib/edge/blocks/textarea/component-info.d.ts +1 -1
  234. package/lib/edge/blocks/textarea/textarea.svelte +2 -2
  235. package/lib/edge/blocks/video/component-info.d.ts +1 -1
  236. package/lib/edge/blocks/video/video.svelte +19 -19
  237. package/lib/edge/blocks/video/video.svelte.d.ts +1 -1
  238. package/lib/edge/blocks/video/video.types.d.ts +1 -1
  239. package/lib/edge/components/block/animator.d.ts +1 -1
  240. package/lib/edge/components/block/block.helpers.d.ts +4 -4
  241. package/lib/edge/components/block/block.helpers.js +4 -4
  242. package/lib/edge/components/block/block.svelte +4 -4
  243. package/lib/edge/components/block/components/block-styles.svelte +5 -5
  244. package/lib/edge/components/block/components/block-wrapper.svelte +2 -2
  245. package/lib/edge/components/block/components/block-wrapper.svelte.d.ts +2 -2
  246. package/lib/edge/components/block/components/component-ref/component-ref.helpers.d.ts +3 -3
  247. package/lib/edge/components/block/components/component-ref/component-ref.helpers.js +1 -1
  248. package/lib/edge/components/block/components/component-ref/component-ref.svelte +2 -2
  249. package/lib/edge/components/block/components/component-ref/component-ref.svelte.d.ts +1 -1
  250. package/lib/edge/components/block/components/interactive-element.svelte +3 -3
  251. package/lib/edge/components/block/components/repeated-block.svelte +1 -1
  252. package/lib/edge/components/block/components/repeated-block.svelte.d.ts +1 -1
  253. package/lib/edge/components/block/types.d.ts +2 -2
  254. package/lib/edge/components/blocks/blocks-wrapper.svelte +12 -12
  255. package/lib/edge/components/blocks/blocks.svelte +2 -2
  256. package/lib/edge/components/blocks/blocks.svelte.d.ts +1 -1
  257. package/lib/edge/components/blocks/blocks.types.d.ts +1 -1
  258. package/lib/edge/components/content/components/enable-editor.svelte +22 -22
  259. package/lib/edge/components/content/components/enable-editor.svelte.d.ts +7 -7
  260. package/lib/edge/components/content/components/styles.svelte +1 -1
  261. package/lib/edge/components/content/components/styles.svelte.d.ts +1 -1
  262. package/lib/edge/components/content/content.helpers.d.ts +3 -3
  263. package/lib/edge/components/content/content.svelte +7 -7
  264. package/lib/edge/components/content/content.svelte.d.ts +1 -1
  265. package/lib/edge/components/content/content.types.d.ts +2 -2
  266. package/lib/edge/components/content/contentProps.types.d.ts +2 -2
  267. package/lib/edge/components/content-variants/content-variants.svelte +4 -4
  268. package/lib/edge/components/content-variants/content-variants.svelte.d.ts +1 -1
  269. package/lib/edge/components/content-variants/content-variants.types.d.ts +4 -4
  270. package/lib/edge/components/content-variants/helpers.d.ts +5 -5
  271. package/lib/edge/components/content-variants/helpers.js +3 -3
  272. package/lib/edge/components/dynamic-renderer/dynamic-renderer.svelte +3 -3
  273. package/lib/edge/constants/builder-registered-components.d.ts +1 -1
  274. package/lib/edge/constants/builder-registered-components.js +17 -17
  275. package/lib/edge/constants/device-sizes.js +1 -1
  276. package/lib/edge/constants/extra-components.d.ts +1 -1
  277. package/lib/edge/constants/extra-components.js +17 -17
  278. package/lib/edge/constants/sdk-version.d.ts +1 -1
  279. package/lib/edge/constants/sdk-version.js +1 -1
  280. package/lib/edge/constants/target.d.ts +1 -1
  281. package/lib/edge/context/index.d.ts +1 -1
  282. package/lib/edge/context/index.js +1 -1
  283. package/lib/edge/context/types.d.ts +4 -4
  284. package/lib/edge/functions/evaluate/browser-runtime/browser.d.ts +2 -2
  285. package/lib/edge/functions/evaluate/browser-runtime/browser.js +1 -1
  286. package/lib/edge/functions/evaluate/browser-runtime/index.d.ts +1 -1
  287. package/lib/edge/functions/evaluate/browser-runtime/index.js +1 -1
  288. package/lib/edge/functions/evaluate/choose-eval.d.ts +1 -1
  289. package/lib/edge/functions/evaluate/choose-eval.js +3 -3
  290. package/lib/edge/functions/evaluate/edge-runtime/edge-runtime.d.ts +1 -1
  291. package/lib/edge/functions/evaluate/edge-runtime/edge-runtime.js +4 -4
  292. package/lib/edge/functions/evaluate/edge-runtime/index.d.ts +1 -1
  293. package/lib/edge/functions/evaluate/edge-runtime/index.js +1 -1
  294. package/lib/edge/functions/evaluate/evaluate.d.ts +1 -1
  295. package/lib/edge/functions/evaluate/evaluate.js +3 -3
  296. package/lib/edge/functions/evaluate/helpers.d.ts +3 -3
  297. package/lib/edge/functions/evaluate/helpers.js +3 -3
  298. package/lib/edge/functions/evaluate/index.d.ts +1 -1
  299. package/lib/edge/functions/evaluate/index.js +1 -1
  300. package/lib/edge/functions/evaluate/node-runtime/index.d.ts +1 -1
  301. package/lib/edge/functions/evaluate/node-runtime/index.js +1 -1
  302. package/lib/edge/functions/evaluate/node-runtime/init.d.ts +10 -0
  303. package/lib/edge/functions/evaluate/node-runtime/init.js +26 -0
  304. package/lib/edge/functions/evaluate/node-runtime/node-runtime.d.ts +7 -1
  305. package/lib/edge/functions/evaluate/node-runtime/node-runtime.js +36 -10
  306. package/lib/edge/functions/evaluate/placeholder-runtime.d.ts +1 -1
  307. package/lib/edge/functions/evaluate/should-force-browser-runtime-in-node.js +2 -2
  308. package/lib/edge/functions/fetch-builder-props.d.ts +3 -3
  309. package/lib/edge/functions/fetch-builder-props.js +2 -2
  310. package/lib/edge/functions/get-block-actions-handler.d.ts +2 -2
  311. package/lib/edge/functions/get-block-actions-handler.js +1 -1
  312. package/lib/edge/functions/get-block-actions.d.ts +2 -2
  313. package/lib/edge/functions/get-block-actions.js +3 -3
  314. package/lib/edge/functions/get-block-component-options.d.ts +1 -1
  315. package/lib/edge/functions/get-block-properties.d.ts +2 -2
  316. package/lib/edge/functions/get-block-properties.js +3 -3
  317. package/lib/edge/functions/get-builder-search-params/index.d.ts +1 -1
  318. package/lib/edge/functions/get-builder-search-params/index.js +2 -2
  319. package/lib/edge/functions/get-class-prop-name.js +1 -1
  320. package/lib/edge/functions/get-content/generate-content-url.d.ts +1 -1
  321. package/lib/edge/functions/get-content/generate-content-url.js +4 -4
  322. package/lib/edge/functions/get-content/index.d.ts +2 -2
  323. package/lib/edge/functions/get-content/index.js +8 -8
  324. package/lib/edge/functions/get-content/types.d.ts +3 -3
  325. package/lib/edge/functions/get-fetch.js +1 -1
  326. package/lib/edge/functions/get-processed-block.d.ts +2 -2
  327. package/lib/edge/functions/get-processed-block.js +4 -4
  328. package/lib/edge/functions/get-style.d.ts +2 -2
  329. package/lib/edge/functions/get-style.js +3 -3
  330. package/lib/edge/functions/is-edge-runtime.js +2 -2
  331. package/lib/edge/functions/is-editing.d.ts +1 -1
  332. package/lib/edge/functions/is-editing.js +3 -3
  333. package/lib/edge/functions/is-iframe.js +1 -1
  334. package/lib/edge/functions/is-node-runtime.js +1 -1
  335. package/lib/edge/functions/is-previewing.d.ts +1 -1
  336. package/lib/edge/functions/is-previewing.js +3 -3
  337. package/lib/edge/functions/register-component.d.ts +1 -1
  338. package/lib/edge/functions/register-component.js +1 -1
  339. package/lib/edge/functions/register.d.ts +2 -2
  340. package/lib/edge/functions/register.js +1 -1
  341. package/lib/edge/functions/set-editor-settings.js +1 -1
  342. package/lib/edge/functions/track/helpers.js +2 -2
  343. package/lib/edge/functions/track/index.d.ts +2 -2
  344. package/lib/edge/functions/track/index.js +7 -7
  345. package/lib/edge/functions/transform-block-properties.d.ts +2 -2
  346. package/lib/edge/functions/transform-block.d.ts +1 -1
  347. package/lib/edge/functions/transform-style-property.d.ts +2 -2
  348. package/lib/edge/helpers/ab-tests.d.ts +3 -3
  349. package/lib/edge/helpers/ab-tests.js +4 -4
  350. package/lib/edge/helpers/canTrack.js +1 -1
  351. package/lib/edge/helpers/cookie.d.ts +1 -1
  352. package/lib/edge/helpers/cookie.js +4 -4
  353. package/lib/edge/helpers/css.js +2 -2
  354. package/lib/edge/helpers/localStorage.d.ts +2 -2
  355. package/lib/edge/helpers/localStorage.js +1 -1
  356. package/lib/edge/helpers/logger.d.ts +1 -0
  357. package/lib/edge/helpers/logger.js +1 -1
  358. package/lib/edge/helpers/preview-lru-cache/get.d.ts +1 -1
  359. package/lib/edge/helpers/preview-lru-cache/set.d.ts +1 -1
  360. package/lib/edge/helpers/sessionId.d.ts +1 -1
  361. package/lib/edge/helpers/sessionId.js +3 -3
  362. package/lib/edge/helpers/subscribe-to-editor.d.ts +3 -3
  363. package/lib/edge/helpers/subscribe-to-editor.js +4 -4
  364. package/lib/edge/helpers/visitorId.d.ts +1 -1
  365. package/lib/edge/helpers/visitorId.js +3 -3
  366. package/lib/edge/index-helpers/blocks-exports.d.ts +11 -11
  367. package/lib/edge/index-helpers/blocks-exports.js +11 -11
  368. package/lib/edge/index.d.ts +3 -3
  369. package/lib/edge/index.js +3 -3
  370. package/lib/edge/scripts/init-editing.js +5 -5
  371. package/lib/edge/server-index.d.ts +27 -27
  372. package/lib/edge/server-index.js +11 -11
  373. package/lib/edge/types/builder-content.d.ts +3 -3
  374. package/lib/edge/types/builder-props.d.ts +2 -2
  375. package/lib/edge/types/components.d.ts +2 -2
  376. package/lib/edge/types/enforced-partials.d.ts +1 -1
  377. package/lib/node/blocks/BaseText.svelte +11 -11
  378. package/lib/node/blocks/button/button.svelte +2 -2
  379. package/lib/node/blocks/button/button.svelte.d.ts +1 -1
  380. package/lib/node/blocks/button/button.types.d.ts +1 -1
  381. package/lib/node/blocks/button/component-info.d.ts +1 -1
  382. package/lib/node/blocks/columns/columns.svelte +15 -15
  383. package/lib/node/blocks/columns/columns.svelte.d.ts +1 -1
  384. package/lib/node/blocks/columns/columns.types.d.ts +2 -2
  385. package/lib/node/blocks/columns/component-info.d.ts +1 -1
  386. package/lib/node/blocks/custom-code/component-info.d.ts +1 -1
  387. package/lib/node/blocks/embed/component-info.d.ts +1 -1
  388. package/lib/node/blocks/embed/embed.svelte +1 -1
  389. package/lib/node/blocks/form/form/component-info.d.ts +1 -1
  390. package/lib/node/blocks/form/form/form.svelte +6 -7
  391. package/lib/node/blocks/form/input/component-info.d.ts +1 -1
  392. package/lib/node/blocks/form/input/input.svelte +3 -3
  393. package/lib/node/blocks/form/select/component-info.d.ts +1 -1
  394. package/lib/node/blocks/form/select/select.svelte +4 -4
  395. package/lib/node/blocks/form/submit-button/component-info.d.ts +1 -1
  396. package/lib/node/blocks/form/submit-button/submit-button.svelte +2 -2
  397. package/lib/node/blocks/fragment/component-info.d.ts +1 -1
  398. package/lib/node/blocks/fragment/fragment.svelte.d.ts +1 -1
  399. package/lib/node/blocks/image/component-info.d.ts +1 -1
  400. package/lib/node/blocks/image/image.svelte +14 -14
  401. package/lib/node/blocks/image/image.svelte.d.ts +1 -1
  402. package/lib/node/blocks/image/image.types.d.ts +1 -1
  403. package/lib/node/blocks/img/component-info.d.ts +1 -1
  404. package/lib/node/blocks/img/img.svelte +14 -14
  405. package/lib/node/blocks/raw-text/component-info.d.ts +1 -1
  406. package/lib/node/blocks/section/component-info.d.ts +1 -1
  407. package/lib/node/blocks/section/section.svelte +13 -13
  408. package/lib/node/blocks/section/section.svelte.d.ts +1 -1
  409. package/lib/node/blocks/slot/component-info.d.ts +1 -1
  410. package/lib/node/blocks/slot/slot.svelte +12 -13
  411. package/lib/node/blocks/slot/slot.svelte.d.ts +1 -2
  412. package/lib/node/blocks/symbol/component-info.d.ts +1 -1
  413. package/lib/node/blocks/symbol/symbol.helpers.d.ts +2 -2
  414. package/lib/node/blocks/symbol/symbol.helpers.js +2 -2
  415. package/lib/node/blocks/symbol/symbol.svelte +6 -6
  416. package/lib/node/blocks/symbol/symbol.svelte.d.ts +2 -2
  417. package/lib/node/blocks/symbol/symbol.types.d.ts +2 -2
  418. package/lib/node/blocks/text/component-info.d.ts +1 -1
  419. package/lib/node/blocks/text/text.svelte +11 -11
  420. package/lib/node/blocks/text/text.svelte.d.ts +1 -1
  421. package/lib/node/blocks/textarea/component-info.d.ts +1 -1
  422. package/lib/node/blocks/textarea/textarea.svelte +2 -2
  423. package/lib/node/blocks/video/component-info.d.ts +1 -1
  424. package/lib/node/blocks/video/video.svelte +19 -19
  425. package/lib/node/blocks/video/video.svelte.d.ts +1 -1
  426. package/lib/node/blocks/video/video.types.d.ts +1 -1
  427. package/lib/node/components/block/animator.d.ts +1 -1
  428. package/lib/node/components/block/block.helpers.d.ts +4 -4
  429. package/lib/node/components/block/block.helpers.js +4 -4
  430. package/lib/node/components/block/block.svelte +4 -4
  431. package/lib/node/components/block/components/block-styles.svelte +5 -5
  432. package/lib/node/components/block/components/block-wrapper.svelte +2 -2
  433. package/lib/node/components/block/components/block-wrapper.svelte.d.ts +2 -2
  434. package/lib/node/components/block/components/component-ref/component-ref.helpers.d.ts +3 -3
  435. package/lib/node/components/block/components/component-ref/component-ref.helpers.js +1 -1
  436. package/lib/node/components/block/components/component-ref/component-ref.svelte +2 -2
  437. package/lib/node/components/block/components/component-ref/component-ref.svelte.d.ts +1 -1
  438. package/lib/node/components/block/components/interactive-element.svelte +3 -3
  439. package/lib/node/components/block/components/repeated-block.svelte +1 -1
  440. package/lib/node/components/block/components/repeated-block.svelte.d.ts +1 -1
  441. package/lib/node/components/block/types.d.ts +2 -2
  442. package/lib/node/components/blocks/blocks-wrapper.svelte +12 -12
  443. package/lib/node/components/blocks/blocks.svelte +2 -2
  444. package/lib/node/components/blocks/blocks.svelte.d.ts +1 -1
  445. package/lib/node/components/blocks/blocks.types.d.ts +1 -1
  446. package/lib/node/components/content/components/enable-editor.svelte +22 -22
  447. package/lib/node/components/content/components/enable-editor.svelte.d.ts +7 -7
  448. package/lib/node/components/content/components/styles.svelte +1 -1
  449. package/lib/node/components/content/components/styles.svelte.d.ts +1 -1
  450. package/lib/node/components/content/content.helpers.d.ts +3 -3
  451. package/lib/node/components/content/content.svelte +7 -7
  452. package/lib/node/components/content/content.svelte.d.ts +1 -1
  453. package/lib/node/components/content/content.types.d.ts +2 -2
  454. package/lib/node/components/content/contentProps.types.d.ts +2 -2
  455. package/lib/node/components/content-variants/content-variants.svelte +4 -4
  456. package/lib/node/components/content-variants/content-variants.svelte.d.ts +1 -1
  457. package/lib/node/components/content-variants/content-variants.types.d.ts +4 -4
  458. package/lib/node/components/content-variants/helpers.d.ts +5 -5
  459. package/lib/node/components/content-variants/helpers.js +3 -3
  460. package/lib/node/components/dynamic-renderer/dynamic-renderer.svelte +3 -3
  461. package/lib/node/constants/builder-registered-components.d.ts +1 -1
  462. package/lib/node/constants/builder-registered-components.js +17 -17
  463. package/lib/node/constants/device-sizes.js +1 -1
  464. package/lib/node/constants/extra-components.d.ts +1 -1
  465. package/lib/node/constants/extra-components.js +17 -17
  466. package/lib/node/constants/sdk-version.d.ts +1 -1
  467. package/lib/node/constants/sdk-version.js +1 -1
  468. package/lib/node/constants/target.d.ts +1 -1
  469. package/lib/node/context/index.d.ts +1 -1
  470. package/lib/node/context/index.js +1 -1
  471. package/lib/node/context/types.d.ts +4 -4
  472. package/lib/node/functions/evaluate/browser-runtime/browser.d.ts +2 -2
  473. package/lib/node/functions/evaluate/browser-runtime/browser.js +1 -1
  474. package/lib/node/functions/evaluate/browser-runtime/index.d.ts +1 -1
  475. package/lib/node/functions/evaluate/browser-runtime/index.js +1 -1
  476. package/lib/node/functions/evaluate/choose-eval.d.ts +1 -1
  477. package/lib/node/functions/evaluate/choose-eval.js +3 -3
  478. package/lib/node/functions/evaluate/edge-runtime/edge-runtime.d.ts +1 -1
  479. package/lib/node/functions/evaluate/edge-runtime/edge-runtime.js +4 -4
  480. package/lib/node/functions/evaluate/edge-runtime/index.d.ts +1 -1
  481. package/lib/node/functions/evaluate/edge-runtime/index.js +1 -1
  482. package/lib/node/functions/evaluate/evaluate.d.ts +1 -1
  483. package/lib/node/functions/evaluate/evaluate.js +3 -3
  484. package/lib/node/functions/evaluate/helpers.d.ts +3 -3
  485. package/lib/node/functions/evaluate/helpers.js +3 -3
  486. package/lib/node/functions/evaluate/index.d.ts +1 -1
  487. package/lib/node/functions/evaluate/index.js +1 -1
  488. package/lib/node/functions/evaluate/node-runtime/index.d.ts +1 -1
  489. package/lib/node/functions/evaluate/node-runtime/index.js +1 -1
  490. package/lib/node/functions/evaluate/node-runtime/init.d.ts +10 -0
  491. package/lib/node/functions/evaluate/node-runtime/init.js +26 -0
  492. package/lib/node/functions/evaluate/node-runtime/node-runtime.d.ts +7 -1
  493. package/lib/node/functions/evaluate/node-runtime/node-runtime.js +36 -10
  494. package/lib/node/functions/evaluate/placeholder-runtime.d.ts +1 -1
  495. package/lib/node/functions/evaluate/should-force-browser-runtime-in-node.js +2 -2
  496. package/lib/node/functions/fetch-builder-props.d.ts +3 -3
  497. package/lib/node/functions/fetch-builder-props.js +2 -2
  498. package/lib/node/functions/get-block-actions-handler.d.ts +2 -2
  499. package/lib/node/functions/get-block-actions-handler.js +1 -1
  500. package/lib/node/functions/get-block-actions.d.ts +2 -2
  501. package/lib/node/functions/get-block-actions.js +3 -3
  502. package/lib/node/functions/get-block-component-options.d.ts +1 -1
  503. package/lib/node/functions/get-block-properties.d.ts +2 -2
  504. package/lib/node/functions/get-block-properties.js +3 -3
  505. package/lib/node/functions/get-builder-search-params/index.d.ts +1 -1
  506. package/lib/node/functions/get-builder-search-params/index.js +2 -2
  507. package/lib/node/functions/get-class-prop-name.js +1 -1
  508. package/lib/node/functions/get-content/generate-content-url.d.ts +1 -1
  509. package/lib/node/functions/get-content/generate-content-url.js +4 -4
  510. package/lib/node/functions/get-content/index.d.ts +2 -2
  511. package/lib/node/functions/get-content/index.js +8 -8
  512. package/lib/node/functions/get-content/types.d.ts +3 -3
  513. package/lib/node/functions/get-fetch.js +1 -1
  514. package/lib/node/functions/get-processed-block.d.ts +2 -2
  515. package/lib/node/functions/get-processed-block.js +4 -4
  516. package/lib/node/functions/get-style.d.ts +2 -2
  517. package/lib/node/functions/get-style.js +3 -3
  518. package/lib/node/functions/is-edge-runtime.js +2 -2
  519. package/lib/node/functions/is-editing.d.ts +1 -1
  520. package/lib/node/functions/is-editing.js +3 -3
  521. package/lib/node/functions/is-iframe.js +1 -1
  522. package/lib/node/functions/is-node-runtime.js +1 -1
  523. package/lib/node/functions/is-previewing.d.ts +1 -1
  524. package/lib/node/functions/is-previewing.js +3 -3
  525. package/lib/node/functions/register-component.d.ts +1 -1
  526. package/lib/node/functions/register-component.js +1 -1
  527. package/lib/node/functions/register.d.ts +2 -2
  528. package/lib/node/functions/register.js +1 -1
  529. package/lib/node/functions/set-editor-settings.js +1 -1
  530. package/lib/node/functions/track/helpers.js +2 -2
  531. package/lib/node/functions/track/index.d.ts +2 -2
  532. package/lib/node/functions/track/index.js +7 -7
  533. package/lib/node/functions/transform-block-properties.d.ts +2 -2
  534. package/lib/node/functions/transform-block.d.ts +1 -1
  535. package/lib/node/functions/transform-style-property.d.ts +2 -2
  536. package/lib/node/helpers/ab-tests.d.ts +3 -3
  537. package/lib/node/helpers/ab-tests.js +4 -4
  538. package/lib/node/helpers/canTrack.js +1 -1
  539. package/lib/node/helpers/cookie.d.ts +1 -1
  540. package/lib/node/helpers/cookie.js +4 -4
  541. package/lib/node/helpers/css.js +2 -2
  542. package/lib/node/helpers/localStorage.d.ts +2 -2
  543. package/lib/node/helpers/localStorage.js +1 -1
  544. package/lib/node/helpers/logger.d.ts +1 -0
  545. package/lib/node/helpers/logger.js +1 -1
  546. package/lib/node/helpers/preview-lru-cache/get.d.ts +1 -1
  547. package/lib/node/helpers/preview-lru-cache/set.d.ts +1 -1
  548. package/lib/node/helpers/sessionId.d.ts +1 -1
  549. package/lib/node/helpers/sessionId.js +3 -3
  550. package/lib/node/helpers/subscribe-to-editor.d.ts +3 -3
  551. package/lib/node/helpers/subscribe-to-editor.js +4 -4
  552. package/lib/node/helpers/visitorId.d.ts +1 -1
  553. package/lib/node/helpers/visitorId.js +3 -3
  554. package/lib/node/index-helpers/blocks-exports.d.ts +11 -11
  555. package/lib/node/index-helpers/blocks-exports.js +11 -11
  556. package/lib/node/index.d.ts +3 -3
  557. package/lib/node/index.js +3 -3
  558. package/lib/node/scripts/init-editing.js +5 -5
  559. package/lib/node/server-index.d.ts +27 -27
  560. package/lib/node/server-index.js +11 -11
  561. package/lib/node/types/builder-content.d.ts +3 -3
  562. package/lib/node/types/builder-props.d.ts +2 -2
  563. package/lib/node/types/components.d.ts +2 -2
  564. package/lib/node/types/enforced-partials.d.ts +1 -1
  565. package/package.json +1 -1
  566. package/src/blocks/BaseText.svelte +11 -12
  567. package/src/blocks/button/button.svelte +3 -3
  568. package/src/blocks/button/button.types.ts +1 -1
  569. package/src/blocks/button/component-info.ts +1 -1
  570. package/src/blocks/columns/columns.svelte +18 -18
  571. package/src/blocks/columns/columns.types.ts +2 -2
  572. package/src/blocks/columns/component-info.ts +1 -1
  573. package/src/blocks/custom-code/component-info.ts +1 -1
  574. package/src/blocks/embed/component-info.ts +1 -1
  575. package/src/blocks/embed/embed.svelte +1 -1
  576. package/src/blocks/form/form/component-info.ts +1 -1
  577. package/src/blocks/form/form/form.svelte +9 -10
  578. package/src/blocks/form/input/component-info.ts +1 -1
  579. package/src/blocks/form/input/input.svelte +3 -3
  580. package/src/blocks/form/select/component-info.ts +1 -1
  581. package/src/blocks/form/select/select.svelte +4 -4
  582. package/src/blocks/form/submit-button/component-info.ts +1 -1
  583. package/src/blocks/form/submit-button/submit-button.svelte +2 -2
  584. package/src/blocks/fragment/component-info.ts +1 -1
  585. package/src/blocks/fragment/fragment.svelte +1 -1
  586. package/src/blocks/image/component-info.ts +1 -1
  587. package/src/blocks/image/image.svelte +15 -14
  588. package/src/blocks/image/image.types.ts +1 -1
  589. package/src/blocks/img/component-info.ts +1 -1
  590. package/src/blocks/img/img.svelte +14 -14
  591. package/src/blocks/raw-text/component-info.ts +1 -1
  592. package/src/blocks/section/component-info.ts +1 -1
  593. package/src/blocks/section/section.svelte +14 -13
  594. package/src/blocks/slot/component-info.ts +1 -1
  595. package/src/blocks/slot/slot.svelte +14 -15
  596. package/src/blocks/symbol/component-info.ts +1 -1
  597. package/src/blocks/symbol/symbol.helpers.ts +4 -4
  598. package/src/blocks/symbol/symbol.svelte +9 -9
  599. package/src/blocks/symbol/symbol.types.ts +2 -2
  600. package/src/blocks/text/component-info.ts +1 -1
  601. package/src/blocks/text/text.svelte +12 -12
  602. package/src/blocks/textarea/component-info.ts +1 -1
  603. package/src/blocks/textarea/textarea.svelte +2 -2
  604. package/src/blocks/video/component-info.ts +1 -1
  605. package/src/blocks/video/video.svelte +20 -19
  606. package/src/blocks/video/video.types.ts +1 -1
  607. package/src/components/block/animator.ts +1 -1
  608. package/src/components/block/block.helpers.ts +7 -7
  609. package/src/components/block/block.svelte +7 -7
  610. package/src/components/block/components/block-styles.svelte +7 -7
  611. package/src/components/block/components/block-wrapper.svelte +4 -4
  612. package/src/components/block/components/component-ref/component-ref.helpers.ts +4 -4
  613. package/src/components/block/components/component-ref/component-ref.svelte +3 -3
  614. package/src/components/block/components/interactive-element.svelte +6 -6
  615. package/src/components/block/components/repeated-block.svelte +2 -2
  616. package/src/components/block/types.ts +2 -2
  617. package/src/components/blocks/blocks-wrapper.svelte +13 -12
  618. package/src/components/blocks/blocks.svelte +3 -3
  619. package/src/components/blocks/blocks.types.ts +1 -1
  620. package/src/components/content/components/enable-editor.svelte +27 -28
  621. package/src/components/content/components/styles.svelte +2 -2
  622. package/src/components/content/content.helpers.ts +4 -4
  623. package/src/components/content/content.svelte +11 -11
  624. package/src/components/content/content.types.ts +2 -2
  625. package/src/components/content/contentProps.types.ts +2 -2
  626. package/src/components/content-variants/content-variants.svelte +5 -5
  627. package/src/components/content-variants/content-variants.types.ts +4 -4
  628. package/src/components/content-variants/helpers.ts +6 -6
  629. package/src/components/dynamic-renderer/dynamic-renderer.svelte +3 -3
  630. package/src/constants/builder-registered-components.ts +18 -18
  631. package/src/constants/device-sizes.ts +1 -1
  632. package/src/constants/extra-components.ts +18 -18
  633. package/src/constants/sdk-version.ts +1 -1
  634. package/src/constants/target.ts +1 -1
  635. package/src/context/index.ts +1 -1
  636. package/src/context/types.ts +4 -4
  637. package/src/functions/evaluate/browser-runtime/browser.ts +3 -3
  638. package/src/functions/evaluate/browser-runtime/index.ts +1 -1
  639. package/src/functions/evaluate/choose-eval.ts +4 -4
  640. package/src/functions/evaluate/edge-runtime/edge-runtime.ts +5 -5
  641. package/src/functions/evaluate/edge-runtime/index.ts +1 -1
  642. package/src/functions/evaluate/evaluate.ts +4 -4
  643. package/src/functions/evaluate/helpers.ts +4 -4
  644. package/src/functions/evaluate/index.ts +1 -1
  645. package/src/functions/evaluate/node-runtime/index.ts +1 -1
  646. package/src/functions/evaluate/node-runtime/init.ts +27 -0
  647. package/src/functions/evaluate/node-runtime/node-runtime.ts +35 -11
  648. package/src/functions/evaluate/placeholder-runtime.ts +1 -1
  649. package/src/functions/evaluate/should-force-browser-runtime-in-node.ts +2 -2
  650. package/src/functions/fetch-builder-props.ts +5 -5
  651. package/src/functions/get-block-actions-handler.ts +3 -3
  652. package/src/functions/get-block-actions.ts +5 -5
  653. package/src/functions/get-block-component-options.ts +1 -1
  654. package/src/functions/get-block-properties.ts +5 -5
  655. package/src/functions/get-builder-search-params/index.ts +3 -3
  656. package/src/functions/get-class-prop-name.ts +1 -1
  657. package/src/functions/get-content/generate-content-url.ts +5 -5
  658. package/src/functions/get-content/index.ts +10 -10
  659. package/src/functions/get-content/types.ts +3 -3
  660. package/src/functions/get-fetch.ts +1 -1
  661. package/src/functions/get-processed-block.ts +6 -6
  662. package/src/functions/get-style.ts +5 -5
  663. package/src/functions/is-edge-runtime.ts +2 -2
  664. package/src/functions/is-editing.ts +3 -3
  665. package/src/functions/is-iframe.ts +1 -1
  666. package/src/functions/is-node-runtime.ts +1 -1
  667. package/src/functions/is-previewing.ts +4 -4
  668. package/src/functions/register-component.ts +3 -3
  669. package/src/functions/register.ts +3 -3
  670. package/src/functions/set-editor-settings.ts +1 -1
  671. package/src/functions/track/helpers.ts +3 -3
  672. package/src/functions/track/index.ts +9 -9
  673. package/src/functions/transform-block-properties.ts +2 -2
  674. package/src/functions/transform-block.ts +1 -1
  675. package/src/functions/transform-style-property.ts +2 -2
  676. package/src/helpers/ab-tests.ts +7 -7
  677. package/src/helpers/canTrack.ts +1 -1
  678. package/src/helpers/cookie.ts +5 -5
  679. package/src/helpers/css.ts +2 -2
  680. package/src/helpers/localStorage.ts +3 -3
  681. package/src/helpers/logger.ts +1 -1
  682. package/src/helpers/preview-lru-cache/get.ts +1 -1
  683. package/src/helpers/preview-lru-cache/set.ts +1 -1
  684. package/src/helpers/sessionId.ts +4 -4
  685. package/src/helpers/subscribe-to-editor.ts +7 -7
  686. package/src/helpers/visitorId.ts +4 -4
  687. package/src/index-helpers/blocks-exports.ts +11 -11
  688. package/src/index.ts +3 -3
  689. package/src/scripts/init-editing.ts +5 -5
  690. package/src/server-index.ts +27 -27
  691. package/src/types/builder-content.ts +3 -3
  692. package/src/types/builder-props.ts +2 -2
  693. package/src/types/components.ts +2 -2
  694. package/src/types/enforced-partials.ts +1 -1
@@ -1,7 +1,7 @@
1
- import type { BuilderRenderState } from '../../context/types.js';
2
- import type { BuilderContent } from '../../types/builder-content.js';
3
- import type { Nullable } from '../../types/typescript.js';
4
- import type { ContentProps } from './content.types.js';
1
+ import type { BuilderRenderState } from '../../context/types';
2
+ import type { BuilderContent } from '../../types/builder-content';
3
+ import type { Nullable } from '../../types/typescript';
4
+ import type { ContentProps } from './content.types';
5
5
  export const getRootStateInitialValue = ({
6
6
  content,
7
7
  data,
@@ -2,28 +2,28 @@
2
2
  import { setContext } from "svelte";
3
3
  import { writable } from "svelte/store";
4
4
 
5
- import { getDefaultRegisteredComponents } from "../../constants/builder-registered-components.js";
6
- import { TARGET } from "../../constants/target.js";
7
- import ComponentsContext from "../../context/components.context.js";
5
+ import { getDefaultRegisteredComponents } from "../../constants/builder-registered-components";
6
+ import { TARGET } from "../../constants/target";
7
+ import ComponentsContext from "../../context/components.context";
8
8
  import type {
9
9
  BuilderContextInterface,
10
10
  BuilderRenderState,
11
11
  RegisteredComponents,
12
- } from "../../context/types.js";
13
- import { serializeComponentInfo } from "../../functions/register-component.js";
14
- import type { ComponentInfo } from "../../types/components.js";
15
- import type { Dictionary } from "../../types/typescript.js";
12
+ } from "../../context/types";
13
+ import { serializeComponentInfo } from "../../functions/register-component";
14
+ import type { ComponentInfo } from "../../types/components";
15
+ import type { Dictionary } from "../../types/typescript";
16
16
  import Blocks from "../blocks/blocks.svelte";
17
- import { getUpdateVariantVisibilityScript } from "../content-variants/helpers.js";
17
+ import { getUpdateVariantVisibilityScript } from "../content-variants/helpers";
18
18
  import InlinedScript from "../inlined-script.svelte";
19
19
  import EnableEditor from "./components/enable-editor.svelte";
20
20
  import ContentStyles from "./components/styles.svelte";
21
21
  import {
22
22
  getContentInitialValue,
23
23
  getRootStateInitialValue,
24
- } from "./content.helpers.js";
25
- import type { ContentProps } from "./content.types.js";
26
- import { wrapComponentRef } from "./wrap-component-ref.js";
24
+ } from "./content.helpers";
25
+ import type { ContentProps } from "./content.types";
26
+ import { wrapComponentRef } from "./wrap-component-ref";
27
27
 
28
28
  export let content: ContentProps["content"] = undefined;
29
29
  export let customComponents: ContentProps["customComponents"] = undefined;
@@ -1,5 +1,5 @@
1
- import type { BuilderRenderState } from '../../context/types.js';
2
- export type { ContentProps } from './contentProps.types.js';
1
+ import type { BuilderRenderState } from '../../context/types';
2
+ export type { ContentProps } from './contentProps.types';
3
3
  export interface BuilderComponentStateChange {
4
4
  state: BuilderRenderState;
5
5
  ref: {
@@ -1,5 +1,5 @@
1
- import type { EnforcePartials } from '../../types/enforced-partials.js';
2
- import type { ContentVariantsPrps } from '../content-variants/content-variants.types.js';
1
+ import type { EnforcePartials } from '../../types/enforced-partials';
2
+ import type { ContentVariantsPrps } from '../content-variants/content-variants.types';
3
3
  interface InternalRenderProps {
4
4
  showContent: boolean;
5
5
  isSsrAbTest: boolean;
@@ -10,19 +10,19 @@
10
10
  <script lang="ts">
11
11
  import { onMount } from "svelte";
12
12
 
13
- import { TARGET } from "../../constants/target.js";
14
- import { handleABTestingSync } from "../../helpers/ab-tests.js";
15
- import { getDefaultCanTrack } from "../../helpers/canTrack.js";
13
+ import { TARGET } from "../../constants/target";
14
+ import { handleABTestingSync } from "../../helpers/ab-tests";
15
+ import { getDefaultCanTrack } from "../../helpers/canTrack";
16
16
  import ContentComponent from "../content/content.svelte";
17
17
  import InlinedScript from "../inlined-script.svelte";
18
18
  import InlinedStyles from "../inlined-styles.svelte";
19
- import type { ContentVariantsPrps } from "./content-variants.types.js";
19
+ import type { ContentVariantsPrps } from "./content-variants.types";
20
20
  import {
21
21
  checkShouldRenderVariants,
22
22
  getInitVariantsFnsScriptString,
23
23
  getUpdateCookieAndStylesScript,
24
24
  getVariants,
25
- } from "./helpers.js";
25
+ } from "./helpers";
26
26
 
27
27
  export let canTrack: VariantsProviderProps["canTrack"] = undefined;
28
28
  export let content: VariantsProviderProps["content"] = undefined;
@@ -1,7 +1,7 @@
1
- import type { BuilderRenderContext, RegisteredComponent } from '../../context/types.js';
2
- import type { ApiVersion } from '../../types/api-version.js';
3
- import type { BuilderContent } from '../../types/builder-content.js';
4
- import type { Nullable } from '../../types/typescript.js';
1
+ import type { BuilderRenderContext, RegisteredComponent } from '../../context/types';
2
+ import type { ApiVersion } from '../../types/api-version';
3
+ import type { BuilderContent } from '../../types/builder-content';
4
+ import type { Nullable } from '../../types/typescript';
5
5
  export interface ContentVariantsPrps {
6
6
  /**
7
7
  * The Builder content JSON to render (required).
@@ -1,9 +1,9 @@
1
- import { TARGET } from '../../constants/target.js';
2
- import { isBrowser } from '../../functions/is-browser.js';
3
- import type { Nullable } from '../../helpers/nullable.js';
4
- import type { BuilderContent } from '../../types/builder-content.js';
5
- import type { Target } from '../../types/targets.js';
6
- import { UPDATE_COOKIES_AND_STYLES_SCRIPT, UPDATE_VARIANT_VISIBILITY_SCRIPT } from './inlined-fns.js';
1
+ import { TARGET } from '../../constants/target';
2
+ import { isBrowser } from '../../functions/is-browser';
3
+ import type { Nullable } from '../../helpers/nullable';
4
+ import type { BuilderContent } from '../../types/builder-content';
5
+ import type { Target } from '../../types/targets';
6
+ import { UPDATE_COOKIES_AND_STYLES_SCRIPT, UPDATE_VARIANT_VISIBILITY_SCRIPT } from './inlined-fns';
7
7
 
8
8
  /**
9
9
  * We hardcode explicit function names here, because the `.toString()` of a function can change depending on the bundler.
@@ -8,11 +8,11 @@
8
8
  </script>
9
9
 
10
10
  <script lang="ts">
11
- import { isEmptyElement } from "./dynamic-renderer.helpers.js";
12
- import { setAttrs } from "../../blocks/helpers.js";
11
+ import { isEmptyElement } from "./dynamic-renderer.helpers";
12
+ import { setAttrs } from "../../blocks/helpers";
13
13
 
14
- export let attributes: DynamicRendererProps["attributes"];
15
14
  export let TagName: DynamicRendererProps["TagName"];
15
+ export let attributes: DynamicRendererProps["attributes"];
16
16
  export let actionAttributes: DynamicRendererProps["actionAttributes"];
17
17
  </script>
18
18
 
@@ -1,21 +1,21 @@
1
- import { componentInfo as buttonComponentInfo } from '../blocks/button/component-info.js';
2
- import { default as Button } from '../blocks/button/index.js';
3
- import { componentInfo as columnsComponentInfo } from '../blocks/columns/component-info.js';
4
- import { default as Columns } from '../blocks/columns/index.js';
5
- import { componentInfo as fragmentComponentInfo } from '../blocks/fragment/component-info.js';
6
- import { default as Fragment } from '../blocks/fragment/index.js';
7
- import { componentInfo as imageComponentInfo } from '../blocks/image/component-info.js';
8
- import { default as Image } from '../blocks/image/index.js';
9
- import { componentInfo as sectionComponentInfo } from '../blocks/section/component-info.js';
10
- import { default as Section } from '../blocks/section/index.js';
11
- import { componentInfo as slotComponentInfo } from '../blocks/slot/component-info.js';
12
- import { default as Slot } from '../blocks/slot/index.js';
13
- import { componentInfo as symbolComponentInfo } from '../blocks/symbol/component-info.js';
14
- import { default as Symbol } from '../blocks/symbol/index.js';
15
- import { componentInfo as textComponentInfo } from '../blocks/text/component-info.js';
16
- import { default as Text } from '../blocks/text/index.js';
17
- import type { RegisteredComponent } from '../context/types.js';
18
- import { getExtraComponents } from './extra-components.js';
1
+ import { componentInfo as buttonComponentInfo } from '../blocks/button/component-info';
2
+ import { default as Button } from '../blocks/button/index';
3
+ import { componentInfo as columnsComponentInfo } from '../blocks/columns/component-info';
4
+ import { default as Columns } from '../blocks/columns/index';
5
+ import { componentInfo as fragmentComponentInfo } from '../blocks/fragment/component-info';
6
+ import { default as Fragment } from '../blocks/fragment/index';
7
+ import { componentInfo as imageComponentInfo } from '../blocks/image/component-info';
8
+ import { default as Image } from '../blocks/image/index';
9
+ import { componentInfo as sectionComponentInfo } from '../blocks/section/component-info';
10
+ import { default as Section } from '../blocks/section/index';
11
+ import { componentInfo as slotComponentInfo } from '../blocks/slot/component-info';
12
+ import { default as Slot } from '../blocks/slot/index';
13
+ import { componentInfo as symbolComponentInfo } from '../blocks/symbol/component-info';
14
+ import { default as Symbol } from '../blocks/symbol/index';
15
+ import { componentInfo as textComponentInfo } from '../blocks/text/component-info';
16
+ import { default as Text } from '../blocks/text/index';
17
+ import type { RegisteredComponent } from '../context/types';
18
+ import { getExtraComponents } from './extra-components';
19
19
 
20
20
  /**
21
21
  * Returns a list of all registered components.
@@ -1,4 +1,4 @@
1
- import { fastClone } from '../functions/fast-clone.js';
1
+ import { fastClone } from '../functions/fast-clone';
2
2
  export type SizeName = 'large' | 'medium' | 'small';
3
3
  interface Size {
4
4
  min: number;
@@ -4,24 +4,24 @@
4
4
  * React Native SDK.
5
5
  */
6
6
 
7
- import { componentInfo as customCodeInfo } from '../blocks/custom-code/component-info.js';
8
- import { default as customCode } from '../blocks/custom-code/index.js';
9
- import { componentInfo as embedComponentInfo } from '../blocks/embed/component-info.js';
10
- import { default as embed } from '../blocks/embed/index.js';
11
- import { componentInfo as formComponentInfo } from '../blocks/form/form/component-info.js';
12
- import { default as Form } from '../blocks/form/form/index.js';
13
- import { componentInfo as formInputComponentInfo } from '../blocks/form/input/component-info.js';
14
- import { default as FormInput } from '../blocks/form/input/index.js';
15
- import { componentInfo as formSelectComponentInfo } from '../blocks/form/select/component-info.js';
16
- import { default as FormSelect } from '../blocks/form/select/index.js';
17
- import { componentInfo as formSubmitButtonComponentInfo } from '../blocks/form/submit-button/component-info.js';
18
- import { default as FormSubmitButton } from '../blocks/form/submit-button/index.js';
19
- import { componentInfo as imgComponentInfo } from '../blocks/img/component-info.js';
20
- import { default as Img } from '../blocks/img/index.js';
21
- import { componentInfo as videoComponentInfo } from '../blocks/video/component-info.js';
22
- import { default as Video } from '../blocks/video/index.js';
23
- import type { RegisteredComponent } from '../context/types.js';
24
- import { TARGET } from './target.js';
7
+ import { componentInfo as customCodeInfo } from '../blocks/custom-code/component-info';
8
+ import { default as customCode } from '../blocks/custom-code/index';
9
+ import { componentInfo as embedComponentInfo } from '../blocks/embed/component-info';
10
+ import { default as embed } from '../blocks/embed/index';
11
+ import { componentInfo as formComponentInfo } from '../blocks/form/form/component-info';
12
+ import { default as Form } from '../blocks/form/form/index';
13
+ import { componentInfo as formInputComponentInfo } from '../blocks/form/input/component-info';
14
+ import { default as FormInput } from '../blocks/form/input/index';
15
+ import { componentInfo as formSelectComponentInfo } from '../blocks/form/select/component-info';
16
+ import { default as FormSelect } from '../blocks/form/select/index';
17
+ import { componentInfo as formSubmitButtonComponentInfo } from '../blocks/form/submit-button/component-info';
18
+ import { default as FormSubmitButton } from '../blocks/form/submit-button/index';
19
+ import { componentInfo as imgComponentInfo } from '../blocks/img/component-info';
20
+ import { default as Img } from '../blocks/img/index';
21
+ import { componentInfo as videoComponentInfo } from '../blocks/video/component-info';
22
+ import { default as Video } from '../blocks/video/index';
23
+ import type { RegisteredComponent } from '../context/types';
24
+ import { TARGET } from './target';
25
25
  export const getExtraComponents: () => RegisteredComponent[] = () => [{
26
26
  component: customCode,
27
27
  ...customCodeInfo
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.0.19"
1
+ export const SDK_VERSION = "1.0.21"
@@ -1,4 +1,4 @@
1
- type Target = import('../types/targets.js').Target;
1
+ type Target = import('../types/targets').Target;
2
2
 
3
3
  /** This file should be overriden for each framework. Ideally this would be implemented in Mitosis. */
4
4
  export const TARGET = 'svelte' as Target;
@@ -1 +1 @@
1
- export { default as BuilderContext } from './builder.context.js'
1
+ export { default as BuilderContext } from './builder.context'
@@ -1,8 +1,8 @@
1
1
  import type { BlocksWrapperProps } from '../components/blocks/blocks-wrapper.svelte';
2
- import type { ApiVersion } from '../types/api-version.js';
3
- import type { BuilderContent } from '../types/builder-content.js';
4
- import type { ComponentInfo } from '../types/components.js';
5
- import type { Dictionary, Nullable } from '../types/typescript.js';
2
+ import type { ApiVersion } from '../types/api-version';
3
+ import type { BuilderContent } from '../types/builder-content';
4
+ import type { ComponentInfo } from '../types/components';
5
+ import type { Dictionary, Nullable } from '../types/typescript';
6
6
  export type RegisteredComponent = ComponentInfo & {
7
7
  component: any;
8
8
  };
@@ -1,6 +1,6 @@
1
- import type { BuilderRenderState } from '../../../context/types.js';
2
- import type { ExecutorArgs } from '../helpers.js';
3
- import { getFunctionArguments } from '../helpers.js';
1
+ import type { BuilderRenderState } from '../../../context/types';
2
+ import type { ExecutorArgs } from '../helpers';
3
+ import { getFunctionArguments } from '../helpers';
4
4
  export const runInBrowser = ({
5
5
  code,
6
6
  builder,
@@ -1 +1 @@
1
- export { runInBrowser as evaluator } from './browser.js'
1
+ export { runInBrowser as evaluator } from './browser'
@@ -1,6 +1,6 @@
1
- import { isBrowser } from '../is-browser.js';
2
- import { runInBrowser } from './browser-runtime/browser.js';
3
- import type { ExecutorArgs } from './helpers.js';
1
+ import { isBrowser } from '../is-browser';
2
+ import { runInBrowser } from './browser-runtime/browser';
3
+ import type { ExecutorArgs } from './helpers';
4
4
 
5
5
  /**
6
6
  * THIS IS A MAGICAL IMPORT. It is aliased by the build process of every SDK configuration, so that
@@ -14,7 +14,7 @@ import type { ExecutorArgs } from './helpers.js';
14
14
  * types can be resolved correctly.
15
15
  */
16
16
  import { evaluator } from 'placeholder-runtime';
17
- import { shouldForceBrowserRuntimeInNode } from './should-force-browser-runtime-in-node.js';
17
+ import { shouldForceBrowserRuntimeInNode } from './should-force-browser-runtime-in-node';
18
18
 
19
19
  /**
20
20
  * Even though we have separate runtimes for browser/node/edge, sometimes frameworks will
@@ -1,8 +1,8 @@
1
- import { logger } from '../../../helpers/logger.js';
2
- import { set } from '../../set.js';
3
- import type { ExecutorArgs } from '../helpers.js';
4
- import { getFunctionArguments } from '../helpers.js';
5
- import Interpreter from './acorn-interpreter.js';
1
+ import { logger } from '../../../helpers/logger';
2
+ import { set } from '../../set';
3
+ import type { ExecutorArgs } from '../helpers';
4
+ import { getFunctionArguments } from '../helpers';
5
+ import Interpreter from './acorn-interpreter';
6
6
  const processCode = (code: string) => {
7
7
  return code.split('\n').map(line => {
8
8
  const trimmed = line.trim();
@@ -1 +1 @@
1
- export { runInEdge as evaluator } from './edge-runtime.js'
1
+ export { runInEdge as evaluator } from './edge-runtime'
@@ -1,7 +1,7 @@
1
- import { logger } from '../../helpers/logger.js';
2
- import { chooseBrowserOrServerEval } from './choose-eval.js';
3
- import type { EvaluatorArgs, ExecutorArgs } from './helpers.js';
4
- import { getBuilderGlobals, parseCode } from './helpers.js';
1
+ import { logger } from '../../helpers/logger';
2
+ import { chooseBrowserOrServerEval } from './choose-eval';
3
+ import type { EvaluatorArgs, ExecutorArgs } from './helpers';
4
+ import { getBuilderGlobals, parseCode } from './helpers';
5
5
  type EvalValue = unknown;
6
6
  class EvalCache {
7
7
  static cacheLimit = 20;
@@ -1,7 +1,7 @@
1
- import type { BuilderContextInterface, BuilderRenderState } from '../../context/types.js';
2
- import { isBrowser } from '../is-browser.js';
3
- import { isEditing } from '../is-editing.js';
4
- import { getUserAttributes } from '../track/helpers.js';
1
+ import type { BuilderContextInterface, BuilderRenderState } from '../../context/types';
2
+ import { isBrowser } from '../is-browser';
3
+ import { isEditing } from '../is-editing';
4
+ import { getUserAttributes } from '../track/helpers';
5
5
  export type EvaluatorArgs = Omit<ExecutorArgs, 'builder' | 'event'> & {
6
6
  event?: Event;
7
7
  isExpression?: boolean;
@@ -1 +1 @@
1
- export { evaluate } from './evaluate.js'
1
+ export { evaluate } from './evaluate'
@@ -1 +1 @@
1
- export { runInNode as evaluator } from './node-runtime.js'
1
+ export { runInNode as evaluator } from './node-runtime'
@@ -0,0 +1,27 @@
1
+ /**
2
+ * This file:
3
+ * - imports `isolated-vm`, which can only be made from a file that never runs
4
+ * on the client (e.g. Next's `_document.tsx`)
5
+ * - stores the ivm instance in a global variable using `setIvm`
6
+ *
7
+ * This is needed for when bundlers/meta-frameworks are not able to reliably
8
+ * import the `isolated-vm` package using our `safeDynamicRequire` trick.
9
+ *
10
+ * The `isolated-vm` import must exist in this separate file, or it will end up
11
+ * in the SDK's main entry point, causing errors for users.
12
+ */
13
+ import ivm from 'isolated-vm';
14
+ import { setIvm } from './node-runtime';
15
+
16
+ /**
17
+ * This function initializes the SDK on a Node server. It handles importing the
18
+ * `isolated-vm` package which is needed for dynamic bindings.
19
+ *
20
+ * NOTE: this function cannot be called on the client. You must call this function
21
+ * from a server-only location, such as:
22
+ * - The NextJS Pages router's `_document.tsx`
23
+ * - Your Remix route's `loader`
24
+ */
25
+ export const initializeNodeRuntime = () => {
26
+ setIvm(ivm);
27
+ }
@@ -1,8 +1,9 @@
1
- import { fastClone } from '../../fast-clone.js';
2
- import { set } from '../../set.js';
3
- import type { BuilderGlobals, ExecutorArgs, FunctionArguments } from '../helpers.js';
4
- import { getFunctionArguments } from '../helpers.js';
5
- import { safeDynamicRequire } from './safeDynamicRequire.js';
1
+ import { MSG_PREFIX, logger } from '../../../helpers/logger';
2
+ import { fastClone } from '../../fast-clone';
3
+ import { set } from '../../set';
4
+ import type { BuilderGlobals, ExecutorArgs, FunctionArguments } from '../helpers';
5
+ import { getFunctionArguments } from '../helpers';
6
+ import { safeDynamicRequire } from './safeDynamicRequire';
6
7
  const getSyncValName = (key: string) => `bldr_${key}_sync`;
7
8
  const BUILDER_SET_STATE_NAME = 'BUILDER_SET_STATE';
8
9
  const INJECTED_IVM_GLOBAL = 'BUILDER_IVM';
@@ -62,12 +63,35 @@ if (typeof output === 'object' && output !== null) {
62
63
  output;
63
64
  `;
64
65
  };
66
+ let IVM_INSTANCE: typeof import('isolated-vm') | null = null;
67
+
68
+ /**
69
+ * Set the `isolated-vm` instance to be used by the node runtime.
70
+ * This is useful for environments that are not able to rely on our
71
+ * `safeDynamicRequire` trick to import the `isolated-vm` package.
72
+ */
73
+ export const setIvm = (ivm: typeof import('isolated-vm')) => {
74
+ IVM_INSTANCE = ivm;
75
+ };
76
+ const getIvm = (): typeof import('isolated-vm') => {
77
+ try {
78
+ if (IVM_INSTANCE) return IVM_INSTANCE;
79
+ const dynRequiredIvm = safeDynamicRequire('isolated-vm');
80
+ if (dynRequiredIvm) return dynRequiredIvm;
81
+ } catch (error) {
82
+ logger.error('isolated-vm import error.', error);
83
+ }
84
+ throw new Error(`${MSG_PREFIX}could not import \`isolated-vm\` module for safe script execution on Node server.
85
+
86
+ In certain Node environments, the SDK requires additional initialization steps. This can be achieved by
87
+ importing and calling \`initializeNodeRuntime()\` from "@builder.io/sdk-react/node/init". This must be done in
88
+ a server-only execution path within your application.
89
+
90
+ Please see the documentation for more information: https://builder.io/c/docs/integration-tips#enabling-data-bindings-in-node-environments
91
+ `);
92
+ };
65
93
  const getIsolateContext = () => {
66
- // if (Builder.serverContext) {
67
- // return Builder.serverContext;
68
- // }
69
- // Builder.setServerContext(isolate.createContextSync());
70
- const ivm: typeof import('isolated-vm') = safeDynamicRequire('isolated-vm');
94
+ const ivm = getIvm();
71
95
  const isolate = new ivm.Isolate({
72
96
  memoryLimit: 128
73
97
  });
@@ -82,7 +106,7 @@ export const runInNode = ({
82
106
  rootSetState,
83
107
  rootState
84
108
  }: ExecutorArgs) => {
85
- const ivm: typeof import('isolated-vm') = safeDynamicRequire('isolated-vm');
109
+ const ivm = getIvm();
86
110
  const state = fastClone({
87
111
  ...rootState,
88
112
  ...localState
@@ -1,4 +1,4 @@
1
- import type { ExecutorArgs } from './helpers.js';
1
+ import type { ExecutorArgs } from './helpers';
2
2
  export const evaluator = (_args: ExecutorArgs) => {
3
3
  throw new Error('Placeholder evaluator not implemented. Make sure the SDK is properly replacing the import to the evaluator with one of edge/node/browser runtime evaluators.');
4
4
  }
@@ -1,5 +1,5 @@
1
- import { logger } from '../../helpers/logger.js';
2
- import { isNodeRuntime } from '../is-node-runtime.js';
1
+ import { logger } from '../../helpers/logger';
2
+ import { isNodeRuntime } from '../is-node-runtime';
3
3
  export const shouldForceBrowserRuntimeInNode = () => {
4
4
  if (!isNodeRuntime()) return false;
5
5
  const isArm64 = process.arch === 'arm64';
@@ -1,8 +1,8 @@
1
- import type { ContentVariantsPrps } from '../components/content-variants/content-variants.types.js';
2
- import type { Dictionary } from '../types/typescript.js';
3
- import { getBuilderSearchParams } from './get-builder-search-params/index.js';
4
- import { fetchOneEntry } from './get-content/index.js';
5
- import type { GetContentOptions } from './get-content/types.js';
1
+ import type { ContentVariantsPrps } from '../components/content-variants/content-variants.types';
2
+ import type { Dictionary } from '../types/typescript';
3
+ import { getBuilderSearchParams } from './get-builder-search-params/index';
4
+ import { fetchOneEntry } from './get-content/index';
5
+ import type { GetContentOptions } from './get-content/types';
6
6
  type GetBuilderPropsOptions = (Omit<GetContentOptions, 'model'> & {
7
7
  model?: string;
8
8
  }) & ({
@@ -1,6 +1,6 @@
1
- import type { BuilderContextInterface } from '../context/types.js';
2
- import type { BuilderBlock } from '../types/builder-block.js';
3
- import { evaluate } from './evaluate/index.js';
1
+ import type { BuilderContextInterface } from '../context/types';
2
+ import type { BuilderBlock } from '../types/builder-block';
3
+ import { evaluate } from './evaluate/index';
4
4
  type Options = {
5
5
  block: BuilderBlock;
6
6
  } & Pick<BuilderContextInterface, 'localState' | 'context' | 'rootState' | 'rootSetState'>;
@@ -1,8 +1,8 @@
1
- import { TARGET } from '../constants/target.js';
2
- import type { BuilderContextInterface } from '../context/types.js';
3
- import type { BuilderBlock } from '../types/builder-block.js';
4
- import { getEventHandlerName } from './event-handler-name.js';
5
- import { createEventHandler } from './get-block-actions-handler.js';
1
+ import { TARGET } from '../constants/target';
2
+ import type { BuilderContextInterface } from '../context/types';
3
+ import type { BuilderBlock } from '../types/builder-block';
4
+ import { getEventHandlerName } from './event-handler-name';
5
+ import { createEventHandler } from './get-block-actions-handler';
6
6
  type Actions = {
7
7
  [index: string]: (event: Event) => any;
8
8
  };
@@ -1,4 +1,4 @@
1
- import type { BuilderBlock } from '../types/builder-block.js';
1
+ import type { BuilderBlock } from '../types/builder-block';
2
2
  export function getBlockComponentOptions(block: BuilderBlock) {
3
3
  return {
4
4
  ...block.component?.options,
@@ -1,8 +1,8 @@
1
- import type { BuilderContextInterface } from '../context/types.js';
2
- import type { BuilderBlock } from '../types/builder-block.js';
3
- import { getClassPropName } from './get-class-prop-name.js';
4
- import { getStyle } from './get-style.js';
5
- import { transformBlockProperties } from './transform-block-properties.js';
1
+ import type { BuilderContextInterface } from '../context/types';
2
+ import type { BuilderBlock } from '../types/builder-block';
3
+ import { getClassPropName } from './get-class-prop-name';
4
+ import { getStyle } from './get-style';
5
+ import { transformBlockProperties } from './transform-block-properties';
6
6
  const extractRelevantRootBlockProperties = (block: BuilderBlock) => {
7
7
  // currently we are only spreading the `href` property
8
8
  // TO-DO: potentially spread all properties from block, but only if they are not already defined by BuilderBlock
@@ -1,6 +1,6 @@
1
- import type { QueryObject } from '../../helpers/search/search.js';
2
- import { normalizeSearchParams } from '../../helpers/search/search.js';
3
- import { isBrowser } from '../is-browser.js';
1
+ import type { QueryObject } from '../../helpers/search/search';
2
+ import { normalizeSearchParams } from '../../helpers/search/search';
3
+ import { isBrowser } from '../is-browser';
4
4
  const BUILDER_SEARCHPARAMS_PREFIX = 'builder.';
5
5
  const BUILDER_OPTIONS_PREFIX = 'options.';
6
6
 
@@ -1,4 +1,4 @@
1
- import { TARGET } from '../constants/target.js';
1
+ import { TARGET } from '../constants/target';
2
2
  export const getClassPropName = () => {
3
3
  switch (TARGET) {
4
4
  case 'react':
@@ -1,8 +1,8 @@
1
- import { flatten } from '../../helpers/flatten.js';
2
- import { normalizeSearchParams } from '../../helpers/search/search.js';
3
- import { DEFAULT_API_VERSION } from '../../types/api-version.js';
4
- import { getBuilderSearchParamsFromWindow } from '../get-builder-search-params/index.js';
5
- import type { GetContentOptions } from './types.js';
1
+ import { flatten } from '../../helpers/flatten';
2
+ import { normalizeSearchParams } from '../../helpers/search/search';
3
+ import { DEFAULT_API_VERSION } from '../../types/api-version';
4
+ import { getBuilderSearchParamsFromWindow } from '../get-builder-search-params/index';
5
+ import type { GetContentOptions } from './types';
6
6
  const isPositiveNumber = (thing: unknown) => typeof thing === 'number' && !isNaN(thing) && thing >= 0;
7
7
  export const generateContentUrl = (options: GetContentOptions): URL => {
8
8
  const {
@@ -1,13 +1,13 @@
1
- import { TARGET } from '../../constants/target.js';
2
- import { handleABTesting } from '../../helpers/ab-tests.js';
3
- import { getDefaultCanTrack } from '../../helpers/canTrack.js';
4
- import { logger } from '../../helpers/logger.js';
5
- import { getPreviewContent } from '../../helpers/preview-lru-cache/get.js';
6
- import type { BuilderContent } from '../../types/builder-content.js';
7
- import { fetch } from '../get-fetch.js';
8
- import { isBrowser } from '../is-browser.js';
9
- import { generateContentUrl } from './generate-content-url.js';
10
- import type { GetContentOptions } from './types.js';
1
+ import { TARGET } from '../../constants/target';
2
+ import { handleABTesting } from '../../helpers/ab-tests';
3
+ import { getDefaultCanTrack } from '../../helpers/canTrack';
4
+ import { logger } from '../../helpers/logger';
5
+ import { getPreviewContent } from '../../helpers/preview-lru-cache/get';
6
+ import type { BuilderContent } from '../../types/builder-content';
7
+ import { fetch } from '../get-fetch';
8
+ import { isBrowser } from '../is-browser';
9
+ import { generateContentUrl } from './generate-content-url';
10
+ import type { GetContentOptions } from './types';
11
11
  const checkContentHasResults = (content: ContentResponse): content is ContentResults => 'results' in content;
12
12
 
13
13
  /**
@@ -148,10 +148,10 @@ export interface GetContentOptions {
148
148
  /**
149
149
  * Optional override of the `fetch` function. (Defaults to global `fetch`)
150
150
  */
151
- fetch?: typeof global.fetch;
151
+ fetch?: (input: string, init?: object) => Promise<any>;
152
152
 
153
153
  /**
154
- * Optional fetch options to be passed to the `fetch` function.
154
+ * Optional fetch options to be passed as the second argument to the `fetch` function.
155
155
  */
156
- fetchOptions?: RequestInit;
156
+ fetchOptions?: object;
157
157
  }