@builder.io/sdk-vue 0.6.4 → 0.7.1-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. package/package.json +5 -2
  2. package/vue2/lib/{node/block-f8ec39b9.cjs → browser/block-b12c2a9e.cjs} +2 -2
  3. package/vue2/lib/browser/{block-7623343e.js → block-d44d5b8a.js} +7 -7
  4. package/vue2/lib/{node/block-styles-78f1fc51.js → browser/block-styles-b2bcecac.js} +5 -5
  5. package/vue2/lib/{edge/block-styles-d41b334a.cjs → browser/block-styles-fad43b2e.cjs} +1 -1
  6. package/vue2/lib/browser/{block-wrapper-d129f149.js → block-wrapper-230a8abf.js} +5 -5
  7. package/vue2/lib/browser/{block-wrapper-04c09786.cjs → block-wrapper-ecdc5285.cjs} +1 -1
  8. package/vue2/lib/browser/blocks/custom-code/custom-code.vue.d.ts +0 -1
  9. package/vue2/lib/browser/blocks/image/image.vue.d.ts +1 -1
  10. package/vue2/lib/{edge/blocks-wrapper-d1b2c241.js → browser/blocks-wrapper-37d1fbf5.js} +1 -1
  11. package/vue2/lib/{edge/blocks-wrapper-c1a59075.cjs → browser/blocks-wrapper-5f4ff269.cjs} +1 -1
  12. package/vue2/lib/{edge/component-ref-bac7483e.js → browser/component-ref-25028977.js} +6 -6
  13. package/vue2/lib/{edge/component-ref-f49d33aa.cjs → browser/component-ref-8d39a7f4.cjs} +1 -1
  14. package/vue2/lib/browser/components/content/components/enable-editor.vue.d.ts +2 -1
  15. package/vue2/lib/browser/constants/sdk-version.d.ts +1 -1
  16. package/vue2/lib/{edge/content-ee5058bf.cjs → browser/content-e0b5be50.cjs} +1 -1
  17. package/vue2/lib/browser/{content-59001c88.js → content-e775e1b1.js} +66 -68
  18. package/vue2/lib/browser/{css-5244a373.js → css-41c2e31d.js} +1 -1
  19. package/vue2/lib/{node/css-e268cc90.cjs → browser/css-c292bae4.cjs} +1 -1
  20. package/vue2/lib/{node/enable-editor-0ec0fba2.js → browser/enable-editor-836e8731.js} +104 -90
  21. package/vue2/lib/browser/enable-editor-bf828ceb.cjs +1 -0
  22. package/vue2/lib/browser/evaluate-239c4f2e.js +86 -0
  23. package/vue2/lib/browser/evaluate-37bcc296.cjs +1 -0
  24. package/vue2/lib/browser/functions/evaluate/choose-eval.d.ts +6 -0
  25. package/vue2/lib/browser/functions/evaluate/evaluate.d.ts +1 -5
  26. package/vue2/lib/browser/functions/evaluate/helpers.d.ts +7 -1
  27. package/vue2/lib/browser/functions/evaluate/node-runtime/index.d.ts +1 -1
  28. package/vue2/lib/browser/functions/evaluate/node-runtime/node-runtime.d.ts +2 -0
  29. package/vue2/lib/browser/functions/get-content/types.d.ts +94 -3
  30. package/vue2/lib/browser/functions/is-node-runtime.d.ts +4 -0
  31. package/vue2/lib/browser/{get-block-actions-72575937.cjs → get-block-actions-0e6055b8.cjs} +1 -1
  32. package/vue2/lib/{node/get-block-actions-19c074c1.js → browser/get-block-actions-eb308dbc.js} +2 -2
  33. package/vue2/lib/{node/get-block-properties-a61a4f44.cjs → browser/get-block-properties-a17c5ae7.cjs} +1 -1
  34. package/vue2/lib/browser/{get-block-properties-8bd6705f.js → get-block-properties-f1d87f5b.js} +2 -2
  35. package/vue2/lib/browser/{get-processed-block-df5bc2af.cjs → get-processed-block-469b6014.cjs} +1 -1
  36. package/vue2/lib/{node/get-processed-block-5ea5ad51.js → browser/get-processed-block-dac77b11.js} +2 -2
  37. package/vue2/lib/browser/index-0daf250a.cjs +32 -0
  38. package/vue2/lib/{node/index-cd218de0.js → browser/index-2c3e3aa0.js} +389 -370
  39. package/vue2/lib/browser/index.cjs +1 -1
  40. package/vue2/lib/browser/index.js +5 -5
  41. package/vue2/lib/browser/{inlined-script-b9da40ba.cjs → inlined-script-17a3e298.cjs} +1 -1
  42. package/vue2/lib/{edge/inlined-script-1c876548.js → browser/inlined-script-a2ce7e25.js} +1 -1
  43. package/vue2/lib/{node/inlined-styles-86ba9613.cjs → browser/inlined-styles-02129d25.cjs} +1 -1
  44. package/vue2/lib/{node/inlined-styles-cb8ac12b.js → browser/inlined-styles-25974197.js} +1 -1
  45. package/vue2/lib/{node/interactive-element-7034b3c2.cjs → browser/interactive-element-31618273.cjs} +1 -1
  46. package/vue2/lib/{node/interactive-element-c2e016e7.js → browser/interactive-element-95e7ed70.js} +5 -5
  47. package/vue2/lib/browser/{repeated-block-515aea68.cjs → repeated-block-dc24507b.cjs} +1 -1
  48. package/vue2/lib/{node/repeated-block-82b3437a.js → browser/repeated-block-df873ea1.js} +2 -2
  49. package/vue2/lib/browser/style.css +1 -1
  50. package/vue2/lib/{node/styles-b9bdec6e.js → browser/styles-c0e6af8c.js} +2 -2
  51. package/vue2/lib/{node/styles-f43008cc.cjs → browser/styles-eb6d5133.cjs} +2 -2
  52. package/vue2/lib/{browser/block-f8ec39b9.cjs → edge/block-6ae253d3.cjs} +2 -2
  53. package/vue2/lib/edge/{block-9a136438.js → block-ee5e6b30.js} +7 -7
  54. package/vue2/lib/{node/block-styles-442c9444.cjs → edge/block-styles-0db05976.cjs} +1 -1
  55. package/vue2/lib/edge/{block-styles-293e6520.js → block-styles-7ddd1160.js} +5 -5
  56. package/vue2/lib/{node/block-wrapper-d129f149.js → edge/block-wrapper-2516c8f0.js} +5 -5
  57. package/vue2/lib/edge/{block-wrapper-e6bc8771.cjs → block-wrapper-4a546b0f.cjs} +1 -1
  58. package/vue2/lib/edge/blocks/custom-code/custom-code.vue.d.ts +0 -1
  59. package/vue2/lib/edge/blocks/image/image.vue.d.ts +1 -1
  60. package/vue2/lib/{browser/blocks-wrapper-ffcf193b.cjs → edge/blocks-wrapper-be115723.cjs} +1 -1
  61. package/vue2/lib/{browser/blocks-wrapper-744d9c88.js → edge/blocks-wrapper-f30c1e2e.js} +1 -1
  62. package/vue2/lib/{node/component-ref-ad91463a.js → edge/component-ref-7ca49e69.js} +6 -6
  63. package/vue2/lib/{node/component-ref-c0bc64bb.cjs → edge/component-ref-f5f09e76.cjs} +1 -1
  64. package/vue2/lib/edge/components/content/components/enable-editor.vue.d.ts +2 -1
  65. package/vue2/lib/edge/constants/sdk-version.d.ts +1 -1
  66. package/vue2/lib/edge/{content-dd98b5f2.js → content-32e8afd0.js} +66 -68
  67. package/vue2/lib/{browser/content-6391e001.cjs → edge/content-e389cb08.cjs} +1 -1
  68. package/vue2/lib/edge/{css-a40d0ce1.js → css-905123d6.js} +1 -1
  69. package/vue2/lib/{browser/css-e268cc90.cjs → edge/css-db1fb81d.cjs} +1 -1
  70. package/vue2/lib/{browser/enable-editor-0ec0fba2.js → edge/enable-editor-5339c72b.js} +104 -90
  71. package/vue2/lib/edge/enable-editor-8460bc4f.cjs +1 -0
  72. package/vue2/lib/edge/evaluate-7b0fdb29.cjs +21 -0
  73. package/vue2/lib/edge/{evaluate-5aed4676.js → evaluate-8d6921da.js} +379 -346
  74. package/vue2/lib/edge/functions/evaluate/choose-eval.d.ts +6 -0
  75. package/vue2/lib/edge/functions/evaluate/evaluate.d.ts +1 -5
  76. package/vue2/lib/edge/functions/evaluate/helpers.d.ts +7 -1
  77. package/vue2/lib/edge/functions/evaluate/node-runtime/index.d.ts +1 -1
  78. package/vue2/lib/edge/functions/evaluate/node-runtime/node-runtime.d.ts +2 -0
  79. package/vue2/lib/edge/functions/get-content/types.d.ts +94 -3
  80. package/vue2/lib/edge/functions/is-node-runtime.d.ts +4 -0
  81. package/vue2/lib/edge/{get-block-actions-877fd5f9.cjs → get-block-actions-ac5cd221.cjs} +1 -1
  82. package/vue2/lib/{browser/get-block-actions-19c074c1.js → edge/get-block-actions-eb1322f1.js} +2 -2
  83. package/vue2/lib/{browser/get-block-properties-a61a4f44.cjs → edge/get-block-properties-e45bd13c.cjs} +1 -1
  84. package/vue2/lib/edge/{get-block-properties-8b0da7b7.js → get-block-properties-fc55bc69.js} +2 -2
  85. package/vue2/lib/edge/{get-processed-block-ccaa4214.cjs → get-processed-block-3a429bb7.cjs} +1 -1
  86. package/vue2/lib/edge/{get-processed-block-f0bfcc66.js → get-processed-block-9e3229f1.js} +2 -2
  87. package/vue2/lib/edge/{index-f8dc2e35.js → index-0840538e.js} +389 -370
  88. package/vue2/lib/edge/index-66f83dfa.cjs +32 -0
  89. package/vue2/lib/edge/index.cjs +1 -1
  90. package/vue2/lib/edge/index.js +5 -5
  91. package/vue2/lib/{node/inlined-script-4f903f8e.js → edge/inlined-script-8ceab368.js} +1 -1
  92. package/vue2/lib/{node/inlined-script-b9da40ba.cjs → edge/inlined-script-9311a8f4.cjs} +1 -1
  93. package/vue2/lib/edge/{inlined-styles-7ebd6646.js → inlined-styles-4826f427.js} +1 -1
  94. package/vue2/lib/{browser/inlined-styles-86ba9613.cjs → edge/inlined-styles-f0c5389f.cjs} +1 -1
  95. package/vue2/lib/edge/{interactive-element-3eaf0e7a.cjs → interactive-element-20464160.cjs} +1 -1
  96. package/vue2/lib/{browser/interactive-element-c2e016e7.js → edge/interactive-element-a4e1753a.js} +5 -5
  97. package/vue2/lib/{browser/repeated-block-82b3437a.js → edge/repeated-block-5ff563c4.js} +2 -2
  98. package/vue2/lib/edge/{repeated-block-446ae014.cjs → repeated-block-90ff0a8e.cjs} +1 -1
  99. package/vue2/lib/edge/style.css +1 -1
  100. package/vue2/lib/{browser/styles-b9bdec6e.js → edge/styles-0821e7bd.js} +2 -2
  101. package/vue2/lib/{browser/styles-f43008cc.cjs → edge/styles-8e148f6b.cjs} +2 -2
  102. package/vue2/lib/{edge/block-33134063.cjs → node/block-46a1926a.cjs} +2 -2
  103. package/vue2/lib/node/{block-7623343e.js → block-a1bcdc0f.js} +7 -7
  104. package/vue2/lib/{browser/block-styles-442c9444.cjs → node/block-styles-34b37b5f.cjs} +1 -1
  105. package/vue2/lib/{browser/block-styles-78f1fc51.js → node/block-styles-40dfb747.js} +5 -5
  106. package/vue2/lib/{edge/block-wrapper-2f05e945.js → node/block-wrapper-02a13832.js} +5 -5
  107. package/vue2/lib/node/{block-wrapper-04c09786.cjs → block-wrapper-d012bc77.cjs} +1 -1
  108. package/vue2/lib/node/blocks/custom-code/custom-code.vue.d.ts +0 -1
  109. package/vue2/lib/node/blocks/image/image.vue.d.ts +1 -1
  110. package/vue2/lib/node/{blocks-wrapper-ffcf193b.cjs → blocks-wrapper-111adf2e.cjs} +1 -1
  111. package/vue2/lib/node/{blocks-wrapper-744d9c88.js → blocks-wrapper-2cf7c243.js} +1 -1
  112. package/vue2/lib/{browser/component-ref-ad91463a.js → node/component-ref-686b70a8.js} +6 -6
  113. package/vue2/lib/{browser/component-ref-c0bc64bb.cjs → node/component-ref-8664d291.cjs} +1 -1
  114. package/vue2/lib/node/components/content/components/enable-editor.vue.d.ts +2 -1
  115. package/vue2/lib/node/constants/sdk-version.d.ts +1 -1
  116. package/vue2/lib/node/{content-59001c88.js → content-750b77c5.js} +66 -68
  117. package/vue2/lib/node/{content-6391e001.cjs → content-804eb1c1.cjs} +1 -1
  118. package/vue2/lib/node/{css-5244a373.js → css-0997fa70.js} +1 -1
  119. package/vue2/lib/{edge/css-6d51b919.cjs → node/css-698817f7.cjs} +1 -1
  120. package/vue2/lib/node/enable-editor-4c3b62ba.cjs +1 -0
  121. package/vue2/lib/{edge/enable-editor-aeb1f840.js → node/enable-editor-991cf703.js} +104 -90
  122. package/vue2/lib/node/evaluate-06bae117.js +187 -0
  123. package/vue2/lib/node/evaluate-fc74c806.cjs +41 -0
  124. package/vue2/lib/node/functions/evaluate/choose-eval.d.ts +6 -0
  125. package/vue2/lib/node/functions/evaluate/evaluate.d.ts +1 -5
  126. package/vue2/lib/node/functions/evaluate/helpers.d.ts +7 -1
  127. package/vue2/lib/node/functions/evaluate/node-runtime/index.d.ts +1 -1
  128. package/vue2/lib/node/functions/evaluate/node-runtime/node-runtime.d.ts +2 -0
  129. package/vue2/lib/node/functions/get-content/types.d.ts +94 -3
  130. package/vue2/lib/node/functions/is-node-runtime.d.ts +4 -0
  131. package/vue2/lib/node/{get-block-actions-72575937.cjs → get-block-actions-779fa30b.cjs} +1 -1
  132. package/vue2/lib/{edge/get-block-actions-350bc978.js → node/get-block-actions-9781c926.js} +2 -2
  133. package/vue2/lib/{edge/get-block-properties-ece4e040.cjs → node/get-block-properties-090f2906.cjs} +1 -1
  134. package/vue2/lib/node/{get-block-properties-8bd6705f.js → get-block-properties-ed8d55a8.js} +2 -2
  135. package/vue2/lib/node/get-processed-block-267a96eb.js +52 -0
  136. package/vue2/lib/node/get-processed-block-270c0450.cjs +1 -0
  137. package/vue2/lib/node/index-55b86b2c.cjs +32 -0
  138. package/vue2/lib/{browser/index-cd218de0.js → node/index-fe4f9482.js} +389 -370
  139. package/vue2/lib/node/index.cjs +1 -1
  140. package/vue2/lib/node/index.js +5 -5
  141. package/vue2/lib/{edge/inlined-script-44721dc7.cjs → node/inlined-script-37af305a.cjs} +1 -1
  142. package/vue2/lib/{browser/inlined-script-4f903f8e.js → node/inlined-script-9bf9544a.js} +1 -1
  143. package/vue2/lib/{browser/inlined-styles-cb8ac12b.js → node/inlined-styles-7a704065.js} +1 -1
  144. package/vue2/lib/{edge/inlined-styles-eb80e4fe.cjs → node/inlined-styles-e812d54a.cjs} +1 -1
  145. package/vue2/lib/{edge/interactive-element-64d11339.js → node/interactive-element-a9adc81f.js} +5 -5
  146. package/vue2/lib/{browser/interactive-element-7034b3c2.cjs → node/interactive-element-e940e56b.cjs} +1 -1
  147. package/vue2/lib/{edge/repeated-block-b9a8feeb.js → node/repeated-block-acab5426.js} +2 -2
  148. package/vue2/lib/node/{repeated-block-515aea68.cjs → repeated-block-ef2bf12f.cjs} +1 -1
  149. package/vue2/lib/node/style.css +1 -1
  150. package/vue2/lib/{edge/styles-cfea6654.js → node/styles-34c3741a.js} +2 -2
  151. package/vue2/lib/{edge/styles-36552ab4.cjs → node/styles-93f84a1d.cjs} +2 -2
  152. package/vue2/package.json +2 -0
  153. package/vue3/lib/browser/{block-wrapper.1501b793.cjs → block-wrapper.75f65d10.cjs} +1 -1
  154. package/vue3/lib/{edge/block-wrapper.e3b7b422.js → browser/block-wrapper.eb12cfdc.js} +2 -2
  155. package/vue3/lib/browser/blocks/custom-code/custom-code.vue.d.ts +0 -1
  156. package/vue3/lib/browser/blocks/image/image.vue.d.ts +1 -1
  157. package/vue3/lib/{edge/component-ref.7035b91b.js → browser/component-ref.ce36b7ec.js} +2 -2
  158. package/vue3/lib/browser/{component-ref.4f5f964f.cjs → component-ref.f391a5ee.cjs} +1 -1
  159. package/vue3/lib/browser/components/content/components/enable-editor.vue.d.ts +8 -7
  160. package/vue3/lib/browser/components/content/content.vue.d.ts +6 -6
  161. package/vue3/lib/browser/constants/sdk-version.d.ts +1 -1
  162. package/vue3/lib/browser/functions/evaluate/choose-eval.d.ts +6 -0
  163. package/vue3/lib/browser/functions/evaluate/evaluate.d.ts +1 -5
  164. package/vue3/lib/browser/functions/evaluate/helpers.d.ts +7 -1
  165. package/vue3/lib/browser/functions/evaluate/node-runtime/index.d.ts +1 -1
  166. package/vue3/lib/browser/functions/evaluate/node-runtime/node-runtime.d.ts +2 -0
  167. package/vue3/lib/browser/functions/get-content/types.d.ts +94 -3
  168. package/vue3/lib/browser/functions/is-node-runtime.d.ts +4 -0
  169. package/vue3/lib/{edge/get-block-actions.7d762289.js → browser/get-block-actions.7c580dff.js} +1 -1
  170. package/vue3/lib/{node/get-block-actions.316f88d7.cjs → browser/get-block-actions.e6dfffe3.cjs} +1 -1
  171. package/vue3/lib/{node/index.67caa0a0.js → browser/index.188d2ee5.js} +673 -640
  172. package/vue3/lib/browser/index.cjs +1 -1
  173. package/vue3/lib/browser/index.fb1c2a1f.cjs +69 -0
  174. package/vue3/lib/browser/index.js +1 -1
  175. package/vue3/lib/browser/{repeated-block.3a15e789.cjs → repeated-block.2431c33d.cjs} +1 -1
  176. package/vue3/lib/{edge/repeated-block.59223c04.js → browser/repeated-block.7a8762fc.js} +2 -2
  177. package/vue3/lib/browser/style.css +1 -1
  178. package/vue3/lib/edge/{block-wrapper.8441fbe1.cjs → block-wrapper.0868030f.cjs} +1 -1
  179. package/vue3/lib/{node/block-wrapper.d71006fa.js → edge/block-wrapper.cab4805b.js} +2 -2
  180. package/vue3/lib/edge/blocks/custom-code/custom-code.vue.d.ts +0 -1
  181. package/vue3/lib/edge/blocks/image/image.vue.d.ts +1 -1
  182. package/vue3/lib/{node/component-ref.104f0d16.js → edge/component-ref.ace67608.js} +2 -2
  183. package/vue3/lib/{node/component-ref.4f5f964f.cjs → edge/component-ref.ae7eec27.cjs} +1 -1
  184. package/vue3/lib/edge/components/content/components/enable-editor.vue.d.ts +8 -7
  185. package/vue3/lib/edge/components/content/content.vue.d.ts +6 -6
  186. package/vue3/lib/edge/constants/sdk-version.d.ts +1 -1
  187. package/vue3/lib/edge/functions/evaluate/choose-eval.d.ts +6 -0
  188. package/vue3/lib/edge/functions/evaluate/evaluate.d.ts +1 -5
  189. package/vue3/lib/edge/functions/evaluate/helpers.d.ts +7 -1
  190. package/vue3/lib/edge/functions/evaluate/node-runtime/index.d.ts +1 -1
  191. package/vue3/lib/edge/functions/evaluate/node-runtime/node-runtime.d.ts +2 -0
  192. package/vue3/lib/edge/functions/get-content/types.d.ts +94 -3
  193. package/vue3/lib/edge/functions/is-node-runtime.d.ts +4 -0
  194. package/vue3/lib/edge/{get-block-actions.37ab332e.cjs → get-block-actions.83fca99e.cjs} +1 -1
  195. package/vue3/lib/{browser/get-block-actions.12becb73.js → edge/get-block-actions.cfa7e625.js} +1 -1
  196. package/vue3/lib/edge/{index.811ded87.js → index.28b94406.js} +1310 -1249
  197. package/vue3/lib/edge/index.8e0db5cb.cjs +89 -0
  198. package/vue3/lib/edge/index.cjs +1 -1
  199. package/vue3/lib/edge/index.js +1 -1
  200. package/vue3/lib/edge/{repeated-block.2c467c57.cjs → repeated-block.4515ae00.cjs} +1 -1
  201. package/vue3/lib/{node/repeated-block.ab5e93b5.js → edge/repeated-block.4f0522f0.js} +2 -2
  202. package/vue3/lib/edge/style.css +1 -1
  203. package/vue3/lib/node/block-wrapper.4b048f0a.cjs +1 -0
  204. package/vue3/lib/{browser/block-wrapper.d71006fa.js → node/block-wrapper.529d85d5.js} +9 -8
  205. package/vue3/lib/node/blocks/custom-code/custom-code.vue.d.ts +0 -1
  206. package/vue3/lib/node/blocks/image/image.vue.d.ts +1 -1
  207. package/vue3/lib/{browser/component-ref.104f0d16.js → node/component-ref.3c9a0fb1.js} +5 -4
  208. package/vue3/lib/node/component-ref.c78bd861.cjs +1 -0
  209. package/vue3/lib/node/components/content/components/enable-editor.vue.d.ts +8 -7
  210. package/vue3/lib/node/components/content/content.vue.d.ts +6 -6
  211. package/vue3/lib/node/constants/sdk-version.d.ts +1 -1
  212. package/vue3/lib/node/functions/evaluate/choose-eval.d.ts +6 -0
  213. package/vue3/lib/node/functions/evaluate/evaluate.d.ts +1 -5
  214. package/vue3/lib/node/functions/evaluate/helpers.d.ts +7 -1
  215. package/vue3/lib/node/functions/evaluate/node-runtime/index.d.ts +1 -1
  216. package/vue3/lib/node/functions/evaluate/node-runtime/node-runtime.d.ts +2 -0
  217. package/vue3/lib/node/functions/get-content/types.d.ts +94 -3
  218. package/vue3/lib/node/functions/is-node-runtime.d.ts +4 -0
  219. package/vue3/lib/node/{get-block-actions.12becb73.js → get-block-actions.65678660.js} +1 -1
  220. package/vue3/lib/{browser/get-block-actions.316f88d7.cjs → node/get-block-actions.977f70db.cjs} +1 -1
  221. package/vue3/lib/{browser/index.67caa0a0.js → node/index.1a21f267.js} +845 -718
  222. package/vue3/lib/node/index.baa2a660.cjs +109 -0
  223. package/vue3/lib/node/index.cjs +1 -1
  224. package/vue3/lib/node/index.js +27 -26
  225. package/vue3/lib/{browser/repeated-block.ab5e93b5.js → node/repeated-block.04f4039b.js} +5 -4
  226. package/vue3/lib/node/repeated-block.33e03818.cjs +1 -0
  227. package/vue3/lib/node/style.css +1 -1
  228. package/vue3/package.json +2 -0
  229. package/vue2/lib/browser/enable-editor-68f3b7d1.cjs +0 -1
  230. package/vue2/lib/browser/evaluate-81e9d18d.js +0 -81
  231. package/vue2/lib/browser/evaluate-c6468e7e.cjs +0 -1
  232. package/vue2/lib/browser/get-processed-block-5ea5ad51.js +0 -58
  233. package/vue2/lib/browser/index-4480d5e4.cjs +0 -32
  234. package/vue2/lib/edge/enable-editor-86cc8a4d.cjs +0 -1
  235. package/vue2/lib/edge/evaluate-16c456b4.cjs +0 -21
  236. package/vue2/lib/edge/index-df9193d2.cjs +0 -32
  237. package/vue2/lib/node/enable-editor-68f3b7d1.cjs +0 -1
  238. package/vue2/lib/node/evaluate-81e9d18d.js +0 -81
  239. package/vue2/lib/node/evaluate-c6468e7e.cjs +0 -1
  240. package/vue2/lib/node/get-processed-block-df5bc2af.cjs +0 -1
  241. package/vue2/lib/node/index-4480d5e4.cjs +0 -32
  242. package/vue3/lib/browser/index.2b9eb004.cjs +0 -69
  243. package/vue3/lib/edge/component-ref.40439a7f.cjs +0 -1
  244. package/vue3/lib/edge/index.db87480a.cjs +0 -89
  245. package/vue3/lib/node/block-wrapper.1501b793.cjs +0 -1
  246. package/vue3/lib/node/index.2b9eb004.cjs +0 -69
  247. package/vue3/lib/node/repeated-block.3a15e789.cjs +0 -1
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as k } from "vue";
2
- import { e as m } from "./evaluate-81e9d18d.js";
3
- import { r as R, m as h, T as y, c as w, l as f, o as _, i as u, p as E, _ as g, q as U, t as I, u as T, f as P, n as M } from "./index-cd218de0.js";
4
- const H = "0.6.4", q = () => {
5
- R("insertMenu", {
2
+ import { e as f } from "./evaluate-239c4f2e.js";
3
+ import { r as w, m as p, T as y, l as g, _ as b, o as S, p as _, i as h, f as E, q as I, t as U, u as M, v as H, n as P } from "./index-2c3e3aa0.js";
4
+ const T = "0.7.1-0", K = () => {
5
+ w("insertMenu", {
6
6
  name: "_default",
7
7
  default: !0,
8
8
  items: [{
@@ -24,14 +24,14 @@ const H = "0.6.4", q = () => {
24
24
  }]
25
25
  });
26
26
  };
27
- let b = !1;
28
- const K = (n = {}) => {
27
+ let C = !1;
28
+ const q = (n = {}) => {
29
29
  var e, t;
30
- b || (b = !0, h() && ((e = window.parent) == null || e.postMessage({
30
+ C || (C = !0, p() && ((e = window.parent) == null || e.postMessage({
31
31
  type: "builder.sdkInfo",
32
32
  data: {
33
33
  target: y,
34
- version: H,
34
+ version: T,
35
35
  supportsPatchUpdates: !1,
36
36
  // Supports builder-model="..." attribute which is needed to
37
37
  // scope our '+ add block' button styling
@@ -50,33 +50,33 @@ const K = (n = {}) => {
50
50
  if (i != null && i.type)
51
51
  switch (i.type) {
52
52
  case "builder.evaluate": {
53
- const a = i.data.text, x = i.data.arguments || [], d = i.data.id, v = new Function(a);
53
+ const a = i.data.text, d = i.data.arguments || [], l = i.data.id, x = new Function(a);
54
54
  let r, c = null;
55
55
  try {
56
- r = v.apply(null, x);
57
- } catch (l) {
58
- c = l;
56
+ r = x.apply(null, d);
57
+ } catch (u) {
58
+ c = u;
59
59
  }
60
60
  c ? (o = window.parent) == null || o.postMessage({
61
61
  type: "builder.evaluateError",
62
62
  data: {
63
- id: d,
63
+ id: l,
64
64
  error: c.message
65
65
  }
66
- }, "*") : r && typeof r.then == "function" ? r.then((l) => {
67
- var p;
68
- (p = window.parent) == null || p.postMessage({
66
+ }, "*") : r && typeof r.then == "function" ? r.then((u) => {
67
+ var m;
68
+ (m = window.parent) == null || m.postMessage({
69
69
  type: "builder.evaluateResult",
70
70
  data: {
71
- id: d,
72
- result: l
71
+ id: l,
72
+ result: u
73
73
  }
74
74
  }, "*");
75
75
  }).catch(console.error) : (s = window.parent) == null || s.postMessage({
76
76
  type: "builder.evaluateResult",
77
77
  data: {
78
78
  result: r,
79
- id: d
79
+ id: l
80
80
  }
81
81
  }, "*");
82
82
  break;
@@ -84,7 +84,7 @@ const K = (n = {}) => {
84
84
  }
85
85
  })));
86
86
  };
87
- function S(n) {
87
+ function v(n) {
88
88
  return Math.round(n * 1e3) / 1e3;
89
89
  }
90
90
  const O = (n, e, t = !0) => {
@@ -101,11 +101,11 @@ const O = (n, e, t = !0) => {
101
101
  }, N = (n) => O(n, (e) => {
102
102
  const t = e.getAttribute("builder-id") || e.id;
103
103
  return (t == null ? void 0 : t.indexOf("builder-")) === 0;
104
- }), C = ({
104
+ }), R = ({
105
105
  event: n,
106
106
  target: e
107
107
  }) => {
108
- const t = e.getBoundingClientRect(), i = n.clientX - t.left, o = n.clientY - t.top, s = S(i / t.width), a = S(o / t.height);
108
+ const t = e.getBoundingClientRect(), i = n.clientX - t.left, o = n.clientY - t.top, s = v(i / t.width), a = v(o / t.height);
109
109
  return {
110
110
  x: s,
111
111
  y: a
@@ -115,11 +115,11 @@ const O = (n, e, t = !0) => {
115
115
  return {
116
116
  targetBuilderElement: i || void 0,
117
117
  metadata: {
118
- targetOffset: e ? C({
118
+ targetOffset: e ? R({
119
119
  event: n,
120
120
  target: e
121
121
  }) : void 0,
122
- builderTargetOffset: t ? C({
122
+ builderTargetOffset: t ? R({
123
123
  event: n,
124
124
  target: t
125
125
  }) : void 0,
@@ -129,83 +129,59 @@ const O = (n, e, t = !0) => {
129
129
  }, A = k({
130
130
  name: "enable-editor",
131
131
  props: [
132
- "canTrack",
133
132
  "builderContextSignal",
134
133
  "model",
135
134
  "context",
135
+ "canTrack",
136
136
  "apiKey",
137
- "showContent",
138
- "classNameProp",
139
- "content",
140
137
  "locale",
141
138
  "includeRefs",
142
- "enrich"
139
+ "enrich",
140
+ "content",
141
+ "showContent",
142
+ "classNameProp"
143
143
  ],
144
144
  data() {
145
145
  return {
146
- canTrackToUse: w(this.canTrack) ? this.canTrack : !0,
147
146
  forceReRenderCount: 0,
148
147
  lastUpdated: 0,
149
148
  shouldSendResetCookie: !1,
150
149
  httpReqsData: {},
151
150
  clicked: !1,
152
- builderContext: f
151
+ builderContext: g
153
152
  };
154
153
  },
155
154
  provide() {
156
155
  const n = this;
157
156
  return {
158
- [f.key]: n.builderContextSignal
157
+ [g.key]: n.builderContextSignal
159
158
  };
160
159
  },
161
160
  mounted() {
162
- var n, e;
163
- if (this.apiKey || _.error(
164
- "No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
165
- ), h()) {
166
- if (u() && (this.forceReRenderCount = this.forceReRenderCount + 1, window.addEventListener("message", this.processMessage), q(), K({
167
- ...this.locale ? {
168
- locale: this.locale
169
- } : {},
170
- ...this.includeRefs ? {
171
- includeRefs: this.includeRefs
172
- } : {},
173
- ...this.enrich ? {
174
- enrich: this.enrich
175
- } : {}
176
- }), Object.values(
177
- this.builderContextSignal.componentInfos
178
- ).forEach((t) => {
179
- var o;
180
- const i = E(t);
181
- (o = window.parent) == null || o.postMessage(i, "*");
182
- }), window.addEventListener(
183
- "builder:component:stateChangeListenerActivated",
184
- this.emitStateUpdate
185
- )), this.builderContextSignal.content) {
186
- const t = (n = this.builderContextSignal.content) == null ? void 0 : n.testVariationId, i = (e = this.builderContextSignal.content) == null ? void 0 : e.id;
187
- g({
188
- type: "impression",
189
- canTrack: this.canTrackToUse,
190
- contentId: i,
191
- apiKey: this.apiKey,
192
- variationId: t !== i ? t : void 0
193
- });
194
- }
195
- if (U()) {
196
- const t = new URL(location.href).searchParams, i = t.get("builder.preview"), o = t.get(
197
- `builder.preview.${i}`
198
- ), s = t.get("apiKey") || t.get("builder.space");
199
- i === this.model && s === this.apiKey && (!this.content || o === this.content.id) && I({
200
- model: this.model,
201
- apiKey: this.apiKey,
202
- apiVersion: this.builderContextSignal.apiVersion
203
- }).then((a) => {
204
- a && this.mergeNewContent(a);
205
- });
161
+ (() => {
162
+ var t, i;
163
+ if (p()) {
164
+ if (h() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
165
+ new CustomEvent("initeditingbldr")
166
+ ), this.builderContextSignal.content && S(this.canTrack)) {
167
+ const s = (t = this.builderContextSignal.content) == null ? void 0 : t.testVariationId, a = (i = this.builderContextSignal.content) == null ? void 0 : i.id, d = this.apiKey;
168
+ b({
169
+ type: "impression",
170
+ canTrack: !0,
171
+ contentId: a,
172
+ apiKey: d,
173
+ variationId: s !== a ? s : void 0
174
+ });
175
+ }
176
+ M() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
177
+ new CustomEvent("initpreviewingbldr")
178
+ );
206
179
  }
207
- this.evaluateJsCode(), this.runHttpRequests(), this.emitStateUpdate();
208
- }
180
+ })(), (() => {
181
+ this.apiKey || H.error(
182
+ "No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
183
+ ), this.evaluateJsCode(), this.runHttpRequests(), this.emitStateUpdate();
184
+ })();
209
185
  },
210
186
  watch: {
211
187
  onUpdateHook0: {
@@ -236,7 +212,7 @@ const O = (n, e, t = !0) => {
236
212
  }
237
213
  },
238
214
  unmounted() {
239
- h() && (window.removeEventListener("message", this.processMessage), window.removeEventListener(
215
+ p() && (window.removeEventListener("message", this.processMessage), window.removeEventListener(
240
216
  "builder:component:stateChangeListenerActivated",
241
217
  this.emitStateUpdate
242
218
  ));
@@ -315,7 +291,7 @@ const O = (n, e, t = !0) => {
315
291
  evaluateJsCode() {
316
292
  var e, t;
317
293
  const n = (t = (e = this.builderContextSignal.content) == null ? void 0 : e.data) == null ? void 0 : t.jsCode;
318
- n && m({
294
+ n && f({
319
295
  code: n,
320
296
  context: this.context || {},
321
297
  localState: void 0,
@@ -327,9 +303,9 @@ const O = (n, e, t = !0) => {
327
303
  var e, t;
328
304
  if (this.builderContextSignal.content) {
329
305
  const i = (e = this.builderContextSignal.content) == null ? void 0 : e.testVariationId, o = (t = this.builderContextSignal.content) == null ? void 0 : t.id;
330
- g({
306
+ b({
331
307
  type: "click",
332
- canTrack: this.canTrackToUse,
308
+ canTrack: S(this.canTrack),
333
309
  contentId: o,
334
310
  apiKey: this.apiKey,
335
311
  variationId: i !== o ? i : void 0,
@@ -342,7 +318,7 @@ const O = (n, e, t = !0) => {
342
318
  evalExpression(n) {
343
319
  return n.replace(
344
320
  /{{([^}]+)}}/g,
345
- (e, t) => m({
321
+ (e, t) => f({
346
322
  code: t,
347
323
  context: this.context || {},
348
324
  localState: void 0,
@@ -352,7 +328,7 @@ const O = (n, e, t = !0) => {
352
328
  );
353
329
  },
354
330
  handleRequest({ url: n, key: e }) {
355
- T(n).then((t) => t.json()).then((t) => {
331
+ _(n).then((t) => t.json()).then((t) => {
356
332
  var o, s;
357
333
  const i = {
358
334
  ...this.builderContextSignal.rootState,
@@ -367,7 +343,7 @@ const O = (n, e, t = !0) => {
367
343
  var e, t;
368
344
  const n = ((t = (e = this.builderContextSignal.content) == null ? void 0 : e.data) == null ? void 0 : t.httpRequests) ?? {};
369
345
  Object.entries(n).forEach(([i, o]) => {
370
- if (o && (!this.httpReqsData[i] || u())) {
346
+ if (o && (!this.httpReqsData[i] || h())) {
371
347
  const s = this.evalExpression(o);
372
348
  this.handleRequest({
373
349
  url: s,
@@ -377,12 +353,12 @@ const O = (n, e, t = !0) => {
377
353
  });
378
354
  },
379
355
  emitStateUpdate() {
380
- u() && window.dispatchEvent(
356
+ h() && window.dispatchEvent(
381
357
  new CustomEvent(
382
358
  "builder:component:stateChange",
383
359
  {
384
360
  detail: {
385
- state: P(this.builderContextSignal.rootState),
361
+ state: E(this.builderContextSignal.rootState),
386
362
  ref: {
387
363
  name: this.model
388
364
  }
@@ -391,6 +367,40 @@ const O = (n, e, t = !0) => {
391
367
  )
392
368
  );
393
369
  },
370
+ elementRef_onIniteditingbldr(n) {
371
+ this.forceReRenderCount = this.forceReRenderCount + 1, window.addEventListener("message", this.processMessage), K(), q({
372
+ ...this.locale ? {
373
+ locale: this.locale
374
+ } : {},
375
+ ...this.includeRefs ? {
376
+ includeRefs: this.includeRefs
377
+ } : {},
378
+ ...this.enrich ? {
379
+ enrich: this.enrich
380
+ } : {}
381
+ }), Object.values(
382
+ this.builderContextSignal.componentInfos
383
+ ).forEach((e) => {
384
+ var i;
385
+ const t = I(e);
386
+ (i = window.parent) == null || i.postMessage(t, "*");
387
+ }), window.addEventListener(
388
+ "builder:component:stateChangeListenerActivated",
389
+ this.emitStateUpdate
390
+ );
391
+ },
392
+ elementRef_onInitpreviewingbldr(n) {
393
+ const e = new URL(location.href).searchParams, t = e.get("builder.preview"), i = e.get(
394
+ `builder.preview.${t}`
395
+ ), o = e.get("apiKey") || e.get("builder.space");
396
+ t === this.model && o === this.apiKey && (!this.content || i === this.content.id) && U({
397
+ model: this.model,
398
+ apiKey: this.apiKey,
399
+ apiVersion: this.builderContextSignal.apiVersion
400
+ }).then((s) => {
401
+ s && this.mergeNewContent(s);
402
+ });
403
+ },
394
404
  _classStringToObject(n) {
395
405
  const e = {};
396
406
  if (typeof n != "string")
@@ -407,13 +417,17 @@ var L = function() {
407
417
  var e = this, t = e._self._c;
408
418
  return e._self._setupProxy, e.builderContextSignal.content ? t("div", e._b({ key: e.forceReRenderCount, ref: "elementRef", class: e._classStringToObject(e.classNameProp), attrs: { "builder-content-id": (i = e.builderContextSignal.content) == null ? void 0 : i.id, "builder-model": e.model }, on: { click: function(o) {
409
419
  return e.onClick(o);
420
+ }, initeditingbldr: function(o) {
421
+ return e.elementRef_onIniteditingbldr(o);
422
+ }, initpreviewingbldr: function(o) {
423
+ return e.elementRef_onInitpreviewingbldr(o);
410
424
  } } }, "div", {
411
425
  ...e.showContent ? {} : {
412
426
  hidden: !0,
413
427
  "aria-hidden": !0
414
428
  }
415
429
  }, !1), [e._t("default")], 2) : e._e();
416
- }, B = [], D = /* @__PURE__ */ M(
430
+ }, B = [], D = /* @__PURE__ */ P(
417
431
  A,
418
432
  L,
419
433
  B,
@@ -423,7 +437,7 @@ var L = function() {
423
437
  null,
424
438
  null
425
439
  );
426
- const z = D.exports;
440
+ const J = D.exports;
427
441
  export {
428
- z as default
442
+ J as default
429
443
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("vue"),m=require("./evaluate-37bcc296.cjs"),r=require("./index-0daf250a.cjs"),v="0.7.1-0",x=()=>{r.register("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let f=!1;const R=(n={})=>{var e,t;f||(f=!0,r.isBrowser()&&((e=window.parent)==null||e.postMessage({type:"builder.sdkInfo",data:{target:r.TARGET,version:v,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(t=window.parent)==null||t.postMessage({type:"builder.updateContent",data:{options:n}},"*"),window.addEventListener("message",({data:i})=>{var o,s;if(i!=null&&i.type)switch(i.type){case"builder.evaluate":{const a=i.data.text,l=i.data.arguments||[],c=i.data.id,C=new Function(a);let d,u=null;try{d=C.apply(null,l)}catch(h){u=h}u?(o=window.parent)==null||o.postMessage({type:"builder.evaluateError",data:{id:c,error:u.message}},"*"):d&&typeof d.then=="function"?d.then(h=>{var p;(p=window.parent)==null||p.postMessage({type:"builder.evaluateResult",data:{id:c,result:h}},"*")}).catch(console.error):(s=window.parent)==null||s.postMessage({type:"builder.evaluateResult",data:{result:d,id:c}},"*");break}}})))};function g(n){return Math.round(n*1e3)/1e3}const k=(n,e,t=!0)=>{if(!(n instanceof HTMLElement))return null;let i=t?n:n.parentElement;do{if(!i)return null;if(e(i))return i}while(i=i.parentElement);return null},w=n=>k(n,e=>{const t=e.getAttribute("builder-id")||e.id;return(t==null?void 0:t.indexOf("builder-"))===0}),b=({event:n,target:e})=>{const t=e.getBoundingClientRect(),i=n.clientX-t.left,o=n.clientY-t.top,s=g(i/t.width),a=g(o/t.height);return{x:s,y:a}},y=n=>{const e=n.target,t=e&&w(e),i=(t==null?void 0:t.getAttribute("builder-id"))||(t==null?void 0:t.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:e?b({event:n,target:e}):void 0,builderTargetOffset:t?b({event:n,target:t}):void 0,builderElementIndex:t&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(t):void 0}}},_=S.defineComponent({name:"enable-editor",props:["builderContextSignal","model","context","canTrack","apiKey","locale","includeRefs","enrich","content","showContent","classNameProp"],data(){return{forceReRenderCount:0,lastUpdated:0,shouldSendResetCookie:!1,httpReqsData:{},clicked:!1,builderContext:r.builderContext}},provide(){const n=this;return{[r.builderContext.key]:n.builderContextSignal}},mounted(){(()=>{var t,i;if(r.isBrowser()){if(r.isEditing()&&this.$refs.elementRef&&this.$refs.elementRef.dispatchEvent(new CustomEvent("initeditingbldr")),this.builderContextSignal.content&&r.getDefaultCanTrack(this.canTrack)){const s=(t=this.builderContextSignal.content)==null?void 0:t.testVariationId,a=(i=this.builderContextSignal.content)==null?void 0:i.id,l=this.apiKey;r._track({type:"impression",canTrack:!0,contentId:a,apiKey:l,variationId:s!==a?s:void 0})}r.isPreviewing()&&this.$refs.elementRef&&this.$refs.elementRef.dispatchEvent(new CustomEvent("initpreviewingbldr"))}})(),(()=>{this.apiKey||r.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),this.evaluateJsCode(),this.runHttpRequests(),this.emitStateUpdate()})()},watch:{onUpdateHook0:{handler(){this.content&&this.mergeNewContent(this.content)},immediate:!0},onUpdateHook1:{handler(){},immediate:!0},onUpdateHook2:{handler(){this.evaluateJsCode()},immediate:!0},onUpdateHook3:{handler(){this.runHttpRequests()},immediate:!0},onUpdateHook4:{handler(){this.emitStateUpdate()},immediate:!0}},unmounted(){r.isBrowser()&&(window.removeEventListener("message",this.processMessage),window.removeEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate))},computed:{onUpdateHook0(){return{0:this.content}},onUpdateHook1(){return{0:this.shouldSendResetCookie}},onUpdateHook2(){var n,e;return{0:(e=(n=this.builderContextSignal.content)==null?void 0:n.data)==null?void 0:e.jsCode,1:this.builderContextSignal.rootState}},onUpdateHook3(){var n,e;return{0:(e=(n=this.builderContextSignal.content)==null?void 0:n.data)==null?void 0:e.httpRequests}},onUpdateHook4(){return{0:this.builderContextSignal.rootState}}},methods:{mergeNewContent(n){var t,i,o,s,a;const e={...this.builderContextSignal.content,...n,data:{...(t=this.builderContextSignal.content)==null?void 0:t.data,...n==null?void 0:n.data},meta:{...(i=this.builderContextSignal.content)==null?void 0:i.meta,...n==null?void 0:n.meta,breakpoints:((o=n==null?void 0:n.meta)==null?void 0:o.breakpoints)||((a=(s=this.builderContextSignal.content)==null?void 0:s.meta)==null?void 0:a.breakpoints)}};this.builderContextSignal.content=e},processMessage(n){var t;const{data:e}=n;if(e)switch(e.type){case"builder.configureSdk":{const i=e.data,{breakpoints:o,contentId:s}=i;if(!s||s!==((t=this.builderContextSignal.content)==null?void 0:t.id))return;o&&this.mergeNewContent({meta:{breakpoints:o}}),this.forceReRenderCount=this.forceReRenderCount+1;break}case"builder.contentUpdate":{const i=e.data,o=i.key||i.alias||i.entry||i.modelName,s=i.data;o===this.model&&(this.mergeNewContent(s),this.forceReRenderCount=this.forceReRenderCount+1);break}}},evaluateJsCode(){var e,t;const n=(t=(e=this.builderContextSignal.content)==null?void 0:e.data)==null?void 0:t.jsCode;n&&m.evaluate({code:n,context:this.context||{},localState:void 0,rootState:this.builderContextSignal.rootState,rootSetState:this.builderContextSignal.rootSetState})},onClick(n){var e,t;if(this.builderContextSignal.content){const i=(e=this.builderContextSignal.content)==null?void 0:e.testVariationId,o=(t=this.builderContextSignal.content)==null?void 0:t.id;r._track({type:"click",canTrack:r.getDefaultCanTrack(this.canTrack),contentId:o,apiKey:this.apiKey,variationId:i!==o?i:void 0,...y(n),unique:!this.clicked})}this.clicked||(this.clicked=!0)},evalExpression(n){return n.replace(/{{([^}]+)}}/g,(e,t)=>m.evaluate({code:t,context:this.context||{},localState:void 0,rootState:this.builderContextSignal.rootState,rootSetState:this.builderContextSignal.rootSetState}))},handleRequest({url:n,key:e}){r.fetch(n).then(t=>t.json()).then(t=>{var o,s;const i={...this.builderContextSignal.rootState,[e]:t};(s=(o=this.builderContextSignal).rootSetState)==null||s.call(o,i),this.httpReqsData[e]=!0}).catch(t=>{console.error("error fetching dynamic data",n,t)})},runHttpRequests(){var e,t;const n=((t=(e=this.builderContextSignal.content)==null?void 0:e.data)==null?void 0:t.httpRequests)??{};Object.entries(n).forEach(([i,o])=>{if(o&&(!this.httpReqsData[i]||r.isEditing())){const s=this.evalExpression(o);this.handleRequest({url:s,key:i})}})},emitStateUpdate(){r.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:r.fastClone(this.builderContextSignal.rootState),ref:{name:this.model}}}))},elementRef_onIniteditingbldr(n){this.forceReRenderCount=this.forceReRenderCount+1,window.addEventListener("message",this.processMessage),x(),R({...this.locale?{locale:this.locale}:{},...this.includeRefs?{includeRefs:this.includeRefs}:{},...this.enrich?{enrich:this.enrich}:{}}),Object.values(this.builderContextSignal.componentInfos).forEach(e=>{var i;const t=r.createRegisterComponentMessage(e);(i=window.parent)==null||i.postMessage(t,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate)},elementRef_onInitpreviewingbldr(n){const e=new URL(location.href).searchParams,t=e.get("builder.preview"),i=e.get(`builder.preview.${t}`),o=e.get("apiKey")||e.get("builder.space");t===this.model&&o===this.apiKey&&(!this.content||i===this.content.id)&&r.fetchOneEntry({model:this.model,apiKey:this.apiKey,apiVersion:this.builderContextSignal.apiVersion}).then(s=>{s&&this.mergeNewContent(s)})},_classStringToObject(n){const e={};if(typeof n!="string")return e;const t=n.trim().split(/\s+/);for(const i of t)e[i]=!0;return e}}});var E=function(){var i;var e=this,t=e._self._c;return e._self._setupProxy,e.builderContextSignal.content?t("div",e._b({key:e.forceReRenderCount,ref:"elementRef",class:e._classStringToObject(e.classNameProp),attrs:{"builder-content-id":(i=e.builderContextSignal.content)==null?void 0:i.id,"builder-model":e.model},on:{click:function(o){return e.onClick(o)},initeditingbldr:function(o){return e.elementRef_onIniteditingbldr(o)},initpreviewingbldr:function(o){return e.elementRef_onInitpreviewingbldr(o)}}},"div",{...e.showContent?{}:{hidden:!0,"aria-hidden":!0}},!1),[e._t("default")],2):e._e()},I=[],M=r.normalizeComponent(_,E,I,!1,null,null,null,null);const U=M.exports;exports.default=U;
@@ -0,0 +1,86 @@
1
+ import { i as l, m as a, w as d, v as g } from "./index-2c3e3aa0.js";
2
+ const f = ({
3
+ builder: r,
4
+ context: e,
5
+ event: n,
6
+ state: i
7
+ }) => Object.entries({
8
+ state: i,
9
+ Builder: r,
10
+ // legacy
11
+ builder: r,
12
+ context: e,
13
+ event: n
14
+ }), m = () => ({
15
+ isEditing: l(),
16
+ isBrowser: a(),
17
+ isServer: !a(),
18
+ getUserAttributes: () => d()
19
+ }), v = (r, {
20
+ isExpression: e = !0
21
+ }) => /* we disable this for cases where we definitely don't want a return */ e && !(r.includes(";") || r.includes(" return ") || r.trim().startsWith("return ")) ? `return (${r});` : r, w = ({
22
+ code: r,
23
+ builder: e,
24
+ context: n,
25
+ event: i,
26
+ localState: s,
27
+ rootSetState: t,
28
+ rootState: c
29
+ }) => {
30
+ const o = f({
31
+ builder: e,
32
+ context: n,
33
+ event: i,
34
+ state: B(c, s, t)
35
+ });
36
+ return new Function(...o.map(([u]) => u), r)(...o.map(([, u]) => u));
37
+ };
38
+ function B(r, e, n) {
39
+ if (r === e)
40
+ throw new Error("rootState === localState");
41
+ return new Proxy(r, {
42
+ get: (i, s) => e && s in e ? e[s] : r[s],
43
+ set: (i, s, t) => {
44
+ if (e && s in e)
45
+ throw new Error("Writing to local state is not allowed as it is read-only.");
46
+ return r[s] = t, n == null || n(r), !0;
47
+ }
48
+ });
49
+ }
50
+ const b = (r) => (a(), w(r));
51
+ function E({
52
+ code: r,
53
+ context: e,
54
+ localState: n,
55
+ rootState: i,
56
+ rootSetState: s,
57
+ event: t,
58
+ isExpression: c = !0
59
+ }) {
60
+ if (r === "") {
61
+ g.warn("Skipping evaluation of empty code block.");
62
+ return;
63
+ }
64
+ const o = {
65
+ code: v(r, {
66
+ isExpression: c
67
+ }),
68
+ builder: m(),
69
+ context: e,
70
+ event: t,
71
+ rootSetState: s,
72
+ rootState: i,
73
+ localState: n
74
+ };
75
+ try {
76
+ return b(o);
77
+ } catch (u) {
78
+ g.error("Failed code evaluation: " + u.message, {
79
+ code: r
80
+ });
81
+ return;
82
+ }
83
+ }
84
+ export {
85
+ E as e
86
+ };
@@ -0,0 +1 @@
1
+ "use strict";const t=require("./index-0daf250a.cjs"),l=({builder:r,context:e,event:n,state:i})=>Object.entries({state:i,Builder:r,builder:r,context:e,event:n}),a=()=>({isEditing:t.isEditing(),isBrowser:t.isBrowser(),isServer:!t.isBrowser(),getUserAttributes:()=>t.getUserAttributes()}),d=(r,{isExpression:e=!0})=>e&&!(r.includes(";")||r.includes(" return ")||r.trim().startsWith("return "))?`return (${r});`:r,w=({code:r,builder:e,context:n,event:i,localState:s,rootSetState:u,rootState:g})=>{const c=l({builder:e,context:n,event:i,state:f(g,s,u)});return new Function(...c.map(([o])=>o),r)(...c.map(([,o])=>o))};function f(r,e,n){if(r===e)throw new Error("rootState === localState");return new Proxy(r,{get:(i,s)=>e&&s in e?e[s]:r[s],set:(i,s,u)=>{if(e&&s in e)throw new Error("Writing to local state is not allowed as it is read-only.");return r[s]=u,n==null||n(r),!0}})}const v=r=>(t.isBrowser(),w(r));function B({code:r,context:e,localState:n,rootState:i,rootSetState:s,event:u,isExpression:g=!0}){if(r===""){t.logger.warn("Skipping evaluation of empty code block.");return}const c={code:d(r,{isExpression:g}),builder:a(),context:e,event:u,rootSetState:s,rootState:i,localState:n};try{return v(c)}catch(o){t.logger.error("Failed code evaluation: "+o.message,{code:r});return}}exports.evaluate=B;
@@ -0,0 +1,6 @@
1
+ import type { ExecutorArgs } from './helpers.js';
2
+ /**
3
+ * Even though we have separate runtimes for browser/node/edge, sometimes frameworks will
4
+ * end up sending the server runtime code to the browser (most notably in dev mode).
5
+ */
6
+ export declare const chooseBrowserOrServerEval: (args: ExecutorArgs) => any;
@@ -1,6 +1,2 @@
1
- import type { ExecutorArgs } from './helpers.js';
2
- export type EvaluatorArgs = Omit<ExecutorArgs, 'builder' | 'event'> & {
3
- event?: Event;
4
- isExpression?: boolean;
5
- };
1
+ import type { EvaluatorArgs } from './helpers.js';
6
2
  export declare function evaluate({ code, context, localState, rootState, rootSetState, event, isExpression }: EvaluatorArgs): any;
@@ -1,5 +1,9 @@
1
1
  import type { BuilderContextInterface, BuilderRenderState } from '../../context/types.js';
2
- import type { getUserAttributes } from '../track/helpers.js';
2
+ import { getUserAttributes } from '../track/helpers.js';
3
+ export type EvaluatorArgs = Omit<ExecutorArgs, 'builder' | 'event'> & {
4
+ event?: Event;
5
+ isExpression?: boolean;
6
+ };
3
7
  export type BuilderGlobals = {
4
8
  isEditing: boolean | undefined;
5
9
  isBrowser: boolean | undefined;
@@ -16,3 +20,5 @@ export type FunctionArguments = ReturnType<typeof getFunctionArguments>;
16
20
  export declare const getFunctionArguments: ({ builder, context, event, state }: Pick<ExecutorArgs, "context" | "builder" | "event"> & {
17
21
  state: BuilderRenderState;
18
22
  }) => any;
23
+ export declare const getBuilderGlobals: () => BuilderGlobals;
24
+ export declare const parseCode: (code: string, { isExpression }: Pick<EvaluatorArgs, 'isExpression'>) => string;
@@ -1 +1 @@
1
- export { evaluator } from '../browser-runtime/index.js';
1
+ export { runInNode as evaluator } from './node-runtime.js';
@@ -0,0 +1,2 @@
1
+ import type { ExecutorArgs } from '../helpers.js';
2
+ export declare const runInNode: ({ code, builder, context, event, localState, rootSetState, rootState }: ExecutorArgs) => any;
@@ -5,11 +5,42 @@ export interface GetContentOptions {
5
5
  apiKey: string;
6
6
  /** Number of items to fetch. Default is 1 */
7
7
  limit?: number;
8
- /** User attributes to target on, such as { urlPath: '/foo', device: 'mobile', ...etc } */
8
+ /**
9
+ * Use to specify an offset for pagination of results. The default is 0.
10
+ */
11
+ offset?: number;
12
+ /**
13
+ * User attribute key value pairs to be used for targeting
14
+ * https://www.builder.io/c/docs/custom-targeting-attributes
15
+ *
16
+ * e.g.
17
+ * ```js
18
+ * userAttributes: {
19
+ * urlPath: '/',
20
+ * returnVisitor: true,
21
+ * device: 'mobile'
22
+ * }
23
+ * ```
24
+ */
9
25
  userAttributes?: (Record<string, string> & {
10
26
  urlPath?: string;
11
27
  }) | null;
12
- /** Custom query */
28
+ /**
29
+ * Mongodb style query of your data. E.g.:
30
+ *
31
+ * ```js
32
+ * query: {
33
+ * id: 'abc123',
34
+ * data: {
35
+ * myCustomField: { $gt: 20 },
36
+ * }
37
+ * }
38
+ * ```
39
+ *
40
+ * See more info on MongoDB's query operators and format.
41
+ *
42
+ * @see {@link https://docs.mongodb.com/manual/reference/operator/query/}
43
+ */
13
44
  query?: Record<string, any>;
14
45
  /**
15
46
  * Any other API options.
@@ -30,7 +61,7 @@ export interface GetContentOptions {
30
61
  */
31
62
  canTrack?: boolean;
32
63
  /**
33
- * Include references in the response. Defaults to `true`.
64
+ * Include content of references in the response. Defaults to `true`.
34
65
  * @deprecated use `enrich` instead
35
66
  */
36
67
  includeRefs?: boolean;
@@ -48,4 +79,64 @@ export interface GetContentOptions {
48
79
  * Defaults to `v3`.
49
80
  */
50
81
  apiVersion?: 'v2' | 'v3';
82
+ /**
83
+ * Only include these fields.
84
+ * Note: 'omit' takes precedence over 'fields'
85
+ *
86
+ * @example
87
+ * ```
88
+ * fields: 'id, name, data.customField'
89
+ * ```
90
+ */
91
+ fields?: string;
92
+ /**
93
+ * Omit only these fields.
94
+ * Note: 'omit' takes precedence over 'fields'
95
+ *
96
+ * @example
97
+ * ```
98
+ * omit: 'data.bigField,data.blocks'
99
+ * ```
100
+ */
101
+ omit?: string;
102
+ /**
103
+ * Seconds to cache content. Sets the max-age of the cache-control header
104
+ * response header.
105
+ *
106
+ * Use a higher value for better performance, lower for content that will change more frequently
107
+ *
108
+ * @see {@link https://www.builder.io/c/docs/query-api#__next:~:text=%26includeRefs%3Dtrue-,cacheSeconds,-No}
109
+ */
110
+ cacheSeconds?: number;
111
+ /**
112
+ * Builder.io uses stale-while-revalidate caching at the CDN level. This means we always serve
113
+ * from edge cache and update caches in the background for maximum possible performance. This also
114
+ * means that the more frequently content is requested, the more fresh it will be. The longest we
115
+ * will ever hold something in stale cache is 1 day by default, and you can set this to be shorter
116
+ * yourself as well. We suggest keeping this high unless you have content that must change rapidly
117
+ * and gets very little traffic.
118
+ *
119
+ * @see {@link https://www.fastly.com/blog/prevent-application-network-instability-serve-stale-content}
120
+ */
121
+ staleCacheSeconds?: number;
122
+ /**
123
+ * Property to order results by.
124
+ * Use 1 for ascending and -1 for descending.
125
+ *
126
+ * The key is what you're sorting on, so the following example sorts by createdDate
127
+ * and because the value is 1, the sort is ascending.
128
+ *
129
+ * @example
130
+ * ```
131
+ * createdDate: 1
132
+ * ```
133
+ */
134
+ sort?: {
135
+ [key: string]: 1 | -1;
136
+ };
137
+ /**
138
+ * Include content entries in a response that are still in
139
+ * draft mode and un-archived. Default is false.
140
+ */
141
+ includeUnpublished?: boolean;
51
142
  }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Identifies node runtime
3
+ */
4
+ export declare function isNodeRuntime(): boolean;
@@ -1 +1 @@
1
- "use strict";const r=require("./index-4480d5e4.cjs"),s=require("./evaluate-c6468e7e.cjs"),l=e=>`v-on:${e.toLowerCase()}`,i=(e,t)=>o=>s.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:o,isExpression:!1});function u(e){const t={},o=e.block.actions??{};for(const c in o){if(!o.hasOwnProperty(c))continue;const n=o[c];let a=l(c);if(e.stripPrefix)switch(r.TARGET){case"vue2":case"vue3":a=a.replace("v-on:","");break;case"svelte":a=a.replace("on:","");break}t[a]=i(n,e)}return t}exports.getBlockActions=u;
1
+ "use strict";const r=require("./index-0daf250a.cjs"),s=require("./evaluate-37bcc296.cjs"),l=e=>`v-on:${e.toLowerCase()}`,i=(e,t)=>o=>s.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:o,isExpression:!1});function u(e){const t={},o=e.block.actions??{};for(const c in o){if(!o.hasOwnProperty(c))continue;const n=o[c];let a=l(c);if(e.stripPrefix)switch(r.TARGET){case"vue2":case"vue3":a=a.replace("v-on:","");break;case"svelte":a=a.replace("on:","");break}t[a]=i(n,e)}return t}exports.getBlockActions=u;
@@ -1,5 +1,5 @@
1
- import { T as n } from "./index-cd218de0.js";
2
- import { e as s } from "./evaluate-81e9d18d.js";
1
+ import { T as n } from "./index-2c3e3aa0.js";
2
+ import { e as s } from "./evaluate-239c4f2e.js";
3
3
  const l = (e) => `v-on:${e.toLowerCase()}`, i = (e, t) => (o) => s({
4
4
  code: e,
5
5
  context: t.context,
@@ -1 +1 @@
1
- "use strict";const c=require("./index-4480d5e4.cjs"),n=require("./css-e268cc90.cjs");function i(e){const t={};if(typeof e!="string")return t;const s=e.trim().split(/\\s+/);for(const r of s)t[r]=!0;return t}function o(e){return e.class=i(e.class),e}const a=e=>({href:e.href});function u({block:e,context:t}){var r;const s={...a(e),...e.properties,"builder-id":e.id,style:e.style?l(e.style):void 0,class:[e.id,"builder-block",e.class,(r=e.properties)==null?void 0:r.class].filter(Boolean).join(" ")};return o(s)}function l(e){switch(c.TARGET){case"svelte":case"vue2":case"vue3":case"solid":return n.convertStyleMapToCSSArray(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}exports.getBlockProperties=u;
1
+ "use strict";const c=require("./index-0daf250a.cjs"),n=require("./css-c292bae4.cjs");function i(e){const t={};if(typeof e!="string")return t;const s=e.trim().split(/\\s+/);for(const r of s)t[r]=!0;return t}function o(e){return e.class=i(e.class),e}const a=e=>({href:e.href});function u({block:e,context:t}){var r;const s={...a(e),...e.properties,"builder-id":e.id,style:e.style?l(e.style):void 0,class:[e.id,"builder-block",e.class,(r=e.properties)==null?void 0:r.class].filter(Boolean).join(" ")};return o(s)}function l(e){switch(c.TARGET){case"svelte":case"vue2":case"vue3":case"solid":return n.convertStyleMapToCSSArray(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}exports.getBlockProperties=u;