@builder.io/sdk-react-native 0.0.1-31 → 0.0.1-35

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 (78) hide show
  1. package/package.json +1 -1
  2. package/src/blocks/button.js +22 -66
  3. package/src/blocks/button.lite.tsx +4 -4
  4. package/src/blocks/columns.js +36 -247
  5. package/src/blocks/columns.lite.tsx +7 -7
  6. package/src/blocks/custom-code.js +47 -73
  7. package/src/blocks/custom-code.lite.tsx +16 -12
  8. package/src/blocks/embed.js +47 -66
  9. package/src/blocks/embed.lite.tsx +13 -11
  10. package/src/blocks/form.js +195 -436
  11. package/src/blocks/form.lite.tsx +72 -65
  12. package/src/blocks/fragment.js +8 -16
  13. package/src/blocks/fragment.lite.tsx +3 -3
  14. package/src/blocks/image.js +80 -88
  15. package/src/blocks/image.lite.tsx +16 -17
  16. package/src/blocks/img.js +28 -45
  17. package/src/blocks/img.lite.tsx +7 -7
  18. package/src/blocks/input.js +28 -93
  19. package/src/blocks/input.lite.tsx +7 -5
  20. package/src/blocks/raw-text.js +12 -16
  21. package/src/blocks/raw-text.lite.tsx +3 -3
  22. package/src/blocks/section.js +23 -66
  23. package/src/blocks/section.lite.tsx +4 -4
  24. package/src/blocks/select.js +28 -67
  25. package/src/blocks/select.lite.tsx +8 -6
  26. package/src/blocks/submit-button.js +21 -41
  27. package/src/blocks/submit-button.lite.tsx +3 -3
  28. package/src/blocks/symbol.js +16 -18
  29. package/src/blocks/symbol.lite.tsx +5 -5
  30. package/src/blocks/text.js +27 -29
  31. package/src/blocks/text.lite.tsx +9 -4
  32. package/src/blocks/textarea.js +24 -53
  33. package/src/blocks/textarea.lite.tsx +3 -3
  34. package/src/blocks/video.js +60 -81
  35. package/src/blocks/video.lite.tsx +6 -6
  36. package/src/components/block-styles.js +4 -2
  37. package/src/components/block-styles.lite.tsx +3 -3
  38. package/src/components/error-boundary.js +9 -11
  39. package/src/components/error-boundary.lite.tsx +3 -3
  40. package/src/components/render-block.js +40 -85
  41. package/src/components/render-block.lite.tsx +25 -17
  42. package/src/components/render-blocks.js +32 -56
  43. package/src/components/render-blocks.lite.tsx +14 -14
  44. package/src/components/render-content.js +52 -100
  45. package/src/components/render-content.lite.tsx +41 -32
  46. package/src/constants/device-sizes.js +11 -8
  47. package/src/context/builder.context.js +4 -2
  48. package/src/functions/evaluate.js +9 -17
  49. package/src/functions/get-block-actions.js +10 -9
  50. package/src/functions/get-block-component-options.js +10 -11
  51. package/src/functions/get-block-properties.js +17 -15
  52. package/src/functions/get-block-styles.js +17 -20
  53. package/src/functions/get-block-tag.js +4 -2
  54. package/src/functions/get-content.js +30 -39
  55. package/src/functions/get-content.test.js +28 -37
  56. package/src/functions/get-fetch.js +7 -5
  57. package/src/functions/get-global-this.js +7 -5
  58. package/src/functions/get-processed-block.js +13 -11
  59. package/src/functions/get-processed-block.test.js +14 -14
  60. package/src/functions/get-target.js +4 -2
  61. package/src/functions/if-target.js +3 -1
  62. package/src/functions/is-browser.js +5 -3
  63. package/src/functions/is-editing.js +5 -3
  64. package/src/functions/is-iframe.js +4 -2
  65. package/src/functions/is-previewing.js +6 -4
  66. package/src/functions/is-react-native.js +4 -2
  67. package/src/functions/macro-eval.js +5 -2
  68. package/src/functions/on-change.js +7 -4
  69. package/src/functions/on-change.test.js +10 -10
  70. package/src/functions/previewing-model-name.js +5 -3
  71. package/src/functions/register-component.js +28 -33
  72. package/src/functions/register.js +10 -8
  73. package/src/functions/set-editor-settings.js +7 -5
  74. package/src/functions/set.js +4 -10
  75. package/src/functions/set.test.js +14 -14
  76. package/src/functions/track.js +8 -6
  77. package/src/index.js +18 -20
  78. package/src/scripts/init-editing.js +40 -64
