@unlayer/types 1.386.0
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/dist/containers/body.d.ts +162 -0
- package/dist/containers/column.d.ts +85 -0
- package/dist/containers/content.d.ts +62 -0
- package/dist/containers/footer.d.ts +79 -0
- package/dist/containers/header.d.ts +79 -0
- package/dist/containers/index.d.ts +6 -0
- package/dist/containers/row.d.ts +100 -0
- package/dist/design.d.ts +102 -0
- package/dist/editor/audit.d.ts +31 -0
- package/dist/editor/config.d.ts +41 -0
- package/dist/editor/design.d.ts +16 -0
- package/dist/editor/display-conditions.d.ts +5 -0
- package/dist/editor/editor.d.ts +467 -0
- package/dist/editor/export.d.ts +104 -0
- package/dist/editor/features.d.ts +122 -0
- package/dist/editor/font.d.ts +24 -0
- package/dist/editor/index.d.ts +15 -0
- package/dist/editor/intl.d.ts +16 -0
- package/dist/editor/link-types.d.ts +72 -0
- package/dist/editor/merge-tags.d.ts +28 -0
- package/dist/editor/style-guide.d.ts +20 -0
- package/dist/editor/theme.d.ts +775 -0
- package/dist/editor/types.d.ts +23 -0
- package/dist/editor/utils.d.ts +88 -0
- package/dist/index.d.ts +3 -0
- package/dist/tools/button.d.ts +111 -0
- package/dist/tools/carousel.d.ts +52 -0
- package/dist/tools/divider.d.ts +54 -0
- package/dist/tools/form.d.ts +159 -0
- package/dist/tools/heading.d.ts +79 -0
- package/dist/tools/html.d.ts +48 -0
- package/dist/tools/image.d.ts +75 -0
- package/dist/tools/index.d.ts +17 -0
- package/dist/tools/menu.d.ts +91 -0
- package/dist/tools/page-break.d.ts +57 -0
- package/dist/tools/paragraph.d.ts +76 -0
- package/dist/tools/social.d.ts +58 -0
- package/dist/tools/table.d.ts +178 -0
- package/dist/tools/text.d.ts +76 -0
- package/dist/tools/timer.d.ts +87 -0
- package/dist/tools/video.d.ts +72 -0
- package/package.json +44 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Auto-generated by build-values-types.js. Do not edit manually.
|
|
2
|
+
|
|
3
|
+
export type Device = 'desktop' | 'mobile' | 'tablet';
|
|
4
|
+
|
|
5
|
+
export type Resolution = {
|
|
6
|
+
value: number;
|
|
7
|
+
name: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export type DisplayMode = 'email' | 'web' | 'popup' | 'document';
|
|
11
|
+
|
|
12
|
+
export type Variant = 'amp' | null;
|
|
13
|
+
|
|
14
|
+
export type UndoRedoBehavior = 'save' | 'replace' | 'skip';
|
|
15
|
+
|
|
16
|
+
export type Collection = 'pages' | 'bodies' | 'rows' | 'headers' | 'footers' | 'columns' | 'contents';
|
|
17
|
+
|
|
18
|
+
export interface Location {
|
|
19
|
+
collection: Collection;
|
|
20
|
+
id: number | string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type ExporterName = "email" | "web" | "popup" | "document" | "classic" | "ampWeb" | "ampEmail";
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// Auto-generated by build-values-types.js. Do not edit manually.
|
|
2
|
+
|
|
3
|
+
import type { AppearanceConfig } from './theme';
|
|
4
|
+
import type { Device, DisplayMode, Location, UndoRedoBehavior } from './types';
|
|
5
|
+
|
|
6
|
+
export interface EditorProps<Value, WidgetParams = object> {
|
|
7
|
+
value: Value | undefined;
|
|
8
|
+
defaultValue: Value | undefined;
|
|
9
|
+
updateValue: (newValue: Value | undefined, data?: object, options?: {
|
|
10
|
+
deviceOverride?: Device;
|
|
11
|
+
undoRedoBehavior?: UndoRedoBehavior;
|
|
12
|
+
}) => void;
|
|
13
|
+
name: string;
|
|
14
|
+
/** @deprecated Use widgetParams instead */
|
|
15
|
+
data?: WidgetParams;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
isLocked?: boolean;
|
|
18
|
+
lockReason?: 'styleguide' | 'admin' | undefined;
|
|
19
|
+
widgetParams?: WidgetParams;
|
|
20
|
+
deviceName: Device;
|
|
21
|
+
displayMode: DisplayMode;
|
|
22
|
+
label?: string;
|
|
23
|
+
location: Location;
|
|
24
|
+
values: {
|
|
25
|
+
[key: string]: unknown;
|
|
26
|
+
containerPadding?: string;
|
|
27
|
+
};
|
|
28
|
+
rootValues: {
|
|
29
|
+
[key: string]: any;
|
|
30
|
+
_override?: {
|
|
31
|
+
[key: string]: any;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
appearance: AppearanceConfig;
|
|
35
|
+
entitlements: {
|
|
36
|
+
audit?: boolean;
|
|
37
|
+
allowedDomains?: number;
|
|
38
|
+
branding?: boolean;
|
|
39
|
+
collaboration?: boolean;
|
|
40
|
+
displayConditions?: boolean;
|
|
41
|
+
customBlocks?: number;
|
|
42
|
+
customCSS?: boolean;
|
|
43
|
+
customFonts?: boolean;
|
|
44
|
+
customJS?: boolean;
|
|
45
|
+
customTools?: number;
|
|
46
|
+
customTabs?: number;
|
|
47
|
+
customThemes?: boolean;
|
|
48
|
+
imageEditor?: boolean;
|
|
49
|
+
selectImage?: boolean;
|
|
50
|
+
stockImages?: boolean;
|
|
51
|
+
userUploads?: boolean;
|
|
52
|
+
uploadMaxSize?: number;
|
|
53
|
+
};
|
|
54
|
+
item: {
|
|
55
|
+
id: string;
|
|
56
|
+
type?: string;
|
|
57
|
+
slug?: string;
|
|
58
|
+
location?: Location;
|
|
59
|
+
values?: Record<string, any>;
|
|
60
|
+
};
|
|
61
|
+
project: object;
|
|
62
|
+
onImageClick?: (url: string) => void;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export type DeepPartial<T> = T extends object ? {
|
|
66
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
67
|
+
} : T;
|
|
68
|
+
|
|
69
|
+
export type LanguageOverride = {
|
|
70
|
+
[language: string]: {
|
|
71
|
+
[propertyName: string]: string;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export type LanguagesValue = {
|
|
76
|
+
_languages?: LanguageOverride;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
// ───────────────────────────────────────────────────────────────────────────
|
|
80
|
+
// Editor Settings
|
|
81
|
+
// ───────────────────────────────────────────────────────────────────────────
|
|
82
|
+
|
|
83
|
+
export interface OptionGroup<T> {
|
|
84
|
+
label: string;
|
|
85
|
+
options: OptionItem<T>[];
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export type OptionItem<T> = T | OptionGroup<T>;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
// Auto-generated by build-values-types.js. Do not edit manually.
|
|
2
|
+
|
|
3
|
+
import type { DisplayMode, ExporterName } from '../editor/types';
|
|
4
|
+
|
|
5
|
+
export type ButtonValues<
|
|
6
|
+
TDisplayMode extends DisplayMode | undefined = undefined,
|
|
7
|
+
> = {
|
|
8
|
+
text?: string;
|
|
9
|
+
textJson?: string;
|
|
10
|
+
synced: {
|
|
11
|
+
id: string;
|
|
12
|
+
dirty: boolean;
|
|
13
|
+
updatedAt?: string;
|
|
14
|
+
};
|
|
15
|
+
suggestions: never;
|
|
16
|
+
href: {
|
|
17
|
+
name: string;
|
|
18
|
+
attrs?: {
|
|
19
|
+
[x: string]: unknown;
|
|
20
|
+
href?: string;
|
|
21
|
+
target?: string;
|
|
22
|
+
onClick?: unknown;
|
|
23
|
+
class?: string;
|
|
24
|
+
download?: boolean;
|
|
25
|
+
};
|
|
26
|
+
values?: Record<string, string | number | {
|
|
27
|
+
label?: string;
|
|
28
|
+
value?: string | number;
|
|
29
|
+
}[]>;
|
|
30
|
+
};
|
|
31
|
+
size: {
|
|
32
|
+
autoWidth?: boolean;
|
|
33
|
+
width?: number | `${number}px` | `${number}%`;
|
|
34
|
+
};
|
|
35
|
+
fontFamily: {
|
|
36
|
+
label: string;
|
|
37
|
+
value: string;
|
|
38
|
+
defaultFont?: boolean;
|
|
39
|
+
type?: string;
|
|
40
|
+
url?: string;
|
|
41
|
+
weights?: (number | {
|
|
42
|
+
value: number;
|
|
43
|
+
label?: string;
|
|
44
|
+
})[];
|
|
45
|
+
};
|
|
46
|
+
fontWeight: number | {
|
|
47
|
+
value: number;
|
|
48
|
+
label?: string;
|
|
49
|
+
};
|
|
50
|
+
buttonColors: {
|
|
51
|
+
[x: string]: unknown;
|
|
52
|
+
color?: string;
|
|
53
|
+
backgroundColor?: string;
|
|
54
|
+
hoverColor?: string;
|
|
55
|
+
hoverBackgroundColor?: string;
|
|
56
|
+
};
|
|
57
|
+
fontSize: number | `${number}px`;
|
|
58
|
+
lineHeight: string;
|
|
59
|
+
letterSpacing: number | `${number}px`;
|
|
60
|
+
border: {
|
|
61
|
+
borderBottomColor?: string;
|
|
62
|
+
borderBottomStyle?: string;
|
|
63
|
+
borderBottomWidth?: `${number}px`;
|
|
64
|
+
borderLeftColor?: string;
|
|
65
|
+
borderLeftStyle?: string;
|
|
66
|
+
borderLeftWidth?: `${number}px`;
|
|
67
|
+
borderRightColor?: string;
|
|
68
|
+
borderRightStyle?: string;
|
|
69
|
+
borderRightWidth?: `${number}px`;
|
|
70
|
+
borderTopColor?: string;
|
|
71
|
+
borderTopStyle?: string;
|
|
72
|
+
borderTopWidth?: `${number}px`;
|
|
73
|
+
};
|
|
74
|
+
padding: `${number}px` | `${number}px ${number}px` | `${number}px ${number}px ${number}px` | `${number}px ${number}px ${number}px ${number}px`;
|
|
75
|
+
textAlign: "left" | "center" | "right" | "justify";
|
|
76
|
+
borderRadius: `${number}px` | `${number}px ${number}px` | `${number}px ${number}px ${number}px` | `${number}px ${number}px ${number}px ${number}px`;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
import type { BodyValues } from '../containers/body';
|
|
80
|
+
import type { ColumnValues } from '../containers/column';
|
|
81
|
+
import type { ContentValues } from '../containers/content';
|
|
82
|
+
import type { RowValues } from '../containers/row';
|
|
83
|
+
import type { MergeTagsValues } from '../editor/merge-tags';
|
|
84
|
+
|
|
85
|
+
type ButtonExporter = (
|
|
86
|
+
renderValues: ContentValues & ButtonValues,
|
|
87
|
+
index: number, // @deprecated use last param instead
|
|
88
|
+
columnIndex: number, // @deprecated use last param instead
|
|
89
|
+
rowCells: number[], // @deprecated use last param instead
|
|
90
|
+
bodyValues: BodyValues, // @deprecated use last param instead
|
|
91
|
+
rowValues: RowValues, // @deprecated use last param instead
|
|
92
|
+
embeddedValues: Record<string, unknown>, // @deprecated use last param instead
|
|
93
|
+
meta: {
|
|
94
|
+
index: number;
|
|
95
|
+
columnIndex: number;
|
|
96
|
+
columnValues: ColumnValues;
|
|
97
|
+
rowIndex: number;
|
|
98
|
+
rowCells: number[];
|
|
99
|
+
rowValues: RowValues;
|
|
100
|
+
bodyValues: BodyValues;
|
|
101
|
+
|
|
102
|
+
embeddedValues: Record<string, unknown>;
|
|
103
|
+
mergeTagState: {
|
|
104
|
+
mergeTagGroup: string;
|
|
105
|
+
mergeTagRule: string;
|
|
106
|
+
mergeTags: MergeTagsValues;
|
|
107
|
+
};
|
|
108
|
+
},
|
|
109
|
+
) => string;
|
|
110
|
+
|
|
111
|
+
export type ButtonExporters = Partial<Record<ExporterName, ButtonExporter>>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// Auto-generated by build-values-types.js. Do not edit manually.
|
|
2
|
+
|
|
3
|
+
import type { DisplayMode, ExporterName } from '../editor/types';
|
|
4
|
+
|
|
5
|
+
export type CarouselValues<
|
|
6
|
+
TDisplayMode extends DisplayMode | undefined = undefined,
|
|
7
|
+
> = {
|
|
8
|
+
[x: string]: unknown;
|
|
9
|
+
synced: {
|
|
10
|
+
id: string;
|
|
11
|
+
dirty: boolean;
|
|
12
|
+
updatedAt?: string;
|
|
13
|
+
};
|
|
14
|
+
showPreviews: boolean;
|
|
15
|
+
previewWidth: number | `${number}px` | `${number}%` | "auto";
|
|
16
|
+
autoplay: boolean;
|
|
17
|
+
loop: boolean;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
import type { BodyValues } from '../containers/body';
|
|
21
|
+
import type { ColumnValues } from '../containers/column';
|
|
22
|
+
import type { ContentValues } from '../containers/content';
|
|
23
|
+
import type { RowValues } from '../containers/row';
|
|
24
|
+
import type { MergeTagsValues } from '../editor/merge-tags';
|
|
25
|
+
|
|
26
|
+
type CarouselExporter = (
|
|
27
|
+
renderValues: ContentValues & CarouselValues,
|
|
28
|
+
index: number, // @deprecated use last param instead
|
|
29
|
+
columnIndex: number, // @deprecated use last param instead
|
|
30
|
+
rowCells: number[], // @deprecated use last param instead
|
|
31
|
+
bodyValues: BodyValues, // @deprecated use last param instead
|
|
32
|
+
rowValues: RowValues, // @deprecated use last param instead
|
|
33
|
+
embeddedValues: Record<string, unknown>, // @deprecated use last param instead
|
|
34
|
+
meta: {
|
|
35
|
+
index: number;
|
|
36
|
+
columnIndex: number;
|
|
37
|
+
columnValues: ColumnValues;
|
|
38
|
+
rowIndex: number;
|
|
39
|
+
rowCells: number[];
|
|
40
|
+
rowValues: RowValues;
|
|
41
|
+
bodyValues: BodyValues;
|
|
42
|
+
|
|
43
|
+
embeddedValues: Record<string, unknown>;
|
|
44
|
+
mergeTagState: {
|
|
45
|
+
mergeTagGroup: string;
|
|
46
|
+
mergeTagRule: string;
|
|
47
|
+
mergeTags: MergeTagsValues;
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
) => string;
|
|
51
|
+
|
|
52
|
+
export type CarouselExporters = Partial<Record<ExporterName, CarouselExporter>>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Auto-generated by build-values-types.js. Do not edit manually.
|
|
2
|
+
|
|
3
|
+
import type { DisplayMode, ExporterName } from '../editor/types';
|
|
4
|
+
|
|
5
|
+
export type DividerValues<
|
|
6
|
+
TDisplayMode extends DisplayMode | undefined = undefined,
|
|
7
|
+
> = {
|
|
8
|
+
synced: {
|
|
9
|
+
id: string;
|
|
10
|
+
dirty: boolean;
|
|
11
|
+
updatedAt?: string;
|
|
12
|
+
};
|
|
13
|
+
width: number | `${number}px` | `${number}%`;
|
|
14
|
+
border: {
|
|
15
|
+
borderTopColor: string;
|
|
16
|
+
borderTopStyle: "solid" | "dotted" | "dashed";
|
|
17
|
+
borderTopWidth: `${number}px`;
|
|
18
|
+
};
|
|
19
|
+
textAlign: "left" | "center" | "right" | "justify";
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
import type { BodyValues } from '../containers/body';
|
|
23
|
+
import type { ColumnValues } from '../containers/column';
|
|
24
|
+
import type { ContentValues } from '../containers/content';
|
|
25
|
+
import type { RowValues } from '../containers/row';
|
|
26
|
+
import type { MergeTagsValues } from '../editor/merge-tags';
|
|
27
|
+
|
|
28
|
+
type DividerExporter = (
|
|
29
|
+
renderValues: ContentValues & DividerValues,
|
|
30
|
+
index: number, // @deprecated use last param instead
|
|
31
|
+
columnIndex: number, // @deprecated use last param instead
|
|
32
|
+
rowCells: number[], // @deprecated use last param instead
|
|
33
|
+
bodyValues: BodyValues, // @deprecated use last param instead
|
|
34
|
+
rowValues: RowValues, // @deprecated use last param instead
|
|
35
|
+
embeddedValues: Record<string, unknown>, // @deprecated use last param instead
|
|
36
|
+
meta: {
|
|
37
|
+
index: number;
|
|
38
|
+
columnIndex: number;
|
|
39
|
+
columnValues: ColumnValues;
|
|
40
|
+
rowIndex: number;
|
|
41
|
+
rowCells: number[];
|
|
42
|
+
rowValues: RowValues;
|
|
43
|
+
bodyValues: BodyValues;
|
|
44
|
+
|
|
45
|
+
embeddedValues: Record<string, unknown>;
|
|
46
|
+
mergeTagState: {
|
|
47
|
+
mergeTagGroup: string;
|
|
48
|
+
mergeTagRule: string;
|
|
49
|
+
mergeTags: MergeTagsValues;
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
) => string;
|
|
53
|
+
|
|
54
|
+
export type DividerExporters = Partial<Record<ExporterName, DividerExporter>>;
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
// Auto-generated by build-values-types.js. Do not edit manually.
|
|
2
|
+
|
|
3
|
+
import type { DisplayMode, ExporterName } from '../editor/types';
|
|
4
|
+
|
|
5
|
+
export type FormValues<
|
|
6
|
+
TDisplayMode extends DisplayMode | undefined = undefined,
|
|
7
|
+
> = {
|
|
8
|
+
fieldWidth: string;
|
|
9
|
+
synced: {
|
|
10
|
+
id: string;
|
|
11
|
+
dirty: boolean;
|
|
12
|
+
updatedAt?: string;
|
|
13
|
+
};
|
|
14
|
+
fields: {
|
|
15
|
+
type?: string;
|
|
16
|
+
name?: string;
|
|
17
|
+
label?: string;
|
|
18
|
+
options?: string[];
|
|
19
|
+
placeholder_text?: string;
|
|
20
|
+
show_label?: boolean;
|
|
21
|
+
required?: boolean;
|
|
22
|
+
meta_data?: {
|
|
23
|
+
[x: string]: unknown;
|
|
24
|
+
};
|
|
25
|
+
}[];
|
|
26
|
+
action: {
|
|
27
|
+
method?: "GET" | "POST";
|
|
28
|
+
target?: string;
|
|
29
|
+
url?: string;
|
|
30
|
+
};
|
|
31
|
+
fieldBorder: {
|
|
32
|
+
borderBottomColor?: string;
|
|
33
|
+
borderBottomStyle?: string;
|
|
34
|
+
borderBottomWidth?: `${number}px`;
|
|
35
|
+
borderLeftColor?: string;
|
|
36
|
+
borderLeftStyle?: string;
|
|
37
|
+
borderLeftWidth?: `${number}px`;
|
|
38
|
+
borderRightColor?: string;
|
|
39
|
+
borderRightStyle?: string;
|
|
40
|
+
borderRightWidth?: `${number}px`;
|
|
41
|
+
borderTopColor?: string;
|
|
42
|
+
borderTopStyle?: string;
|
|
43
|
+
borderTopWidth?: `${number}px`;
|
|
44
|
+
};
|
|
45
|
+
fieldBorderRadius: `${number}px` | `${number}px ${number}px` | `${number}px ${number}px ${number}px` | `${number}px ${number}px ${number}px ${number}px`;
|
|
46
|
+
fieldPadding: `${number}px` | `${number}px ${number}px` | `${number}px ${number}px ${number}px` | `${number}px ${number}px ${number}px ${number}px`;
|
|
47
|
+
fieldBackgroundColor: string;
|
|
48
|
+
fieldColor: string;
|
|
49
|
+
fieldFontFamily: {
|
|
50
|
+
label: string;
|
|
51
|
+
value: string;
|
|
52
|
+
defaultFont?: boolean;
|
|
53
|
+
type?: string;
|
|
54
|
+
url?: string;
|
|
55
|
+
weights?: (number | {
|
|
56
|
+
value: number;
|
|
57
|
+
label?: string;
|
|
58
|
+
})[];
|
|
59
|
+
};
|
|
60
|
+
fieldFontSize: number | `${number}px`;
|
|
61
|
+
formWidth: {
|
|
62
|
+
autoWidth?: boolean;
|
|
63
|
+
width?: number | `${number}px` | `${number}%`;
|
|
64
|
+
};
|
|
65
|
+
formAlign: "left" | "center" | "right" | "justify";
|
|
66
|
+
fieldDistance: `${number}px`;
|
|
67
|
+
placeholderAlign: "left" | "center" | "right" | "justify";
|
|
68
|
+
labelColor: string;
|
|
69
|
+
labelFontSize: number | `${number}px`;
|
|
70
|
+
labelFontFamily: {
|
|
71
|
+
label: string;
|
|
72
|
+
value: string;
|
|
73
|
+
defaultFont?: boolean;
|
|
74
|
+
type?: string;
|
|
75
|
+
url?: string;
|
|
76
|
+
weights?: (number | {
|
|
77
|
+
value: number;
|
|
78
|
+
label?: string;
|
|
79
|
+
})[];
|
|
80
|
+
};
|
|
81
|
+
labelAlign: "left" | "center" | "right" | "justify";
|
|
82
|
+
labelPadding: `${number}px` | `${number}px ${number}px` | `${number}px ${number}px ${number}px` | `${number}px ${number}px ${number}px ${number}px`;
|
|
83
|
+
buttonColors: {
|
|
84
|
+
[x: string]: unknown;
|
|
85
|
+
color?: string;
|
|
86
|
+
backgroundColor?: string;
|
|
87
|
+
hoverColor?: string;
|
|
88
|
+
hoverBackgroundColor?: string;
|
|
89
|
+
};
|
|
90
|
+
buttonText: string | number;
|
|
91
|
+
buttonAlign: "left" | "center" | "right" | "justify";
|
|
92
|
+
buttonWidth: {
|
|
93
|
+
autoWidth?: boolean;
|
|
94
|
+
width?: number | `${number}px` | `${number}%`;
|
|
95
|
+
};
|
|
96
|
+
buttonFontFamily: {
|
|
97
|
+
label: string;
|
|
98
|
+
value: string;
|
|
99
|
+
defaultFont?: boolean;
|
|
100
|
+
type?: string;
|
|
101
|
+
url?: string;
|
|
102
|
+
weights?: (number | {
|
|
103
|
+
value: number;
|
|
104
|
+
label?: string;
|
|
105
|
+
})[];
|
|
106
|
+
};
|
|
107
|
+
buttonFontSize: number | `${number}px`;
|
|
108
|
+
buttonBorder: {
|
|
109
|
+
borderBottomColor?: string;
|
|
110
|
+
borderBottomStyle?: string;
|
|
111
|
+
borderBottomWidth?: `${number}px`;
|
|
112
|
+
borderLeftColor?: string;
|
|
113
|
+
borderLeftStyle?: string;
|
|
114
|
+
borderLeftWidth?: `${number}px`;
|
|
115
|
+
borderRightColor?: string;
|
|
116
|
+
borderRightStyle?: string;
|
|
117
|
+
borderRightWidth?: `${number}px`;
|
|
118
|
+
borderTopColor?: string;
|
|
119
|
+
borderTopStyle?: string;
|
|
120
|
+
borderTopWidth?: `${number}px`;
|
|
121
|
+
};
|
|
122
|
+
buttonBorderRadius: `${number}px` | `${number}px ${number}px` | `${number}px ${number}px ${number}px` | `${number}px ${number}px ${number}px ${number}px`;
|
|
123
|
+
buttonPadding: `${number}px` | `${number}px ${number}px` | `${number}px ${number}px ${number}px` | `${number}px ${number}px ${number}px ${number}px`;
|
|
124
|
+
buttonMargin: `${number}px` | `${number}px ${number}px` | `${number}px ${number}px ${number}px` | `${number}px ${number}px ${number}px ${number}px`;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
import type { BodyValues } from '../containers/body';
|
|
128
|
+
import type { ColumnValues } from '../containers/column';
|
|
129
|
+
import type { ContentValues } from '../containers/content';
|
|
130
|
+
import type { RowValues } from '../containers/row';
|
|
131
|
+
import type { MergeTagsValues } from '../editor/merge-tags';
|
|
132
|
+
|
|
133
|
+
type FormExporter = (
|
|
134
|
+
renderValues: ContentValues & FormValues,
|
|
135
|
+
index: number, // @deprecated use last param instead
|
|
136
|
+
columnIndex: number, // @deprecated use last param instead
|
|
137
|
+
rowCells: number[], // @deprecated use last param instead
|
|
138
|
+
bodyValues: BodyValues, // @deprecated use last param instead
|
|
139
|
+
rowValues: RowValues, // @deprecated use last param instead
|
|
140
|
+
embeddedValues: Record<string, unknown>, // @deprecated use last param instead
|
|
141
|
+
meta: {
|
|
142
|
+
index: number;
|
|
143
|
+
columnIndex: number;
|
|
144
|
+
columnValues: ColumnValues;
|
|
145
|
+
rowIndex: number;
|
|
146
|
+
rowCells: number[];
|
|
147
|
+
rowValues: RowValues;
|
|
148
|
+
bodyValues: BodyValues;
|
|
149
|
+
|
|
150
|
+
embeddedValues: Record<string, unknown>;
|
|
151
|
+
mergeTagState: {
|
|
152
|
+
mergeTagGroup: string;
|
|
153
|
+
mergeTagRule: string;
|
|
154
|
+
mergeTags: MergeTagsValues;
|
|
155
|
+
};
|
|
156
|
+
},
|
|
157
|
+
) => string;
|
|
158
|
+
|
|
159
|
+
export type FormExporters = Partial<Record<ExporterName, FormExporter>>;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// Auto-generated by build-values-types.js. Do not edit manually.
|
|
2
|
+
|
|
3
|
+
import type { DisplayMode, ExporterName } from '../editor/types';
|
|
4
|
+
|
|
5
|
+
export type HeadingValues<
|
|
6
|
+
TDisplayMode extends DisplayMode | undefined = undefined,
|
|
7
|
+
> = {
|
|
8
|
+
text?: string;
|
|
9
|
+
textJson?: string;
|
|
10
|
+
synced: {
|
|
11
|
+
id: string;
|
|
12
|
+
dirty: boolean;
|
|
13
|
+
updatedAt?: string;
|
|
14
|
+
};
|
|
15
|
+
suggestions: never;
|
|
16
|
+
color: string;
|
|
17
|
+
textAlign: "left" | "center" | "right" | "justify";
|
|
18
|
+
fontFamily: {
|
|
19
|
+
label: string;
|
|
20
|
+
value: string;
|
|
21
|
+
defaultFont?: boolean;
|
|
22
|
+
type?: string;
|
|
23
|
+
url?: string;
|
|
24
|
+
weights?: (number | {
|
|
25
|
+
value: number;
|
|
26
|
+
label?: string;
|
|
27
|
+
})[];
|
|
28
|
+
};
|
|
29
|
+
fontWeight: number | {
|
|
30
|
+
value: number;
|
|
31
|
+
label?: string;
|
|
32
|
+
};
|
|
33
|
+
fontSize: number | `${number}px`;
|
|
34
|
+
lineHeight: string;
|
|
35
|
+
letterSpacing: number | `${number}px`;
|
|
36
|
+
headingType: "h1" | "h2" | "h3" | "h4";
|
|
37
|
+
linkStyle: {
|
|
38
|
+
body?: boolean;
|
|
39
|
+
inherit?: boolean;
|
|
40
|
+
linkColor?: string;
|
|
41
|
+
linkHoverColor?: string;
|
|
42
|
+
linkUnderline?: boolean;
|
|
43
|
+
linkHoverUnderline?: boolean;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
import type { BodyValues } from '../containers/body';
|
|
48
|
+
import type { ColumnValues } from '../containers/column';
|
|
49
|
+
import type { ContentValues } from '../containers/content';
|
|
50
|
+
import type { RowValues } from '../containers/row';
|
|
51
|
+
import type { MergeTagsValues } from '../editor/merge-tags';
|
|
52
|
+
|
|
53
|
+
type HeadingExporter = (
|
|
54
|
+
renderValues: ContentValues & HeadingValues,
|
|
55
|
+
index: number, // @deprecated use last param instead
|
|
56
|
+
columnIndex: number, // @deprecated use last param instead
|
|
57
|
+
rowCells: number[], // @deprecated use last param instead
|
|
58
|
+
bodyValues: BodyValues, // @deprecated use last param instead
|
|
59
|
+
rowValues: RowValues, // @deprecated use last param instead
|
|
60
|
+
embeddedValues: Record<string, unknown>, // @deprecated use last param instead
|
|
61
|
+
meta: {
|
|
62
|
+
index: number;
|
|
63
|
+
columnIndex: number;
|
|
64
|
+
columnValues: ColumnValues;
|
|
65
|
+
rowIndex: number;
|
|
66
|
+
rowCells: number[];
|
|
67
|
+
rowValues: RowValues;
|
|
68
|
+
bodyValues: BodyValues;
|
|
69
|
+
|
|
70
|
+
embeddedValues: Record<string, unknown>;
|
|
71
|
+
mergeTagState: {
|
|
72
|
+
mergeTagGroup: string;
|
|
73
|
+
mergeTagRule: string;
|
|
74
|
+
mergeTags: MergeTagsValues;
|
|
75
|
+
};
|
|
76
|
+
},
|
|
77
|
+
) => string;
|
|
78
|
+
|
|
79
|
+
export type HeadingExporters = Partial<Record<ExporterName, HeadingExporter>>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Auto-generated by build-values-types.js. Do not edit manually.
|
|
2
|
+
|
|
3
|
+
import type { DisplayMode, ExporterName } from '../editor/types';
|
|
4
|
+
|
|
5
|
+
export type HtmlValues<
|
|
6
|
+
TDisplayMode extends DisplayMode | undefined = undefined,
|
|
7
|
+
> = {
|
|
8
|
+
synced: {
|
|
9
|
+
id: string;
|
|
10
|
+
dirty: boolean;
|
|
11
|
+
updatedAt?: string;
|
|
12
|
+
};
|
|
13
|
+
html: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
import type { BodyValues } from '../containers/body';
|
|
17
|
+
import type { ColumnValues } from '../containers/column';
|
|
18
|
+
import type { ContentValues } from '../containers/content';
|
|
19
|
+
import type { RowValues } from '../containers/row';
|
|
20
|
+
import type { MergeTagsValues } from '../editor/merge-tags';
|
|
21
|
+
|
|
22
|
+
type HtmlExporter = (
|
|
23
|
+
renderValues: ContentValues & HtmlValues,
|
|
24
|
+
index: number, // @deprecated use last param instead
|
|
25
|
+
columnIndex: number, // @deprecated use last param instead
|
|
26
|
+
rowCells: number[], // @deprecated use last param instead
|
|
27
|
+
bodyValues: BodyValues, // @deprecated use last param instead
|
|
28
|
+
rowValues: RowValues, // @deprecated use last param instead
|
|
29
|
+
embeddedValues: Record<string, unknown>, // @deprecated use last param instead
|
|
30
|
+
meta: {
|
|
31
|
+
index: number;
|
|
32
|
+
columnIndex: number;
|
|
33
|
+
columnValues: ColumnValues;
|
|
34
|
+
rowIndex: number;
|
|
35
|
+
rowCells: number[];
|
|
36
|
+
rowValues: RowValues;
|
|
37
|
+
bodyValues: BodyValues;
|
|
38
|
+
|
|
39
|
+
embeddedValues: Record<string, unknown>;
|
|
40
|
+
mergeTagState: {
|
|
41
|
+
mergeTagGroup: string;
|
|
42
|
+
mergeTagRule: string;
|
|
43
|
+
mergeTags: MergeTagsValues;
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
) => string;
|
|
47
|
+
|
|
48
|
+
export type HtmlExporters = Partial<Record<ExporterName, HtmlExporter>>;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// Auto-generated by build-values-types.js. Do not edit manually.
|
|
2
|
+
|
|
3
|
+
import type { DisplayMode, ExporterName } from '../editor/types';
|
|
4
|
+
|
|
5
|
+
export type ImageValues<
|
|
6
|
+
TDisplayMode extends DisplayMode | undefined = undefined,
|
|
7
|
+
> = {
|
|
8
|
+
synced: {
|
|
9
|
+
id: string;
|
|
10
|
+
dirty: boolean;
|
|
11
|
+
updatedAt?: string;
|
|
12
|
+
};
|
|
13
|
+
suggestions: never;
|
|
14
|
+
textAlign: "left" | "center" | "right" | "justify";
|
|
15
|
+
src: {
|
|
16
|
+
[x: string]: unknown;
|
|
17
|
+
url: string;
|
|
18
|
+
width?: number;
|
|
19
|
+
height?: number;
|
|
20
|
+
autoWidth?: boolean;
|
|
21
|
+
maxWidth?: `${number}%`;
|
|
22
|
+
optimistic?: boolean;
|
|
23
|
+
dynamic?: boolean;
|
|
24
|
+
};
|
|
25
|
+
altText: string | number;
|
|
26
|
+
action: {
|
|
27
|
+
name: string;
|
|
28
|
+
attrs?: {
|
|
29
|
+
[x: string]: unknown;
|
|
30
|
+
href?: string;
|
|
31
|
+
target?: string;
|
|
32
|
+
onClick?: unknown;
|
|
33
|
+
class?: string;
|
|
34
|
+
download?: boolean;
|
|
35
|
+
};
|
|
36
|
+
values?: Record<string, string | number | {
|
|
37
|
+
label?: string;
|
|
38
|
+
value?: string | number;
|
|
39
|
+
}[]>;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
import type { BodyValues } from '../containers/body';
|
|
44
|
+
import type { ColumnValues } from '../containers/column';
|
|
45
|
+
import type { ContentValues } from '../containers/content';
|
|
46
|
+
import type { RowValues } from '../containers/row';
|
|
47
|
+
import type { MergeTagsValues } from '../editor/merge-tags';
|
|
48
|
+
|
|
49
|
+
type ImageExporter = (
|
|
50
|
+
renderValues: ContentValues & ImageValues,
|
|
51
|
+
index: number, // @deprecated use last param instead
|
|
52
|
+
columnIndex: number, // @deprecated use last param instead
|
|
53
|
+
rowCells: number[], // @deprecated use last param instead
|
|
54
|
+
bodyValues: BodyValues, // @deprecated use last param instead
|
|
55
|
+
rowValues: RowValues, // @deprecated use last param instead
|
|
56
|
+
embeddedValues: Record<string, unknown>, // @deprecated use last param instead
|
|
57
|
+
meta: {
|
|
58
|
+
index: number;
|
|
59
|
+
columnIndex: number;
|
|
60
|
+
columnValues: ColumnValues;
|
|
61
|
+
rowIndex: number;
|
|
62
|
+
rowCells: number[];
|
|
63
|
+
rowValues: RowValues;
|
|
64
|
+
bodyValues: BodyValues;
|
|
65
|
+
|
|
66
|
+
embeddedValues: Record<string, unknown>;
|
|
67
|
+
mergeTagState: {
|
|
68
|
+
mergeTagGroup: string;
|
|
69
|
+
mergeTagRule: string;
|
|
70
|
+
mergeTags: MergeTagsValues;
|
|
71
|
+
};
|
|
72
|
+
},
|
|
73
|
+
) => string;
|
|
74
|
+
|
|
75
|
+
export type ImageExporters = Partial<Record<ExporterName, ImageExporter>>;
|