@builder.io/sdk-qwik 0.16.11 → 0.16.14

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 (501) hide show
  1. package/lib/browser/blocks/accordion/accordion.qwik.cjs +74 -143
  2. package/lib/browser/blocks/accordion/accordion.qwik.mjs +74 -143
  3. package/lib/browser/blocks/accordion/component-info.qwik.cjs +2 -1
  4. package/lib/browser/blocks/accordion/component-info.qwik.mjs +2 -1
  5. package/lib/browser/blocks/button/button.qwik.cjs +8 -17
  6. package/lib/browser/blocks/button/button.qwik.mjs +8 -17
  7. package/lib/browser/blocks/columns/columns.qwik.cjs +33 -67
  8. package/lib/browser/blocks/columns/columns.qwik.mjs +33 -67
  9. package/lib/browser/blocks/columns/component-info.qwik.cjs +4 -3
  10. package/lib/browser/blocks/columns/component-info.qwik.mjs +4 -3
  11. package/lib/browser/blocks/custom-code/custom-code.qwik.cjs +18 -22
  12. package/lib/browser/blocks/custom-code/custom-code.qwik.mjs +19 -23
  13. package/lib/browser/blocks/embed/embed.qwik.cjs +17 -23
  14. package/lib/browser/blocks/embed/embed.qwik.mjs +17 -23
  15. package/lib/browser/blocks/form/form/form.qwik.cjs +74 -128
  16. package/lib/browser/blocks/form/form/form.qwik.mjs +75 -129
  17. package/lib/browser/blocks/form/input/input.qwik.cjs +2 -2
  18. package/lib/browser/blocks/form/input/input.qwik.mjs +3 -3
  19. package/lib/browser/blocks/form/select/select.qwik.cjs +7 -5
  20. package/lib/browser/blocks/form/select/select.qwik.mjs +8 -6
  21. package/lib/browser/blocks/form/submit-button/submit-button.qwik.cjs +7 -9
  22. package/lib/browser/blocks/form/submit-button/submit-button.qwik.mjs +8 -10
  23. package/lib/browser/blocks/form/textarea/textarea.qwik.cjs +11 -21
  24. package/lib/browser/blocks/form/textarea/textarea.qwik.mjs +12 -22
  25. package/lib/browser/blocks/fragment/fragment.qwik.cjs +6 -3
  26. package/lib/browser/blocks/fragment/fragment.qwik.mjs +7 -4
  27. package/lib/browser/blocks/image/component-info.qwik.cjs +6 -3
  28. package/lib/browser/blocks/image/component-info.qwik.mjs +6 -3
  29. package/lib/browser/blocks/image/image.helpers.qwik.cjs +12 -6
  30. package/lib/browser/blocks/image/image.helpers.qwik.mjs +12 -6
  31. package/lib/browser/blocks/image/image.qwik.cjs +63 -89
  32. package/lib/browser/blocks/image/image.qwik.mjs +63 -89
  33. package/lib/browser/blocks/img/img.qwik.cjs +12 -18
  34. package/lib/browser/blocks/img/img.qwik.mjs +12 -18
  35. package/lib/browser/blocks/section/section.qwik.cjs +7 -6
  36. package/lib/browser/blocks/section/section.qwik.mjs +8 -7
  37. package/lib/browser/blocks/slot/slot.qwik.cjs +17 -43
  38. package/lib/browser/blocks/slot/slot.qwik.mjs +17 -43
  39. package/lib/browser/blocks/symbol/symbol.helpers.qwik.cjs +2 -1
  40. package/lib/browser/blocks/symbol/symbol.helpers.qwik.mjs +2 -1
  41. package/lib/browser/blocks/symbol/symbol.qwik.cjs +45 -137
  42. package/lib/browser/blocks/symbol/symbol.qwik.mjs +45 -137
  43. package/lib/browser/blocks/tabs/tabs.qwik.cjs +45 -99
  44. package/lib/browser/blocks/tabs/tabs.qwik.mjs +45 -99
  45. package/lib/browser/blocks/text/text.qwik.cjs +11 -15
  46. package/lib/browser/blocks/text/text.qwik.mjs +11 -15
  47. package/lib/browser/blocks/video/video.qwik.cjs +73 -87
  48. package/lib/browser/blocks/video/video.qwik.mjs +74 -88
  49. package/lib/browser/components/awaiter.qwik.cjs +13 -0
  50. package/lib/browser/components/awaiter.qwik.mjs +13 -0
  51. package/lib/browser/components/block/animator.qwik.cjs +22 -11
  52. package/lib/browser/components/block/animator.qwik.mjs +22 -11
  53. package/lib/browser/components/block/block.helpers.qwik.cjs +8 -4
  54. package/lib/browser/components/block/block.helpers.qwik.mjs +8 -4
  55. package/lib/browser/components/block/block.qwik.cjs +114 -320
  56. package/lib/browser/components/block/block.qwik.mjs +115 -321
  57. package/lib/browser/components/block/components/block-styles.qwik.cjs +22 -39
  58. package/lib/browser/components/block/components/block-styles.qwik.mjs +23 -40
  59. package/lib/browser/components/block/components/block-wrapper.qwik.cjs +12 -18
  60. package/lib/browser/components/block/components/block-wrapper.qwik.mjs +12 -18
  61. package/lib/browser/components/block/components/component-ref/component-ref.qwik.cjs +12 -29
  62. package/lib/browser/components/block/components/component-ref/component-ref.qwik.mjs +14 -31
  63. package/lib/browser/components/block/components/interactive-element.qwik.cjs +28 -28
  64. package/lib/browser/components/block/components/interactive-element.qwik.mjs +28 -28
  65. package/lib/browser/components/block/components/repeated-block.qwik.cjs +10 -31
  66. package/lib/browser/components/block/components/repeated-block.qwik.mjs +11 -32
  67. package/lib/browser/components/blocks/blocks-wrapper.qwik.cjs +24 -72
  68. package/lib/browser/components/blocks/blocks-wrapper.qwik.mjs +24 -72
  69. package/lib/browser/components/blocks/blocks.qwik.cjs +19 -78
  70. package/lib/browser/components/blocks/blocks.qwik.mjs +20 -79
  71. package/lib/browser/components/content/components/enable-editor.qwik.cjs +89 -219
  72. package/lib/browser/components/content/components/enable-editor.qwik.mjs +89 -219
  73. package/lib/browser/components/content/components/styles.helpers.qwik.cjs +12 -6
  74. package/lib/browser/components/content/components/styles.helpers.qwik.mjs +12 -6
  75. package/lib/browser/components/content/components/styles.qwik.cjs +8 -20
  76. package/lib/browser/components/content/components/styles.qwik.mjs +8 -20
  77. package/lib/browser/components/content/content.helpers.qwik.cjs +2 -1
  78. package/lib/browser/components/content/content.helpers.qwik.mjs +2 -1
  79. package/lib/browser/components/content/content.qwik.cjs +65 -189
  80. package/lib/browser/components/content/content.qwik.mjs +65 -189
  81. package/lib/browser/components/content-variants/content-variants.qwik.cjs +74 -313
  82. package/lib/browser/components/content-variants/content-variants.qwik.mjs +75 -314
  83. package/lib/browser/components/dynamic-renderer/dynamic-renderer.qwik.cjs +11 -12
  84. package/lib/browser/components/dynamic-renderer/dynamic-renderer.qwik.mjs +12 -13
  85. package/lib/browser/components/inlined-script.qwik.cjs +8 -13
  86. package/lib/browser/components/inlined-script.qwik.mjs +9 -14
  87. package/lib/browser/components/inlined-styles.qwik.cjs +8 -13
  88. package/lib/browser/components/inlined-styles.qwik.mjs +9 -14
  89. package/lib/browser/constants/device-sizes.qwik.cjs +2 -1
  90. package/lib/browser/constants/device-sizes.qwik.mjs +2 -1
  91. package/lib/browser/constants/sdk-version.qwik.cjs +1 -1
  92. package/lib/browser/constants/sdk-version.qwik.mjs +1 -1
  93. package/lib/browser/functions/evaluate/browser-runtime/browser.qwik.cjs +1 -28
  94. package/lib/browser/functions/evaluate/browser-runtime/browser.qwik.mjs +1 -28
  95. package/lib/browser/functions/evaluate/choose-eval.qwik.cjs +3 -1
  96. package/lib/browser/functions/evaluate/choose-eval.qwik.mjs +3 -1
  97. package/lib/browser/functions/evaluate/evaluate.qwik.cjs +6 -3
  98. package/lib/browser/functions/evaluate/evaluate.qwik.mjs +6 -3
  99. package/lib/browser/functions/evaluate/helpers.qwik.cjs +30 -0
  100. package/lib/browser/functions/evaluate/helpers.qwik.mjs +30 -0
  101. package/lib/browser/functions/evaluate/should-force-browser-runtime-in-node.qwik.cjs +4 -2
  102. package/lib/browser/functions/evaluate/should-force-browser-runtime-in-node.qwik.mjs +4 -2
  103. package/lib/browser/functions/get-block-actions-handler.qwik.cjs +9 -15
  104. package/lib/browser/functions/get-block-actions-handler.qwik.mjs +10 -16
  105. package/lib/browser/functions/get-block-actions.qwik.cjs +4 -2
  106. package/lib/browser/functions/get-block-actions.qwik.mjs +4 -2
  107. package/lib/browser/functions/get-builder-search-params/index.qwik.cjs +4 -2
  108. package/lib/browser/functions/get-builder-search-params/index.qwik.mjs +4 -2
  109. package/lib/browser/functions/get-content/generate-content-url.qwik.cjs +22 -11
  110. package/lib/browser/functions/get-content/generate-content-url.qwik.mjs +22 -11
  111. package/lib/browser/functions/get-content/index.qwik.cjs +4 -2
  112. package/lib/browser/functions/get-content/index.qwik.mjs +4 -2
  113. package/lib/browser/functions/get-global-this.qwik.cjs +8 -4
  114. package/lib/browser/functions/get-global-this.qwik.mjs +8 -4
  115. package/lib/browser/functions/get-processed-block.qwik.cjs +15 -8
  116. package/lib/browser/functions/get-processed-block.qwik.mjs +15 -8
  117. package/lib/browser/functions/is-from-trusted-host.qwik.cjs +2 -1
  118. package/lib/browser/functions/is-from-trusted-host.qwik.mjs +2 -1
  119. package/lib/browser/functions/is-previewing.qwik.cjs +2 -1
  120. package/lib/browser/functions/is-previewing.qwik.mjs +2 -1
  121. package/lib/browser/functions/register-component.qwik.cjs +2 -1
  122. package/lib/browser/functions/register-component.qwik.mjs +2 -1
  123. package/lib/browser/functions/register.qwik.cjs +6 -3
  124. package/lib/browser/functions/register.qwik.mjs +6 -3
  125. package/lib/browser/functions/set.qwik.cjs +2 -1
  126. package/lib/browser/functions/set.qwik.mjs +2 -1
  127. package/lib/browser/functions/track/helpers.qwik.cjs +2 -1
  128. package/lib/browser/functions/track/helpers.qwik.mjs +2 -1
  129. package/lib/browser/functions/track/index.qwik.cjs +8 -4
  130. package/lib/browser/functions/track/index.qwik.mjs +8 -4
  131. package/lib/browser/functions/track/interaction.qwik.cjs +6 -3
  132. package/lib/browser/functions/track/interaction.qwik.mjs +6 -3
  133. package/lib/browser/helpers/ab-tests.qwik.cjs +15 -8
  134. package/lib/browser/helpers/ab-tests.qwik.mjs +16 -9
  135. package/lib/browser/helpers/cookie.qwik.cjs +4 -2
  136. package/lib/browser/helpers/cookie.qwik.mjs +4 -2
  137. package/lib/browser/helpers/css.qwik.cjs +6 -4
  138. package/lib/browser/helpers/css.qwik.mjs +6 -4
  139. package/lib/browser/helpers/flatten.qwik.cjs +3 -2
  140. package/lib/browser/helpers/flatten.qwik.mjs +3 -2
  141. package/lib/browser/helpers/localStorage.qwik.cjs +4 -2
  142. package/lib/browser/helpers/localStorage.qwik.mjs +4 -2
  143. package/lib/browser/helpers/omit.qwik.cjs +2 -1
  144. package/lib/browser/helpers/omit.qwik.mjs +2 -1
  145. package/lib/browser/helpers/search/search.qwik.cjs +3 -2
  146. package/lib/browser/helpers/search/search.qwik.mjs +3 -2
  147. package/lib/browser/helpers/sessionId.qwik.cjs +4 -3
  148. package/lib/browser/helpers/sessionId.qwik.mjs +4 -3
  149. package/lib/browser/helpers/subscribe-to-editor.qwik.cjs +10 -5
  150. package/lib/browser/helpers/subscribe-to-editor.qwik.mjs +10 -5
  151. package/lib/browser/helpers/url.qwik.cjs +4 -2
  152. package/lib/browser/helpers/url.qwik.mjs +4 -2
  153. package/lib/browser/helpers/visitorId.qwik.cjs +4 -3
  154. package/lib/browser/helpers/visitorId.qwik.mjs +4 -3
  155. package/lib/browser/scripts/init-editing.qwik.cjs +25 -19
  156. package/lib/browser/scripts/init-editing.qwik.mjs +25 -19
  157. package/lib/edge/blocks/accordion/accordion.qwik.cjs +74 -143
  158. package/lib/edge/blocks/accordion/accordion.qwik.mjs +74 -143
  159. package/lib/edge/blocks/accordion/component-info.qwik.cjs +2 -1
  160. package/lib/edge/blocks/accordion/component-info.qwik.mjs +2 -1
  161. package/lib/edge/blocks/button/button.qwik.cjs +8 -17
  162. package/lib/edge/blocks/button/button.qwik.mjs +8 -17
  163. package/lib/edge/blocks/columns/columns.qwik.cjs +33 -67
  164. package/lib/edge/blocks/columns/columns.qwik.mjs +33 -67
  165. package/lib/edge/blocks/columns/component-info.qwik.cjs +4 -3
  166. package/lib/edge/blocks/columns/component-info.qwik.mjs +4 -3
  167. package/lib/edge/blocks/custom-code/custom-code.qwik.cjs +18 -22
  168. package/lib/edge/blocks/custom-code/custom-code.qwik.mjs +19 -23
  169. package/lib/edge/blocks/embed/embed.qwik.cjs +17 -23
  170. package/lib/edge/blocks/embed/embed.qwik.mjs +17 -23
  171. package/lib/edge/blocks/form/form/form.qwik.cjs +74 -128
  172. package/lib/edge/blocks/form/form/form.qwik.mjs +75 -129
  173. package/lib/edge/blocks/form/input/input.qwik.cjs +2 -2
  174. package/lib/edge/blocks/form/input/input.qwik.mjs +3 -3
  175. package/lib/edge/blocks/form/select/select.qwik.cjs +7 -5
  176. package/lib/edge/blocks/form/select/select.qwik.mjs +8 -6
  177. package/lib/edge/blocks/form/submit-button/submit-button.qwik.cjs +7 -9
  178. package/lib/edge/blocks/form/submit-button/submit-button.qwik.mjs +8 -10
  179. package/lib/edge/blocks/form/textarea/textarea.qwik.cjs +11 -21
  180. package/lib/edge/blocks/form/textarea/textarea.qwik.mjs +12 -22
  181. package/lib/edge/blocks/fragment/fragment.qwik.cjs +6 -3
  182. package/lib/edge/blocks/fragment/fragment.qwik.mjs +7 -4
  183. package/lib/edge/blocks/image/component-info.qwik.cjs +6 -3
  184. package/lib/edge/blocks/image/component-info.qwik.mjs +6 -3
  185. package/lib/edge/blocks/image/image.helpers.qwik.cjs +12 -6
  186. package/lib/edge/blocks/image/image.helpers.qwik.mjs +12 -6
  187. package/lib/edge/blocks/image/image.qwik.cjs +63 -89
  188. package/lib/edge/blocks/image/image.qwik.mjs +63 -89
  189. package/lib/edge/blocks/img/img.qwik.cjs +12 -18
  190. package/lib/edge/blocks/img/img.qwik.mjs +12 -18
  191. package/lib/edge/blocks/section/section.qwik.cjs +7 -6
  192. package/lib/edge/blocks/section/section.qwik.mjs +8 -7
  193. package/lib/edge/blocks/slot/slot.qwik.cjs +17 -43
  194. package/lib/edge/blocks/slot/slot.qwik.mjs +17 -43
  195. package/lib/edge/blocks/symbol/symbol.helpers.qwik.cjs +2 -1
  196. package/lib/edge/blocks/symbol/symbol.helpers.qwik.mjs +2 -1
  197. package/lib/edge/blocks/symbol/symbol.qwik.cjs +45 -137
  198. package/lib/edge/blocks/symbol/symbol.qwik.mjs +45 -137
  199. package/lib/edge/blocks/tabs/tabs.qwik.cjs +45 -99
  200. package/lib/edge/blocks/tabs/tabs.qwik.mjs +45 -99
  201. package/lib/edge/blocks/text/text.qwik.cjs +11 -15
  202. package/lib/edge/blocks/text/text.qwik.mjs +11 -15
  203. package/lib/edge/blocks/video/video.qwik.cjs +73 -87
  204. package/lib/edge/blocks/video/video.qwik.mjs +74 -88
  205. package/lib/edge/components/awaiter.qwik.cjs +13 -0
  206. package/lib/edge/components/awaiter.qwik.mjs +13 -0
  207. package/lib/edge/components/block/animator.qwik.cjs +22 -11
  208. package/lib/edge/components/block/animator.qwik.mjs +22 -11
  209. package/lib/edge/components/block/block.helpers.qwik.cjs +8 -4
  210. package/lib/edge/components/block/block.helpers.qwik.mjs +8 -4
  211. package/lib/edge/components/block/block.qwik.cjs +114 -320
  212. package/lib/edge/components/block/block.qwik.mjs +115 -321
  213. package/lib/edge/components/block/components/block-styles.qwik.cjs +22 -39
  214. package/lib/edge/components/block/components/block-styles.qwik.mjs +23 -40
  215. package/lib/edge/components/block/components/block-wrapper.qwik.cjs +12 -18
  216. package/lib/edge/components/block/components/block-wrapper.qwik.mjs +12 -18
  217. package/lib/edge/components/block/components/component-ref/component-ref.qwik.cjs +12 -29
  218. package/lib/edge/components/block/components/component-ref/component-ref.qwik.mjs +14 -31
  219. package/lib/edge/components/block/components/interactive-element.qwik.cjs +28 -28
  220. package/lib/edge/components/block/components/interactive-element.qwik.mjs +28 -28
  221. package/lib/edge/components/block/components/repeated-block.qwik.cjs +10 -31
  222. package/lib/edge/components/block/components/repeated-block.qwik.mjs +11 -32
  223. package/lib/edge/components/blocks/blocks-wrapper.qwik.cjs +24 -72
  224. package/lib/edge/components/blocks/blocks-wrapper.qwik.mjs +24 -72
  225. package/lib/edge/components/blocks/blocks.qwik.cjs +19 -78
  226. package/lib/edge/components/blocks/blocks.qwik.mjs +20 -79
  227. package/lib/edge/components/content/components/enable-editor.qwik.cjs +89 -219
  228. package/lib/edge/components/content/components/enable-editor.qwik.mjs +89 -219
  229. package/lib/edge/components/content/components/styles.helpers.qwik.cjs +12 -6
  230. package/lib/edge/components/content/components/styles.helpers.qwik.mjs +12 -6
  231. package/lib/edge/components/content/components/styles.qwik.cjs +8 -20
  232. package/lib/edge/components/content/components/styles.qwik.mjs +8 -20
  233. package/lib/edge/components/content/content.helpers.qwik.cjs +2 -1
  234. package/lib/edge/components/content/content.helpers.qwik.mjs +2 -1
  235. package/lib/edge/components/content/content.qwik.cjs +65 -189
  236. package/lib/edge/components/content/content.qwik.mjs +65 -189
  237. package/lib/edge/components/content-variants/content-variants.qwik.cjs +74 -313
  238. package/lib/edge/components/content-variants/content-variants.qwik.mjs +75 -314
  239. package/lib/edge/components/dynamic-renderer/dynamic-renderer.qwik.cjs +11 -12
  240. package/lib/edge/components/dynamic-renderer/dynamic-renderer.qwik.mjs +12 -13
  241. package/lib/edge/components/inlined-script.qwik.cjs +8 -13
  242. package/lib/edge/components/inlined-script.qwik.mjs +9 -14
  243. package/lib/edge/components/inlined-styles.qwik.cjs +8 -13
  244. package/lib/edge/components/inlined-styles.qwik.mjs +9 -14
  245. package/lib/edge/constants/device-sizes.qwik.cjs +2 -1
  246. package/lib/edge/constants/device-sizes.qwik.mjs +2 -1
  247. package/lib/edge/constants/sdk-version.qwik.cjs +1 -1
  248. package/lib/edge/constants/sdk-version.qwik.mjs +1 -1
  249. package/lib/edge/functions/evaluate/browser-runtime/browser.qwik.cjs +1 -28
  250. package/lib/edge/functions/evaluate/browser-runtime/browser.qwik.mjs +1 -28
  251. package/lib/edge/functions/evaluate/choose-eval.qwik.cjs +3 -1
  252. package/lib/edge/functions/evaluate/choose-eval.qwik.mjs +3 -1
  253. package/lib/edge/functions/evaluate/edge-runtime/acorn-interpreter.qwik.cjs +6 -7
  254. package/lib/edge/functions/evaluate/edge-runtime/acorn-interpreter.qwik.mjs +6 -7
  255. package/lib/edge/functions/evaluate/edge-runtime/edge-runtime.qwik.cjs +63 -27
  256. package/lib/edge/functions/evaluate/edge-runtime/edge-runtime.qwik.mjs +64 -28
  257. package/lib/edge/functions/evaluate/evaluate.qwik.cjs +6 -3
  258. package/lib/edge/functions/evaluate/evaluate.qwik.mjs +6 -3
  259. package/lib/edge/functions/evaluate/helpers.qwik.cjs +30 -0
  260. package/lib/edge/functions/evaluate/helpers.qwik.mjs +30 -0
  261. package/lib/edge/functions/evaluate/should-force-browser-runtime-in-node.qwik.cjs +4 -2
  262. package/lib/edge/functions/evaluate/should-force-browser-runtime-in-node.qwik.mjs +4 -2
  263. package/lib/edge/functions/get-block-actions-handler.qwik.cjs +9 -15
  264. package/lib/edge/functions/get-block-actions-handler.qwik.mjs +10 -16
  265. package/lib/edge/functions/get-block-actions.qwik.cjs +4 -2
  266. package/lib/edge/functions/get-block-actions.qwik.mjs +4 -2
  267. package/lib/edge/functions/get-builder-search-params/index.qwik.cjs +4 -2
  268. package/lib/edge/functions/get-builder-search-params/index.qwik.mjs +4 -2
  269. package/lib/edge/functions/get-content/generate-content-url.qwik.cjs +22 -11
  270. package/lib/edge/functions/get-content/generate-content-url.qwik.mjs +22 -11
  271. package/lib/edge/functions/get-content/index.qwik.cjs +4 -2
  272. package/lib/edge/functions/get-content/index.qwik.mjs +4 -2
  273. package/lib/edge/functions/get-global-this.qwik.cjs +8 -4
  274. package/lib/edge/functions/get-global-this.qwik.mjs +8 -4
  275. package/lib/edge/functions/get-processed-block.qwik.cjs +15 -8
  276. package/lib/edge/functions/get-processed-block.qwik.mjs +15 -8
  277. package/lib/edge/functions/is-from-trusted-host.qwik.cjs +2 -1
  278. package/lib/edge/functions/is-from-trusted-host.qwik.mjs +2 -1
  279. package/lib/edge/functions/is-previewing.qwik.cjs +2 -1
  280. package/lib/edge/functions/is-previewing.qwik.mjs +2 -1
  281. package/lib/edge/functions/register-component.qwik.cjs +2 -1
  282. package/lib/edge/functions/register-component.qwik.mjs +2 -1
  283. package/lib/edge/functions/register.qwik.cjs +6 -3
  284. package/lib/edge/functions/register.qwik.mjs +6 -3
  285. package/lib/edge/functions/set.qwik.cjs +2 -1
  286. package/lib/edge/functions/set.qwik.mjs +2 -1
  287. package/lib/edge/functions/track/helpers.qwik.cjs +2 -1
  288. package/lib/edge/functions/track/helpers.qwik.mjs +2 -1
  289. package/lib/edge/functions/track/index.qwik.cjs +8 -4
  290. package/lib/edge/functions/track/index.qwik.mjs +8 -4
  291. package/lib/edge/functions/track/interaction.qwik.cjs +6 -3
  292. package/lib/edge/functions/track/interaction.qwik.mjs +6 -3
  293. package/lib/edge/helpers/ab-tests.qwik.cjs +15 -8
  294. package/lib/edge/helpers/ab-tests.qwik.mjs +16 -9
  295. package/lib/edge/helpers/cookie.qwik.cjs +4 -2
  296. package/lib/edge/helpers/cookie.qwik.mjs +4 -2
  297. package/lib/edge/helpers/css.qwik.cjs +6 -4
  298. package/lib/edge/helpers/css.qwik.mjs +6 -4
  299. package/lib/edge/helpers/flatten.qwik.cjs +3 -2
  300. package/lib/edge/helpers/flatten.qwik.mjs +3 -2
  301. package/lib/edge/helpers/localStorage.qwik.cjs +4 -2
  302. package/lib/edge/helpers/localStorage.qwik.mjs +4 -2
  303. package/lib/edge/helpers/omit.qwik.cjs +2 -1
  304. package/lib/edge/helpers/omit.qwik.mjs +2 -1
  305. package/lib/edge/helpers/search/search.qwik.cjs +3 -2
  306. package/lib/edge/helpers/search/search.qwik.mjs +3 -2
  307. package/lib/edge/helpers/sessionId.qwik.cjs +4 -3
  308. package/lib/edge/helpers/sessionId.qwik.mjs +4 -3
  309. package/lib/edge/helpers/subscribe-to-editor.qwik.cjs +10 -5
  310. package/lib/edge/helpers/subscribe-to-editor.qwik.mjs +10 -5
  311. package/lib/edge/helpers/url.qwik.cjs +4 -2
  312. package/lib/edge/helpers/url.qwik.mjs +4 -2
  313. package/lib/edge/helpers/visitorId.qwik.cjs +4 -3
  314. package/lib/edge/helpers/visitorId.qwik.mjs +4 -3
  315. package/lib/edge/scripts/init-editing.qwik.cjs +25 -19
  316. package/lib/edge/scripts/init-editing.qwik.mjs +25 -19
  317. package/lib/node/blocks/accordion/accordion.qwik.cjs +74 -143
  318. package/lib/node/blocks/accordion/accordion.qwik.mjs +74 -143
  319. package/lib/node/blocks/accordion/component-info.qwik.cjs +2 -1
  320. package/lib/node/blocks/accordion/component-info.qwik.mjs +2 -1
  321. package/lib/node/blocks/button/button.qwik.cjs +8 -17
  322. package/lib/node/blocks/button/button.qwik.mjs +8 -17
  323. package/lib/node/blocks/columns/columns.qwik.cjs +33 -67
  324. package/lib/node/blocks/columns/columns.qwik.mjs +33 -67
  325. package/lib/node/blocks/columns/component-info.qwik.cjs +4 -3
  326. package/lib/node/blocks/columns/component-info.qwik.mjs +4 -3
  327. package/lib/node/blocks/custom-code/custom-code.qwik.cjs +18 -22
  328. package/lib/node/blocks/custom-code/custom-code.qwik.mjs +19 -23
  329. package/lib/node/blocks/embed/embed.qwik.cjs +17 -23
  330. package/lib/node/blocks/embed/embed.qwik.mjs +17 -23
  331. package/lib/node/blocks/form/form/form.qwik.cjs +74 -128
  332. package/lib/node/blocks/form/form/form.qwik.mjs +75 -129
  333. package/lib/node/blocks/form/input/input.qwik.cjs +2 -2
  334. package/lib/node/blocks/form/input/input.qwik.mjs +3 -3
  335. package/lib/node/blocks/form/select/select.qwik.cjs +7 -5
  336. package/lib/node/blocks/form/select/select.qwik.mjs +8 -6
  337. package/lib/node/blocks/form/submit-button/submit-button.qwik.cjs +7 -9
  338. package/lib/node/blocks/form/submit-button/submit-button.qwik.mjs +8 -10
  339. package/lib/node/blocks/form/textarea/textarea.qwik.cjs +11 -21
  340. package/lib/node/blocks/form/textarea/textarea.qwik.mjs +12 -22
  341. package/lib/node/blocks/fragment/fragment.qwik.cjs +6 -3
  342. package/lib/node/blocks/fragment/fragment.qwik.mjs +7 -4
  343. package/lib/node/blocks/image/component-info.qwik.cjs +6 -3
  344. package/lib/node/blocks/image/component-info.qwik.mjs +6 -3
  345. package/lib/node/blocks/image/image.helpers.qwik.cjs +12 -6
  346. package/lib/node/blocks/image/image.helpers.qwik.mjs +12 -6
  347. package/lib/node/blocks/image/image.qwik.cjs +63 -89
  348. package/lib/node/blocks/image/image.qwik.mjs +63 -89
  349. package/lib/node/blocks/img/img.qwik.cjs +12 -18
  350. package/lib/node/blocks/img/img.qwik.mjs +12 -18
  351. package/lib/node/blocks/section/section.qwik.cjs +7 -6
  352. package/lib/node/blocks/section/section.qwik.mjs +8 -7
  353. package/lib/node/blocks/slot/slot.qwik.cjs +17 -43
  354. package/lib/node/blocks/slot/slot.qwik.mjs +17 -43
  355. package/lib/node/blocks/symbol/symbol.helpers.qwik.cjs +2 -1
  356. package/lib/node/blocks/symbol/symbol.helpers.qwik.mjs +2 -1
  357. package/lib/node/blocks/symbol/symbol.qwik.cjs +45 -137
  358. package/lib/node/blocks/symbol/symbol.qwik.mjs +45 -137
  359. package/lib/node/blocks/tabs/tabs.qwik.cjs +45 -99
  360. package/lib/node/blocks/tabs/tabs.qwik.mjs +45 -99
  361. package/lib/node/blocks/text/text.qwik.cjs +11 -15
  362. package/lib/node/blocks/text/text.qwik.mjs +11 -15
  363. package/lib/node/blocks/video/video.qwik.cjs +73 -87
  364. package/lib/node/blocks/video/video.qwik.mjs +74 -88
  365. package/lib/node/components/awaiter.qwik.cjs +13 -0
  366. package/lib/node/components/awaiter.qwik.mjs +13 -0
  367. package/lib/node/components/block/animator.qwik.cjs +22 -11
  368. package/lib/node/components/block/animator.qwik.mjs +22 -11
  369. package/lib/node/components/block/block.helpers.qwik.cjs +8 -4
  370. package/lib/node/components/block/block.helpers.qwik.mjs +8 -4
  371. package/lib/node/components/block/block.qwik.cjs +114 -320
  372. package/lib/node/components/block/block.qwik.mjs +115 -321
  373. package/lib/node/components/block/components/block-styles.qwik.cjs +22 -39
  374. package/lib/node/components/block/components/block-styles.qwik.mjs +23 -40
  375. package/lib/node/components/block/components/block-wrapper.qwik.cjs +12 -18
  376. package/lib/node/components/block/components/block-wrapper.qwik.mjs +12 -18
  377. package/lib/node/components/block/components/component-ref/component-ref.qwik.cjs +12 -29
  378. package/lib/node/components/block/components/component-ref/component-ref.qwik.mjs +14 -31
  379. package/lib/node/components/block/components/interactive-element.qwik.cjs +28 -28
  380. package/lib/node/components/block/components/interactive-element.qwik.mjs +28 -28
  381. package/lib/node/components/block/components/repeated-block.qwik.cjs +10 -31
  382. package/lib/node/components/block/components/repeated-block.qwik.mjs +11 -32
  383. package/lib/node/components/blocks/blocks-wrapper.qwik.cjs +24 -72
  384. package/lib/node/components/blocks/blocks-wrapper.qwik.mjs +24 -72
  385. package/lib/node/components/blocks/blocks.qwik.cjs +19 -78
  386. package/lib/node/components/blocks/blocks.qwik.mjs +20 -79
  387. package/lib/node/components/content/components/enable-editor.qwik.cjs +89 -219
  388. package/lib/node/components/content/components/enable-editor.qwik.mjs +89 -219
  389. package/lib/node/components/content/components/styles.helpers.qwik.cjs +12 -6
  390. package/lib/node/components/content/components/styles.helpers.qwik.mjs +12 -6
  391. package/lib/node/components/content/components/styles.qwik.cjs +8 -20
  392. package/lib/node/components/content/components/styles.qwik.mjs +8 -20
  393. package/lib/node/components/content/content.helpers.qwik.cjs +2 -1
  394. package/lib/node/components/content/content.helpers.qwik.mjs +2 -1
  395. package/lib/node/components/content/content.qwik.cjs +65 -189
  396. package/lib/node/components/content/content.qwik.mjs +65 -189
  397. package/lib/node/components/content-variants/content-variants.qwik.cjs +74 -313
  398. package/lib/node/components/content-variants/content-variants.qwik.mjs +75 -314
  399. package/lib/node/components/dynamic-renderer/dynamic-renderer.qwik.cjs +11 -12
  400. package/lib/node/components/dynamic-renderer/dynamic-renderer.qwik.mjs +12 -13
  401. package/lib/node/components/inlined-script.qwik.cjs +8 -13
  402. package/lib/node/components/inlined-script.qwik.mjs +9 -14
  403. package/lib/node/components/inlined-styles.qwik.cjs +8 -13
  404. package/lib/node/components/inlined-styles.qwik.mjs +9 -14
  405. package/lib/node/constants/device-sizes.qwik.cjs +2 -1
  406. package/lib/node/constants/device-sizes.qwik.mjs +2 -1
  407. package/lib/node/constants/sdk-version.qwik.cjs +1 -1
  408. package/lib/node/constants/sdk-version.qwik.mjs +1 -1
  409. package/lib/node/functions/evaluate/browser-runtime/browser.qwik.cjs +1 -28
  410. package/lib/node/functions/evaluate/browser-runtime/browser.qwik.mjs +1 -28
  411. package/lib/node/functions/evaluate/choose-eval.qwik.cjs +3 -1
  412. package/lib/node/functions/evaluate/choose-eval.qwik.mjs +3 -1
  413. package/lib/node/functions/evaluate/evaluate.qwik.cjs +6 -3
  414. package/lib/node/functions/evaluate/evaluate.qwik.mjs +6 -3
  415. package/lib/node/functions/evaluate/helpers.qwik.cjs +30 -0
  416. package/lib/node/functions/evaluate/helpers.qwik.mjs +30 -0
  417. package/lib/node/functions/evaluate/node-runtime/init.qwik.cjs +6 -0
  418. package/lib/node/functions/evaluate/node-runtime/init.qwik.mjs +6 -0
  419. package/lib/node/functions/evaluate/node-runtime/node-runtime.qwik.cjs +1 -1
  420. package/lib/node/functions/evaluate/node-runtime/node-runtime.qwik.mjs +1 -1
  421. package/lib/node/functions/evaluate/should-force-browser-runtime-in-node.qwik.cjs +4 -2
  422. package/lib/node/functions/evaluate/should-force-browser-runtime-in-node.qwik.mjs +4 -2
  423. package/lib/node/functions/get-block-actions-handler.qwik.cjs +9 -15
  424. package/lib/node/functions/get-block-actions-handler.qwik.mjs +10 -16
  425. package/lib/node/functions/get-block-actions.qwik.cjs +4 -2
  426. package/lib/node/functions/get-block-actions.qwik.mjs +4 -2
  427. package/lib/node/functions/get-builder-search-params/index.qwik.cjs +4 -2
  428. package/lib/node/functions/get-builder-search-params/index.qwik.mjs +4 -2
  429. package/lib/node/functions/get-content/generate-content-url.qwik.cjs +22 -11
  430. package/lib/node/functions/get-content/generate-content-url.qwik.mjs +22 -11
  431. package/lib/node/functions/get-content/index.qwik.cjs +4 -2
  432. package/lib/node/functions/get-content/index.qwik.mjs +4 -2
  433. package/lib/node/functions/get-global-this.qwik.cjs +8 -4
  434. package/lib/node/functions/get-global-this.qwik.mjs +8 -4
  435. package/lib/node/functions/get-processed-block.qwik.cjs +15 -8
  436. package/lib/node/functions/get-processed-block.qwik.mjs +15 -8
  437. package/lib/node/functions/is-from-trusted-host.qwik.cjs +2 -1
  438. package/lib/node/functions/is-from-trusted-host.qwik.mjs +2 -1
  439. package/lib/node/functions/is-previewing.qwik.cjs +2 -1
  440. package/lib/node/functions/is-previewing.qwik.mjs +2 -1
  441. package/lib/node/functions/register-component.qwik.cjs +2 -1
  442. package/lib/node/functions/register-component.qwik.mjs +2 -1
  443. package/lib/node/functions/register.qwik.cjs +6 -3
  444. package/lib/node/functions/register.qwik.mjs +6 -3
  445. package/lib/node/functions/set.qwik.cjs +2 -1
  446. package/lib/node/functions/set.qwik.mjs +2 -1
  447. package/lib/node/functions/track/helpers.qwik.cjs +2 -1
  448. package/lib/node/functions/track/helpers.qwik.mjs +2 -1
  449. package/lib/node/functions/track/index.qwik.cjs +8 -4
  450. package/lib/node/functions/track/index.qwik.mjs +8 -4
  451. package/lib/node/functions/track/interaction.qwik.cjs +6 -3
  452. package/lib/node/functions/track/interaction.qwik.mjs +6 -3
  453. package/lib/node/helpers/ab-tests.qwik.cjs +15 -8
  454. package/lib/node/helpers/ab-tests.qwik.mjs +16 -9
  455. package/lib/node/helpers/cookie.qwik.cjs +4 -2
  456. package/lib/node/helpers/cookie.qwik.mjs +4 -2
  457. package/lib/node/helpers/css.qwik.cjs +6 -4
  458. package/lib/node/helpers/css.qwik.mjs +6 -4
  459. package/lib/node/helpers/flatten.qwik.cjs +3 -2
  460. package/lib/node/helpers/flatten.qwik.mjs +3 -2
  461. package/lib/node/helpers/localStorage.qwik.cjs +4 -2
  462. package/lib/node/helpers/localStorage.qwik.mjs +4 -2
  463. package/lib/node/helpers/omit.qwik.cjs +2 -1
  464. package/lib/node/helpers/omit.qwik.mjs +2 -1
  465. package/lib/node/helpers/search/search.qwik.cjs +3 -2
  466. package/lib/node/helpers/search/search.qwik.mjs +3 -2
  467. package/lib/node/helpers/sessionId.qwik.cjs +4 -3
  468. package/lib/node/helpers/sessionId.qwik.mjs +4 -3
  469. package/lib/node/helpers/subscribe-to-editor.qwik.cjs +10 -5
  470. package/lib/node/helpers/subscribe-to-editor.qwik.mjs +10 -5
  471. package/lib/node/helpers/url.qwik.cjs +4 -2
  472. package/lib/node/helpers/url.qwik.mjs +4 -2
  473. package/lib/node/helpers/visitorId.qwik.cjs +4 -3
  474. package/lib/node/helpers/visitorId.qwik.mjs +4 -3
  475. package/lib/node/scripts/init-editing.qwik.cjs +25 -19
  476. package/lib/node/scripts/init-editing.qwik.mjs +25 -19
  477. package/package.json +2 -2
  478. package/types/src/components/awaiter.d.ts +13 -0
  479. package/types/src/components/content/components/enable-editor.d.ts +0 -1
  480. package/types/src/constants/sdk-version.d.ts +1 -1
  481. package/types/src/context/component-reference-types.d.ts +4 -0
  482. package/types/src/context/types.d.ts +2 -1
  483. package/types/src/functions/evaluate/browser-runtime/browser.d.ts +0 -6
  484. package/types/src/functions/evaluate/helpers.d.ts +5 -0
  485. package/types/src/functions/evaluate/should-force-browser-runtime-in-node.d.ts +3 -1
  486. package/lib/browser/constants/sdk-name.qwik.cjs +0 -15
  487. package/lib/browser/constants/sdk-name.qwik.mjs +0 -15
  488. package/lib/browser/functions/evaluate/node-runtime/init.qwik.cjs +0 -9
  489. package/lib/browser/functions/evaluate/node-runtime/init.qwik.mjs +0 -9
  490. package/lib/browser/functions/evaluate/node-runtime/node-runtime.qwik.cjs +0 -47
  491. package/lib/browser/functions/evaluate/node-runtime/node-runtime.qwik.mjs +0 -47
  492. package/lib/browser/functions/evaluate/node-runtime/safeDynamicRequire.qwik.cjs +0 -15
  493. package/lib/browser/functions/evaluate/node-runtime/safeDynamicRequire.qwik.mjs +0 -15
  494. package/lib/edge/constants/sdk-name.qwik.cjs +0 -15
  495. package/lib/edge/constants/sdk-name.qwik.mjs +0 -15
  496. package/lib/edge/functions/evaluate/node-runtime/init.qwik.cjs +0 -9
  497. package/lib/edge/functions/evaluate/node-runtime/init.qwik.mjs +0 -9
  498. package/lib/edge/functions/evaluate/node-runtime/node-runtime.qwik.cjs +0 -47
  499. package/lib/edge/functions/evaluate/node-runtime/node-runtime.qwik.mjs +0 -47
  500. package/lib/edge/functions/evaluate/node-runtime/safeDynamicRequire.qwik.cjs +0 -15
  501. package/lib/edge/functions/evaluate/node-runtime/safeDynamicRequire.qwik.mjs +0 -15
