@builder.io/sdk-react-native 2.0.22 → 2.0.24

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 (200) hide show
  1. package/lib/browser/commonjs/blocks/text/text.js +1 -2
  2. package/lib/browser/commonjs/blocks/text/text.js.map +1 -1
  3. package/lib/browser/commonjs/components/block/block.helpers.js +1 -2
  4. package/lib/browser/commonjs/components/block/block.helpers.js.map +1 -1
  5. package/lib/browser/commonjs/components/blocks/blocks-wrapper.js +1 -1
  6. package/lib/browser/commonjs/components/blocks/blocks-wrapper.js.map +1 -1
  7. package/lib/browser/commonjs/components/blocks/blocks.js +4 -3
  8. package/lib/browser/commonjs/components/blocks/blocks.js.map +1 -1
  9. package/lib/browser/commonjs/components/content/components/enable-editor.js +1 -2
  10. package/lib/browser/commonjs/components/content/components/enable-editor.js.map +1 -1
  11. package/lib/browser/commonjs/components/content/content.js +1 -5
  12. package/lib/browser/commonjs/components/content/content.js.map +1 -1
  13. package/lib/browser/commonjs/constants/sdk-version.js +1 -1
  14. package/lib/browser/commonjs/functions/evaluate/evaluate.js +35 -51
  15. package/lib/browser/commonjs/functions/evaluate/evaluate.js.map +1 -1
  16. package/lib/browser/commonjs/functions/evaluate/helpers.js.map +1 -1
  17. package/lib/browser/commonjs/functions/get-block-actions-handler.js +1 -2
  18. package/lib/browser/commonjs/functions/get-block-actions-handler.js.map +1 -1
  19. package/lib/browser/commonjs/functions/get-processed-block.js +1 -2
  20. package/lib/browser/commonjs/functions/get-processed-block.js.map +1 -1
  21. package/lib/browser/commonjs/helpers/cookie.js +1 -3
  22. package/lib/browser/commonjs/helpers/cookie.js.map +1 -1
  23. package/lib/browser/module/blocks/text/text.js +1 -2
  24. package/lib/browser/module/blocks/text/text.js.map +1 -1
  25. package/lib/browser/module/components/block/block.helpers.js +1 -2
  26. package/lib/browser/module/components/block/block.helpers.js.map +1 -1
  27. package/lib/browser/module/components/blocks/blocks-wrapper.js +1 -1
  28. package/lib/browser/module/components/blocks/blocks-wrapper.js.map +1 -1
  29. package/lib/browser/module/components/blocks/blocks.js +4 -3
  30. package/lib/browser/module/components/blocks/blocks.js.map +1 -1
  31. package/lib/browser/module/components/content/components/enable-editor.js +1 -2
  32. package/lib/browser/module/components/content/components/enable-editor.js.map +1 -1
  33. package/lib/browser/module/components/content/content.js +1 -5
  34. package/lib/browser/module/components/content/content.js.map +1 -1
  35. package/lib/browser/module/constants/sdk-version.js +1 -1
  36. package/lib/browser/module/functions/evaluate/evaluate.js +32 -51
  37. package/lib/browser/module/functions/evaluate/evaluate.js.map +1 -1
  38. package/lib/browser/module/functions/evaluate/helpers.js.map +1 -1
  39. package/lib/browser/module/functions/get-block-actions-handler.js +1 -2
  40. package/lib/browser/module/functions/get-block-actions-handler.js.map +1 -1
  41. package/lib/browser/module/functions/get-processed-block.js +1 -2
  42. package/lib/browser/module/functions/get-processed-block.js.map +1 -1
  43. package/lib/browser/module/helpers/cookie.js +1 -3
  44. package/lib/browser/module/helpers/cookie.js.map +1 -1
  45. package/lib/browser/typescript/components/block/block.helpers.d.ts.map +1 -1
  46. package/lib/browser/typescript/components/blocks/blocks-wrapper.d.ts +1 -0
  47. package/lib/browser/typescript/components/blocks/blocks-wrapper.d.ts.map +1 -1
  48. package/lib/browser/typescript/components/blocks/blocks.d.ts.map +1 -1
  49. package/lib/browser/typescript/components/blocks/blocks.types.d.ts +2 -1
  50. package/lib/browser/typescript/components/blocks/blocks.types.d.ts.map +1 -1
  51. package/lib/browser/typescript/components/content/components/enable-editor.d.ts.map +1 -1
  52. package/lib/browser/typescript/components/content/content.d.ts.map +1 -1
  53. package/lib/browser/typescript/constants/sdk-version.d.ts +1 -1
  54. package/lib/browser/typescript/functions/evaluate/evaluate.d.ts +2 -1
  55. package/lib/browser/typescript/functions/evaluate/evaluate.d.ts.map +1 -1
  56. package/lib/browser/typescript/functions/evaluate/helpers.d.ts +0 -1
  57. package/lib/browser/typescript/functions/evaluate/helpers.d.ts.map +1 -1
  58. package/lib/browser/typescript/functions/get-block-actions-handler.d.ts.map +1 -1
  59. package/lib/browser/typescript/functions/get-processed-block.d.ts.map +1 -1
  60. package/lib/browser/typescript/functions/get.d.ts +2 -0
  61. package/lib/browser/typescript/functions/get.d.ts.map +1 -0
  62. package/lib/browser/typescript/helpers/cookie.d.ts.map +1 -1
  63. package/lib/edge/commonjs/blocks/text/text.js +1 -2
  64. package/lib/edge/commonjs/blocks/text/text.js.map +1 -1
  65. package/lib/edge/commonjs/components/block/block.helpers.js +1 -2
  66. package/lib/edge/commonjs/components/block/block.helpers.js.map +1 -1
  67. package/lib/edge/commonjs/components/blocks/blocks-wrapper.js +1 -1
  68. package/lib/edge/commonjs/components/blocks/blocks-wrapper.js.map +1 -1
  69. package/lib/edge/commonjs/components/blocks/blocks.js +4 -3
  70. package/lib/edge/commonjs/components/blocks/blocks.js.map +1 -1
  71. package/lib/edge/commonjs/components/content/components/enable-editor.js +1 -2
  72. package/lib/edge/commonjs/components/content/components/enable-editor.js.map +1 -1
  73. package/lib/edge/commonjs/components/content/content.js +1 -5
  74. package/lib/edge/commonjs/components/content/content.js.map +1 -1
  75. package/lib/edge/commonjs/constants/sdk-version.js +1 -1
  76. package/lib/edge/commonjs/functions/evaluate/evaluate.js +35 -51
  77. package/lib/edge/commonjs/functions/evaluate/evaluate.js.map +1 -1
  78. package/lib/edge/commonjs/functions/evaluate/helpers.js.map +1 -1
  79. package/lib/edge/commonjs/functions/get-block-actions-handler.js +1 -2
  80. package/lib/edge/commonjs/functions/get-block-actions-handler.js.map +1 -1
  81. package/lib/edge/commonjs/functions/get-processed-block.js +1 -2
  82. package/lib/edge/commonjs/functions/get-processed-block.js.map +1 -1
  83. package/lib/edge/commonjs/helpers/cookie.js +1 -3
  84. package/lib/edge/commonjs/helpers/cookie.js.map +1 -1
  85. package/lib/edge/module/blocks/text/text.js +1 -2
  86. package/lib/edge/module/blocks/text/text.js.map +1 -1
  87. package/lib/edge/module/components/block/block.helpers.js +1 -2
  88. package/lib/edge/module/components/block/block.helpers.js.map +1 -1
  89. package/lib/edge/module/components/blocks/blocks-wrapper.js +1 -1
  90. package/lib/edge/module/components/blocks/blocks-wrapper.js.map +1 -1
  91. package/lib/edge/module/components/blocks/blocks.js +4 -3
  92. package/lib/edge/module/components/blocks/blocks.js.map +1 -1
  93. package/lib/edge/module/components/content/components/enable-editor.js +1 -2
  94. package/lib/edge/module/components/content/components/enable-editor.js.map +1 -1
  95. package/lib/edge/module/components/content/content.js +1 -5
  96. package/lib/edge/module/components/content/content.js.map +1 -1
  97. package/lib/edge/module/constants/sdk-version.js +1 -1
  98. package/lib/edge/module/functions/evaluate/evaluate.js +32 -51
  99. package/lib/edge/module/functions/evaluate/evaluate.js.map +1 -1
  100. package/lib/edge/module/functions/evaluate/helpers.js.map +1 -1
  101. package/lib/edge/module/functions/get-block-actions-handler.js +1 -2
  102. package/lib/edge/module/functions/get-block-actions-handler.js.map +1 -1
  103. package/lib/edge/module/functions/get-processed-block.js +1 -2
  104. package/lib/edge/module/functions/get-processed-block.js.map +1 -1
  105. package/lib/edge/module/helpers/cookie.js +1 -3
  106. package/lib/edge/module/helpers/cookie.js.map +1 -1
  107. package/lib/edge/typescript/components/block/block.helpers.d.ts.map +1 -1
  108. package/lib/edge/typescript/components/blocks/blocks-wrapper.d.ts +1 -0
  109. package/lib/edge/typescript/components/blocks/blocks-wrapper.d.ts.map +1 -1
  110. package/lib/edge/typescript/components/blocks/blocks.d.ts.map +1 -1
  111. package/lib/edge/typescript/components/blocks/blocks.types.d.ts +2 -1
  112. package/lib/edge/typescript/components/blocks/blocks.types.d.ts.map +1 -1
  113. package/lib/edge/typescript/components/content/components/enable-editor.d.ts.map +1 -1
  114. package/lib/edge/typescript/components/content/content.d.ts.map +1 -1
  115. package/lib/edge/typescript/constants/sdk-version.d.ts +1 -1
  116. package/lib/edge/typescript/functions/evaluate/evaluate.d.ts +2 -1
  117. package/lib/edge/typescript/functions/evaluate/evaluate.d.ts.map +1 -1
  118. package/lib/edge/typescript/functions/evaluate/helpers.d.ts +0 -1
  119. package/lib/edge/typescript/functions/evaluate/helpers.d.ts.map +1 -1
  120. package/lib/edge/typescript/functions/get-block-actions-handler.d.ts.map +1 -1
  121. package/lib/edge/typescript/functions/get-processed-block.d.ts.map +1 -1
  122. package/lib/edge/typescript/functions/get.d.ts +2 -0
  123. package/lib/edge/typescript/functions/get.d.ts.map +1 -0
  124. package/lib/edge/typescript/helpers/cookie.d.ts.map +1 -1
  125. package/lib/node/commonjs/blocks/text/text.js +1 -2
  126. package/lib/node/commonjs/blocks/text/text.js.map +1 -1
  127. package/lib/node/commonjs/components/block/block.helpers.js +1 -2
  128. package/lib/node/commonjs/components/block/block.helpers.js.map +1 -1
  129. package/lib/node/commonjs/components/blocks/blocks-wrapper.js +1 -1
  130. package/lib/node/commonjs/components/blocks/blocks-wrapper.js.map +1 -1
  131. package/lib/node/commonjs/components/blocks/blocks.js +4 -3
  132. package/lib/node/commonjs/components/blocks/blocks.js.map +1 -1
  133. package/lib/node/commonjs/components/content/components/enable-editor.js +1 -2
  134. package/lib/node/commonjs/components/content/components/enable-editor.js.map +1 -1
  135. package/lib/node/commonjs/components/content/content.js +1 -5
  136. package/lib/node/commonjs/components/content/content.js.map +1 -1
  137. package/lib/node/commonjs/constants/sdk-version.js +1 -1
  138. package/lib/node/commonjs/functions/evaluate/evaluate.js +35 -51
  139. package/lib/node/commonjs/functions/evaluate/evaluate.js.map +1 -1
  140. package/lib/node/commonjs/functions/evaluate/helpers.js.map +1 -1
  141. package/lib/node/commonjs/functions/get-block-actions-handler.js +1 -2
  142. package/lib/node/commonjs/functions/get-block-actions-handler.js.map +1 -1
  143. package/lib/node/commonjs/functions/get-processed-block.js +1 -2
  144. package/lib/node/commonjs/functions/get-processed-block.js.map +1 -1
  145. package/lib/node/commonjs/helpers/cookie.js +1 -3
  146. package/lib/node/commonjs/helpers/cookie.js.map +1 -1
  147. package/lib/node/module/blocks/text/text.js +1 -2
  148. package/lib/node/module/blocks/text/text.js.map +1 -1
  149. package/lib/node/module/components/block/block.helpers.js +1 -2
  150. package/lib/node/module/components/block/block.helpers.js.map +1 -1
  151. package/lib/node/module/components/blocks/blocks-wrapper.js +1 -1
  152. package/lib/node/module/components/blocks/blocks-wrapper.js.map +1 -1
  153. package/lib/node/module/components/blocks/blocks.js +4 -3
  154. package/lib/node/module/components/blocks/blocks.js.map +1 -1
  155. package/lib/node/module/components/content/components/enable-editor.js +1 -2
  156. package/lib/node/module/components/content/components/enable-editor.js.map +1 -1
  157. package/lib/node/module/components/content/content.js +1 -5
  158. package/lib/node/module/components/content/content.js.map +1 -1
  159. package/lib/node/module/constants/sdk-version.js +1 -1
  160. package/lib/node/module/functions/evaluate/evaluate.js +32 -51
  161. package/lib/node/module/functions/evaluate/evaluate.js.map +1 -1
  162. package/lib/node/module/functions/evaluate/helpers.js.map +1 -1
  163. package/lib/node/module/functions/get-block-actions-handler.js +1 -2
  164. package/lib/node/module/functions/get-block-actions-handler.js.map +1 -1
  165. package/lib/node/module/functions/get-processed-block.js +1 -2
  166. package/lib/node/module/functions/get-processed-block.js.map +1 -1
  167. package/lib/node/module/helpers/cookie.js +1 -3
  168. package/lib/node/module/helpers/cookie.js.map +1 -1
  169. package/lib/node/typescript/components/block/block.helpers.d.ts.map +1 -1
  170. package/lib/node/typescript/components/blocks/blocks-wrapper.d.ts +1 -0
  171. package/lib/node/typescript/components/blocks/blocks-wrapper.d.ts.map +1 -1
  172. package/lib/node/typescript/components/blocks/blocks.d.ts.map +1 -1
  173. package/lib/node/typescript/components/blocks/blocks.types.d.ts +2 -1
  174. package/lib/node/typescript/components/blocks/blocks.types.d.ts.map +1 -1
  175. package/lib/node/typescript/components/content/components/enable-editor.d.ts.map +1 -1
  176. package/lib/node/typescript/components/content/content.d.ts.map +1 -1
  177. package/lib/node/typescript/constants/sdk-version.d.ts +1 -1
  178. package/lib/node/typescript/functions/evaluate/evaluate.d.ts +2 -1
  179. package/lib/node/typescript/functions/evaluate/evaluate.d.ts.map +1 -1
  180. package/lib/node/typescript/functions/evaluate/helpers.d.ts +0 -1
  181. package/lib/node/typescript/functions/evaluate/helpers.d.ts.map +1 -1
  182. package/lib/node/typescript/functions/get-block-actions-handler.d.ts.map +1 -1
  183. package/lib/node/typescript/functions/get-processed-block.d.ts.map +1 -1
  184. package/lib/node/typescript/functions/get.d.ts +2 -0
  185. package/lib/node/typescript/functions/get.d.ts.map +1 -0
  186. package/lib/node/typescript/helpers/cookie.d.ts.map +1 -1
  187. package/package.json +1 -1
  188. package/src/blocks/text/text.tsx +1 -1
  189. package/src/components/block/block.helpers.ts +1 -2
  190. package/src/components/blocks/blocks-wrapper.tsx +8 -1
  191. package/src/components/blocks/blocks.tsx +4 -3
  192. package/src/components/blocks/blocks.types.ts +2 -1
  193. package/src/components/content/components/enable-editor.tsx +0 -1
  194. package/src/components/content/content.tsx +0 -4
  195. package/src/constants/sdk-version.ts +1 -1
  196. package/src/functions/evaluate/evaluate.ts +33 -54
  197. package/src/functions/evaluate/helpers.ts +0 -1
  198. package/src/functions/get-block-actions-handler.ts +1 -2
  199. package/src/functions/get-processed-block.ts +1 -2
  200. package/src/helpers/cookie.ts +0 -3
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/functions/evaluate/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAGvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,OAAO,CAAC,GAAG;IACpE,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AACF,MAAM,MAAM,cAAc,GAAG;IAC3B,SAAS,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B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AK,IAAI,CAAC,GAAG,SAAS,CAAC;CACrE,GAAG,kBAAkB,CA4BrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-block-actions-handler.d.ts","sourceRoot":"","sources":["../../../../src/functions/get-block-actions-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,KAAK,OAAO,GAAG;IACb,KAAK,EAAE,YAAY,CAAC;CACrB,GAAG,IAAI,CAAC,uBAAuB,EAAE,YAAY,GAAG,SAAS,GAAG,WAAW,GAAG,cAAc,CAAC,CAAC;AAC3F,KAAK,YAAY,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,GAAG,CAAC;AAC1C,eAAO,MAAM,kBAAkB,UAAW,MAAM,WAAW,OAAO,KAAG,YASnE,CAAA"}
1
+ {"version":3,"file":"get-block-actions-handler.d.ts","sourceRoot":"","sources":["../../../../src/functions/get-block-actions-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,KAAK,OAAO,GAAG;IACb,KAAK,EAAE,YAAY,CAAC;CACrB,GAAG,IAAI,CAAC,uBAAuB,EAAE,YAAY,GAAG,SAAS,GAAG,WAAW,GAAG,cAAc,CAAC,CAAC;AAC3F,KAAK,YAAY,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,GAAG,CAAC;AAC1C,eAAO,MAAM,kBAAkB,UAAW,MAAM,WAAW,OAAO,KAAG,YAQnE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-processed-block.d.ts","sourceRoot":"","sources":["../../../../src/functions/get-processed-block.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAEhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAO3D,wBAAgB,uBAAuB,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAiB1D;AAyDD,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,OAAO,EACP,sBAAsB,EACtB,UAAU,EACV,SAAS,EACT,YAAY,EACb,EAAE;IACD,KAAK,EAAE,YAAY,CAAC;IACpB;;;OAGG;IACH,sBAAsB,EAAE,OAAO,CAAC;CACjC,GAAG,IAAI,CAAC,uBAAuB,EAAE,YAAY,GAAG,SAAS,GAAG,WAAW,GAAG,cAAc,CAAC,GAAG,YAAY,CAaxG"}
1
+ {"version":3,"file":"get-processed-block.d.ts","sourceRoot":"","sources":["../../../../src/functions/get-processed-block.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAEhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAO3D,wBAAgB,uBAAuB,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAiB1D;AAwDD,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,OAAO,EACP,sBAAsB,EACtB,UAAU,EACV,SAAS,EACT,YAAY,EACb,EAAE;IACD,KAAK,EAAE,YAAY,CAAC;IACpB;;;OAGG;IACH,sBAAsB,EAAE,OAAO,CAAC;CACjC,GAAG,IAAI,CAAC,uBAAuB,EAAE,YAAY,GAAG,SAAS,GAAG,WAAW,GAAG,cAAc,CAAC,GAAG,YAAY,CAaxG"}
@@ -0,0 +1,2 @@
1
+ export declare const get: (obj: any, path: string, defaultValue?: any) => any;
2
+ //# sourceMappingURL=get.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../../src/functions/get.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,QAAS,GAAG,QAAQ,MAAM,iBAAiB,GAAG,QAG7D,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"cookie.d.ts","sourceRoot":"","sources":["../../../../src/helpers/cookie.ts"],"names":[],"mappings":"AACA,OAAO,6BAA6B,CAAC;AAMrC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAwCnD,eAAO,MAAM,aAAa,MACrB;IACD,MAAM,MAAM,CAAC;CACd,GAAG,QAAQ,KACX,GAAS,CAAC;AAEb,eAAO,MAAM,SAAS;UAId,MAAM;6BAmBb,CAAC;AAEF,eAAO,MAAM,SAAS;UAMd,MAAM;WACL,MAAM;cACH,IAAI;6BAsBf,CAAC"}
1
+ {"version":3,"file":"cookie.d.ts","sourceRoot":"","sources":["../../../../src/helpers/cookie.ts"],"names":[],"mappings":"AACA,OAAO,6BAA6B,CAAC;AAMrC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAqCnD,eAAO,MAAM,aAAa,MACrB;IACD,MAAM,MAAM,CAAC;CACd,GAAG,QAAQ,KACX,GAAS,CAAC;AAEb,eAAO,MAAM,SAAS;UAId,MAAM;6BAmBb,CAAC;AAEF,eAAO,MAAM,SAAS;UAMd,MAAM;WACL,MAAM;cACH,IAAI;6BAsBf,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-react-native",
3
3
  "description": "Builder.io SDK for React Native",
4
- "version": "2.0.22",
4
+ "version": "2.0.24",
5
5
  "homepage": "https://github.com/BuilderIO/builder/tree/main/packages/sdks/output/react-native",
6
6
  "repository": {
7
7
  "type": "git",
@@ -110,7 +110,7 @@ export default function Text(props) {
110
110
  localState,
111
111
  rootState,
112
112
  rootSetState,
113
- enableCache: false,
113
+
114
114
  }).toString()
115
115
  );
116
116
 
@@ -49,8 +49,7 @@ export const getRepeatItemData = ({
49
49
  localState: context.localState,
50
50
  rootState: context.rootState,
51
51
  rootSetState: context.rootSetState,
52
- context: context.context,
53
- enableCache: true
52
+ context: context.context
54
53
  });
55
54
  if (!Array.isArray(itemsArray)) {
56
55
  return undefined;
@@ -28,6 +28,7 @@ export type BlocksWrapperProps = {
28
28
  */
29
29
  BlocksWrapperProps: any;
30
30
  children?: any;
31
+ classNameProp?: string;
31
32
  };
32
33
  import { isEditing } from "../../functions/is-editing";
33
34
  import type { BuilderBlock } from "../../types/builder-block";
@@ -35,7 +36,13 @@ import type { BuilderBlock } from "../../types/builder-block";
35
36
  function BlocksWrapper(props: BlocksWrapperProps) {
36
37
  const blocksWrapperRef = useRef<HTMLDivElement>(null);
37
38
  function className() {
38
- return "builder-blocks" + (!props.blocks?.length ? " no-blocks" : "");
39
+ return [
40
+ "builder-blocks",
41
+ !props.blocks?.length ? "no-blocks" : "",
42
+ props.classNameProp,
43
+ ]
44
+ .filter(Boolean)
45
+ .join(" ");
39
46
  }
40
47
 
41
48
  function onClick() {
@@ -30,11 +30,12 @@ function Blocks(props: BlocksProps) {
30
30
  parent={props.parent}
31
31
  path={props.path}
32
32
  styleProp={props.styleProp}
33
+ classNameProp={props.className}
33
34
  BlocksWrapper={
34
- props.context?.BlocksWrapper || builderContext.BlocksWrapper
35
+ props.context?.BlocksWrapper || builderContext?.BlocksWrapper
35
36
  }
36
37
  BlocksWrapperProps={
37
- props.context?.BlocksWrapperProps || builderContext.BlocksWrapperProps
38
+ props.context?.BlocksWrapperProps || builderContext?.BlocksWrapperProps
38
39
  }
39
40
  >
40
41
  {props.blocks ? (
@@ -47,7 +48,7 @@ function Blocks(props: BlocksProps) {
47
48
  context={props.context || builderContext}
48
49
  registeredComponents={
49
50
  props.registeredComponents ||
50
- componentsContext.registeredComponents
51
+ componentsContext?.registeredComponents
51
52
  }
52
53
  />
53
54
  ))}
@@ -1,7 +1,8 @@
1
1
  import type { BuilderContextInterface, RegisteredComponents } from '../../context/types';
2
2
  import type { BlocksWrapperProps } from './blocks-wrapper';
3
- export type BlocksProps = Partial<Omit<BlocksWrapperProps, 'BlocksWrapper' | 'BlocksWrapperProps'>> & {
3
+ export type BlocksProps = Partial<Omit<BlocksWrapperProps, 'BlocksWrapper' | 'BlocksWrapperProps' | 'classNameProp'>> & {
4
4
  context?: BuilderContextInterface;
5
5
  registeredComponents?: RegisteredComponents;
6
6
  linkComponent?: any;
7
+ className?: string;
7
8
  }
@@ -186,7 +186,6 @@ function EnableEditor(props: BuilderEditorProps) {
186
186
  localState: undefined,
187
187
  rootState: props.builderContextSignal.rootState,
188
188
  rootSetState: props.builderContextSignal.rootSetState,
189
- enableCache: true,
190
189
  })
191
190
  )
192
191
  );
@@ -137,10 +137,6 @@ function ContentComponent(props: ContentProps) {
137
137
  }));
138
138
  },
139
139
  isExpression: false,
140
- /**
141
- * We don't want to cache the result of the JS code, since it's arbitrary side effect code.
142
- */
143
- enableCache: false,
144
140
  });
