@builder.io/sdk-qwik 0.0.26 → 0.0.28
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/README.md +3 -4
- package/package.json +1 -1
- package/types/blocks/BaseText.d.ts +5 -0
- package/types/blocks/avatar/avatar.d.ts +267 -0
- package/types/blocks/avatar/avatar.model.d.ts +19 -0
- package/types/blocks/image/image.d.ts +1 -1
- package/types/blocks/symbol/symbol.d.ts +1 -0
- package/types/blocks/util.d.ts +4 -1
- package/types/blocks/video/video.d.ts +1 -0
- package/types/components/render-block/render-block.d.ts +22 -7
- package/types/components/render-block/render-component-with-context.d.ts +3 -0
- package/types/components/render-blocks.d.ts +1 -1
- package/types/components/render-content/builder-editing.d.ts +2 -0
- package/types/components/render-inlined-styles.d.ts +1 -1
- package/types/constants/device-sizes.d.ts +12 -1
- package/types/context/types.d.ts +1 -0
- package/types/functions/extract-text-styles.d.ts +4 -0
- package/types/functions/fast-clone.d.ts +4 -0
- package/types/functions/get-content/types.d.ts +4 -0
- package/types/functions/get-react-native-block-styles.d.ts +6 -0
- package/types/functions/mark-mutable.d.ts +2 -2
- package/types/functions/register-component.d.ts +1 -1
- package/types/functions/sanitize-react-native-block-styles.d.ts +3 -0
- package/types/functions/track.d.ts +35 -5
- package/types/helpers/css.d.ts +5 -1
- package/types/index.d.ts +4 -1
- package/types/types/builder-content.d.ts +7 -0
- package/lib/index.qwik.cjs +0 -2656
- package/lib/index.qwik.mjs +0 -2656
package/README.md
CHANGED
|
@@ -35,12 +35,11 @@ import { useLocation } from "@builder.io/qwik-city";
|
|
|
35
35
|
import { getContent, RenderContent, getBuilderSearchParams } from "@builder.io/sdk-qwik";
|
|
36
36
|
|
|
37
37
|
export const BUILDER_PUBLIC_API_KEY = "YOUR_API_KEY_GOES_HERE"; // ggignore
|
|
38
|
-
export const BUILDER_MODEL = "page";
|
|
39
38
|
export default component$(() => {
|
|
40
39
|
const location = useLocation();
|
|
41
40
|
const builderContentRsrc = useResource$<any>(() => {
|
|
42
41
|
return getContent({
|
|
43
|
-
model:
|
|
42
|
+
model: "page",
|
|
44
43
|
apiKey: BUILDER_PUBLIC_API_KEY,
|
|
45
44
|
options: getBuilderSearchParams(location.query),
|
|
46
45
|
userAttributes: {
|
|
@@ -51,11 +50,11 @@ export default component$(() => {
|
|
|
51
50
|
|
|
52
51
|
return (
|
|
53
52
|
<Resource
|
|
54
|
-
|
|
53
|
+
resource={builderContentRsrc}
|
|
55
54
|
onPending={() => <div>Loading...</div>}
|
|
56
55
|
onResolved={(content) => (
|
|
57
56
|
<RenderContent
|
|
58
|
-
model=
|
|
57
|
+
model="page"
|
|
59
58
|
content={content}
|
|
60
59
|
apiKey={BUILDER_PUBLIC_API_KEY}
|
|
61
60
|
/>
|
package/package.json
CHANGED
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
export declare const avatarService: any;
|
|
2
|
+
export declare const Avatar: import("@builder.io/qwik").Component<any>;
|
|
3
|
+
export default Avatar;
|
|
4
|
+
export declare const COMPONENT: {
|
|
5
|
+
"@type": string;
|
|
6
|
+
children: {
|
|
7
|
+
"@type": string;
|
|
8
|
+
bindings: {
|
|
9
|
+
when: {
|
|
10
|
+
code: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
children: ({
|
|
14
|
+
"@type": string;
|
|
15
|
+
bindings: {
|
|
16
|
+
class?: undefined;
|
|
17
|
+
title?: undefined;
|
|
18
|
+
};
|
|
19
|
+
children: never[];
|
|
20
|
+
meta: {};
|
|
21
|
+
name: string;
|
|
22
|
+
properties: {
|
|
23
|
+
_text: string;
|
|
24
|
+
};
|
|
25
|
+
scope: {};
|
|
26
|
+
} | {
|
|
27
|
+
"@type": string;
|
|
28
|
+
bindings: {
|
|
29
|
+
class: {
|
|
30
|
+
code: string;
|
|
31
|
+
};
|
|
32
|
+
title: {
|
|
33
|
+
code: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
children: ({
|
|
37
|
+
"@type": string;
|
|
38
|
+
bindings: {
|
|
39
|
+
when?: undefined;
|
|
40
|
+
};
|
|
41
|
+
children: never[];
|
|
42
|
+
meta: {};
|
|
43
|
+
name: string;
|
|
44
|
+
properties: {
|
|
45
|
+
_text: string;
|
|
46
|
+
};
|
|
47
|
+
scope: {};
|
|
48
|
+
} | {
|
|
49
|
+
"@type": string;
|
|
50
|
+
bindings: {
|
|
51
|
+
when: {
|
|
52
|
+
code: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
children: ({
|
|
56
|
+
"@type": string;
|
|
57
|
+
bindings: {
|
|
58
|
+
class?: undefined;
|
|
59
|
+
style?: undefined;
|
|
60
|
+
};
|
|
61
|
+
children: never[];
|
|
62
|
+
meta: {};
|
|
63
|
+
name: string;
|
|
64
|
+
properties: {
|
|
65
|
+
_text: string;
|
|
66
|
+
};
|
|
67
|
+
scope: {};
|
|
68
|
+
} | {
|
|
69
|
+
"@type": string;
|
|
70
|
+
bindings: {
|
|
71
|
+
class: {
|
|
72
|
+
code: string;
|
|
73
|
+
};
|
|
74
|
+
style: {
|
|
75
|
+
code: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
children: ({
|
|
79
|
+
"@type": string;
|
|
80
|
+
bindings: {
|
|
81
|
+
when?: undefined;
|
|
82
|
+
};
|
|
83
|
+
children: never[];
|
|
84
|
+
meta: {};
|
|
85
|
+
name: string;
|
|
86
|
+
properties: {
|
|
87
|
+
_text: string;
|
|
88
|
+
};
|
|
89
|
+
scope: {};
|
|
90
|
+
} | {
|
|
91
|
+
"@type": string;
|
|
92
|
+
bindings: {
|
|
93
|
+
when: {
|
|
94
|
+
code: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
children: ({
|
|
98
|
+
"@type": string;
|
|
99
|
+
bindings: {
|
|
100
|
+
alt?: undefined;
|
|
101
|
+
src?: undefined;
|
|
102
|
+
};
|
|
103
|
+
children: never[];
|
|
104
|
+
meta: {};
|
|
105
|
+
name: string;
|
|
106
|
+
properties: {
|
|
107
|
+
_text: string;
|
|
108
|
+
class?: undefined;
|
|
109
|
+
};
|
|
110
|
+
scope: {};
|
|
111
|
+
} | {
|
|
112
|
+
"@type": string;
|
|
113
|
+
bindings: {
|
|
114
|
+
alt: {
|
|
115
|
+
code: string;
|
|
116
|
+
};
|
|
117
|
+
src: {
|
|
118
|
+
code: string;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
children: never[];
|
|
122
|
+
meta: {};
|
|
123
|
+
name: string;
|
|
124
|
+
properties: {
|
|
125
|
+
class: string;
|
|
126
|
+
_text?: undefined;
|
|
127
|
+
};
|
|
128
|
+
scope: {};
|
|
129
|
+
})[];
|
|
130
|
+
meta: {};
|
|
131
|
+
name: string;
|
|
132
|
+
properties: {
|
|
133
|
+
_text?: undefined;
|
|
134
|
+
};
|
|
135
|
+
scope: {};
|
|
136
|
+
} | {
|
|
137
|
+
"@type": string;
|
|
138
|
+
bindings: {
|
|
139
|
+
when: {
|
|
140
|
+
code: string;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
children: ({
|
|
144
|
+
"@type": string;
|
|
145
|
+
bindings: {};
|
|
146
|
+
children: never[];
|
|
147
|
+
meta: {};
|
|
148
|
+
name: string;
|
|
149
|
+
properties: {
|
|
150
|
+
_text: string;
|
|
151
|
+
};
|
|
152
|
+
scope: {};
|
|
153
|
+
} | {
|
|
154
|
+
"@type": string;
|
|
155
|
+
bindings: {};
|
|
156
|
+
children: {
|
|
157
|
+
"@type": string;
|
|
158
|
+
bindings: {
|
|
159
|
+
_text: {
|
|
160
|
+
code: string;
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
children: never[];
|
|
164
|
+
meta: {};
|
|
165
|
+
name: string;
|
|
166
|
+
properties: {};
|
|
167
|
+
scope: {};
|
|
168
|
+
}[];
|
|
169
|
+
meta: {};
|
|
170
|
+
name: string;
|
|
171
|
+
properties: {
|
|
172
|
+
_text?: undefined;
|
|
173
|
+
};
|
|
174
|
+
scope: {};
|
|
175
|
+
})[];
|
|
176
|
+
meta: {};
|
|
177
|
+
name: string;
|
|
178
|
+
properties: {
|
|
179
|
+
_text?: undefined;
|
|
180
|
+
};
|
|
181
|
+
scope: {};
|
|
182
|
+
})[];
|
|
183
|
+
meta: {};
|
|
184
|
+
name: string;
|
|
185
|
+
properties: {
|
|
186
|
+
_text?: undefined;
|
|
187
|
+
};
|
|
188
|
+
scope: {};
|
|
189
|
+
})[];
|
|
190
|
+
meta: {};
|
|
191
|
+
name: string;
|
|
192
|
+
properties: {
|
|
193
|
+
_text?: undefined;
|
|
194
|
+
};
|
|
195
|
+
scope: {};
|
|
196
|
+
})[];
|
|
197
|
+
meta: {};
|
|
198
|
+
name: string;
|
|
199
|
+
properties: {
|
|
200
|
+
_text?: undefined;
|
|
201
|
+
};
|
|
202
|
+
scope: {};
|
|
203
|
+
})[];
|
|
204
|
+
meta: {};
|
|
205
|
+
name: string;
|
|
206
|
+
properties: {};
|
|
207
|
+
scope: {};
|
|
208
|
+
}[];
|
|
209
|
+
context: {
|
|
210
|
+
get: {};
|
|
211
|
+
set: {};
|
|
212
|
+
};
|
|
213
|
+
exports: {
|
|
214
|
+
avatarService: {
|
|
215
|
+
code: string;
|
|
216
|
+
isFunction: boolean;
|
|
217
|
+
usedInLocal: boolean;
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
hooks: {
|
|
221
|
+
onMount: {
|
|
222
|
+
code: string;
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
imports: {
|
|
226
|
+
imports: {};
|
|
227
|
+
path: string;
|
|
228
|
+
}[];
|
|
229
|
+
inputs: never[];
|
|
230
|
+
meta: {
|
|
231
|
+
useMetadata: {
|
|
232
|
+
isAttachedToShadowDom: boolean;
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
name: string;
|
|
236
|
+
propsTypeRef: string;
|
|
237
|
+
refs: {};
|
|
238
|
+
state: {
|
|
239
|
+
classes: {
|
|
240
|
+
code: {
|
|
241
|
+
base: string;
|
|
242
|
+
container: string;
|
|
243
|
+
};
|
|
244
|
+
type: string;
|
|
245
|
+
};
|
|
246
|
+
initials: {
|
|
247
|
+
code: null;
|
|
248
|
+
type: string;
|
|
249
|
+
};
|
|
250
|
+
loaded: {
|
|
251
|
+
code: boolean;
|
|
252
|
+
type: string;
|
|
253
|
+
};
|
|
254
|
+
source: {
|
|
255
|
+
code: null;
|
|
256
|
+
type: string;
|
|
257
|
+
};
|
|
258
|
+
styles: {
|
|
259
|
+
code: {
|
|
260
|
+
container: null;
|
|
261
|
+
};
|
|
262
|
+
type: string;
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
subComponents: never[];
|
|
266
|
+
types: string[];
|
|
267
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseProps, BaseState, CSS, Dynamic, Variant } from '~/models';
|
|
2
|
+
export declare type AvatarProps = {
|
|
3
|
+
variant?: Dynamic<Variant>;
|
|
4
|
+
name?: string;
|
|
5
|
+
unavatar?: string;
|
|
6
|
+
url?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
} & BaseProps;
|
|
9
|
+
export declare type AvatarState = {
|
|
10
|
+
classes: {
|
|
11
|
+
base: string;
|
|
12
|
+
container: string;
|
|
13
|
+
};
|
|
14
|
+
styles: {
|
|
15
|
+
container: CSS;
|
|
16
|
+
};
|
|
17
|
+
initials: string;
|
|
18
|
+
source: string;
|
|
19
|
+
} & BaseState;
|
|
@@ -22,4 +22,4 @@ export declare const srcSetToUse: (props: any, state: any) => any;
|
|
|
22
22
|
export declare const webpSrcSet: (props: any, state: any) => any;
|
|
23
23
|
export declare const Image: import("@builder.io/qwik").Component<ImageProps>;
|
|
24
24
|
export default Image;
|
|
25
|
-
export declare const STYLES = ".
|
|
25
|
+
export declare const STYLES = ".img-Image { \nopacity: 1;\ntransition: opacity 0.2s ease-in-out;\nposition: absolute;\nheight: 100%;\nwidth: 100%;\ntop: 0px;\nleft: 0px; }.div-Image { \nwidth: 100%;\npointer-events: none;\nfont-size: 0; }.div-Image-2 { \ndisplay: flex;\nflex-direction: column;\nalign-items: stretch;\nposition: absolute;\ntop: 0;\nleft: 0;\nwidth: 100%;\nheight: 100%; }";
|
|
@@ -16,5 +16,6 @@ export interface SymbolProps {
|
|
|
16
16
|
attributes?: any;
|
|
17
17
|
inheritState?: boolean;
|
|
18
18
|
}
|
|
19
|
+
export declare const contentToUse: (props: any, state: any, builderContext: any) => any;
|
|
19
20
|
export declare const Symbol: import("@builder.io/qwik").Component<SymbolProps>;
|
|
20
21
|
export default Symbol;
|
package/types/blocks/util.d.ts
CHANGED
|
@@ -21,5 +21,6 @@ export declare const videoProps: (props: any, state: any) => {
|
|
|
21
21
|
muted?: boolean | undefined;
|
|
22
22
|
autoPlay?: boolean | undefined;
|
|
23
23
|
};
|
|
24
|
+
export declare const spreadProps: (props: any, state: any) => any;
|
|
24
25
|
export declare const Video: import("@builder.io/qwik").Component<VideoProps>;
|
|
25
26
|
export default Video;
|
|
@@ -1,31 +1,46 @@
|
|
|
1
1
|
import type { BuilderContextInterface } from "../../context/types.js";
|
|
2
2
|
import type { BuilderBlock } from "../../types/builder-block.js";
|
|
3
|
+
import type { RenderComponentProps } from "./render-component";
|
|
3
4
|
import type { RepeatData } from "./types.js";
|
|
4
5
|
export declare type RenderBlockProps = {
|
|
5
6
|
block: BuilderBlock;
|
|
6
7
|
context: BuilderContextInterface;
|
|
7
8
|
};
|
|
8
9
|
export declare const component: (props: any, state: any) => any;
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const componentRef: (props: any, state: any) => any;
|
|
11
|
-
export declare const tagName: (props: any, state: any) => string;
|
|
10
|
+
export declare const tag: (props: any, state: any) => string;
|
|
12
11
|
export declare const useBlock: (props: any, state: any) => any;
|
|
13
12
|
export declare const attributes: (props: any, state: any) => {
|
|
14
|
-
style
|
|
13
|
+
style?: CSSStyleDeclaration | Record<string, string | undefined> | undefined;
|
|
15
14
|
'builder-id': string | undefined;
|
|
16
15
|
class: string;
|
|
17
16
|
};
|
|
18
17
|
export declare const shouldWrap: (props: any, state: any) => boolean;
|
|
19
|
-
export declare const componentOptions: (props: any, state: any) => any;
|
|
20
18
|
export declare const renderComponentProps: (props: any, state: any) => {
|
|
21
19
|
blockChildren: any;
|
|
22
20
|
componentRef: any;
|
|
23
21
|
componentOptions: any;
|
|
24
|
-
context:
|
|
22
|
+
context: {
|
|
23
|
+
apiKey: any;
|
|
24
|
+
state: any;
|
|
25
|
+
content: any;
|
|
26
|
+
context: any;
|
|
27
|
+
registeredComponents: any;
|
|
28
|
+
inheritedStyles: Partial<CSSStyleDeclaration>;
|
|
29
|
+
};
|
|
25
30
|
};
|
|
26
|
-
export declare const
|
|
31
|
+
export declare const useChildren: (props: any, state: any) => any;
|
|
27
32
|
export declare const childrenWithoutParentComponent: (props: any, state: any) => any;
|
|
28
33
|
export declare const repeatItemData: (props: any, state: any) => RepeatData[] | undefined;
|
|
34
|
+
export declare const inheritedTextStyles: (props: any, state: any) => Partial<CSSStyleDeclaration>;
|
|
35
|
+
export declare const childrenContext: (props: any, state: any) => {
|
|
36
|
+
apiKey: any;
|
|
37
|
+
state: any;
|
|
38
|
+
content: any;
|
|
39
|
+
context: any;
|
|
40
|
+
registeredComponents: any;
|
|
41
|
+
inheritedStyles: Partial<CSSStyleDeclaration>;
|
|
42
|
+
};
|
|
43
|
+
export declare const renderComponentTag: (props: any, state: any) => import("@builder.io/qwik").Component<RenderComponentProps> | "RenderComponent";
|
|
29
44
|
export declare const RenderBlock: (props: RenderBlockProps & {
|
|
30
45
|
key?: any;
|
|
31
46
|
}) => import("@builder.io/qwik/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,7 @@ export declare type RenderBlockProps = {
|
|
|
3
3
|
blocks?: BuilderBlock[];
|
|
4
4
|
parent?: string;
|
|
5
5
|
path?: string;
|
|
6
|
-
|
|
6
|
+
styleProp?: Record<string, any>;
|
|
7
7
|
};
|
|
8
8
|
export declare const className: (props: any, state: any, builderContext: any) => string;
|
|
9
9
|
export declare const onClick: (props: any, state: any, builderContext: any) => void;
|
|
@@ -2,7 +2,7 @@ interface Props {
|
|
|
2
2
|
styles: string;
|
|
3
3
|
}
|
|
4
4
|
export declare const injectedStyleScript: (props: any, state: any) => string;
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const tag: (props: any, state: any) => string;
|
|
6
6
|
export declare const RenderInlinedStyles: (props: Props & {
|
|
7
7
|
key?: any;
|
|
8
8
|
}) => import("@builder.io/qwik/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,13 @@
|
|
|
1
1
|
export declare type SizeName = 'large' | 'medium' | 'small';
|
|
2
|
-
|
|
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 {};
|
package/types/context/types.d.ts
CHANGED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { BuilderContextInterface } from '../context/types.js';
|
|
2
|
+
import type { BuilderBlock } from '../types/builder-block.js';
|
|
3
|
+
export declare function getReactNativeBlockStyles({ block, context, }: {
|
|
4
|
+
block: BuilderBlock;
|
|
5
|
+
context: BuilderContextInterface;
|
|
6
|
+
}): CSSStyleDeclaration | Record<string, string | undefined>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function markMutable<T>(value: T): T;
|
|
2
|
-
export declare function markPropsMutable<T>(props: T): T;
|
|
1
|
+
export declare function markMutable<T = any>(value: T): T;
|
|
2
|
+
export declare function markPropsMutable<T = any>(props: T): T;
|
|
@@ -8,7 +8,7 @@ export declare const components: RegisteredComponent[];
|
|
|
8
8
|
* @deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK.
|
|
9
9
|
*/
|
|
10
10
|
export declare function registerComponent(component: any, info: ComponentInfo): void;
|
|
11
|
-
export declare const createRegisterComponentMessage: ({ component, ...info }: RegisteredComponent) => {
|
|
11
|
+
export declare const createRegisterComponentMessage: ({ component: _, ...info }: RegisteredComponent) => {
|
|
12
12
|
type: string;
|
|
13
13
|
data: ComponentInfo;
|
|
14
14
|
};
|
|
@@ -2,20 +2,50 @@ import type { CanTrack } from '../types/can-track.js';
|
|
|
2
2
|
interface Event {
|
|
3
3
|
type: 'click' | 'impression';
|
|
4
4
|
data: {
|
|
5
|
+
/**
|
|
6
|
+
* (Optional) The content's ID. Useful if this event pertains to a specific piece of content.
|
|
7
|
+
*/
|
|
5
8
|
contentId?: string;
|
|
9
|
+
/**
|
|
10
|
+
* This is the ID of the space that the content belongs to.
|
|
11
|
+
*/
|
|
6
12
|
ownerId: string;
|
|
13
|
+
/**
|
|
14
|
+
* Stringified JSON object containing any additional metadata you want to track.
|
|
15
|
+
*/
|
|
7
16
|
metadata?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Session ID of the user. This is provided by the SDK by checking session storage.
|
|
19
|
+
*/
|
|
8
20
|
sessionId: string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Visitor ID of the user. This is provided by the SDK by checking cookies.
|
|
23
|
+
*/
|
|
9
24
|
visitorId: string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* (Optional) If running an A/B test, the ID of the variation that the user is in.
|
|
27
|
+
*/
|
|
28
|
+
variationId?: string;
|
|
10
29
|
[index: string]: any;
|
|
11
30
|
};
|
|
12
31
|
}
|
|
13
|
-
declare type EventProperties = {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
32
|
+
declare type EventProperties = Pick<Event, 'type'> & Pick<Event['data'], 'contentId' | 'variationId'> & {
|
|
33
|
+
/**
|
|
34
|
+
* Your organization's API key.
|
|
35
|
+
*/
|
|
36
|
+
apiKey: Event['data']['ownerId'];
|
|
37
|
+
/**
|
|
38
|
+
* (Optional) metadata that you want to provide with your event.
|
|
39
|
+
*/
|
|
40
|
+
metadata?: {
|
|
41
|
+
[index: string]: any;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* (Optional) Any additional (non-metadata) properties to add to the event.
|
|
45
|
+
*/
|
|
17
46
|
[index: string]: any;
|
|
18
47
|
};
|
|
19
48
|
export declare type EventProps = EventProperties & CanTrack;
|
|
20
|
-
export declare function
|
|
49
|
+
export declare function _track(eventProps: EventProps): Promise<void | Response>;
|
|
50
|
+
export declare const track: (args: EventProperties) => Promise<void | Response>;
|
|
21
51
|
export {};
|
package/types/helpers/css.d.ts
CHANGED
|
@@ -1 +1,5 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const createCssClass: ({ mediaQuery, className, styles, }: {
|
|
2
|
+
mediaQuery?: string | undefined;
|
|
3
|
+
className: string;
|
|
4
|
+
styles: Partial<CSSStyleDeclaration>;
|
|
5
|
+
}) => string;
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
export * from './index-helpers/top-of-file.js';
|
|
2
2
|
import './scripts/init-editing.js';
|
|
3
3
|
export * from './index-helpers/blocks-exports.js';
|
|
4
4
|
export * from './functions/is-editing.js';
|
|
@@ -8,3 +8,6 @@ export * from './functions/register.js';
|
|
|
8
8
|
export * from './functions/set-editor-settings.js';
|
|
9
9
|
export * from './functions/get-content/index.js';
|
|
10
10
|
export * from './functions/get-builder-search-params/index.js';
|
|
11
|
+
export { track } from './functions/track';
|
|
12
|
+
export type { RegisteredComponent } from './context/types';
|
|
13
|
+
export type { ComponentInfo } from './types/components';
|
|
@@ -18,6 +18,13 @@ export interface BuilderContentVariation {
|
|
|
18
18
|
name?: string;
|
|
19
19
|
testRatio?: number;
|
|
20
20
|
id?: string;
|
|
21
|
+
meta?: {
|
|
22
|
+
breakpoints?: {
|
|
23
|
+
small: number;
|
|
24
|
+
medium: number;
|
|
25
|
+
};
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
};
|
|
21
28
|
}
|
|
22
29
|
export interface BuilderContent extends BuilderContentVariation {
|
|
23
30
|
'@version'?: number;
|