@builder.io/react 8.0.5 → 8.0.6-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (231) hide show
  1. package/.npmrc +1 -0
  2. package/package.json +5 -4
  3. package/scripts/fix-core-version.sh +0 -0
  4. package/scripts/set-sdk-version.sh +0 -0
  5. package/src/components/builder-block.component.tsx +9 -0
  6. package/src/components/builder-component.component.tsx +1 -0
  7. package/src/constants/device-sizes.constant.ts +22 -6
  8. package/.yarnrc.yml +0 -1
  9. package/dist/builder-react-lite.cjs.js +0 -2
  10. package/dist/builder-react-lite.cjs.js.map +0 -1
  11. package/dist/builder-react-lite.esm.js +0 -2
  12. package/dist/builder-react-lite.esm.js.map +0 -1
  13. package/dist/builder-react.browser.js +0 -11
  14. package/dist/builder-react.browser.js.map +0 -1
  15. package/dist/builder-react.cjs.js +0 -2
  16. package/dist/builder-react.cjs.js.map +0 -1
  17. package/dist/builder-react.es5.js +0 -2
  18. package/dist/builder-react.es5.js.map +0 -1
  19. package/dist/builder-react.unpkg.js +0 -11
  20. package/dist/builder-react.unpkg.js.map +0 -1
  21. package/dist/lib/lib/on-change.js +0 -228
  22. package/dist/lib/lib/on-change.js.map +0 -1
  23. package/dist/lib/package.json +0 -109
  24. package/dist/lib/rollup.config.js +0 -131
  25. package/dist/lib/rollup.config.js.map +0 -1
  26. package/dist/lib/src/blocks/Button.js +0 -86
  27. package/dist/lib/src/blocks/Button.js.map +0 -1
  28. package/dist/lib/src/blocks/Columns.js +0 -243
  29. package/dist/lib/src/blocks/Columns.js.map +0 -1
  30. package/dist/lib/src/blocks/CustomCode.js +0 -227
  31. package/dist/lib/src/blocks/CustomCode.js.map +0 -1
  32. package/dist/lib/src/blocks/Embed.js +0 -114
  33. package/dist/lib/src/blocks/Embed.js.map +0 -1
  34. package/dist/lib/src/blocks/Fragment.js +0 -45
  35. package/dist/lib/src/blocks/Fragment.js.map +0 -1
  36. package/dist/lib/src/blocks/Image.js +0 -532
  37. package/dist/lib/src/blocks/Image.js.map +0 -1
  38. package/dist/lib/src/blocks/Mutation.js +0 -93
  39. package/dist/lib/src/blocks/Mutation.js.map +0 -1
  40. package/dist/lib/src/blocks/PersonalizationContainer.js +0 -174
  41. package/dist/lib/src/blocks/PersonalizationContainer.js.map +0 -1
  42. package/dist/lib/src/blocks/Router.js +0 -354
  43. package/dist/lib/src/blocks/Router.js.map +0 -1
  44. package/dist/lib/src/blocks/Section.js +0 -150
  45. package/dist/lib/src/blocks/Section.js.map +0 -1
  46. package/dist/lib/src/blocks/Slot.js +0 -41
  47. package/dist/lib/src/blocks/Slot.js.map +0 -1
  48. package/dist/lib/src/blocks/StateProvider.js +0 -61
  49. package/dist/lib/src/blocks/StateProvider.js.map +0 -1
  50. package/dist/lib/src/blocks/Symbol.js +0 -192
  51. package/dist/lib/src/blocks/Symbol.js.map +0 -1
  52. package/dist/lib/src/blocks/Text.js +0 -132
  53. package/dist/lib/src/blocks/Text.js.map +0 -1
  54. package/dist/lib/src/blocks/Video.js +0 -261
  55. package/dist/lib/src/blocks/Video.js.map +0 -1
  56. package/dist/lib/src/blocks/forms/Button.js +0 -74
  57. package/dist/lib/src/blocks/forms/Button.js.map +0 -1
  58. package/dist/lib/src/blocks/forms/Form.js +0 -590
  59. package/dist/lib/src/blocks/forms/Form.js.map +0 -1
  60. package/dist/lib/src/blocks/forms/Input.js +0 -133
  61. package/dist/lib/src/blocks/forms/Input.js.map +0 -1
  62. package/dist/lib/src/blocks/forms/Label.js +0 -81
  63. package/dist/lib/src/blocks/forms/Label.js.map +0 -1
  64. package/dist/lib/src/blocks/forms/Select.js +0 -104
  65. package/dist/lib/src/blocks/forms/Select.js.map +0 -1
  66. package/dist/lib/src/blocks/forms/TextArea.js +0 -89
  67. package/dist/lib/src/blocks/forms/TextArea.js.map +0 -1
  68. package/dist/lib/src/blocks/raw/Img.js +0 -66
  69. package/dist/lib/src/blocks/raw/Img.js.map +0 -1
  70. package/dist/lib/src/blocks/raw/RawText.js +0 -47
  71. package/dist/lib/src/blocks/raw/RawText.js.map +0 -1
  72. package/dist/lib/src/builder-react-lite.js +0 -31
  73. package/dist/lib/src/builder-react-lite.js.map +0 -1
  74. package/dist/lib/src/builder-react.js +0 -106
  75. package/dist/lib/src/builder-react.js.map +0 -1
  76. package/dist/lib/src/components/Link.js +0 -35
  77. package/dist/lib/src/components/Link.js.map +0 -1
  78. package/dist/lib/src/components/builder-block.component.js +0 -550
  79. package/dist/lib/src/components/builder-block.component.js.map +0 -1
  80. package/dist/lib/src/components/builder-blocks.component.js +0 -167
  81. package/dist/lib/src/components/builder-blocks.component.js.map +0 -1
  82. package/dist/lib/src/components/builder-component.component.js +0 -1125
  83. package/dist/lib/src/components/builder-component.component.js.map +0 -1
  84. package/dist/lib/src/components/builder-content.component.js +0 -321
  85. package/dist/lib/src/components/builder-content.component.js.map +0 -1
  86. package/dist/lib/src/components/insert-spacer.component.js +0 -106
  87. package/dist/lib/src/components/insert-spacer.component.js.map +0 -1
  88. package/dist/lib/src/components/no-wrap.js +0 -7
  89. package/dist/lib/src/components/no-wrap.js.map +0 -1
  90. package/dist/lib/src/components/variants-provider.component.js +0 -108
  91. package/dist/lib/src/components/variants-provider.component.js.map +0 -1
  92. package/dist/lib/src/constants/device-sizes.constant.js +0 -80
  93. package/dist/lib/src/constants/device-sizes.constant.js.map +0 -1
  94. package/dist/lib/src/constants/file-types.constant.js +0 -72
  95. package/dist/lib/src/constants/file-types.constant.js.map +0 -1
  96. package/dist/lib/src/decorators/builder-block.decorator.js +0 -10
  97. package/dist/lib/src/decorators/builder-block.decorator.js.map +0 -1
  98. package/dist/lib/src/functions/apply-patch-with-mutation.js +0 -80
  99. package/dist/lib/src/functions/apply-patch-with-mutation.js.map +0 -1
  100. package/dist/lib/src/functions/apply-patch-with-mutation.test.js +0 -54
  101. package/dist/lib/src/functions/apply-patch-with-mutation.test.js.map +0 -1
  102. package/dist/lib/src/functions/block-to-html-string.js +0 -21
  103. package/dist/lib/src/functions/block-to-html-string.js.map +0 -1
  104. package/dist/lib/src/functions/debonce-next-tick.js +0 -43
  105. package/dist/lib/src/functions/debonce-next-tick.js.map +0 -1
  106. package/dist/lib/src/functions/extract-localized-values.js +0 -35
  107. package/dist/lib/src/functions/extract-localized-values.js.map +0 -1
  108. package/dist/lib/src/functions/filter-with-custom-targeting.js +0 -88
  109. package/dist/lib/src/functions/filter-with-custom-targeting.js.map +0 -1
  110. package/dist/lib/src/functions/get-builder-pixel.js +0 -27
  111. package/dist/lib/src/functions/get-builder-pixel.js.map +0 -1
  112. package/dist/lib/src/functions/get.js +0 -12
  113. package/dist/lib/src/functions/get.js.map +0 -1
  114. package/dist/lib/src/functions/is-debug.js +0 -8
  115. package/dist/lib/src/functions/is-debug.js.map +0 -1
  116. package/dist/lib/src/functions/no-wrap.js +0 -60
  117. package/dist/lib/src/functions/no-wrap.js.map +0 -1
  118. package/dist/lib/src/functions/safe-dynamic-require.js +0 -51
  119. package/dist/lib/src/functions/safe-dynamic-require.js.map +0 -1
  120. package/dist/lib/src/functions/set.js +0 -21
  121. package/dist/lib/src/functions/set.js.map +0 -1
  122. package/dist/lib/src/functions/should-force-browser-runtime-in-node.js +0 -22
  123. package/dist/lib/src/functions/should-force-browser-runtime-in-node.js.map +0 -1
  124. package/dist/lib/src/functions/string-to-function.js +0 -166
  125. package/dist/lib/src/functions/string-to-function.js.map +0 -1
  126. package/dist/lib/src/functions/throttle.js +0 -42
  127. package/dist/lib/src/functions/throttle.js.map +0 -1
  128. package/dist/lib/src/functions/traverse.js +0 -72
  129. package/dist/lib/src/functions/traverse.js.map +0 -1
  130. package/dist/lib/src/functions/try-eval.js +0 -75
  131. package/dist/lib/src/functions/try-eval.js.map +0 -1
  132. package/dist/lib/src/functions/update-metadata.js +0 -42
  133. package/dist/lib/src/functions/update-metadata.js.map +0 -1
  134. package/dist/lib/src/functions/utils.js +0 -20
  135. package/dist/lib/src/functions/utils.js.map +0 -1
  136. package/dist/lib/src/functions/with-builder.js +0 -10
  137. package/dist/lib/src/functions/with-builder.js.map +0 -1
  138. package/dist/lib/src/functions/with-children.js +0 -77
  139. package/dist/lib/src/functions/with-children.js.map +0 -1
  140. package/dist/lib/src/hooks/useIsPreviewing.js +0 -16
  141. package/dist/lib/src/hooks/useIsPreviewing.js.map +0 -1
  142. package/dist/lib/src/scripts/init-editing.js +0 -18
  143. package/dist/lib/src/scripts/init-editing.js.map +0 -1
  144. package/dist/lib/src/sdk-version.js +0 -5
  145. package/dist/lib/src/sdk-version.js.map +0 -1
  146. package/dist/lib/src/store/builder-async-requests.js +0 -19
  147. package/dist/lib/src/store/builder-async-requests.js.map +0 -1
  148. package/dist/lib/src/store/builder-meta.js +0 -13
  149. package/dist/lib/src/store/builder-meta.js.map +0 -1
  150. package/dist/lib/src/store/builder-store.js +0 -15
  151. package/dist/lib/src/store/builder-store.js.map +0 -1
  152. package/dist/lib/src/to-error.js +0 -22
  153. package/dist/lib/src/to-error.js.map +0 -1
  154. package/dist/lib/test/basic.test.js +0 -212
  155. package/dist/lib/test/basic.test.js.map +0 -1
  156. package/dist/lib/test/functions/render-block.js +0 -24
  157. package/dist/lib/test/functions/render-block.js.map +0 -1
  158. package/dist/lib/test/image.test.js +0 -107
  159. package/dist/lib/test/image.test.js.map +0 -1
  160. package/dist/lib/test/setupTests.js +0 -8
  161. package/dist/lib/test/setupTests.js.map +0 -1
  162. package/dist/types/lib/on-change.d.ts +0 -8
  163. package/dist/types/rollup.config.d.ts +0 -44
  164. package/dist/types/src/blocks/Button.d.ts +0 -7
  165. package/dist/types/src/blocks/Columns.d.ts +0 -1
  166. package/dist/types/src/blocks/CustomCode.d.ts +0 -1
  167. package/dist/types/src/blocks/Embed.d.ts +0 -1
  168. package/dist/types/src/blocks/Fragment.d.ts +0 -5
  169. package/dist/types/src/blocks/Image.d.ts +0 -6
  170. package/dist/types/src/blocks/Mutation.d.ts +0 -8
  171. package/dist/types/src/blocks/PersonalizationContainer.d.ts +0 -19
  172. package/dist/types/src/blocks/Router.d.ts +0 -32
  173. package/dist/types/src/blocks/Section.d.ts +0 -1
  174. package/dist/types/src/blocks/Slot.d.ts +0 -5
  175. package/dist/types/src/blocks/StateProvider.d.ts +0 -1
  176. package/dist/types/src/blocks/Symbol.d.ts +0 -19
  177. package/dist/types/src/blocks/Text.d.ts +0 -6
  178. package/dist/types/src/blocks/Video.d.ts +0 -1
  179. package/dist/types/src/blocks/forms/Button.d.ts +0 -5
  180. package/dist/types/src/blocks/forms/Form.d.ts +0 -24
  181. package/dist/types/src/blocks/forms/Input.d.ts +0 -10
  182. package/dist/types/src/blocks/forms/Label.d.ts +0 -8
  183. package/dist/types/src/blocks/forms/Select.d.ts +0 -12
  184. package/dist/types/src/blocks/forms/TextArea.d.ts +0 -9
  185. package/dist/types/src/blocks/raw/Img.d.ts +0 -7
  186. package/dist/types/src/blocks/raw/RawText.d.ts +0 -8
  187. package/dist/types/src/builder-react-lite.d.ts +0 -17
  188. package/dist/types/src/builder-react.d.ts +0 -45
  189. package/dist/types/src/components/Link.d.ts +0 -9
  190. package/dist/types/src/components/builder-block.component.d.ts +0 -50
  191. package/dist/types/src/components/builder-blocks.component.d.ts +0 -29
  192. package/dist/types/src/components/builder-component.component.d.ts +0 -324
  193. package/dist/types/src/components/builder-content.component.d.ts +0 -271
  194. package/dist/types/src/components/insert-spacer.component.d.ts +0 -13
  195. package/dist/types/src/components/no-wrap.d.ts +0 -2
  196. package/dist/types/src/components/variants-provider.component.d.ts +0 -8
  197. package/dist/types/src/constants/device-sizes.constant.d.ts +0 -56
  198. package/dist/types/src/constants/file-types.constant.d.ts +0 -2
  199. package/dist/types/src/decorators/builder-block.decorator.d.ts +0 -5
  200. package/dist/types/src/functions/apply-patch-with-mutation.d.ts +0 -5
  201. package/dist/types/src/functions/apply-patch-with-mutation.test.d.ts +0 -1
  202. package/dist/types/src/functions/block-to-html-string.d.ts +0 -3
  203. package/dist/types/src/functions/debonce-next-tick.d.ts +0 -2
  204. package/dist/types/src/functions/extract-localized-values.d.ts +0 -2
  205. package/dist/types/src/functions/filter-with-custom-targeting.d.ts +0 -15
  206. package/dist/types/src/functions/get-builder-pixel.d.ts +0 -2
  207. package/dist/types/src/functions/get.d.ts +0 -1
  208. package/dist/types/src/functions/is-debug.d.ts +0 -1
  209. package/dist/types/src/functions/no-wrap.d.ts +0 -33
  210. package/dist/types/src/functions/safe-dynamic-require.d.ts +0 -3
  211. package/dist/types/src/functions/set.d.ts +0 -1
  212. package/dist/types/src/functions/should-force-browser-runtime-in-node.d.ts +0 -1
  213. package/dist/types/src/functions/string-to-function.d.ts +0 -7
  214. package/dist/types/src/functions/throttle.d.ts +0 -1
  215. package/dist/types/src/functions/traverse.d.ts +0 -34
  216. package/dist/types/src/functions/try-eval.d.ts +0 -1
  217. package/dist/types/src/functions/update-metadata.d.ts +0 -17
  218. package/dist/types/src/functions/utils.d.ts +0 -2
  219. package/dist/types/src/functions/with-builder.d.ts +0 -2
  220. package/dist/types/src/functions/with-children.d.ts +0 -29
  221. package/dist/types/src/hooks/useIsPreviewing.d.ts +0 -1
  222. package/dist/types/src/scripts/init-editing.d.ts +0 -1
  223. package/dist/types/src/sdk-version.d.ts +0 -1
  224. package/dist/types/src/store/builder-async-requests.d.ts +0 -13
  225. package/dist/types/src/store/builder-meta.d.ts +0 -6
  226. package/dist/types/src/store/builder-store.d.ts +0 -10
  227. package/dist/types/src/to-error.d.ts +0 -13
  228. package/dist/types/test/basic.test.d.ts +0 -4
  229. package/dist/types/test/functions/render-block.d.ts +0 -3
  230. package/dist/types/test/image.test.d.ts +0 -1
  231. package/dist/types/test/setupTests.d.ts +0 -0