145
141
  }
146
142
  hasInitialized.current = true;
@@ -1 +1 @@
1
- export const SDK_VERSION = "2.0.22"
1
+ export const SDK_VERSION = "2.0.24"
@@ -1,48 +1,25 @@
1
1
  import { logger } from '../../helpers/logger';
2
+ import { get } from '../get';
2
3
  import { chooseBrowserOrServerEval } from './choose-eval';
3
4
  import type { EvaluatorArgs, ExecutorArgs } from './helpers';
4
5
  import { getBuilderGlobals, parseCode } from './helpers';
5
-
6
- // Caching is dangerous for several reasons
7
- // - JSON.stringify is not safe to run on things like `context`
8
- // because anything can be passed, including non-stringifiable objects,
9
- // circiular references, etc.
10
- // - JSON.stringify is expensive to run as a cache key
11
- // - This likely only helped because we were running processBlock multiple times
12
- // but that is not fixed, and this will cause bugs and issues if enabled
13
- //
14
- // Perhaps the best approach is to allow users to configure if caching is enabled or not
15
- // for instance on edge runtimes with slower evaluation times via the interpreter
16
- // That said, the repeat processBLock calls was making any evaluation time 10x+ slower
17
- // which is now fixed, so this still may not be necessary
18
- const DISABLE_CACHE = true;
19
6
  type EvalValue = unknown;
