@builder.io/sdk-qwik 0.13.1 → 0.13.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/index.qwik.cjs +1065 -279
- package/lib/browser/index.qwik.mjs +1066 -280
- package/lib/edge/index.qwik.cjs +1065 -279
- package/lib/edge/index.qwik.mjs +1066 -280
- package/lib/node/index.qwik.cjs +1065 -279
- package/lib/node/index.qwik.mjs +1066 -280
- package/package.json +1 -1
- package/types/src/blocks/columns/columns.d.ts +1 -2
- package/types/src/blocks/columns/columns.types.d.ts +2 -2
- package/types/src/blocks/form/form/component-info.d.ts +2 -0
- package/types/src/blocks/form/form/form.d.ts +37 -0
- package/types/src/blocks/form/input/component-info.d.ts +2 -0
- package/types/src/blocks/form/select/component-info.d.ts +2 -0
- package/types/src/blocks/form/submit-button/component-info.d.ts +2 -0
- package/types/src/blocks/slot/slot.d.ts +3 -6
- package/types/src/blocks/symbol/symbol.d.ts +1 -2
- package/types/src/blocks/symbol/symbol.types.d.ts +2 -2
- package/types/src/components/block/components/block-wrapper.d.ts +2 -2
- package/types/src/components/block/components/component-ref/component-ref.helpers.d.ts +3 -3
- package/types/src/components/block/components/interactive-element.d.ts +3 -2
- package/types/src/components/blocks/blocks-wrapper.d.ts +2 -2
- package/types/src/components/content/content.types.d.ts +1 -8
- package/types/src/components/content/contentProps.types.d.ts +12 -0
- package/types/src/components/dynamic-renderer/dynamic-renderer.d.ts +4 -3
- package/types/src/constants/extra-components.d.ts +7 -0
- package/types/src/constants/sdk-version.d.ts +1 -1
- package/types/src/functions/get-env.d.ts +2 -0
- package/types/src/functions/get.d.ts +1 -0
- package/types/src/types/builder-props.d.ts +1 -1
- package/types/src/types/input.d.ts +1 -0
- package/types/src/types/typescript.d.ts +0 -3
- package/types/src/blocks/form/component-info.d.ts +0 -2
- package/types/src/blocks/input/component-info.d.ts +0 -2
- package/types/src/blocks/select/component-info.d.ts +0 -2
- package/types/src/blocks/submit-button/component-info.d.ts +0 -2
- /package/types/src/blocks/{input → form/input}/input.d.ts +0 -0
- /package/types/src/blocks/{select → form/select}/select.d.ts +0 -0
- /package/types/src/blocks/{submit-button → form/submit-button}/submit-button.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { SizeName } from "../../constants/device-sizes.js";
|
|
2
|
-
import { PropsWithBuilderData } from "../../types/builder-props.js";
|
|
3
2
|
import { Dictionary } from "../../types/typescript.js";
|
|
4
3
|
import { ColumnProps } from "./columns.types.js";
|
|
5
4
|
type CSSVal = string | number;
|
|
@@ -15,6 +14,6 @@ export declare const getMobileStyle: (props: any, state: any, { stackedStyle, de
|
|
|
15
14
|
}) => CSSVal;
|
|
16
15
|
export declare const columnCssVars: (props: any, state: any, index: number) => Dictionary<string>;
|
|
17
16
|
export declare const getWidthForBreakpointSize: (props: any, state: any, size: SizeName) => number;
|
|
18
|
-
export declare const Columns: import("@builder.io/qwik").Component<
|
|
17
|
+
export declare const Columns: import("@builder.io/qwik").Component<ColumnProps>;
|
|
19
18
|
export default Columns;
|
|
20
19
|
export declare const STYLES = "\n.div-Columns {\n display: flex;\n line-height: normal;\n}\n";
|
|
@@ -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;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { BuilderBlock } from "../../../types/builder-block.js";
|
|
2
|
+
import { BuilderComponentsProp, BuilderDataProps, BuilderLinkComponentProp } from "../../../types/builder-props.js";
|
|
3
|
+
import { Dictionary } from "../../../types/typescript.js";
|
|
4
|
+
/**
|
|
5
|
+
* This import is used by the Svelte SDK. Do not remove.
|
|
6
|
+
*/
|
|
7
|
+
export type FormProps = BuilderDataProps & BuilderComponentsProp & BuilderLinkComponentProp & {
|
|
8
|
+
attributes?: any;
|
|
9
|
+
name?: string;
|
|
10
|
+
action?: string;
|
|
11
|
+
validate?: boolean;
|
|
12
|
+
method?: string;
|
|
13
|
+
sendSubmissionsTo?: string;
|
|
14
|
+
sendSubmissionsToEmail?: string;
|
|
15
|
+
sendWithJs?: boolean;
|
|
16
|
+
contentType?: string;
|
|
17
|
+
customHeaders?: {
|
|
18
|
+
[key: string]: string;
|
|
19
|
+
};
|
|
20
|
+
successUrl?: string;
|
|
21
|
+
previewState?: FormState;
|
|
22
|
+
successMessage?: BuilderBlock[];
|
|
23
|
+
errorMessage?: BuilderBlock[];
|
|
24
|
+
sendingMessage?: BuilderBlock[];
|
|
25
|
+
resetFormOnSubmit?: boolean;
|
|
26
|
+
errorMessagePath?: string;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* This import is used by the Svelte SDK. Do not remove.
|
|
30
|
+
*/
|
|
31
|
+
export type FormState = "unsubmitted" | "sending" | "success" | "error";
|
|
32
|
+
export declare const mergeNewRootState: (props: any, state: any, formRef: any, newData: Dictionary<any>) => void;
|
|
33
|
+
export declare const submissionState: (props: any, state: any, formRef: any) => any;
|
|
34
|
+
export declare const onSubmit: (props: any, state: any, formRef: any, event: any) => void;
|
|
35
|
+
export declare const FormComponent: import("@builder.io/qwik").Component<FormProps>;
|
|
36
|
+
export default FormComponent;
|
|
37
|
+
export declare const STYLES = "\n.pre-FormComponent {\n padding: 10px;\n color: red;\n text-align: center;\n}\n";
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export interface DropzoneProps {
|
|
1
|
+
import { BuilderDataProps } from "../../types/builder-props.js";
|
|
2
|
+
export type DropzoneProps = BuilderDataProps & {
|
|
4
3
|
name: string;
|
|
5
|
-
builderBlock: BuilderBlock;
|
|
6
|
-
builderContext: BuilderContextInterface;
|
|
7
4
|
attributes: any;
|
|
8
|
-
}
|
|
5
|
+
};
|
|
9
6
|
export declare const Slot: import("@builder.io/qwik").Component<DropzoneProps>;
|
|
10
7
|
export default Slot;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { PropsWithBuilderData } from "../../types/builder-props.js";
|
|
2
1
|
import { SymbolProps } from "./symbol.types.js";
|
|
3
2
|
export declare const setContent: (props: any, state: any) => void;
|
|
4
|
-
export declare const Symbol: import("@builder.io/qwik").Component<
|
|
3
|
+
export declare const Symbol: import("@builder.io/qwik").Component<SymbolProps>;
|
|
5
4
|
export default Symbol;
|
|
@@ -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;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { BuilderContextInterface } from "../../../context/types.js";
|
|
2
2
|
import { BuilderBlock } from "../../../types/builder-block.js";
|
|
3
|
-
import { PropsWithChildren } from "../../../types/typescript.js";
|
|
4
3
|
type BlockWrapperProps = {
|
|
5
4
|
Wrapper: string;
|
|
6
5
|
block: BuilderBlock;
|
|
7
6
|
context: BuilderContextInterface;
|
|
8
7
|
linkComponent: any;
|
|
8
|
+
children?: any;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
11
|
* This component renders a block's wrapper HTML element (from the block's `tagName` property).
|
|
12
12
|
*/
|
|
13
|
-
export declare const BlockWrapper: import("@builder.io/qwik").Component<
|
|
13
|
+
export declare const BlockWrapper: import("@builder.io/qwik").Component<BlockWrapperProps>;
|
|
14
14
|
export default BlockWrapper;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { BuilderContextInterface, RegisteredComponents } from '../../../../context/types.js';
|
|
2
2
|
import type { BuilderBlock } from '../../../../types/builder-block.js';
|
|
3
|
-
import type {
|
|
3
|
+
import type { BuilderDataProps } from '../../../../types/builder-props.js';
|
|
4
4
|
import type { InteractiveElementProps } from '../interactive-element.jsx';
|
|
5
|
-
type ComponentOptions =
|
|
5
|
+
type ComponentOptions = BuilderDataProps & {
|
|
6
6
|
[index: string]: any;
|
|
7
7
|
attributes?: {
|
|
8
8
|
[index: string]: any;
|
|
9
9
|
};
|
|
10
|
-
}
|
|
10
|
+
};
|
|
11
11
|
export interface ComponentProps {
|
|
12
12
|
componentRef: any;
|
|
13
13
|
componentOptions: ComponentOptions;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { BuilderContextInterface } from "../../../context/types.js";
|
|
2
2
|
import { BuilderBlock } from "../../../types/builder-block.js";
|
|
3
|
-
import { Dictionary
|
|
3
|
+
import { Dictionary } from "../../../types/typescript.js";
|
|
4
4
|
export type InteractiveElementProps = {
|
|
5
5
|
Wrapper: any;
|
|
6
6
|
block: BuilderBlock;
|
|
7
7
|
context: BuilderContextInterface;
|
|
8
8
|
wrapperProps: Dictionary<any>;
|
|
9
9
|
includeBlockProps: boolean;
|
|
10
|
+
children?: any;
|
|
10
11
|
};
|
|
11
|
-
export declare const InteractiveElement: import("@builder.io/qwik").Component<
|
|
12
|
+
export declare const InteractiveElement: import("@builder.io/qwik").Component<InteractiveElementProps>;
|
|
12
13
|
export default InteractiveElement;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { BuilderBlock } from "../../types/builder-block.js";
|
|
2
|
-
import { PropsWithChildren } from "../../types/typescript.js";
|
|
3
2
|
export type BlocksWrapperProps = {
|
|
4
3
|
blocks: BuilderBlock[] | undefined;
|
|
5
4
|
parent: string | undefined;
|
|
@@ -13,9 +12,10 @@ export type BlocksWrapperProps = {
|
|
|
13
12
|
* Additonal props to pass to `blocksWrapper`. Defaults to `{}`.
|
|
14
13
|
*/
|
|
15
14
|
BlocksWrapperProps: any;
|
|
15
|
+
children?: any;
|
|
16
16
|
};
|
|
17
17
|
export declare const onClick: (props: any, state: any) => void;
|
|
18
18
|
export declare const onMouseEnter: (props: any, state: any) => void;
|
|
19
|
-
export declare const BlocksWrapper: import("@builder.io/qwik").Component<
|
|
19
|
+
export declare const BlocksWrapper: import("@builder.io/qwik").Component<BlocksWrapperProps>;
|
|
20
20
|
export default BlocksWrapper;
|
|
21
21
|
export declare const STYLES = "\n.props-blocks-wrapper-BlocksWrapper {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n}\n";
|
|
@@ -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 {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export interface DynamicRendererProps {
|
|
2
|
+
children?: any;
|
|
3
3
|
TagName: any;
|
|
4
4
|
attributes: any;
|
|
5
5
|
actionAttributes: any;
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
|
+
export declare const DynamicRenderer: import("@builder.io/qwik").Component<DynamicRendererProps>;
|
|
7
8
|
export default DynamicRenderer;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* These are in a separate file because React Native does not support them (yet).
|
|
3
|
+
* Having them in a separate file allows us to override it to be empty in the
|
|
4
|
+
* React Native SDK.
|
|
5
|
+
*/
|
|
6
|
+
import type { RegisteredComponent } from '../context/types.js';
|
|
7
|
+
export declare const getExtraComponents: () => RegisteredComponent[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.13.
|
|
1
|
+
export declare const SDK_VERSION = "0.13.3";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const get: (obj: any, path: string, defaultValue?: any) => any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BuilderContextInterface, RegisteredComponents } from '../context/types.js';
|
|
2
2
|
import type { BuilderBlock } from './builder-block.js';
|
|
3
|
-
export type
|
|
3
|
+
export type BuilderDataProps = {
|
|
4
4
|
builderBlock: BuilderBlock;
|
|
5
5
|
builderContext: BuilderContextInterface;
|
|
6
6
|
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|