@builder.io/sdk-svelte 0.0.1-9 → 0.0.2
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/README.md +4 -0
- package/package/CHANGELOG.md +19 -0
- package/package/README.md +19 -0
- package/{src/types/builder-block.js → package/blocks/button/button.lite.d.ts} +0 -0
- package/package/blocks/button/button.lite.tsx +36 -0
- package/package/blocks/button/button.svelte +28 -0
- package/package/blocks/button/button.svelte.d.ts +25 -0
- package/package/blocks/button/component-info.d.ts +2 -0
- package/package/blocks/button/component-info.js +39 -0
- package/{src/types/builder-content.js → package/blocks/columns/columns.lite.d.ts} +0 -0
- package/package/blocks/columns/columns.lite.tsx +139 -0
- package/package/blocks/columns/columns.svelte +109 -0
- package/package/blocks/columns/columns.svelte.d.ts +33 -0
- package/package/blocks/columns/component-info.d.ts +2 -0
- package/package/blocks/columns/component-info.js +241 -0
- package/package/blocks/custom-code/component-info.d.ts +2 -0
- package/package/blocks/custom-code/component-info.js +28 -0
- package/{src/types/components.js → package/blocks/custom-code/custom-code.lite.d.ts} +0 -0
- package/package/blocks/custom-code/custom-code.lite.tsx +70 -0
- package/package/blocks/custom-code/custom-code.svelte +55 -0
- package/package/blocks/custom-code/custom-code.svelte.d.ts +21 -0
- package/package/blocks/embed/component-info.d.ts +2 -0
- package/package/blocks/embed/component-info.js +47 -0
- package/{src/types/deep-partial.js → package/blocks/embed/embed.lite.d.ts} +0 -0
- package/package/blocks/embed/embed.lite.tsx +52 -0
- package/package/blocks/embed/embed.svelte +41 -0
- package/package/blocks/embed/embed.svelte.d.ts +19 -0
- package/package/blocks/embed/helpers.d.ts +1 -0
- package/package/blocks/embed/helpers.js +6 -0
- package/package/blocks/form/component-info.d.ts +2 -0
- package/package/blocks/form/component-info.js +268 -0
- package/{src/types/element.js → package/blocks/form/form.lite.d.ts} +0 -0
- package/package/blocks/form/form.lite.tsx +351 -0
- package/package/blocks/form/form.svelte +259 -0
- package/package/blocks/form/form.svelte.d.ts +70 -0
- package/package/blocks/fragment/component-info.d.ts +2 -0
- package/package/blocks/fragment/component-info.js +8 -0
- package/{src/types/targets.js → package/blocks/fragment/fragment.lite.d.ts} +0 -0
- package/package/blocks/fragment/fragment.lite.tsx +12 -0
- package/package/blocks/fragment/fragment.svelte +5 -0
- package/package/blocks/fragment/fragment.svelte.d.ts +21 -0
- package/package/blocks/image/component-info.d.ts +2 -0
- package/package/blocks/image/component-info.js +153 -0
- package/package/blocks/image/image.helpers.d.ts +1 -0
- package/package/blocks/image/image.helpers.js +56 -0
- package/{src/types/typescript.js → package/blocks/image/image.lite.d.ts} +0 -0
- package/package/blocks/image/image.lite.tsx +148 -0
- package/package/blocks/image/image.svelte +119 -0
- package/package/blocks/image/image.svelte.d.ts +48 -0
- package/package/blocks/img/component-info.d.ts +2 -0
- package/package/blocks/img/component-info.js +18 -0
- package/package/blocks/img/img.lite.d.ts +0 -0
- package/package/blocks/img/img.lite.tsx +48 -0
- package/package/blocks/img/img.svelte +26 -0
- package/package/blocks/img/img.svelte.d.ts +29 -0
- package/package/blocks/input/component-info.d.ts +2 -0
- package/package/blocks/input/component-info.js +72 -0
- package/package/blocks/input/input.lite.d.ts +0 -0
- package/package/blocks/input/input.lite.tsx +34 -0
- package/package/blocks/input/input.svelte +22 -0
- package/package/blocks/input/input.svelte.d.ts +31 -0
- package/package/blocks/raw-text/component-info.d.ts +2 -0
- package/package/blocks/raw-text/component-info.js +13 -0
- package/package/blocks/raw-text/raw-text.lite.d.ts +0 -0
- package/package/blocks/raw-text/raw-text.lite.tsx +15 -0
- package/package/blocks/raw-text/raw-text.svelte +9 -0
- package/package/blocks/raw-text/raw-text.svelte.d.ts +21 -0
- package/package/blocks/section/component-info.d.ts +2 -0
- package/package/blocks/section/component-info.js +46 -0
- package/package/blocks/section/section.lite.d.ts +0 -0
- package/package/blocks/section/section.lite.tsx +30 -0
- package/package/blocks/section/section.svelte +21 -0
- package/package/blocks/section/section.svelte.d.ts +25 -0
- package/package/blocks/select/component-info.d.ts +2 -0
- package/package/blocks/select/component-info.js +56 -0
- package/package/blocks/select/select.lite.d.ts +0 -0
- package/package/blocks/select/select.lite.tsx +34 -0
- package/package/blocks/select/select.svelte +21 -0
- package/package/blocks/select/select.svelte.d.ts +30 -0
- package/package/blocks/submit-button/component-info.d.ts +2 -0
- package/package/blocks/submit-button/component-info.js +29 -0
- package/package/blocks/submit-button/submit-button.lite.d.ts +0 -0
- package/package/blocks/submit-button/submit-button.lite.tsx +15 -0
- package/package/blocks/submit-button/submit-button.svelte +9 -0
- package/package/blocks/submit-button/submit-button.svelte.d.ts +21 -0
- package/package/blocks/symbol/component-info.d.ts +2 -0
- package/package/blocks/symbol/component-info.js +40 -0
- package/package/blocks/symbol/symbol.lite.d.ts +0 -0
- package/package/blocks/symbol/symbol.lite.tsx +92 -0
- package/package/blocks/symbol/symbol.svelte +66 -0
- package/package/blocks/symbol/symbol.svelte.d.ts +35 -0
- package/package/blocks/text/component-info.d.ts +2 -0
- package/package/blocks/text/component-info.js +21 -0
- package/package/blocks/text/text.lite.d.ts +0 -0
- package/package/blocks/text/text.lite.tsx +11 -0
- package/package/blocks/text/text.svelte +6 -0
- package/package/blocks/text/text.svelte.d.ts +19 -0
- package/package/blocks/textarea/component-info.d.ts +2 -0
- package/package/blocks/textarea/component-info.js +44 -0
- package/package/blocks/textarea/textarea.lite.d.ts +0 -0
- package/package/blocks/textarea/textarea.lite.tsx +19 -0
- package/package/blocks/textarea/textarea.svelte +10 -0
- package/package/blocks/textarea/textarea.svelte.d.ts +27 -0
- package/package/blocks/util.d.ts +1 -0
- package/package/blocks/util.js +4 -0
- package/package/blocks/video/component-info.d.ts +2 -0
- package/package/blocks/video/component-info.js +103 -0
- package/package/blocks/video/video.lite.d.ts +0 -0
- package/package/blocks/video/video.lite.tsx +92 -0
- package/package/blocks/video/video.svelte +63 -0
- package/package/blocks/video/video.svelte.d.ts +41 -0
- package/package/components/render-block/block-styles.lite.d.ts +0 -0
- package/package/components/render-block/block-styles.lite.tsx +60 -0
- package/package/components/render-block/block-styles.svelte +45 -0
- package/package/components/render-block/block-styles.svelte.d.ts +23 -0
- package/package/components/render-block/render-block.helpers.d.ts +1 -0
- package/package/components/render-block/render-block.helpers.js +24 -0
- package/package/components/render-block/render-block.lite.d.ts +0 -0
- package/package/components/render-block/render-block.lite.tsx +216 -0
- package/package/components/render-block/render-block.svelte +185 -0
- package/package/components/render-block/render-block.svelte.d.ts +23 -0
- package/package/components/render-block/render-component.lite.d.ts +0 -0
- package/package/components/render-block/render-component.lite.tsx +33 -0
- package/package/components/render-block/render-component.svelte +24 -0
- package/package/components/render-block/render-component.svelte.d.ts +27 -0
- package/package/components/render-block/render-repeated-block.lite.d.ts +0 -0
- package/package/components/render-block/render-repeated-block.lite.tsx +49 -0
- package/package/components/render-block/render-repeated-block.svelte +36 -0
- package/package/components/render-block/render-repeated-block.svelte.d.ts +23 -0
- package/package/components/render-block/types.d.ts +6 -0
- package/package/components/render-block/types.js +2 -0
- package/package/components/render-blocks.lite.d.ts +0 -0
- package/package/components/render-blocks.lite.tsx +91 -0
- package/package/components/render-blocks.svelte +73 -0
- package/package/components/render-blocks.svelte.d.ts +24 -0
- package/package/components/render-content/components/render-styles.lite.d.ts +0 -0
- package/package/components/render-content/components/render-styles.lite.tsx +86 -0
- package/package/components/render-content/components/render-styles.svelte +61 -0
- package/package/components/render-content/components/render-styles.svelte.d.ts +29 -0
- package/package/components/render-content/index.d.ts +1 -0
- package/package/components/render-content/index.js +1 -0
- package/package/components/render-content/render-content.lite.d.ts +0 -0
- package/package/components/render-content/render-content.lite.tsx +356 -0
- package/package/components/render-content/render-content.svelte +260 -0
- package/package/components/render-content/render-content.svelte.d.ts +36 -0
- package/package/components/render-inlined-styles.lite.d.ts +0 -0
- package/package/components/render-inlined-styles.lite.tsx +27 -0
- package/package/components/render-inlined-styles.svelte +19 -0
- package/package/components/render-inlined-styles.svelte.d.ts +19 -0
- package/package/constants/builder-registered-components.d.ts +6 -0
- package/package/constants/builder-registered-components.js +36 -0
- package/package/constants/device-sizes.d.ts +2 -0
- package/package/constants/device-sizes.js +18 -0
- package/package/constants/target.d.ts +2 -0
- package/package/constants/target.js +2 -0
- package/package/context/builder.context.d.ts +11 -0
- package/package/context/builder.context.js +11 -0
- package/package/context/types.d.ts +16 -0
- package/package/context/types.js +3 -0
- package/package/functions/camel-to-kebab-case.d.ts +1 -0
- package/package/functions/camel-to-kebab-case.js +1 -0
- package/package/functions/convert-style-object.d.ts +1 -0
- package/package/functions/convert-style-object.js +3 -0
- package/package/functions/evaluate.d.ts +5 -0
- package/package/functions/evaluate.js +25 -0
- package/package/functions/event-handler-name.d.ts +1 -0
- package/package/functions/event-handler-name.js +4 -0
- package/package/functions/get-block-actions.d.ts +9 -0
- package/package/functions/get-block-actions.js +21 -0
- package/package/functions/get-block-component-options.d.ts +2 -0
- package/package/functions/get-block-component-options.js +11 -0
- package/package/functions/get-block-properties.d.ts +5 -0
- package/package/functions/get-block-properties.js +10 -0
- package/package/functions/get-block-styles.d.ts +2 -0
- package/package/functions/get-block-styles.js +21 -0
- package/package/functions/get-block-tag.d.ts +3 -0
- package/package/functions/get-block-tag.js +4 -0
- package/package/functions/get-builder-search-params/fn.test.d.ts +1 -0
- package/package/functions/get-builder-search-params/fn.test.js +13 -0
- package/package/functions/get-builder-search-params/index.d.ts +6 -0
- package/package/functions/get-builder-search-params/index.js +29 -0
- package/package/functions/get-content/ab-testing.d.ts +3 -0
- package/package/functions/get-content/ab-testing.js +40 -0
- package/package/functions/get-content/fn.test.d.ts +1 -0
- package/package/functions/get-content/fn.test.js +31 -0
- package/package/functions/get-content/index.d.ts +9 -0
- package/package/functions/get-content/index.js +42 -0
- package/package/functions/get-content/types.d.ts +26 -0
- package/package/functions/get-content/types.js +1 -0
- package/package/functions/get-fetch.d.ts +1 -0
- package/package/functions/get-fetch.js +9 -0
- package/package/functions/get-global-this.d.ts +1 -0
- package/package/functions/get-global-this.js +15 -0
- package/package/functions/get-processed-block.d.ts +10 -0
- package/package/functions/get-processed-block.js +29 -0
- package/package/functions/get-processed-block.test.d.ts +1 -0
- package/package/functions/get-processed-block.test.js +32 -0
- package/package/functions/if-target.d.ts +7 -0
- package/package/functions/if-target.js +10 -0
- package/package/functions/is-browser.d.ts +1 -0
- package/package/functions/is-browser.js +3 -0
- package/package/functions/is-editing.d.ts +1 -0
- package/package/functions/is-editing.js +4 -0
- package/package/functions/is-iframe.d.ts +1 -0
- package/package/functions/is-iframe.js +4 -0
- package/package/functions/is-previewing.d.ts +1 -0
- package/package/functions/is-previewing.js +11 -0
- package/package/functions/mark-mutable.d.ts +2 -0
- package/package/functions/mark-mutable.js +6 -0
- package/package/functions/on-change.d.ts +7 -0
- package/package/functions/on-change.js +28 -0
- package/package/functions/on-change.test.d.ts +1 -0
- package/package/functions/on-change.test.js +20 -0
- package/package/functions/register-component.d.ts +14 -0
- package/package/functions/register-component.js +42 -0
- package/package/functions/register.d.ts +16 -0
- package/package/functions/register.js +29 -0
- package/package/functions/sanitize-styles.d.ts +4 -0
- package/package/functions/sanitize-styles.js +6 -0
- package/package/functions/set-editor-settings.d.ts +4 -0
- package/package/functions/set-editor-settings.js +12 -0
- package/package/functions/set.d.ts +7 -0
- package/package/functions/set.js +21 -0
- package/package/functions/set.test.d.ts +1 -0
- package/package/functions/set.test.js +16 -0
- package/package/functions/track.d.ts +21 -0
- package/package/functions/track.js +49 -0
- package/package/functions/transform-block.d.ts +2 -0
- package/package/functions/transform-block.js +5 -0
- package/package/helpers/cookie.d.ts +9 -0
- package/package/helpers/cookie.js +55 -0
- package/package/helpers/css.d.ts +1 -0
- package/package/helpers/css.js +9 -0
- package/package/helpers/flatten.d.ts +6 -0
- package/package/helpers/flatten.js +19 -0
- package/package/helpers/localStorage.d.ts +9 -0
- package/package/helpers/localStorage.js +23 -0
- package/package/helpers/nullable.d.ts +2 -0
- package/package/helpers/nullable.js +1 -0
- package/package/helpers/sessionId.d.ts +7 -0
- package/package/helpers/sessionId.js +20 -0
- package/package/helpers/time.d.ts +1 -0
- package/package/helpers/time.js +2 -0
- package/package/helpers/url.d.ts +6 -0
- package/package/helpers/url.js +12 -0
- package/package/helpers/url.test.d.ts +1 -0
- package/package/helpers/url.test.js +15 -0
- package/package/helpers/uuid.d.ts +8 -0
- package/package/helpers/uuid.js +15 -0
- package/package/helpers/visitorId.d.ts +8 -0
- package/package/helpers/visitorId.js +26 -0
- package/package/index-helpers/blocks-exports.d.ts +10 -0
- package/package/index-helpers/blocks-exports.js +10 -0
- package/package/index-helpers/top-of-file.d.ts +1 -0
- package/package/index-helpers/top-of-file.js +4 -0
- package/package/index.d.ts +10 -0
- package/package/index.js +10 -0
- package/package/scripts/init-editing.d.ts +2 -0
- package/package/scripts/init-editing.js +84 -0
- package/package/types/builder-block.d.ts +57 -0
- package/package/types/builder-block.js +1 -0
- package/package/types/builder-content.d.ts +38 -0
- package/package/types/builder-content.js +1 -0
- package/package/types/can-track.d.ts +3 -0
- package/package/types/can-track.js +1 -0
- package/package/types/components.d.ts +177 -0
- package/package/types/components.js +1 -0
- package/package/types/deep-partial.d.ts +3 -0
- package/package/types/deep-partial.js +1 -0
- package/package/types/element.d.ts +59 -0
- package/package/types/element.js +1 -0
- package/package/types/targets.d.ts +3 -0
- package/package/types/targets.js +1 -0
- package/package/types/typescript.d.ts +4 -0
- package/package/types/typescript.js +1 -0
- package/package.json +31 -8
- package/src/blocks/button/button.svelte +0 -49
- package/src/blocks/button/component-info.js +0 -41
- package/src/blocks/columns/columns.svelte +0 -103
- package/src/blocks/columns/component-info.js +0 -217
- package/src/blocks/custom-code/component-info.js +0 -31
- package/src/blocks/custom-code/custom-code.svelte +0 -64
- package/src/blocks/embed/component-info.js +0 -24
- package/src/blocks/embed/embed.svelte +0 -63
- package/src/blocks/form/component-info.js +0 -262
- package/src/blocks/form/form.svelte +0 -333
- package/src/blocks/fragment/component-info.js +0 -11
- package/src/blocks/fragment/fragment.svelte +0 -28
- package/src/blocks/image/component-info.js +0 -104
- package/src/blocks/image/image.svelte +0 -117
- package/src/blocks/img/component-info.js +0 -20
- package/src/blocks/img/img.svelte +0 -36
- package/src/blocks/input/component-info.js +0 -74
- package/src/blocks/input/input.svelte +0 -35
- package/src/blocks/raw-text/component-info.js +0 -16
- package/src/blocks/raw-text/raw-text.svelte +0 -29
- package/src/blocks/section/component-info.js +0 -49
- package/src/blocks/section/section.svelte +0 -36
- package/src/blocks/select/component-info.js +0 -59
- package/src/blocks/select/select.svelte +0 -41
- package/src/blocks/submit-button/component-info.js +0 -28
- package/src/blocks/submit-button/submit-button.svelte +0 -33
- package/src/blocks/symbol/component-info.js +0 -42
- package/src/blocks/symbol/symbol.svelte +0 -54
- package/src/blocks/text/component-info.js +0 -24
- package/src/blocks/text/text.svelte +0 -28
- package/src/blocks/textarea/component-info.js +0 -47
- package/src/blocks/textarea/textarea.svelte +0 -32
- package/src/blocks/video/component-info.js +0 -106
- package/src/blocks/video/video.svelte +0 -45
- package/src/components/error-boundary.svelte +0 -26
- package/src/components/render-block/block-styles.svelte +0 -51
- package/src/components/render-block/render-block.helpers.js +0 -23
- package/src/components/render-block/render-block.svelte +0 -174
- package/src/components/render-blocks.svelte +0 -82
- package/src/components/render-content/components/render-styles.svelte +0 -90
- package/src/components/render-content/index.js +0 -4
- package/src/components/render-content/render-content.svelte +0 -252
- package/src/components/render-inlined-styles.svelte +0 -51
- package/src/constants/builder-registered-components.js +0 -45
- package/src/constants/device-sizes.js +0 -39
- package/src/constants/target.js +0 -4
- package/src/context/builder.context.js +0 -8
- package/src/functions/evaluate.js +0 -28
- package/src/functions/event-handler-name.js +0 -7
- package/src/functions/fast-clone.js +0 -4
- package/src/functions/get-block-actions.js +0 -23
- package/src/functions/get-block-component-options.js +0 -23
- package/src/functions/get-block-properties.js +0 -29
- package/src/functions/get-block-styles.js +0 -31
- package/src/functions/get-block-tag.js +0 -6
- package/src/functions/get-builder-search-params/fn.test.js +0 -13
- package/src/functions/get-builder-search-params/index.js +0 -22
- package/src/functions/get-content/fn.test.js +0 -31
- package/src/functions/get-content/index.js +0 -138
- package/src/functions/get-fetch.js +0 -34
- package/src/functions/get-global-this.js +0 -18
- package/src/functions/get-processed-block.js +0 -46
- package/src/functions/get-processed-block.test.js +0 -31
- package/src/functions/if-target.js +0 -15
- package/src/functions/is-browser.js +0 -6
- package/src/functions/is-editing.js +0 -7
- package/src/functions/is-iframe.js +0 -7
- package/src/functions/is-previewing.js +0 -14
- package/src/functions/macro-eval.js +0 -5
- package/src/functions/on-change.js +0 -27
- package/src/functions/on-change.test.js +0 -19
- package/src/functions/previewing-model-name.js +0 -11
- package/src/functions/register-component.js +0 -70
- package/src/functions/register.js +0 -29
- package/src/functions/set-editor-settings.js +0 -15
- package/src/functions/set.js +0 -11
- package/src/functions/set.test.js +0 -16
- package/src/functions/track.js +0 -22
- package/src/functions/transform-block.js +0 -6
- package/src/index-helpers/blocks-exports.js +0 -20
- package/src/index-helpers/top-of-file.js +0 -4
- package/src/index.js +0 -10
- package/src/scripts/init-editing.js +0 -80
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
interface Props {
|
|
3
|
+
styles: string;
|
|
4
|
+
}
|
|
5
|
+
declare const __propDef: {
|
|
6
|
+
props: {
|
|
7
|
+
styles: Props["styles"];
|
|
8
|
+
};
|
|
9
|
+
events: {
|
|
10
|
+
[evt: string]: CustomEvent<any>;
|
|
11
|
+
};
|
|
12
|
+
slots: {};
|
|
13
|
+
};
|
|
14
|
+
export declare type RenderInlinedStylesProps = typeof __propDef.props;
|
|
15
|
+
export declare type RenderInlinedStylesEvents = typeof __propDef.events;
|
|
16
|
+
export declare type RenderInlinedStylesSlots = typeof __propDef.slots;
|
|
17
|
+
export default class RenderInlinedStyles extends SvelteComponentTyped<RenderInlinedStylesProps, RenderInlinedStylesEvents, RenderInlinedStylesSlots> {
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { RegisteredComponent } from '../context/types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Returns a list of all registered components.
|
|
4
|
+
* NOTE: This needs to be a function to work around ESM circular dependencies.
|
|
5
|
+
*/
|
|
6
|
+
export declare const getDefaultRegisteredComponents: () => RegisteredComponent[];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { default as Button } from '../blocks/button/button.svelte';
|
|
2
|
+
import { componentInfo as buttonComponentInfo } from '../blocks/button/component-info.js';
|
|
3
|
+
import { default as Columns } from '../blocks/columns/columns.svelte';
|
|
4
|
+
import { componentInfo as columnsComponentInfo } from '../blocks/columns/component-info.js';
|
|
5
|
+
import { componentInfo as fragmentComponentInfo } from '../blocks/fragment/component-info.js';
|
|
6
|
+
import { default as Fragment } from '../blocks/fragment/fragment.svelte';
|
|
7
|
+
import { componentInfo as imageComponentInfo } from '../blocks/image/component-info.js';
|
|
8
|
+
import { default as Image } from '../blocks/image/image.svelte';
|
|
9
|
+
import { componentInfo as sectionComponentInfo } from '../blocks/section/component-info.js';
|
|
10
|
+
import { default as Section } from '../blocks/section/section.svelte';
|
|
11
|
+
import { componentInfo as symbolComponentInfo } from '../blocks/symbol/component-info.js';
|
|
12
|
+
import { default as Symbol } from '../blocks/symbol/symbol.svelte';
|
|
13
|
+
import { componentInfo as textComponentInfo } from '../blocks/text/component-info.js';
|
|
14
|
+
import { default as Text } from '../blocks/text/text.svelte';
|
|
15
|
+
import { componentInfo as videoComponentInfo } from '../blocks/video/component-info.js';
|
|
16
|
+
import { default as Video } from '../blocks/video/video.svelte';
|
|
17
|
+
import { componentInfo as embedComponentInfo } from '../blocks/embed/component-info.js';
|
|
18
|
+
import { default as embed } from '../blocks/embed/embed.svelte';
|
|
19
|
+
import { default as Img } from '../blocks/img/img.svelte';
|
|
20
|
+
import { componentInfo as imgComponentInfo } from '../blocks/img/component-info.js';
|
|
21
|
+
/**
|
|
22
|
+
* Returns a list of all registered components.
|
|
23
|
+
* NOTE: This needs to be a function to work around ESM circular dependencies.
|
|
24
|
+
*/
|
|
25
|
+
export const getDefaultRegisteredComponents = () => [
|
|
26
|
+
{ component: Columns, ...columnsComponentInfo },
|
|
27
|
+
{ component: Image, ...imageComponentInfo },
|
|
28
|
+
{ component: Img, ...imgComponentInfo },
|
|
29
|
+
{ component: Text, ...textComponentInfo },
|
|
30
|
+
{ component: Video, ...videoComponentInfo },
|
|
31
|
+
{ component: Symbol, ...symbolComponentInfo },
|
|
32
|
+
{ component: Button, ...buttonComponentInfo },
|
|
33
|
+
{ component: Section, ...sectionComponentInfo },
|
|
34
|
+
{ component: Fragment, ...fragmentComponentInfo },
|
|
35
|
+
{ component: embed, ...embedComponentInfo },
|
|
36
|
+
];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const SIZES = {
|
|
2
|
+
small: {
|
|
3
|
+
min: 320,
|
|
4
|
+
default: 321,
|
|
5
|
+
max: 640,
|
|
6
|
+
},
|
|
7
|
+
medium: {
|
|
8
|
+
min: 641,
|
|
9
|
+
default: 642,
|
|
10
|
+
max: 991,
|
|
11
|
+
},
|
|
12
|
+
large: {
|
|
13
|
+
min: 990,
|
|
14
|
+
default: 991,
|
|
15
|
+
max: 1200,
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
export const getMaxWidthQueryForSize = (size) => `@media (max-width: ${SIZES[size].max}px)`;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BuilderContent } from '../types/builder-content.js';
|
|
2
|
+
import { ComponentInfo } from '../types/components.js';
|
|
3
|
+
import { Dictionary, Nullable } from '../types/typescript.js';
|
|
4
|
+
export declare type RegisteredComponent = ComponentInfo & {
|
|
5
|
+
component: any;
|
|
6
|
+
};
|
|
7
|
+
export declare type RegisteredComponents = Dictionary<RegisteredComponent>;
|
|
8
|
+
export declare type BuilderRenderState = Record<string, unknown>;
|
|
9
|
+
export declare type BuilderRenderContext = Record<string, unknown>;
|
|
10
|
+
export interface BuilderContextInterface {
|
|
11
|
+
content: Nullable<BuilderContent>;
|
|
12
|
+
context: BuilderRenderContext;
|
|
13
|
+
state: BuilderRenderState;
|
|
14
|
+
apiKey: string | null;
|
|
15
|
+
registeredComponents: RegisteredComponents;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const camelToKebabCase: (string: string) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const camelToKebabCase = (string) => string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, '$1-$2').toLowerCase();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const convertStyleObject: (obj?: Partial<CSSStyleDeclaration>) => Partial<CSSStyleDeclaration> | undefined;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { isBrowser } from './is-browser.js';
|
|
2
|
+
import { isEditing } from './is-editing.js';
|
|
3
|
+
export function evaluate({ code, context, state, event, }) {
|
|
4
|
+
if (code === '') {
|
|
5
|
+
console.warn('Skipping evaluation of empty code block.');
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
const builder = {
|
|
9
|
+
isEditing: isEditing(),
|
|
10
|
+
isBrowser: isBrowser(),
|
|
11
|
+
isServer: !isBrowser(),
|
|
12
|
+
};
|
|
13
|
+
// Be able to handle simple expressions like "state.foo" or "1 + 1"
|
|
14
|
+
// as well as full blocks like "var foo = "bar"; return foo"
|
|
15
|
+
const useReturn = !(code.includes(';') ||
|
|
16
|
+
code.includes(' return ') ||
|
|
17
|
+
code.trim().startsWith('return '));
|
|
18
|
+
const useCode = useReturn ? `return (${code});` : code;
|
|
19
|
+
try {
|
|
20
|
+
return new Function('builder', 'Builder' /* <- legacy */, 'state', 'context', 'event', useCode)(builder, builder, state, context, event);
|
|
21
|
+
}
|
|
22
|
+
catch (e) {
|
|
23
|
+
console.warn('Builder custom code error: \n While Evaluating: \n ', useCode, '\n', e.message || e);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getEventHandlerName: (key: string) => string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { BuilderContextInterface } from '../context/types.js';
|
|
2
|
+
import { BuilderBlock } from '../types/builder-block.js';
|
|
3
|
+
declare type Actions = {
|
|
4
|
+
[index: string]: (event: Event) => any;
|
|
5
|
+
};
|
|
6
|
+
export declare function getBlockActions(options: {
|
|
7
|
+
block: BuilderBlock;
|
|
8
|
+
} & Pick<BuilderContextInterface, 'state' | 'context'>): Actions;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import '../types/builder-block.js';
|
|
2
|
+
import { evaluate } from './evaluate.js';
|
|
3
|
+
import { getEventHandlerName } from './event-handler-name.js';
|
|
4
|
+
export function getBlockActions(options) {
|
|
5
|
+
const obj = {};
|
|
6
|
+
const optionActions = options.block.actions ?? {};
|
|
7
|
+
for (const key in optionActions) {
|
|
8
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
9
|
+
if (!optionActions.hasOwnProperty(key)) {
|
|
10
|
+
continue;
|
|
11
|
+
}
|
|
12
|
+
const value = optionActions[key];
|
|
13
|
+
obj[getEventHandlerName(key)] = (event) => evaluate({
|
|
14
|
+
code: value,
|
|
15
|
+
context: options.context,
|
|
16
|
+
state: options.state,
|
|
17
|
+
event,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return obj;
|
|
21
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import '../types/builder-block.js';
|
|
2
|
+
export function getBlockComponentOptions(block) {
|
|
3
|
+
return {
|
|
4
|
+
...block.component?.options,
|
|
5
|
+
...block.options,
|
|
6
|
+
/**
|
|
7
|
+
* Our built-in components frequently make use of the block, so we provide all of it under `builderBlock`
|
|
8
|
+
*/
|
|
9
|
+
builderBlock: block,
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { getMaxWidthQueryForSize } from '../constants/device-sizes.js';
|
|
2
|
+
import '../types/builder-block.js';
|
|
3
|
+
import { convertStyleObject } from './convert-style-object.js';
|
|
4
|
+
import { sanitizeBlockStyles } from './sanitize-styles.js';
|
|
5
|
+
export function getBlockStyles(block) {
|
|
6
|
+
const styles = {
|
|
7
|
+
...convertStyleObject(block.responsiveStyles?.large),
|
|
8
|
+
/**
|
|
9
|
+
* TO-DO: remove?
|
|
10
|
+
*/
|
|
11
|
+
...block.styles,
|
|
12
|
+
};
|
|
13
|
+
if (block.responsiveStyles?.medium) {
|
|
14
|
+
styles[getMaxWidthQueryForSize('medium')] = convertStyleObject(block.responsiveStyles?.medium);
|
|
15
|
+
}
|
|
16
|
+
if (block.responsiveStyles?.small) {
|
|
17
|
+
styles[getMaxWidthQueryForSize('small')] = convertStyleObject(block.responsiveStyles?.small);
|
|
18
|
+
}
|
|
19
|
+
sanitizeBlockStyles(styles);
|
|
20
|
+
return styles;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { convertSearchParamsToQueryObject, getBuilderSearchParams } from '.';
|
|
2
|
+
const querystring = 'someotherValue=jklsjfdal&abc=klfdjklgfds&builder.cachebust=true&builder.preview=page&builder.noCache=true&__builder_editing__=true&builder.overrides.page=037948e52eaf4743afed464f02c70da4&builder.overrides.037948e52eaf4743afed464f02c70da4=037948e52eaf4743afed464f02c70da4&builder.overrides.page%3A%2F=037948e52eaf4743afed464f02c70da4&preview_theme_id=128854393017';
|
|
3
|
+
const url = new URL(`localhost:3000/about-us?${querystring}`);
|
|
4
|
+
describe('Get Builder SearchParams', () => {
|
|
5
|
+
test('correctly converts URLSearchParams to object', () => {
|
|
6
|
+
const output = convertSearchParamsToQueryObject(url.searchParams);
|
|
7
|
+
expect(output).toMatchSnapshot();
|
|
8
|
+
});
|
|
9
|
+
test('correctly extracts all builder params from a query object', () => {
|
|
10
|
+
const output = getBuilderSearchParams(convertSearchParamsToQueryObject(url.searchParams));
|
|
11
|
+
expect(output).toMatchSnapshot();
|
|
12
|
+
});
|
|
13
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare type QueryObject = Record<string, string>;
|
|
2
|
+
export declare const convertSearchParamsToQueryObject: (searchParams: URLSearchParams) => QueryObject;
|
|
3
|
+
export declare const getBuilderSearchParams: (options: QueryObject) => QueryObject;
|
|
4
|
+
export declare const getBuilderSearchParamsFromWindow: () => QueryObject;
|
|
5
|
+
export declare const normalizeSearchParams: (searchParams: QueryObject | URLSearchParams) => QueryObject;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { isBrowser } from '../is-browser.js';
|
|
2
|
+
const BUILDER_SEARCHPARAMS_PREFIX = 'builder.';
|
|
3
|
+
export const convertSearchParamsToQueryObject = (searchParams) => {
|
|
4
|
+
const options = {};
|
|
5
|
+
searchParams.forEach((value, key) => {
|
|
6
|
+
options[key] = value;
|
|
7
|
+
});
|
|
8
|
+
return options;
|
|
9
|
+
};
|
|
10
|
+
export const getBuilderSearchParams = (options) => {
|
|
11
|
+
const newOptions = {};
|
|
12
|
+
Object.keys(options).forEach((key) => {
|
|
13
|
+
if (key.startsWith(BUILDER_SEARCHPARAMS_PREFIX)) {
|
|
14
|
+
const trimmedKey = key.replace(BUILDER_SEARCHPARAMS_PREFIX, '');
|
|
15
|
+
newOptions[trimmedKey] = options[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
return newOptions;
|
|
19
|
+
};
|
|
20
|
+
export const getBuilderSearchParamsFromWindow = () => {
|
|
21
|
+
if (!isBrowser()) {
|
|
22
|
+
return {};
|
|
23
|
+
}
|
|
24
|
+
const searchParams = new URLSearchParams(window.location.search);
|
|
25
|
+
return getBuilderSearchParams(convertSearchParamsToQueryObject(searchParams));
|
|
26
|
+
};
|
|
27
|
+
export const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams
|
|
28
|
+
? convertSearchParamsToQueryObject(searchParams)
|
|
29
|
+
: searchParams;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import './types.js';
|
|
2
|
+
import '../../types/builder-content.js';
|
|
3
|
+
export const handleABTesting = (item, testGroups) => {
|
|
4
|
+
if (item.variations && Object.keys(item.variations).length) {
|
|
5
|
+
const testGroup = item.id ? testGroups[item.id] : undefined;
|
|
6
|
+
const variationValue = testGroup ? item.variations[testGroup] : undefined;
|
|
7
|
+
if (testGroup && variationValue) {
|
|
8
|
+
item.data = variationValue.data;
|
|
9
|
+
item.testVariationId = variationValue.id;
|
|
10
|
+
item.testVariationName = variationValue.name;
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
// TODO: a/b test iteration logic
|
|
14
|
+
let n = 0;
|
|
15
|
+
const random = Math.random();
|
|
16
|
+
let set = false;
|
|
17
|
+
for (const id in item.variations) {
|
|
18
|
+
const variation = item.variations[id];
|
|
19
|
+
const testRatio = variation.testRatio;
|
|
20
|
+
n += testRatio;
|
|
21
|
+
if (random < n) {
|
|
22
|
+
const variationName = variation.name ||
|
|
23
|
+
(variation.id === item.id ? 'Default variation' : '');
|
|
24
|
+
set = true;
|
|
25
|
+
Object.assign(item, {
|
|
26
|
+
data: variation.data,
|
|
27
|
+
testVariationId: variation.id,
|
|
28
|
+
testVariationName: variationName,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (!set) {
|
|
33
|
+
Object.assign(item, {
|
|
34
|
+
testVariationId: item.id,
|
|
35
|
+
testVariationName: 'Default',
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { generateContentUrl } from '.';
|
|
2
|
+
const testKey = 'YJIGb4i01jvw0SRdL5Bt';
|
|
3
|
+
const testModel = 'page';
|
|
4
|
+
const testId = 'c1b81bab59704599b997574eb0736def';
|
|
5
|
+
const options = {
|
|
6
|
+
cachebust: 'true',
|
|
7
|
+
noCache: 'true',
|
|
8
|
+
'overrides.037948e52eaf4743afed464f02c70da4': '037948e52eaf4743afed464f02c70da4',
|
|
9
|
+
'overrides.page': '037948e52eaf4743afed464f02c70da4',
|
|
10
|
+
'overrides.page:/': '037948e52eaf4743afed464f02c70da4',
|
|
11
|
+
preview: 'page',
|
|
12
|
+
};
|
|
13
|
+
describe('Generate Content URL', () => {
|
|
14
|
+
test('generates the proper value for a simple query', () => {
|
|
15
|
+
const output = generateContentUrl({
|
|
16
|
+
apiKey: testKey,
|
|
17
|
+
model: testModel,
|
|
18
|
+
query: { id: testId },
|
|
19
|
+
});
|
|
20
|
+
expect(output).toMatchSnapshot();
|
|
21
|
+
});
|
|
22
|
+
test('Handles overrides correctly', () => {
|
|
23
|
+
const output = generateContentUrl({
|
|
24
|
+
apiKey: testKey,
|
|
25
|
+
model: testModel,
|
|
26
|
+
query: { id: testId },
|
|
27
|
+
options,
|
|
28
|
+
});
|
|
29
|
+
expect(output).toMatchSnapshot();
|
|
30
|
+
});
|
|
31
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BuilderContent } from '../../types/builder-content.js';
|
|
2
|
+
export declare type GetContentOptions = import('./types.js').GetContentOptions;
|
|
3
|
+
export declare function getContent(options: GetContentOptions): Promise<BuilderContent | null>;
|
|
4
|
+
export declare const generateContentUrl: (options: GetContentOptions) => URL;
|
|
5
|
+
interface ContentResponse {
|
|
6
|
+
results: BuilderContent[];
|
|
7
|
+
}
|
|
8
|
+
export declare function getAllContent(options: GetContentOptions): Promise<ContentResponse>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { flatten } from '../../helpers/flatten.js';
|
|
2
|
+
import '../../types/builder-content.js';
|
|
3
|
+
import { getBuilderSearchParamsFromWindow, normalizeSearchParams, } from '../get-builder-search-params/index.js';
|
|
4
|
+
import { getFetch } from '../get-fetch.js';
|
|
5
|
+
import { handleABTesting } from './ab-testing.js';
|
|
6
|
+
const fetch$ = getFetch();
|
|
7
|
+
export async function getContent(options) {
|
|
8
|
+
return (await getAllContent({ ...options, limit: 1 })).results[0] || null;
|
|
9
|
+
}
|
|
10
|
+
export const generateContentUrl = (options) => {
|
|
11
|
+
const { limit = 30, userAttributes, query, noTraverse = false, model, apiKey, } = options;
|
|
12
|
+
const url = new URL(`https://cdn.builder.io/api/v2/content/${model}?apiKey=${apiKey}&limit=${limit}&noTraverse=${noTraverse}`);
|
|
13
|
+
const queryOptions = {
|
|
14
|
+
...getBuilderSearchParamsFromWindow(),
|
|
15
|
+
...normalizeSearchParams(options.options || {}),
|
|
16
|
+
};
|
|
17
|
+
const flattened = flatten(queryOptions);
|
|
18
|
+
for (const key in flattened) {
|
|
19
|
+
url.searchParams.set(key, String(flattened[key]));
|
|
20
|
+
}
|
|
21
|
+
if (userAttributes) {
|
|
22
|
+
url.searchParams.set('userAttributes', JSON.stringify(userAttributes));
|
|
23
|
+
}
|
|
24
|
+
if (query) {
|
|
25
|
+
const flattened = flatten({ query });
|
|
26
|
+
for (const key in flattened) {
|
|
27
|
+
url.searchParams.set(key, JSON.stringify(flattened[key]));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return url;
|
|
31
|
+
};
|
|
32
|
+
export async function getAllContent(options) {
|
|
33
|
+
const url = generateContentUrl(options);
|
|
34
|
+
const fetch = await fetch$;
|
|
35
|
+
const content = await fetch(url.href).then((res) => res.json());
|
|
36
|
+
if (options.testGroups) {
|
|
37
|
+
for (const item of content.results) {
|
|
38
|
+
handleABTesting(item, options.testGroups);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return content;
|
|
42
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface GetContentOptions {
|
|
2
|
+
/** The model to get content for */
|
|
3
|
+
model: string;
|
|
4
|
+
/** Your public API key */
|
|
5
|
+
apiKey: string;
|
|
6
|
+
/** A/B test groups the current visitor is in. Key is the content ID, value is the variation ID */
|
|
7
|
+
testGroups?: Record<string, string> | null;
|
|
8
|
+
/** Number of items to fetch. Default is 1 */
|
|
9
|
+
limit?: number;
|
|
10
|
+
/** User attributes to target on, such as { urlPath: '/foo', device: 'mobile', ...etc } */
|
|
11
|
+
userAttributes?: (Record<string, string> & {
|
|
12
|
+
urlPath?: string;
|
|
13
|
+
}) | null;
|
|
14
|
+
/** Custom query */
|
|
15
|
+
query?: Record<string, any>;
|
|
16
|
+
/**
|
|
17
|
+
* Any other API options.
|
|
18
|
+
* Accepts both a key/value object or a `URLSearchParams` instance
|
|
19
|
+
* */
|
|
20
|
+
options?: Record<string, any> | URLSearchParams;
|
|
21
|
+
/**
|
|
22
|
+
* If set to `true`, it will lazy load symbols/references.
|
|
23
|
+
* If set to `false`, it will render the entire content tree eagerly.
|
|
24
|
+
*/
|
|
25
|
+
noTraverse?: boolean;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getFetch(): Promise<typeof global.fetch>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { getGlobalThis } from './get-global-this.js';
|
|
2
|
+
export async function getFetch() {
|
|
3
|
+
const globalFetch = getGlobalThis().fetch;
|
|
4
|
+
if (typeof globalFetch === 'undefined' && typeof global !== 'undefined') {
|
|
5
|
+
const nodeFetch = import('node-fetch').then((d) => d.default);
|
|
6
|
+
return nodeFetch.default || nodeFetch;
|
|
7
|
+
}
|
|
8
|
+
return globalFetch.default || globalFetch;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getGlobalThis(): any;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function getGlobalThis() {
|
|
2
|
+
if (typeof globalThis !== 'undefined') {
|
|
3
|
+
return globalThis;
|
|
4
|
+
}
|
|
5
|
+
if (typeof window !== 'undefined') {
|
|
6
|
+
return window;
|
|
7
|
+
}
|
|
8
|
+
if (typeof global !== 'undefined') {
|
|
9
|
+
return global;
|
|
10
|
+
}
|
|
11
|
+
if (typeof self !== 'undefined') {
|
|
12
|
+
return self;
|
|
13
|
+
}
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BuilderContextInterface } from '../context/types.js';
|
|
2
|
+
import { BuilderBlock } from '../types/builder-block.js';
|
|
3
|
+
export declare function getProcessedBlock({ block, context, shouldEvaluateBindings, state, }: {
|
|
4
|
+
block: BuilderBlock;
|
|
5
|
+
/**
|
|
6
|
+
* In some cases, we want to avoid evaluating bindings and only want framework-specific block transformation. It is
|
|
7
|
+
* also sometimes too early to consider bindings, e.g. when we might be looking at a repeated block.
|
|
8
|
+
*/
|
|
9
|
+
shouldEvaluateBindings: boolean;
|
|
10
|
+
} & Pick<BuilderContextInterface, 'state' | 'context'>): BuilderBlock;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import '../types/builder-block.js';
|
|
2
|
+
import { evaluate } from './evaluate.js';
|
|
3
|
+
import { set } from './set.js';
|
|
4
|
+
import { transformBlock } from './transform-block.js';
|
|
5
|
+
const evaluateBindings = ({ block, context, state, }) => {
|
|
6
|
+
if (!block.bindings) {
|
|
7
|
+
return block;
|
|
8
|
+
}
|
|
9
|
+
const copied = {
|
|
10
|
+
...block,
|
|
11
|
+
properties: { ...block.properties },
|
|
12
|
+
actions: { ...block.actions },
|
|
13
|
+
};
|
|
14
|
+
for (const binding in block.bindings) {
|
|
15
|
+
const expression = block.bindings[binding];
|
|
16
|
+
const value = evaluate({ code: expression, state, context });
|
|
17
|
+
set(copied, binding, value);
|
|
18
|
+
}
|
|
19
|
+
return copied;
|
|
20
|
+
};
|
|
21
|
+
export function getProcessedBlock({ block, context, shouldEvaluateBindings, state, }) {
|
|
22
|
+
const transformedBlock = transformBlock(block);
|
|
23
|
+
if (shouldEvaluateBindings) {
|
|
24
|
+
return evaluateBindings({ block: transformedBlock, state, context });
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
return transformedBlock;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|