@builder.io/sdk-react 0.1.9 → 0.1.11

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 (119) hide show
  1. package/dist/react/blocks/BaseText.js +2 -1
  2. package/dist/react/blocks/button/button.js +2 -1
  3. package/dist/react/blocks/columns/columns.js +18 -17
  4. package/dist/react/blocks/custom-code/custom-code.js +2 -1
  5. package/dist/react/blocks/embed/embed.js +2 -1
  6. package/dist/react/blocks/form/form.js +3 -2
  7. package/dist/react/blocks/fragment/fragment.js +2 -1
  8. package/dist/react/blocks/image/component-info.js +1 -1
  9. package/dist/react/blocks/image/image.js +2 -1
  10. package/dist/react/blocks/img/img.js +2 -1
  11. package/dist/react/blocks/input/input.js +2 -1
  12. package/dist/react/blocks/raw-text/raw-text.js +2 -1
  13. package/dist/react/blocks/section/section.js +2 -1
  14. package/dist/react/blocks/select/select.js +2 -1
  15. package/dist/react/blocks/submit-button/submit-button.js +2 -1
  16. package/dist/react/blocks/symbol/symbol.js +2 -1
  17. package/dist/react/blocks/text/text.js +5 -2
  18. package/dist/react/blocks/textarea/textarea.js +2 -1
  19. package/dist/react/blocks/video/video.js +2 -1
  20. package/dist/react/components/render-block/block-styles.js +2 -1
  21. package/dist/react/components/render-block/render-block.js +2 -1
  22. package/dist/react/components/render-block/render-component.js +2 -1
  23. package/dist/react/components/render-block/render-repeated-block.js +2 -1
  24. package/dist/react/components/render-blocks.js +2 -1
  25. package/dist/react/components/render-content/builder-editing.js +2 -1
  26. package/dist/react/components/render-content/components/render-styles.js +15 -1
  27. package/dist/react/components/render-content/render-content.js +6 -8
  28. package/dist/react/components/render-inlined-styles.js +2 -1
  29. package/dist/react/functions/is-editing.js +2 -1
  30. package/dist/react/index.js +0 -1
  31. package/dist/rsc/blocks/BaseText.js +2 -1
  32. package/dist/rsc/blocks/button/button.js +2 -1
  33. package/dist/rsc/blocks/columns/columns.js +18 -17
  34. package/dist/rsc/blocks/custom-code/custom-code.js +2 -1
  35. package/dist/rsc/blocks/embed/embed.js +2 -1
  36. package/dist/rsc/blocks/form/form.js +3 -2
  37. package/dist/rsc/blocks/fragment/fragment.js +2 -1
  38. package/dist/rsc/blocks/image/component-info.js +1 -1
  39. package/dist/rsc/blocks/image/image.js +2 -1
  40. package/dist/rsc/blocks/img/img.js +2 -1
  41. package/dist/rsc/blocks/input/input.js +2 -1
  42. package/dist/rsc/blocks/raw-text/raw-text.js +2 -1
  43. package/dist/rsc/blocks/section/section.js +2 -1
  44. package/dist/rsc/blocks/select/select.js +2 -1
  45. package/dist/rsc/blocks/submit-button/submit-button.js +2 -1
  46. package/dist/rsc/blocks/symbol/symbol.js +2 -1
  47. package/dist/rsc/blocks/text/text.js +5 -2
  48. package/dist/rsc/blocks/textarea/textarea.js +2 -1
  49. package/dist/rsc/blocks/video/video.js +2 -1
  50. package/dist/rsc/components/render-block/block-styles.js +2 -1
  51. package/dist/rsc/components/render-block/render-block.js +2 -1
  52. package/dist/rsc/components/render-block/render-component.js +2 -1
  53. package/dist/rsc/components/render-block/render-repeated-block.js +2 -1
  54. package/dist/rsc/components/render-blocks.js +2 -1
  55. package/dist/rsc/components/render-content/components/render-styles.js +15 -1
  56. package/dist/rsc/components/render-content/render-content.js +5 -8
  57. package/dist/rsc/components/render-inlined-styles.js +2 -1
  58. package/dist/rsc/functions/is-editing.js +2 -1
  59. package/dist/rsc/index.js +0 -1
  60. package/package.json +1 -1
  61. package/packages/react/src/blocks/BaseText.jsx +3 -1
  62. package/packages/react/src/blocks/button/button.jsx +3 -1
  63. package/packages/react/src/blocks/columns/columns.jsx +19 -17
  64. package/packages/react/src/blocks/custom-code/custom-code.jsx +3 -1
  65. package/packages/react/src/blocks/embed/embed.jsx +3 -1
  66. package/packages/react/src/blocks/form/form.jsx +3 -2
  67. package/packages/react/src/blocks/fragment/fragment.jsx +3 -1
  68. package/packages/react/src/blocks/image/component-info.js +1 -1
  69. package/packages/react/src/blocks/image/image.jsx +3 -1
  70. package/packages/react/src/blocks/img/img.jsx +3 -1
  71. package/packages/react/src/blocks/input/input.jsx +3 -1
  72. package/packages/react/src/blocks/raw-text/raw-text.jsx +3 -1
  73. package/packages/react/src/blocks/section/section.jsx +3 -1
  74. package/packages/react/src/blocks/select/select.jsx +3 -1
  75. package/packages/react/src/blocks/submit-button/submit-button.jsx +3 -1
  76. package/packages/react/src/blocks/symbol/symbol.jsx +3 -1
  77. package/packages/react/src/blocks/text/text.jsx +6 -1
  78. package/packages/react/src/blocks/textarea/textarea.jsx +3 -1
  79. package/packages/react/src/blocks/video/video.jsx +3 -1
  80. package/packages/react/src/components/render-block/block-styles.jsx +3 -1
  81. package/packages/react/src/components/render-block/render-block.jsx +3 -1
  82. package/packages/react/src/components/render-block/render-component.jsx +3 -1
  83. package/packages/react/src/components/render-block/render-repeated-block.jsx +3 -1
  84. package/packages/react/src/components/render-blocks.jsx +3 -1
  85. package/packages/react/src/components/render-content/builder-editing.jsx +3 -1
  86. package/packages/react/src/components/render-content/components/render-styles.jsx +16 -1
  87. package/packages/react/src/components/render-content/render-content.jsx +13 -16
  88. package/packages/react/src/components/render-inlined-styles.jsx +3 -1
  89. package/packages/react/src/functions/is-editing.js +2 -1
  90. package/packages/react/src/index.js +0 -1
  91. package/packages/rsc/src/blocks/BaseText.jsx +3 -1
  92. package/packages/rsc/src/blocks/button/button.jsx +3 -1
  93. package/packages/rsc/src/blocks/columns/columns.jsx +19 -17
  94. package/packages/rsc/src/blocks/custom-code/custom-code.jsx +3 -1
  95. package/packages/rsc/src/blocks/embed/embed.jsx +3 -1
  96. package/packages/rsc/src/blocks/form/form.jsx +3 -2
  97. package/packages/rsc/src/blocks/fragment/fragment.jsx +3 -1
  98. package/packages/rsc/src/blocks/image/component-info.js +1 -1
  99. package/packages/rsc/src/blocks/image/image.jsx +3 -1
  100. package/packages/rsc/src/blocks/img/img.jsx +3 -1
  101. package/packages/rsc/src/blocks/input/input.jsx +3 -1
  102. package/packages/rsc/src/blocks/raw-text/raw-text.jsx +3 -1
  103. package/packages/rsc/src/blocks/section/section.jsx +3 -1
  104. package/packages/rsc/src/blocks/select/select.jsx +3 -1
  105. package/packages/rsc/src/blocks/submit-button/submit-button.jsx +3 -1
  106. package/packages/rsc/src/blocks/symbol/symbol.jsx +3 -1
  107. package/packages/rsc/src/blocks/text/text.jsx +6 -1
  108. package/packages/rsc/src/blocks/textarea/textarea.jsx +3 -1
  109. package/packages/rsc/src/blocks/video/video.jsx +3 -1
  110. package/packages/rsc/src/components/render-block/block-styles.jsx +3 -1
  111. package/packages/rsc/src/components/render-block/render-block.jsx +3 -1
  112. package/packages/rsc/src/components/render-block/render-component.jsx +3 -1
  113. package/packages/rsc/src/components/render-block/render-repeated-block.jsx +3 -1
  114. package/packages/rsc/src/components/render-blocks.jsx +3 -1
  115. package/packages/rsc/src/components/render-content/components/render-styles.jsx +16 -1
  116. package/packages/rsc/src/components/render-content/render-content.jsx +13 -16
  117. package/packages/rsc/src/components/render-inlined-styles.jsx +3 -1
  118. package/packages/rsc/src/functions/is-editing.js +2 -1
  119. package/packages/rsc/src/index.js +0 -1