@@ -1,6 +1,6 @@
1
- import * as React from 'react';
2
- import { View, StyleSheet, Image, Text } from 'react-native';
3
- import { useContext } from 'react';
1
+ import * as React from "react";
2
+ import { View, StyleSheet, Image, Text } from "react-native";
3
+ import { useContext } from "react";
4
4
 
5
5
  export default function SubmitButton(props) {
6
6
  return (
@@ -1,22 +1,20 @@
1
- import * as React from 'react';
2
- import { View } from 'react-native';
3
- import { useContext } from 'react';
4
- import RenderContent from '../components/render-content';
5
- import BuilderContext from '../context/builder.context';
1
+ import * as React from "react";
2
+ import { View } from "react-native";
3
+ import { useContext } from "react";
4
+ import RenderContent from "../components/render-content";
5
+ import BuilderContext from "../context/builder.context";
6
6
  function Symbol(props) {
7
7
  var _a, _b, _c;
8
8
  const builderContext = useContext(BuilderContext);
9
- return /* @__PURE__ */ React.createElement(
10
- View,
11
- {
12
- className: 'builder-symbol',
13
- },
14
- /* @__PURE__ */ React.createElement(RenderContent, {
15
- context: builderContext.context,
16
- data: (_a = props.symbol) == null ? void 0 : _a.data,
17
- model: (_b = props.symbol) == null ? void 0 : _b.model,
18
- content: (_c = props.symbol) == null ? void 0 : _c.content,
19
- })
20
- );
9
+ return /* @__PURE__ */ React.createElement(View, {
10
+ className: "builder-symbol"
11
+ }, /* @__PURE__ */ React.createElement(RenderContent, {
12
+ context: builderContext.context,
13
+ data: (_a = props.symbol) == null ? void 0 : _a.data,
14
+ model: (_b = props.symbol) == null ? void 0 : _b.model,
15
+ content: (_c = props.symbol) == null ? void 0 : _c.content
16
+ }));
21
17
  }
22
- export { Symbol as default };
18
+ export {
19
+ Symbol as default
20
+ };
@@ -1,8 +1,8 @@
1
- import * as React from 'react';
2
- import { View, StyleSheet, Image, Text } from 'react-native';
3
- import { useContext } from 'react';
4
- import RenderContent from '../components/render-content.lite';
5
- import BuilderContext from '../context/builder.context.lite';
1
+ import * as React from "react";
2
+ import { View, StyleSheet, Image, Text } from "react-native";
3
+ import { useContext } from "react";
4
+ import RenderContent from "../components/render-content.lite";
5
+ import BuilderContext from "../context/builder.context.lite";
6
6
 
7
7
  export default function Symbol(props) {
8
8
  const builderContext = useContext(BuilderContext);
@@ -3,22 +3,22 @@ var __defProp = Object.defineProperty;
3
3
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
6
- var __defNormalProp = (obj, key, value) =>
7
- key in obj
8
- ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value })
9
- : (obj[key] = value);
6
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
7
  var __spreadValues = (a, b) => {
11
- for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]);
8
+ for (var prop in b || (b = {}))
9
+ if (__hasOwnProp.call(b, prop))
10
+ __defNormalProp(a, prop, b[prop]);
12
11
  if (__getOwnPropSymbols)
13
12
  for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]);
13
+ if (__propIsEnum.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
15
  }
16
16
  return a;
17
17
  };
18
- import HTML from 'react-native-render-html';
19
- import { registerComponent } from '../functions/register-component';
18
+ import HTML from "react-native-render-html";
19
+ import { registerComponent } from "../functions/register-component";
20
20
  function camelToKebabCase(string) {
21
- return string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, '$1-$2').toLowerCase();
21
+ return string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
22
22
  }
