@builder.io/sdk-react 0.1.3 → 0.1.5
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.
- package/dist/react/blocks/button/button.js +2 -2
- package/dist/react/blocks/columns/columns.js +6 -6
- package/dist/react/blocks/form/form.js +4 -4
- package/dist/react/blocks/image/image.js +6 -6
- package/dist/react/blocks/symbol/symbol.js +1 -1
- package/dist/react/components/render-block/block-styles.js +1 -1
- package/dist/react/components/render-block/render-block.js +21 -4
- package/dist/react/components/render-block/render-component.js +2 -2
- package/dist/react/components/render-block/render-repeated-block.js +2 -1
- package/dist/react/components/render-blocks.js +4 -4
- package/dist/react/components/render-content/components/render-styles.helpers.js +51 -0
- package/dist/react/components/render-content/components/render-styles.js +13 -55
- package/dist/react/components/render-content/index.js +1 -1
- package/dist/react/components/render-content/render-content.helpers.js +38 -0
- package/dist/react/components/render-content/render-content.js +67 -64
- package/dist/react/components/render-content/render-content.types.js +1 -0
- package/dist/react/components/render-inlined-styles.js +2 -2
- package/dist/react/constants/builder-registered-components.js +18 -18
- package/dist/react/context/builder.context.js +2 -0
- package/dist/react/index-helpers/blocks-exports.js +11 -11
- package/dist/react/types/input.js +1 -0
- package/dist/rsc/blocks/button/button.js +2 -2
- package/dist/rsc/blocks/columns/columns.js +6 -6
- package/dist/rsc/blocks/form/form.js +4 -4
- package/dist/rsc/blocks/image/image.js +6 -6
- package/dist/rsc/blocks/symbol/symbol.js +1 -1
- package/dist/rsc/components/render-block/block-styles.js +1 -1
- package/dist/rsc/components/render-block/render-block.js +21 -4
- package/dist/rsc/components/render-block/render-component.js +2 -2
- package/dist/rsc/components/render-block/render-repeated-block.js +2 -1
- package/dist/rsc/components/render-blocks.js +4 -4
- package/dist/rsc/components/render-content/builder-editing.js +47 -4
- package/dist/rsc/components/render-content/components/render-styles.helpers.js +51 -0
- package/dist/rsc/components/render-content/components/render-styles.js +12 -55
- package/dist/rsc/components/render-content/index.js +1 -1
- package/dist/rsc/components/render-content/render-content.helpers.js +38 -0
- package/dist/rsc/components/render-content/render-content.js +45 -40
- package/dist/rsc/components/render-content/render-content.types.js +1 -0
- package/dist/rsc/components/render-inlined-styles.js +2 -2
- package/dist/rsc/constants/builder-registered-components.js +18 -18
- package/dist/rsc/context/builder.context.js +2 -0
- package/dist/rsc/index-helpers/blocks-exports.js +11 -11
- package/dist/rsc/types/input.js +1 -0
- package/package.json +1 -1
- package/packages/react/src/blocks/button/button.jsx +2 -2
- package/packages/react/src/blocks/columns/columns.jsx +6 -6
- package/packages/react/src/blocks/form/form.jsx +4 -4
- package/packages/react/src/blocks/image/image.jsx +6 -6
- package/packages/react/src/blocks/symbol/symbol.jsx +1 -1
- package/packages/react/src/components/render-block/block-styles.jsx +1 -1
- package/packages/react/src/components/render-block/render-block.jsx +25 -4
- package/packages/react/src/components/render-block/render-component.jsx +2 -2
- package/packages/react/src/components/render-block/render-repeated-block.jsx +2 -1
- package/packages/react/src/components/render-blocks.jsx +4 -4
- package/packages/react/src/components/render-content/components/render-styles.helpers.js +57 -0
- package/packages/react/src/components/render-content/components/render-styles.jsx +14 -57
- package/packages/react/src/components/render-content/index.js +1 -1
- package/packages/react/src/components/render-content/render-content.helpers.js +48 -0
- package/packages/react/src/components/render-content/render-content.jsx +78 -69
- package/packages/{_rsc/src/components/render-block/types.js → react/src/components/render-content/render-content.types.js} +0 -0
- package/packages/react/src/components/render-inlined-styles.jsx +2 -2
- package/packages/react/src/constants/builder-registered-components.js +18 -18
- package/packages/react/src/context/builder.context.js +2 -0
- package/packages/react/src/index-helpers/blocks-exports.js +19 -19
- package/packages/{_rsc/src/context/types.js → react/src/types/input.js} +0 -0
- package/packages/rsc/src/blocks/button/button.jsx +2 -2
- package/packages/rsc/src/blocks/columns/columns.jsx +6 -6
- package/packages/rsc/src/blocks/form/form.jsx +4 -4
- package/packages/rsc/src/blocks/image/image.jsx +6 -6
- package/packages/rsc/src/blocks/symbol/symbol.jsx +1 -1
- package/packages/rsc/src/components/render-block/block-styles.jsx +1 -1
- package/packages/rsc/src/components/render-block/render-block.jsx +24 -4
- package/packages/rsc/src/components/render-block/render-component.jsx +2 -2
- package/packages/rsc/src/components/render-block/render-repeated-block.jsx +2 -1
- package/packages/rsc/src/components/render-blocks.jsx +4 -4
- package/packages/rsc/src/components/render-content/builder-editing.jsx +61 -4
- package/packages/rsc/src/components/render-content/components/render-styles.helpers.js +57 -0
- package/packages/rsc/src/components/render-content/components/render-styles.jsx +11 -57
- package/packages/rsc/src/components/render-content/index.js +1 -1
- package/packages/rsc/src/components/render-content/render-content.helpers.js +48 -0
- package/packages/rsc/src/components/render-content/render-content.jsx +48 -39
- package/packages/{_rsc/src/functions/get-content/types.js → rsc/src/components/render-content/render-content.types.js} +0 -0
- package/packages/rsc/src/components/render-inlined-styles.jsx +2 -4
- package/packages/rsc/src/constants/builder-registered-components.js +18 -18
- package/packages/rsc/src/context/builder.context.js +2 -0
- package/packages/rsc/src/index-helpers/blocks-exports.js +19 -19
- package/packages/{_rsc/src/types/builder-block.js → rsc/src/types/input.js} +0 -0
- package/packages/_rsc/src/blocks/BaseText.jsx +0 -10
- package/packages/_rsc/src/blocks/button/button.jsx +0 -29
- package/packages/_rsc/src/blocks/button/component-info.js +0 -41
- package/packages/_rsc/src/blocks/columns/columns.jsx +0 -172
- package/packages/_rsc/src/blocks/columns/component-info.js +0 -242
- package/packages/_rsc/src/blocks/custom-code/component-info.js +0 -31
- package/packages/_rsc/src/blocks/custom-code/custom-code.jsx +0 -55
- package/packages/_rsc/src/blocks/embed/component-info.js +0 -44
- package/packages/_rsc/src/blocks/embed/embed.jsx +0 -43
- package/packages/_rsc/src/blocks/embed/helpers.js +0 -9
- package/packages/_rsc/src/blocks/form/component-info.js +0 -262
- package/packages/_rsc/src/blocks/form/form.jsx +0 -259
- package/packages/_rsc/src/blocks/fragment/component-info.js +0 -11
- package/packages/_rsc/src/blocks/fragment/fragment.jsx +0 -7
- package/packages/_rsc/src/blocks/image/component-info.js +0 -151
- package/packages/_rsc/src/blocks/image/image.helpers.js +0 -48
- package/packages/_rsc/src/blocks/image/image.jsx +0 -124
- package/packages/_rsc/src/blocks/img/component-info.js +0 -20
- package/packages/_rsc/src/blocks/img/img.jsx +0 -19
- package/packages/_rsc/src/blocks/input/component-info.js +0 -74
- package/packages/_rsc/src/blocks/input/input.jsx +0 -21
- package/packages/_rsc/src/blocks/raw-text/component-info.js +0 -16
- package/packages/_rsc/src/blocks/raw-text/raw-text.jsx +0 -12
- package/packages/_rsc/src/blocks/section/component-info.js +0 -49
- package/packages/_rsc/src/blocks/section/section.jsx +0 -29
- package/packages/_rsc/src/blocks/select/component-info.js +0 -59
- package/packages/_rsc/src/blocks/select/select.jsx +0 -22
- package/packages/_rsc/src/blocks/submit-button/component-info.js +0 -28
- package/packages/_rsc/src/blocks/submit-button/submit-button.jsx +0 -11
- package/packages/_rsc/src/blocks/symbol/component-info.js +0 -43
- package/packages/_rsc/src/blocks/symbol/symbol.jsx +0 -56
- package/packages/_rsc/src/blocks/text/component-info.js +0 -24
- package/packages/_rsc/src/blocks/text/text.jsx +0 -12
- package/packages/_rsc/src/blocks/textarea/component-info.js +0 -47
- package/packages/_rsc/src/blocks/textarea/textarea.jsx +0 -15
- package/packages/_rsc/src/blocks/util.js +0 -8
- package/packages/_rsc/src/blocks/video/component-info.js +0 -106
- package/packages/_rsc/src/blocks/video/video.jsx +0 -61
- package/packages/_rsc/src/components/render-block/block-styles.jsx +0 -72
- package/packages/_rsc/src/components/render-block/render-block.helpers.js +0 -23
- package/packages/_rsc/src/components/render-block/render-block.jsx +0 -251
- package/packages/_rsc/src/components/render-block/render-component-with-context.jsx +0 -38
- package/packages/_rsc/src/components/render-block/render-component.jsx +0 -37
- package/packages/_rsc/src/components/render-block/render-repeated-block.jsx +0 -36
- package/packages/_rsc/src/components/render-blocks.jsx +0 -90
- package/packages/_rsc/src/components/render-content/builder-editing.jsx +0 -7
- package/packages/_rsc/src/components/render-content/components/render-styles.jsx +0 -70
- package/packages/_rsc/src/components/render-content/index.js +0 -4
- package/packages/_rsc/src/components/render-content/render-content.jsx +0 -259
- package/packages/_rsc/src/components/render-inlined-styles.jsx +0 -33
- package/packages/_rsc/src/constants/builder-registered-components.js +0 -54
- package/packages/_rsc/src/constants/device-sizes.js +0 -48
- package/packages/_rsc/src/constants/target.js +0 -4
- package/packages/_rsc/src/context/builder.context.js +0 -11
- package/packages/_rsc/src/functions/camel-to-kebab-case.js +0 -4
- package/packages/_rsc/src/functions/evaluate.js +0 -6
- package/packages/_rsc/src/functions/event-handler-name.js +0 -7
- package/packages/_rsc/src/functions/extract-text-styles.js +0 -22
- package/packages/_rsc/src/functions/fast-clone.js +0 -4
- package/packages/_rsc/src/functions/get-block-actions-handler.js +0 -11
- package/packages/_rsc/src/functions/get-block-actions.js +0 -18
- package/packages/_rsc/src/functions/get-block-component-options.js +0 -28
- package/packages/_rsc/src/functions/get-block-properties.js +0 -50
- package/packages/_rsc/src/functions/get-block-tag.js +0 -6
- package/packages/_rsc/src/functions/get-builder-search-params/fn.test.js +0 -13
- package/packages/_rsc/src/functions/get-builder-search-params/index.js +0 -38
- package/packages/_rsc/src/functions/get-content/ab-testing.js +0 -99
- package/packages/_rsc/src/functions/get-content/generate-content-url.js +0 -55
- package/packages/_rsc/src/functions/get-content/generate-content-url.test.js +0 -31
- package/packages/_rsc/src/functions/get-content/index.js +0 -65
- package/packages/_rsc/src/functions/get-fetch.js +0 -14
- package/packages/_rsc/src/functions/get-global-this.js +0 -18
- package/packages/_rsc/src/functions/get-processed-block.js +0 -59
- package/packages/_rsc/src/functions/get-processed-block.test.js +0 -32
- package/packages/_rsc/src/functions/get-react-native-block-styles.js +0 -33
- package/packages/_rsc/src/functions/if-target.js +0 -15
- package/packages/_rsc/src/functions/is-browser.js +0 -6
- package/packages/_rsc/src/functions/is-editing.js +0 -7
- package/packages/_rsc/src/functions/is-iframe.js +0 -7
- package/packages/_rsc/src/functions/is-previewing.js +0 -14
- package/packages/_rsc/src/functions/on-change.js +0 -27
- package/packages/_rsc/src/functions/on-change.test.js +0 -19
- package/packages/_rsc/src/functions/register-component.js +0 -68
- package/packages/_rsc/src/functions/register.js +0 -29
- package/packages/_rsc/src/functions/sanitize-react-native-block-styles.js +0 -66
- package/packages/_rsc/src/functions/set-editor-settings.js +0 -15
- package/packages/_rsc/src/functions/set.js +0 -11
- package/packages/_rsc/src/functions/set.test.js +0 -16
- package/packages/_rsc/src/functions/track.js +0 -124
- package/packages/_rsc/src/functions/transform-block-properties.js +0 -6
- package/packages/_rsc/src/functions/transform-block.js +0 -6
- package/packages/_rsc/src/helpers/ab-tests.js +0 -16
- package/packages/_rsc/src/helpers/cookie.js +0 -81
- package/packages/_rsc/src/helpers/css.js +0 -34
- package/packages/_rsc/src/helpers/flatten.js +0 -34
- package/packages/_rsc/src/helpers/localStorage.js +0 -35
- package/packages/_rsc/src/helpers/nullable.js +0 -4
- package/packages/_rsc/src/helpers/sessionId.js +0 -52
- package/packages/_rsc/src/helpers/time.js +0 -5
- package/packages/_rsc/src/helpers/url.js +0 -13
- package/packages/_rsc/src/helpers/url.test.js +0 -21
- package/packages/_rsc/src/helpers/uuid.js +0 -13
- package/packages/_rsc/src/helpers/visitorId.js +0 -34
- package/packages/_rsc/src/index-helpers/blocks-exports.js +0 -22
- package/packages/_rsc/src/index-helpers/top-of-file.js +0 -2
- package/packages/_rsc/src/index.js +0 -14
- package/packages/_rsc/src/scripts/init-editing.js +0 -93
- package/packages/_rsc/src/types/builder-content.js +0 -0
- package/packages/_rsc/src/types/can-track.js +0 -0
- package/packages/_rsc/src/types/components.js +0 -0
- package/packages/_rsc/src/types/deep-partial.js +0 -0
- package/packages/_rsc/src/types/element.js +0 -0
- package/packages/_rsc/src/types/targets.js +0 -0
- package/packages/_rsc/src/types/typescript.js +0 -0
|
@@ -1,5 +1,48 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import { setupBrowserForEditing } from '../../scripts/init-editing.js';
|
|
3
|
+
// import type { RegisteredComponent } from '../../context/types.js';
|
|
4
|
+
// import type { BuilderContent } from '../../types/builder-content.js';
|
|
5
|
+
/**
|
|
6
|
+
* @typedef {object} RegisteredComponent
|
|
7
|
+
* @typedef {object} BuilderContent
|
|
8
|
+
* @typedef {(data: {data: object, key: string }) => void} OnUpdateCallback
|
|
9
|
+
* @typedef {{
|
|
10
|
+
* model: string,
|
|
11
|
+
* components?: RegisteredComponent[],
|
|
12
|
+
* children: any,
|
|
13
|
+
* onUpdate?: OnUpdateCallback,
|
|
14
|
+
* }} BuilderEditingProps
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* @param {BuilderEditingProps} props
|
|
18
|
+
*/
|
|
19
|
+
export function BuilderEditingWrapper(props) {
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
setupBrowserForEditing();
|
|
22
|
+
if (props.components) {
|
|
23
|
+
for (const component of props.components) {
|
|
24
|
+
window.parent.postMessage({
|
|
25
|
+
type: 'builder.registerComponent',
|
|
26
|
+
data: component,
|
|
27
|
+
}, '*');
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @param {MessageEvent} e
|
|
33
|
+
*/
|
|
34
|
+
function onMessage(e) {
|
|
35
|
+
switch (e.data?.type) {
|
|
36
|
+
case 'builder.contentUpdate': {
|
|
37
|
+
props.onUpdate?.(e.data.data);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
addEventListener('message', onMessage);
|
|
42
|
+
return () => window.removeEventListener('message', onMessage);
|
|
43
|
+
}, [props.model]);
|
|
44
|
+
return (React.createElement("div", { onMouseDown: (e) => e.preventDefault(), onClickCapture: (e) => {
|
|
45
|
+
e.stopPropagation();
|
|
46
|
+
e.preventDefault();
|
|
47
|
+
} }, props.children));
|
|
5
48
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
const getCssFromFont = (font) => {
|
|
2
|
+
var _a, _b;
|
|
3
|
+
const family = font.family + (font.kind && !font.kind.includes("#") ? ", " + font.kind : "");
|
|
4
|
+
const name = family.split(",")[0];
|
|
5
|
+
const url = (_b = font.fileUrl) != null ? _b : (_a = font == null ? void 0 : font.files) == null ? void 0 : _a.regular;
|
|
6
|
+
let str = "";
|
|
7
|
+
if (url && family && name) {
|
|
8
|
+
str += `
|
|
9
|
+
@font-face {
|
|
10
|
+
font-family: "${family}";
|
|
11
|
+
src: local("${name}"), url('${url}') format('woff2');
|
|
12
|
+
font-display: fallback;
|
|
13
|
+
font-weight: 400;
|
|
14
|
+
}
|
|
15
|
+
`.trim();
|
|
16
|
+
}
|
|
17
|
+
if (font.files) {
|
|
18
|
+
for (const weight in font.files) {
|
|
19
|
+
const isNumber = String(Number(weight)) === weight;
|
|
20
|
+
if (!isNumber) {
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
const weightUrl = font.files[weight];
|
|
24
|
+
if (weightUrl && weightUrl !== url) {
|
|
25
|
+
str += `
|
|
26
|
+
@font-face {
|
|
27
|
+
font-family: "${family}";
|
|
28
|
+
src: url('${weightUrl}') format('woff2');
|
|
29
|
+
font-display: fallback;
|
|
30
|
+
font-weight: ${weight};
|
|
31
|
+
}
|
|
32
|
+
`.trim();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return str;
|
|
37
|
+
};
|
|
38
|
+
const getFontCss = ({ customFonts }) => {
|
|
39
|
+
var _a;
|
|
40
|
+
return ((_a = customFonts == null ? void 0 : customFonts.map((font) => getCssFromFont(font))) == null ? void 0 : _a.join(" ")) || "";
|
|
41
|
+
};
|
|
42
|
+
const getCss = ({ cssCode, contentId }) => {
|
|
43
|
+
if (!cssCode) {
|
|
44
|
+
return "";
|
|
45
|
+
}
|
|
46
|
+
if (!contentId) {
|
|
47
|
+
return cssCode;
|
|
48
|
+
}
|
|
49
|
+
return (cssCode == null ? void 0 : cssCode.replace(/&/g, `div[builder-content-id="${contentId}"]`)) || "";
|
|
50
|
+
};
|
|
51
|
+
export { getCss, getFontCss };
|
|
@@ -1,62 +1,19 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import RenderInlinedStyles from "../../render-inlined-styles
|
|
2
|
+
import RenderInlinedStyles from "../../render-inlined-styles";
|
|
3
|
+
import { getCss } from "./render-styles.helpers";
|
|
4
|
+
import { getFontCss } from "./render-styles.helpers";
|
|
3
5
|
export default function RenderContentStyles(props) {
|
|
4
6
|
const _context = { ...props["_context"] };
|
|
5
7
|
const state = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@font-face {
|
|
16
|
-
font-family: "${family}";
|
|
17
|
-
src: local("${name}"), url('${url}') format('woff2');
|
|
18
|
-
font-display: fallback;
|
|
19
|
-
font-weight: 400;
|
|
20
|
-
}
|
|
21
|
-
`.trim();
|
|
22
|
-
}
|
|
23
|
-
if (font.files) {
|
|
24
|
-
for (const weight in font.files) {
|
|
25
|
-
const isNumber = String(Number(weight)) === weight;
|
|
26
|
-
if (!isNumber) {
|
|
27
|
-
continue;
|
|
28
|
-
}
|
|
29
|
-
// TODO: maybe limit number loaded
|
|
30
|
-
const weightUrl = font.files[weight];
|
|
31
|
-
if (weightUrl && weightUrl !== url) {
|
|
32
|
-
str += `
|
|
33
|
-
@font-face {
|
|
34
|
-
font-family: "${family}";
|
|
35
|
-
src: url('${weightUrl}') format('woff2');
|
|
36
|
-
font-display: fallback;
|
|
37
|
-
font-weight: ${weight};
|
|
38
|
-
}
|
|
39
|
-
`.trim();
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
return str;
|
|
44
|
-
},
|
|
45
|
-
getFontCss({ customFonts }) {
|
|
46
|
-
// TODO: flag for this
|
|
47
|
-
// if (!this.builder.allowCustomFonts) {
|
|
48
|
-
// return '';
|
|
49
|
-
// }
|
|
50
|
-
// TODO: separate internal data from external
|
|
51
|
-
return (customFonts?.map((font) => this.getCssFromFont(font))?.join(" ") || "");
|
|
52
|
-
},
|
|
53
|
-
get injectedStyles() {
|
|
54
|
-
return `
|
|
55
|
-
${props.cssCode || ""}
|
|
56
|
-
${state.getFontCss({
|
|
57
|
-
customFonts: props.customFonts,
|
|
58
|
-
})}`;
|
|
59
|
-
},
|
|
8
|
+
injectedStyles: `
|
|
9
|
+
${getCss({
|
|
10
|
+
cssCode: props.cssCode,
|
|
11
|
+
contentId: props.contentId,
|
|
12
|
+
})}
|
|
13
|
+
${getFontCss({
|
|
14
|
+
customFonts: props.customFonts,
|
|
15
|
+
})}
|
|
16
|
+
`,
|
|
60
17
|
};
|
|
61
18
|
return (React.createElement(RenderInlinedStyles, { styles: state.injectedStyles, _context: _context }));
|
|
62
19
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { default as default2 } from "./render-content
|
|
1
|
+
import { default as default2 } from "./render-content";
|
|
2
2
|
export { default2 as default };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
const getContextStateInitialValue = ({ content, data, locale }) => {
|
|
21
|
+
var _a, _b, _c;
|
|
22
|
+
const defaultValues = {};
|
|
23
|
+
(_b = (_a = content == null ? void 0 : content.data) == null ? void 0 : _a.inputs) == null ? void 0 : _b.forEach((input) => {
|
|
24
|
+
var _a2;
|
|
25
|
+
if (input.name && input.defaultValue !== void 0 && ((_a2 = content == null ? void 0 : content.data) == null ? void 0 : _a2.state) && content.data.state[input.name] === void 0) {
|
|
26
|
+
defaultValues[input.name] = input.defaultValue;
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
const stateToUse = __spreadValues(__spreadValues(__spreadValues({}, (_c = content == null ? void 0 : content.data) == null ? void 0 : _c.state), data), locale ? { locale } : {});
|
|
30
|
+
return __spreadValues(__spreadValues({}, defaultValues), stateToUse);
|
|
31
|
+
};
|
|
32
|
+
const getContentInitialValue = ({ content, data }) => {
|
|
33
|
+
return !content ? void 0 : __spreadProps(__spreadValues({}, content), {
|
|
34
|
+
data: __spreadValues(__spreadValues({}, content == null ? void 0 : content.data), data),
|
|
35
|
+
meta: content == null ? void 0 : content.meta
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
export { getContentInitialValue, getContextStateInitialValue };
|
|
@@ -9,55 +9,57 @@ import { isEditing } from "../../functions/is-editing.js";
|
|
|
9
9
|
import { isPreviewing } from "../../functions/is-previewing.js";
|
|
10
10
|
import { components, createRegisterComponentMessage, } from "../../functions/register-component.js";
|
|
11
11
|
import { _track } from "../../functions/track/index.js";
|
|
12
|
-
import RenderBlocks from "../render-blocks
|
|
13
|
-
import RenderContentStyles from "./components/render-styles
|
|
12
|
+
import RenderBlocks from "../render-blocks";
|
|
13
|
+
import RenderContentStyles from "./components/render-styles";
|
|
14
14
|
import builderContext from "../../context/builder.context.js";
|
|
15
15
|
import { registerInsertMenu, setupBrowserForEditing, } from "../../scripts/init-editing.js";
|
|
16
16
|
import { checkIsDefined } from "../../helpers/nullable.js";
|
|
17
17
|
import { getInteractionPropertiesForEvent } from "../../functions/track/interaction.js";
|
|
18
|
+
import { getContentInitialValue, getContextStateInitialValue, } from "./render-content.helpers.js";
|
|
18
19
|
export default function RenderContent(props) {
|
|
19
20
|
const _context = { ...props["_context"] };
|
|
20
21
|
const state = {
|
|
21
22
|
forceReRenderCount: 0,
|
|
22
23
|
overrideContent: null,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
...state.
|
|
24
|
+
useContent: getContentInitialValue({
|
|
25
|
+
content: props.content,
|
|
26
|
+
data: props.data,
|
|
27
|
+
}),
|
|
28
|
+
mergeNewContent(newContent) {
|
|
29
|
+
state.useContent = {
|
|
30
|
+
...state.useContent,
|
|
31
|
+
...newContent,
|
|
30
32
|
data: {
|
|
31
|
-
...
|
|
32
|
-
...
|
|
33
|
-
|
|
33
|
+
...state.useContent?.data,
|
|
34
|
+
...newContent?.data,
|
|
35
|
+
},
|
|
36
|
+
meta: {
|
|
37
|
+
...state.useContent?.meta,
|
|
38
|
+
...newContent?.meta,
|
|
39
|
+
breakpoints: newContent?.meta?.breakpoints ||
|
|
40
|
+
state.useContent?.meta?.breakpoints,
|
|
34
41
|
},
|
|
42
|
+
};
|
|
43
|
+
},
|
|
44
|
+
setBreakpoints(breakpoints) {
|
|
45
|
+
state.useContent = {
|
|
46
|
+
...state.useContent,
|
|
35
47
|
meta: {
|
|
36
|
-
...
|
|
37
|
-
|
|
38
|
-
breakpoints: state.useBreakpoints ||
|
|
39
|
-
state.overrideContent?.meta?.breakpoints ||
|
|
40
|
-
props.content?.meta?.breakpoints,
|
|
48
|
+
...state.useContent?.meta,
|
|
49
|
+
breakpoints,
|
|
41
50
|
},
|
|
42
51
|
};
|
|
43
52
|
},
|
|
44
53
|
update: 0,
|
|
45
|
-
useBreakpoints: null,
|
|
46
54
|
canTrackToUse: checkIsDefined(props.canTrack) ? props.canTrack : true,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
locale: props.locale,
|
|
55
|
-
}
|
|
56
|
-
: {}),
|
|
57
|
-
...state.overrideState,
|
|
58
|
-
};
|
|
55
|
+
contentState: getContextStateInitialValue({
|
|
56
|
+
content: props.content,
|
|
57
|
+
data: props.data,
|
|
58
|
+
locale: props.locale,
|
|
59
|
+
}),
|
|
60
|
+
setContextState(newState) {
|
|
61
|
+
state.contentState = newState;
|
|
59
62
|
},
|
|
60
|
-
contextContext: props.context || {},
|
|
61
63
|
allRegisteredComponents: [
|
|
62
64
|
...getDefaultRegisteredComponents(),
|
|
63
65
|
// While this `components` object is deprecated, we must maintain support for it.
|
|
@@ -81,7 +83,9 @@ export default function RenderContent(props) {
|
|
|
81
83
|
if (!contentId || contentId !== state.useContent?.id) {
|
|
82
84
|
return;
|
|
83
85
|
}
|
|
84
|
-
|
|
86
|
+
if (breakpoints) {
|
|
87
|
+
state.setBreakpoints(breakpoints);
|
|
88
|
+
}
|
|
85
89
|
state.forceReRenderCount = state.forceReRenderCount + 1; // This is a hack to force Qwik to re-render.
|
|
86
90
|
break;
|
|
87
91
|
}
|
|
@@ -93,7 +97,7 @@ export default function RenderContent(props) {
|
|
|
93
97
|
messageContent.modelName;
|
|
94
98
|
const contentData = messageContent.data;
|
|
95
99
|
if (key === props.model) {
|
|
96
|
-
state.
|
|
100
|
+
state.mergeNewContent(contentData);
|
|
97
101
|
state.forceReRenderCount = state.forceReRenderCount + 1; // This is a hack to force Qwik to re-render.
|
|
98
102
|
}
|
|
99
103
|
break;
|
|
@@ -111,7 +115,7 @@ export default function RenderContent(props) {
|
|
|
111
115
|
if (jsCode) {
|
|
112
116
|
evaluate({
|
|
113
117
|
code: jsCode,
|
|
114
|
-
context:
|
|
118
|
+
context: props.context || {},
|
|
115
119
|
state: state.contentState,
|
|
116
120
|
});
|
|
117
121
|
}
|
|
@@ -139,7 +143,7 @@ export default function RenderContent(props) {
|
|
|
139
143
|
evalExpression(expression) {
|
|
140
144
|
return expression.replace(/{{([^}]+)}}/g, (_match, group) => evaluate({
|
|
141
145
|
code: group,
|
|
142
|
-
context:
|
|
146
|
+
context: props.context || {},
|
|
143
147
|
state: state.contentState,
|
|
144
148
|
}));
|
|
145
149
|
},
|
|
@@ -147,11 +151,11 @@ export default function RenderContent(props) {
|
|
|
147
151
|
fetch(url)
|
|
148
152
|
.then((response) => response.json())
|
|
149
153
|
.then((json) => {
|
|
150
|
-
const
|
|
151
|
-
...state.
|
|
154
|
+
const newState = {
|
|
155
|
+
...state.contentState,
|
|
152
156
|
[key]: json,
|
|
153
157
|
};
|
|
154
|
-
state.
|
|
158
|
+
state.setContextState(newState);
|
|
155
159
|
})
|
|
156
160
|
.catch((err) => {
|
|
157
161
|
console.log("error fetching dynamic data", url, err);
|
|
@@ -190,12 +194,13 @@ export default function RenderContent(props) {
|
|
|
190
194
|
_context.builderContext = {
|
|
191
195
|
content: state.useContent,
|
|
192
196
|
state: state.contentState,
|
|
193
|
-
|
|
197
|
+
setState: state.setContextState,
|
|
198
|
+
context: props.context || {},
|
|
194
199
|
apiKey: props.apiKey,
|
|
195
200
|
registeredComponents: state.allRegisteredComponents,
|
|
196
201
|
};
|
|
197
202
|
return (React.createElement(React.Fragment, null, state.useContent ? (React.createElement(React.Fragment, null,
|
|
198
203
|
React.createElement("div", { "builder-content-id": state.useContent?.id, "builder-model": props.model },
|
|
199
|
-
state.shouldRenderContentStyles ? (React.createElement(RenderContentStyles, { cssCode: state.useContent?.data?.cssCode, customFonts: state.useContent?.data?.customFonts, _context: _context })) : null,
|
|
204
|
+
state.shouldRenderContentStyles ? (React.createElement(RenderContentStyles, { contentId: state.useContent?.id, cssCode: state.useContent?.data?.cssCode, customFonts: state.useContent?.data?.customFonts, _context: _context })) : null,
|
|
200
205
|
React.createElement(RenderBlocks, { blocks: state.useContent?.data?.blocks, key: state.forceReRenderCount, _context: _context })))) : null));
|
|
201
206
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -13,6 +13,6 @@ export default function RenderInlinedStyles(props) {
|
|
|
13
13
|
},
|
|
14
14
|
};
|
|
15
15
|
const TagRef = state.tag;
|
|
16
|
-
return (React.createElement(React.Fragment, null, TARGET === "svelte" ? (React.createElement(React.Fragment, null,
|
|
17
|
-
React.createElement(
|
|
16
|
+
return (React.createElement(React.Fragment, null, TARGET === "svelte" || TARGET === "qwik" ? (React.createElement(React.Fragment, null,
|
|
17
|
+
React.createElement(TagRef, { dangerouslySetInnerHTML: { __html: props.styles } }))) : (React.createElement(TagRef, null, props.styles))));
|
|
18
18
|
}
|
|
@@ -14,39 +14,39 @@ var __spreadValues = (a, b) => {
|
|
|
14
14
|
}
|
|
15
15
|
return a;
|
|
16
16
|
};
|
|
17
|
-
import { default as Button } from "../blocks/button/button
|
|
17
|
+
import { default as Button } from "../blocks/button/button";
|
|
18
18
|
import { componentInfo as buttonComponentInfo } from "../blocks/button/component-info.js";
|
|
19
|
-
import { default as Columns } from "../blocks/columns/columns
|
|
19
|
+
import { default as Columns } from "../blocks/columns/columns";
|
|
20
20
|
import { componentInfo as columnsComponentInfo } from "../blocks/columns/component-info.js";
|
|
21
21
|
import { componentInfo as fragmentComponentInfo } from "../blocks/fragment/component-info.js";
|
|
22
|
-
import { default as Fragment } from "../blocks/fragment/fragment
|
|
22
|
+
import { default as Fragment } from "../blocks/fragment/fragment";
|
|
23
23
|
import { componentInfo as imageComponentInfo } from "../blocks/image/component-info.js";
|
|
24
|
-
import { default as Image } from "../blocks/image/image
|
|
24
|
+
import { default as Image } from "../blocks/image/image";
|
|
25
25
|
import { componentInfo as sectionComponentInfo } from "../blocks/section/component-info.js";
|
|
26
|
-
import { default as Section } from "../blocks/section/section
|
|
26
|
+
import { default as Section } from "../blocks/section/section";
|
|
27
27
|
import { componentInfo as symbolComponentInfo } from "../blocks/symbol/component-info.js";
|
|
28
|
-
import { default as Symbol } from "../blocks/symbol/symbol
|
|
28
|
+
import { default as Symbol } from "../blocks/symbol/symbol";
|
|
29
29
|
import { componentInfo as textComponentInfo } from "../blocks/text/component-info.js";
|
|
30
|
-
import { default as Text } from "../blocks/text/text
|
|
30
|
+
import { default as Text } from "../blocks/text/text";
|
|
31
31
|
import { componentInfo as videoComponentInfo } from "../blocks/video/component-info.js";
|
|
32
|
-
import { default as Video } from "../blocks/video/video
|
|
32
|
+
import { default as Video } from "../blocks/video/video";
|
|
33
33
|
import { componentInfo as embedComponentInfo } from "../blocks/embed/component-info.js";
|
|
34
|
-
import { default as embed } from "../blocks/embed/embed
|
|
35
|
-
import { default as Img } from "../blocks/img/img
|
|
34
|
+
import { default as embed } from "../blocks/embed/embed";
|
|
35
|
+
import { default as Img } from "../blocks/img/img";
|
|
36
36
|
import { componentInfo as imgComponentInfo } from "../blocks/img/component-info.js";
|
|
37
|
-
import { default as customCode } from "../blocks/custom-code/custom-code
|
|
37
|
+
import { default as customCode } from "../blocks/custom-code/custom-code";
|
|
38
38
|
import { componentInfo as customCodeInfo } from "../blocks/custom-code/component-info.js";
|
|
39
39
|
const getDefaultRegisteredComponents = () => [
|
|
40
|
+
__spreadValues({ component: Button }, buttonComponentInfo),
|
|
40
41
|
__spreadValues({ component: Columns }, columnsComponentInfo),
|
|
42
|
+
__spreadValues({ component: customCode }, customCodeInfo),
|
|
43
|
+
__spreadValues({ component: embed }, embedComponentInfo),
|
|
44
|
+
__spreadValues({ component: Fragment }, fragmentComponentInfo),
|
|
41
45
|
__spreadValues({ component: Image }, imageComponentInfo),
|
|
42
46
|
__spreadValues({ component: Img }, imgComponentInfo),
|
|
43
|
-
__spreadValues({ component: Text }, textComponentInfo),
|
|
44
|
-
__spreadValues({ component: Video }, videoComponentInfo),
|
|
45
|
-
__spreadValues({ component: Symbol }, symbolComponentInfo),
|
|
46
|
-
__spreadValues({ component: Button }, buttonComponentInfo),
|
|
47
47
|
__spreadValues({ component: Section }, sectionComponentInfo),
|
|
48
|
-
__spreadValues({ component:
|
|
49
|
-
__spreadValues({ component:
|
|
50
|
-
__spreadValues({ component:
|
|
48
|
+
__spreadValues({ component: Symbol }, symbolComponentInfo),
|
|
49
|
+
__spreadValues({ component: Text }, textComponentInfo),
|
|
50
|
+
__spreadValues({ component: Video }, videoComponentInfo)
|
|
51
51
|
];
|
|
52
52
|
export { getDefaultRegisteredComponents };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { default as default2 } from "../blocks/
|
|
2
|
-
import { default as default3 } from "../blocks/
|
|
3
|
-
import { default as default4 } from "../blocks/
|
|
4
|
-
import { default as default5 } from "../blocks/
|
|
5
|
-
import { default as default6 } from "../blocks
|
|
6
|
-
import { default as default7 } from "../
|
|
7
|
-
import { default as default8 } from "../blocks/section/section
|
|
8
|
-
import { default as default9 } from "../blocks/
|
|
9
|
-
import { default as default10 } from "../
|
|
10
|
-
import { default as default11 } from "../
|
|
11
|
-
export {
|
|
1
|
+
import { default as default2 } from "../blocks/button/button";
|
|
2
|
+
import { default as default3 } from "../blocks/columns/columns";
|
|
3
|
+
import { default as default4 } from "../blocks/fragment/fragment";
|
|
4
|
+
import { default as default5 } from "../blocks/image/image";
|
|
5
|
+
import { default as default6 } from "../components/render-blocks";
|
|
6
|
+
import { default as default7 } from "../components/render-content/render-content";
|
|
7
|
+
import { default as default8 } from "../blocks/section/section";
|
|
8
|
+
import { default as default9 } from "../blocks/symbol/symbol";
|
|
9
|
+
import { default as default10 } from "../blocks/text/text";
|
|
10
|
+
import { default as default11 } from "../blocks/video/video";
|
|
11
|
+
export { default2 as Button, default3 as Columns, default4 as Fragment, default5 as Image, default6 as RenderBlocks, default7 as RenderContent, default8 as Section, default9 as Symbol, default10 as Text, default11 as Video };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/package.json
CHANGED
|
@@ -15,11 +15,11 @@ export default function Button(props) {
|
|
|
15
15
|
</a>
|
|
16
16
|
</>
|
|
17
17
|
) : (
|
|
18
|
-
<button className="button-
|
|
18
|
+
<button className="button-66d34b93" {...props.attributes}>
|
|
19
19
|
{props.text}
|
|
20
20
|
</button>
|
|
21
21
|
)}
|
|
22
|
-
<style>{`.button-
|
|
22
|
+
<style>{`.button-66d34b93 {
|
|
23
23
|
all: unset;
|
|
24
24
|
}`}</style>
|
|
25
25
|
</>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import RenderBlocks from "../../components/render-blocks
|
|
2
|
+
import RenderBlocks from "../../components/render-blocks";
|
|
3
3
|
import { getSizesForBreakpoints } from "../../constants/device-sizes";
|
|
4
|
-
import RenderInlinedStyles from "../../components/render-inlined-styles
|
|
4
|
+
import RenderInlinedStyles from "../../components/render-inlined-styles";
|
|
5
5
|
import { TARGET } from "../../constants/target.js";
|
|
6
6
|
import { convertStyleMapToCSS } from "../../helpers/css";
|
|
7
7
|
|
|
@@ -124,7 +124,7 @@ export default function Columns(props) {
|
|
|
124
124
|
<div
|
|
125
125
|
className={
|
|
126
126
|
`builder-columns ${props.builderBlock.id}-breakpoints` +
|
|
127
|
-
" div-
|
|
127
|
+
" div-46a0fd84"
|
|
128
128
|
}
|
|
129
129
|
style={{
|
|
130
130
|
...(TARGET === "reactNative" ? reactNativeColumnsStyles() : {}),
|
|
@@ -139,7 +139,7 @@ export default function Columns(props) {
|
|
|
139
139
|
|
|
140
140
|
{props.columns?.map((column, index) => (
|
|
141
141
|
<div
|
|
142
|
-
className="builder-column div-
|
|
142
|
+
className="builder-column div-46a0fd84-2"
|
|
143
143
|
style={{
|
|
144
144
|
width: getColumnCssWidth(index),
|
|
145
145
|
marginLeft: `${index === 0 ? 0 : getGutterSize()}px`,
|
|
@@ -159,10 +159,10 @@ export default function Columns(props) {
|
|
|
159
159
|
</div>
|
|
160
160
|
))}
|
|
161
161
|
</div>
|
|
162
|
-
<style>{`.div-
|
|
162
|
+
<style>{`.div-46a0fd84 {
|
|
163
163
|
display: flex;
|
|
164
164
|
line-height: normal;
|
|
165
|
-
}.div-
|
|
165
|
+
}.div-46a0fd84-2 {
|
|
166
166
|
display: flex;
|
|
167
167
|
flex-direction: column;
|
|
168
168
|
align-items: stretch;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { useState, useContext, useRef } from "react";
|
|
3
|
-
import RenderBlock from "../../components/render-block/render-block
|
|
4
|
-
import BuilderBlocks from "../../components/render-blocks
|
|
3
|
+
import RenderBlock from "../../components/render-block/render-block";
|
|
4
|
+
import BuilderBlocks from "../../components/render-blocks";
|
|
5
5
|
import { isEditing } from "../../functions/is-editing.js";
|
|
6
6
|
|
|
7
7
|
export default function FormComponent(props) {
|
|
@@ -232,7 +232,7 @@ export default function FormComponent(props) {
|
|
|
232
232
|
) : null}{" "}
|
|
233
233
|
{submissionState() === "error" && responseData ? (
|
|
234
234
|
<>
|
|
235
|
-
<pre className="builder-form-error-text pre-
|
|
235
|
+
<pre className="builder-form-error-text pre-0d1abaf2">
|
|
236
236
|
{" "}
|
|
237
237
|
{JSON.stringify(responseData, null, 2)}{" "}
|
|
238
238
|
</pre>
|
|
@@ -247,7 +247,7 @@ export default function FormComponent(props) {
|
|
|
247
247
|
</>
|
|
248
248
|
) : null}{" "}
|
|
249
249
|
</form>{" "}
|
|
250
|
-
<style>{`.pre-
|
|
250
|
+
<style>{`.pre-0d1abaf2 { padding: 10px; color: red; text-align: center; }`}</style>{" "}
|
|
251
251
|
</>
|
|
252
252
|
);
|
|
253
253
|
}
|
|
@@ -66,7 +66,7 @@ export default function Image(props) {
|
|
|
66
66
|
className={
|
|
67
67
|
"builder-image" +
|
|
68
68
|
(props.className ? " " + props.className : "") +
|
|
69
|
-
" img-
|
|
69
|
+
" img-54289eda"
|
|
70
70
|
}
|
|
71
71
|
src={props.image}
|
|
72
72
|
srcSet={srcSetToUse()}
|
|
@@ -78,7 +78,7 @@ export default function Image(props) {
|
|
|
78
78
|
!(props.builderBlock?.children?.length && props.fitContent) ? (
|
|
79
79
|
<>
|
|
80
80
|
<div
|
|
81
|
-
className="builder-image-sizer div-
|
|
81
|
+
className="builder-image-sizer div-54289eda"
|
|
82
82
|
style={{
|
|
83
83
|
paddingTop:
|
|
84
84
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -94,18 +94,18 @@ export default function Image(props) {
|
|
|
94
94
|
|
|
95
95
|
{!props.fitContent && props.children ? (
|
|
96
96
|
<>
|
|
97
|
-
<div className="div-
|
|
97
|
+
<div className="div-54289eda-2">{props.children}</div>
|
|
98
98
|
</>
|
|
99
99
|
) : null}
|
|
100
100
|
</>
|
|
101
|
-
<style>{`.img-
|
|
101
|
+
<style>{`.img-54289eda {
|
|
102
102
|
opacity: 1;
|
|
103
103
|
transition: opacity 0.2s ease-in-out;
|
|
104
|
-
}.div-
|
|
104
|
+
}.div-54289eda {
|
|
105
105
|
width: 100%;
|
|
106
106
|
pointer-events: none;
|
|
107
107
|
font-size: 0;
|
|
108
|
-
}.div-
|
|
108
|
+
}.div-54289eda-2 {
|
|
109
109
|
display: flex;
|
|
110
110
|
flex-direction: column;
|
|
111
111
|
align-items: stretch;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { useState, useContext, useEffect } from "react";
|
|
3
|
-
import RenderContent from "../../components/render-content/render-content
|
|
3
|
+
import RenderContent from "../../components/render-content/render-content";
|
|
4
4
|
import BuilderContext from "../../context/builder.context.js";
|
|
5
5
|
import { getContent } from "../../functions/get-content/index.js";
|
|
6
6
|
import { TARGET } from "../../constants/target";
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
import { TARGET } from "../../constants/target.js";
|
|
7
7
|
import { getProcessedBlock } from "../../functions/get-processed-block.js";
|
|
8
8
|
import { createCssClass } from "../../helpers/css.js";
|
|
9
|
-
import RenderInlinedStyles from "../render-inlined-styles
|
|
9
|
+
import RenderInlinedStyles from "../render-inlined-styles";
|
|
10
10
|
|
|
11
11
|
export default function BlockStyles(props) {
|
|
12
12
|
function useBlock() {
|