20
- class EvalCache {
21
- static cacheLimit = 20;
22
- static cache = new Map<string, {
23
- value: EvalValue;
24
- } | undefined>();
25
- static getCacheKey(args: ExecutorArgs) {
26
- return JSON.stringify({
27
- ...args,
28
- // replace the event with a random number to break cache
29
- // thats because we can't serialize the event object due to circular refs in DOM node refs.
30
- event: args.event ? Math.random() : undefined
31
- });
32
- }
33
- static getCachedValue(key: string) {
34
- const cachedVal = EvalCache.cache.get(key);
35
- return cachedVal;
36
- }
37
- static setCachedValue(key: string, value: EvalValue) {
38
- if (EvalCache.cache.size > 20) {
39
- EvalCache.cache.delete(EvalCache.cache.keys().next().value);
40
- }
41
- EvalCache.cache.set(key, {
42
- value
43
- });
44
- }
45
- }
7
+
8
+ /**
9
+ * handles multi-level gets on state: `state.x.y.z`
10
+ * does not handle bracket notation
11
+ * see https://regexr.com/87a9j
12
+ */
13
+ const STATE_GETTER_REGEX = /^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/;
14
+
15
+ /**
16
+ * Handles multi-level gets on state transpiled by rollup with virtual index.
17
+ * see https://regexr.com/87ai4
18
+ */
19
+ const VIRTUAL_INDEX_REGEX = /(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/;
20
+ export const getSimpleExpressionGetPath = (code: string) => {
21
+ return STATE_GETTER_REGEX.exec(code.trim())?.groups?.getPath?.slice(1) || VIRTUAL_INDEX_REGEX.exec(code.trim())?.groups?.getPath?.slice(1);
22
+ };
46
23
  export function evaluate({
47
24
  code,
48
25
  context,
@@ -50,12 +27,25 @@ export function evaluate({
50
27
  rootState,
51
28
  rootSetState,
52
29
  event,
53
- isExpression = true,
54
- enableCache
30
+ isExpression = true
55
31
  }: EvaluatorArgs): EvalValue {
56
- if (code === '') {
32
+ if (code.trim() === '') {
57
33
  return undefined;
58
34
  }
35
+
36
+ /**
37
+ * For very simple expressions like "state.foo" we can optimize by skipping
38
+ * the executor altogether.
39
+ * We try not to take many risks with this optimizations, so we only do it for
40
+ * `state.{path}` expressions.
41
+ */
42
+ const getPath = getSimpleExpressionGetPath(code.trim());
43
+ if (getPath) {
44
+ return get({
45
+ ...rootState,
46
+ ...localState
47
+ }, getPath);
48
+ }
59
49
  const args: ExecutorArgs = {
60
50
  code: parseCode(code, {
61
51
  isExpression
@@ -67,19 +57,8 @@ export function evaluate({
67
57
  rootState,
68
58
  localState
69
59
  };
70
- if (enableCache && !DISABLE_CACHE) {
71
- const cacheKey = EvalCache.getCacheKey(args);
72
- const cachedValue = EvalCache.getCachedValue(cacheKey);
73
- if (cachedValue) {
74
- return cachedValue.value;
75
- }
76
- }
77
60
  try {
78
61
  const newEval = chooseBrowserOrServerEval(args);
79
- if (enableCache) {
80
- const cacheKey = EvalCache.getCacheKey(args);
81
- EvalCache.setCachedValue(cacheKey, newEval);
82
- }
83
62
  return newEval;
84
63
  } catch (e: any) {
85
64
  logger.error('Failed code evaluation: ' + e.message, {
@@ -5,7 +5,6 @@ import { getUserAttributes } from '../track/helpers';
5
5
  export type EvaluatorArgs = Omit<ExecutorArgs, 'builder' | 'event'> & {
6
6
  event?: Event;
7
7
  isExpression?: boolean;
8
- enableCache: boolean;
9
8
  };
10
9
  export type BuilderGlobals = {
11
10
  isEditing: boolean | undefined;
@@ -12,6 +12,5 @@ export const createEventHandler = (value: string, options: Options): EventHandle
12
12
  rootState: options.rootState,
13
13
  rootSetState: options.rootSetState,
14
14
  event,
15
- isExpression: false,
16
- enableCache: true
15
+ isExpression: false
17
16
  })
@@ -75,8 +75,7 @@ const evaluateBindings = ({
75
75
  localState,
76
76
  rootState,
77
77
  rootSetState,
78
- context,
79
- enableCache: true
78
+ context
80
79
  });
81
80
  set(copied, binding, value);
82
81
  }
@@ -32,9 +32,6 @@ const initStorage = () => {
32
32
  // expire time, default: 1 day (1000 * 3600 * 24 milliseconds).
33
33
  // can be null, which means never expire.
34
34
  defaultExpires: ONE_DAY * 30,
35
-
36
- // cache data in the memory. default is true.
37
- enableCache: true,
38
35
  });
39
36
 
40
37
  return storage;