@@ -8,11 +8,12 @@ const isBrowser = require("../is-browser.qwik.cjs");
8
8
  const isEditing = require("../is-editing.qwik.cjs");
9
9
  const helpers = require("./helpers.qwik.cjs");
10
10
  const getTrackingEventData = async ({ canTrack }) => {
11
- if (!canTrack)
11
+ if (!canTrack) {
12
12
  return {
13
13
  visitorId: void 0,
14
14
  sessionId: void 0
15
15
  };
16
+ }
16
17
  const sessionId$1 = await sessionId.getSessionId({
17
18
  canTrack
18
19
  });
@@ -44,12 +45,15 @@ async function _track(eventProps) {
44
45
  logger.logger.error("Missing API key for track call. Please provide your API key.");
45
46
  return;
46
47
  }
47
- if (!eventProps.canTrack)
48
+ if (!eventProps.canTrack) {
48
49
  return;
49
- if (isEditing.isEditing())
50
+ }
51
+ if (isEditing.isEditing()) {
50
52
  return;
51
- if (!(isBrowser.isBrowser() || target.TARGET === "reactNative"))
53
+ }
54
+ if (!(isBrowser.isBrowser() || target.TARGET === "reactNative")) {
52
55
  return;
56
+ }
53
57
  return fetch(`https://cdn.builder.io/api/v1/track`, {
54
58
  method: "POST",
55
59
  body: JSON.stringify({
@@ -6,11 +6,12 @@ import { isBrowser } from "../is-browser.qwik.mjs";
6
6
  import { isEditing } from "../is-editing.qwik.mjs";
7
7
  import { getUserAttributes } from "./helpers.qwik.mjs";
8
8
  const getTrackingEventData = async ({ canTrack }) => {
9
- if (!canTrack)
9
+ if (!canTrack) {
10
10
  return {
11
11
  visitorId: void 0,
12
12
  sessionId: void 0
13
13
  };
14
+ }
14
15
  const sessionId = await getSessionId({
15
16
  canTrack
16
17
  });
@@ -42,12 +43,15 @@ async function _track(eventProps) {
42
43
  logger.error("Missing API key for track call. Please provide your API key.");
43
44
  return;
44
45
  }
45
- if (!eventProps.canTrack)
46
+ if (!eventProps.canTrack) {
46
47
  return;
47
- if (isEditing())
48
+ }
49
+ if (isEditing()) {
48
50
  return;
49
- if (!(isBrowser() || TARGET === "reactNative"))
51
+ }
52
+ if (!(isBrowser() || TARGET === "reactNative")) {
50
53
  return;
54
+ }
51
55
  return fetch(`https://cdn.builder.io/api/v1/track`, {
52
56
  method: "POST",
53
57
  body: JSON.stringify({
@@ -4,15 +4,18 @@ function round(num) {
4
4
  return Math.round(num * 1e3) / 1e3;
5
5
  }
6
6
  const findParentElement = (target, callback, checkElement = true) => {
7
- if (!(target instanceof HTMLElement))
7
+ if (!(target instanceof HTMLElement)) {
8
8
  return null;
9
+ }
9
10
  let parent = checkElement ? target : target.parentElement;
10
11
  do {
11
- if (!parent)
12
+ if (!parent) {
12
13
  return null;
14
+ }
13
15
  const matches = callback(parent);
14
- if (matches)
16
+ if (matches) {
15
17
  return parent;
18
+ }
16
19
  } while (parent = parent.parentElement);
17
20
  return null;
18
21
  };
@@ -2,15 +2,18 @@ function round(num) {
2
2
  return Math.round(num * 1e3) / 1e3;
3
3
  }
4
4
  const findParentElement = (target, callback, checkElement = true) => {
5
- if (!(target instanceof HTMLElement))
5
+ if (!(target instanceof HTMLElement)) {
6
6
  return null;
7
+ }
7
8
  let parent = checkElement ? target : target.parentElement;
8
9
  do {
9
- if (!parent)
10
+ if (!parent) {
10
11
  return null;
12
+ }
11
13
  const matches = callback(parent);
12
- if (matches)
14
+ if (matches) {
13
15
  return parent;
16
+ }
14
17
  } while (parent = parent.parentElement);
15
18
  return null;
16
19
  };
@@ -26,8 +26,9 @@ const getRandomVariationId = ({ id, variations }) => {
26
26
  for (const id2 in variations) {
27
27
  const testRatio = (_a = variations[id2]) == null ? void 0 : _a.testRatio;
28
28
  n += testRatio;
29
- if (random < n)
29
+ if (random < n) {
30
30
  return id2;
31
+ }
31
32
  }
32
33
  return id;
33
34
  };
@@ -44,25 +45,29 @@ const getAndSetVariantId = (args) => {
44
45
  const getTestFields = ({ item, testGroupId }) => {
45
46
  const variationValue = item.variations[testGroupId];
46
47
  if (testGroupId === item.id || // handle edge-case where `testGroupId` points to non-existing variation
47
- !variationValue)
48
+ !variationValue) {
48
49
  return {
49
50
  testVariationId: item.id,
50
51
  testVariationName: "Default"
51
52
  };
52
- else
53
+ } else {
53
54
  return {
54
55
  data: variationValue.data,
55
56
  testVariationId: variationValue.id,
56
57
  testVariationName: variationValue.name || (variationValue.id === item.id ? "Default" : "")
57
58
  };
59
+ }
58
60
  };
59
61
  const handleABTestingSync = ({ item, canTrack }) => {
60
- if (!canTrack)
62
+ if (!canTrack) {
61
63
  return item;
62
- if (!item)
64
+ }
65
+ if (!item) {
63
66
  return void 0;
64
- if (!checkIsBuilderContentWithVariations(item))
67
+ }
68
+ if (!checkIsBuilderContentWithVariations(item)) {
65
69
  return item;
70
+ }
66
71
  const testGroupId = getContentVariationCookieSync({
67
72
  contentId: item.id
68
73
  }) || getAndSetVariantId({
@@ -79,10 +84,12 @@ const handleABTestingSync = ({ item, canTrack }) => {
79
84
  };
80
85
  };
81
86
  const handleABTesting = async ({ item, canTrack }) => {
82
- if (!canTrack)
87
+ if (!canTrack) {
83
88
  return item;
84
- if (!checkIsBuilderContentWithVariations(item))
89
+ }
90
+ if (!checkIsBuilderContentWithVariations(item)) {
85
91
  return item;
92
+ }
86
93
  const cookieValue = await getContentVariationCookie({
87
94
  contentId: item.id
88
95
  });
@@ -1,5 +1,5 @@
1
1
  import { checkIsDefined } from "./nullable.qwik.mjs";
2
- import { getCookie, getCookieSync, setCookie } from "./cookie.qwik.mjs";
2
+ import { getCookieSync, getCookie, setCookie } from "./cookie.qwik.mjs";
3
3
  import { logger } from "./logger.qwik.mjs";
4
4
  const BUILDER_STORE_PREFIX = "builder.tests";
5
5
  const getContentTestKey = (id) => `${BUILDER_STORE_PREFIX}.${id}`;
@@ -24,8 +24,9 @@ const getRandomVariationId = ({ id, variations }) => {
24
24
  for (const id2 in variations) {
25
25
  const testRatio = (_a = variations[id2]) == null ? void 0 : _a.testRatio;
26
26
  n += testRatio;
27
- if (random < n)
27
+ if (random < n) {
28
28
  return id2;
29
+ }
29
30
  }
30
31
  return id;
31
32
  };
@@ -42,25 +43,29 @@ const getAndSetVariantId = (args) => {
42
43
  const getTestFields = ({ item, testGroupId }) => {
43
44
  const variationValue = item.variations[testGroupId];
44
45
  if (testGroupId === item.id || // handle edge-case where `testGroupId` points to non-existing variation
45
- !variationValue)
46
+ !variationValue) {
46
47
  return {
47
48
  testVariationId: item.id,
48
49
  testVariationName: "Default"
49
50
  };
50
- else
51
+ } else {
51
52
  return {
52
53
  data: variationValue.data,
53
54
  testVariationId: variationValue.id,
54
55
  testVariationName: variationValue.name || (variationValue.id === item.id ? "Default" : "")
55
56
  };
57
+ }
56
58
  };
57
59
  const handleABTestingSync = ({ item, canTrack }) => {
58
- if (!canTrack)
60
+ if (!canTrack) {
59
61
  return item;
60
- if (!item)
62
+ }
63
+ if (!item) {
61
64
  return void 0;
62
- if (!checkIsBuilderContentWithVariations(item))
65
+ }
66
+ if (!checkIsBuilderContentWithVariations(item)) {
63
67
  return item;
68
+ }
64
69
  const testGroupId = getContentVariationCookieSync({
65
70
  contentId: item.id
66
71
  }) || getAndSetVariantId({
@@ -77,10 +82,12 @@ const handleABTestingSync = ({ item, canTrack }) => {
77
82
  };
78
83
  };
79
84
  const handleABTesting = async ({ item, canTrack }) => {
80
- if (!canTrack)
85
+ if (!canTrack) {
81
86
  return item;
82
- if (!checkIsBuilderContentWithVariations(item))
87
+ }
88
+ if (!checkIsBuilderContentWithVariations(item)) {
83
89
  return item;
90
+ }
84
91
  const cookieValue = await getContentVariationCookie({
85
92
  contentId: item.id
86
93
  });
@@ -7,8 +7,9 @@ const url = require("./url.qwik.cjs");
7
7
  const getCookieSync = ({ name, canTrack }) => {
8
8
  var _a;
9
9
  try {
10
- if (!canTrack)
10
+ if (!canTrack) {
11
11
  return void 0;
12
+ }
12
13
  return (_a = document.cookie.split("; ").find((row) => row.startsWith(`${name}=`))) == null ? void 0 : _a.split("=")[1];
13
14
  } catch (err) {
14
15
  logger.logger.warn("[COOKIE] GET error: ", (err == null ? void 0 : err.message) || err);
@@ -61,8 +62,9 @@ const createCookieString = ({ name, value, expires }) => {
61
62
  };
62
63
  const setCookie = async ({ name, value, expires, canTrack }) => {
63
64
  try {
64
- if (!canTrack)
65
+ if (!canTrack) {
65
66
  return;
67
+ }
66
68
  const cookie = createCookieString({
67
69
  name,
68
70
  value,
@@ -5,8 +5,9 @@ import { getTopLevelDomain } from "./url.qwik.mjs";
5
5
  const getCookieSync = ({ name, canTrack }) => {
6
6
  var _a;
7
7
  try {
8
- if (!canTrack)
8
+ if (!canTrack) {
9
9
  return void 0;
10
+ }
10
11
  return (_a = document.cookie.split("; ").find((row) => row.startsWith(`${name}=`))) == null ? void 0 : _a.split("=")[1];
11
12
  } catch (err) {
12
13
  logger.warn("[COOKIE] GET error: ", (err == null ? void 0 : err.message) || err);
@@ -59,8 +60,9 @@ const createCookieString = ({ name, value, expires }) => {
59
60
  };
60
61
  const setCookie = async ({ name, value, expires, canTrack }) => {
61
62
  try {
62
- if (!canTrack)
63
+ if (!canTrack) {
63
64
  return;
65
+ }
64
66
  const cookie = createCookieString({
65
67
  name,
66
68
  value,
@@ -4,10 +4,11 @@ const camelToKebabCase = require("../functions/camel-to-kebab-case.qwik.cjs");
4
4
  const nullable = require("./nullable.qwik.cjs");
5
5
  const convertStyleMapToCSSArray = (style) => {
6
6
  const cssProps = Object.entries(style).map(([key, value]) => {
7
- if (typeof value === "string")
7
+ if (typeof value === "string") {
8
8
  return `${camelToKebabCase.camelToKebabCase(key)}: ${value};`;
9
- else
9
+ } else {
10
10
  return void 0;
11
+ }
11
12
  });
12
13
  return cssProps.filter(nullable.checkIsDefined);
13
14
  };
@@ -16,12 +17,13 @@ const createCssClass = ({ mediaQuery, className, styles }) => {
16
17
  const cssClass = `.${className} {
17
18
  ${convertStyleMapToCSS(styles)}
18
19
  }`;
19
- if (mediaQuery)
20
+ if (mediaQuery) {
20
21
  return `${mediaQuery} {
21
22
  ${cssClass}
22
23
  }`;
23
- else
24
+ } else {
24
25
  return cssClass;
26
+ }
25
27
  };
26
28
  exports.convertStyleMapToCSS = convertStyleMapToCSS;
27
29
  exports.convertStyleMapToCSSArray = convertStyleMapToCSSArray;
@@ -2,10 +2,11 @@ import { camelToKebabCase } from "../functions/camel-to-kebab-case.qwik.mjs";
2
2
  import { checkIsDefined } from "./nullable.qwik.mjs";
3
3
  const convertStyleMapToCSSArray = (style) => {
4
4
  const cssProps = Object.entries(style).map(([key, value]) => {
5
- if (typeof value === "string")
5
+ if (typeof value === "string") {
6
6
  return `${camelToKebabCase(key)}: ${value};`;
7
- else
7
+ } else {
8
8
  return void 0;
9
+ }
9
10
  });
10
11
  return cssProps.filter(checkIsDefined);
11
12
  };
@@ -14,12 +15,13 @@ const createCssClass = ({ mediaQuery, className, styles }) => {
14
15
  const cssClass = `.${className} {
15
16
  ${convertStyleMapToCSS(styles)}
16
17
  }`;
17
- if (mediaQuery)
18
+ if (mediaQuery) {
18
19
  return `${mediaQuery} {
19
20
  ${cssClass}
20
21
  }`;
21
- else
22
+ } else {
22
23
  return cssClass;
24
+ }
23
25
  };
24
26
  export {
25
27
  convertStyleMapToCSS,
@@ -25,10 +25,11 @@ function flattenMongoQuery(obj, _current, _res = {}) {
25
25
  for (const key in obj) {
26
26
  const value = obj[key];
27
27
  const newKey = _current ? _current + "." + key : key;
28
- if (value && typeof value === "object" && !Array.isArray(value) && !Object.keys(value).find((item) => item.startsWith("$")))
28
+ if (value && typeof value === "object" && !Array.isArray(value) && !Object.keys(value).find((item) => item.startsWith("$"))) {
29
29
  flattenMongoQuery(value, newKey, _res);
30
- else
30
+ } else {
31
31
  _res[newKey] = value;
32
+ }
32
33
  }
33
34
  return _res;
34
35
  }
@@ -23,10 +23,11 @@ function flattenMongoQuery(obj, _current, _res = {}) {
23
23
  for (const key in obj) {
24
24
  const value = obj[key];
25
25
  const newKey = _current ? _current + "." + key : key;
26
- if (value && typeof value === "object" && !Array.isArray(value) && !Object.keys(value).find((item) => item.startsWith("$")))
26
+ if (value && typeof value === "object" && !Array.isArray(value) && !Object.keys(value).find((item) => item.startsWith("$"))) {
27
27
  flattenMongoQuery(value, newKey, _res);
28
- else
28
+ } else {
29
29
  _res[newKey] = value;
30
+ }
30
31
  }
31
32
  return _res;
32
33
  }
@@ -5,8 +5,9 @@ const getLocalStorage = () => isBrowser.isBrowser() && typeof localStorage !== "
5
5
  const getLocalStorageItem = ({ key, canTrack }) => {
6
6
  var _a;
7
7
  try {
8
- if (canTrack)
8
+ if (canTrack) {
9
9
  return (_a = getLocalStorage()) == null ? void 0 : _a.getItem(key);
10
+ }
10
11
  return void 0;
11
12
  } catch (err) {
12
13
  console.debug("[LocalStorage] GET error: ", err);
@@ -16,8 +17,9 @@ const getLocalStorageItem = ({ key, canTrack }) => {
16
17
  const setLocalStorageItem = ({ key, canTrack, value }) => {
17
18
  var _a;
18
19
  try {
19
- if (canTrack)
20
+ if (canTrack) {
20
21
  (_a = getLocalStorage()) == null ? void 0 : _a.setItem(key, value);
22
+ }
21
23
  } catch (err) {
22
24
  console.debug("[LocalStorage] SET error: ", err);
23
25
  }
@@ -3,8 +3,9 @@ const getLocalStorage = () => isBrowser() && typeof localStorage !== "undefined"
3
3
  const getLocalStorageItem = ({ key, canTrack }) => {
4
4
  var _a;
5
5
  try {
6
- if (canTrack)
6
+ if (canTrack) {
7
7
  return (_a = getLocalStorage()) == null ? void 0 : _a.getItem(key);
8
+ }
8
9
  return void 0;
9
10
  } catch (err) {
10
11
  console.debug("[LocalStorage] GET error: ", err);
@@ -14,8 +15,9 @@ const getLocalStorageItem = ({ key, canTrack }) => {
14
15
  const setLocalStorageItem = ({ key, canTrack, value }) => {
15
16
  var _a;
16
17
  try {
17
- if (canTrack)
18
+ if (canTrack) {
18
19
  (_a = getLocalStorage()) == null ? void 0 : _a.setItem(key, value);
20
+ }
19
21
  } catch (err) {
20
22
  console.debug("[LocalStorage] SET error: ", err);
21
23
  }
@@ -2,8 +2,9 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  function omit(obj, ...values) {
4
4
  const newObject = Object.assign({}, obj);
5
- for (const key of values)
5
+ for (const key of values) {
6
6
  delete newObject[key];
7
+ }
7
8
  return newObject;
8
9
  }
9
10
  exports.omit = omit;
@@ -1,7 +1,8 @@
1
1
  function omit(obj, ...values) {
2
2
  const newObject = Object.assign({}, obj);
3
- for (const key of values)
3
+ for (const key of values) {
4
4
  delete newObject[key];
5
+ }
5
6
  return newObject;
6
7
  }
7
8
  export {
@@ -9,10 +9,11 @@ const convertSearchParamsToQueryObject = (searchParams) => {
9
9
  };
10
10
  const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams ? convertSearchParamsToQueryObject(searchParams) : searchParams;
11
11
  const getSearchString = (search) => {
12
- if (typeof search === "string")
12
+ if (typeof search === "string") {
13
13
  return search;
14
- else if (search instanceof URLSearchParams)
14
+ } else if (search instanceof URLSearchParams) {
15
15
  return search.toString();
16
+ }
16
17
  return new URLSearchParams(search).toString();
17
18
  };
18
19
  exports.convertSearchParamsToQueryObject = convertSearchParamsToQueryObject;
@@ -7,10 +7,11 @@ const convertSearchParamsToQueryObject = (searchParams) => {
7
7
  };
8
8
  const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams ? convertSearchParamsToQueryObject(searchParams) : searchParams;
9
9
  const getSearchString = (search) => {
10
- if (typeof search === "string")
10
+ if (typeof search === "string") {
11
11
  return search;
12
- else if (search instanceof URLSearchParams)
12
+ } else if (search instanceof URLSearchParams) {
13
13
  return search.toString();
14
+ }
14
15
  return new URLSearchParams(search).toString();
15
16
  };
16
17
  export {
@@ -5,15 +5,16 @@ const nullable = require("./nullable.qwik.cjs");
5
5
  const uuid = require("./uuid.qwik.cjs");
6
6
  const SESSION_LOCAL_STORAGE_KEY = "builderSessionId";
7
7
  const getSessionId = async ({ canTrack }) => {
8
- if (!canTrack)
8
+ if (!canTrack) {
9
9
  return void 0;
10
+ }
10
11
  const sessionId = await cookie.getCookie({
11
12
  name: SESSION_LOCAL_STORAGE_KEY,
12
13
  canTrack
13
14
  });
14
- if (nullable.checkIsDefined(sessionId))
15
+ if (nullable.checkIsDefined(sessionId)) {
15
16
  return sessionId;
16
- else {
17
+ } else {
17
18
  const newSessionId = createSessionId();
18
19
  setSessionId({
19
20
  id: newSessionId,
@@ -3,15 +3,16 @@ import { checkIsDefined } from "./nullable.qwik.mjs";
3
3
  import { uuid } from "./uuid.qwik.mjs";
4
4
  const SESSION_LOCAL_STORAGE_KEY = "builderSessionId";
5
5
  const getSessionId = async ({ canTrack }) => {
6
- if (!canTrack)
6
+ if (!canTrack) {
7
7
  return void 0;
8
+ }
8
9
  const sessionId = await getCookie({
9
10
  name: SESSION_LOCAL_STORAGE_KEY,
10
11
  canTrack
11
12
  });
12
- if (checkIsDefined(sessionId))
13
+ if (checkIsDefined(sessionId)) {
13
14
  return sessionId;
14
- else {
15
+ } else {
15
16
  const newSessionId = createSessionId();
16
17
  setSessionId({
17
18
  id: newSessionId,
@@ -6,26 +6,31 @@ const initEditing = require("../scripts/init-editing.qwik.cjs");
6
6
  const logger = require("./logger.qwik.cjs");
7
7
  const createEditorListener = ({ model, trustedHosts, callbacks }) => {
8
8
  return (event) => {
9
- if (!isFromTrustedHost.isFromTrustedHost(trustedHosts, event))
9
+ if (!isFromTrustedHost.isFromTrustedHost(trustedHosts, event)) {
10
10
  return;
11
+ }
11
12
  const { data } = event;
12
- if (data)
13
+ if (data) {
13
14
  switch (data.type) {
14
- case "builder.configureSdk":
15
+ case "builder.configureSdk": {
15
16
  callbacks.configureSdk(data.data);
16
17
  break;
17
- case "builder.triggerAnimation":
18
+ }
19
+ case "builder.triggerAnimation": {
18
20
  callbacks.animation(data.data);
19
21
  break;
22
+ }
20
23
  case "builder.contentUpdate": {
21
24
  const messageContent = data.data;
22
25
  const key = messageContent.key || messageContent.alias || messageContent.entry || messageContent.modelName;
23
26
  const contentData = messageContent.data;
24
- if (key === model)
27
+ if (key === model) {
25
28
  callbacks.contentUpdate(contentData);
29
+ }
26
30
  break;
27
31
  }
28
32
  }
33
+ }
29
34
  };
30
35
  };
31
36
  const subscribeToEditor = (model, callback, options) => {
@@ -4,26 +4,31 @@ import { setupBrowserForEditing } from "../scripts/init-editing.qwik.mjs";
4
4
  import { logger } from "./logger.qwik.mjs";
5
5
  const createEditorListener = ({ model, trustedHosts, callbacks }) => {
6
6
  return (event) => {
7
- if (!isFromTrustedHost(trustedHosts, event))
7
+ if (!isFromTrustedHost(trustedHosts, event)) {
8
8
  return;
9
+ }
9
10
  const { data } = event;
10
- if (data)
11
+ if (data) {
11
12
  switch (data.type) {
12
- case "builder.configureSdk":
13
+ case "builder.configureSdk": {
13
14
  callbacks.configureSdk(data.data);
14
15
  break;
15
- case "builder.triggerAnimation":
16
+ }
17
+ case "builder.triggerAnimation": {
16
18
  callbacks.animation(data.data);
17
19
  break;
20
+ }
18
21
  case "builder.contentUpdate": {
19
22
  const messageContent = data.data;
20
23
  const key = messageContent.key || messageContent.alias || messageContent.entry || messageContent.modelName;
21
24
  const contentData = messageContent.data;
22
- if (key === model)
25
+ if (key === model) {
23
26
  callbacks.contentUpdate(contentData);
27
+ }
24
28
  break;
25
29
  }
26
30
  }
31
+ }
27
32
  };
28
33
  };
29
34
  const subscribeToEditor = (model, callback, options) => {
@@ -1,11 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const getTopLevelDomain = (host) => {
4
- if (host === "localhost" || host === "127.0.0.1")
4
+ if (host === "localhost" || host === "127.0.0.1") {
5
5
  return host;
6
+ }
6
7
  const parts = host.split(".");
7
- if (parts.length > 2)
8
+ if (parts.length > 2) {
8
9
  return parts.slice(1).join(".");
10
+ }
9
11
  return host;
10
12
  };
11
13
  exports.getTopLevelDomain = getTopLevelDomain;
@@ -1,9 +1,11 @@
1
1
  const getTopLevelDomain = (host) => {
2
- if (host === "localhost" || host === "127.0.0.1")
2
+ if (host === "localhost" || host === "127.0.0.1") {
3
3
  return host;
4
+ }
4
5
  const parts = host.split(".");
5
- if (parts.length > 2)
6
+ if (parts.length > 2) {
6
7
  return parts.slice(1).join(".");
8
+ }
7
9
  return host;
8
10
  };
9
11
  export {
@@ -5,15 +5,16 @@ const nullable = require("./nullable.qwik.cjs");
5
5
  const uuid = require("./uuid.qwik.cjs");
6
6
  const VISITOR_LOCAL_STORAGE_KEY = "builderVisitorId";
7
7
  const getVisitorId = ({ canTrack }) => {
8
- if (!canTrack)
8
+ if (!canTrack) {
9
9
  return void 0;
10
+ }
10
11
  const visitorId = localStorage.getLocalStorageItem({
11
12
  key: VISITOR_LOCAL_STORAGE_KEY,
12
13
  canTrack
13
14
  });
14
- if (nullable.checkIsDefined(visitorId))
15
+ if (nullable.checkIsDefined(visitorId)) {
15
16
  return visitorId;
16
- else {
17
+ } else {
17
18
  const newVisitorId = createVisitorId();
18
19
  setVisitorId({
19
20
  id: newVisitorId,
@@ -3,15 +3,16 @@ import { checkIsDefined } from "./nullable.qwik.mjs";
3
3
  import { uuid } from "./uuid.qwik.mjs";
4
4
  const VISITOR_LOCAL_STORAGE_KEY = "builderVisitorId";
5
5
  const getVisitorId = ({ canTrack }) => {
6
- if (!canTrack)
6
+ if (!canTrack) {
7
7
  return void 0;
8
+ }
8
9
  const visitorId = getLocalStorageItem({
9
10
  key: VISITOR_LOCAL_STORAGE_KEY,
10
11
  canTrack
11
12
  });
12
- if (checkIsDefined(visitorId))
13
+ if (checkIsDefined(visitorId)) {
13
14
  return visitorId;
14
- else {
15
+ } else {
15
16
  const newVisitorId = createVisitorId();
16
17
  setVisitorId({
17
18
  id: newVisitorId,