@builder.io/react 8.0.6-0 → 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 (226) hide show
  1. package/package.json +1 -1
  2. package/src/components/builder-block.component.tsx +1 -0
  3. package/src/constants/device-sizes.constant.ts +22 -15
  4. package/dist/builder-react-lite.cjs.js +0 -2
  5. package/dist/builder-react-lite.cjs.js.map +0 -1
  6. package/dist/builder-react-lite.esm.js +0 -2
  7. package/dist/builder-react-lite.esm.js.map +0 -1
  8. package/dist/builder-react.browser.js +0 -11
  9. package/dist/builder-react.browser.js.map +0 -1
  10. package/dist/builder-react.cjs.js +0 -2
  11. package/dist/builder-react.cjs.js.map +0 -1
  12. package/dist/builder-react.es5.js +0 -2
  13. package/dist/builder-react.es5.js.map +0 -1
  14. package/dist/builder-react.unpkg.js +0 -11
  15. package/dist/builder-react.unpkg.js.map +0 -1
  16. package/dist/lib/lib/on-change.js +0 -228
  17. package/dist/lib/lib/on-change.js.map +0 -1
  18. package/dist/lib/package.json +0 -109
  19. package/dist/lib/rollup.config.js +0 -131
  20. package/dist/lib/rollup.config.js.map +0 -1
  21. package/dist/lib/src/blocks/Button.js +0 -86
  22. package/dist/lib/src/blocks/Button.js.map +0 -1
  23. package/dist/lib/src/blocks/Columns.js +0 -243
  24. package/dist/lib/src/blocks/Columns.js.map +0 -1
  25. package/dist/lib/src/blocks/CustomCode.js +0 -227
  26. package/dist/lib/src/blocks/CustomCode.js.map +0 -1
  27. package/dist/lib/src/blocks/Embed.js +0 -114
  28. package/dist/lib/src/blocks/Embed.js.map +0 -1
  29. package/dist/lib/src/blocks/Fragment.js +0 -45
  30. package/dist/lib/src/blocks/Fragment.js.map +0 -1
  31. package/dist/lib/src/blocks/Image.js +0 -532
  32. package/dist/lib/src/blocks/Image.js.map +0 -1
  33. package/dist/lib/src/blocks/Mutation.js +0 -93
  34. package/dist/lib/src/blocks/Mutation.js.map +0 -1
  35. package/dist/lib/src/blocks/PersonalizationContainer.js +0 -174
  36. package/dist/lib/src/blocks/PersonalizationContainer.js.map +0 -1
  37. package/dist/lib/src/blocks/Router.js +0 -354
  38. package/dist/lib/src/blocks/Router.js.map +0 -1
  39. package/dist/lib/src/blocks/Section.js +0 -150
  40. package/dist/lib/src/blocks/Section.js.map +0 -1
  41. package/dist/lib/src/blocks/Slot.js +0 -41
  42. package/dist/lib/src/blocks/Slot.js.map +0 -1
  43. package/dist/lib/src/blocks/StateProvider.js +0 -61
  44. package/dist/lib/src/blocks/StateProvider.js.map +0 -1
  45. package/dist/lib/src/blocks/Symbol.js +0 -192
  46. package/dist/lib/src/blocks/Symbol.js.map +0 -1
  47. package/dist/lib/src/blocks/Text.js +0 -132
  48. package/dist/lib/src/blocks/Text.js.map +0 -1
  49. package/dist/lib/src/blocks/Video.js +0 -261
  50. package/dist/lib/src/blocks/Video.js.map +0 -1
  51. package/dist/lib/src/blocks/forms/Button.js +0 -74
  52. package/dist/lib/src/blocks/forms/Button.js.map +0 -1
  53. package/dist/lib/src/blocks/forms/Form.js +0 -590
  54. package/dist/lib/src/blocks/forms/Form.js.map +0 -1
  55. package/dist/lib/src/blocks/forms/Input.js +0 -133
  56. package/dist/lib/src/blocks/forms/Input.js.map +0 -1
  57. package/dist/lib/src/blocks/forms/Label.js +0 -81
  58. package/dist/lib/src/blocks/forms/Label.js.map +0 -1
  59. package/dist/lib/src/blocks/forms/Select.js +0 -104
  60. package/dist/lib/src/blocks/forms/Select.js.map +0 -1
  61. package/dist/lib/src/blocks/forms/TextArea.js +0 -89
  62. package/dist/lib/src/blocks/forms/TextArea.js.map +0 -1
  63. package/dist/lib/src/blocks/raw/Img.js +0 -66
  64. package/dist/lib/src/blocks/raw/Img.js.map +0 -1
  65. package/dist/lib/src/blocks/raw/RawText.js +0 -47
  66. package/dist/lib/src/blocks/raw/RawText.js.map +0 -1
  67. package/dist/lib/src/builder-react-lite.js +0 -31
  68. package/dist/lib/src/builder-react-lite.js.map +0 -1
  69. package/dist/lib/src/builder-react.js +0 -106
  70. package/dist/lib/src/builder-react.js.map +0 -1
  71. package/dist/lib/src/components/Link.js +0 -35
  72. package/dist/lib/src/components/Link.js.map +0 -1
  73. package/dist/lib/src/components/builder-block.component.js +0 -555
  74. package/dist/lib/src/components/builder-block.component.js.map +0 -1
  75. package/dist/lib/src/components/builder-blocks.component.js +0 -167
  76. package/dist/lib/src/components/builder-blocks.component.js.map +0 -1
  77. package/dist/lib/src/components/builder-component.component.js +0 -1126
  78. package/dist/lib/src/components/builder-component.component.js.map +0 -1
  79. package/dist/lib/src/components/builder-content.component.js +0 -321
  80. package/dist/lib/src/components/builder-content.component.js.map +0 -1
  81. package/dist/lib/src/components/insert-spacer.component.js +0 -106
  82. package/dist/lib/src/components/insert-spacer.component.js.map +0 -1
  83. package/dist/lib/src/components/no-wrap.js +0 -7
  84. package/dist/lib/src/components/no-wrap.js.map +0 -1
  85. package/dist/lib/src/components/variants-provider.component.js +0 -108
  86. package/dist/lib/src/components/variants-provider.component.js.map +0 -1
  87. package/dist/lib/src/constants/device-sizes.constant.js +0 -86
  88. package/dist/lib/src/constants/device-sizes.constant.js.map +0 -1
  89. package/dist/lib/src/constants/file-types.constant.js +0 -72
  90. package/dist/lib/src/constants/file-types.constant.js.map +0 -1
  91. package/dist/lib/src/decorators/builder-block.decorator.js +0 -10
  92. package/dist/lib/src/decorators/builder-block.decorator.js.map +0 -1
  93. package/dist/lib/src/functions/apply-patch-with-mutation.js +0 -80
  94. package/dist/lib/src/functions/apply-patch-with-mutation.js.map +0 -1
  95. package/dist/lib/src/functions/apply-patch-with-mutation.test.js +0 -54
  96. package/dist/lib/src/functions/apply-patch-with-mutation.test.js.map +0 -1
  97. package/dist/lib/src/functions/block-to-html-string.js +0 -21
  98. package/dist/lib/src/functions/block-to-html-string.js.map +0 -1
  99. package/dist/lib/src/functions/debonce-next-tick.js +0 -43
  100. package/dist/lib/src/functions/debonce-next-tick.js.map +0 -1
  101. package/dist/lib/src/functions/extract-localized-values.js +0 -35
  102. package/dist/lib/src/functions/extract-localized-values.js.map +0 -1
  103. package/dist/lib/src/functions/filter-with-custom-targeting.js +0 -88
  104. package/dist/lib/src/functions/filter-with-custom-targeting.js.map +0 -1
  105. package/dist/lib/src/functions/get-builder-pixel.js +0 -27
  106. package/dist/lib/src/functions/get-builder-pixel.js.map +0 -1
  107. package/dist/lib/src/functions/get.js +0 -12
  108. package/dist/lib/src/functions/get.js.map +0 -1
  109. package/dist/lib/src/functions/is-debug.js +0 -8
  110. package/dist/lib/src/functions/is-debug.js.map +0 -1
  111. package/dist/lib/src/functions/no-wrap.js +0 -60
  112. package/dist/lib/src/functions/no-wrap.js.map +0 -1
  113. package/dist/lib/src/functions/safe-dynamic-require.js +0 -51
  114. package/dist/lib/src/functions/safe-dynamic-require.js.map +0 -1
  115. package/dist/lib/src/functions/set.js +0 -21
  116. package/dist/lib/src/functions/set.js.map +0 -1
  117. package/dist/lib/src/functions/should-force-browser-runtime-in-node.js +0 -22
  118. package/dist/lib/src/functions/should-force-browser-runtime-in-node.js.map +0 -1
  119. package/dist/lib/src/functions/string-to-function.js +0 -166
  120. package/dist/lib/src/functions/string-to-function.js.map +0 -1
  121. package/dist/lib/src/functions/throttle.js +0 -42
  122. package/dist/lib/src/functions/throttle.js.map +0 -1
  123. package/dist/lib/src/functions/traverse.js +0 -72
  124. package/dist/lib/src/functions/traverse.js.map +0 -1
  125. package/dist/lib/src/functions/try-eval.js +0 -75
  126. package/dist/lib/src/functions/try-eval.js.map +0 -1
  127. package/dist/lib/src/functions/update-metadata.js +0 -42
  128. package/dist/lib/src/functions/update-metadata.js.map +0 -1
  129. package/dist/lib/src/functions/utils.js +0 -20
  130. package/dist/lib/src/functions/utils.js.map +0 -1
  131. package/dist/lib/src/functions/with-builder.js +0 -10
  132. package/dist/lib/src/functions/with-builder.js.map +0 -1
  133. package/dist/lib/src/functions/with-children.js +0 -77
  134. package/dist/lib/src/functions/with-children.js.map +0 -1
  135. package/dist/lib/src/hooks/useIsPreviewing.js +0 -16
  136. package/dist/lib/src/hooks/useIsPreviewing.js.map +0 -1
  137. package/dist/lib/src/scripts/init-editing.js +0 -18
  138. package/dist/lib/src/scripts/init-editing.js.map +0 -1
  139. package/dist/lib/src/sdk-version.js +0 -5
  140. package/dist/lib/src/sdk-version.js.map +0 -1
  141. package/dist/lib/src/store/builder-async-requests.js +0 -19
  142. package/dist/lib/src/store/builder-async-requests.js.map +0 -1
  143. package/dist/lib/src/store/builder-meta.js +0 -13
  144. package/dist/lib/src/store/builder-meta.js.map +0 -1
  145. package/dist/lib/src/store/builder-store.js +0 -15
  146. package/dist/lib/src/store/builder-store.js.map +0 -1
  147. package/dist/lib/src/to-error.js +0 -22
  148. package/dist/lib/src/to-error.js.map +0 -1
  149. package/dist/lib/test/basic.test.js +0 -212
  150. package/dist/lib/test/basic.test.js.map +0 -1
  151. package/dist/lib/test/functions/render-block.js +0 -24
  152. package/dist/lib/test/functions/render-block.js.map +0 -1
  153. package/dist/lib/test/image.test.js +0 -107
  154. package/dist/lib/test/image.test.js.map +0 -1
  155. package/dist/lib/test/setupTests.js +0 -8
  156. package/dist/lib/test/setupTests.js.map +0 -1
  157. package/dist/types/lib/on-change.d.ts +0 -8
  158. package/dist/types/rollup.config.d.ts +0 -44
  159. package/dist/types/src/blocks/Button.d.ts +0 -7
  160. package/dist/types/src/blocks/Columns.d.ts +0 -1
  161. package/dist/types/src/blocks/CustomCode.d.ts +0 -1
  162. package/dist/types/src/blocks/Embed.d.ts +0 -1
  163. package/dist/types/src/blocks/Fragment.d.ts +0 -5
  164. package/dist/types/src/blocks/Image.d.ts +0 -6
  165. package/dist/types/src/blocks/Mutation.d.ts +0 -8
  166. package/dist/types/src/blocks/PersonalizationContainer.d.ts +0 -19
  167. package/dist/types/src/blocks/Router.d.ts +0 -32
  168. package/dist/types/src/blocks/Section.d.ts +0 -1
  169. package/dist/types/src/blocks/Slot.d.ts +0 -5
  170. package/dist/types/src/blocks/StateProvider.d.ts +0 -1
  171. package/dist/types/src/blocks/Symbol.d.ts +0 -19
  172. package/dist/types/src/blocks/Text.d.ts +0 -6
  173. package/dist/types/src/blocks/Video.d.ts +0 -1
  174. package/dist/types/src/blocks/forms/Button.d.ts +0 -5
  175. package/dist/types/src/blocks/forms/Form.d.ts +0 -24
  176. package/dist/types/src/blocks/forms/Input.d.ts +0 -10
  177. package/dist/types/src/blocks/forms/Label.d.ts +0 -8
  178. package/dist/types/src/blocks/forms/Select.d.ts +0 -12
  179. package/dist/types/src/blocks/forms/TextArea.d.ts +0 -9
  180. package/dist/types/src/blocks/raw/Img.d.ts +0 -7
  181. package/dist/types/src/blocks/raw/RawText.d.ts +0 -8
  182. package/dist/types/src/builder-react-lite.d.ts +0 -17
  183. package/dist/types/src/builder-react.d.ts +0 -45
  184. package/dist/types/src/components/Link.d.ts +0 -9
  185. package/dist/types/src/components/builder-block.component.d.ts +0 -50
  186. package/dist/types/src/components/builder-blocks.component.d.ts +0 -29
  187. package/dist/types/src/components/builder-component.component.d.ts +0 -324
  188. package/dist/types/src/components/builder-content.component.d.ts +0 -271
  189. package/dist/types/src/components/insert-spacer.component.d.ts +0 -13
  190. package/dist/types/src/components/no-wrap.d.ts +0 -2
  191. package/dist/types/src/components/variants-provider.component.d.ts +0 -8
  192. package/dist/types/src/constants/device-sizes.constant.d.ts +0 -57
  193. package/dist/types/src/constants/file-types.constant.d.ts +0 -2
  194. package/dist/types/src/decorators/builder-block.decorator.d.ts +0 -5
  195. package/dist/types/src/functions/apply-patch-with-mutation.d.ts +0 -5
  196. package/dist/types/src/functions/apply-patch-with-mutation.test.d.ts +0 -1
  197. package/dist/types/src/functions/block-to-html-string.d.ts +0 -3
  198. package/dist/types/src/functions/debonce-next-tick.d.ts +0 -2
  199. package/dist/types/src/functions/extract-localized-values.d.ts +0 -2
  200. package/dist/types/src/functions/filter-with-custom-targeting.d.ts +0 -15
  201. package/dist/types/src/functions/get-builder-pixel.d.ts +0 -2
  202. package/dist/types/src/functions/get.d.ts +0 -1
  203. package/dist/types/src/functions/is-debug.d.ts +0 -1
  204. package/dist/types/src/functions/no-wrap.d.ts +0 -33
  205. package/dist/types/src/functions/safe-dynamic-require.d.ts +0 -3
  206. package/dist/types/src/functions/set.d.ts +0 -1
  207. package/dist/types/src/functions/should-force-browser-runtime-in-node.d.ts +0 -1
  208. package/dist/types/src/functions/string-to-function.d.ts +0 -7
  209. package/dist/types/src/functions/throttle.d.ts +0 -1
  210. package/dist/types/src/functions/traverse.d.ts +0 -34
  211. package/dist/types/src/functions/try-eval.d.ts +0 -1
  212. package/dist/types/src/functions/update-metadata.d.ts +0 -17
  213. package/dist/types/src/functions/utils.d.ts +0 -2
  214. package/dist/types/src/functions/with-builder.d.ts +0 -2
  215. package/dist/types/src/functions/with-children.d.ts +0 -29
  216. package/dist/types/src/hooks/useIsPreviewing.d.ts +0 -1
  217. package/dist/types/src/scripts/init-editing.d.ts +0 -1
  218. package/dist/types/src/sdk-version.d.ts +0 -1
  219. package/dist/types/src/store/builder-async-requests.d.ts +0 -13
  220. package/dist/types/src/store/builder-meta.d.ts +0 -6
  221. package/dist/types/src/store/builder-store.d.ts +0 -10
  222. package/dist/types/src/to-error.d.ts +0 -13
  223. package/dist/types/test/basic.test.d.ts +0 -4
  224. package/dist/types/test/functions/render-block.d.ts +0 -3
  225. package/dist/types/test/image.test.d.ts +0 -1
  226. package/dist/types/test/setupTests.d.ts +0 -0