@@ -18,7 +18,7 @@ import RenderComponent from "./render-component";
18
18
  import { getReactNativeBlockStyles } from "../../functions/get-react-native-block-styles.js";
19
19
  import { checkIsDefined } from "../../helpers/nullable.js";
20
20
 
21
- export default function RenderBlock(props) {
21
+ function RenderBlock(props) {
22
22
  const [component, setComponent] = useState(() =>
23
23
  getComponent({
24
24
  block: props.block,
@@ -217,3 +217,5 @@ export default function RenderBlock(props) {
217
217
  </>
218
218
  );
219
219
  }
220
+
221
+ export default RenderBlock;
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import BlockStyles from "./block-styles";
3
3
  import RenderBlock from "./render-block";
4
4
 
5
- export default function RenderComponent(props) {
5
+ function RenderComponent(props) {
6
6
  const ComponentRefRef = props.componentRef;
7
7
 
8
8
  return (
@@ -31,3 +31,5 @@ export default function RenderComponent(props) {
31
31
  </>
32
32
  );
33
33
  }
34
+
35
+ export default RenderComponent;
@@ -3,7 +3,7 @@ import { useContext } from "react";
3
3
  import BuilderContext from "../../context/builder.context.js";
4
4
  import RenderBlock from "./render-block";
5
5
 
6
- export default function RenderRepeatedBlock(props) {
6
+ function RenderRepeatedBlock(props) {
7
7
  return (
8
8
  <BuilderContext.Provider
9
9
  value={{
@@ -20,3 +20,5 @@ export default function RenderRepeatedBlock(props) {
20
20
  </BuilderContext.Provider>
21
21
  );
22
22
  }
23
+
24
+ export default RenderRepeatedBlock;
@@ -5,7 +5,7 @@ import { isEditing } from "../functions/is-editing.js";
5
5
  import BlockStyles from "./render-block/block-styles";
6
6
  import RenderBlock from "./render-block/render-block";
7
7
 
8
- export default function RenderBlocks(props) {
8
+ function RenderBlocks(props) {
9
9
  function className() {
10
10
  return "builder-blocks" + (!props.blocks?.length ? " no-blocks" : "");
11
11
  }
@@ -87,3 +87,5 @@ align-items: stretch;
87
87
  </>
88
88
  );
89
89
  }
90
+
91
+ export default RenderBlocks;
@@ -1,5 +1,7 @@
1
1
  import * as React from "react";
2
2
 
3
- export default function BuilderEditing(props) {
3
+ function BuilderEditing(props) {
4
4
  return <div />;
5
5
  }
6
+
7
+ export default BuilderEditing;
@@ -4,7 +4,7 @@ import RenderInlinedStyles from "../../render-inlined-styles";
4
4
  import { getCss } from "./render-styles.helpers";
5
5
  import { getFontCss } from "./render-styles.helpers";
6
6
 
7
- export default function RenderContentStyles(props) {
7
+ function RenderContentStyles(props) {
8
8
  const [injectedStyles, setInjectedStyles] = useState(
9
9
  () => `
10
10
  ${getCss({
@@ -14,8 +14,23 @@ ${getCss({
14
14
  ${getFontCss({
15
15
  customFonts: props.customFonts,
16
16
  })}
17
+
18
+ .builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
19
+ margin: 0;
20
+ }
21
+ .builder-text > p, .builder-text > .builder-paragraph {
22
+ color: inherit;
23
+ line-height: inherit;
24
+ letter-spacing: inherit;
25
+ font-weight: inherit;
26
+ font-size: inherit;
27
+ text-align: inherit;
28
+ font-family: inherit;
29
+ }
17
30
  `
18
31
  );
19
32
 
20
33
  return <RenderInlinedStyles styles={injectedStyles} />;
21
34
  }
35
+
36
+ export default RenderContentStyles;
@@ -1,7 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { useState, useContext, useRef, useEffect } from "react";
3
3
  import { getDefaultRegisteredComponents } from "../../constants/builder-registered-components.js";
4
- import { TARGET } from "../../constants/target.js";
5
4
  import { evaluate } from "../../functions/evaluate.js";
6
5
  import { getContent } from "../../functions/get-content/index.js";
7
6
  import { fetch } from "../../functions/get-fetch.js";
@@ -26,8 +25,9 @@ import {
26
25
  getContentInitialValue,
27
26
  getContextStateInitialValue,
28
27
  } from "./render-content.helpers.js";
28
+ import { TARGET } from "../../constants/target.js";
29
29
 
30
- export default function RenderContent(props) {
30
+ function RenderContent(props) {
31
31
  const elementRef = useRef(null);
32
32
  const [forceReRenderCount, setForceReRenderCount] = useState(() => 0);
33
33
 
@@ -231,13 +231,6 @@ export default function RenderContent(props) {
231
231
  }
232
232
  }
233
233
 
234
- function shouldRenderContentStyles() {
235
- return Boolean(
236
- (useContent?.data?.cssCode || useContent?.data?.customFonts?.length) &&
237
- TARGET !== "reactNative"
238
- );
239
- }
240
-
241
234
  useEffect(() => {
242
235
  if (!props.apiKey) {
243
236
  console.error(
@@ -293,7 +286,7 @@ export default function RenderContent(props) {
293
286
 
294
287
  /**
295
288
  * Make sure that:
296
- * - the preview model name is the same as the one we're rendering, since there can be multiple models rendered * at the same time, e.g. header/page/footer. * - the API key is the same, since we don't want to preview content from other organizations.
289
+ * - the preview model name is the same as the one we're rendering, since there can be multiple models rendered * at the same time, e.g. header/page/footer. * - the API key is the same, since we don't want to preview content from other organizations.
297
290
  *
298
291
  * TO-DO: should we check that the preview item ID is the same as the initial one being rendered? Or would
299
292
  * this break scenarios where the item is not published yet?
@@ -361,12 +354,14 @@ export default function RenderContent(props) {
361
354
  builder-content-id={useContent?.id}
362
355
  builder-model={props.model}
363
356
  >
364
- {shouldRenderContentStyles() ? (
365
- <RenderContentStyles
366
- contentId={useContent?.id}
367
- cssCode={useContent?.data?.cssCode}
368
- customFonts={useContent?.data?.customFonts}
369
- />
357
+ {TARGET !== "reactNative" ? (
358
+ <>
359
+ <RenderContentStyles
360
+ contentId={useContent?.id}
361
+ cssCode={useContent?.data?.cssCode}
362
+ customFonts={useContent?.data?.customFonts}
363
+ />
364
+ </>
370
365
  ) : null}
371
366
 
372
367
  <RenderBlocks
@@ -379,3 +374,5 @@ export default function RenderContent(props) {
379
374
  </builderContext.Provider>
380
375
  );
381
376
  }
377
+
378
+ export default RenderContent;
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { TARGET } from "../constants/target.js";
3
3
 
4
- export default function RenderInlinedStyles(props) {
4
+ function RenderInlinedStyles(props) {
5
5
  function injectedStyleScript() {
6
6
  return `<${tag()}>${props.styles}</${tag()}>`;
7
7
  }
@@ -26,3 +26,5 @@ export default function RenderInlinedStyles(props) {
26
26
  </>
27
27
  );
28
28
  }
29
+
30
+ export default RenderInlinedStyles;
@@ -1,6 +1,7 @@
1
+ import { TARGET } from "../constants/target.js";
1
2
  import { isIframe } from "./is-iframe.js";
2
3
  function isEditing() {
3
- return isIframe() && window.location.search.indexOf("builder.frameEditing=") !== -1;
4
+ return isIframe() && (TARGET === "reactNative" || window.location.search.indexOf("builder.frameEditing=") !== -1);
4
5
  }
5
6
  export {
6
7
  isEditing
@@ -1,5 +1,4 @@
1
1
  export * from "./index-helpers/top-of-file.js";
2
- import "./scripts/init-editing.js";
3
2
  export * from "./index-helpers/blocks-exports.js";
4
3
  export * from "./functions/is-editing.js";
5
4
  export * from "./functions/is-previewing.js";
@@ -1,10 +1,12 @@
1
1
  import * as React from "react";
2
2
  import BuilderContext from "../context/builder.context.js";
3
3
 
4
- export default function BaseText(props) {
4
+ function BaseText(props) {
5
5
  const _context = { ...props["_context"] };
6
6
 
7
7
  const builderContext = _context["BuilderContext"];
8
8
 
9
9
  return <span style={builderContext.inheritedStyles}>{props.text}</span>;
10
10
  }
11
+
12
+ export default BaseText;
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
 
3
- export default function Button(props) {
3
+ function Button(props) {
4
4
  const _context = { ...props["_context"] };
5
5
 
6
6
  return (
@@ -27,3 +27,5 @@ all: unset;
27
27
  </>
28
28
  );
29
29
  }
30
+
31
+ export default Button;
@@ -6,7 +6,7 @@ import { TARGET } from "../../constants/target.js";
6
6
  import { convertStyleMapToCSS } from "../../helpers/css";
7
7
  import BuilderContext from "../../context/builder.context.js";
8
8
 
9
- export default function Columns(props) {
9
+ function Columns(props) {
10
10
  const _context = { ...props["_context"] };
11
11
 
12
12
  const state = {
@@ -85,26 +85,26 @@ export default function Columns(props) {
85
85
  },
86
86
  get columnsStyles() {
87
87
  return `
88
- @media (max-width: ${state.getWidthForBreakpointSize("medium")}px) {
89
- .${props.builderBlock.id}-breakpoints {
90
- ${convertStyleMapToCSS(state.columnStyleObjects.columns.medium)}
91
- }
88
+ @media (max-width: ${state.getWidthForBreakpointSize("medium")}px) {
89
+ .${props.builderBlock.id}-breakpoints {
90
+ ${convertStyleMapToCSS(state.columnStyleObjects.columns.medium)}
91
+ }
92
92
 
93
- .${props.builderBlock.id}-breakpoints > .builder-column {
94
- ${convertStyleMapToCSS(state.columnStyleObjects.column.medium)}
95
- }
93
+ .${props.builderBlock.id}-breakpoints > .builder-column {
94
+ ${convertStyleMapToCSS(state.columnStyleObjects.column.medium)}
96
95
  }
96
+ }
97
97
 
98
- @media (max-width: ${state.getWidthForBreakpointSize("small")}px) {
99
- .${props.builderBlock.id}-breakpoints {
100
- ${convertStyleMapToCSS(state.columnStyleObjects.columns.small)}
101
- }
98
+ @media (max-width: ${state.getWidthForBreakpointSize("small")}px) {
99
+ .${props.builderBlock.id}-breakpoints {
100
+ ${convertStyleMapToCSS(state.columnStyleObjects.columns.small)}
101
+ }
102
102
 
103
- .${props.builderBlock.id}-breakpoints > .builder-column {
104
- ${convertStyleMapToCSS(state.columnStyleObjects.column.small)}
105
- }
106
- },
107
- `;
103
+ .${props.builderBlock.id}-breakpoints > .builder-column {
104
+ ${convertStyleMapToCSS(state.columnStyleObjects.column.small)}
105
+ }
106
+ },
107
+ `;
108
108
  },
109
109
  get reactNativeColumnsStyles() {
110
110
  return this.columnStyleObjects.columns.small;
@@ -173,3 +173,5 @@ align-items: stretch;
173
173
  </>
174
174
  );
175
175
  }
176
+
177
+ export default Columns;
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
 
3
- export default function CustomCode(props) {
3
+ function CustomCode(props) {
4
4
  const _context = { ...props["_context"] };
5
5
 
6
6
  const state = {
@@ -53,3 +53,5 @@ export default function CustomCode(props) {
53
53
  />
54
54
  );
55
55
  }
56
+
57
+ export default CustomCode;
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { isJsScript } from "./helpers.js";
3
3
 
4
- export default function Embed(props) {
4
+ function Embed(props) {
5
5
  const _context = { ...props["_context"] };
6
6
 
7
7
  const state = {
@@ -41,3 +41,5 @@ export default function Embed(props) {
41
41
  />
42
42
  );
43
43
  }
44
+
45
+ export default Embed;
@@ -3,7 +3,7 @@ import RenderBlock from "../../components/render-block/render-block";
3
3
  import BuilderBlocks from "../../components/render-blocks";
4
4
  import { isEditing } from "../../functions/is-editing.js";
5
5
 
6
- export default function FormComponent(props) {
6
+ function FormComponent(props) {
7
7
  const _context = { ...props["_context"] };
8
8
 
9
9
  const state = {
@@ -137,7 +137,7 @@ export default function FormComponent(props) {
137
137
  get(body, props.errorMessagePath);
138
138
  if (message) {
139
139
  if (typeof message !== "string") {
140
- /* TODO: ideally convert json to yaml so it woul dbe like error: - email has been taken */ message =
140
+ /* TODO: ideally convert json to yaml so it woul dbe like error: - email has been taken */ message =
141
141
  JSON.stringify(message);
142
142
  }
143
143
  state.formErrorMessage = message;
@@ -257,3 +257,4 @@ export default function FormComponent(props) {
257
257
  </>
258
258
  );
259
259
  }
260
+ export default FormComponent;
@@ -1,7 +1,9 @@
1
1
  import * as React from "react";
2
2
 
3
- export default function FragmentComponent(props) {
3
+ function FragmentComponent(props) {
4
4
  const _context = { ...props["_context"] };
5
5
 
6
6
  return <span>{props.children}</span>;
7
7
  }
8
+
9
+ export default FragmentComponent;
@@ -17,7 +17,7 @@ const componentInfo = {
17
17
  bubble: true,
18
18
  allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
19
19
  required: true,
20
- defaultValue: "https://cdn.builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
20
+ defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
21
21
  onChange: serializeFn((options) => {
22
22
  const DEFAULT_ASPECT_RATIO = 0.7041;
23
23
  options.delete("srcset");
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { getSrcSet } from "./image.helpers.js";
3
3
 
4
- export default function Image(props) {
4
+ function Image(props) {
5
5
  const _context = { ...props["_context"] };
6
6
 
7
7
  const state = {
@@ -120,3 +120,5 @@ height: 100%;
120
120
  </>
121
121
  );
122
122
  }
123
+
124
+ export default Image;
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { isEditing } from "../../functions/is-editing.js";
3
3
 
4
- export default function ImgComponent(props) {
4
+ function ImgComponent(props) {
5
5
  const _context = { ...props["_context"] };
6
6
 
7
7
  return (
@@ -17,3 +17,5 @@ export default function ImgComponent(props) {
17
17
  />
18
18
  );
19
19
  }
20
+
21
+ export default ImgComponent;
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { isEditing } from "../../functions/is-editing.js";
3
3
 
4
- export default function FormInputComponent(props) {
4
+ function FormInputComponent(props) {
5
5
  const _context = { ...props["_context"] };
6
6
 
7
7
  return (
@@ -19,3 +19,5 @@ export default function FormInputComponent(props) {
19
19
  />
20
20
  );
21
21
  }
22
+
23
+ export default FormInputComponent;
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
 
3
- export default function RawText(props) {
3
+ function RawText(props) {
4
4
  const _context = { ...props["_context"] };
5
5
 
6
6
  return (
@@ -10,3 +10,5 @@ export default function RawText(props) {
10
10
  />
11
11
  );
12
12
  }
13
+
14
+ export default RawText;
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
 
3
- export default function SectionComponent(props) {
3
+ function SectionComponent(props) {
4
4
  const _context = { ...props["_context"] };
5
5
 
6
6
  return (
@@ -23,3 +23,5 @@ export default function SectionComponent(props) {
23
23
  </section>
24
24
  );
25
25
  }
26
+
27
+ export default SectionComponent;
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { isEditing } from "../../functions/is-editing.js";
3
3
 
4
- export default function SelectComponent(props) {
4
+ function SelectComponent(props) {
5
5
  const _context = { ...props["_context"] };
6
6
 
7
7
  return (
@@ -20,3 +20,5 @@ export default function SelectComponent(props) {
20
20
  </select>
21
21
  );
22
22
  }
23
+
24
+ export default SelectComponent;
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
 
3
- export default function SubmitButton(props) {
3
+ function SubmitButton(props) {
4
4
  const _context = { ...props["_context"] };
5
5
 
6
6
  return (
@@ -9,3 +9,5 @@ export default function SubmitButton(props) {
9
9
  </button>
10
10
  );
11
11
  }
12
+
13
+ export default SubmitButton;
@@ -4,7 +4,7 @@ import BuilderContext from "../../context/builder.context.js";
4
4
  import { getContent } from "../../functions/get-content/index.js";
5
5
  import { TARGET } from "../../constants/target";
6
6
 
7
- export default function Symbol(props) {
7
+ function Symbol(props) {
8
8
  const _context = { ...props["_context"] };
9
9
 
10
10
  const state = {
@@ -54,3 +54,5 @@ export default function Symbol(props) {
54
54
  </div>
55
55
  );
56
56
  }
57
+
58
+ export default Symbol;
@@ -1,12 +1,17 @@
1
1
  import * as React from "react";
2
2
 
3
- export default function Text(props) {
3
+ function Text(props) {
4
4
  const _context = { ...props["_context"] };
5
5
 
6
6
  return (
7
7
  <span
8
8
  className="builder-text"
9
9
  dangerouslySetInnerHTML={{ __html: props.text }}
10
+ style={{
11
+ outline: "none",
12
+ }}
10
13
  />
11
14
  );
12
15
  }
16
+
17
+ export default Text;
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
 
3
- export default function Textarea(props) {
3
+ function Textarea(props) {
4
4
  const _context = { ...props["_context"] };
5
5
 
6
6
  return (
@@ -13,3 +13,5 @@ export default function Textarea(props) {
13
13
  />
14
14
  );
15
15
  }
16
+
17
+ export default Textarea;
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
 
3
- export default function Video(props) {
3
+ function Video(props) {
4
4
  const _context = { ...props["_context"] };
5
5
 
6
6
  const state = {
@@ -59,3 +59,5 @@ export default function Video(props) {
59
59
  />
60
60
  );
61
61
  }
62
+
63
+ export default Video;
@@ -9,7 +9,7 @@ import { createCssClass } from "../../helpers/css.js";
9
9
  import { checkIsDefined } from "../../helpers/nullable.js";
10
10
  import RenderInlinedStyles from "../render-inlined-styles";
11
11
 
12
- export default function BlockStyles(props) {
12
+ function BlockStyles(props) {
13
13
  const _context = { ...props["_context"] };
14
14
 
15
15
  const state = {
@@ -81,3 +81,5 @@ export default function BlockStyles(props) {
81
81
  </>
82
82
  );
83
83
  }
84
+
85
+ export default BlockStyles;
@@ -17,7 +17,7 @@ import RenderComponent from "./render-component";
17
17
  import { getReactNativeBlockStyles } from "../../functions/get-react-native-block-styles.js";
18
18
  import { checkIsDefined } from "../../helpers/nullable.js";
19
19
 
20
- export default function RenderBlock(props) {
20
+ function RenderBlock(props) {
21
21
  const _context = { ...props["_context"] };
22
22
 
23
23
  const state = {
@@ -217,3 +217,5 @@ export default function RenderBlock(props) {
217
217
  </>
218
218
  );
219
219
  }
220
+
221
+ export default RenderBlock;
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import BlockStyles from "./block-styles";
3
3
  import RenderBlock from "./render-block";
4
4
 
5
- export default function RenderComponent(props) {
5
+ function RenderComponent(props) {
6
6
  const _context = { ...props["_context"] };
7
7
 
8
8
  const ComponentRefRef = props.componentRef;
@@ -35,3 +35,5 @@ export default function RenderComponent(props) {
35
35
  </>
36
36
  );
37
37
  }
38
+
39
+ export default RenderComponent;
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import BuilderContext from "../../context/builder.context.js";
3
3
  import RenderBlock from "./render-block";
4
4
 
5
- export default function RenderRepeatedBlock(props) {
5
+ function RenderRepeatedBlock(props) {
6
6
  const _context = { ...props["_context"] };
7
7
 
8
8
  _context.BuilderContext = {
@@ -23,3 +23,5 @@ export default function RenderRepeatedBlock(props) {
23
23
  />
24
24
  );
25
25
  }
26
+
27
+ export default RenderRepeatedBlock;
@@ -4,7 +4,7 @@ import { isEditing } from "../functions/is-editing.js";
4
4
  import BlockStyles from "./render-block/block-styles";
5
5
  import RenderBlock from "./render-block/render-block";
6
6
 
7
- export default function RenderBlocks(props) {
7
+ function RenderBlocks(props) {
8
8
  const _context = { ...props["_context"] };
9
9
 
10
10
  const state = {
@@ -88,3 +88,5 @@ align-items: stretch;
88
88
  </>
89
89
  );
90
90
  }
91
+
92
+ export default RenderBlocks;
@@ -3,7 +3,7 @@ import RenderInlinedStyles from "../../render-inlined-styles";
3
3
  import { getCss } from "./render-styles.helpers";
4
4
  import { getFontCss } from "./render-styles.helpers";
5
5
 
6
- export default function RenderContentStyles(props) {
6
+ function RenderContentStyles(props) {
7
7
  const _context = { ...props["_context"] };
8
8
 
9
9
  const state = {
@@ -15,6 +15,19 @@ ${getCss({
15
15
  ${getFontCss({
16
16
  customFonts: props.customFonts,
17
17
  })}
18
+
19
+ .builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
20
+ margin: 0;
21
+ }
22
+ .builder-text > p, .builder-text > .builder-paragraph {
23
+ color: inherit;
24
+ line-height: inherit;
25
+ letter-spacing: inherit;
26
+ font-weight: inherit;
27
+ font-size: inherit;
28
+ text-align: inherit;
29
+ font-family: inherit;
30
+ }
18
31
  `,
19
32
  };
20
33
 
@@ -22,3 +35,5 @@ ${getFontCss({
22
35
  <RenderInlinedStyles styles={state.injectedStyles} _context={_context} />
23
36
  );
24
37
  }
38
+
39
+ export default RenderContentStyles;