@@ -1,107 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- var React = __importStar(require("react"));
27
- var Image_1 = require("../src/blocks/Image");
28
- var reactTestRenderer = __importStar(require("react-test-renderer"));
29
- var render_block_1 = require("./functions/render-block");
30
- var builder_react_1 = require("../src/builder-react");
31
- describe('Image', function () {
32
- it('Builder image url', function () {
33
- var tree = reactTestRenderer
34
- .create(React.createElement(Image_1.Image, { image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F755c131471fb49ab91dc0bdc45bc85b5?width=1003" }))
35
- .toJSON();
36
- expect(tree).toMatchSnapshot();
37
- });
38
- it('Builder image url with width', function () {
39
- var tree = reactTestRenderer
40
- .create(React.createElement(Image_1.Image, { image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F755c131471fb49ab91dc0bdc45bc85b5?width=1003" }))
41
- .toJSON();
42
- expect(tree).toMatchSnapshot();
43
- });
44
- it('Shopify image url', function () {
45
- var tree = reactTestRenderer
46
- .create(React.createElement(Image_1.Image, { image: "https://cdn.shopify.com/s/files/1/0374/6457/2041/products/valerie-elash-o1Ic6JdypmA-unsplash.jpg?v=1592506853" }))
47
- .toJSON();
48
- expect(tree).toMatchSnapshot();
49
- });
50
- it('Amp image', function () {
51
- var imageBlock = (0, render_block_1.block)('Image', {
52
- image: 'https://cdn.shopify.com/s/files/1/0374/6457/2041/products/valerie-elash-o1Ic6JdypmA-unsplash.jpg?v=1592506853',
53
- }, {
54
- responsiveStyles: {
55
- large: {
56
- width: '345px',
57
- },
58
- medium: {
59
- width: '100%',
60
- },
61
- },
62
- }, 1234);
63
- var renderedBlock = reactTestRenderer
64
- .create(React.createElement(builder_react_1.BuilderPage, { model: "page", ampMode: true, content: {
65
- data: {
66
- blocks: [imageBlock],
67
- },
68
- } }))
69
- .toJSON();
70
- expect(renderedBlock).toMatchSnapshot();
71
- });
72
- it('Lazy load', function () {
73
- var tree = reactTestRenderer
74
- .create(React.createElement(Image_1.Image, { image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F755c131471fb49ab91dc0bdc45bc85b5?width=1003", lazy: true }))
75
- .toJSON();
76
- expect(tree).toMatchSnapshot();
77
- });
78
- it('with sizes, srcset, and alt', function () {
79
- var tree = reactTestRenderer
80
- .create(React.createElement(Image_1.Image, { sizes: "(max-width: 600px) 67vw, 92vw", srcset: "nosrcset", altText: "this great image", image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F755c131471fb49ab91dc0bdc45bc85b5?width=1003", amp: "true" }))
81
- .toJSON();
82
- expect(tree).toMatchSnapshot();
83
- });
84
- it('with responsive styles', function () {
85
- var imageBlock = (0, render_block_1.block)('Image', {
86
- image: 'https://cdn.shopify.com/s/files/1/0374/6457/2041/products/valerie-elash-o1Ic6JdypmA-unsplash.jpg?v=1592506853',
87
- }, {
88
- responsiveStyles: {
89
- large: {
90
- width: '345px',
91
- },
92
- medium: {
93
- width: '100%',
94
- },
95
- },
96
- }, 1234);
97
- var renderedBlock = reactTestRenderer
98
- .create(React.createElement(builder_react_1.BuilderPage, { model: "page", content: {
99
- data: {
100
- blocks: [imageBlock],
101
- },
102
- } }))
103
- .toJSON();
104
- expect(renderedBlock).toMatchSnapshot();
105
- });
106
- });
107
- //# sourceMappingURL=image.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"image.test.js","sourceRoot":"","sources":["../../../test/image.test.tsx"],"names":[],"mappings":"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"}
@@ -1,8 +0,0 @@
1
- "use strict";
2
- beforeEach(function () {
3
- jest.spyOn(global.Math, 'random').mockReturnValue(0.123456789);
4
- });
5
- afterEach(function () {
6
- jest.spyOn(global.Math, 'random').mockRestore();
7
- });
8
- //# sourceMappingURL=setupTests.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setupTests.js","sourceRoot":"","sources":["../../../test/setupTests.ts"],"names":[],"mappings":";AAAA,UAAU,CAAC;IACT,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;AACjE,CAAC,CAAC,CAAC;AACH,SAAS,CAAC;IACR,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC;AAClD,CAAC,CAAC,CAAC"}
@@ -1,8 +0,0 @@
1
- export = onChange;
2
- declare function onChange(object: any, onChange: any, options: any): any;
3
- declare namespace onChange {
4
- export { target, unsubscribe, __esModule, onChange as default };
5
- }
6
- declare function target(proxy: any): any;
7
- declare function unsubscribe(proxy: any): any;
8
- declare const __esModule: boolean;
@@ -1,44 +0,0 @@
1
- declare const _default: ({
2
- output: {
3
- file: string;
4
- name: string;
5
- format: string;
6
- sourcemap: boolean;
7
- amd: {
8
- id: string;
9
- };
10
- };
11
- input: string;
12
- external: string[];
13
- watch: {
14
- include: string;
15
- };
16
- plugins: any[];
17
- } | {
18
- output: {
19
- file: string;
20
- format: string;
21
- sourcemap: boolean;
22
- }[];
23
- external: string[];
24
- plugins: any[];
25
- input: string;
26
- watch: {
27
- include: string;
28
- };
29
- } | {
30
- output: {
31
- file: string;
32
- format: string;
33
- name: string;
34
- sourcemap: boolean;
35
- amd?: undefined;
36
- };
37
- input: string;
38
- external: string[];
39
- watch: {
40
- include: string;
41
- };
42
- plugins: any[];
43
- })[];
44
- export default _default;
@@ -1,7 +0,0 @@
1
- export interface ButtonProps {
2
- attributes?: any;
3
- text?: string;
4
- link?: string;
5
- openLinkInNewTab?: boolean;
6
- }
7
- export declare const Button: Function;
@@ -1 +0,0 @@
1
- export declare const Columns: Function;
@@ -1 +0,0 @@
1
- export declare const CustomCode: Function;
@@ -1 +0,0 @@
1
- export declare const Embed: Function;
@@ -1,5 +0,0 @@
1
- import { BuilderElement } from '@builder.io/sdk';
2
- export interface FragmentProps {
3
- builderBlock?: BuilderElement;
4
- }
5
- export declare const Fragment: Function;
@@ -1,6 +0,0 @@
1
- import { BuilderElement } from '@builder.io/sdk';
2
- import { Breakpoints } from '../constants/device-sizes.constant';
3
- export declare function updateQueryParam(uri: string | undefined, key: string, value: string | number | boolean): string;
4
- export declare function getSrcSet(url: string): string;
5
- export declare const getSizes: (sizes: string, block: BuilderElement, contentBreakpoints?: Breakpoints) => string;
6
- export declare const Image: Function;
@@ -1,8 +0,0 @@
1
- import { BuilderElement } from '@builder.io/sdk';
2
- type MutationProps = {
3
- selector: string;
4
- builderBlock?: BuilderElement;
5
- type?: 'replace' | 'afterEnd';
6
- };
7
- export declare function Mutation(props: MutationProps): JSX.Element;
8
- export {};
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
- import { BuilderElement } from '@builder.io/sdk';
3
- import { Query } from '../functions/filter-with-custom-targeting';
4
- export type PersonalizationContainerProps = {
5
- children: React.ReactNode;
6
- previewingIndex: number | null;
7
- builderBlock?: BuilderElement;
8
- builderState: any;
9
- variants?: [
10
- {
11
- query: Query[];
12
- startDate?: string;
13
- endDate?: string;
14
- blocks: BuilderElement[];
15
- }
16
- ];
17
- attributes: any;
18
- };
19
- export declare function PersonalizationContainer(props: PersonalizationContainerProps): React.JSX.Element;
@@ -1,32 +0,0 @@
1
- import { BuilderElement } from '@builder.io/sdk';
2
- export interface RouterProps {
3
- model?: string;
4
- data?: string;
5
- content?: any;
6
- handleRouting?: boolean;
7
- builderBlock?: BuilderElement;
8
- preloadOnHover?: boolean;
9
- onRoute?: (routeEvent: RouteEvent) => void;
10
- }
11
- export interface RouteEvent {
12
- /**
13
- * Url being routed to
14
- */
15
- url: string;
16
- /**
17
- * Html anchor element the href is on that
18
- * caused the route
19
- */
20
- anchorNode: HTMLAnchorElement;
21
- /**
22
- * Has preventDefault() been called preventing
23
- * builder from routing to the clicked URL
24
- */
25
- defaultPrevented: boolean;
26
- /**
27
- * Prevents builder from handling routing for you to handle
28
- * yourself
29
- */
30
- preventDefault(): void;
31
- }
32
- export declare const Router: Function;
@@ -1 +0,0 @@
1
- export declare const Section: Function;
@@ -1,5 +0,0 @@
1
- type DropzoneProps = {
2
- name: string;
3
- };
4
- export declare function Slot(props: DropzoneProps): JSX.Element;
5
- export {};
@@ -1 +0,0 @@
1
- export declare const StateProvider: Function;
@@ -1,19 +0,0 @@
1
- import { BuilderElement } from '@builder.io/sdk';
2
- export interface SymbolInfo {
3
- model?: string;
4
- entry?: string;
5
- data?: any;
6
- content?: any;
7
- inline?: boolean;
8
- dynamic?: boolean;
9
- ownerId?: string;
10
- }
11
- export interface SymbolProps {
12
- symbol?: SymbolInfo;
13
- dataOnly?: boolean;
14
- dynamic?: boolean;
15
- builderBlock?: BuilderElement;
16
- attributes?: any;
17
- inheritState?: boolean;
18
- }
19
- export declare const Symbol: Function;
@@ -1,6 +0,0 @@
1
- import { BuilderElement } from '@builder.io/sdk';
2
- export interface TextProps {
3
- text: string;
4
- builderBlock?: BuilderElement;
5
- }
6
- export declare const Text: Function;
@@ -1 +0,0 @@
1
- export declare const Video: void;
@@ -1,5 +0,0 @@
1
- export interface ButtonProps {
2
- attributes?: any;
3
- text?: string;
4
- }
5
- export declare const FormSubmitButton: Function;
@@ -1,24 +0,0 @@
1
- import { BuilderElement } from '@builder.io/sdk';
2
- export interface FormProps {
3
- attributes?: any;
4
- name?: string;
5
- action?: string;
6
- validate?: boolean;
7
- method?: string;
8
- builderBlock?: BuilderElement;
9
- sendSubmissionsTo?: string;
10
- sendSubmissionsToEmail?: string;
11
- sendWithJs?: boolean;
12
- contentType?: string;
13
- customHeaders?: {
14
- [key: string]: string;
15
- };
16
- successUrl?: string;
17
- previewState?: string;
18
- successMessage?: BuilderElement[];
19
- errorMessage?: BuilderElement[];
20
- sendingMessage?: BuilderElement[];
21
- resetFormOnSubmit?: boolean;
22
- errorMessagePath?: string;
23
- }
24
- export declare const Form: Function;
@@ -1,10 +0,0 @@
1
- export interface FormInputProps {
2
- type?: string;
3
- attributes?: any;
4
- name?: string;
5
- value?: string;
6
- placeholder?: string;
7
- defaultValue?: string;
8
- required?: boolean;
9
- }
10
- export declare const FormInput: Function;
@@ -1,8 +0,0 @@
1
- import { BuilderElement } from '@builder.io/sdk';
2
- export interface LabelProps {
3
- attributes?: any;
4
- text?: string;
5
- for?: string;
6
- builderBlock?: BuilderElement;
7
- }
8
- export declare const Label: Function;
@@ -1,12 +0,0 @@
1
- export interface FormSelectProps {
2
- options?: {
3
- name?: string;
4
- value: string;
5
- }[];
6
- attributes?: any;
7
- name?: string;
8
- value?: string;
9
- defaultValue?: string;
10
- required?: boolean;
11
- }
12
- export declare const FormSelect: Function;
@@ -1,9 +0,0 @@
1
- export interface FormTextAreaProps {
2
- attributes?: any;
3
- name?: string;
4
- value?: string;
5
- defaultValue?: string;
6
- placeholder?: string;
7
- required?: boolean;
8
- }
9
- export declare const TextArea: Function;
@@ -1,7 +0,0 @@
1
- import { BuilderElement } from '@builder.io/sdk';
2
- export interface ImgProps {
3
- attributes?: any;
4
- image?: string;
5
- builderBlock?: BuilderElement;
6
- }
7
- export declare const Img: Function;
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- import { BuilderElement } from '@builder.io/sdk';
3
- export interface RawTextProps {
4
- attributes?: any;
5
- text?: string;
6
- builderBlock?: BuilderElement;
7
- }
8
- export declare const RawText: (props: RawTextProps) => React.JSX.Element;
@@ -1,17 +0,0 @@
1
- import './scripts/init-editing';
2
- import { builder, Builder } from '@builder.io/sdk';
3
- export { BuilderElement } from '@builder.io/sdk';
4
- export { BuilderBlocks } from './components/builder-blocks.component';
5
- export { BuilderBlock as BuilderBlockComponent } from './components/builder-block.component';
6
- export { BuilderContent } from './components/builder-content.component';
7
- import { BuilderComponent } from './components/builder-component.component';
8
- export { BuilderStoreContext } from './store/builder-store';
9
- export { BuilderMetaContext } from './store/builder-meta';
10
- export { BuilderAsyncRequestsContext } from './store/builder-async-requests';
11
- export { withChildren } from './functions/with-children';
12
- export { BuilderComponent as BuilderPage };
13
- export { BuilderComponent };
14
- export { stringToFunction } from './functions/string-to-function';
15
- export { useIsPreviewing } from './hooks/useIsPreviewing';
16
- export { builder, Builder };
17
- export default builder;
@@ -1,45 +0,0 @@
1
- import './scripts/init-editing';
2
- import { builder, Builder } from '@builder.io/sdk';
3
- export { BuilderElement } from '@builder.io/sdk';
4
- export { BuilderBlocks } from './components/builder-blocks.component';
5
- export { BuilderBlock as BuilderBlockComponent } from './components/builder-block.component';
6
- export { BuilderContent } from './components/builder-content.component';
7
- import { BuilderComponent, onChange, RegisteredComponent } from './components/builder-component.component';
8
- export { BuilderStoreContext, BuilderStore } from './store/builder-store';
9
- export { BuilderMetaContext } from './store/builder-meta';
10
- export { BuilderAsyncRequestsContext } from './store/builder-async-requests';
11
- export { BuilderBlock } from './decorators/builder-block.decorator';
12
- export * from './functions/update-metadata';
13
- export { withBuilder } from './functions/with-builder';
14
- export { withChildren } from './functions/with-children';
15
- export { noWrap } from './functions/no-wrap';
16
- export { BuilderComponent as BuilderPage, onChange, RegisteredComponent };
17
- export { BuilderComponent };
18
- export { BuilderComponent as Content };
19
- export { Text } from './blocks/Text';
20
- export { Slot as Dropzone } from './blocks/Slot';
21
- export { Fragment } from './blocks/Fragment';
22
- export { Columns } from './blocks/Columns';
23
- export { Embed } from './blocks/Embed';
24
- export { CustomCode } from './blocks/CustomCode';
25
- export { Image, getSrcSet } from './blocks/Image';
26
- export { Video } from './blocks/Video';
27
- export { Symbol } from './blocks/Symbol';
28
- export { Button } from './blocks/Button';
29
- export { Section } from './blocks/Section';
30
- export { StateProvider } from './blocks/StateProvider';
31
- export { Router } from './blocks/Router';
32
- export { Mutation } from './blocks/Mutation';
33
- export { Form } from './blocks/forms/Form';
34
- export { FormInput } from './blocks/forms/Input';
35
- export { FormSubmitButton } from './blocks/forms/Button';
36
- export { Label } from './blocks/forms/Label';
37
- export { FormSelect } from './blocks/forms/Select';
38
- export { TextArea } from './blocks/forms/TextArea';
39
- export { Img } from './blocks/raw/Img';
40
- export { RawText } from './blocks/raw/RawText';
41
- export { PersonalizationContainer } from './blocks/PersonalizationContainer';
42
- export { stringToFunction } from './functions/string-to-function';
43
- export { useIsPreviewing } from './hooks/useIsPreviewing';
44
- export { builder, Builder };
45
- export default builder;
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- /**
3
- * Link component should be used instead of an anchor tag in our components,
4
- * this is to allow our users to override anchor tags in
5
- * case they're using a routing Lib that requires using their
6
- * custom Link component (e.g Next, Gatsby, React Router)
7
- * <BuilderComponent renderLink=(props) => <myCustomLink {...props} /> />
8
- */
9
- export declare const Link: (props: React.AnchorHTMLAttributes<HTMLAnchorElement>) => React.JSX.Element;
@@ -1,50 +0,0 @@
1
- /** @jsx jsx */
2
- import { Builder, BuilderElement } from '@builder.io/sdk';
3
- import React from 'react';
4
- import { Size } from '../constants/device-sizes.constant';
5
- export declare function deepCloneWithConditions<T = any>(obj: T): T;
6
- export interface BuilderBlockProps {
7
- fieldName?: string;
8
- block: BuilderElement;
9
- child?: boolean;
10
- index?: number;
11
- size?: Size;
12
- emailMode?: boolean;
13
- }
14
- interface BuilderBlockState {
15
- state: any;
16
- rootState: any;
17
- context: any;
18
- update: Function;
19
- }
20
- export declare class BuilderBlock extends React.Component<BuilderBlockProps, {
21
- hasError: boolean;
22
- updates: number;
23
- }> {
24
- private _asyncRequests?;
25
- private _errors?;
26
- private _logs?;
27
- hydrated: boolean;
28
- state: {
29
- hasError: boolean;
30
- updates: number;
31
- };
32
- private privateState;
33
- get store(): BuilderBlockState;
34
- static getDerivedStateFromError(error: any): {
35
- hasError: boolean;
36
- };
37
- componentDidCatch(error: any, errorInfo: any): void;
38
- stringToFunction(str: string, expression?: boolean): (state: object, event?: Event | null | undefined, block?: any, builder?: Builder | undefined, Device?: any, update?: Function | null | undefined, _Builder?: typeof Builder | undefined, context?: object | undefined) => any;
39
- get block(): BuilderElement;
40
- emotionCss(responsiveStyles: BuilderElement['responsiveStyles']): any;
41
- eval(str: string): any;
42
- componentWillUnmount(): void;
43
- onWindowMessage: (event: MessageEvent) => void;
44
- componentDidMount(): void;
45
- getElement(index?: number, state?: any): React.ReactNode;
46
- get id(): string;
47
- contents(state: BuilderBlockState): string | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | JSX.Element[] | null | undefined;
48
- render(): JSX.Element;
49
- }
50
- export {};
@@ -1,29 +0,0 @@
1
- import React from 'react';
2
- import { Size } from '../constants/device-sizes.constant';
3
- export interface BuilderBlocksProps {
4
- fieldName?: string;
5
- blocks?: any[] | React.ReactNode;
6
- child?: boolean;
7
- size?: Size;
8
- style?: React.CSSProperties;
9
- parentElementId?: string;
10
- parent?: any;
11
- dataPath?: string;
12
- className?: string;
13
- emailMode?: boolean;
14
- }
15
- interface BuilderBlocksState {
16
- }
17
- export declare class BuilderBlocks extends React.Component<BuilderBlocksProps, BuilderBlocksState> {
18
- hydrated: boolean;
19
- get isRoot(): boolean;
20
- get noBlocks(): boolean;
21
- get path(): string;
22
- get parentId(): any;
23
- componentDidMount(): void;
24
- onClickEmptyBlocks: () => void;
25
- onHoverEmptyBlocks: () => void;
26
- render(): JSX.Element;
27
- static renderInto(elementOrSelector: string | HTMLElement, props: BuilderBlocksProps | undefined, builderState: any): void;
28
- }
29
- export {};