23
23
  function pick(object, keys) {
24
24
  return keys.reduce((obj, key) => {
@@ -28,13 +28,10 @@ function pick(object, keys) {
28
28
  return obj;
29
29
  }, {});
30
30
  }
31
- const PICK_STYLES = ['textAlign'];
31
+ const PICK_STYLES = ["textAlign"];
32
32
  function getBlockStyles(block) {
33
33
  var _a, _b, _c;
34
- const styles = __spreadValues(
35
- __spreadValues({}, (_a = block.responsiveStyles) == null ? void 0 : _a.large),
36
- block.styles
37
- );
34
+ const styles = __spreadValues(__spreadValues({}, (_a = block.responsiveStyles) == null ? void 0 : _a.large), block.styles);
38
35
  if ((_b = block.responsiveStyles) == null ? void 0 : _b.medium) {
39
36
  Object.assign(styles, block.responsiveStyles.medium);
40
37
  }
@@ -46,12 +43,12 @@ function getBlockStyles(block) {
46
43
  function getCss(block) {
47
44
  const styleObject = pick(getBlockStyles(block), PICK_STYLES);
48
45
  if (!styleObject) {
49
- return '';
46
+ return "";
50
47
  }
51
48
  let str = ``;
52
49
  for (const key in styleObject) {
53
50
  const value = styleObject[key];
54
- if (typeof value === 'string') {
51
+ if (typeof value === "string") {
55
52
  str += `${camelToKebabCase(key)}: ${value};`;
56
53
  }
57
54
  }
@@ -59,29 +56,30 @@ function getCss(block) {
59
56
  }
60
57
  function Text(props) {
61
58
  return /* @__PURE__ */ React.createElement(HTML, {
62
- source: { html: `<div style="${getCss(props.builderBlock)}">${props.text || ''}</div>` },
59
+ source: { html: `<div style="${getCss(props.builderBlock)}">${props.text || ""}</div>` }
63
60
  });
64
61
  }
65
62
  registerComponent(Text, {
66
- name: 'Text',
63
+ name: "Text",
67
64
  static: true,
68
65
  builtIn: true,
69
- image:
70
- 'https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929',
66
+ image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",
71
67
  inputs: [
72
68
  {
73
- name: 'text',
74
- type: 'html',
69
+ name: "text",
70
+ type: "html",
75
71
  required: true,
76
72
  autoFocus: true,
77
73
  bubble: true,
78
- defaultValue: 'Enter some text...',
79
- },
74
+ defaultValue: "Enter some text..."
75
+ }
80
76
  ],
81
77
  defaultStyles: {
82
- lineHeight: 'normal',
83
- height: 'auto',
84
- textAlign: 'center',
85
- },
78
+ lineHeight: "normal",
79
+ height: "auto",
80
+ textAlign: "center"
81
+ }
86
82
  });
87
- export { Text as default };
83
+ export {
84
+ Text as default
85
+ };
@@ -1,7 +1,12 @@
1
- import * as React from 'react';
2
- import { View, StyleSheet, Image, Text } from 'react-native';
3
- import { useContext } from 'react';
1
+ import * as React from "react";
2
+ import { View, StyleSheet, Image, Text } from "react-native";
3
+ import { useContext } from "react";
4
4
 
5
5
  export default function Text(props) {
6
- return <View className="builder-text" dangerouslySetInnerHTML={{ __html: 'props.text' }} />;
6
+ return (
7
+ <View
8
+ className="builder-text"
9
+ dangerouslySetInnerHTML={{ __html: "props.text" }}
10
+ />
11
+ );
7
12
  }
@@ -1,66 +1,37 @@
1
1
  import { registerComponent } from '../functions/register-component';
2
2
 
3
- var __defProp = Object.defineProperty;
3
+ var __defProp = Object.defineProperty;
4
4
  var __defProps = Object.defineProperties;
5
5
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
6
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
8
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
- var __defNormalProp = (obj, key, value) =>
10
- key in obj
11
- ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value })
12
- : (obj[key] = value);
9
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
10
  var __spreadValues = (a, b) => {
14
- for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]);
15
- if (__getOwnPropSymbols)
16
- for (var prop of __getOwnPropSymbols(b)) {
17
- if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]);
18
- }
19
- return a;
11
+ for (var prop in b || (b = {}))
12
+ if (__hasOwnProp.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ if (__getOwnPropSymbols)
15
+ for (var prop of __getOwnPropSymbols(b)) {
16
+ if (__propIsEnum.call(b, prop))
17
+ __defNormalProp(a, prop, b[prop]);
18
+ }
19
+ return a;
20
20
  };
