@builder.io/sdk-qwik 0.5.4 → 0.5.6
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/lib/index.qwik.cjs +45 -15
- package/lib/index.qwik.mjs +45 -15
- package/package.json +5 -1
- package/types/blocks/symbol/symbol.helpers.d.ts +1 -1
- package/types/components/block/components/component-ref/component-ref.helpers.d.ts +1 -1
- package/types/components/blocks/blocks.d.ts +1 -1
- package/types/components/content/index.d.ts +1 -1
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/constants/target.d.ts +1 -1
- package/types/functions/fetch-builder-props.d.ts +39 -0
- package/types/functions/get-content/index.d.ts +20 -3
- package/types/helpers/preview-lru-cache/get.d.ts +2 -1
- package/types/helpers/preview-lru-cache/helpers.d.ts +0 -1
- package/types/helpers/preview-lru-cache/set.d.ts +1 -1
- package/types/helpers/preview-lru-cache/types.d.ts +0 -12
- package/types/index-helpers/blocks-exports.d.ts +21 -10
- package/types/index.d.ts +4 -3
- package/types/src/blocks/BaseText.d.ts +5 -0
- package/types/src/blocks/button/button.d.ts +11 -0
- package/types/src/blocks/button/component-info.d.ts +2 -0
- package/types/src/blocks/columns/columns.d.ts +32 -0
- package/types/src/blocks/columns/component-info.d.ts +2 -0
- package/types/src/blocks/custom-code/component-info.d.ts +2 -0
- package/types/src/blocks/custom-code/custom-code.d.ts +7 -0
- package/types/src/blocks/embed/component-info.d.ts +2 -0
- package/types/src/blocks/embed/embed.d.ts +6 -0
- package/types/src/blocks/embed/helpers.d.ts +1 -0
- package/types/src/blocks/form/component-info.d.ts +2 -0
- package/types/src/blocks/fragment/component-info.d.ts +2 -0
- package/types/src/blocks/fragment/fragment.d.ts +7 -0
- package/types/src/blocks/helpers.d.ts +13 -0
- package/types/src/blocks/image/component-info.d.ts +2 -0
- package/types/src/blocks/image/image.d.ts +23 -0
- package/types/src/blocks/image/image.helpers.d.ts +1 -0
- package/types/src/blocks/img/component-info.d.ts +2 -0
- package/types/src/blocks/img/img.d.ts +12 -0
- package/types/src/blocks/input/component-info.d.ts +2 -0
- package/types/src/blocks/input/input.d.ts +13 -0
- package/types/src/blocks/raw-text/component-info.d.ts +2 -0
- package/types/src/blocks/raw-text/raw-text.d.ts +6 -0
- package/types/src/blocks/section/component-info.d.ts +2 -0
- package/types/src/blocks/section/section.d.ts +10 -0
- package/types/src/blocks/select/component-info.d.ts +2 -0
- package/types/src/blocks/select/select.d.ts +14 -0
- package/types/src/blocks/submit-button/component-info.d.ts +2 -0
- package/types/src/blocks/submit-button/submit-button.d.ts +8 -0
- package/types/src/blocks/symbol/component-info.d.ts +2 -0
- package/types/src/blocks/symbol/symbol.d.ts +24 -0
- package/types/src/blocks/symbol/symbol.helpers.d.ts +14 -0
- package/types/src/blocks/text/component-info.d.ts +2 -0
- package/types/src/blocks/text/text.d.ts +5 -0
- package/types/src/blocks/textarea/component-info.d.ts +2 -0
- package/types/src/blocks/textarea/textarea.d.ts +11 -0
- package/types/src/blocks/video/component-info.d.ts +2 -0
- package/types/src/blocks/video/video.d.ts +19 -0
- package/types/src/components/block/block.d.ts +9 -0
- package/types/src/components/block/block.helpers.d.ts +13 -0
- package/types/{components/render-block → src/components/block/components}/block-styles.d.ts +2 -2
- package/types/{components/block/components/block-wrapper → src/components/block/components}/block-wrapper.d.ts +7 -4
- package/types/src/components/block/components/component-ref/component-ref.d.ts +3 -0
- package/types/src/components/block/components/component-ref/component-ref.helpers.d.ts +35 -0
- package/types/src/components/block/components/interactive-element.d.ts +11 -0
- package/types/src/components/block/components/repeated-block.d.ts +9 -0
- package/types/src/components/blocks/blocks-wrapper.d.ts +13 -0
- package/types/src/components/blocks/blocks.d.ts +8 -0
- package/types/{components/render-content/render-content.d.ts → src/components/content/components/enable-editor.d.ts} +10 -7
- package/types/{components/content/components/content-styles.d.ts → src/components/content/components/styles.d.ts} +1 -1
- package/types/{components/content/components/content-styles.helpers.d.ts → src/components/content/components/styles.helpers.d.ts} +1 -1
- package/types/src/components/content/content.d.ts +5 -0
- package/types/src/components/content/content.helpers.d.ts +7 -0
- package/types/{components/render-content/render-content.types.d.ts → src/components/content/content.types.d.ts} +4 -4
- package/types/src/components/content/index.d.ts +1 -0
- package/types/src/components/content-variants/content-variants.d.ts +9 -0
- package/types/{components/render-content-variants/render-content-variants.types.d.ts → src/components/content-variants/content-variants.types.d.ts} +5 -5
- package/types/{components/render-content-variants → src/components/content-variants}/helpers.d.ts +7 -7
- package/types/src/components/inlined-script.d.ts +6 -0
- package/types/src/components/inlined-styles.d.ts +6 -0
- package/types/src/constants/builder-registered-components.d.ts +6 -0
- package/types/src/constants/device-sizes.d.ts +13 -0
- package/types/src/constants/sdk-version.d.ts +1 -0
- package/types/src/constants/target.d.ts +2 -0
- package/types/src/context/builder.context.d.ts +2 -0
- package/types/src/context/components.context.d.ts +2 -0
- package/types/src/context/types.d.ts +35 -0
- package/types/src/functions/apply-patch-with-mutation.d.ts +10 -0
- package/types/src/functions/camel-to-kebab-case.d.ts +1 -0
- package/types/src/functions/evaluate/browser-runtime/browser.d.ts +4 -0
- package/types/src/functions/evaluate/browser-runtime/index.d.ts +1 -0
- package/types/src/functions/evaluate/evaluate.d.ts +10 -0
- package/types/src/functions/evaluate/helpers.d.ts +18 -0
- package/types/src/functions/evaluate/index.d.ts +1 -0
- package/types/src/functions/evaluate/node-runtime/index.d.ts +1 -0
- package/types/src/functions/evaluate/node-runtime/node-runtime.d.ts +2 -0
- package/types/src/functions/evaluate/non-node-runtime/acorn-interpreter.d.ts +2 -0
- package/types/src/functions/evaluate/non-node-runtime/index.d.ts +1 -0
- package/types/{functions/evaluate → src/functions/evaluate/non-node-runtime}/non-node-runtime.d.ts +1 -1
- package/types/src/functions/evaluate/placeholder-runtime.d.ts +2 -0
- package/types/src/functions/evaluate/types.d.ts +11 -0
- package/types/src/functions/event-handler-name.d.ts +1 -0
- package/types/src/functions/extract-text-styles.d.ts +4 -0
- package/types/src/functions/fast-clone.d.ts +4 -0
- package/types/src/functions/fetch-builder-props.d.ts +39 -0
- package/types/src/functions/get-block-actions-handler.d.ts +5 -0
- package/types/src/functions/get-block-actions.d.ts +10 -0
- package/types/src/functions/get-block-component-options.d.ts +2 -0
- package/types/src/functions/get-block-properties.d.ts +11 -0
- package/types/src/functions/get-builder-search-params/index.d.ts +12 -0
- package/types/src/functions/get-content/generate-content-url.d.ts +2 -0
- package/types/src/functions/get-content/index.d.ts +29 -0
- package/types/src/functions/get-content/types.d.ts +51 -0
- package/types/src/functions/get-fetch.d.ts +1 -0
- package/types/src/functions/get-global-this.d.ts +4 -0
- package/types/src/functions/get-processed-block.d.ts +10 -0
- package/types/{functions/get-block-styles.d.ts → src/functions/get-react-native-block-styles.d.ts} +3 -2
- package/types/src/functions/if-target.d.ts +7 -0
- package/types/src/functions/is-browser.d.ts +1 -0
- package/types/src/functions/is-editing.d.ts +1 -0
- package/types/src/functions/is-iframe.d.ts +1 -0
- package/types/src/functions/is-non-node-server.d.ts +4 -0
- package/types/src/functions/is-previewing.d.ts +1 -0
- package/types/src/functions/on-change.d.ts +7 -0
- package/types/src/functions/register-component.d.ts +15 -0
- package/types/src/functions/register.d.ts +16 -0
- package/types/src/functions/sanitize-react-native-block-styles.d.ts +3 -0
- package/types/src/functions/set-editor-settings.d.ts +4 -0
- package/types/src/functions/set.d.ts +7 -0
- package/types/src/functions/track/helpers.d.ts +5 -0
- package/types/{functions/track.d.ts → src/functions/track/index.d.ts} +6 -11
- package/types/src/functions/track/interaction.d.ts +13 -0
- package/types/src/functions/transform-block-properties.d.ts +1 -0
- package/types/src/functions/transform-block.d.ts +2 -0
- package/types/src/helpers/ab-tests.d.ts +9 -0
- package/types/src/helpers/canTrack.d.ts +1 -0
- package/types/src/helpers/cookie.d.ts +19 -0
- package/types/src/helpers/css.d.ts +7 -0
- package/types/src/helpers/flatten.d.ts +6 -0
- package/types/src/helpers/localStorage.d.ts +9 -0
- package/types/src/helpers/logger.d.ts +6 -0
- package/types/src/helpers/nullable.d.ts +2 -0
- package/types/src/helpers/preview-lru-cache/get.d.ts +2 -0
- package/types/src/helpers/preview-lru-cache/helpers.d.ts +0 -0
- package/types/src/helpers/preview-lru-cache/init.d.ts +6 -0
- package/types/src/helpers/preview-lru-cache/set.d.ts +7 -0
- package/types/src/helpers/preview-lru-cache/types.d.ts +0 -0
- package/types/src/helpers/sessionId.d.ts +6 -0
- package/types/src/helpers/time.d.ts +1 -0
- package/types/src/helpers/url.d.ts +6 -0
- package/types/src/helpers/uuid.d.ts +8 -0
- package/types/src/helpers/visitorId.d.ts +6 -0
- package/types/src/index-helpers/blocks-exports.d.ts +21 -0
- package/types/src/index-helpers/top-of-file.d.ts +1 -0
- package/types/src/index.d.ts +16 -0
- package/types/src/scripts/init-editing.d.ts +6 -0
- package/types/src/types/api-version.d.ts +2 -0
- package/types/src/types/builder-block.d.ts +66 -0
- package/types/src/types/builder-content.d.ts +44 -0
- package/types/src/types/builder-props.d.ts +9 -0
- package/types/src/types/can-track.d.ts +3 -0
- package/types/src/types/components.d.ts +111 -0
- package/types/src/types/deep-partial.d.ts +3 -0
- package/types/src/types/element.d.ts +59 -0
- package/types/src/types/enforced-partials.d.ts +21 -0
- package/types/src/types/input.d.ts +121 -0
- package/types/src/types/targets.d.ts +1 -0
- package/types/src/types/typescript.d.ts +11 -0
- package/types/blocks/util.d.ts +0 -4
- package/types/components/block/components/component-ref.d.ts +0 -23
- package/types/components/block/components/component.d.ts +0 -21
- package/types/components/block/components/interactive-element/interactive-element.d.ts +0 -4
- package/types/components/block/components/interactive-element/interactive-element.helpers.d.ts +0 -16
- package/types/components/content/builder-editing.d.ts +0 -2
- package/types/components/content/components/render-styles.d.ts +0 -8
- package/types/components/content/components/render-styles.helpers.d.ts +0 -15
- package/types/components/render-block/render-block.d.ts +0 -8
- package/types/components/render-block/render-block.helpers.d.ts +0 -12
- package/types/components/render-block/render-component-with-context.d.ts +0 -3
- package/types/components/render-block/render-component.d.ts +0 -18
- package/types/components/render-block/render-repeated-block.d.ts +0 -8
- package/types/components/render-blocks.d.ts +0 -12
- package/types/components/render-content/builder-editing.d.ts +0 -2
- package/types/components/render-content/components/render-styles.d.ts +0 -8
- package/types/components/render-content/components/render-styles.helpers.d.ts +0 -15
- package/types/components/render-content/index.d.ts +0 -1
- package/types/components/render-content/render-content.helpers.d.ts +0 -7
- package/types/components/render-content-variants/render-content-variants.d.ts +0 -9
- package/types/components/render-inlined-styles.d.ts +0 -6
- package/types/functions/acorn_interpreter.d.ts +0 -1
- package/types/functions/apply-patch-with-mutation.test.d.ts +0 -1
- package/types/functions/convert-style-object.d.ts +0 -1
- package/types/functions/evaluate/acorn.d.ts +0 -11
- package/types/functions/evaluate/evaluate.test.d.ts +0 -1
- package/types/functions/evaluate.d.ts +0 -23
- package/types/functions/evaluate.test.d.ts +0 -1
- package/types/functions/get-block-tag.d.ts +0 -3
- package/types/functions/get-builder-search-params/fn.test.d.ts +0 -1
- package/types/functions/get-content/ab-testing.d.ts +0 -5
- package/types/functions/get-content/fn.test.d.ts +0 -1
- package/types/functions/get-content/generate-content-url.test.d.ts +0 -1
- package/types/functions/get-content/processCookies.d.ts +0 -2
- package/types/functions/get-processed-block.test.d.ts +0 -1
- package/types/functions/mark-mutable.d.ts +0 -2
- package/types/functions/on-change.test.d.ts +0 -1
- package/types/functions/sanitize-styles.d.ts +0 -4
- package/types/functions/set.test.d.ts +0 -1
- package/types/helpers/url.test.d.ts +0 -1
- package/types/talk/generators-updated.d.ts +0 -1
- package/types/talk/generators.d.ts +0 -6
- /package/types/{components/render-block → src/components/block}/types.d.ts +0 -0
- /package/types/{components/render-content → src/components/content}/wrap-component-ref.d.ts +0 -0
- /package/types/{functions/evaluate/interpreter.d.ts → src/functions/evaluate/acorn-interpreter.d.ts} +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { BuilderBlock } from "../../types/builder-block.js";
|
|
2
|
+
import { JSX } from "@builder.io/mitosis/jsx-runtime";
|
|
3
|
+
export interface ImageProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
image: string;
|
|
6
|
+
sizes?: string;
|
|
7
|
+
lazy?: boolean;
|
|
8
|
+
height?: number;
|
|
9
|
+
width?: number;
|
|
10
|
+
altText?: string;
|
|
11
|
+
backgroundSize?: "cover" | "contain";
|
|
12
|
+
backgroundPosition?: string;
|
|
13
|
+
srcset?: string;
|
|
14
|
+
aspectRatio?: number;
|
|
15
|
+
children?: JSX.Element;
|
|
16
|
+
fitContent?: boolean;
|
|
17
|
+
builderBlock?: BuilderBlock;
|
|
18
|
+
noWebp?: boolean;
|
|
19
|
+
src?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare const Image: import("@builder.io/qwik").Component<ImageProps>;
|
|
22
|
+
export default Image;
|
|
23
|
+
export declare const STYLES = "\n.img-Image {\n opacity: 1;\n transition: opacity 0.2s ease-in-out;\n}\n.div-Image {\n width: 100%;\n pointer-events: none;\n font-size: 0;\n}\n.div-Image-2 {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getSrcSet(url: string): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This import is used by the Svelte SDK. Do not remove.
|
|
3
|
+
*/ export interface ImgProps {
|
|
4
|
+
attributes?: any;
|
|
5
|
+
imgSrc?: string;
|
|
6
|
+
image?: string;
|
|
7
|
+
altText?: string;
|
|
8
|
+
backgroundSize?: "cover" | "contain";
|
|
9
|
+
backgroundPosition?: "center" | "top" | "left" | "right" | "bottom" | "top left" | "top right" | "bottom left" | "bottom right";
|
|
10
|
+
}
|
|
11
|
+
export declare const ImgComponent: import("@builder.io/qwik").Component<ImgProps>;
|
|
12
|
+
export default ImgComponent;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This import is used by the Svelte SDK. Do not remove.
|
|
3
|
+
*/ export interface FormInputProps {
|
|
4
|
+
type?: string;
|
|
5
|
+
attributes?: any;
|
|
6
|
+
name?: string;
|
|
7
|
+
value?: string;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
defaultValue?: string;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const FormInputComponent: import("@builder.io/qwik").Component<FormInputProps>;
|
|
13
|
+
export default FormInputComponent;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This import is used by the Svelte SDK. Do not remove.
|
|
3
|
+
*/ export interface SectionProps {
|
|
4
|
+
maxWidth?: number;
|
|
5
|
+
attributes?: any;
|
|
6
|
+
children?: any;
|
|
7
|
+
builderBlock?: any;
|
|
8
|
+
}
|
|
9
|
+
export declare const SectionComponent: import("@builder.io/qwik").Component<SectionProps>;
|
|
10
|
+
export default SectionComponent;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This import is used by the Svelte SDK. Do not remove.
|
|
3
|
+
*/ export interface FormSelectProps {
|
|
4
|
+
options?: {
|
|
5
|
+
name?: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}[];
|
|
8
|
+
attributes?: any;
|
|
9
|
+
name?: string;
|
|
10
|
+
value?: string;
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const SelectComponent: import("@builder.io/qwik").Component<FormSelectProps>;
|
|
14
|
+
export default SelectComponent;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BuilderContent } from "../../types/builder-content.js";
|
|
2
|
+
import { BuilderComponentsProp, PropsWithBuilderData } from "../../types/builder-props.js";
|
|
3
|
+
/**
|
|
4
|
+
* This import is used by the Svelte SDK. Do not remove.
|
|
5
|
+
*/ export interface SymbolInfo {
|
|
6
|
+
model?: string;
|
|
7
|
+
entry?: string;
|
|
8
|
+
data?: any;
|
|
9
|
+
content?: BuilderContent;
|
|
10
|
+
inline?: boolean;
|
|
11
|
+
dynamic?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* This import is used by the Svelte SDK. Do not remove.
|
|
15
|
+
*/ export interface SymbolProps extends BuilderComponentsProp {
|
|
16
|
+
symbol?: SymbolInfo;
|
|
17
|
+
dataOnly?: boolean;
|
|
18
|
+
dynamic?: boolean;
|
|
19
|
+
attributes?: any;
|
|
20
|
+
inheritState?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare const setContent: (props: any, state: any) => void;
|
|
23
|
+
export declare const Symbol: import("@builder.io/qwik").Component<PropsWithBuilderData<SymbolProps>>;
|
|
24
|
+
export default Symbol;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { BuilderContextInterface } from '../../context/types.js';
|
|
2
|
+
import type { BuilderContent } from '../../types/builder-content.js';
|
|
3
|
+
export interface SymbolInfo {
|
|
4
|
+
model?: string;
|
|
5
|
+
entry?: string;
|
|
6
|
+
data?: any;
|
|
7
|
+
content?: BuilderContent;
|
|
8
|
+
inline?: boolean;
|
|
9
|
+
dynamic?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const fetchSymbolContent: ({ builderContextValue, symbol }: {
|
|
12
|
+
symbol: SymbolInfo | undefined;
|
|
13
|
+
builderContextValue: BuilderContextInterface;
|
|
14
|
+
}) => Promise<BuilderContent | null | undefined>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This import is used by the Svelte SDK. Do not remove.
|
|
3
|
+
*/ export interface TextareaProps {
|
|
4
|
+
attributes?: any;
|
|
5
|
+
name?: string;
|
|
6
|
+
value?: string;
|
|
7
|
+
defaultValue?: string;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const Textarea: import("@builder.io/qwik").Component<TextareaProps>;
|
|
11
|
+
export default Textarea;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface VideoProps {
|
|
2
|
+
attributes?: any;
|
|
3
|
+
video?: string;
|
|
4
|
+
autoPlay?: boolean;
|
|
5
|
+
controls?: boolean;
|
|
6
|
+
muted?: boolean;
|
|
7
|
+
loop?: boolean;
|
|
8
|
+
playsInline?: boolean;
|
|
9
|
+
aspectRatio?: number;
|
|
10
|
+
width?: number;
|
|
11
|
+
height?: number;
|
|
12
|
+
fit?: "contain" | "cover" | "fill";
|
|
13
|
+
preload?: "auto" | "metadata" | "none";
|
|
14
|
+
position?: "center" | "top" | "left" | "right" | "bottom" | "top left" | "top right" | "bottom left" | "bottom right";
|
|
15
|
+
posterImage?: string;
|
|
16
|
+
lazyLoad?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare const Video: import("@builder.io/qwik").Component<VideoProps>;
|
|
19
|
+
export default Video;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BuilderContextInterface, RegisteredComponents } from "../../context/types.js";
|
|
2
|
+
import { BuilderBlock } from "../../types/builder-block.js";
|
|
3
|
+
export type BlockProps = {
|
|
4
|
+
block: BuilderBlock;
|
|
5
|
+
context: BuilderContextInterface;
|
|
6
|
+
registeredComponents: RegisteredComponents;
|
|
7
|
+
};
|
|
8
|
+
export declare const Block: import("@builder.io/qwik").Component<BlockProps>;
|
|
9
|
+
export default Block;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { BuilderContextInterface, RegisteredComponents } from '../../context/types.js';
|
|
2
|
+
import type { BuilderBlock } from '../../types/builder-block.js';
|
|
3
|
+
import type { RepeatData } from './types.js';
|
|
4
|
+
export declare const isEmptyHtmlElement: (tagName: unknown) => boolean;
|
|
5
|
+
export declare const getComponent: ({ block, context, registeredComponents }: {
|
|
6
|
+
block: BuilderBlock;
|
|
7
|
+
context: BuilderContextInterface;
|
|
8
|
+
registeredComponents: RegisteredComponents;
|
|
9
|
+
}) => import("../../context/types.js").RegisteredComponent | null | undefined;
|
|
10
|
+
export declare const getRepeatItemData: ({ block, context }: {
|
|
11
|
+
block: BuilderBlock;
|
|
12
|
+
context: BuilderContextInterface;
|
|
13
|
+
}) => RepeatData[] | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BuilderContextInterface } from "
|
|
2
|
-
import { BuilderBlock } from "
|
|
1
|
+
import { BuilderContextInterface } from "../../../context/types.js";
|
|
2
|
+
import { BuilderBlock } from "../../../types/builder-block.js";
|
|
3
3
|
export type BlockStylesProps = {
|
|
4
4
|
block: BuilderBlock;
|
|
5
5
|
context: BuilderContextInterface;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { BuilderContextInterface } from "
|
|
2
|
-
import { BuilderBlock } from "
|
|
3
|
-
import { PropsWithChildren } from "
|
|
4
|
-
|
|
1
|
+
import { BuilderContextInterface } from "../../../context/types.js";
|
|
2
|
+
import { BuilderBlock } from "../../../types/builder-block.js";
|
|
3
|
+
import { PropsWithChildren } from "../../../types/typescript.js";
|
|
4
|
+
/**
|
|
5
|
+
* This import is used by the Svelte SDK. Do not remove.
|
|
6
|
+
*/ type BlockWrapperProps = {
|
|
5
7
|
Wrapper: string;
|
|
6
8
|
block: BuilderBlock;
|
|
7
9
|
context: BuilderContextInterface;
|
|
10
|
+
hasChildren: boolean;
|
|
8
11
|
};
|
|
9
12
|
/**
|
|
10
13
|
* This component renders a block's wrapper HTML element (from the block's `tagName` property).
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { BuilderContextInterface, RegisteredComponents } from '../../../../context/types.js';
|
|
2
|
+
import type { BuilderBlock } from '../../../../types/builder-block.js';
|
|
3
|
+
import type { PropsWithBuilderData } from '../../../../types/builder-props.js';
|
|
4
|
+
import type { InteractiveElementProps } from '../interactive-element';
|
|
5
|
+
type ComponentOptions = PropsWithBuilderData<{
|
|
6
|
+
[index: string]: any;
|
|
7
|
+
attributes?: {
|
|
8
|
+
[index: string]: any;
|
|
9
|
+
};
|
|
10
|
+
}>;
|
|
11
|
+
export interface ComponentProps {
|
|
12
|
+
componentRef: any;
|
|
13
|
+
componentOptions: ComponentOptions;
|
|
14
|
+
blockChildren: BuilderBlock[];
|
|
15
|
+
context: BuilderContextInterface;
|
|
16
|
+
registeredComponents: RegisteredComponents;
|
|
17
|
+
builderBlock: BuilderBlock;
|
|
18
|
+
includeBlockProps: boolean;
|
|
19
|
+
isInteractive: boolean | undefined;
|
|
20
|
+
}
|
|
21
|
+
export declare const getWrapperProps: ({ componentOptions, builderBlock, context, componentRef, includeBlockProps, isInteractive, contextValue }: Omit<ComponentProps, "registeredComponents" | "blockChildren"> & {
|
|
22
|
+
contextValue: BuilderContextInterface;
|
|
23
|
+
}) => InteractiveElementProps | {
|
|
24
|
+
attributes?: {
|
|
25
|
+
'builder-id': string | undefined;
|
|
26
|
+
style: string | Partial<CSSStyleDeclaration> | undefined;
|
|
27
|
+
class: string;
|
|
28
|
+
href: any;
|
|
29
|
+
} | {
|
|
30
|
+
[index: string]: any;
|
|
31
|
+
} | undefined;
|
|
32
|
+
builderBlock: BuilderBlock;
|
|
33
|
+
builderContext: BuilderContextInterface;
|
|
34
|
+
};
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BuilderContextInterface } from "../../../context/types.js";
|
|
2
|
+
import { BuilderBlock } from "../../../types/builder-block.js";
|
|
3
|
+
import { PropsWithChildren } from "../../../types/typescript.js";
|
|
4
|
+
export type InteractiveElementProps = {
|
|
5
|
+
Wrapper: any;
|
|
6
|
+
block: BuilderBlock;
|
|
7
|
+
context: BuilderContextInterface;
|
|
8
|
+
wrapperProps: object;
|
|
9
|
+
};
|
|
10
|
+
export declare const InteractiveElement: import("@builder.io/qwik").Component<PropsWithChildren<InteractiveElementProps>>;
|
|
11
|
+
export default InteractiveElement;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BuilderContextInterface, RegisteredComponents } from "../../../context/types.js";
|
|
2
|
+
import { BuilderBlock } from "../../../types/builder-block.js";
|
|
3
|
+
type Props = {
|
|
4
|
+
block: BuilderBlock;
|
|
5
|
+
repeatContext: BuilderContextInterface;
|
|
6
|
+
registeredComponents: RegisteredComponents;
|
|
7
|
+
};
|
|
8
|
+
export declare const RepeatedBlock: import("@builder.io/qwik").Component<Props>;
|
|
9
|
+
export default RepeatedBlock;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BuilderBlock } from "../../types/builder-block.js";
|
|
2
|
+
import { PropsWithChildren } from "../../types/typescript.js";
|
|
3
|
+
export type BlocksWrapperProps = {
|
|
4
|
+
blocks: BuilderBlock[] | undefined;
|
|
5
|
+
parent: string | undefined;
|
|
6
|
+
path: string | undefined;
|
|
7
|
+
styleProp: Record<string, any> | undefined;
|
|
8
|
+
};
|
|
9
|
+
export declare const onClick: (props: any, state: any) => void;
|
|
10
|
+
export declare const onMouseEnter: (props: any, state: any) => void;
|
|
11
|
+
export declare const BlocksWrapper: import("@builder.io/qwik").Component<PropsWithChildren<BlocksWrapperProps>>;
|
|
12
|
+
export default BlocksWrapper;
|
|
13
|
+
export declare const STYLES = "\n.div-BlocksWrapper {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n}\n";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BuilderContextInterface, RegisteredComponents } from "../../context/types.js";
|
|
2
|
+
import { BlocksWrapperProps } from "./blocks-wrapper";
|
|
3
|
+
export type BlocksProps = Partial<BlocksWrapperProps> & {
|
|
4
|
+
context?: BuilderContextInterface;
|
|
5
|
+
registeredComponents?: RegisteredComponents;
|
|
6
|
+
};
|
|
7
|
+
export declare const Blocks: import("@builder.io/qwik").Component<BlocksProps>;
|
|
8
|
+
export default Blocks;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { BuilderContextInterface } from "../../../context/types.js";
|
|
2
|
+
import { BuilderContent } from "../../../types/builder-content.js";
|
|
3
|
+
import { ContentProps } from "../content.types.js";
|
|
4
|
+
type BuilderEditorProps = Omit<ContentProps, "customComponents" | "data" | "apiVersion" | "isSsrAbTest"> & {
|
|
5
|
+
builderContextSignal: BuilderContextInterface;
|
|
6
|
+
setBuilderContextSignal?: (signal: any) => any;
|
|
7
|
+
children?: any;
|
|
8
|
+
};
|
|
4
9
|
export declare const mergeNewContent: (props: any, state: any, elementRef: any, newContent: BuilderContent) => void;
|
|
5
|
-
export declare const setBreakpoints: (props: any, state: any, elementRef: any, breakpoints: Breakpoints) => void;
|
|
6
|
-
export declare const contentSetState: (props: any, state: any, elementRef: any, newRootState: BuilderRenderState) => void;
|
|
7
10
|
export declare const processMessage: (props: any, state: any, elementRef: any, event: MessageEvent) => void;
|
|
8
11
|
export declare const evaluateJsCode: (props: any, state: any, elementRef: any) => void;
|
|
9
12
|
export declare const onClick: (props: any, state: any, elementRef: any, event: any) => void;
|
|
@@ -14,5 +17,5 @@ export declare const handleRequest: (props: any, state: any, elementRef: any, {
|
|
|
14
17
|
}) => void;
|
|
15
18
|
export declare const runHttpRequests: (props: any, state: any, elementRef: any) => void;
|
|
16
19
|
export declare const emitStateUpdate: (props: any, state: any, elementRef: any) => void;
|
|
17
|
-
export declare const
|
|
18
|
-
export default
|
|
20
|
+
export declare const EnableEditor: import("@builder.io/qwik").Component<BuilderEditorProps>;
|
|
21
|
+
export default EnableEditor;
|
|
@@ -9,7 +9,7 @@ export interface CustomFont {
|
|
|
9
9
|
export declare const getFontCss: ({ customFonts }: {
|
|
10
10
|
customFonts?: CustomFont[] | undefined;
|
|
11
11
|
}) => string;
|
|
12
|
-
export declare const getCss: ({ cssCode, contentId
|
|
12
|
+
export declare const getCss: ({ cssCode, contentId }: {
|
|
13
13
|
cssCode?: string | undefined;
|
|
14
14
|
contentId?: string | undefined;
|
|
15
15
|
}) => string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BuilderRenderState } from "../../context/types.js";
|
|
2
|
+
import { ContentProps } from "./content.types.js";
|
|
3
|
+
export declare const contentSetState: (props: any, state: any, newRootState: BuilderRenderState) => void;
|
|
4
|
+
export declare const ContentComponent: import("@builder.io/qwik").Component<ContentProps>;
|
|
5
|
+
export default ContentComponent;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BuilderContent } from '../../types/builder-content.js';
|
|
2
|
+
import type { Nullable } from '../../types/typescript.js';
|
|
3
|
+
import type { ContentProps } from './content.types.js';
|
|
4
|
+
export declare const getContextStateInitialValue: ({ content, data, locale }: Pick<ContentProps, 'content' | 'data' | 'locale'>) => {
|
|
5
|
+
[x: string]: unknown;
|
|
6
|
+
};
|
|
7
|
+
export declare const getContentInitialValue: ({ content, data }: Pick<ContentProps, 'content' | 'data'>) => Nullable<BuilderContent>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { BuilderRenderState } from '../../context/types';
|
|
2
|
-
import type { EnforcePartials } from '../../types/enforced-partials';
|
|
3
|
-
import type {
|
|
1
|
+
import type { BuilderRenderState } from '../../context/types.js';
|
|
2
|
+
import type { EnforcePartials } from '../../types/enforced-partials.js';
|
|
3
|
+
import type { ContentVariantsProps } from '../content-variants/content-variants.types.js';
|
|
4
4
|
interface InternalRenderProps {
|
|
5
5
|
/**
|
|
6
6
|
* TO-DO: improve qwik generator to not remap this name for non-HTML tags, then name it `className`
|
|
@@ -9,7 +9,7 @@ interface InternalRenderProps {
|
|
|
9
9
|
showContent: boolean;
|
|
10
10
|
isSsrAbTest: boolean;
|
|
11
11
|
}
|
|
12
|
-
export type
|
|
12
|
+
export type ContentProps = InternalRenderProps & EnforcePartials<ContentVariantsProps>;
|
|
13
13
|
export interface BuilderComponentStateChange {
|
|
14
14
|
state: BuilderRenderState;
|
|
15
15
|
ref: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './content';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ContentVariantsProps } from "./content-variants.types.js";
|
|
2
|
+
type VariantsProviderProps = ContentVariantsProps & {
|
|
3
|
+
/**
|
|
4
|
+
* For internal use only. Do not provide this prop.
|
|
5
|
+
*/
|
|
6
|
+
__isNestedRender?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const ContentVariants: import("@builder.io/qwik").Component<VariantsProviderProps>;
|
|
9
|
+
export default ContentVariants;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { BuilderRenderContext, RegisteredComponent } from '../../context/types';
|
|
2
|
-
import type { ApiVersion } from '../../types/api-version';
|
|
3
|
-
import type { BuilderContent } from '../../types/builder-content';
|
|
4
|
-
import type { Nullable } from '../../types/typescript';
|
|
5
|
-
export interface
|
|
1
|
+
import type { BuilderRenderContext, RegisteredComponent } from '../../context/types.js';
|
|
2
|
+
import type { ApiVersion } from '../../types/api-version.js';
|
|
3
|
+
import type { BuilderContent } from '../../types/builder-content.js';
|
|
4
|
+
import type { Nullable } from '../../types/typescript.js';
|
|
5
|
+
export interface ContentVariantsProps {
|
|
6
6
|
content?: Nullable<BuilderContent>;
|
|
7
7
|
model?: string;
|
|
8
8
|
data?: {
|
package/types/{components/render-content-variants → src/components/content-variants}/helpers.d.ts
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { Nullable } from '../../helpers/nullable';
|
|
2
|
-
import type { BuilderContent } from '../../types/builder-content';
|
|
1
|
+
import type { Nullable } from '../../helpers/nullable.js';
|
|
2
|
+
import type { BuilderContent } from '../../types/builder-content.js';
|
|
3
3
|
export declare const getVariants: (content: Nullable<BuilderContent>) => {
|
|
4
4
|
testVariationId: string | undefined;
|
|
5
5
|
id: string | undefined;
|
|
6
6
|
data?: {
|
|
7
7
|
[key: string]: any;
|
|
8
8
|
title?: string | undefined;
|
|
9
|
-
blocks?: import("../../types/builder-block").BuilderBlock[] | undefined;
|
|
10
|
-
inputs?: import("../../types/input").Input[] | undefined;
|
|
9
|
+
blocks?: import("../../types/builder-block.js").BuilderBlock[] | undefined;
|
|
10
|
+
inputs?: import("../../types/input.js").Input[] | undefined;
|
|
11
11
|
state?: {
|
|
12
12
|
[key: string]: any;
|
|
13
13
|
} | undefined;
|
|
@@ -21,10 +21,10 @@ export declare const getVariants: (content: Nullable<BuilderContent>) => {
|
|
|
21
21
|
testRatio?: number | undefined;
|
|
22
22
|
meta?: {
|
|
23
23
|
[key: string]: any;
|
|
24
|
-
breakpoints?: import("../../types/typescript").Nullable<import("../../types/builder-content").Breakpoints>;
|
|
24
|
+
breakpoints?: import("../../types/typescript.js").Nullable<import("../../types/builder-content.js").Breakpoints>;
|
|
25
25
|
} | undefined;
|
|
26
26
|
}[];
|
|
27
|
-
export declare const checkShouldRunVariants: ({ canTrack, content
|
|
27
|
+
export declare const checkShouldRunVariants: ({ canTrack, content }: {
|
|
28
28
|
canTrack: Nullable<boolean>;
|
|
29
29
|
content: Nullable<BuilderContent>;
|
|
30
30
|
}) => boolean;
|
|
@@ -34,7 +34,7 @@ type VariantData = {
|
|
|
34
34
|
};
|
|
35
35
|
export declare const getScriptString: () => string;
|
|
36
36
|
export declare const getVariantsScriptString: (variants: VariantData[], contentId: string) => string;
|
|
37
|
-
export declare const getRenderContentScriptString: ({ contentId, variationId
|
|
37
|
+
export declare const getRenderContentScriptString: ({ contentId, variationId }: {
|
|
38
38
|
variationId: string;
|
|
39
39
|
contentId: string;
|
|
40
40
|
}) => string;
|
|
@@ -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,13 @@
|
|
|
1
|
+
export type SizeName = 'large' | 'medium' | 'small';
|
|
2
|
+
interface Size {
|
|
3
|
+
min: number;
|
|
4
|
+
default: number;
|
|
5
|
+
max: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const getMaxWidthQueryForSize: (size: SizeName, sizeValues?: Record<SizeName, Size>) => string;
|
|
8
|
+
interface Breakpoints {
|
|
9
|
+
small?: number;
|
|
10
|
+
medium?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare const getSizesForBreakpoints: ({ small, medium }: Breakpoints) => Record<SizeName, Size>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SDK_VERSION = "UNKNOWN_VERSION";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { BuilderContent } from '../types/builder-content.js';
|
|
2
|
+
import type { ComponentInfo } from '../types/components.js';
|
|
3
|
+
import type { Dictionary, Nullable } from '../types/typescript.js';
|
|
4
|
+
import type { ApiVersion } from '../types/api-version.js';
|
|
5
|
+
export type RegisteredComponent = ComponentInfo & {
|
|
6
|
+
component: any;
|
|
7
|
+
};
|
|
8
|
+
export type RegisteredComponents = Dictionary<RegisteredComponent>;
|
|
9
|
+
export type BuilderRenderState = Record<string, unknown>;
|
|
10
|
+
export type BuilderRenderContext = Record<string, unknown>;
|
|
11
|
+
export interface BuilderContextInterface {
|
|
12
|
+
content: Nullable<BuilderContent>;
|
|
13
|
+
context: BuilderRenderContext;
|
|
14
|
+
/**
|
|
15
|
+
* The state of the application.
|
|
16
|
+
*
|
|
17
|
+
* NOTE: see `localState` below to understand how it is different from `rootState`.
|
|
18
|
+
*/
|
|
19
|
+
rootState: BuilderRenderState;
|
|
20
|
+
/**
|
|
21
|
+
* Some frameworks have a `setState` function which needs to be invoked to notify
|
|
22
|
+
* the framework of state change. (other frameworks don't in which case it is `undefined')
|
|
23
|
+
*/
|
|
24
|
+
rootSetState: ((rootState: BuilderRenderState) => void) | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* The local state of the current component. This is different from `rootState` in that
|
|
27
|
+
* it can be a child state created by a repeater containing local state.
|
|
28
|
+
* The `rootState` is where all of the state mutations are actually stored.
|
|
29
|
+
*/
|
|
30
|
+
localState: BuilderRenderState | undefined;
|
|
31
|
+
apiKey: string | null;
|
|
32
|
+
apiVersion: ApiVersion | undefined;
|
|
33
|
+
componentInfos: Dictionary<ComponentInfo>;
|
|
34
|
+
inheritedStyles: Record<string, unknown>;
|
|
35
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type Patch = {
|
|
2
|
+
path: string;
|
|
3
|
+
op: 'add' | 'remove' | 'replace';
|
|
4
|
+
value: any;
|
|
5
|
+
};
|
|
6
|
+
export declare const applyPatchWithMinimalMutationChain: <T extends object>(obj: T, patch: {
|
|
7
|
+
path: string;
|
|
8
|
+
op: 'add' | 'remove' | 'replace';
|
|
9
|
+
value: any;
|
|
10
|
+
}, preserveRoot?: boolean) => T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const camelToKebabCase: (string: string) => string;
|