@@ -1,3 +0,0 @@
1
- import { BuilderElement } from '@builder.io/sdk';
2
- export declare const htmlEscape: (str: string) => string;
3
- export declare const blockToHtmlString: (block: BuilderElement) => string;
@@ -1,2 +0,0 @@
1
- export declare function debounceNextTick(fn: (...args: any[]) => void): () => void;
2
- export declare function debounceNextTick(target: any, key: PropertyKey, descriptor: PropertyDescriptor): PropertyDescriptor;
@@ -1,2 +0,0 @@
1
- export declare const containsLocalizedValues: (data: Record<string, any>) => boolean;
2
- export declare const extractLocalizedValues: (data: Record<string, any>, locale: string) => Record<string, any>;
@@ -1,15 +0,0 @@
1
- type UserAttributes = {
2
- date?: string | Date;
3
- urlPath?: string;
4
- [key: string]: any;
5
- };
6
- type QueryOperator = 'is' | 'isNot' | 'contains' | 'startsWith' | 'endsWith' | 'greaterThan' | 'lessThan' | 'greaterThanOrEqualTo' | 'lessThanOrEqualTo';
7
- type QueryValue = string | number | boolean | Array<string | number | boolean>;
8
- export type Query = {
9
- property: string;
10
- operator: QueryOperator;
11
- value: QueryValue;
12
- };
13
- export declare const filterWithCustomTargetingScript = "function filterWithCustomTargeting(e,t,n,r){var i={query:t,startDate:n,endDate:r},o=e.date&&new Date(e.date)||new Date;return!(i.startDate&&new Date(i.startDate)>o)&&(!(i.endDate&&new Date(i.endDate)<o)&&(!i.query||!i.query.length||i.query.every((function(t){return objectMatchesQuery(e,t)}))))}function isString(e){return\"string\"==typeof e}function isNumber(e){return\"number\"==typeof e}function objectMatchesQuery(e,t){return function(){var n=t.property,r=t.operator,i=t.value;if(t&&\"urlPath\"===t.property&&t.value&&\"string\"==typeof t.value&&\"/\"!==t.value&&t.value.endsWith(\"/\")&&(i=t.value.slice(0,-1)),!n||!r)return!0;if(Array.isArray(i))return\"isNot\"===r?i.every((function(t){return objectMatchesQuery(e,{property:n,operator:r,value:t})})):!!i.find((function(t){return objectMatchesQuery(e,{property:n,operator:r,value:t})}));var o=e[n];if(Array.isArray(o))return o.includes(i);switch(r){case\"is\":return o===i;case\"isNot\":return o!==i;case\"contains\":return(isString(o)||Array.isArray(o))&&o.includes(String(i));case\"startsWith\":return isString(o)&&o.startsWith(String(i));case\"endsWith\":return isString(o)&&o.endsWith(String(i));case\"greaterThan\":return isNumber(o)&&isNumber(i)&&o>i;case\"lessThan\":return isNumber(o)&&isNumber(i)&&o<i;case\"greaterThanOrEqualTo\":return isNumber(o)&&isNumber(i)&&o>=i;case\"lessThanOrEqualTo\":return isNumber(o)&&isNumber(i)&&o<=i}return!1}()}";
14
- export declare function filterWithCustomTargeting(userAttributes: UserAttributes, query: Query[], startDate?: string, endDate?: string): boolean;
15
- export {};
@@ -1,2 +0,0 @@
1
- import { BuilderElement } from '@builder.io/sdk';
2
- export declare function getBuilderPixel(apiKey: string): BuilderElement;
@@ -1 +0,0 @@
1
- export declare const get: (obj: any, path: string, defaultValue?: any) => any;
@@ -1 +0,0 @@
1
- export declare function isDebug(): boolean;
@@ -1,33 +0,0 @@
1
- import React from 'react';
2
- /**
3
- * Higher order component for passing Builder.io styles and attributes directly
4
- * to the component child without wrapping
5
- *
6
- * Useful when you need styles etc applied directly to the component without a
7
- * wrapping element (e.g. div), and you are already forwarding all props and attributes
8
- * (e.g. <YourComponent {...props} />)
9
- *
10
- * 👉 Important: make sure you always add props.className,
11
- * even if you supply a className too
12
- *
13
- * @example
14
- * ```tsx
15
- *
16
- * const MyButton = props => <Button
17
- * {...props}
18
- * className={'my-button ' + (props.className || '')}>
19
- * Hello there!
20
- * </Button>
21
- *
22
- * const ButtonWithBuilderChildren = noWrap(MyButton)
23
- *
24
- * Builder.registerComponent(ButtonWithBuilderChildren, {
25
- * name: 'MyButton',
26
- * })
27
- * ```
28
- */
29
- export declare const noWrap: <P extends object>(Component: React.ComponentType<P>) => React.ForwardRefExoticComponent<React.PropsWithoutRef<P & {
30
- children?: React.ReactNode;
31
- } & {
32
- attributes?: any;
33
- }> & React.RefAttributes<unknown>>;
@@ -1,3 +0,0 @@
1
- /// <reference types="node" />
2
- /// <reference types="react-native" />
3
- export declare let safeDynamicRequire: typeof require;
@@ -1 +0,0 @@
1
- export declare const set: (obj: any, _path: string | string[], value: any) => any;
@@ -1 +0,0 @@
1
- export declare const shouldForceBrowserRuntimeInNode: () => boolean;
@@ -1,7 +0,0 @@
1
- import { Builder } from '@builder.io/sdk';
2
- type BuilderEvanFunction = (state: object, event?: Event | undefined | null, block?: any, builder?: Builder, Device?: any, update?: Function | null, _Builder?: typeof Builder, context?: object) => any;
3
- export declare const api: (state: any) => Builder;
4
- export declare function stringToFunction(str: string, expression?: boolean, errors?: Error[], logs?: string[]): BuilderEvanFunction;
5
- export declare const makeFn: (code: string, useReturn: boolean, args?: string[]) => string;
6
- export declare const getIsolateContext: () => any;
7
- export {};
@@ -1 +0,0 @@
1
- export declare function throttle(func: Function, wait: number, options?: any): (this: any) => any;
@@ -1,34 +0,0 @@
1
- type TraverseCallback = (value: any, update: (newValue: any) => void) => void;
2
- /**
3
- * Recursively traverses an object or array, invoking a callback on each value.
4
- *
5
- * @param {any} obj - The object or array to traverse. Can also handle primitives, null, or undefined.
6
- * @param {TraverseCallback} callback - The function to invoke on each value. Receives the current value
7
- * and an `update` function to modify the value in its parent container.
8
- * @param {any} [parent=null] - The parent object or array of the current value. Used internally.
9
- * @param {any} [key=null] - The key or index of the current value in its parent. Used internally.
10
- * @param {WeakSet} [visited=new WeakSet()] - Tracks visited objects to handle circular references. Used internally.
11
- *
12
- * @example
13
- * // Example: Doubling all numbers in an object
14
- * const obj = { a: 1, b: [2, 3, { c: 4 }] };
15
- * traverse(obj, (value, update) => {
16
- * if (typeof value === 'number') {
17
- * update(value * 2);
18
- * }
19
- * });
20
- * console.log(obj); // { a: 2, b: [4, 6, { c: 8 }] }
21
- *
22
- * @example
23
- * // Example: Handling circular references
24
- * const obj = { a: 1 };
25
- * obj.self = obj;
26
- * traverse(obj, (value, update) => {
27
- * if (typeof value === 'number') {
28
- * update(value * 2);
29
- * }
30
- * });
31
- * console.log(obj.a); // 2
32
- */
33
- export declare function traverse(obj: any, callback: TraverseCallback, parent?: any, key?: any, visited?: WeakSet<object>): void;
34
- export {};
@@ -1 +0,0 @@
1
- export declare const tryEval: (str?: string, data?: any, errors?: Error[]) => any;
@@ -1,17 +0,0 @@
1
- import { Component } from '@builder.io/sdk';
2
- /**
3
- * Update metadata for a Builder component
4
- *
5
- * @param component Builder react component
6
- * @param fn Updater
7
- *
8
- * @example
9
- * updatMetadata(TextBlock, current => ({
10
- * ...current,
11
- * fields: [
12
- * ...curent.fields,
13
- * { name: 'myNewField', type: 'string' }
14
- * ]
15
- * }))
16
- */
17
- export declare function updateMetadata(component: Function | string, fn: (currentMetadata: Component | null) => Component | void): void;
@@ -1,2 +0,0 @@
1
- export declare const fastClone: <T extends object>(obj: T) => T;
2
- export declare const omit: <T extends object>(obj: T, ...values: (keyof T)[]) => Partial<T>;
@@ -1,2 +0,0 @@
1
- import { Component } from '@builder.io/sdk';
2
- export declare function withBuilder(component: Function, options: Component): Function;
@@ -1,29 +0,0 @@
1
- import React from 'react';
2
- import { BuilderElement } from '@builder.io/sdk';
3
- /**
4
- * Higher order component for passing Builder.io children as React children
5
- *
6
- * @example
7
- * ```tsx
8
- *
9
- * const MyButton = props => <Button>
10
- * {children}
11
- * </Button>
12
- *
13
- * const ButtonWithBuilderChildren = withChildren(MyButton)
14
- *
15
- * Builder.registerComponent(ButtonWithBuilderChildren, {
16
- * name: 'MyButton',
17
- * defaultChildren: [
18
- * {
19
- * '@type': '@builder.io/sdk:Element'
20
- * }
21
- * ]
22
- * })
23
- * ```
24
- */
25
- export declare const withChildren: <P extends object>(Component: React.ComponentType<P>) => React.ForwardRefExoticComponent<React.PropsWithoutRef<P & {
26
- children?: React.ReactNode;
27
- } & {
28
- builderBlock?: BuilderElement | undefined;
29
- }> & React.RefAttributes<any>>;
@@ -1 +0,0 @@
1
- export declare function useIsPreviewing(): boolean;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export declare const SDK_VERSION = "8.0.5";
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- export interface RequestInfo {
3
- promise: Promise<any>;
4
- url?: string;
5
- }
6
- export type RequestOrPromise = RequestInfo | Promise<any>;
7
- export declare const isPromise: (thing: RequestOrPromise) => thing is Promise<any>;
8
- export declare const isRequestInfo: (thing: RequestOrPromise) => thing is RequestInfo;
9
- export declare const BuilderAsyncRequestsContext: React.Context<{
10
- requests: RequestOrPromise[];
11
- errors: Error[];
12
- logs: string[];
13
- }>;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- export declare const BuilderMetaContext: React.Context<{
3
- emailMode: boolean;
4
- ampMode: boolean;
5
- isServer: boolean;
6
- }>;
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- export declare const BuilderStoreContext: React.Context<BuilderStore>;
3
- export interface BuilderStore {
4
- state: any;
5
- rootState: any;
6
- content: any;
7
- context: any;
8
- update: (mutator: (state: any) => any) => any;
9
- renderLink?: (props: React.AnchorHTMLAttributes<any>) => React.ReactNode;
10
- }
@@ -1,13 +0,0 @@
1
- /**
2
- * Safe conversion to error type. Intended to be used in catch blocks where the
3
- * value is not guaranteed to be an error.
4
- *
5
- * @example
6
- * try {
7
- * throw new Error('Something went wrong')
8
- * }
9
- * catch (err: unknown) {
10
- * const error: Error = toError(err)
11
- * }
12
- */
13
- export declare function toError(err: unknown): Error;
@@ -1,4 +0,0 @@
1
- /**
2
- * @jest-environment jsdom
3
- */
4
- export {};
@@ -1,3 +0,0 @@
1
- import { BuilderElement } from '@builder.io/sdk';
2
- export declare const el: (options?: Partial<BuilderElement>, useId?: number) => BuilderElement;
3
- export declare const block: (name: string, options?: any, elOptions?: Partial<BuilderElement>, useId?: number) => BuilderElement;
@@ -1 +0,0 @@
1
- export {};
File without changes