@templatical/import-beefree 0.10.0 → 0.10.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/dist/index.d.ts CHANGED
@@ -1,158 +1,157 @@
1
- import * as _templatical_types from '@templatical/types';
2
-
1
+ //#region src/types.d.ts
3
2
  /**
4
3
  * BeeFree JSON type definitions.
5
4
  * Based on the BeeFree export format used by the BEE Plugin / BEE Pro editor.
6
5
  */
7
6
  interface BeeFreeTemplate {
8
- page: BeeFreeePage;
9
- comments?: Record<string, unknown>;
7
+ page: BeeFreeePage;
8
+ comments?: Record<string, unknown>;
10
9
  }
11
10
  interface BeeFreeePage {
12
- title?: string;
13
- description?: string;
14
- rows: BeeFreeeRow[];
15
- body?: BeeFreeeBody;
11
+ title?: string;
12
+ description?: string;
13
+ rows: BeeFreeeRow[];
14
+ body?: BeeFreeeBody;
16
15
  }
17
16
  interface BeeFreeeBody {
18
- type?: string;
19
- webFonts?: BeeFreeeWebFont[];
20
- content?: {
21
- style?: Record<string, string>;
22
- computedStyle?: Record<string, string>;
23
- };
24
- container?: {
25
- style?: Record<string, string>;
26
- };
17
+ type?: string;
18
+ webFonts?: BeeFreeeWebFont[];
19
+ content?: {
20
+ style?: Record<string, string>;
21
+ computedStyle?: Record<string, string>;
22
+ };
23
+ container?: {
24
+ style?: Record<string, string>;
25
+ };
27
26
  }
28
27
  interface BeeFreeeWebFont {
29
- name: string;
30
- fontFamily?: string;
31
- url?: string;
28
+ name: string;
29
+ fontFamily?: string;
30
+ url?: string;
32
31
  }
33
32
  interface BeeFreeeRow {
34
- uuid?: string;
35
- type?: string;
36
- locked?: boolean;
37
- synced?: boolean;
38
- empty?: boolean;
39
- columns: BeeFreeeColumn[];
40
- container?: {
41
- style?: Record<string, string>;
42
- };
43
- content?: {
44
- style?: Record<string, string>;
45
- computedStyle?: Record<string, string | boolean>;
46
- };
33
+ uuid?: string;
34
+ type?: string;
35
+ locked?: boolean;
36
+ synced?: boolean;
37
+ empty?: boolean;
38
+ columns: BeeFreeeColumn[];
39
+ container?: {
40
+ style?: Record<string, string>;
41
+ };
42
+ content?: {
43
+ style?: Record<string, string>;
44
+ computedStyle?: Record<string, string | boolean>;
45
+ };
47
46
  }
48
47
  interface BeeFreeeColumn {
49
- uuid?: string;
50
- "grid-columns"?: number;
51
- style?: Record<string, string>;
52
- modules: BeeFreeeModule[];
48
+ uuid?: string;
49
+ "grid-columns"?: number;
50
+ style?: Record<string, string>;
51
+ modules: BeeFreeeModule[];
53
52
  }
54
53
  interface BeeFreeeModule {
55
- type: string;
56
- locked?: boolean;
57
- uuid?: string;
58
- descriptor: BeeFreeeModuleDescriptor;
54
+ type: string;
55
+ locked?: boolean;
56
+ uuid?: string;
57
+ descriptor: BeeFreeeModuleDescriptor;
59
58
  }
60
59
  interface BeeFreeeModuleDescriptor {
61
- style?: Record<string, string>;
62
- computedStyle?: Record<string, string | boolean>;
63
- text?: BeeFreeeTextContent;
64
- paragraph?: BeeFreeeTextContent;
65
- heading?: BeeFreeeHeadingContent;
66
- list?: BeeFreeeTextContent;
67
- image?: BeeFreeeImageContent;
68
- button?: BeeFreeeButtonContent;
69
- divider?: BeeFreeeeDividerContent;
70
- spacer?: BeeFreeeSpacerContent;
71
- html?: BeeFreeeHtmlContent;
72
- iconsList?: BeeFreeeSocialContent;
73
- video?: BeeFreeeVideoContent;
74
- menu?: BeeFreeeMenuContent;
75
- table?: BeeFreeeTableContent;
60
+ style?: Record<string, string>;
61
+ computedStyle?: Record<string, string | boolean>;
62
+ text?: BeeFreeeTextContent;
63
+ paragraph?: BeeFreeeTextContent;
64
+ heading?: BeeFreeeHeadingContent;
65
+ list?: BeeFreeeTextContent;
66
+ image?: BeeFreeeImageContent;
67
+ button?: BeeFreeeButtonContent;
68
+ divider?: BeeFreeeeDividerContent;
69
+ spacer?: BeeFreeeSpacerContent;
70
+ html?: BeeFreeeHtmlContent;
71
+ iconsList?: BeeFreeeSocialContent;
72
+ video?: BeeFreeeVideoContent;
73
+ menu?: BeeFreeeMenuContent;
74
+ table?: BeeFreeeTableContent;
76
75
  }
77
76
  interface BeeFreeeTextContent {
78
- style?: Record<string, string>;
79
- computedStyle?: Record<string, string>;
80
- html: string;
77
+ style?: Record<string, string>;
78
+ computedStyle?: Record<string, string>;
79
+ html: string;
81
80
  }
82
81
  interface BeeFreeeHeadingContent {
83
- title?: string;
84
- text?: string;
85
- style?: Record<string, string>;
82
+ title?: string;
83
+ text?: string;
84
+ style?: Record<string, string>;
86
85
  }
