@builder.io/sdk-qwik 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.qwik.cjs +523 -380
- package/lib/index.qwik.mjs +524 -381
- package/package.json +2 -2
- package/types/blocks/columns/columns.d.ts +0 -2
- package/types/blocks/image/image.d.ts +0 -9
- package/types/blocks/video/video.d.ts +0 -8
- package/types/components/render-block/block-styles.d.ts +1 -6
- package/types/components/render-block/render-block.d.ts +1 -43
- package/types/components/render-block/render-block.helpers.d.ts +1 -0
- package/types/components/render-blocks.d.ts +0 -1
- package/types/components/render-content-variants/helpers.d.ts +6 -0
- package/types/components/render-content-variants/render-content-variants.d.ts +3 -0
- package/types/components/render-inlined-styles.d.ts +1 -5
- package/types/functions/get-block-properties.d.ts +1 -0
- package/types/functions/get-content/index.d.ts +1 -1
- package/types/helpers/logger.d.ts +5 -0
- package/types/types/builder-content.d.ts +1 -1
- package/types/types/components.d.ts +1 -72
- package/types/types/input.d.ts +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builder.io/sdk-qwik",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Builder.io Qwik SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.qwik.cjs",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"release:dev": "yarn run build && npm version prerelease && npm publish --tag dev"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@builder.io/qwik": "^0.
|
|
31
|
+
"@builder.io/qwik": "^0.101.0",
|
|
32
32
|
"@types/node": "latest",
|
|
33
33
|
"typescript": "^4",
|
|
34
34
|
"vite": "^3.0.4"
|
|
@@ -24,10 +24,8 @@ export declare const getMobileStyle: (props: any, state: any, builderContext: an
|
|
|
24
24
|
stackedStyle: CSSVal;
|
|
25
25
|
desktopStyle: CSSVal;
|
|
26
26
|
}) => CSSVal;
|
|
27
|
-
export declare const columnsCssVars: (props: any, state: any, builderContext: any) => Dictionary<string>;
|
|
28
27
|
export declare const columnCssVars: (props: any, state: any, builderContext: any, index: number) => Dictionary<string>;
|
|
29
28
|
export declare const getWidthForBreakpointSize: (props: any, state: any, builderContext: any, size: SizeName) => number;
|
|
30
|
-
export declare const columnsStyles: (props: any, state: any, builderContext: any) => string;
|
|
31
29
|
export declare const Columns: import("@builder.io/qwik").Component<ColumnProps>;
|
|
32
30
|
export default Columns;
|
|
33
31
|
export declare const STYLES = "\n.div-Columns {\n display: flex;\n line-height: normal;\n}\n.div-Columns-2 {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n}\n";
|
|
@@ -18,15 +18,6 @@ export interface ImageProps {
|
|
|
18
18
|
noWebp?: boolean;
|
|
19
19
|
src?: string;
|
|
20
20
|
}
|
|
21
|
-
export declare const srcSetToUse: (props: any, state: any) => any;
|
|
22
|
-
export declare const webpSrcSet: (props: any, state: any) => any;
|
|
23
|
-
export declare const aspectRatioCss: (props: any, state: any) => {
|
|
24
|
-
position: string;
|
|
25
|
-
height: string;
|
|
26
|
-
width: string;
|
|
27
|
-
left: string;
|
|
28
|
-
top: string;
|
|
29
|
-
} | undefined;
|
|
30
21
|
export declare const Image: import("@builder.io/qwik").Component<ImageProps>;
|
|
31
22
|
export default Image;
|
|
32
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";
|
|
@@ -14,13 +14,5 @@ export interface VideoProps {
|
|
|
14
14
|
posterImage?: string;
|
|
15
15
|
lazyLoad?: boolean;
|
|
16
16
|
}
|
|
17
|
-
export declare const videoProps: (props: any, state: any) => {
|
|
18
|
-
playsInline?: boolean | undefined;
|
|
19
|
-
loop?: boolean | undefined;
|
|
20
|
-
controls?: boolean | undefined;
|
|
21
|
-
muted?: boolean | undefined;
|
|
22
|
-
autoPlay?: boolean | undefined;
|
|
23
|
-
};
|
|
24
|
-
export declare const spreadProps: (props: any, state: any) => any;
|
|
25
17
|
export declare const Video: import("@builder.io/qwik").Component<VideoProps>;
|
|
26
18
|
export default Video;
|
|
@@ -4,10 +4,5 @@ export type BlockStylesProps = {
|
|
|
4
4
|
block: BuilderBlock;
|
|
5
5
|
context: BuilderContextInterface;
|
|
6
6
|
};
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const canShowBlock: (props: any, state: any) => boolean | undefined;
|
|
9
|
-
export declare const css: (props: any, state: any) => string;
|
|
10
|
-
export declare const BlockStyles: (props: BlockStylesProps & {
|
|
11
|
-
key?: any;
|
|
12
|
-
}) => import("@builder.io/qwik/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const BlockStyles: import("@builder.io/qwik").Component<BlockStylesProps>;
|
|
13
8
|
export default BlockStyles;
|
|
@@ -4,47 +4,5 @@ export type RenderBlockProps = {
|
|
|
4
4
|
block: BuilderBlock;
|
|
5
5
|
context: BuilderContextInterface;
|
|
6
6
|
};
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const tag: (props: any, state: any) => string;
|
|
9
|
-
export declare const useBlock: (props: any, state: any) => any;
|
|
10
|
-
export declare const canShowBlock: (props: any, state: any) => any;
|
|
11
|
-
export declare const proxyState: (props: any, state: any) => any;
|
|
12
|
-
export declare const actions: (props: any, state: any) => {
|
|
13
|
-
[index: string]: (event: Event) => any;
|
|
14
|
-
};
|
|
15
|
-
export declare const attributes: (props: any, state: any) => {
|
|
16
|
-
style: string | Partial<CSSStyleDeclaration> | Record<string, string | undefined> | undefined;
|
|
17
|
-
'builder-id': string | undefined;
|
|
18
|
-
class: string;
|
|
19
|
-
};
|
|
20
|
-
export declare const renderComponentProps: (props: any, state: any) => {
|
|
21
|
-
blockChildren: any;
|
|
22
|
-
componentRef: any;
|
|
23
|
-
componentOptions: any;
|
|
24
|
-
context: {
|
|
25
|
-
apiKey: any;
|
|
26
|
-
apiVersion: any;
|
|
27
|
-
state: any;
|
|
28
|
-
content: any;
|
|
29
|
-
context: any;
|
|
30
|
-
setState: any;
|
|
31
|
-
registeredComponents: any;
|
|
32
|
-
inheritedStyles: Partial<CSSStyleDeclaration>;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
export declare const childrenWithoutParentComponent: (props: any, state: any) => any;
|
|
36
|
-
export declare const repeatItemData: (props: any, state: any) => import("./types.js").RepeatData[] | undefined;
|
|
37
|
-
export declare const childrenContext: (props: any, state: any) => {
|
|
38
|
-
apiKey: any;
|
|
39
|
-
apiVersion: any;
|
|
40
|
-
state: any;
|
|
41
|
-
content: any;
|
|
42
|
-
context: any;
|
|
43
|
-
setState: any;
|
|
44
|
-
registeredComponents: any;
|
|
45
|
-
inheritedStyles: Partial<CSSStyleDeclaration>;
|
|
46
|
-
};
|
|
47
|
-
export declare const RenderBlock: (props: RenderBlockProps & {
|
|
48
|
-
key?: any;
|
|
49
|
-
}) => import("@builder.io/qwik/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const RenderBlock: import("@builder.io/qwik").Component<RenderBlockProps>;
|
|
50
8
|
export default RenderBlock;
|
|
@@ -5,7 +5,6 @@ export type RenderBlockProps = {
|
|
|
5
5
|
path?: string;
|
|
6
6
|
styleProp?: Record<string, any>;
|
|
7
7
|
};
|
|
8
|
-
export declare const className: (props: any, state: any, builderContext: any) => string;
|
|
9
8
|
export declare const onClick: (props: any, state: any, builderContext: any) => void;
|
|
10
9
|
export declare const onMouseEnter: (props: any, state: any, builderContext: any) => void;
|
|
11
10
|
export declare const RenderBlocks: import("@builder.io/qwik").Component<RenderBlockProps>;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
interface Props {
|
|
2
2
|
styles: string;
|
|
3
3
|
}
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const tag: (props: any, state: any) => string;
|
|
6
|
-
export declare const RenderInlinedStyles: (props: Props & {
|
|
7
|
-
key?: any;
|
|
8
|
-
}) => import("@builder.io/qwik/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const RenderInlinedStyles: import("@builder.io/qwik").Component<Props>;
|
|
9
5
|
export default RenderInlinedStyles;
|
|
@@ -7,5 +7,5 @@ type ContentResponse = {
|
|
|
7
7
|
status: number;
|
|
8
8
|
message: string;
|
|
9
9
|
};
|
|
10
|
-
export declare function getAllContent(options: GetContentOptions): Promise<ContentResponse>;
|
|
10
|
+
export declare function getAllContent(options: GetContentOptions): Promise<ContentResponse | null>;
|
|
11
11
|
export {};
|
|
@@ -1,76 +1,5 @@
|
|
|
1
1
|
import type { BuilderElement } from './element';
|
|
2
|
-
|
|
3
|
-
name: string;
|
|
4
|
-
friendlyName?: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
defaultValue?: any;
|
|
7
|
-
type: string;
|
|
8
|
-
valueType?: {
|
|
9
|
-
type?: string;
|
|
10
|
-
};
|
|
11
|
-
required?: boolean;
|
|
12
|
-
autoFocus?: boolean;
|
|
13
|
-
subFields?: Input[];
|
|
14
|
-
helperText?: string;
|
|
15
|
-
allowedFileTypes?: string[];
|
|
16
|
-
imageHeight?: number;
|
|
17
|
-
imageWidth?: number;
|
|
18
|
-
mediaHeight?: number;
|
|
19
|
-
mediaWidth?: number;
|
|
20
|
-
hideFromUI?: boolean;
|
|
21
|
-
modelId?: string;
|
|
22
|
-
/**
|
|
23
|
-
* Number field type validation maximum accepted input
|
|
24
|
-
*/
|
|
25
|
-
max?: number;
|
|
26
|
-
/**
|
|
27
|
-
* Number field type validation minimum accepted input
|
|
28
|
-
*/
|
|
29
|
-
min?: number;
|
|
30
|
-
/**
|
|
31
|
-
* Number field type step size when using arrows
|
|
32
|
-
*/
|
|
33
|
-
step?: number;
|
|
34
|
-
/**
|
|
35
|
-
* Set this to `true` to show the editor for this input when
|
|
36
|
-
* children of this component are selected. This is useful for things
|
|
37
|
-
* like Tabs, such that users may not always select the Tabs component
|
|
38
|
-
* directly but will still be looking for how to add additional tabs
|
|
39
|
-
*/
|
|
40
|
-
broadcast?: boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Set this to `true` to show the editor for this input when
|
|
43
|
-
* group locked parents of this component are selected. This is useful
|
|
44
|
-
* to bubble up important inputs for locked groups, like text and images
|
|
45
|
-
*/
|
|
46
|
-
bubble?: boolean;
|
|
47
|
-
options?: {
|
|
48
|
-
[key: string]: any;
|
|
49
|
-
};
|
|
50
|
-
enum?: string[] | {
|
|
51
|
-
label: string;
|
|
52
|
-
value: any;
|
|
53
|
-
helperText?: string;
|
|
54
|
-
}[];
|
|
55
|
-
/** Regex field validation for all string types (text, longText, html, url, etc) */
|
|
56
|
-
regex?: {
|
|
57
|
-
/** pattern to test, like "^\/[a-z]$" */
|
|
58
|
-
pattern: string;
|
|
59
|
-
/** flags for the RegExp constructor, e.g. "gi" */
|
|
60
|
-
options?: string;
|
|
61
|
-
/**
|
|
62
|
-
* Friendly message to display to end-users if the regex fails, e.g.
|
|
63
|
-
* "You must use a relative url starting with '/...' "
|
|
64
|
-
*/
|
|
65
|
-
message: string;
|
|
66
|
-
};
|
|
67
|
-
advanced?: boolean;
|
|
68
|
-
onChange?: ((options: Map<string, any>) => void | Promise<void>) | string;
|
|
69
|
-
code?: boolean;
|
|
70
|
-
richText?: boolean;
|
|
71
|
-
showIf?: ((options: Map<string, any>) => boolean) | string;
|
|
72
|
-
copyOnAdd?: boolean;
|
|
73
|
-
}
|
|
2
|
+
import type { Input } from './input';
|
|
74
3
|
export interface ComponentInfo {
|
|
75
4
|
/**
|
|
76
5
|
* Name your component something unique, e.g. 'MyButton'. You can override built-in components
|
package/types/types/input.d.ts
CHANGED
|
@@ -114,4 +114,8 @@ export interface Input {
|
|
|
114
114
|
* Use optionally with inputs of type `reference`. Restricts the content entry picker to a specific model by name.
|
|
115
115
|
*/
|
|
116
116
|
model?: string;
|
|
117
|
+
valueType?: {
|
|
118
|
+
type?: string;
|
|
119
|
+
};
|
|
120
|
+
onChange?: ((options: Map<string, any>) => void | Promise<void>) | string;
|
|
117
121
|
}
|