@builder.io/sdk-svelte 0.11.2 → 0.11.3
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/browser/blocks/button/button.svelte +0 -5
- package/lib/browser/blocks/button/button.svelte.d.ts +20 -0
- package/lib/browser/blocks/button/button.types.d.ts +6 -0
- package/lib/browser/blocks/button/button.types.js +1 -0
- package/lib/browser/blocks/columns/columns.svelte.d.ts +2 -14
- package/lib/browser/blocks/columns/columns.types.d.ts +15 -0
- package/lib/browser/blocks/columns/columns.types.js +1 -0
- package/lib/browser/blocks/fragment/fragment.svelte +0 -2
- package/lib/browser/blocks/fragment/fragment.svelte.d.ts +17 -0
- package/lib/browser/blocks/fragment/fragment.types.d.ts +5 -0
- package/lib/browser/blocks/fragment/fragment.types.js +1 -0
- package/lib/browser/blocks/image/image.svelte +0 -2
- package/lib/browser/blocks/image/image.svelte.d.ts +30 -0
- package/lib/browser/blocks/image/image.types.d.ts +19 -0
- package/lib/browser/blocks/image/image.types.js +1 -0
- package/lib/browser/blocks/section/section.svelte +0 -5
- package/lib/browser/blocks/section/section.svelte.d.ts +20 -0
- package/lib/browser/blocks/section/section.types.d.ts +6 -0
- package/lib/browser/blocks/section/section.types.js +1 -0
- package/lib/browser/blocks/symbol/symbol.svelte +0 -5
- package/lib/browser/blocks/symbol/symbol.svelte.d.ts +23 -0
- package/lib/browser/blocks/symbol/symbol.types.d.ts +18 -0
- package/lib/browser/blocks/symbol/symbol.types.js +1 -0
- package/lib/browser/blocks/text/text.svelte +0 -2
- package/lib/browser/blocks/text/text.svelte.d.ts +17 -0
- package/lib/browser/blocks/text/text.types.d.ts +3 -0
- package/lib/browser/blocks/text/text.types.js +1 -0
- package/lib/browser/blocks/video/video.svelte +0 -2
- package/lib/browser/blocks/video/video.svelte.d.ts +33 -0
- package/lib/browser/blocks/video/video.types.d.ts +21 -0
- package/lib/browser/blocks/video/video.types.js +1 -0
- package/lib/browser/components/block/block.svelte +3 -5
- package/lib/browser/components/block/components/component-ref/component-ref.svelte +1 -6
- package/lib/browser/components/blocks/blocks.svelte +1 -10
- package/lib/browser/components/blocks/blocks.svelte.d.ts +22 -0
- package/lib/browser/components/blocks/blocks.types.d.ts +8 -0
- package/lib/browser/components/blocks/blocks.types.js +1 -0
- package/lib/browser/components/content-variants/content-variants.types.d.ts +30 -1
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/constants/sdk-version.js +1 -1
- package/lib/browser/functions/get-content/index.d.ts +1 -1
- package/lib/browser/functions/get-content/index.js +1 -1
- package/lib/browser/functions/get-content/types.d.ts +2 -2
- package/lib/browser/server-index.d.ts +10 -1
- package/lib/edge/blocks/button/button.svelte +0 -5
- package/lib/edge/blocks/button/button.svelte.d.ts +20 -0
- package/lib/edge/blocks/button/button.types.d.ts +6 -0
- package/lib/edge/blocks/button/button.types.js +1 -0
- package/lib/edge/blocks/columns/columns.svelte.d.ts +2 -14
- package/lib/edge/blocks/columns/columns.types.d.ts +15 -0
- package/lib/edge/blocks/columns/columns.types.js +1 -0
- package/lib/edge/blocks/fragment/fragment.svelte +0 -2
- package/lib/edge/blocks/fragment/fragment.svelte.d.ts +17 -0
- package/lib/edge/blocks/fragment/fragment.types.d.ts +5 -0
- package/lib/edge/blocks/fragment/fragment.types.js +1 -0
- package/lib/edge/blocks/image/image.svelte +0 -2
- package/lib/edge/blocks/image/image.svelte.d.ts +30 -0
- package/lib/edge/blocks/image/image.types.d.ts +19 -0
- package/lib/edge/blocks/image/image.types.js +1 -0
- package/lib/edge/blocks/section/section.svelte +0 -5
- package/lib/edge/blocks/section/section.svelte.d.ts +20 -0
- package/lib/edge/blocks/section/section.types.d.ts +6 -0
- package/lib/edge/blocks/section/section.types.js +1 -0
- package/lib/edge/blocks/symbol/symbol.svelte +0 -5
- package/lib/edge/blocks/symbol/symbol.svelte.d.ts +23 -0
- package/lib/edge/blocks/symbol/symbol.types.d.ts +18 -0
- package/lib/edge/blocks/symbol/symbol.types.js +1 -0
- package/lib/edge/blocks/text/text.svelte +0 -2
- package/lib/edge/blocks/text/text.svelte.d.ts +17 -0
- package/lib/edge/blocks/text/text.types.d.ts +3 -0
- package/lib/edge/blocks/text/text.types.js +1 -0
- package/lib/edge/blocks/video/video.svelte +0 -2
- package/lib/edge/blocks/video/video.svelte.d.ts +33 -0
- package/lib/edge/blocks/video/video.types.d.ts +21 -0
- package/lib/edge/blocks/video/video.types.js +1 -0
- package/lib/edge/components/block/block.svelte +3 -5
- package/lib/edge/components/block/components/component-ref/component-ref.svelte +1 -6
- package/lib/edge/components/blocks/blocks.svelte +1 -10
- package/lib/edge/components/blocks/blocks.svelte.d.ts +22 -0
- package/lib/edge/components/blocks/blocks.types.d.ts +8 -0
- package/lib/edge/components/blocks/blocks.types.js +1 -0
- package/lib/edge/components/content-variants/content-variants.types.d.ts +30 -1
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/constants/sdk-version.js +1 -1
- package/lib/edge/functions/get-content/index.d.ts +1 -1
- package/lib/edge/functions/get-content/index.js +1 -1
- package/lib/edge/functions/get-content/types.d.ts +2 -2
- package/lib/edge/server-index.d.ts +10 -1
- package/lib/node/blocks/button/button.svelte +0 -5
- package/lib/node/blocks/button/button.svelte.d.ts +20 -0
- package/lib/node/blocks/button/button.types.d.ts +6 -0
- package/lib/node/blocks/button/button.types.js +1 -0
- package/lib/node/blocks/columns/columns.svelte.d.ts +2 -14
- package/lib/node/blocks/columns/columns.types.d.ts +15 -0
- package/lib/node/blocks/columns/columns.types.js +1 -0
- package/lib/node/blocks/fragment/fragment.svelte +0 -2
- package/lib/node/blocks/fragment/fragment.svelte.d.ts +17 -0
- package/lib/node/blocks/fragment/fragment.types.d.ts +5 -0
- package/lib/node/blocks/fragment/fragment.types.js +1 -0
- package/lib/node/blocks/image/image.svelte +0 -2
- package/lib/node/blocks/image/image.svelte.d.ts +30 -0
- package/lib/node/blocks/image/image.types.d.ts +19 -0
- package/lib/node/blocks/image/image.types.js +1 -0
- package/lib/node/blocks/section/section.svelte +0 -5
- package/lib/node/blocks/section/section.svelte.d.ts +20 -0
- package/lib/node/blocks/section/section.types.d.ts +6 -0
- package/lib/node/blocks/section/section.types.js +1 -0
- package/lib/node/blocks/symbol/symbol.svelte +0 -5
- package/lib/node/blocks/symbol/symbol.svelte.d.ts +23 -0
- package/lib/node/blocks/symbol/symbol.types.d.ts +18 -0
- package/lib/node/blocks/symbol/symbol.types.js +1 -0
- package/lib/node/blocks/text/text.svelte +0 -2
- package/lib/node/blocks/text/text.svelte.d.ts +17 -0
- package/lib/node/blocks/text/text.types.d.ts +3 -0
- package/lib/node/blocks/text/text.types.js +1 -0
- package/lib/node/blocks/video/video.svelte +0 -2
- package/lib/node/blocks/video/video.svelte.d.ts +33 -0
- package/lib/node/blocks/video/video.types.d.ts +21 -0
- package/lib/node/blocks/video/video.types.js +1 -0
- package/lib/node/components/block/block.svelte +3 -5
- package/lib/node/components/block/components/component-ref/component-ref.svelte +1 -6
- package/lib/node/components/blocks/blocks.svelte +1 -10
- package/lib/node/components/blocks/blocks.svelte.d.ts +22 -0
- package/lib/node/components/blocks/blocks.types.d.ts +8 -0
- package/lib/node/components/blocks/blocks.types.js +1 -0
- package/lib/node/components/content-variants/content-variants.types.d.ts +30 -1
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/constants/sdk-version.js +1 -1
- package/lib/node/functions/get-content/index.d.ts +1 -1
- package/lib/node/functions/get-content/index.js +1 -1
- package/lib/node/functions/get-content/types.d.ts +2 -2
- package/lib/node/server-index.d.ts +10 -1
- package/package.json +1 -1
- package/src/blocks/button/button.svelte +1 -13
- package/src/blocks/button/button.types.ts +6 -0
- package/src/blocks/columns/columns.svelte +2 -20
- package/src/blocks/columns/columns.types.ts +14 -0
- package/src/blocks/fragment/fragment.svelte +1 -8
- package/src/blocks/fragment/fragment.types.ts +5 -0
- package/src/blocks/image/image.svelte +1 -22
- package/src/blocks/image/image.types.ts +19 -0
- package/src/blocks/section/section.svelte +1 -13
- package/src/blocks/section/section.types.ts +6 -0
- package/src/blocks/symbol/symbol.svelte +2 -31
- package/src/blocks/symbol/symbol.types.ts +17 -0
- package/src/blocks/text/text.svelte +2 -6
- package/src/blocks/text/text.types.ts +3 -0
- package/src/blocks/video/video.svelte +1 -33
- package/src/blocks/video/video.types.ts +21 -0
- package/src/components/block/block.svelte +3 -5
- package/src/components/block/components/component-ref/component-ref.svelte +1 -6
- package/src/components/blocks/blocks.svelte +2 -23
- package/src/components/blocks/blocks.types.ts +7 -0
- package/src/components/content-variants/content-variants.types.ts +43 -1
- package/src/constants/sdk-version.ts +1 -1
- package/src/functions/get-content/index.ts +1 -1
- package/src/functions/get-content/types.ts +2 -2
- package/src/server-index.ts +10 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { ButtonProps } from "./button.types.js";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
attributes?: ButtonProps["attributes"];
|
|
6
|
+
text?: ButtonProps["text"];
|
|
7
|
+
link?: ButtonProps["link"];
|
|
8
|
+
openLinkInNewTab?: ButtonProps["openLinkInNewTab"];
|
|
9
|
+
};
|
|
10
|
+
events: {
|
|
11
|
+
[evt: string]: CustomEvent<any>;
|
|
12
|
+
};
|
|
13
|
+
slots: {};
|
|
14
|
+
};
|
|
15
|
+
type ButtonProps_ = typeof __propDef.props;
|
|
16
|
+
export { ButtonProps_ as ButtonProps };
|
|
17
|
+
export type ButtonEvents = typeof __propDef.events;
|
|
18
|
+
export type ButtonSlots = typeof __propDef.slots;
|
|
19
|
+
export default class Button extends SvelteComponent<ButtonProps, ButtonEvents, ButtonSlots> {
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
type
|
|
3
|
-
|
|
4
|
-
width?: number;
|
|
5
|
-
};
|
|
6
|
-
type StackColumnsAt = "tablet" | "mobile" | "never";
|
|
7
|
-
export interface ColumnProps extends BuilderComponentsProp {
|
|
8
|
-
columns?: Column[];
|
|
9
|
-
builderBlock: BuilderBlock;
|
|
10
|
-
space?: number;
|
|
11
|
-
stackColumnsAt?: StackColumnsAt;
|
|
12
|
-
reverseColumnsWhenStacked?: boolean;
|
|
13
|
-
}
|
|
14
|
-
import type { BuilderBlock } from "../../types/builder-block.js";
|
|
15
|
-
import type { BuilderComponentsProp, PropsWithBuilderData } from "../../types/builder-props.js";
|
|
2
|
+
import type { PropsWithBuilderData } from "../../types/builder-props.js";
|
|
3
|
+
import type { ColumnProps } from "./columns.types.js";
|
|
16
4
|
declare const __propDef: {
|
|
17
5
|
props: {
|
|
18
6
|
js: any;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { BuilderBlock } from '../../types/builder-block.js';
|
|
2
|
+
import type { BuilderComponentsProp } from '../../types/builder-props.js';
|
|
3
|
+
type Column = {
|
|
4
|
+
blocks: BuilderBlock[];
|
|
5
|
+
width?: number;
|
|
6
|
+
};
|
|
7
|
+
type StackColumnsAt = 'tablet' | 'mobile' | 'never';
|
|
8
|
+
export interface ColumnProps extends BuilderComponentsProp {
|
|
9
|
+
columns?: Column[];
|
|
10
|
+
builderBlock: BuilderBlock;
|
|
11
|
+
space?: number;
|
|
12
|
+
stackColumnsAt?: StackColumnsAt;
|
|
13
|
+
reverseColumnsWhenStacked?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { FragmentProps } from "./fragment.types.js";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: Record<string, never>;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
type FragmentProps_ = typeof __propDef.props;
|
|
13
|
+
export { FragmentProps_ as FragmentProps };
|
|
14
|
+
export type FragmentEvents = typeof __propDef.events;
|
|
15
|
+
export type FragmentSlots = typeof __propDef.slots;
|
|
16
|
+
export default class Fragment extends SvelteComponent<FragmentProps, FragmentEvents, FragmentSlots> {
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { ImageProps } from "./image.types.js";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
image: ImageProps["image"];
|
|
6
|
+
src?: ImageProps["src"];
|
|
7
|
+
srcset?: ImageProps["srcset"];
|
|
8
|
+
noWebp?: ImageProps["noWebp"];
|
|
9
|
+
aspectRatio?: ImageProps["aspectRatio"];
|
|
10
|
+
altText?: ImageProps["altText"];
|
|
11
|
+
backgroundPosition?: ImageProps["backgroundPosition"];
|
|
12
|
+
backgroundSize?: ImageProps["backgroundSize"];
|
|
13
|
+
className?: ImageProps["className"];
|
|
14
|
+
sizes?: ImageProps["sizes"];
|
|
15
|
+
builderBlock?: ImageProps["builderBlock"];
|
|
16
|
+
fitContent?: ImageProps["fitContent"];
|
|
17
|
+
};
|
|
18
|
+
events: {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
};
|
|
21
|
+
slots: {
|
|
22
|
+
default: {};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
type ImageProps_ = typeof __propDef.props;
|
|
26
|
+
export { ImageProps_ as ImageProps };
|
|
27
|
+
export type ImageEvents = typeof __propDef.events;
|
|
28
|
+
export type ImageSlots = typeof __propDef.slots;
|
|
29
|
+
export default class Image extends SvelteComponent<ImageProps, ImageEvents, ImageSlots> {
|
|
30
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { BuilderBlock } from '../../types/builder-block.js';
|
|
2
|
+
export interface ImageProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
image: string;
|
|
5
|
+
sizes?: string;
|
|
6
|
+
lazy?: boolean;
|
|
7
|
+
height?: number;
|
|
8
|
+
width?: number;
|
|
9
|
+
altText?: string;
|
|
10
|
+
backgroundSize?: 'cover' | 'contain';
|
|
11
|
+
backgroundPosition?: string;
|
|
12
|
+
srcset?: string;
|
|
13
|
+
aspectRatio?: number;
|
|
14
|
+
children?: any;
|
|
15
|
+
fitContent?: boolean;
|
|
16
|
+
builderBlock?: BuilderBlock;
|
|
17
|
+
noWebp?: boolean;
|
|
18
|
+
src?: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { SectionProps } from "./section.types.js";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
attributes?: SectionProps["attributes"];
|
|
6
|
+
maxWidth?: SectionProps["maxWidth"];
|
|
7
|
+
};
|
|
8
|
+
events: {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {
|
|
12
|
+
default: {};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
type SectionProps_ = typeof __propDef.props;
|
|
16
|
+
export { SectionProps_ as SectionProps };
|
|
17
|
+
export type SectionEvents = typeof __propDef.events;
|
|
18
|
+
export type SectionSlots = typeof __propDef.slots;
|
|
19
|
+
export default class Section extends SvelteComponent<SectionProps, SectionEvents, SectionSlots> {
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
<script context="module">/**
|
|
2
|
-
* This import is used by the Svelte SDK. Do not remove.
|
|
3
|
-
*/
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
1
|
<script>import { onMount } from "svelte";
|
|
7
2
|
import ContentVariants from "../../components/content-variants/content-variants.svelte";
|
|
8
3
|
import { filterAttrs } from "../helpers.js";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { PropsWithBuilderData } from "../../types/builder-props.js";
|
|
3
|
+
import type { SymbolProps } from "./symbol.types.js";
|
|
4
|
+
declare const __propDef: {
|
|
5
|
+
props: {
|
|
6
|
+
js: any;
|
|
7
|
+
attributes?: PropsWithBuilderData<SymbolProps>["attributes"];
|
|
8
|
+
symbol?: PropsWithBuilderData<SymbolProps>["symbol"];
|
|
9
|
+
dynamic?: PropsWithBuilderData<SymbolProps>["dynamic"];
|
|
10
|
+
builderContext: PropsWithBuilderData<SymbolProps>["builderContext"];
|
|
11
|
+
builderComponents: PropsWithBuilderData<SymbolProps>["builderComponents"];
|
|
12
|
+
};
|
|
13
|
+
events: {
|
|
14
|
+
[evt: string]: CustomEvent<any>;
|
|
15
|
+
};
|
|
16
|
+
slots: {};
|
|
17
|
+
};
|
|
18
|
+
type SymbolProps_ = typeof __propDef.props;
|
|
19
|
+
export { SymbolProps_ as SymbolProps };
|
|
20
|
+
export type SymbolEvents = typeof __propDef.events;
|
|
21
|
+
export type SymbolSlots = typeof __propDef.slots;
|
|
22
|
+
export default class Symbol extends SvelteComponent<SymbolProps, SymbolEvents, SymbolSlots> {
|
|
23
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { BuilderContent } from '../../types/builder-content.js';
|
|
2
|
+
import type { BuilderComponentsProp } from '../../types/builder-props.js';
|
|
3
|
+
interface SymbolInfo {
|
|
4
|
+
model?: string;
|
|
5
|
+
entry?: string;
|
|
6
|
+
data?: any;
|
|
7
|
+
content?: BuilderContent;
|
|
8
|
+
inline?: boolean;
|
|
9
|
+
dynamic?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface SymbolProps extends BuilderComponentsProp {
|
|
12
|
+
symbol?: SymbolInfo;
|
|
13
|
+
dataOnly?: boolean;
|
|
14
|
+
dynamic?: boolean;
|
|
15
|
+
attributes?: any;
|
|
16
|
+
inheritState?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { TextProps } from "./text.types.js";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
text?: TextProps["text"];
|
|
6
|
+
};
|
|
7
|
+
events: {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
};
|
|
10
|
+
slots: {};
|
|
11
|
+
};
|
|
12
|
+
type TextProps_ = typeof __propDef.props;
|
|
13
|
+
export { TextProps_ as TextProps };
|
|
14
|
+
export type TextEvents = typeof __propDef.events;
|
|
15
|
+
export type TextSlots = typeof __propDef.slots;
|
|
16
|
+
export default class Text extends SvelteComponent<TextProps, TextEvents, TextSlots> {
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { VideoProps } from "./video.types.js";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
autoPlay?: VideoProps["autoPlay"];
|
|
6
|
+
muted?: VideoProps["muted"];
|
|
7
|
+
controls?: VideoProps["controls"];
|
|
8
|
+
loop?: VideoProps["loop"];
|
|
9
|
+
playsInline?: VideoProps["playsInline"];
|
|
10
|
+
preload?: VideoProps["preload"];
|
|
11
|
+
attributes?: VideoProps["attributes"];
|
|
12
|
+
fit?: VideoProps["fit"];
|
|
13
|
+
position?: VideoProps["position"];
|
|
14
|
+
aspectRatio?: VideoProps["aspectRatio"];
|
|
15
|
+
video?: VideoProps["video"];
|
|
16
|
+
posterImage?: VideoProps["posterImage"];
|
|
17
|
+
lazyLoad?: VideoProps["lazyLoad"];
|
|
18
|
+
fitContent?: VideoProps["fitContent"];
|
|
19
|
+
builderBlock?: VideoProps["builderBlock"];
|
|
20
|
+
};
|
|
21
|
+
events: {
|
|
22
|
+
[evt: string]: CustomEvent<any>;
|
|
23
|
+
};
|
|
24
|
+
slots: {
|
|
25
|
+
default: {};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
type VideoProps_ = typeof __propDef.props;
|
|
29
|
+
export { VideoProps_ as VideoProps };
|
|
30
|
+
export type VideoEvents = typeof __propDef.events;
|
|
31
|
+
export type VideoSlots = typeof __propDef.slots;
|
|
32
|
+
export default class Video extends SvelteComponent<VideoProps, VideoEvents, VideoSlots> {
|
|
33
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { BuilderBlock } from '../../types/builder-block.js';
|
|
2
|
+
export interface VideoProps {
|
|
3
|
+
attributes?: any;
|
|
4
|
+
video?: string;
|
|
5
|
+
autoPlay?: boolean;
|
|
6
|
+
controls?: boolean;
|
|
7
|
+
muted?: boolean;
|
|
8
|
+
loop?: boolean;
|
|
9
|
+
playsInline?: boolean;
|
|
10
|
+
aspectRatio?: number;
|
|
11
|
+
width?: number;
|
|
12
|
+
height?: number;
|
|
13
|
+
fit?: 'contain' | 'cover' | 'fill';
|
|
14
|
+
preload?: 'auto' | 'metadata' | 'none';
|
|
15
|
+
position?: 'center' | 'top' | 'left' | 'right' | 'bottom' | 'top left' | 'top right' | 'bottom left' | 'bottom right';
|
|
16
|
+
posterImage?: string;
|
|
17
|
+
lazyLoad?: boolean;
|
|
18
|
+
children?: any;
|
|
19
|
+
fitContent?: boolean;
|
|
20
|
+
builderBlock?: BuilderBlock;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -88,6 +88,8 @@ let childrenContext = writable($context);
|
|
|
88
88
|
</script>
|
|
89
89
|
|
|
90
90
|
{#if canShowBlock()}
|
|
91
|
+
<BlockStyles {block} context={$context} />
|
|
92
|
+
|
|
91
93
|
{#if !blockComponent?.()?.noWrap}
|
|
92
94
|
{#if isEmptyHtmlElement(Tag())}
|
|
93
95
|
<BlockWrapper
|
|
@@ -126,17 +128,13 @@ let childrenContext = writable($context);
|
|
|
126
128
|
isInteractive={componentRefProps().isInteractive}
|
|
127
129
|
/>
|
|
128
130
|
|
|
129
|
-
{#each childrenWithoutParentComponent() as child (
|
|
131
|
+
{#each childrenWithoutParentComponent() as child (child.id)}
|
|
130
132
|
<svelte:self
|
|
131
133
|
block={child}
|
|
132
134
|
context={childrenContext}
|
|
133
135
|
{registeredComponents}
|
|
134
136
|
/>
|
|
135
137
|
{/each}
|
|
136
|
-
|
|
137
|
-
{#each childrenWithoutParentComponent() as child ("block-style-" + child.id)}
|
|
138
|
-
<BlockStyles block={child} context={$childrenContext} />
|
|
139
|
-
{/each}
|
|
140
138
|
</BlockWrapper>
|
|
141
139
|
{/if}
|
|
142
140
|
{:else}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script>import "../../../content/wrap-component-ref.js";
|
|
2
2
|
import Block from "../../block.svelte";
|
|
3
|
-
import BlockStyles from "../block-styles.svelte";
|
|
4
3
|
import InteractiveElement from "../interactive-element.svelte";
|
|
5
4
|
import { getWrapperProps } from "./component-ref.helpers.js";
|
|
6
5
|
export let isInteractive;
|
|
@@ -27,12 +26,8 @@ let Wrapper = isInteractive ? InteractiveElement : componentRef;
|
|
|
27
26
|
contextValue: $context,
|
|
28
27
|
})}
|
|
29
28
|
>
|
|
30
|
-
{#each blockChildren as child (
|
|
29
|
+
{#each blockChildren as child (child.id)}
|
|
31
30
|
<Block block={child} {context} {registeredComponents} />
|
|
32
31
|
{/each}
|
|
33
|
-
|
|
34
|
-
{#each blockChildren as child ("block-style-" + child.id)}
|
|
35
|
-
<BlockStyles block={child} context={$context} />
|
|
36
|
-
{/each}
|
|
37
32
|
</svelte:component>
|
|
38
33
|
{/if}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
<script context="module"></script>
|
|
2
|
-
|
|
3
1
|
<script>import { getContext } from "svelte";
|
|
4
2
|
import BuilderContext from "../../context/builder.context.js";
|
|
5
3
|
import ComponentsContext from "../../context/components.context.js";
|
|
6
4
|
import Block from "../block/block.svelte";
|
|
7
|
-
import BlockStyles from "../block/components/block-styles.svelte";
|
|
8
5
|
import BlocksWrapper from "./blocks-wrapper.svelte";
|
|
9
6
|
export let blocks;
|
|
10
7
|
export let parent;
|
|
@@ -25,7 +22,7 @@ let componentsContext = getContext(ComponentsContext.key);
|
|
|
25
22
|
BlocksWrapperProps={$context?.BlocksWrapperProps}
|
|
26
23
|
>
|
|
27
24
|
{#if blocks}
|
|
28
|
-
{#each blocks as block (
|
|
25
|
+
{#each blocks as block (block.id)}
|
|
29
26
|
<Block
|
|
30
27
|
{block}
|
|
31
28
|
context={context || builderContext}
|
|
@@ -34,10 +31,4 @@ let componentsContext = getContext(ComponentsContext.key);
|
|
|
34
31
|
/>
|
|
35
32
|
{/each}
|
|
36
33
|
{/if}
|
|
37
|
-
|
|
38
|
-
{#if blocks}
|
|
39
|
-
{#each blocks as block ("block-style-" + block.id)}
|
|
40
|
-
<BlockStyles {block} context={$context || $builderContext} />
|
|
41
|
-
{/each}
|
|
42
|
-
{/if}
|
|
43
34
|
</BlocksWrapper>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { BlocksProps } from "./blocks.types.js";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
blocks: BlocksProps["blocks"];
|
|
6
|
+
parent: BlocksProps["parent"];
|
|
7
|
+
path: BlocksProps["path"];
|
|
8
|
+
styleProp: BlocksProps["styleProp"];
|
|
9
|
+
context?: BlocksProps["context"];
|
|
10
|
+
registeredComponents?: BlocksProps["registeredComponents"];
|
|
11
|
+
};
|
|
12
|
+
events: {
|
|
13
|
+
[evt: string]: CustomEvent<any>;
|
|
14
|
+
};
|
|
15
|
+
slots: {};
|
|
16
|
+
};
|
|
17
|
+
type BlocksProps_ = typeof __propDef.props;
|
|
18
|
+
export { BlocksProps_ as BlocksProps };
|
|
19
|
+
export type BlocksEvents = typeof __propDef.events;
|
|
20
|
+
export type BlocksSlots = typeof __propDef.slots;
|
|
21
|
+
export default class Blocks extends SvelteComponent<BlocksProps, BlocksEvents, BlocksSlots> {
|
|
22
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="svelte" />
|
|
2
|
+
import type { Writable } from "svelte/store";
|
|
3
|
+
import type { BuilderContextInterface, RegisteredComponents } from '../../context/types.js';
|
|
4
|
+
import type { BlocksWrapperProps } from './blocks-wrapper.svelte';
|
|
5
|
+
export type BlocksProps = Partial<Omit<BlocksWrapperProps, 'BlocksWrapper' | 'BlocksWrapperProps'>> & {
|
|
6
|
+
context?: Writable<BuilderContextInterface>;
|
|
7
|
+
registeredComponents?: RegisteredComponents;
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,19 +3,48 @@ import type { ApiVersion } from '../../types/api-version.js';
|
|
|
3
3
|
import type { BuilderContent } from '../../types/builder-content.js';
|
|
4
4
|
import type { Nullable } from '../../types/typescript.js';
|
|
5
5
|
export interface ContentVariantsPrps {
|
|
6
|
+
/**
|
|
7
|
+
* The Builder content JSON to render (required).
|
|
8
|
+
*/
|
|
6
9
|
content?: Nullable<BuilderContent>;
|
|
10
|
+
/**
|
|
11
|
+
* The Builder content `model` to render (required).
|
|
12
|
+
*/
|
|
7
13
|
model?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Additional data to inject into your Builder content (optional).
|
|
16
|
+
*/
|
|
8
17
|
data?: {
|
|
9
18
|
[key: string]: any;
|
|
10
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
11
23
|
context?: BuilderRenderContext;
|
|
24
|
+
/**
|
|
25
|
+
* Your API Key: needed to dynamically fetch symbols (required).
|
|
26
|
+
*/
|
|
12
27
|
apiKey: string;
|
|
13
28
|
apiVersion?: ApiVersion;
|
|
29
|
+
/**
|
|
30
|
+
* An array of custom components to register (optional).
|
|
31
|
+
*/
|
|
14
32
|
customComponents?: RegisteredComponent[];
|
|
33
|
+
/**
|
|
34
|
+
* A boolean to enable or disable tracking (optional). Defaults to `true`.
|
|
35
|
+
*/
|
|
15
36
|
canTrack?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* If provided, the API will auto-resolve localized objects to the value of this `locale` key (optional).
|
|
39
|
+
*/
|
|
16
40
|
locale?: string;
|
|
17
|
-
/** @deprecated use `enrich` instead
|
|
41
|
+
/** @deprecated use `enrich` instead */
|
|
18
42
|
includeRefs?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* A boolean to enable or disable enriching API content (optional).
|
|
45
|
+
*
|
|
46
|
+
* Enriching will Include multilevel references in the response. Defaults to `false`.
|
|
47
|
+
*/
|
|
19
48
|
enrich?: boolean;
|
|
20
49
|
/**
|
|
21
50
|
* The element that wraps your content. Defaults to `div` ('ScrollView' in React Native).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.11.
|
|
1
|
+
export declare const SDK_VERSION = "0.11.3";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.11.
|
|
1
|
+
export const SDK_VERSION = "0.11.3";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BuilderContent } from '../../types/builder-content.js';
|
|
2
2
|
import type { GetContentOptions } from './types.js';
|
|
3
3
|
/**
|
|
4
|
-
* Returns
|
|
4
|
+
* Returns the first content entry that matches the given options.
|
|
5
5
|
*/
|
|
6
6
|
export declare function fetchOneEntry(options: GetContentOptions): Promise<BuilderContent | null>;
|
|
7
7
|
/**
|
|
@@ -8,7 +8,7 @@ import { isBrowser } from '../is-browser.js';
|
|
|
8
8
|
import { generateContentUrl } from './generate-content-url.js';
|
|
9
9
|
const checkContentHasResults = (content) => 'results' in content;
|
|
10
10
|
/**
|
|
11
|
-
* Returns
|
|
11
|
+
* Returns the first content entry that matches the given options.
|
|
12
12
|
*/
|
|
13
13
|
export async function fetchOneEntry(options) {
|
|
14
14
|
const allContent = await fetchEntries({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export interface GetContentOptions {
|
|
2
|
-
/** The model to get content for */
|
|
2
|
+
/** The model to get content for (required) */
|
|
3
3
|
model: string;
|
|
4
|
-
/** Your public API key */
|
|
4
|
+
/** Your public API key (required) */
|
|
5
5
|
apiKey: string;
|
|
6
6
|
/** Number of items to fetch. Default is 1 */
|
|
7
7
|
limit?: number;
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
export * from './index-helpers/top-of-file.js';
|
|
2
|
+
export type { ButtonProps } from './blocks/button/button.types.js';
|
|
3
|
+
export type { ColumnProps } from './blocks/columns/columns.types.js';
|
|
4
|
+
export type { FragmentProps } from './blocks/fragment/fragment.types.js';
|
|
5
|
+
export type { ImageProps } from './blocks/image/image.types.js';
|
|
6
|
+
export type { SectionProps } from './blocks/section/section.types.js';
|
|
7
|
+
export type { SymbolProps } from './blocks/symbol/symbol.types.js';
|
|
8
|
+
export type { TextProps } from './blocks/text/text.types.js';
|
|
9
|
+
export type { VideoProps } from './blocks/video/video.types.js';
|
|
10
|
+
export type { BlocksProps } from './components/blocks/blocks.types.js';
|
|
11
|
+
export type { ContentVariantsPrps as ContentProps } from './components/content-variants/content-variants.types.js';
|
|
2
12
|
export { isEditing } from './functions/is-editing.js';
|
|
3
13
|
export { isPreviewing } from './functions/is-previewing.js';
|
|
4
14
|
export { createRegisterComponentMessage } from './functions/register-component.js';
|
|
@@ -9,7 +19,6 @@ export type { Settings } from './functions/set-editor-settings.js';
|
|
|
9
19
|
export { _processContentResult, fetchEntries, fetchOneEntry, getAllContent, getContent } from './functions/get-content/index.js';
|
|
10
20
|
export { getBuilderSearchParams } from './functions/get-builder-search-params/index.js';
|
|
11
21
|
export { track } from './functions/track/index.js';
|
|
12
|
-
export type { ContentProps } from './components/content/content.types.js';
|
|
13
22
|
export type { RegisteredComponent } from './context/types.js';
|
|
14
23
|
export type { ComponentInfo } from './types/components.js';
|
|
15
24
|
export { fetchBuilderProps } from './functions/fetch-builder-props.js';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { ButtonProps } from "./button.types.js";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
attributes?: ButtonProps["attributes"];
|
|
6
|
+
text?: ButtonProps["text"];
|
|
7
|
+
link?: ButtonProps["link"];
|
|
8
|
+
openLinkInNewTab?: ButtonProps["openLinkInNewTab"];
|
|
9
|
+
};
|
|
10
|
+
events: {
|
|
11
|
+
[evt: string]: CustomEvent<any>;
|
|
12
|
+
};
|
|
13
|
+
slots: {};
|
|
14
|
+
};
|
|
15
|
+
type ButtonProps_ = typeof __propDef.props;
|
|
16
|
+
export { ButtonProps_ as ButtonProps };
|
|
17
|
+
export type ButtonEvents = typeof __propDef.events;
|
|
18
|
+
export type ButtonSlots = typeof __propDef.slots;
|
|
19
|
+
export default class Button extends SvelteComponent<ButtonProps, ButtonEvents, ButtonSlots> {
|
|
20
|
+
}
|