87
86
  interface BeeFreeeImageContent {
88
- src: string;
89
- href?: string;
90
- alt?: string;
91
- width?: string;
92
- height?: string;
93
- prefix?: string;
94
- style?: Record<string, string>;
87
+ src: string;
88
+ href?: string;
89
+ alt?: string;
90
+ width?: string;
91
+ height?: string;
92
+ prefix?: string;
93
+ style?: Record<string, string>;
95
94
  }
96
95
  interface BeeFreeeButtonContent {
97
- label: string;
98
- href?: string;
99
- style?: Record<string, string>;
96
+ label: string;
97
+ href?: string;
98
+ style?: Record<string, string>;
100
99
  }
101
100
  interface BeeFreeeeDividerContent {
102
- style?: Record<string, string>;
101
+ style?: Record<string, string>;
103
102
  }
104
103
  interface BeeFreeeSpacerContent {
105
- style?: Record<string, string>;
104
+ style?: Record<string, string>;
106
105
  }
107
106
  interface BeeFreeeHtmlContent {
108
- html: string;
107
+ html: string;
109
108
  }
110
109
  interface BeeFreeeSocialContent {
111
- icons: BeeFreeeSocialIcon[];
110
+ icons: BeeFreeeSocialIcon[];
112
111
  }
113
112
  interface BeeFreeeSocialIcon {
114
- image?: {
115
- title?: string;
116
- src?: string;
117
- href?: string;
118
- alt?: string;
119
- };
120
- name?: string;
121
- text?: string;
122
- type?: string;
123
- id?: string;
113
+ image?: {
114
+ title?: string;
115
+ src?: string;
116
+ href?: string;
117
+ alt?: string;
118
+ };
119
+ name?: string;
120
+ text?: string;
121
+ type?: string;
122
+ id?: string;
124
123
  }
125
124
  interface BeeFreeeVideoContent {
126
- src: string;
127
- thumbnail?: string;
128
- alt?: string;
129
- style?: Record<string, string>;
125
+ src: string;
126
+ thumbnail?: string;
127
+ alt?: string;
128
+ style?: Record<string, string>;
130
129
  }
131
130
  interface BeeFreeeMenuContent {
132
- items: BeeFreeeMenuItem[];
133
- separator?: string;
134
- separatorColor?: string;
135
- style?: Record<string, string>;
131
+ items: BeeFreeeMenuItem[];
132
+ separator?: string;
133
+ separatorColor?: string;
134
+ style?: Record<string, string>;
136
135
  }
137
136
  interface BeeFreeeMenuItem {
138
- text: string;
139
- link?: string;
140
- href?: string;
141
- target?: string;
137
+ text: string;
138
+ link?: string;
139
+ href?: string;
140
+ target?: string;
142
141
  }
143
142
  interface BeeFreeeTableContent {
144
- rows: BeeFreeeTableRow[];
145
- hasHeaderRow?: boolean;
146
- headerBackgroundColor?: string;
147
- cellPadding?: number | string;
148
- style?: Record<string, string>;
143
+ rows: BeeFreeeTableRow[];
144
+ hasHeaderRow?: boolean;
145
+ headerBackgroundColor?: string;
146
+ cellPadding?: number | string;
147
+ style?: Record<string, string>;
149
148
  }
150
149
  interface BeeFreeeTableRow {
151
- cells: BeeFreeeTableCell[];
150
+ cells: BeeFreeeTableCell[];
152
151
  }
153
152
  interface BeeFreeeTableCell {
154
- content?: string;
155
- html?: string;
153
+ content?: string;
154
+ html?: string;
156
155
  }
157
156
  /**
158
157
  * Conversion status for each module in the import report.
@@ -162,33 +161,34 @@ type ConversionStatus = "converted" | "approximated" | "html-fallback" | "skippe
162
161
  * A single entry in the import report.
163
162
  */
164
163
  interface ImportReportEntry {
165
- beeFreeModuleType: string;
166
- templaticalBlockType: string | null;
167
- status: ConversionStatus;
168
- note?: string;
164
+ beeFreeModuleType: string;
165
+ templaticalBlockType: string | null;
166
+ status: ConversionStatus;
167
+ note?: string;
169
168
  }
170
169
  /**
171
170
  * The full import report returned alongside the converted template.
172
171
  */
173
172
  interface ImportReport {
174
- entries: ImportReportEntry[];
175
- warnings: string[];
176
- summary: {
177
- total: number;
178
- converted: number;
179
- approximated: number;
180
- htmlFallback: number;
181
- skipped: number;
182
- };
173
+ entries: ImportReportEntry[];
174
+ warnings: string[];
175
+ summary: {
176
+ total: number;
177
+ converted: number;
178
+ approximated: number;
179
+ htmlFallback: number;
180
+ skipped: number;
181
+ };
183
182
  }
184
183
  /**
185
184
  * The result of a BeeFree import operation.
186
185
  */
187
186
  interface ImportResult {
188
- content: _templatical_types.TemplateContent;
189
- report: ImportReport;
187
+ content: import("@templatical/types").TemplateContent;
188
+ report: ImportReport;
190
189
  }
191
-
190
+ //#endregion
191
+ //#region src/converter.d.ts
192
192
  /**
193
193
  * Converts a BeeFree template JSON to Templatical TemplateContent.
194
194
  *
@@ -211,5 +211,6 @@ interface ImportResult {
211
211
  * ```
212
212
  */
213
213
  declare function convertBeeFreeTemplate(template: BeeFreeTemplate): ImportResult;
214
-
214
+ //#endregion
215
215
  export { type BeeFreeTemplate, type ConversionStatus, type ImportReport, type ImportReportEntry, type ImportResult, convertBeeFreeTemplate };
216
+ //# sourceMappingURL=index.d.ts.map