21
21
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
22
- import * as React from 'react';
23
- import { View } from 'react-native';
22
+ import * as React from "react";
23
+ import { View } from "react-native";
24
24
  function Textarea(props) {
25
- return /* @__PURE__ */ React.createElement(
26
- View,
27
- __spreadProps(__spreadValues({}, props.attributes), {
28
- placeholder: props.placeholder,
29
- name: props.name,
30
- value: props.value,
31
- defaultValue: props.defaultValue,
32
- })
33
- );
25
+ return /* @__PURE__ */ React.createElement(View, __spreadProps(__spreadValues({}, props.attributes), {
26
+ placeholder: props.placeholder,
27
+ name: props.name,
28
+ value: props.value,
29
+ defaultValue: props.defaultValue
30
+ }));
34
31
  }
35
- export { Textarea as default };
32
+ export {
33
+ Textarea as default
34
+ };
35
+
36
36
 
37
- registerComponent(Textarea, {
38
- name: 'Form:TextArea',
39
- builtIn: true,
40
- image:
41
- 'https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3',
42
- inputs: [
43
- { advanced: true, name: 'value', type: 'string' },
44
- {
45
- name: 'name',
46
- type: 'string',
47
- required: true,
48
- helperText: 'Every input in a form needs a unique name describing what it gets, e.g. "email"',
49
- },
50
- { name: 'defaultValue', type: 'string' },
51
- { name: 'placeholder', type: 'string', defaultValue: 'Hello there' },
52
- { name: 'required', type: 'boolean', defaultValue: false },
53
- ],
54
- defaultStyles: {
55
- paddingTop: '10px',
56
- paddingBottom: '10px',
57
- paddingLeft: '10px',
58
- paddingRight: '10px',
59
- borderRadius: '3px',
60
- borderWidth: '1px',
61
- borderStyle: 'solid',
62
- borderColor: '#ccc',
63
- },
64
- static: true,
65
- noWrap: true,
66
- });
37
+ registerComponent(Textarea, {name:'Form:TextArea',builtIn:true,image:'https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3',inputs:[{advanced:true,name:'value',type:'string'},{name:'name',type:'string',required:true,helperText:'Every input in a form needs a unique name describing what it gets, e.g. "email"'},{name:'defaultValue',type:'string'},{name:'placeholder',type:'string',defaultValue:'Hello there'},{name:'required',type:'boolean',defaultValue:false}],defaultStyles:{paddingTop:'10px',paddingBottom:'10px',paddingLeft:'10px',paddingRight:'10px',borderRadius:'3px',borderWidth:'1px',borderStyle:'solid',borderColor:'#ccc'},static:true,noWrap:true});
@@ -1,6 +1,6 @@
1
- import * as React from 'react';
2
- import { View, StyleSheet, Image, Text } from 'react-native';
3
- import { useContext } from 'react';
1
+ import * as React from "react";
2
+ import { View, StyleSheet, Image, Text } from "react-native";
3
+ import { useContext } from "react";
4
4
 
