@cymbal/atoms-email-renderer 0.0.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/index.cjs +966 -0
- package/dist/index.d.ts +527 -0
- package/dist/index.mjs +964 -0
- package/package.json +28 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,527 @@
|
|
|
1
|
+
declare const directions: readonly ["desc", "asc"];
|
|
2
|
+
type Direction = (typeof directions)[number];
|
|
3
|
+
|
|
4
|
+
type LookaheadUnit = "days" | "weeks" | "months";
|
|
5
|
+
|
|
6
|
+
type LegoEventOrderBy = "event-start-time" | "event-published-time";
|
|
7
|
+
|
|
8
|
+
type AutomationDateVariableFormat = "Mon January 1, 2024" | "January 1, 2024" | "January 1" | "January" | "Jan 1" | "Mon Jan 1" | "Mon 1/1" | "1/1" | "1.1" | "MM/DD/YY" | "Monday" | "In X days" | "Monday, January 1";
|
|
9
|
+
type AutomationTimeVariableFormat = "3:04PM" | "3:04PM MST";
|
|
10
|
+
|
|
11
|
+
interface DynamicDataSetting {
|
|
12
|
+
id: number;
|
|
13
|
+
contact_first_name_all_caps: boolean;
|
|
14
|
+
contact_full_name_all_caps: boolean;
|
|
15
|
+
contact_last_name_all_caps: boolean;
|
|
16
|
+
event_date_all_caps: boolean;
|
|
17
|
+
event_description_all_caps: boolean;
|
|
18
|
+
event_name_all_caps: boolean;
|
|
19
|
+
event_description_character_limit: number;
|
|
20
|
+
event_date_format: AutomationDateVariableFormat;
|
|
21
|
+
event_time_format: AutomationTimeVariableFormat;
|
|
22
|
+
event_door_open_time_format: AutomationTimeVariableFormat;
|
|
23
|
+
}
|
|
24
|
+
type TextEventDynamicDataType = "event-name" | "event-link" | "event-link-with-text" | "event-location-address" | "event-location-name" | "event-lowest-ticket-price" | "event-lineup";
|
|
25
|
+
type DescriptionEventDynamicDataType = "event-description";
|
|
26
|
+
type DateEventDynamicDataType = "event-start-date";
|
|
27
|
+
type TimeEventDynamicDataType = "event-start-time" | "event-door-open-time";
|
|
28
|
+
type ContactDynamicDataType = "contact-first-name" | "contact-last-name" | "contact-full-name";
|
|
29
|
+
type AttributeDynamicDataType = `attribute-${number}`;
|
|
30
|
+
interface BaseDynamicDataConfig {
|
|
31
|
+
uuid: string;
|
|
32
|
+
fallback_text: string;
|
|
33
|
+
}
|
|
34
|
+
interface BaseTextDynamicDataConfig extends BaseDynamicDataConfig {
|
|
35
|
+
all_caps: boolean;
|
|
36
|
+
}
|
|
37
|
+
type TextDynamicDataConfigType = TextEventDynamicDataType | ContactDynamicDataType | AttributeDynamicDataType;
|
|
38
|
+
interface TextDynamicDataConfig extends BaseTextDynamicDataConfig {
|
|
39
|
+
dynamic_data_type: TextDynamicDataConfigType;
|
|
40
|
+
config_type: "text";
|
|
41
|
+
}
|
|
42
|
+
interface DateDynamicDataConfig extends BaseTextDynamicDataConfig {
|
|
43
|
+
dynamic_data_type: DateEventDynamicDataType;
|
|
44
|
+
date_format: AutomationDateVariableFormat;
|
|
45
|
+
config_type: "date";
|
|
46
|
+
}
|
|
47
|
+
interface TimeDynamicDataConfig extends BaseTextDynamicDataConfig {
|
|
48
|
+
dynamic_data_type: TimeEventDynamicDataType;
|
|
49
|
+
time_format: AutomationTimeVariableFormat;
|
|
50
|
+
config_type: "time";
|
|
51
|
+
}
|
|
52
|
+
interface DescriptionDynamicDataConfig extends BaseTextDynamicDataConfig {
|
|
53
|
+
dynamic_data_type: DescriptionEventDynamicDataType;
|
|
54
|
+
character_limit: number;
|
|
55
|
+
config_type: "description";
|
|
56
|
+
}
|
|
57
|
+
interface NumberDynamicDataConfig extends BaseDynamicDataConfig {
|
|
58
|
+
dynamic_data_type: AttributeDynamicDataType;
|
|
59
|
+
config_type: "number";
|
|
60
|
+
}
|
|
61
|
+
interface WriteWithAISingleEventConfig extends BaseDynamicDataConfig {
|
|
62
|
+
dynamic_data_type: "write-with-ai-single-event";
|
|
63
|
+
example_message: string;
|
|
64
|
+
}
|
|
65
|
+
interface WriteWithAIUpcomingEventsConfig extends BaseDynamicDataConfig {
|
|
66
|
+
dynamic_data_type: "write-with-ai-upcoming-events";
|
|
67
|
+
example_message: string;
|
|
68
|
+
event_lookahead_after_unit?: LookaheadUnit;
|
|
69
|
+
event_lookahead_after_amount?: number;
|
|
70
|
+
event_lookahead_unit: LookaheadUnit;
|
|
71
|
+
event_lookahead_amount: number;
|
|
72
|
+
event_order_by: LegoEventOrderBy;
|
|
73
|
+
event_order_by_direction: Direction;
|
|
74
|
+
max_events: number;
|
|
75
|
+
include_tag_ids: number[];
|
|
76
|
+
exclude_tag_ids: number[];
|
|
77
|
+
include_genres: string[];
|
|
78
|
+
exclude_genres: string[];
|
|
79
|
+
}
|
|
80
|
+
type DynamicDataConfig = WriteWithAISingleEventConfig | WriteWithAIUpcomingEventsConfig | TextDynamicDataConfig | DateDynamicDataConfig | TimeDynamicDataConfig | DescriptionDynamicDataConfig | NumberDynamicDataConfig;
|
|
81
|
+
type DynamicDataConfigs = Record<string, DynamicDataConfig> | null;
|
|
82
|
+
|
|
83
|
+
type VerticalAlign = "top" | "middle" | "bottom";
|
|
84
|
+
/** Row container: how narrower children align in the cross-axis of a vertical stack. */
|
|
85
|
+
type RowHorizontalAlign = "left" | "center" | "right";
|
|
86
|
+
/**
|
|
87
|
+
* Positions the atom’s box horizontally within its parent (separate from `textStyles.align`).
|
|
88
|
+
* `inherit` follows the nearest ancestor row’s `rowsStyles.horizontalAlign` (fallback `left`).
|
|
89
|
+
*/
|
|
90
|
+
type LayoutHorizontalAlign = "inherit" | RowHorizontalAlign;
|
|
91
|
+
interface Padding {
|
|
92
|
+
top: number;
|
|
93
|
+
right: number;
|
|
94
|
+
bottom: number;
|
|
95
|
+
left: number;
|
|
96
|
+
}
|
|
97
|
+
interface Margin {
|
|
98
|
+
top: number;
|
|
99
|
+
bottom: number;
|
|
100
|
+
}
|
|
101
|
+
interface AtomBackgroundColor {
|
|
102
|
+
type: "color";
|
|
103
|
+
color: string;
|
|
104
|
+
}
|
|
105
|
+
type AtomBackgroundImageSize = "cover" | "contain" | "auto";
|
|
106
|
+
interface AtomBackgroundImage {
|
|
107
|
+
type: "image";
|
|
108
|
+
color: string;
|
|
109
|
+
imageUrl: string;
|
|
110
|
+
imageSize: AtomBackgroundImageSize;
|
|
111
|
+
imageRepeat: boolean;
|
|
112
|
+
}
|
|
113
|
+
type AtomBackground = AtomBackgroundColor | AtomBackgroundImage;
|
|
114
|
+
type AtomBorderSide = "all" | "left" | "right" | "top" | "bottom";
|
|
115
|
+
interface AtomBorder {
|
|
116
|
+
color: string;
|
|
117
|
+
width: number;
|
|
118
|
+
style: "solid" | "dashed" | "dotted";
|
|
119
|
+
side: AtomBorderSide;
|
|
120
|
+
}
|
|
121
|
+
/** Integer flex weight (default 100); minimum 1. `max: "none"` means uncapped width. */
|
|
122
|
+
interface LayoutWidth {
|
|
123
|
+
basis: number;
|
|
124
|
+
max: number | "none";
|
|
125
|
+
}
|
|
126
|
+
interface CornerRadius {
|
|
127
|
+
topLeft: number;
|
|
128
|
+
topRight: number;
|
|
129
|
+
bottomRight: number;
|
|
130
|
+
bottomLeft: number;
|
|
131
|
+
}
|
|
132
|
+
interface LayoutStyles {
|
|
133
|
+
margin: Margin;
|
|
134
|
+
padding: Padding;
|
|
135
|
+
background: AtomBackground | "none";
|
|
136
|
+
border: AtomBorder | "none";
|
|
137
|
+
borderRadius: CornerRadius;
|
|
138
|
+
width: LayoutWidth;
|
|
139
|
+
horizontalAlign: LayoutHorizontalAlign;
|
|
140
|
+
}
|
|
141
|
+
type NullableOverride<T> = {
|
|
142
|
+
[K in keyof T]: T[K] | null;
|
|
143
|
+
};
|
|
144
|
+
/** On atom instances, `null` means “use this element type’s defaults” (same as the matching entry in `globalAtomStyles`). */
|
|
145
|
+
type NullableLayoutStyles = NullableOverride<LayoutStyles>;
|
|
146
|
+
interface AtomTextStyles {
|
|
147
|
+
color: string;
|
|
148
|
+
fontWeight: AtomFontWeight;
|
|
149
|
+
fontStyle: AtomFontStyle;
|
|
150
|
+
textTransform: AtomTextTransform;
|
|
151
|
+
textDecoration: AtomTextDecoration;
|
|
152
|
+
fontSizePx: number;
|
|
153
|
+
fontFamily: AtomFontFamily;
|
|
154
|
+
align: AtomTextAlign;
|
|
155
|
+
lineHeight: number;
|
|
156
|
+
letterSpacingEm: number;
|
|
157
|
+
}
|
|
158
|
+
type NullableAtomTextStyles = NullableOverride<AtomTextStyles>;
|
|
159
|
+
type TextType = "title" | "subtitle" | "heading" | "subheading" | "section" | "body" | "accent" | "caption" | "promo";
|
|
160
|
+
type AtomTextEventTextType = Exclude<TextType, "promo">;
|
|
161
|
+
type AtomFontWeight = "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900";
|
|
162
|
+
type AtomFontStyle = "normal" | "italic";
|
|
163
|
+
type AtomTextTransform = "none" | "uppercase" | "lowercase" | "capitalize";
|
|
164
|
+
type AtomTextDecoration = "none" | "underline" | "line-through";
|
|
165
|
+
type AtomTextAlign = "left" | "right" | "center" | "justify";
|
|
166
|
+
type AtomFontFamily = "Consolas" | "Courier" | "Courier New" | "Lucida Console" | "Arial" | "Arial Black" | "Arial Narrow" | "Calibri" | "Franklin Gothic" | "Helvetica" | "Lucida Grande" | "Open Sans" | "Roboto" | "Tahoma" | "Trebuchet MS" | "Verdana" | "Garamond" | "Georgia" | "Times New Roman";
|
|
167
|
+
interface RowsStyles {
|
|
168
|
+
gap: number;
|
|
169
|
+
horizontalAlign: RowHorizontalAlign;
|
|
170
|
+
}
|
|
171
|
+
/** Main-axis alignment when column children use less than the container width (e.g. max caps). Default center. */
|
|
172
|
+
interface ColumnsStyles {
|
|
173
|
+
gap: number;
|
|
174
|
+
verticalAlign: VerticalAlign;
|
|
175
|
+
horizontalAlign: RowHorizontalAlign;
|
|
176
|
+
format: "default" | "table";
|
|
177
|
+
}
|
|
178
|
+
type ColumnsAtomSource = "horizontal-event" | "column-event";
|
|
179
|
+
type RowsAtomSource = "event";
|
|
180
|
+
type TextAtomSource = "event-list" | "form-disclaimer";
|
|
181
|
+
type ButtonAtomSource = "form-submit";
|
|
182
|
+
type ImageAtomSource = "spotify" | "soundcloud" | "youtube";
|
|
183
|
+
interface TextAtom {
|
|
184
|
+
atomKey: number;
|
|
185
|
+
type: "text";
|
|
186
|
+
source: TextAtomSource | null;
|
|
187
|
+
textType: TextType;
|
|
188
|
+
text: string;
|
|
189
|
+
textConfigs: DynamicDataConfigs;
|
|
190
|
+
textStyles: NullableAtomTextStyles | null;
|
|
191
|
+
layoutStyles: NullableLayoutStyles | null;
|
|
192
|
+
}
|
|
193
|
+
interface ButtonAtom {
|
|
194
|
+
atomKey: number;
|
|
195
|
+
type: "button";
|
|
196
|
+
source: ButtonAtomSource | null;
|
|
197
|
+
text: string;
|
|
198
|
+
textConfigs: DynamicDataConfigs;
|
|
199
|
+
href: string;
|
|
200
|
+
hrefConfigs: DynamicDataConfigs;
|
|
201
|
+
textStyles: NullableAtomTextStyles | null;
|
|
202
|
+
innerPadding: NullableOverride<Padding> | null;
|
|
203
|
+
layoutStyles: NullableLayoutStyles | null;
|
|
204
|
+
}
|
|
205
|
+
interface ImageAtom {
|
|
206
|
+
atomKey: number;
|
|
207
|
+
type: "image";
|
|
208
|
+
source: ImageAtomSource | null;
|
|
209
|
+
src: string;
|
|
210
|
+
href: string;
|
|
211
|
+
layoutStyles: NullableLayoutStyles | null;
|
|
212
|
+
}
|
|
213
|
+
interface DividerAtom {
|
|
214
|
+
atomKey: number;
|
|
215
|
+
type: "divider";
|
|
216
|
+
dividerStyles: NullableOverride<AtomBorder> | null;
|
|
217
|
+
layoutStyles: NullableLayoutStyles | null;
|
|
218
|
+
}
|
|
219
|
+
interface OptionAtom {
|
|
220
|
+
atomKey: number;
|
|
221
|
+
id: number | null;
|
|
222
|
+
hasData: boolean;
|
|
223
|
+
type: "option";
|
|
224
|
+
textType: TextType;
|
|
225
|
+
text: string;
|
|
226
|
+
textConfigs: DynamicDataConfigs;
|
|
227
|
+
tags: AtomFormMetadataItem[];
|
|
228
|
+
genres: string[];
|
|
229
|
+
lists: AtomFormMetadataItem[];
|
|
230
|
+
textStyles: NullableAtomTextStyles | null;
|
|
231
|
+
layoutStyles: NullableLayoutStyles | null;
|
|
232
|
+
}
|
|
233
|
+
type AtomInputType = "name" | "email" | "phone" | "postal-code" | "short-answer" | "long-answer" | "birthday";
|
|
234
|
+
type AtomQuestionType = "radio" | "dropdown" | "checkbox";
|
|
235
|
+
type AtomContestType = "facebook" | "instagram" | "link";
|
|
236
|
+
type AtomEventArrangement = "vertical" | "horizontal-left" | "horizontal-right" | "horizontal-zigzag";
|
|
237
|
+
type AtomEventOrderBy = "event-start-time" | "event-published-time";
|
|
238
|
+
type AtomDirection = "asc" | "desc";
|
|
239
|
+
type AtomLookaheadUnit = "days" | "weeks" | "months";
|
|
240
|
+
interface AtomFormMetadataItem {
|
|
241
|
+
id: number;
|
|
242
|
+
name: string;
|
|
243
|
+
}
|
|
244
|
+
interface InputAtom {
|
|
245
|
+
atomKey: number;
|
|
246
|
+
id: number | null;
|
|
247
|
+
hasData: boolean;
|
|
248
|
+
type: "input";
|
|
249
|
+
name: string;
|
|
250
|
+
inputType: AtomInputType;
|
|
251
|
+
required: boolean;
|
|
252
|
+
placeholder: string;
|
|
253
|
+
textStyles: NullableAtomTextStyles | null;
|
|
254
|
+
innerPadding: NullableOverride<Padding> | null;
|
|
255
|
+
layoutStyles: NullableLayoutStyles | null;
|
|
256
|
+
}
|
|
257
|
+
interface ContestAtom {
|
|
258
|
+
atomKey: number;
|
|
259
|
+
id: number | null;
|
|
260
|
+
hasData: boolean;
|
|
261
|
+
type: "contest";
|
|
262
|
+
contestType: AtomContestType;
|
|
263
|
+
entriesPerSubmission: number;
|
|
264
|
+
maxLinkReferrals: number;
|
|
265
|
+
identifier: string;
|
|
266
|
+
required: boolean;
|
|
267
|
+
textStyles: NullableAtomTextStyles | null;
|
|
268
|
+
innerPadding: NullableOverride<Padding> | null;
|
|
269
|
+
layoutStyles: NullableLayoutStyles | null;
|
|
270
|
+
}
|
|
271
|
+
interface QuestionAtom {
|
|
272
|
+
atomKey: number;
|
|
273
|
+
id: number | null;
|
|
274
|
+
hasData: boolean;
|
|
275
|
+
type: "question";
|
|
276
|
+
name: string;
|
|
277
|
+
questionType: AtomQuestionType;
|
|
278
|
+
required: boolean;
|
|
279
|
+
allowMultiple: boolean;
|
|
280
|
+
children: OptionAtom[];
|
|
281
|
+
rowsStyles: NullableOverride<RowsStyles> | null;
|
|
282
|
+
innerPadding: NullableOverride<Padding> | null;
|
|
283
|
+
layoutStyles: NullableLayoutStyles | null;
|
|
284
|
+
}
|
|
285
|
+
interface FormAtom {
|
|
286
|
+
atomKey: number;
|
|
287
|
+
id: number | null;
|
|
288
|
+
hasData: boolean;
|
|
289
|
+
type: "form";
|
|
290
|
+
name: string;
|
|
291
|
+
buttonText: string;
|
|
292
|
+
redirectUrl: string;
|
|
293
|
+
customHeaderHtml: string;
|
|
294
|
+
emailRecipients: string[];
|
|
295
|
+
tags: AtomFormMetadataItem[];
|
|
296
|
+
genres: string[];
|
|
297
|
+
lists: AtomFormMetadataItem[];
|
|
298
|
+
children: Atom[];
|
|
299
|
+
successChildren: Atom[] | null;
|
|
300
|
+
belowSubmitChildren: Atom[];
|
|
301
|
+
rowsStyles: NullableOverride<RowsStyles> | null;
|
|
302
|
+
layoutStyles: NullableLayoutStyles | null;
|
|
303
|
+
}
|
|
304
|
+
interface AutomationUpcomingEventsAtom {
|
|
305
|
+
atomKey: number;
|
|
306
|
+
type: "automation-upcoming-events";
|
|
307
|
+
eventStyle: AtomEventStyle;
|
|
308
|
+
eventArrangement: AtomEventArrangement;
|
|
309
|
+
eventOrderBy: AtomEventOrderBy;
|
|
310
|
+
eventOrderByDirection: AtomDirection;
|
|
311
|
+
eventLookaheadAfterUnit: AtomLookaheadUnit;
|
|
312
|
+
eventLookaheadAfterAmount: number;
|
|
313
|
+
eventLookaheadUnit: AtomLookaheadUnit;
|
|
314
|
+
eventLookaheadAmount: number;
|
|
315
|
+
maxEvents: number;
|
|
316
|
+
matchTriggeredEventTags: boolean;
|
|
317
|
+
tags: AtomFormMetadataItem[];
|
|
318
|
+
genres: string[];
|
|
319
|
+
excludeTags: AtomFormMetadataItem[];
|
|
320
|
+
excludeGenres: string[];
|
|
321
|
+
layoutStyles: NullableLayoutStyles | null;
|
|
322
|
+
}
|
|
323
|
+
interface AutomationTriggeredEventAtom {
|
|
324
|
+
atomKey: number;
|
|
325
|
+
type: "automation-triggered-event";
|
|
326
|
+
eventStyle: AtomEventStyle;
|
|
327
|
+
eventArrangement: Exclude<AtomEventArrangement, "horizontal-zigzag">;
|
|
328
|
+
layoutStyles: NullableLayoutStyles | null;
|
|
329
|
+
}
|
|
330
|
+
interface RowsAtom {
|
|
331
|
+
atomKey: number;
|
|
332
|
+
type: "rows";
|
|
333
|
+
source: RowsAtomSource | null;
|
|
334
|
+
children: Atom[];
|
|
335
|
+
rowsStyles: NullableOverride<RowsStyles> | null;
|
|
336
|
+
layoutStyles: NullableLayoutStyles | null;
|
|
337
|
+
}
|
|
338
|
+
interface ColumnsAtom {
|
|
339
|
+
atomKey: number;
|
|
340
|
+
type: "columns";
|
|
341
|
+
source: ColumnsAtomSource | null;
|
|
342
|
+
children: Atom[];
|
|
343
|
+
columnsStyles: NullableOverride<ColumnsStyles> | null;
|
|
344
|
+
layoutStyles: NullableLayoutStyles | null;
|
|
345
|
+
}
|
|
346
|
+
type Atom = RowsAtom | ColumnsAtom | TextAtom | ButtonAtom | ImageAtom | DividerAtom | OptionAtom | InputAtom | ContestAtom | QuestionAtom | FormAtom | AutomationUpcomingEventsAtom | AutomationTriggeredEventAtom;
|
|
347
|
+
interface GlobalAtomStyles {
|
|
348
|
+
titleStyles: {
|
|
349
|
+
textStyles: AtomTextStyles;
|
|
350
|
+
layoutStyles: LayoutStyles;
|
|
351
|
+
};
|
|
352
|
+
subtitleStyles: {
|
|
353
|
+
textStyles: AtomTextStyles;
|
|
354
|
+
layoutStyles: LayoutStyles;
|
|
355
|
+
};
|
|
356
|
+
headingStyles: {
|
|
357
|
+
textStyles: AtomTextStyles;
|
|
358
|
+
layoutStyles: LayoutStyles;
|
|
359
|
+
};
|
|
360
|
+
subheadingStyles: {
|
|
361
|
+
textStyles: AtomTextStyles;
|
|
362
|
+
layoutStyles: LayoutStyles;
|
|
363
|
+
};
|
|
364
|
+
sectionStyles: {
|
|
365
|
+
textStyles: AtomTextStyles;
|
|
366
|
+
layoutStyles: LayoutStyles;
|
|
367
|
+
};
|
|
368
|
+
bodyStyles: {
|
|
369
|
+
textStyles: AtomTextStyles;
|
|
370
|
+
layoutStyles: LayoutStyles;
|
|
371
|
+
};
|
|
372
|
+
accentStyles: {
|
|
373
|
+
textStyles: AtomTextStyles;
|
|
374
|
+
layoutStyles: LayoutStyles;
|
|
375
|
+
};
|
|
376
|
+
captionStyles: {
|
|
377
|
+
textStyles: AtomTextStyles;
|
|
378
|
+
layoutStyles: LayoutStyles;
|
|
379
|
+
};
|
|
380
|
+
buttonStyles: {
|
|
381
|
+
textStyles: AtomTextStyles;
|
|
382
|
+
innerPadding: Padding;
|
|
383
|
+
layoutStyles: LayoutStyles;
|
|
384
|
+
};
|
|
385
|
+
promoStyles: {
|
|
386
|
+
textStyles: AtomTextStyles;
|
|
387
|
+
innerPadding: Padding;
|
|
388
|
+
layoutStyles: LayoutStyles;
|
|
389
|
+
};
|
|
390
|
+
imageStyles: {
|
|
391
|
+
layoutStyles: LayoutStyles;
|
|
392
|
+
};
|
|
393
|
+
dividerStyles: {
|
|
394
|
+
dividerStyles: AtomBorder;
|
|
395
|
+
layoutStyles: LayoutStyles;
|
|
396
|
+
};
|
|
397
|
+
columnsStyles: {
|
|
398
|
+
columnsStyles: ColumnsStyles;
|
|
399
|
+
layoutStyles: LayoutStyles;
|
|
400
|
+
};
|
|
401
|
+
rowsStyles: {
|
|
402
|
+
rowsStyles: RowsStyles;
|
|
403
|
+
layoutStyles: LayoutStyles;
|
|
404
|
+
};
|
|
405
|
+
inputStyles: {
|
|
406
|
+
textStyles: AtomTextStyles;
|
|
407
|
+
innerPadding: Padding;
|
|
408
|
+
layoutStyles: LayoutStyles;
|
|
409
|
+
};
|
|
410
|
+
formStyles: {
|
|
411
|
+
rowsStyles: RowsStyles;
|
|
412
|
+
layoutStyles: LayoutStyles;
|
|
413
|
+
};
|
|
414
|
+
questionStyles: {
|
|
415
|
+
rowsStyles: RowsStyles;
|
|
416
|
+
innerPadding: Padding;
|
|
417
|
+
layoutStyles: LayoutStyles;
|
|
418
|
+
};
|
|
419
|
+
optionStyles: {
|
|
420
|
+
textStyles: AtomTextStyles;
|
|
421
|
+
layoutStyles: LayoutStyles;
|
|
422
|
+
};
|
|
423
|
+
singleEventStyles: AtomEventStyle;
|
|
424
|
+
twoColumnEventStyles: AtomEventStyle;
|
|
425
|
+
threeColumnEventStyles: AtomEventStyle;
|
|
426
|
+
horizontalEventStyles: AtomEventStyle;
|
|
427
|
+
textEventStyles: AtomTextEventStyle;
|
|
428
|
+
socialStyles: AtomSocialStyle;
|
|
429
|
+
}
|
|
430
|
+
interface AtomDocument {
|
|
431
|
+
id: number;
|
|
432
|
+
org_id: number;
|
|
433
|
+
public_uuid: string;
|
|
434
|
+
contents: AtomDocumentContents;
|
|
435
|
+
}
|
|
436
|
+
interface AtomDocumentContents {
|
|
437
|
+
type: "contents";
|
|
438
|
+
rootRow: RowsAtom;
|
|
439
|
+
globalAtomStyles: GlobalAtomStyles;
|
|
440
|
+
maxWidth: number;
|
|
441
|
+
linkColor: string;
|
|
442
|
+
underlineLinks: boolean;
|
|
443
|
+
pagesMaxWidth: number;
|
|
444
|
+
canvasBackground: AtomBackground | "none";
|
|
445
|
+
}
|
|
446
|
+
interface AtomSocialIconOrdinals {
|
|
447
|
+
facebookOrdinal: number;
|
|
448
|
+
xOrdinal: number;
|
|
449
|
+
instagramOrdinal: number;
|
|
450
|
+
tiktokOrdinal: number;
|
|
451
|
+
youtubeOrdinal: number;
|
|
452
|
+
websiteOrdinal: number;
|
|
453
|
+
spotifyOrdinal: number;
|
|
454
|
+
discordOrdinal: number;
|
|
455
|
+
soundcloudOrdinal: number;
|
|
456
|
+
appleMusicOrdinal: number;
|
|
457
|
+
threadsOrdinal: number;
|
|
458
|
+
}
|
|
459
|
+
type AtomSocialIconStyle = "color" | "white" | "black";
|
|
460
|
+
interface AtomSocialStyle {
|
|
461
|
+
iconStyle: AtomSocialIconStyle;
|
|
462
|
+
ordinals: AtomSocialIconOrdinals;
|
|
463
|
+
facebookUrl: string;
|
|
464
|
+
instagramUrl: string;
|
|
465
|
+
xUrl: string;
|
|
466
|
+
spotifyUrl: string;
|
|
467
|
+
tiktokUrl: string;
|
|
468
|
+
youtubeUrl: string;
|
|
469
|
+
websiteUrl: string;
|
|
470
|
+
discordUrl: string;
|
|
471
|
+
soundcloudUrl: string;
|
|
472
|
+
appleMusicUrl: string;
|
|
473
|
+
threadsUrl: string;
|
|
474
|
+
}
|
|
475
|
+
type AtomTimeFormat = "1/2" | "1/2, 3:04PM" | "Jan 2, 3:04PM" | "January 2" | "January 2, 3:04PM" | "Mon 1/2" | "Mon, 1/2, 3:04PM" | "Mon Jan 2" | "Mon, Jan 2, 3:04PM" | "Mon, January 2, 3:04PM" | "Monday 1/2" | "Monday Jan 2" | "Monday, January 2" | "Monday, January 2, 3:04PM";
|
|
476
|
+
type AtomLocationFormat = "name, address" | "name\naddress" | "name" | "address" | "city, state" | "city" | "state";
|
|
477
|
+
interface AtomEventStyleOrdinals {
|
|
478
|
+
image: number;
|
|
479
|
+
name: number;
|
|
480
|
+
datetime: number;
|
|
481
|
+
button: number;
|
|
482
|
+
location: number;
|
|
483
|
+
description: number;
|
|
484
|
+
doorOpenTime: number;
|
|
485
|
+
}
|
|
486
|
+
interface AtomEventStyle {
|
|
487
|
+
timeFormat: AtomTimeFormat;
|
|
488
|
+
locationFormat: AtomLocationFormat;
|
|
489
|
+
doorOpenTimeFormat: AtomTimeFormat;
|
|
490
|
+
descriptionCharacterLimit: number;
|
|
491
|
+
buttonText: string;
|
|
492
|
+
nameTextType: TextType;
|
|
493
|
+
datetimeTextType: TextType;
|
|
494
|
+
locationTextType: TextType;
|
|
495
|
+
descriptionTextType: TextType;
|
|
496
|
+
doorOpenTimeTextType: TextType;
|
|
497
|
+
ordinals: AtomEventStyleOrdinals;
|
|
498
|
+
includeImage: boolean;
|
|
499
|
+
includeName: boolean;
|
|
500
|
+
includeDatetime: boolean;
|
|
501
|
+
includeButton: boolean;
|
|
502
|
+
includeLocation: boolean;
|
|
503
|
+
includeDescription: boolean;
|
|
504
|
+
includeDoorOpenTime: boolean;
|
|
505
|
+
nameUseCaps: boolean;
|
|
506
|
+
timeFormatUseCaps: boolean;
|
|
507
|
+
buttonUseCaps: boolean;
|
|
508
|
+
locationUseCaps: boolean;
|
|
509
|
+
descriptionUseCaps: boolean;
|
|
510
|
+
doorOpenTimeUseCaps: boolean;
|
|
511
|
+
imageCropToSquare: boolean;
|
|
512
|
+
horizontalIsReversed: boolean;
|
|
513
|
+
scaleFontSizeDownInColumns: boolean;
|
|
514
|
+
}
|
|
515
|
+
type AtomDynamicDataSetting = Omit<DynamicDataSetting, "id">;
|
|
516
|
+
interface AtomTextEventStyle {
|
|
517
|
+
text: string;
|
|
518
|
+
textConfigs: DynamicDataConfigs;
|
|
519
|
+
eventLinkText: string;
|
|
520
|
+
textType: AtomTextEventTextType;
|
|
521
|
+
dynamicDataSetting: AtomDynamicDataSetting;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
declare function renderAtomDocumentToHtml(doc: AtomDocumentContents): Promise<string>;
|
|
525
|
+
|
|
526
|
+
export { renderAtomDocumentToHtml };
|
|
527
|
+
export type { Atom, AtomDocument, AutomationTriggeredEventAtom, AutomationUpcomingEventsAtom, ContestAtom, FormAtom, InputAtom, OptionAtom, QuestionAtom };
|