@builder.io/sdk-svelte 0.13.2 → 0.13.4
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/columns/columns.svelte +0 -1
- package/lib/browser/blocks/columns/columns.svelte.d.ts +8 -10
- package/lib/browser/blocks/columns/columns.types.d.ts +2 -2
- package/lib/browser/blocks/slot/slot.svelte.d.ts +3 -3
- package/lib/browser/blocks/symbol/symbol.svelte +0 -1
- package/lib/browser/blocks/symbol/symbol.svelte.d.ts +7 -9
- package/lib/browser/blocks/symbol/symbol.types.d.ts +2 -2
- package/lib/browser/blocks/video/component-info.js +1 -1
- package/lib/browser/components/block/components/block-wrapper.svelte.d.ts +4 -4
- package/lib/browser/components/block/components/component-ref/component-ref.helpers.d.ts +3 -3
- package/lib/browser/components/content/content.types.d.ts +1 -8
- package/lib/browser/components/content/contentProps.types.d.ts +12 -0
- package/lib/browser/components/content/contentProps.types.js +1 -0
- package/lib/browser/components/dynamic-renderer/dynamic-renderer.svelte +2 -0
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/constants/sdk-version.js +1 -1
- package/lib/browser/types/builder-props.d.ts +1 -1
- package/lib/browser/types/input.d.ts +1 -0
- package/lib/browser/types/typescript.d.ts +0 -3
- package/lib/edge/blocks/columns/columns.svelte +0 -1
- package/lib/edge/blocks/columns/columns.svelte.d.ts +8 -10
- package/lib/edge/blocks/columns/columns.types.d.ts +2 -2
- package/lib/edge/blocks/slot/slot.svelte.d.ts +3 -3
- package/lib/edge/blocks/symbol/symbol.svelte +0 -1
- package/lib/edge/blocks/symbol/symbol.svelte.d.ts +7 -9
- package/lib/edge/blocks/symbol/symbol.types.d.ts +2 -2
- package/lib/edge/blocks/video/component-info.js +1 -1
- package/lib/edge/components/block/components/block-wrapper.svelte.d.ts +4 -4
- package/lib/edge/components/block/components/component-ref/component-ref.helpers.d.ts +3 -3
- package/lib/edge/components/content/content.types.d.ts +1 -8
- package/lib/edge/components/content/contentProps.types.d.ts +12 -0
- package/lib/edge/components/content/contentProps.types.js +1 -0
- package/lib/edge/components/dynamic-renderer/dynamic-renderer.svelte +2 -0
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/constants/sdk-version.js +1 -1
- package/lib/edge/types/builder-props.d.ts +1 -1
- package/lib/edge/types/input.d.ts +1 -0
- package/lib/edge/types/typescript.d.ts +0 -3
- package/lib/node/blocks/columns/columns.svelte +0 -1
- package/lib/node/blocks/columns/columns.svelte.d.ts +8 -10
- package/lib/node/blocks/columns/columns.types.d.ts +2 -2
- package/lib/node/blocks/slot/slot.svelte.d.ts +3 -3
- package/lib/node/blocks/symbol/symbol.svelte +0 -1
- package/lib/node/blocks/symbol/symbol.svelte.d.ts +7 -9
- package/lib/node/blocks/symbol/symbol.types.d.ts +2 -2
- package/lib/node/blocks/video/component-info.js +1 -1
- package/lib/node/components/block/components/block-wrapper.svelte.d.ts +4 -4
- package/lib/node/components/block/components/component-ref/component-ref.helpers.d.ts +3 -3
- package/lib/node/components/content/content.types.d.ts +1 -8
- package/lib/node/components/content/contentProps.types.d.ts +12 -0
- package/lib/node/components/content/contentProps.types.js +1 -0
- package/lib/node/components/dynamic-renderer/dynamic-renderer.svelte +2 -0
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/constants/sdk-version.js +1 -1
- package/lib/node/types/builder-props.d.ts +1 -1
- package/lib/node/types/input.d.ts +1 -0
- package/lib/node/types/typescript.d.ts +0 -3
- package/package.json +1 -1
- package/src/blocks/columns/columns.svelte +8 -11
- package/src/blocks/columns/columns.types.ts +2 -2
- package/src/blocks/form/form/form.svelte +23 -24
- package/src/blocks/slot/slot.svelte +3 -3
- package/src/blocks/symbol/symbol.svelte +7 -10
- package/src/blocks/symbol/symbol.types.ts +2 -2
- package/src/blocks/video/component-info.ts +1 -1
- package/src/components/block/components/block-wrapper.svelte +4 -4
- package/src/components/block/components/component-ref/component-ref.helpers.ts +3 -3
- package/src/components/block/components/interactive-element.svelte +7 -9
- package/src/components/blocks/blocks-wrapper.svelte +7 -7
- package/src/components/content/content.types.ts +1 -7
- package/src/components/content/contentProps.types.ts +12 -0
- package/src/components/dynamic-renderer/dynamic-renderer.svelte +12 -16
- package/src/constants/sdk-version.ts +1 -1
- package/src/types/builder-props.ts +1 -1
- package/src/types/input.ts +1 -0
- package/src/types/typescript.ts +1 -4
- package/lib/browser/components/dynamic-renderer/dynamic-renderer.svelte.d.ts +0 -21
- package/lib/edge/components/dynamic-renderer/dynamic-renderer.svelte.d.ts +0 -21
- package/lib/node/components/dynamic-renderer/dynamic-renderer.svelte.d.ts +0 -21
|
@@ -11,7 +11,7 @@ export const componentInfo = {
|
|
|
11
11
|
type: 'file',
|
|
12
12
|
allowedFileTypes: ['mp4'],
|
|
13
13
|
bubble: true,
|
|
14
|
-
defaultValue: 'https://
|
|
14
|
+
defaultValue: 'https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true',
|
|
15
15
|
required: true
|
|
16
16
|
}, {
|
|
17
17
|
name: 'posterImage',
|
|
@@ -4,16 +4,16 @@ type BlockWrapperProps = {
|
|
|
4
4
|
block: BuilderBlock;
|
|
5
5
|
context: Writable<BuilderContextInterface>;
|
|
6
6
|
linkComponent: any;
|
|
7
|
+
children?: any;
|
|
7
8
|
};
|
|
8
9
|
import type { BuilderContextInterface } from "../../../context/types.js";
|
|
9
10
|
import type { BuilderBlock } from "../../../types/builder-block.js";
|
|
10
|
-
import type { PropsWithChildren } from "../../../types/typescript.js";
|
|
11
11
|
import type { Writable } from "svelte/store";
|
|
12
12
|
declare const __propDef: {
|
|
13
13
|
props: {
|
|
14
|
-
Wrapper:
|
|
15
|
-
block:
|
|
16
|
-
context:
|
|
14
|
+
Wrapper: BlockWrapperProps["Wrapper"];
|
|
15
|
+
block: BlockWrapperProps["block"];
|
|
16
|
+
context: BlockWrapperProps["context"];
|
|
17
17
|
};
|
|
18
18
|
events: {
|
|
19
19
|
[evt: string]: CustomEvent<any>;
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import type { Writable } from "svelte/store";
|
|
3
3
|
import type { BuilderContextInterface, RegisteredComponents } from '../../../../context/types.js';
|
|
4
4
|
import type { BuilderBlock } from '../../../../types/builder-block.js';
|
|
5
|
-
import type {
|
|
5
|
+
import type { BuilderDataProps } from '../../../../types/builder-props.js';
|
|
6
6
|
import type { InteractiveElementProps } from '../interactive-element.svelte';
|
|
7
|
-
type ComponentOptions =
|
|
7
|
+
type ComponentOptions = BuilderDataProps & {
|
|
8
8
|
[index: string]: any;
|
|
9
9
|
attributes?: {
|
|
10
10
|
[index: string]: any;
|
|
11
11
|
};
|
|
12
|
-
}
|
|
12
|
+
};
|
|
13
13
|
export interface ComponentProps {
|
|
14
14
|
componentRef: any;
|
|
15
15
|
componentOptions: ComponentOptions;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import type { BuilderRenderState } from '../../context/types.js';
|
|
2
|
-
|
|
3
|
-
import type { ContentVariantsPrps } from '../content-variants/content-variants.types.js';
|
|
4
|
-
interface InternalRenderProps {
|
|
5
|
-
showContent: boolean;
|
|
6
|
-
isSsrAbTest: boolean;
|
|
7
|
-
}
|
|
8
|
-
export type ContentProps = InternalRenderProps & EnforcePartials<ContentVariantsPrps>;
|
|
2
|
+
export type { ContentProps } from './contentProps.types.js';
|
|
9
3
|
export interface BuilderComponentStateChange {
|
|
10
4
|
state: BuilderRenderState;
|
|
11
5
|
ref: {
|
|
@@ -17,4 +11,3 @@ export interface BuilderComponentStateChange {
|
|
|
17
11
|
};
|
|
18
12
|
};
|
|
19
13
|
}
|
|
20
|
-
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { EnforcePartials } from '../../types/enforced-partials.js';
|
|
2
|
+
import type { ContentVariantsPrps } from '../content-variants/content-variants.types.js';
|
|
3
|
+
interface InternalRenderProps {
|
|
4
|
+
showContent: boolean;
|
|
5
|
+
isSsrAbTest: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* This is in a separate file so that we can override it (most notably in Vue,
|
|
9
|
+
* where prop types cannot be wrapped by generics like `EnforcePartials`).
|
|
10
|
+
*/
|
|
11
|
+
export type ContentProps = InternalRenderProps & EnforcePartials<ContentVariantsPrps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.13.
|
|
1
|
+
export declare const SDK_VERSION = "0.13.4";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.13.
|
|
1
|
+
export const SDK_VERSION = "0.13.4";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { Writable } from "svelte/store";
|
|
3
3
|
import type { BuilderContextInterface, RegisteredComponents } from '../context/types.js';
|
|
4
4
|
import type { BuilderBlock } from './builder-block.js';
|
|
5
|
-
export type
|
|
5
|
+
export type BuilderDataProps = {
|
|
6
6
|
builderBlock: BuilderBlock;
|
|
7
7
|
builderContext: Writable<BuilderContextInterface>;
|
|
8
8
|
};
|
package/package.json
CHANGED
|
@@ -12,22 +12,19 @@
|
|
|
12
12
|
import { deoptSignal } from "../../functions/deopt.js";
|
|
13
13
|
import { getClassPropName } from "../../functions/get-class-prop-name.js";
|
|
14
14
|
import { mapStyleObjToStrIfNeeded } from "../../functions/get-style.js";
|
|
15
|
-
import type { PropsWithBuilderData } from "../../types/builder-props.js";
|
|
16
15
|
import type { Dictionary } from "../../types/typescript.js";
|
|
17
16
|
import type { ColumnProps } from "./columns.types.js";
|
|
18
17
|
|
|
19
|
-
export let
|
|
20
|
-
export let
|
|
21
|
-
export let
|
|
22
|
-
export let
|
|
18
|
+
export let space: ColumnProps["space"] = undefined;
|
|
19
|
+
export let columns: ColumnProps["columns"] = undefined;
|
|
20
|
+
export let stackColumnsAt: ColumnProps["stackColumnsAt"] = undefined;
|
|
21
|
+
export let reverseColumnsWhenStacked: ColumnProps["reverseColumnsWhenStacked"] =
|
|
23
22
|
undefined;
|
|
24
|
-
export let
|
|
23
|
+
export let builderContext: ColumnProps["builderContext"];
|
|
24
|
+
export let builderBlock: ColumnProps["builderBlock"];
|
|
25
|
+
export let builderLinkComponent: ColumnProps["builderLinkComponent"] =
|
|
25
26
|
undefined;
|
|
26
|
-
export let
|
|
27
|
-
export let builderBlock: PropsWithBuilderData<ColumnProps>["builderBlock"];
|
|
28
|
-
export let builderLinkComponent: PropsWithBuilderData<ColumnProps>["builderLinkComponent"] =
|
|
29
|
-
undefined;
|
|
30
|
-
export let builderComponents: PropsWithBuilderData<ColumnProps>["builderComponents"];
|
|
27
|
+
export let builderComponents: ColumnProps["builderComponents"];
|
|
31
28
|
|
|
32
29
|
function mitosis_styling(node, vars) {
|
|
33
30
|
Object.entries(vars || {}).forEach(([p, v]) => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { BuilderBlock } from '../../types/builder-block.js';
|
|
2
|
-
import type { BuilderComponentsProp, BuilderLinkComponentProp } from '../../types/builder-props.js';
|
|
2
|
+
import type { BuilderComponentsProp, BuilderDataProps, BuilderLinkComponentProp } from '../../types/builder-props.js';
|
|
3
3
|
type Column = {
|
|
4
4
|
blocks: BuilderBlock[];
|
|
5
5
|
width?: number;
|
|
6
6
|
link?: string;
|
|
7
7
|
};
|
|
8
8
|
type StackColumnsAt = 'tablet' | 'mobile' | 'never';
|
|
9
|
-
export interface ColumnProps extends BuilderComponentsProp, BuilderLinkComponentProp {
|
|
9
|
+
export interface ColumnProps extends BuilderComponentsProp, BuilderLinkComponentProp, BuilderDataProps {
|
|
10
10
|
columns?: Column[];
|
|
11
11
|
space?: number;
|
|
12
12
|
stackColumnsAt?: StackColumnsAt;
|
|
@@ -3,30 +3,29 @@
|
|
|
3
3
|
* This import is used by the Svelte SDK. Do not remove.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
export type FormProps =
|
|
6
|
+
export type FormProps = BuilderDataProps &
|
|
7
7
|
BuilderComponentsProp &
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
>;
|
|
8
|
+
BuilderLinkComponentProp & {
|
|
9
|
+
attributes?: any;
|
|
10
|
+
name?: string;
|
|
11
|
+
action?: string;
|
|
12
|
+
validate?: boolean;
|
|
13
|
+
method?: string;
|
|
14
|
+
sendSubmissionsTo?: string;
|
|
15
|
+
sendSubmissionsToEmail?: string;
|
|
16
|
+
sendWithJs?: boolean;
|
|
17
|
+
contentType?: string;
|
|
18
|
+
customHeaders?: {
|
|
19
|
+
[key: string]: string;
|
|
20
|
+
};
|
|
21
|
+
successUrl?: string;
|
|
22
|
+
previewState?: FormState;
|
|
23
|
+
successMessage?: BuilderBlock[];
|
|
24
|
+
errorMessage?: BuilderBlock[];
|
|
25
|
+
sendingMessage?: BuilderBlock[];
|
|
26
|
+
resetFormOnSubmit?: boolean;
|
|
27
|
+
errorMessagePath?: string;
|
|
28
|
+
};
|
|
30
29
|
|
|
31
30
|
/**
|
|
32
31
|
* This import is used by the Svelte SDK. Do not remove.
|
|
@@ -45,8 +44,8 @@
|
|
|
45
44
|
import type { BuilderBlock } from "../../../types/builder-block.js";
|
|
46
45
|
import type {
|
|
47
46
|
BuilderComponentsProp,
|
|
47
|
+
BuilderDataProps,
|
|
48
48
|
BuilderLinkComponentProp,
|
|
49
|
-
PropsWithBuilderData,
|
|
50
49
|
} from "../../../types/builder-props.js";
|
|
51
50
|
import type { Dictionary } from "../../../types/typescript.js";
|
|
52
51
|
import { filterAttrs } from "../../helpers.js";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<script context="module" lang="ts">
|
|
2
|
-
export type DropzoneProps =
|
|
2
|
+
export type DropzoneProps = BuilderDataProps & {
|
|
3
3
|
name: string;
|
|
4
4
|
attributes: any;
|
|
5
|
-
}
|
|
5
|
+
};
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
8
|
<script lang="ts">
|
|
9
9
|
import Blocks from "../../components/blocks/blocks.svelte";
|
|
10
10
|
import { deoptSignal } from "../../functions/deopt.js";
|
|
11
11
|
import type { BuilderBlock } from "../../types/builder-block.js";
|
|
12
|
-
import type {
|
|
12
|
+
import type { BuilderDataProps } from "../../types/builder-props.js";
|
|
13
13
|
|
|
14
14
|
export let js: DropzoneProps["js"];
|
|
15
15
|
export let builderContext: DropzoneProps["builderContext"];
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
|
|
4
4
|
import ContentVariants from "../../components/content-variants/content-variants.svelte";
|
|
5
5
|
import type { BuilderContent } from "../../types/builder-content.js";
|
|
6
|
-
import type { PropsWithBuilderData } from "../../types/builder-props.js";
|
|
7
6
|
import { filterAttrs } from "../helpers.js";
|
|
8
7
|
import { getClassPropName } from "../../functions/get-class-prop-name.js";
|
|
9
8
|
import type { Nullable } from "../../types/typescript.js";
|
|
@@ -11,15 +10,13 @@
|
|
|
11
10
|
import { fetchSymbolContent } from "./symbol.helpers.js";
|
|
12
11
|
import type { SymbolProps } from "./symbol.types.js";
|
|
13
12
|
|
|
14
|
-
export let
|
|
15
|
-
export let
|
|
16
|
-
|
|
17
|
-
export let
|
|
18
|
-
export let
|
|
19
|
-
export let
|
|
20
|
-
export let
|
|
21
|
-
export let builderComponents: PropsWithBuilderData<SymbolProps>["builderComponents"];
|
|
22
|
-
export let builderLinkComponent: PropsWithBuilderData<SymbolProps>["builderLinkComponent"] =
|
|
13
|
+
export let attributes: SymbolProps["attributes"] = undefined;
|
|
14
|
+
export let symbol: SymbolProps["symbol"] = undefined;
|
|
15
|
+
export let dynamic: SymbolProps["dynamic"] = undefined;
|
|
16
|
+
export let builderContext: SymbolProps["builderContext"];
|
|
17
|
+
export let builderBlock: SymbolProps["builderBlock"];
|
|
18
|
+
export let builderComponents: SymbolProps["builderComponents"];
|
|
19
|
+
export let builderLinkComponent: SymbolProps["builderLinkComponent"] =
|
|
23
20
|
undefined;
|
|
24
21
|
|
|
25
22
|
function setContent() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BuilderContent } from '../../types/builder-content.js';
|
|
2
|
-
import type { BuilderComponentsProp, BuilderLinkComponentProp } from '../../types/builder-props.js';
|
|
2
|
+
import type { BuilderComponentsProp, BuilderDataProps, BuilderLinkComponentProp } from '../../types/builder-props.js';
|
|
3
3
|
interface SymbolInfo {
|
|
4
4
|
model?: string;
|
|
5
5
|
entry?: string;
|
|
@@ -8,7 +8,7 @@ interface SymbolInfo {
|
|
|
8
8
|
inline?: boolean;
|
|
9
9
|
dynamic?: boolean;
|
|
10
10
|
}
|
|
11
|
-
export interface SymbolProps extends BuilderComponentsProp, BuilderLinkComponentProp {
|
|
11
|
+
export interface SymbolProps extends BuilderComponentsProp, BuilderDataProps, BuilderLinkComponentProp {
|
|
12
12
|
symbol?: SymbolInfo;
|
|
13
13
|
dataOnly?: boolean;
|
|
14
14
|
dynamic?: boolean;
|
|
@@ -12,7 +12,7 @@ export const componentInfo: ComponentInfo = {
|
|
|
12
12
|
type: 'file',
|
|
13
13
|
allowedFileTypes: ['mp4'],
|
|
14
14
|
bubble: true,
|
|
15
|
-
defaultValue: 'https://
|
|
15
|
+
defaultValue: 'https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true',
|
|
16
16
|
required: true
|
|
17
17
|
}, {
|
|
18
18
|
name: 'posterImage',
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
block: BuilderBlock;
|
|
5
5
|
context: Writable<BuilderContextInterface>;
|
|
6
6
|
linkComponent: any;
|
|
7
|
+
children?: any;
|
|
7
8
|
};
|
|
8
9
|
|
|
9
10
|
/**
|
|
@@ -16,13 +17,12 @@
|
|
|
16
17
|
import { getBlockActions } from "../../../functions/get-block-actions.js";
|
|
17
18
|
import { getBlockProperties } from "../../../functions/get-block-properties.js";
|
|
18
19
|
import type { BuilderBlock } from "../../../types/builder-block.js";
|
|
19
|
-
import type { PropsWithChildren } from "../../../types/typescript.js";
|
|
20
20
|
import DynamicRenderer from "../../dynamic-renderer/dynamic-renderer.svelte";
|
|
21
21
|
import type { Writable } from "svelte/store";
|
|
22
22
|
|
|
23
|
-
export let Wrapper:
|
|
24
|
-
export let block:
|
|
25
|
-
export let context:
|
|
23
|
+
export let Wrapper: BlockWrapperProps["Wrapper"];
|
|
24
|
+
export let block: BlockWrapperProps["block"];
|
|
25
|
+
export let context: BlockWrapperProps["context"];
|
|
26
26
|
</script>
|
|
27
27
|
|
|
28
28
|
<DynamicRenderer
|
|
@@ -2,14 +2,14 @@ import type { Writable } from "svelte/store";
|
|
|
2
2
|
import type { BuilderContextInterface, RegisteredComponents } from '../../../../context/types.js';
|
|
3
3
|
import { getBlockProperties } from '../../../../functions/get-block-properties.js';
|
|
4
4
|
import type { BuilderBlock } from '../../../../types/builder-block.js';
|
|
5
|
-
import type {
|
|
5
|
+
import type { BuilderDataProps } from '../../../../types/builder-props.js';
|
|
6
6
|
import type { InteractiveElementProps } from '../interactive-element.svelte';
|
|
7
|
-
type ComponentOptions =
|
|
7
|
+
type ComponentOptions = BuilderDataProps & {
|
|
8
8
|
[index: string]: any;
|
|
9
9
|
attributes?: {
|
|
10
10
|
[index: string]: any;
|
|
11
11
|
};
|
|
12
|
-
}
|
|
12
|
+
};
|
|
13
13
|
export interface ComponentProps {
|
|
14
14
|
componentRef: any;
|
|
15
15
|
componentOptions: ComponentOptions;
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
context: Writable<BuilderContextInterface>;
|
|
6
6
|
wrapperProps: Dictionary<any>;
|
|
7
7
|
includeBlockProps: boolean;
|
|
8
|
+
children?: any;
|
|
8
9
|
};
|
|
9
10
|
</script>
|
|
10
11
|
|
|
@@ -13,17 +14,14 @@
|
|
|
13
14
|
import { getBlockActions } from "../../../functions/get-block-actions.js";
|
|
14
15
|
import { getBlockProperties } from "../../../functions/get-block-properties.js";
|
|
15
16
|
import type { BuilderBlock } from "../../../types/builder-block.js";
|
|
16
|
-
import type {
|
|
17
|
-
Dictionary,
|
|
18
|
-
PropsWithChildren,
|
|
19
|
-
} from "../../../types/typescript.js";
|
|
17
|
+
import type { Dictionary } from "../../../types/typescript.js";
|
|
20
18
|
import type { Writable } from "svelte/store";
|
|
21
19
|
|
|
22
|
-
export let Wrapper:
|
|
23
|
-
export let wrapperProps:
|
|
24
|
-
export let includeBlockProps:
|
|
25
|
-
export let block:
|
|
26
|
-
export let context:
|
|
20
|
+
export let Wrapper: InteractiveElementProps["Wrapper"];
|
|
21
|
+
export let wrapperProps: InteractiveElementProps["wrapperProps"];
|
|
22
|
+
export let includeBlockProps: InteractiveElementProps["includeBlockProps"];
|
|
23
|
+
export let block: InteractiveElementProps["block"];
|
|
24
|
+
export let context: InteractiveElementProps["context"];
|
|
27
25
|
</script>
|
|
28
26
|
|
|
29
27
|
<svelte:component
|
|
@@ -12,20 +12,20 @@
|
|
|
12
12
|
* Additonal props to pass to `blocksWrapper`. Defaults to `{}`.
|
|
13
13
|
*/
|
|
14
14
|
BlocksWrapperProps: any;
|
|
15
|
+
children?: any;
|
|
15
16
|
};
|
|
16
17
|
</script>
|
|
17
18
|
|
|
18
19
|
<script lang="ts">
|
|
19
20
|
import { isEditing } from "../../functions/is-editing.js";
|
|
20
21
|
import type { BuilderBlock } from "../../types/builder-block.js";
|
|
21
|
-
import type { PropsWithChildren } from "../../types/typescript.js";
|
|
22
22
|
|
|
23
|
-
export let BlocksWrapper:
|
|
24
|
-
export let blocks:
|
|
25
|
-
export let parent:
|
|
26
|
-
export let path:
|
|
27
|
-
export let styleProp:
|
|
28
|
-
export let BlocksWrapperProps:
|
|
23
|
+
export let BlocksWrapper: BlocksWrapperProps["BlocksWrapper"];
|
|
24
|
+
export let blocks: BlocksWrapperProps["blocks"];
|
|
25
|
+
export let parent: BlocksWrapperProps["parent"];
|
|
26
|
+
export let path: BlocksWrapperProps["path"];
|
|
27
|
+
export let styleProp: BlocksWrapperProps["styleProp"];
|
|
28
|
+
export let BlocksWrapperProps: BlocksWrapperProps["BlocksWrapperProps"];
|
|
29
29
|
|
|
30
30
|
function mitosis_styling(node, vars) {
|
|
31
31
|
Object.entries(vars || {}).forEach(([p, v]) => {
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import type { BuilderRenderState } from '../../context/types.js';
|
|
2
|
-
|
|
3
|
-
import type { ContentVariantsPrps } from '../content-variants/content-variants.types.js';
|
|
4
|
-
interface InternalRenderProps {
|
|
5
|
-
showContent: boolean;
|
|
6
|
-
isSsrAbTest: boolean;
|
|
7
|
-
}
|
|
8
|
-
export type ContentProps = InternalRenderProps & EnforcePartials<ContentVariantsPrps>;
|
|
2
|
+
export type { ContentProps } from './contentProps.types.js';
|
|
9
3
|
export interface BuilderComponentStateChange {
|
|
10
4
|
state: BuilderRenderState;
|
|
11
5
|
ref: {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { EnforcePartials } from '../../types/enforced-partials.js';
|
|
2
|
+
import type { ContentVariantsPrps } from '../content-variants/content-variants.types.js';
|
|
3
|
+
interface InternalRenderProps {
|
|
4
|
+
showContent: boolean;
|
|
5
|
+
isSsrAbTest: boolean;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* This is in a separate file so that we can override it (most notably in Vue,
|
|
10
|
+
* where prop types cannot be wrapped by generics like `EnforcePartials`).
|
|
11
|
+
*/
|
|
12
|
+
export type ContentProps = InternalRenderProps & EnforcePartials<ContentVariantsPrps>
|
|
@@ -1,23 +1,19 @@
|
|
|
1
|
+
<script context="module" lang="ts">
|
|
2
|
+
export interface DynamicRendererProps {
|
|
3
|
+
children?: any;
|
|
4
|
+
TagName: any;
|
|
5
|
+
attributes: any;
|
|
6
|
+
actionAttributes: any;
|
|
7
|
+
}
|
|
8
|
+
</script>
|
|
9
|
+
|
|
1
10
|
<script lang="ts">
|
|
2
11
|
import { isEmptyElement } from "./dynamic-renderer.helpers.js";
|
|
3
12
|
import { setAttrs } from "../../blocks/helpers.js";
|
|
4
|
-
import type { PropsWithChildren } from "../../types/typescript.js";
|
|
5
13
|
|
|
6
|
-
export let attributes:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
actionAttributes: any;
|
|
10
|
-
}>["attributes"];
|
|
11
|
-
export let TagName: PropsWithChildren<{
|
|
12
|
-
TagName: any;
|
|
13
|
-
attributes: any;
|
|
14
|
-
actionAttributes: any;
|
|
15
|
-
}>["TagName"];
|
|
16
|
-
export let actionAttributes: PropsWithChildren<{
|
|
17
|
-
TagName: any;
|
|
18
|
-
attributes: any;
|
|
19
|
-
actionAttributes: any;
|
|
20
|
-
}>["actionAttributes"];
|
|
14
|
+
export let attributes: DynamicRendererProps["attributes"];
|
|
15
|
+
export let TagName: DynamicRendererProps["TagName"];
|
|
16
|
+
export let actionAttributes: DynamicRendererProps["actionAttributes"];
|
|
21
17
|
</script>
|
|
22
18
|
|
|
23
19
|
{#if !isEmptyElement(TagName)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.13.
|
|
1
|
+
export const SDK_VERSION = "0.13.4"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Writable } from "svelte/store";
|
|
2
2
|
import type { BuilderContextInterface, RegisteredComponents } from '../context/types.js';
|
|
3
3
|
import type { BuilderBlock } from './builder-block.js';
|
|
4
|
-
export type
|
|
4
|
+
export type BuilderDataProps = {
|
|
5
5
|
builderBlock: BuilderBlock;
|
|
6
6
|
builderContext: Writable<BuilderContextInterface>;
|
|
7
7
|
};
|
package/src/types/input.ts
CHANGED
package/src/types/typescript.ts
CHANGED
|
@@ -6,7 +6,4 @@ export type Overwrite<T, U> = keyof U extends keyof T ? Pick<T, Exclude<keyof T,
|
|
|
6
6
|
export type Prettify<T> = {
|
|
7
7
|
|
|
8
8
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
9
|
-
[K in keyof T]: T[K] } & {}
|
|
10
|
-
export type PropsWithChildren<P> = P & {
|
|
11
|
-
children?: any;
|
|
12
|
-
}
|
|
9
|
+
[K in keyof T]: T[K] } & {}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type { PropsWithChildren } from "../../types/typescript.js";
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: {
|
|
5
|
-
attributes: any;
|
|
6
|
-
TagName: any;
|
|
7
|
-
actionAttributes: any;
|
|
8
|
-
};
|
|
9
|
-
events: {
|
|
10
|
-
[evt: string]: CustomEvent<any>;
|
|
11
|
-
};
|
|
12
|
-
slots: {
|
|
13
|
-
default: {};
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export type DynamicRendererProps = typeof __propDef.props;
|
|
17
|
-
export type DynamicRendererEvents = typeof __propDef.events;
|
|
18
|
-
export type DynamicRendererSlots = typeof __propDef.slots;
|
|
19
|
-
export default class DynamicRenderer extends SvelteComponent<DynamicRendererProps, DynamicRendererEvents, DynamicRendererSlots> {
|
|
20
|
-
}
|
|
21
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type { PropsWithChildren } from "../../types/typescript.js";
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: {
|
|
5
|
-
attributes: any;
|
|
6
|
-
TagName: any;
|
|
7
|
-
actionAttributes: any;
|
|
8
|
-
};
|
|
9
|
-
events: {
|
|
10
|
-
[evt: string]: CustomEvent<any>;
|
|
11
|
-
};
|
|
12
|
-
slots: {
|
|
13
|
-
default: {};
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export type DynamicRendererProps = typeof __propDef.props;
|
|
17
|
-
export type DynamicRendererEvents = typeof __propDef.events;
|
|
18
|
-
export type DynamicRendererSlots = typeof __propDef.slots;
|
|
19
|
-
export default class DynamicRenderer extends SvelteComponent<DynamicRendererProps, DynamicRendererEvents, DynamicRendererSlots> {
|
|
20
|
-
}
|
|
21
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type { PropsWithChildren } from "../../types/typescript.js";
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: {
|
|
5
|
-
attributes: any;
|
|
6
|
-
TagName: any;
|
|
7
|
-
actionAttributes: any;
|
|
8
|
-
};
|
|
9
|
-
events: {
|
|
10
|
-
[evt: string]: CustomEvent<any>;
|
|
11
|
-
};
|
|
12
|
-
slots: {
|
|
13
|
-
default: {};
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export type DynamicRendererProps = typeof __propDef.props;
|
|
17
|
-
export type DynamicRendererEvents = typeof __propDef.events;
|
|
18
|
-
export type DynamicRendererSlots = typeof __propDef.slots;
|
|
19
|
-
export default class DynamicRenderer extends SvelteComponent<DynamicRendererProps, DynamicRendererEvents, DynamicRendererSlots> {
|
|
20
|
-
}
|
|
21
|
-
export {};
|