5
5
  export default function Textarea(props) {
6
6
  return (
@@ -1,109 +1,88 @@
1
1
  import * as React from 'react';
2
- import { View } from 'react-native';
3
- import ReactVideo from 'react-native-video';
4
- import { registerComponent } from '../functions/register-component';
2
+ import { View } from "react-native";
3
+ import ReactVideo from "react-native-video";
4
+ import { registerComponent } from "../functions/register-component";
5
5
  function Video(props) {
6
- return /* @__PURE__ */ React.createElement(
7
- View,
8
- {
9
- style: { position: 'relative' },
10
- },
11
- /* @__PURE__ */ React.createElement(ReactVideo, {
12
- paused: !props.autoPlay,
13
- controls: props.controls,
14
- muted: props.muted,
15
- repeat: props.loop,
16
- poster: props.posterImage,
17
- posterResizeMode: props.fit || 'contain',
18
- resizeMode: props.fit || 'contain',
19
- style: { position: 'absolute', top: 0, bottom: 0, left: 0, right: 0 },
20
- source: { uri: props.video },
21
- }),
22
- /* @__PURE__ */ React.createElement(View, {
23
- style: {
24
- width: '100%',
25
- paddingTop: props.aspectRatio * 100 + '%',
26
- },
27
- })
28
- );
6
+ return /* @__PURE__ */ React.createElement(View, {
7
+ style: { position: "relative" }
8
+ }, /* @__PURE__ */ React.createElement(ReactVideo, {
9
+ paused: !props.autoPlay,
10
+ controls: props.controls,
11
+ muted: props.muted,
12
+ repeat: props.loop,
13
+ poster: props.posterImage,
14
+ posterResizeMode: props.fit || "contain",
15
+ resizeMode: props.fit || "contain",
16
+ style: { position: "absolute", top: 0, bottom: 0, left: 0, right: 0, zIndex: 1 },
17
+ source: { uri: props.video }
18
+ }), /* @__PURE__ */ React.createElement(View, {
19
+ style: {
20
+ width: "100%",
21
+ paddingTop: `${props.aspectRatio * 100}%`
22
+ }
23
+ }));
29
24
  }
30
25
  registerComponent(Video, {
31
- name: 'Video',
26
+ name: "Video",
32
27
  static: true,
33
28
  builtIn: true,
34
- image:
35
- 'https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4',
29
+ image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
36
30
  defaultStyles: {
37
- position: 'relative',
38
- minHeight: '20px',
39
- minWidth: '20px',
40
- overflow: 'hidden',
31
+ position: "relative",
32
+ minHeight: "20px",
33
+ minWidth: "20px",
34
+ overflow: "hidden"
41
35
  },
42
36
  canHaveChildren: true,
43
37
  inputs: [
44
38
  {
45
- name: 'video',
46
- type: 'file',
47
- allowedFileTypes: ['mp4'],
39
+ name: "video",
40
+ type: "file",
41
+ allowedFileTypes: ["mp4"],
48
42
  bubble: true,
49
- defaultValue:
50
- 'https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f',
51
- required: true,
43
+ defaultValue: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",
44
+ required: true
52
45
  },
53
46
  {
54
- name: 'posterImage',
55
- type: 'file',
56
- allowedFileTypes: ['jpeg', 'png'],
57
- helperText: 'Image to show before the video plays',
47
+ name: "posterImage",
48
+ type: "file",
49
+ allowedFileTypes: ["jpeg", "png"],
50
+ helperText: "Image to show before the video plays"
58
51
  },
59
52
  {
60
- name: 'autoPlay',
61
- type: 'boolean',
62
- defaultValue: true,
53
+ name: "autoPlay",
54
+ type: "boolean",
55
+ defaultValue: true
63
56
  },
64
57
  {
65
- name: 'controls',
66
- type: 'boolean',
67
- defaultValue: false,
58
+ name: "controls",
59
+ type: "boolean",
60
+ defaultValue: false
68
61
  },
69
62
  {
70
- name: 'muted',
71
- type: 'boolean',
72
- defaultValue: true,
63
+ name: "muted",
64
+ type: "boolean",
65
+ defaultValue: true
73
66
  },
74
67
  {
75
- name: 'loop',
76
- type: 'boolean',
77
- defaultValue: true,
68
+ name: "loop",
69
+ type: "boolean",
70
+ defaultValue: true
78
71
  },
79
72
  {
80
- name: 'fit',
81
- type: 'text',
82
- defaultValue: 'cover',
83
- enum: ['contain', 'cover', 'stretch'],
73
+ name: "fit",
74
+ type: "text",
75
+ defaultValue: "cover",
76
+ enum: ["contain", "cover", "stretch"]
84
77
  },
85
78
  {
86
- name: 'position',
87
- type: 'text',
88
- defaultValue: 'center',
89
- enum: [
90
- 'center',
91
- 'top',
92
- 'left',
93
- 'right',
94
- 'bottom',
95
- 'top left',
96
- 'top right',
97
- 'bottom left',
98
- 'bottom right',
99
- ],
100
- },
101
- {
102
- name: 'aspectRatio',
103
- type: 'number',
79
+ name: "aspectRatio",
80
+ type: "number",
104
81
  advanced: true,
105
- defaultValue: 0.7004048582995948,
106
- },
107
- ],
82
+ defaultValue: 0.7004048582995948
83
+ }
84
+ ]
108
85
  });
109
- export { Video as default };
86
+ export {
87
+ Video as default
88
+ };
@@ -1,6 +1,6 @@
1
- import * as React from 'react';
2
- import { View, StyleSheet, Image, Text } from 'react-native';
3
- import { useContext } from 'react';
1
+ import * as React from "react";
2
+ import { View, StyleSheet, Image, Text } from "react-native";
3
+ import { useContext } from "react";
4
4
 
5
5
  export default function Video(props) {
6
6
  return (
@@ -8,8 +8,8 @@ export default function Video(props) {
8
8
  {...props.attributes}
9
9
  preload="none"
10
10
  style={{
11
- width: '100%',
12
- height: '100%',
11
+ width: "100%",
12
+ height: "100%",
13
13
  ...props.attributes?.style,
14
14
  objectFit: props.fit,
15
15
  objectPosition: props.position,
@@ -17,7 +17,7 @@ export default function Video(props) {
17
17
  // not have the video overflow
18
18
  borderRadius: 1,
19
19
  }}
20
- key={props.video || 'no-src'}
20
+ key={props.video || "no-src"}
21
21
  poster={props.posterImage}
22
22
  autoPlay={props.autoPlay}
23
23
  muted={props.muted}
@@ -1,5 +1,7 @@
1
- import * as React from 'react';
1
+ import * as React from "react";
2
2
  function BlockStyles(props) {
3
3
  return /* @__PURE__ */ React.createElement(React.Fragment, null);
4
4
  }
5
- export { BlockStyles as default };
5
+ export {
6
+ BlockStyles as default
7
+ };
@@ -1,6 +1,6 @@
1
- import * as React from 'react';
2
- import { View, StyleSheet, Image, Text } from 'react-native';
3
- import { useContext } from 'react';
1
+ import * as React from "react";
2
+ import { View, StyleSheet, Image, Text } from "react-native";
3
+ import { useContext } from "react";
4
4
 
5
5
  export default function BlockStyles(props) {
6
6
  return <></>;
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { Text } from 'react-native';
1
+ import React from "react";
2
+ import { Text } from "react-native";
3
3
  class ErrorBoundary extends React.Component {
4
4
  constructor(props) {
5
5
  super(props);
@@ -9,19 +9,17 @@ class ErrorBoundary extends React.Component {
9
9
  return { hasError: true };
10
10
  }
11
11
  componentDidCatch(error, errorInfo) {
12
- console.error('Error rendering Builder.io block', error, errorInfo);
12
+ console.error("Error rendering Builder.io block", error, errorInfo);
13
13
  }
14
14
  render() {
15
15
  if (this.state.hasError) {
16
- return /* @__PURE__ */ React.createElement(
17
- Text,
18
- {
19
- style: { color: 'gray' },
20
- },
21
- 'Error rendering Builder.io block'
22
- );
16
+ return /* @__PURE__ */ React.createElement(Text, {
17
+ style: { color: "gray" }
18
+ }, "Error rendering Builder.io block");
23
19
  }
24
20
  return this.props.children;
25
21
  }
26
22
  }
27
- export { ErrorBoundary as default };
23
+ export {
24
+ ErrorBoundary as default
25
+ };
@@ -1,6 +1,6 @@
1
- import * as React from 'react';
2
- import { View, StyleSheet, Image, Text } from 'react-native';
3
- import { useContext } from 'react';
1
+ import * as React from "react";
2
+ import { View, StyleSheet, Image, Text } from "react-native";
3
+ import { useContext } from "react";
4
4
 
5
5
  export default function ErrorBoundary(props) {
6
6
  return <></>;