@yamlresume/core 0.1.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/LICENSE +21 -0
- package/README.md +10 -0
- package/dist/index.d.ts +1899 -0
- package/dist/index.js +177 -0
- package/dist/index.js.map +1 -0
- package/package.json +69 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1899 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MIT License
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2023–Present PPResume (https://ppresume.com)
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to
|
|
8
|
+
* deal in the Software without restriction, including without limitation the
|
|
9
|
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
10
|
+
* sell copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in
|
|
14
|
+
* all copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
21
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
22
|
+
* IN THE SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* Defines the possible types for inline formatting marks.
|
|
26
|
+
*/
|
|
27
|
+
declare enum MarkType {
|
|
28
|
+
bold = "bold",
|
|
29
|
+
italic = "italic",
|
|
30
|
+
underline = "underline",
|
|
31
|
+
link = "link"
|
|
32
|
+
}
|
|
33
|
+
/** Helper type to get the union of possible MarkType keys. */
|
|
34
|
+
type MarkTypeOptions = keyof typeof MarkType;
|
|
35
|
+
/** Represents a bold formatting mark. */
|
|
36
|
+
type BoldMark = {
|
|
37
|
+
type: Extract<MarkTypeOptions, 'bold'>;
|
|
38
|
+
};
|
|
39
|
+
/** Represents a link mark with optional attributes. */
|
|
40
|
+
type LinkMark = {
|
|
41
|
+
/** Optional attributes for the link. */
|
|
42
|
+
attrs?: {
|
|
43
|
+
/** The URL the link points to. */
|
|
44
|
+
href: string;
|
|
45
|
+
/** CSS class attribute, typically null. */
|
|
46
|
+
class: string | null;
|
|
47
|
+
/** Link target attribute (e.g., '_blank'), often null or empty. */
|
|
48
|
+
target: string;
|
|
49
|
+
};
|
|
50
|
+
type: Extract<MarkTypeOptions, 'link'>;
|
|
51
|
+
};
|
|
52
|
+
/** Represents an italic formatting mark. */
|
|
53
|
+
type ItalicMark = {
|
|
54
|
+
type: Extract<MarkTypeOptions, 'italic'>;
|
|
55
|
+
};
|
|
56
|
+
/** Represents an underline formatting mark. */
|
|
57
|
+
type UnderlineMark = {
|
|
58
|
+
type: Extract<MarkTypeOptions, 'underline'>;
|
|
59
|
+
};
|
|
60
|
+
/** Represents a union of all possible inline formatting marks. */
|
|
61
|
+
type Mark = BoldMark | ItalicMark | LinkMark | UnderlineMark;
|
|
62
|
+
/** Represents a sequence of child nodes, often used for block node content. */
|
|
63
|
+
type Fragment = Node[] | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Defines the possible types for block or inline nodes in the document tree.
|
|
66
|
+
*/
|
|
67
|
+
declare enum NodeType {
|
|
68
|
+
bulletList = "bulletList",
|
|
69
|
+
doc = "doc",
|
|
70
|
+
listItem = "listItem",
|
|
71
|
+
orderedList = "orderedList",
|
|
72
|
+
paragraph = "paragraph",
|
|
73
|
+
text = "text"
|
|
74
|
+
}
|
|
75
|
+
/** Helper type to get the union of possible NodeType keys. */
|
|
76
|
+
type NodeTypeOptions = keyof typeof NodeType;
|
|
77
|
+
/** Represents a bullet list node (unordered list). */
|
|
78
|
+
type BulletListNode = {
|
|
79
|
+
/** Child nodes (typically ListItemNode) contained within this list. */
|
|
80
|
+
content?: Fragment;
|
|
81
|
+
type: Extract<NodeTypeOptions, 'bulletList'>;
|
|
82
|
+
/** Optional attributes, typically only includes 'start' which defaults to 1
|
|
83
|
+
* but isn't semantically used for bullet lists. */
|
|
84
|
+
attrs?: {
|
|
85
|
+
start: 1;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
/** Represents the root node of the document tree. */
|
|
89
|
+
type DocNode = {
|
|
90
|
+
/** The top-level block nodes (like ParagraphNode, BulletListNode, etc.) of the
|
|
91
|
+
* document. */
|
|
92
|
+
content?: Fragment;
|
|
93
|
+
type: Extract<NodeTypeOptions, 'doc'>;
|
|
94
|
+
};
|
|
95
|
+
/** Represents an item within a list (either bullet or ordered). */
|
|
96
|
+
type ListItemNode = {
|
|
97
|
+
/** Child nodes (like ParagraphNode) contained within this list item. */
|
|
98
|
+
content?: Fragment;
|
|
99
|
+
type: Extract<NodeTypeOptions, 'listItem'>;
|
|
100
|
+
};
|
|
101
|
+
/** Represents an ordered list node. */
|
|
102
|
+
type OrderedListNode = {
|
|
103
|
+
/** Child nodes (typically ListItemNode) contained within this list. */
|
|
104
|
+
content?: Fragment;
|
|
105
|
+
type: Extract<NodeTypeOptions, 'orderedList'>;
|
|
106
|
+
/** Optional attributes for the list. */
|
|
107
|
+
attrs?: {
|
|
108
|
+
/** The starting number for the ordered list. */
|
|
109
|
+
start: number;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
/** Represents a paragraph block node. */
|
|
113
|
+
type ParagraphNode = {
|
|
114
|
+
/** Inline child nodes (like TextNode) contained within this paragraph. */
|
|
115
|
+
content?: Fragment;
|
|
116
|
+
type: Extract<NodeTypeOptions, 'paragraph'>;
|
|
117
|
+
};
|
|
118
|
+
/** Represents a plain text node, with optional associated formatting marks. */
|
|
119
|
+
type TextNode = {
|
|
120
|
+
/** Optional formatting marks (like BoldMark, LinkMark) applied to this text
|
|
121
|
+
* span. */
|
|
122
|
+
marks?: Mark[];
|
|
123
|
+
/** The actual text content. */
|
|
124
|
+
text: string;
|
|
125
|
+
type: Extract<NodeTypeOptions, 'text'>;
|
|
126
|
+
};
|
|
127
|
+
/** Represents a union of all possible node types in the document tree. */
|
|
128
|
+
type Node = BulletListNode | DocNode | ListItemNode | OrderedListNode | ParagraphNode | TextNode;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* MIT License
|
|
132
|
+
*
|
|
133
|
+
* Copyright (c) 2023–Present PPResume (https://ppresume.com)
|
|
134
|
+
*
|
|
135
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
136
|
+
* of this software and associated documentation files (the "Software"), to
|
|
137
|
+
* deal in the Software without restriction, including without limitation the
|
|
138
|
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
139
|
+
* sell copies of the Software, and to permit persons to whom the Software is
|
|
140
|
+
* furnished to do so, subject to the following conditions:
|
|
141
|
+
*
|
|
142
|
+
* The above copyright notice and this permission notice shall be included in
|
|
143
|
+
* all copies or substantial portions of the Software.
|
|
144
|
+
*
|
|
145
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
146
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
147
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
148
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
149
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
150
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
151
|
+
* IN THE SOFTWARE.
|
|
152
|
+
*/
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Interface to generate code from an AST.
|
|
156
|
+
*
|
|
157
|
+
* This interface defines the contract for code generation of abstract syntax
|
|
158
|
+
* tree (AST) nodes. Implementations of this interface are responsible for
|
|
159
|
+
* converting AST nodes into their corresponding code representations.
|
|
160
|
+
*
|
|
161
|
+
* @see {@link Node}
|
|
162
|
+
*/
|
|
163
|
+
interface CodeGenerator {
|
|
164
|
+
/**
|
|
165
|
+
* Generate code from an AST node.
|
|
166
|
+
*
|
|
167
|
+
* @param node - The AST node to generate code from.
|
|
168
|
+
* @returns The generated code.
|
|
169
|
+
*/
|
|
170
|
+
generate(node: Node): string;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* MIT License
|
|
175
|
+
*
|
|
176
|
+
* Copyright (c) 2023–Present PPResume (https://ppresume.com)
|
|
177
|
+
*
|
|
178
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
179
|
+
* of this software and associated documentation files (the "Software"), to
|
|
180
|
+
* deal in the Software without restriction, including without limitation the
|
|
181
|
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
182
|
+
* sell copies of the Software, and to permit persons to whom the Software is
|
|
183
|
+
* furnished to do so, subject to the following conditions:
|
|
184
|
+
*
|
|
185
|
+
* The above copyright notice and this permission notice shall be included in
|
|
186
|
+
* all copies or substantial portions of the Software.
|
|
187
|
+
*
|
|
188
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
189
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
190
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
191
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
192
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
193
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
194
|
+
* IN THE SOFTWARE.
|
|
195
|
+
*/
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Generate LaTeX code from a Node.
|
|
199
|
+
*
|
|
200
|
+
* This class implements the `CodeGenerator` interface and provides a method
|
|
201
|
+
* to convert an AST node into its corresponding LaTeX code.
|
|
202
|
+
*
|
|
203
|
+
* @see {@link CodeGenerator}
|
|
204
|
+
*/
|
|
205
|
+
declare class LatexCodeGenerator implements CodeGenerator {
|
|
206
|
+
/**
|
|
207
|
+
* Generate LaTeX code from an AST node.
|
|
208
|
+
*
|
|
209
|
+
* @param node - The AST node to generate LaTeX code from.
|
|
210
|
+
* @returns The generated LaTeX code.
|
|
211
|
+
*/
|
|
212
|
+
generate(node: Node): string;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* MIT License
|
|
217
|
+
*
|
|
218
|
+
* Copyright (c) 2023–Present PPResume (https://ppresume.com)
|
|
219
|
+
*
|
|
220
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
221
|
+
* of this software and associated documentation files (the "Software"), to
|
|
222
|
+
* deal in the Software without restriction, including without limitation the
|
|
223
|
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
224
|
+
* sell copies of the Software, and to permit persons to whom the Software is
|
|
225
|
+
* furnished to do so, subject to the following conditions:
|
|
226
|
+
*
|
|
227
|
+
* The above copyright notice and this permission notice shall be included in
|
|
228
|
+
* all copies or substantial portions of the Software.
|
|
229
|
+
*
|
|
230
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
231
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
232
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
233
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
234
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
235
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
236
|
+
* IN THE SOFTWARE.
|
|
237
|
+
*/
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Interface for parsing input strings into AST nodes.
|
|
241
|
+
*
|
|
242
|
+
* Implementations of this interface are responsible for converting input
|
|
243
|
+
* strings into their corresponding abstract syntax tree (AST) representations.
|
|
244
|
+
*
|
|
245
|
+
* @see {@link Node}
|
|
246
|
+
*/
|
|
247
|
+
interface Parser {
|
|
248
|
+
/**
|
|
249
|
+
* Parse an input string into an AST node.
|
|
250
|
+
*
|
|
251
|
+
* @param input - The input string to parse.
|
|
252
|
+
* @returns The parsed AST node.
|
|
253
|
+
*/
|
|
254
|
+
parse(input: string): Node;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* MIT License
|
|
259
|
+
*
|
|
260
|
+
* Copyright (c) 2023–Present PPResume (https://ppresume.com)
|
|
261
|
+
*
|
|
262
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
263
|
+
* of this software and associated documentation files (the "Software"), to
|
|
264
|
+
* deal in the Software without restriction, including without limitation the
|
|
265
|
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
266
|
+
* sell copies of the Software, and to permit persons to whom the Software is
|
|
267
|
+
* furnished to do so, subject to the following conditions:
|
|
268
|
+
*
|
|
269
|
+
* The above copyright notice and this permission notice shall be included in
|
|
270
|
+
* all copies or substantial portions of the Software.
|
|
271
|
+
*
|
|
272
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
273
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
274
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
275
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
276
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
277
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
278
|
+
* IN THE SOFTWARE.
|
|
279
|
+
*/
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* This parser is used to parse the tiptap JSON format to the AST.
|
|
283
|
+
*
|
|
284
|
+
* Under the hood the implementation is pretty naive, it just parses the JSON
|
|
285
|
+
* string to a DocNode because we use tiptap editor in frontend, so it is
|
|
286
|
+
* guaranteed that the JSON stored by tiptap editor is valid as a tiptap
|
|
287
|
+
* document.
|
|
288
|
+
*
|
|
289
|
+
* @see https://tiptap.dev/docs/editor/core-concepts/schema#parse
|
|
290
|
+
*/
|
|
291
|
+
declare class TiptapParser implements Parser {
|
|
292
|
+
/**
|
|
293
|
+
* Parse a tiptap JSON string into an AST node.
|
|
294
|
+
*
|
|
295
|
+
* @param input - The tiptap JSON string to parse.
|
|
296
|
+
* @returns The parsed AST node.
|
|
297
|
+
*/
|
|
298
|
+
parse(input: string): DocNode;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* MIT License
|
|
303
|
+
*
|
|
304
|
+
* Copyright (c) 2023–Present PPResume (https://ppresume.com)
|
|
305
|
+
*
|
|
306
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
307
|
+
* of this software and associated documentation files (the "Software"), to
|
|
308
|
+
* deal in the Software without restriction, including without limitation the
|
|
309
|
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
310
|
+
* sell copies of the Software, and to permit persons to whom the Software is
|
|
311
|
+
* furnished to do so, subject to the following conditions:
|
|
312
|
+
*
|
|
313
|
+
* The above copyright notice and this permission notice shall be included in
|
|
314
|
+
* all copies or substantial portions of the Software.
|
|
315
|
+
*
|
|
316
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
317
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
318
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
319
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
320
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
321
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
322
|
+
* IN THE SOFTWARE.
|
|
323
|
+
*/
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Parse markdown to tiptap nodes
|
|
327
|
+
*
|
|
328
|
+
* Under the hood this class first parse the markdown to mdast and then
|
|
329
|
+
* transform the mdast to tiptap nodes.
|
|
330
|
+
*
|
|
331
|
+
* @see {@link Parser}
|
|
332
|
+
*/
|
|
333
|
+
declare class MarkdownParser implements Parser {
|
|
334
|
+
/**
|
|
335
|
+
* Parse markdown to tiptap nodes
|
|
336
|
+
*
|
|
337
|
+
* @param input - The markdown input to parse
|
|
338
|
+
* @returns The tiptap node
|
|
339
|
+
*/
|
|
340
|
+
parse(input: string): Node;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* MIT License
|
|
345
|
+
*
|
|
346
|
+
* Copyright (c) 2023–Present PPResume (https://ppresume.com)
|
|
347
|
+
*
|
|
348
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
349
|
+
* of this software and associated documentation files (the "Software"), to
|
|
350
|
+
* deal in the Software without restriction, including without limitation the
|
|
351
|
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
352
|
+
* sell copies of the Software, and to permit persons to whom the Software is
|
|
353
|
+
* furnished to do so, subject to the following conditions:
|
|
354
|
+
*
|
|
355
|
+
* The above copyright notice and this permission notice shall be included in
|
|
356
|
+
* all copies or substantial portions of the Software.
|
|
357
|
+
*
|
|
358
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
359
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
360
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
361
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
362
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
363
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
364
|
+
* IN THE SOFTWARE.
|
|
365
|
+
*/
|
|
366
|
+
/**
|
|
367
|
+
* Represents all possible countries & regions.
|
|
368
|
+
*/
|
|
369
|
+
declare enum Country {
|
|
370
|
+
Afghanistan = "Afghanistan",
|
|
371
|
+
AlandIslands = "Aland Islands",
|
|
372
|
+
Albania = "Albania",
|
|
373
|
+
Algeria = "Algeria",
|
|
374
|
+
AmericanSamoa = "American Samoa",
|
|
375
|
+
Andorra = "Andorra",
|
|
376
|
+
Angola = "Angola",
|
|
377
|
+
Anguilla = "Anguilla",
|
|
378
|
+
Antarctica = "Antarctica",
|
|
379
|
+
AntiguaAndBarbuda = "Antigua And Barbuda",
|
|
380
|
+
Argentina = "Argentina",
|
|
381
|
+
Armenia = "Armenia",
|
|
382
|
+
Aruba = "Aruba",
|
|
383
|
+
Australia = "Australia",
|
|
384
|
+
Austria = "Austria",
|
|
385
|
+
Azerbaijan = "Azerbaijan",
|
|
386
|
+
Bahrain = "Bahrain",
|
|
387
|
+
Bangladesh = "Bangladesh",
|
|
388
|
+
Barbados = "Barbados",
|
|
389
|
+
Belarus = "Belarus",
|
|
390
|
+
Belgium = "Belgium",
|
|
391
|
+
Belize = "Belize",
|
|
392
|
+
Benin = "Benin",
|
|
393
|
+
Bermuda = "Bermuda",
|
|
394
|
+
Bhutan = "Bhutan",
|
|
395
|
+
Bolivia = "Bolivia",
|
|
396
|
+
BonaireSintEustatiusAndSaba = "Bonaire, Sint Eustatius and Saba",
|
|
397
|
+
BosniaAndHerzegovina = "Bosnia and Herzegovina",
|
|
398
|
+
Botswana = "Botswana",
|
|
399
|
+
BouvetIsland = "Bouvet Island",
|
|
400
|
+
Brazil = "Brazil",
|
|
401
|
+
BritishIndianOceanTerritory = "British Indian Ocean Territory",
|
|
402
|
+
Brunei = "Brunei",
|
|
403
|
+
Bulgaria = "Bulgaria",
|
|
404
|
+
BurkinaFaso = "Burkina Faso",
|
|
405
|
+
Burundi = "Burundi",
|
|
406
|
+
Cambodia = "Cambodia",
|
|
407
|
+
Cameroon = "Cameroon",
|
|
408
|
+
Canada = "Canada",
|
|
409
|
+
CapeVerde = "Cape Verde",
|
|
410
|
+
CaymanIslands = "Cayman Islands",
|
|
411
|
+
CentralAfricanRepublic = "Central African Republic",
|
|
412
|
+
Chad = "Chad",
|
|
413
|
+
Chile = "Chile",
|
|
414
|
+
China = "China",
|
|
415
|
+
ChristmasIsland = "Christmas Island",
|
|
416
|
+
CocosKeelingIslands = "Cocos (Keeling) Islands",
|
|
417
|
+
Colombia = "Colombia",
|
|
418
|
+
Comoros = "Comoros",
|
|
419
|
+
Congo = "Congo",
|
|
420
|
+
CookIslands = "Cook Islands",
|
|
421
|
+
CostaRica = "Costa Rica",
|
|
422
|
+
CoteDIvoireIvoryCoast = "Cote D'Ivoire (Ivory Coast)",
|
|
423
|
+
Croatia = "Croatia",
|
|
424
|
+
Cuba = "Cuba",
|
|
425
|
+
Curaçao = "Cura\u00E7ao",
|
|
426
|
+
Cyprus = "Cyprus",
|
|
427
|
+
CzechRepublic = "Czech Republic",
|
|
428
|
+
DemocraticRepublicoftheCongo = "Democratic Republic of the Congo",
|
|
429
|
+
Denmark = "Denmark",
|
|
430
|
+
Djibouti = "Djibouti",
|
|
431
|
+
Dominica = "Dominica",
|
|
432
|
+
DominicanRepublic = "Dominican Republic",
|
|
433
|
+
EastTimor = "East Timor",
|
|
434
|
+
Ecuador = "Ecuador",
|
|
435
|
+
Egypt = "Egypt",
|
|
436
|
+
ElSalvador = "El Salvador",
|
|
437
|
+
EquatorialGuinea = "Equatorial Guinea",
|
|
438
|
+
Eritrea = "Eritrea",
|
|
439
|
+
Estonia = "Estonia",
|
|
440
|
+
Ethiopia = "Ethiopia",
|
|
441
|
+
FalklandIslands = "Falkland Islands",
|
|
442
|
+
FaroeIslands = "Faroe Islands",
|
|
443
|
+
FijiIslands = "Fiji Islands",
|
|
444
|
+
Finland = "Finland",
|
|
445
|
+
France = "France",
|
|
446
|
+
FrenchGuiana = "French Guiana",
|
|
447
|
+
FrenchPolynesia = "French Polynesia",
|
|
448
|
+
FrenchSouthernTerritories = "French Southern Territories",
|
|
449
|
+
Gabon = "Gabon",
|
|
450
|
+
GambiaThe = "Gambia The",
|
|
451
|
+
Georgia = "Georgia",
|
|
452
|
+
Germany = "Germany",
|
|
453
|
+
Ghana = "Ghana",
|
|
454
|
+
Gibraltar = "Gibraltar",
|
|
455
|
+
Greece = "Greece",
|
|
456
|
+
Greenland = "Greenland",
|
|
457
|
+
Grenada = "Grenada",
|
|
458
|
+
Guadeloupe = "Guadeloupe",
|
|
459
|
+
Guam = "Guam",
|
|
460
|
+
Guatemala = "Guatemala",
|
|
461
|
+
GuernseyAndAlderney = "Guernsey and Alderney",
|
|
462
|
+
Guinea = "Guinea",
|
|
463
|
+
GuineaBissau = "Guinea-Bissau",
|
|
464
|
+
Guyana = "Guyana",
|
|
465
|
+
Haiti = "Haiti",
|
|
466
|
+
HeardIslandAndMcDonaldIslands = "Heard Island and McDonald Islands",
|
|
467
|
+
Honduras = "Honduras",
|
|
468
|
+
HongKongSAR = "Hong Kong S.A.R.",
|
|
469
|
+
Hungary = "Hungary",
|
|
470
|
+
Iceland = "Iceland",
|
|
471
|
+
India = "India",
|
|
472
|
+
Indonesia = "Indonesia",
|
|
473
|
+
Iran = "Iran",
|
|
474
|
+
Iraq = "Iraq",
|
|
475
|
+
Ireland = "Ireland",
|
|
476
|
+
Israel = "Israel",
|
|
477
|
+
Italy = "Italy",
|
|
478
|
+
Jamaica = "Jamaica",
|
|
479
|
+
Japan = "Japan",
|
|
480
|
+
Jersey = "Jersey",
|
|
481
|
+
Jordan = "Jordan",
|
|
482
|
+
Kazakhstan = "Kazakhstan",
|
|
483
|
+
Kenya = "Kenya",
|
|
484
|
+
Kiribati = "Kiribati",
|
|
485
|
+
Kosovo = "Kosovo",
|
|
486
|
+
Kuwait = "Kuwait",
|
|
487
|
+
Kyrgyzstan = "Kyrgyzstan",
|
|
488
|
+
Laos = "Laos",
|
|
489
|
+
Latvia = "Latvia",
|
|
490
|
+
Lebanon = "Lebanon",
|
|
491
|
+
Lesotho = "Lesotho",
|
|
492
|
+
Liberia = "Liberia",
|
|
493
|
+
Libya = "Libya",
|
|
494
|
+
Liechtenstein = "Liechtenstein",
|
|
495
|
+
Lithuania = "Lithuania",
|
|
496
|
+
Luxembourg = "Luxembourg",
|
|
497
|
+
MacauSAR = "Macau S.A.R.",
|
|
498
|
+
Madagascar = "Madagascar",
|
|
499
|
+
Malawi = "Malawi",
|
|
500
|
+
Malaysia = "Malaysia",
|
|
501
|
+
Maldives = "Maldives",
|
|
502
|
+
Mali = "Mali",
|
|
503
|
+
Malta = "Malta",
|
|
504
|
+
ManIsleof = "Man (Isle of)",
|
|
505
|
+
MarshallIslands = "Marshall Islands",
|
|
506
|
+
Martinique = "Martinique",
|
|
507
|
+
Mauritania = "Mauritania",
|
|
508
|
+
Mauritius = "Mauritius",
|
|
509
|
+
Mayotte = "Mayotte",
|
|
510
|
+
Mexico = "Mexico",
|
|
511
|
+
Micronesia = "Micronesia",
|
|
512
|
+
Moldova = "Moldova",
|
|
513
|
+
Monaco = "Monaco",
|
|
514
|
+
Mongolia = "Mongolia",
|
|
515
|
+
Montenegro = "Montenegro",
|
|
516
|
+
Montserrat = "Montserrat",
|
|
517
|
+
Morocco = "Morocco",
|
|
518
|
+
Mozambique = "Mozambique",
|
|
519
|
+
Myanmar = "Myanmar",
|
|
520
|
+
Namibia = "Namibia",
|
|
521
|
+
Nauru = "Nauru",
|
|
522
|
+
Nepal = "Nepal",
|
|
523
|
+
Netherlands = "Netherlands",
|
|
524
|
+
NewCaledonia = "New Caledonia",
|
|
525
|
+
NewZealand = "New Zealand",
|
|
526
|
+
Nicaragua = "Nicaragua",
|
|
527
|
+
Niger = "Niger",
|
|
528
|
+
Nigeria = "Nigeria",
|
|
529
|
+
Niue = "Niue",
|
|
530
|
+
NorfolkIsland = "Norfolk Island",
|
|
531
|
+
NorthKorea = "North Korea",
|
|
532
|
+
NorthMacedonia = "North Macedonia",
|
|
533
|
+
NorthernMarianaIslands = "Northern Mariana Islands",
|
|
534
|
+
Norway = "Norway",
|
|
535
|
+
Oman = "Oman",
|
|
536
|
+
Pakistan = "Pakistan",
|
|
537
|
+
Palau = "Palau",
|
|
538
|
+
PalestinianTerritoryOccupied = "Palestinian Territory Occupied",
|
|
539
|
+
Panama = "Panama",
|
|
540
|
+
PapuanewGuinea = "Papua new Guinea",
|
|
541
|
+
Paraguay = "Paraguay",
|
|
542
|
+
Peru = "Peru",
|
|
543
|
+
Philippines = "Philippines",
|
|
544
|
+
PitcairnIsland = "Pitcairn Island",
|
|
545
|
+
Poland = "Poland",
|
|
546
|
+
Portugal = "Portugal",
|
|
547
|
+
PuertoRico = "Puerto Rico",
|
|
548
|
+
Qatar = "Qatar",
|
|
549
|
+
Reunion = "Reunion",
|
|
550
|
+
Romania = "Romania",
|
|
551
|
+
Russia = "Russia",
|
|
552
|
+
Rwanda = "Rwanda",
|
|
553
|
+
SaintHelena = "Saint Helena",
|
|
554
|
+
SaintKittsAndNevis = "Saint Kitts And Nevis",
|
|
555
|
+
SaintLucia = "Saint Lucia",
|
|
556
|
+
SaintPierreAndMiquelon = "Saint Pierre and Miquelon",
|
|
557
|
+
SaintVincentAndTheGrenadines = "Saint Vincent And The Grenadines",
|
|
558
|
+
SaintBarthelemy = "Saint-Barthelemy",
|
|
559
|
+
SaintMartinFrenchpart = "Saint-Martin (French part)",
|
|
560
|
+
Samoa = "Samoa",
|
|
561
|
+
SanMarino = "San Marino",
|
|
562
|
+
SaoTomeAndPrincipe = "Sao Tome and Principe",
|
|
563
|
+
SaudiArabia = "Saudi Arabia",
|
|
564
|
+
Senegal = "Senegal",
|
|
565
|
+
Serbia = "Serbia",
|
|
566
|
+
Seychelles = "Seychelles",
|
|
567
|
+
SierraLeone = "Sierra Leone",
|
|
568
|
+
Singapore = "Singapore",
|
|
569
|
+
SintMaartenDutchpart = "Sint Maarten (Dutch part)",
|
|
570
|
+
Slovakia = "Slovakia",
|
|
571
|
+
Slovenia = "Slovenia",
|
|
572
|
+
SolomonIslands = "Solomon Islands",
|
|
573
|
+
Somalia = "Somalia",
|
|
574
|
+
SouthAfrica = "South Africa",
|
|
575
|
+
SouthGeorgia = "South Georgia",
|
|
576
|
+
SouthKorea = "South Korea",
|
|
577
|
+
SouthSudan = "South Sudan",
|
|
578
|
+
Spain = "Spain",
|
|
579
|
+
SriLanka = "Sri Lanka",
|
|
580
|
+
Sudan = "Sudan",
|
|
581
|
+
Suriname = "Suriname",
|
|
582
|
+
SvalbardAndJanMayenIslands = "Svalbard And Jan Mayen Islands",
|
|
583
|
+
Swaziland = "Swaziland",
|
|
584
|
+
Sweden = "Sweden",
|
|
585
|
+
Switzerland = "Switzerland",
|
|
586
|
+
Syria = "Syria",
|
|
587
|
+
Taiwan = "Taiwan",
|
|
588
|
+
Tajikistan = "Tajikistan",
|
|
589
|
+
Tanzania = "Tanzania",
|
|
590
|
+
Thailand = "Thailand",
|
|
591
|
+
TheBahamas = "The Bahamas",
|
|
592
|
+
Togo = "Togo",
|
|
593
|
+
Tokelau = "Tokelau",
|
|
594
|
+
Tonga = "Tonga",
|
|
595
|
+
TrinidadAndTobago = "Trinidad And Tobago",
|
|
596
|
+
Tunisia = "Tunisia",
|
|
597
|
+
Turkey = "Turkey",
|
|
598
|
+
Turkmenistan = "Turkmenistan",
|
|
599
|
+
TurksAndCaicosIslands = "Turks And Caicos Islands",
|
|
600
|
+
Tuvalu = "Tuvalu",
|
|
601
|
+
Uganda = "Uganda",
|
|
602
|
+
Ukraine = "Ukraine",
|
|
603
|
+
UnitedArabEmirates = "United Arab Emirates",
|
|
604
|
+
UnitedKingdom = "United Kingdom",
|
|
605
|
+
UnitedStates = "United States",
|
|
606
|
+
UnitedStatesMinorOutlyingIslands = "United States Minor Outlying Islands",
|
|
607
|
+
Uruguay = "Uruguay",
|
|
608
|
+
Uzbekistan = "Uzbekistan",
|
|
609
|
+
Vanuatu = "Vanuatu",
|
|
610
|
+
VaticanCityStateHolySee = "Vatican City State (Holy See)",
|
|
611
|
+
Venezuela = "Venezuela",
|
|
612
|
+
Vietnam = "Vietnam",
|
|
613
|
+
VirginIslandsBritish = "Virgin Islands (British)",
|
|
614
|
+
VirginIslandsUS = "Virgin Islands (US)",
|
|
615
|
+
WallisAndFutunaIslands = "Wallis And Futuna Islands",
|
|
616
|
+
WesternSahara = "Western Sahara",
|
|
617
|
+
Yemen = "Yemen",
|
|
618
|
+
Zambia = "Zambia",
|
|
619
|
+
Zimbabwe = "Zimbabwe"
|
|
620
|
+
}
|
|
621
|
+
/**
|
|
622
|
+
* Represents all possible countries & regions with their corresponding English
|
|
623
|
+
* names.
|
|
624
|
+
*/
|
|
625
|
+
declare const englishCountryNames: Record<Country, string>;
|
|
626
|
+
/**
|
|
627
|
+
* Represents all possible countries & regions with their corresponding
|
|
628
|
+
* Simplified Chinese names.
|
|
629
|
+
*/
|
|
630
|
+
declare const simplifiedChineseCountryNames: Record<Country, string>;
|
|
631
|
+
/**
|
|
632
|
+
* Represents all possible countries & regions with their corresponding
|
|
633
|
+
* Traditional Chinese HK names.
|
|
634
|
+
*/
|
|
635
|
+
declare const traditionalChineseCountryHKNames: Record<Country, string>;
|
|
636
|
+
/**
|
|
637
|
+
* Represents all possible countries & regions with their corresponding
|
|
638
|
+
* Traditional Chinese TW names.
|
|
639
|
+
*/
|
|
640
|
+
declare const traditionalChineseCountryTWNames: Record<Country, string>;
|
|
641
|
+
/**
|
|
642
|
+
* Represents all possible countries & regions with their corresponding
|
|
643
|
+
* Spanish names.
|
|
644
|
+
*/
|
|
645
|
+
declare const spanishCountryNames: Record<Country, string>;
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* MIT License
|
|
649
|
+
*
|
|
650
|
+
* Copyright (c) 2023–Present PPResume (https://ppresume.com)
|
|
651
|
+
*
|
|
652
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
653
|
+
* of this software and associated documentation files (the "Software"), to
|
|
654
|
+
* deal in the Software without restriction, including without limitation the
|
|
655
|
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
656
|
+
* sell copies of the Software, and to permit persons to whom the Software is
|
|
657
|
+
* furnished to do so, subject to the following conditions:
|
|
658
|
+
*
|
|
659
|
+
* The above copyright notice and this permission notice shall be included in
|
|
660
|
+
* all copies or substantial portions of the Software.
|
|
661
|
+
*
|
|
662
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
663
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
664
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
665
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
666
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
667
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
668
|
+
* IN THE SOFTWARE.
|
|
669
|
+
*/
|
|
670
|
+
|
|
671
|
+
/** Represents the valid identifiers for top-level sections within the resume
|
|
672
|
+
* content.
|
|
673
|
+
*
|
|
674
|
+
* TODO: should we move this to TypeScript enum?
|
|
675
|
+
* */
|
|
676
|
+
type SectionID = 'basics' | 'location' | 'profiles' | 'work' | 'education' | 'volunteer' | 'awards' | 'certificates' | 'publications' | 'skills' | 'languages' | 'interests' | 'references' | 'projects';
|
|
677
|
+
/** Categorizes social networks for potential grouping or display purposes. */
|
|
678
|
+
type SocialNetworkGroup = 'Chat' | 'Design' | 'Media' | 'Social' | 'Technical' | 'WWW';
|
|
679
|
+
/** Defines supported social media and professional network identifiers.
|
|
680
|
+
*
|
|
681
|
+
* TODO: should we move this to TypeScript enum?
|
|
682
|
+
*/
|
|
683
|
+
type SocialNetwork = 'Behance' | 'Dribbble' | 'Facebook' | 'GitHub' | 'Gitlab' | 'Instagram' | 'Line' | 'LinkedIn' | 'Medium' | 'Pinterest' | 'Reddit' | 'Snapchat' | 'Stack Overflow' | 'Telegram' | 'TikTok' | 'Twitch' | 'Twitter' | 'Vimeo' | 'Weibo' | 'WeChat' | 'WhatsApp' | 'YouTube' | 'Zhihu' | '';
|
|
684
|
+
type KeywordsType = string[];
|
|
685
|
+
/** Represents a single award item. */
|
|
686
|
+
type AwardItem = {
|
|
687
|
+
/** The organization or entity that gave the award. */
|
|
688
|
+
awarder?: string;
|
|
689
|
+
/** The date the award was received (e.g., "2020", "Oct 2020"). */
|
|
690
|
+
date?: string;
|
|
691
|
+
/** A short description or details about the award (supports rich text). */
|
|
692
|
+
summary?: string;
|
|
693
|
+
/** The name or title of the award. */
|
|
694
|
+
title?: string;
|
|
695
|
+
/** Computed values derived during transformation. */
|
|
696
|
+
computed?: {
|
|
697
|
+
/** Transformed date string. */
|
|
698
|
+
date?: string;
|
|
699
|
+
/** Transformed summary string (e.g., LaTeX code). */
|
|
700
|
+
summary?: string;
|
|
701
|
+
};
|
|
702
|
+
};
|
|
703
|
+
/** Represents the 'awards' section of the resume content. */
|
|
704
|
+
type Awards = {
|
|
705
|
+
/** An array of award items. */
|
|
706
|
+
awards?: AwardItem[];
|
|
707
|
+
};
|
|
708
|
+
/** Represents the basic personal information. */
|
|
709
|
+
type BasicsItem = {
|
|
710
|
+
/** Email address. */
|
|
711
|
+
email?: string;
|
|
712
|
+
/** A brief professional headline or title (e.g., "Software Engineer"). */
|
|
713
|
+
headline: string;
|
|
714
|
+
/** Full name. */
|
|
715
|
+
name?: string;
|
|
716
|
+
/** Phone number. */
|
|
717
|
+
phone?: string;
|
|
718
|
+
/** A professional summary or objective statement (supports rich text). */
|
|
719
|
+
summary?: string;
|
|
720
|
+
/** Personal website or portfolio URL. */
|
|
721
|
+
url?: string;
|
|
722
|
+
/** Computed values derived during transformation. */
|
|
723
|
+
computed?: {
|
|
724
|
+
/** Transformed summary string (e.g., LaTeX code). */
|
|
725
|
+
summary?: string;
|
|
726
|
+
/** Transformed URL string (e.g., LaTeX href command). */
|
|
727
|
+
url?: string;
|
|
728
|
+
};
|
|
729
|
+
};
|
|
730
|
+
/** Represents the 'basics' section of the resume content. */
|
|
731
|
+
type Basics = {
|
|
732
|
+
/** The basic personal information item. */
|
|
733
|
+
basics?: BasicsItem;
|
|
734
|
+
};
|
|
735
|
+
/** Represents a single certification item. */
|
|
736
|
+
type CertificateItem = {
|
|
737
|
+
/** The date the certificate was obtained (e.g., "2021", "Nov 2021"). */
|
|
738
|
+
date?: string;
|
|
739
|
+
/** The organization that issued the certificate. */
|
|
740
|
+
issuer?: string;
|
|
741
|
+
/** The name of the certificate. */
|
|
742
|
+
name?: string;
|
|
743
|
+
/** URL related to the certificate (e.g., verification link). */
|
|
744
|
+
url?: string;
|
|
745
|
+
/** Computed values derived during transformation. */
|
|
746
|
+
computed?: {
|
|
747
|
+
/** Transformed date string. */
|
|
748
|
+
date?: string;
|
|
749
|
+
};
|
|
750
|
+
};
|
|
751
|
+
/** Represents the 'certificates' section of the resume content. */
|
|
752
|
+
type Certificates = {
|
|
753
|
+
/** An array of certificate items. */
|
|
754
|
+
certificates?: CertificateItem[];
|
|
755
|
+
};
|
|
756
|
+
/** Represents a single education history item. */
|
|
757
|
+
type EducationItem = {
|
|
758
|
+
/** Field of study (e.g., "Computer Science"). */
|
|
759
|
+
area?: string;
|
|
760
|
+
/** List of courses taken (can be string array or pre-joined string). */
|
|
761
|
+
courses?: string[] | string;
|
|
762
|
+
/** End date of study (e.g., "2020", "May 2020"). Empty implies "Present". */
|
|
763
|
+
endDate?: string;
|
|
764
|
+
/** Description of accomplishments or details (supports rich text). */
|
|
765
|
+
summary?: string;
|
|
766
|
+
/** Name of the institution. */
|
|
767
|
+
institution?: string;
|
|
768
|
+
/** GPA or academic score. */
|
|
769
|
+
score?: string;
|
|
770
|
+
/** Start date of study (e.g., "2016", "Sep 2016"). */
|
|
771
|
+
startDate?: string;
|
|
772
|
+
/** The type of degree obtained. */
|
|
773
|
+
degree?: Degree;
|
|
774
|
+
/** URL related to the institution or degree. */
|
|
775
|
+
url?: string;
|
|
776
|
+
/** Computed values derived during transformation. */
|
|
777
|
+
computed?: {
|
|
778
|
+
/** Transformed courses string (e.g., comma-separated). */
|
|
779
|
+
courses?: string;
|
|
780
|
+
/** Combined string of degree, area, and score. */
|
|
781
|
+
degreeAreaAndScore?: string;
|
|
782
|
+
/** Combined string representing the date range. */
|
|
783
|
+
dateRange?: string;
|
|
784
|
+
/** Transformed start date string. */
|
|
785
|
+
startDate?: string;
|
|
786
|
+
/** Transformed end date string (or "Present"). */
|
|
787
|
+
endDate?: string;
|
|
788
|
+
/** Transformed summary string (e.g., LaTeX code). */
|
|
789
|
+
summary?: string;
|
|
790
|
+
};
|
|
791
|
+
};
|
|
792
|
+
/** Represents the 'education' section of the resume content. */
|
|
793
|
+
type Education = {
|
|
794
|
+
/** An array of education history items. */
|
|
795
|
+
education?: EducationItem[];
|
|
796
|
+
};
|
|
797
|
+
/** Represents a single interest item. */
|
|
798
|
+
type InterestItem = {
|
|
799
|
+
/** Keywords related to the interest. */
|
|
800
|
+
keywords?: KeywordsType;
|
|
801
|
+
/** Name of the interest category (e.g., "Reading", "Photography"). */
|
|
802
|
+
name?: string;
|
|
803
|
+
/** Computed values derived during transformation. */
|
|
804
|
+
computed?: {
|
|
805
|
+
/** Transformed keywords string (e.g., comma-separated). */
|
|
806
|
+
keywords?: string;
|
|
807
|
+
};
|
|
808
|
+
};
|
|
809
|
+
/** Represents the 'interests' section of the resume content. */
|
|
810
|
+
type Interests = {
|
|
811
|
+
/** An array of interest items. */
|
|
812
|
+
interests?: InterestItem[];
|
|
813
|
+
};
|
|
814
|
+
/** Represents a single language proficiency item. */
|
|
815
|
+
type LanguageItem = {
|
|
816
|
+
/** The language spoken. */
|
|
817
|
+
language?: Language;
|
|
818
|
+
/** The level of proficiency in the language. */
|
|
819
|
+
fluency?: LanguageFluency;
|
|
820
|
+
/** Specific keywords related to language skills (e.g., "Translation"). */
|
|
821
|
+
keywords?: KeywordsType;
|
|
822
|
+
/** Computed values derived during transformation. */
|
|
823
|
+
computed?: {
|
|
824
|
+
/** Translated fluency level string. */
|
|
825
|
+
fluency?: string;
|
|
826
|
+
/** Translated language name string. */
|
|
827
|
+
language?: string;
|
|
828
|
+
/** Transformed keywords string. */
|
|
829
|
+
keywords?: string;
|
|
830
|
+
};
|
|
831
|
+
};
|
|
832
|
+
/** Represents the 'languages' section of the resume content. */
|
|
833
|
+
type Languages = {
|
|
834
|
+
/** An array of language items. */
|
|
835
|
+
languages?: LanguageItem[];
|
|
836
|
+
};
|
|
837
|
+
/** Represents the location information. */
|
|
838
|
+
type LocationItem = {
|
|
839
|
+
/** Street address. */
|
|
840
|
+
address?: string;
|
|
841
|
+
/** City name. */
|
|
842
|
+
city?: string;
|
|
843
|
+
/** Country code or name. */
|
|
844
|
+
country?: Country;
|
|
845
|
+
/** Postal or ZIP code. */
|
|
846
|
+
postalCode?: string;
|
|
847
|
+
/** State, province, or region. */
|
|
848
|
+
region?: string;
|
|
849
|
+
/** Computed values derived during transformation. */
|
|
850
|
+
computed?: {
|
|
851
|
+
/** Combined string of postal code and address. */
|
|
852
|
+
postalCodeAndAddress?: string;
|
|
853
|
+
/** Combined string of region and country. */
|
|
854
|
+
regionAndCountry?: string;
|
|
855
|
+
/** Fully formatted address string based on locale. */
|
|
856
|
+
fullAddress?: string;
|
|
857
|
+
};
|
|
858
|
+
};
|
|
859
|
+
/** Represents the 'location' section of the resume content. */
|
|
860
|
+
type Location = {
|
|
861
|
+
/** The location information item. */
|
|
862
|
+
location?: LocationItem;
|
|
863
|
+
};
|
|
864
|
+
/** Represents a single online profile item (e.g., GitHub, LinkedIn). */
|
|
865
|
+
type ProfileItem = {
|
|
866
|
+
/** The name of the social network or platform. */
|
|
867
|
+
network?: SocialNetwork;
|
|
868
|
+
/** The URL of the profile. */
|
|
869
|
+
url?: string;
|
|
870
|
+
/** The username on the platform. */
|
|
871
|
+
username?: string;
|
|
872
|
+
/** Computed values derived during transformation. */
|
|
873
|
+
computed?: {
|
|
874
|
+
/** Transformed URL string (e.g., LaTeX href with icon). */
|
|
875
|
+
url?: string;
|
|
876
|
+
};
|
|
877
|
+
};
|
|
878
|
+
/** Represents the 'profiles' section of the resume content. */
|
|
879
|
+
type Profiles = {
|
|
880
|
+
/** An array of online profile items. */
|
|
881
|
+
profiles?: ProfileItem[];
|
|
882
|
+
};
|
|
883
|
+
/** Represents a single project item. */
|
|
884
|
+
type ProjectItem = {
|
|
885
|
+
/** Description of the project. */
|
|
886
|
+
description?: string;
|
|
887
|
+
/** End date of the project (e.g., "2022", "Jul 2022"). */
|
|
888
|
+
endDate?: string;
|
|
889
|
+
/** Keywords or technologies used in the project. */
|
|
890
|
+
keywords?: KeywordsType;
|
|
891
|
+
/** Name of the project. */
|
|
892
|
+
name?: string;
|
|
893
|
+
/** Start date of the project (e.g., "2021", "Jan 2021"). */
|
|
894
|
+
startDate?: string;
|
|
895
|
+
/** Detailed accomplishments for the project (supports rich text). */
|
|
896
|
+
summary?: string;
|
|
897
|
+
/** URL related to the project (e.g., repository, live demo). */
|
|
898
|
+
url?: string;
|
|
899
|
+
/** Computed values derived during transformation. */
|
|
900
|
+
computed?: {
|
|
901
|
+
/** Transformed keywords string. */
|
|
902
|
+
keywords?: string;
|
|
903
|
+
/** Combined string representing the date range. */
|
|
904
|
+
dateRange?: string;
|
|
905
|
+
/** Transformed start date string. */
|
|
906
|
+
startDate?: string;
|
|
907
|
+
/** Transformed end date string (or "Present"). */
|
|
908
|
+
endDate?: string;
|
|
909
|
+
/** Transformed summary string (e.g., LaTeX code). */
|
|
910
|
+
summary?: string;
|
|
911
|
+
};
|
|
912
|
+
};
|
|
913
|
+
/** Represents the 'projects' section of the resume content. */
|
|
914
|
+
type Projects = {
|
|
915
|
+
/** An array of project items. */
|
|
916
|
+
projects?: ProjectItem[];
|
|
917
|
+
};
|
|
918
|
+
/** Represents a single publication item. */
|
|
919
|
+
type PublicationItem = {
|
|
920
|
+
/** Name or title of the publication. */
|
|
921
|
+
name?: string;
|
|
922
|
+
/** Publisher of the work. */
|
|
923
|
+
publisher?: string;
|
|
924
|
+
/** Date of publication (e.g., "2023", "Mar 2023"). */
|
|
925
|
+
releaseDate?: string;
|
|
926
|
+
/** URL related to the publication (e.g., DOI, link). */
|
|
927
|
+
url?: string;
|
|
928
|
+
/** Summary or abstract of the publication (supports rich text). */
|
|
929
|
+
summary?: string;
|
|
930
|
+
/** Computed values derived during transformation. */
|
|
931
|
+
computed?: {
|
|
932
|
+
/** Transformed release date string. */
|
|
933
|
+
releaseDate?: string;
|
|
934
|
+
/** Transformed summary string (e.g., LaTeX code). */
|
|
935
|
+
summary?: string;
|
|
936
|
+
};
|
|
937
|
+
};
|
|
938
|
+
/** Represents the 'publications' section of the resume content. */
|
|
939
|
+
type Publications = {
|
|
940
|
+
/** An array of publication items. */
|
|
941
|
+
publications?: PublicationItem[];
|
|
942
|
+
};
|
|
943
|
+
/** Represents a single reference item. */
|
|
944
|
+
type ReferenceItem = {
|
|
945
|
+
/** Email address of the reference. */
|
|
946
|
+
email?: string;
|
|
947
|
+
/** Name of the reference. */
|
|
948
|
+
name?: string;
|
|
949
|
+
/** Phone number of the reference. */
|
|
950
|
+
phone?: string;
|
|
951
|
+
/** Relationship to the reference (e.g., "Former Manager"). */
|
|
952
|
+
relationship?: string;
|
|
953
|
+
/** A brief note about the reference (supports rich text). */
|
|
954
|
+
summary?: string;
|
|
955
|
+
/** Computed values derived during transformation. */
|
|
956
|
+
computed?: {
|
|
957
|
+
/** Transformed summary string (e.g., LaTeX code). */
|
|
958
|
+
summary?: string;
|
|
959
|
+
};
|
|
960
|
+
};
|
|
961
|
+
/** Represents the 'references' section of the resume content. */
|
|
962
|
+
type References = {
|
|
963
|
+
/** An array of reference items. */
|
|
964
|
+
references?: ReferenceItem[];
|
|
965
|
+
};
|
|
966
|
+
/** Represents a single skill item. */
|
|
967
|
+
type SkillItem = {
|
|
968
|
+
/** Specific keywords or technologies related to the skill. */
|
|
969
|
+
keywords?: KeywordsType;
|
|
970
|
+
/** Proficiency level in the skill. */
|
|
971
|
+
level?: SkillLevel;
|
|
972
|
+
/** Name of the skill. */
|
|
973
|
+
name?: string;
|
|
974
|
+
/** Computed values derived during transformation. */
|
|
975
|
+
computed?: {
|
|
976
|
+
/** Translated skill level string. */
|
|
977
|
+
level?: string;
|
|
978
|
+
/** Transformed keywords string. */
|
|
979
|
+
keywords?: string;
|
|
980
|
+
};
|
|
981
|
+
};
|
|
982
|
+
/** Represents the 'skills' section of the resume content. */
|
|
983
|
+
type Skills = {
|
|
984
|
+
/** An array of skill items. */
|
|
985
|
+
skills?: SkillItem[];
|
|
986
|
+
};
|
|
987
|
+
/** Represents a single volunteer experience item. */
|
|
988
|
+
type VolunteerItem = {
|
|
989
|
+
/** End date of the volunteer work (e.g., "2020", "Dec 2020"). */
|
|
990
|
+
endDate?: string;
|
|
991
|
+
/** Name of the organization. */
|
|
992
|
+
organization?: string;
|
|
993
|
+
/** Role or position held. */
|
|
994
|
+
position?: string;
|
|
995
|
+
/** Start date of the volunteer work (e.g., "2019", "Jun 2019"). */
|
|
996
|
+
startDate?: string;
|
|
997
|
+
/** Summary of responsibilities or achievements (supports rich text). */
|
|
998
|
+
summary?: string;
|
|
999
|
+
/** URL related to the organization or work. */
|
|
1000
|
+
url?: string;
|
|
1001
|
+
/** Computed values derived during transformation. */
|
|
1002
|
+
computed?: {
|
|
1003
|
+
/** Combined string representing the date range. */
|
|
1004
|
+
dateRange?: string;
|
|
1005
|
+
/** Transformed start date string. */
|
|
1006
|
+
startDate?: string;
|
|
1007
|
+
/** Transformed end date string (or "Present"). */
|
|
1008
|
+
endDate?: string;
|
|
1009
|
+
/** Transformed summary string (e.g., LaTeX code). */
|
|
1010
|
+
summary?: string;
|
|
1011
|
+
};
|
|
1012
|
+
};
|
|
1013
|
+
/** Represents the 'volunteer' section of the resume content. */
|
|
1014
|
+
type Volunteer = {
|
|
1015
|
+
/** An array of volunteer experience items. */
|
|
1016
|
+
volunteer?: VolunteerItem[];
|
|
1017
|
+
};
|
|
1018
|
+
/** Represents a single work experience item. */
|
|
1019
|
+
type WorkItem = {
|
|
1020
|
+
/** Name of the company or employer. */
|
|
1021
|
+
name?: string;
|
|
1022
|
+
/** End date of employment (e.g., "2023", "Aug 2023"). */
|
|
1023
|
+
endDate?: string;
|
|
1024
|
+
/** Job title or position held. */
|
|
1025
|
+
position?: string;
|
|
1026
|
+
/** Start date of employment (e.g., "2021", "Apr 2021"). */
|
|
1027
|
+
startDate?: string;
|
|
1028
|
+
/** Keywords related to the role or technologies used. */
|
|
1029
|
+
keywords?: KeywordsType;
|
|
1030
|
+
/** Summary of responsibilities and accomplishments (supports rich text). */
|
|
1031
|
+
summary?: string;
|
|
1032
|
+
/** URL related to the company or work. */
|
|
1033
|
+
url?: string;
|
|
1034
|
+
/** Computed values derived during transformation. */
|
|
1035
|
+
computed?: {
|
|
1036
|
+
/** Transformed keywords string. */
|
|
1037
|
+
keywords?: string;
|
|
1038
|
+
/** Combined string representing the date range. */
|
|
1039
|
+
dateRange?: string;
|
|
1040
|
+
/** Transformed start date string. */
|
|
1041
|
+
startDate?: string;
|
|
1042
|
+
/** Transformed end date string (or "Present"). */
|
|
1043
|
+
endDate?: string;
|
|
1044
|
+
/** Transformed summary string (e.g., LaTeX code). */
|
|
1045
|
+
summary?: string;
|
|
1046
|
+
};
|
|
1047
|
+
};
|
|
1048
|
+
/** Represents the 'work' section of the resume content. */
|
|
1049
|
+
type Work = {
|
|
1050
|
+
/** An array of work experience items. */
|
|
1051
|
+
work?: WorkItem[];
|
|
1052
|
+
};
|
|
1053
|
+
/** Union type representing the structure for any top-level resume section. */
|
|
1054
|
+
type SectionDefaultValues = Awards | Basics | Certificates | Education | Interests | Languages | Location | Profiles | Projects | Publications | References | Skills | Volunteer | Work;
|
|
1055
|
+
/** Type defining the structure for a single default item within each resume
|
|
1056
|
+
* section. */
|
|
1057
|
+
type ResumeItem = {
|
|
1058
|
+
award: AwardItem;
|
|
1059
|
+
basics: BasicsItem;
|
|
1060
|
+
certificate: CertificateItem;
|
|
1061
|
+
education: EducationItem;
|
|
1062
|
+
interest: InterestItem;
|
|
1063
|
+
language: LanguageItem;
|
|
1064
|
+
location: LocationItem;
|
|
1065
|
+
project: ProjectItem;
|
|
1066
|
+
profile: ProfileItem;
|
|
1067
|
+
publication: PublicationItem;
|
|
1068
|
+
reference: ReferenceItem;
|
|
1069
|
+
skill: SkillItem;
|
|
1070
|
+
volunteer: VolunteerItem;
|
|
1071
|
+
work: WorkItem;
|
|
1072
|
+
};
|
|
1073
|
+
/** Defines the structure for the entire resume content, including all sections
|
|
1074
|
+
* and computed values. */
|
|
1075
|
+
type ResumeContent = {
|
|
1076
|
+
/** Array of award items. */
|
|
1077
|
+
awards: AwardItem[];
|
|
1078
|
+
/** Basic personal information. */
|
|
1079
|
+
basics: BasicsItem;
|
|
1080
|
+
/** Array of certificate items. */
|
|
1081
|
+
certificates: CertificateItem[];
|
|
1082
|
+
/** Array of education history items. */
|
|
1083
|
+
education: EducationItem[];
|
|
1084
|
+
/** Array of interest items. */
|
|
1085
|
+
interests: InterestItem[];
|
|
1086
|
+
/** Array of language proficiency items. */
|
|
1087
|
+
languages: LanguageItem[];
|
|
1088
|
+
/** Location information. */
|
|
1089
|
+
location: LocationItem;
|
|
1090
|
+
/** Array of project items. */
|
|
1091
|
+
projects: ProjectItem[];
|
|
1092
|
+
/** Array of online profile items. */
|
|
1093
|
+
profiles: ProfileItem[];
|
|
1094
|
+
/** Array of publication items. */
|
|
1095
|
+
publications: PublicationItem[];
|
|
1096
|
+
/** Array of reference items. */
|
|
1097
|
+
references: ReferenceItem[];
|
|
1098
|
+
/** Array of skill items. */
|
|
1099
|
+
skills: SkillItem[];
|
|
1100
|
+
/** Array of volunteer experience items. */
|
|
1101
|
+
volunteer: VolunteerItem[];
|
|
1102
|
+
/** Array of work experience items. */
|
|
1103
|
+
work: WorkItem[];
|
|
1104
|
+
computed?: {
|
|
1105
|
+
/** Translated names for each resume section based on locale. */
|
|
1106
|
+
sectionNames?: {
|
|
1107
|
+
awards?: string;
|
|
1108
|
+
basics?: string;
|
|
1109
|
+
certificates?: string;
|
|
1110
|
+
education?: string;
|
|
1111
|
+
interests?: string;
|
|
1112
|
+
languages?: string;
|
|
1113
|
+
location?: string;
|
|
1114
|
+
projects?: string;
|
|
1115
|
+
profiles?: string;
|
|
1116
|
+
publications?: string;
|
|
1117
|
+
references?: string;
|
|
1118
|
+
skills?: string;
|
|
1119
|
+
volunteer?: string;
|
|
1120
|
+
work?: string;
|
|
1121
|
+
};
|
|
1122
|
+
/** Combined and formatted string of URLs from basics and profiles. */
|
|
1123
|
+
urls?: string;
|
|
1124
|
+
};
|
|
1125
|
+
};
|
|
1126
|
+
/** Defines the structure for page margin settings. */
|
|
1127
|
+
type ResumeLayoutMargins = {
|
|
1128
|
+
/** Top margin value (e.g., "2.5cm"). */
|
|
1129
|
+
top: string;
|
|
1130
|
+
/** Bottom margin value (e.g., "2.5cm"). */
|
|
1131
|
+
bottom: string;
|
|
1132
|
+
/** Left margin value (e.g., "1.5cm"). */
|
|
1133
|
+
left: string;
|
|
1134
|
+
/** Right margin value (e.g., "1.5cm"). */
|
|
1135
|
+
right: string;
|
|
1136
|
+
};
|
|
1137
|
+
/** Defines the available styles for rendering numbers in the font spec. */
|
|
1138
|
+
declare enum FontSpecNumbersStyle {
|
|
1139
|
+
/** Standard lining figures (default for CJK languages). */
|
|
1140
|
+
Lining = "Lining",
|
|
1141
|
+
/** Old-style figures with varying heights (default for Latin languages). */
|
|
1142
|
+
OldStyle = "OldStyle",
|
|
1143
|
+
/**
|
|
1144
|
+
* Represents an undefined state, allowing the style to be automatically
|
|
1145
|
+
* determined based on the selected `LocaleLanguage`.
|
|
1146
|
+
*/
|
|
1147
|
+
Undefined = "Undefined"
|
|
1148
|
+
}
|
|
1149
|
+
/** Defines typography settings like font size and number style. */
|
|
1150
|
+
type ResumeLayoutTypography = {
|
|
1151
|
+
/** Base font size for the document (e.g., "10pt", "11pt"). */
|
|
1152
|
+
fontSize: string;
|
|
1153
|
+
/** Font specification details. */
|
|
1154
|
+
fontSpec: {
|
|
1155
|
+
/** Style for rendering numbers (Lining or OldStyle). */
|
|
1156
|
+
numbers: FontSpecNumbersStyle;
|
|
1157
|
+
};
|
|
1158
|
+
};
|
|
1159
|
+
/** Defines locale settings, primarily the language for translations. */
|
|
1160
|
+
type ResumeLayoutLocale = {
|
|
1161
|
+
/** The selected language for the resume content and template terms. */
|
|
1162
|
+
language: LocaleLanguageOption;
|
|
1163
|
+
};
|
|
1164
|
+
/** Defines page-level settings like page numbering. */
|
|
1165
|
+
type ResumeLayoutPage = {
|
|
1166
|
+
/** Whether to display page numbers. */
|
|
1167
|
+
showPageNumbers: boolean;
|
|
1168
|
+
};
|
|
1169
|
+
/** Defines the selected template identifier. */
|
|
1170
|
+
type ResumeTemplate = TemplateOption;
|
|
1171
|
+
/** Defines the overall layout configuration, including template, margins,
|
|
1172
|
+
* typography, locale, and computed environment settings. */
|
|
1173
|
+
type ResumeLayout = {
|
|
1174
|
+
/** The selected template configuration. */
|
|
1175
|
+
template: ResumeTemplate;
|
|
1176
|
+
/** Page margin settings. */
|
|
1177
|
+
margins: ResumeLayoutMargins;
|
|
1178
|
+
/** Typography settings. */
|
|
1179
|
+
typography: ResumeLayoutTypography;
|
|
1180
|
+
/** Localization settings. */
|
|
1181
|
+
locale: ResumeLayoutLocale;
|
|
1182
|
+
/** Page-level settings. */
|
|
1183
|
+
page: ResumeLayoutPage;
|
|
1184
|
+
};
|
|
1185
|
+
/**
|
|
1186
|
+
* Represents the complete resume data structure, including metadata, content,
|
|
1187
|
+
* layout configuration, and build information.
|
|
1188
|
+
*/
|
|
1189
|
+
type Resume = {
|
|
1190
|
+
/** Unique identifier for the resume. */
|
|
1191
|
+
id: string;
|
|
1192
|
+
/** User-defined title for the resume. */
|
|
1193
|
+
title: string;
|
|
1194
|
+
/** URL-friendly identifier for the resume. */
|
|
1195
|
+
slug: string;
|
|
1196
|
+
/** Contains all the textual and structured content of the resume sections. */
|
|
1197
|
+
content: ResumeContent;
|
|
1198
|
+
/** Defines the visual appearance, template, and localization settings. */
|
|
1199
|
+
layout: ResumeLayout;
|
|
1200
|
+
/** URL or path to the generated PDF file, if available. */
|
|
1201
|
+
pdf: string;
|
|
1202
|
+
/** Timestamp indicating when the resume was created. */
|
|
1203
|
+
createdAt: string;
|
|
1204
|
+
/** Timestamp indicating the last time the resume was updated. */
|
|
1205
|
+
updatedAt: string;
|
|
1206
|
+
/** Timestamp indicating when the resume was published (if applicable). */
|
|
1207
|
+
publishedAt: string;
|
|
1208
|
+
};
|
|
1209
|
+
|
|
1210
|
+
/**
|
|
1211
|
+
* MIT License
|
|
1212
|
+
*
|
|
1213
|
+
* Copyright (c) 2023–Present PPResume (https://ppresume.com)
|
|
1214
|
+
*
|
|
1215
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1216
|
+
* of this software and associated documentation files (the "Software"), to
|
|
1217
|
+
* deal in the Software without restriction, including without limitation the
|
|
1218
|
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
1219
|
+
* sell copies of the Software, and to permit persons to whom the Software is
|
|
1220
|
+
* furnished to do so, subject to the following conditions:
|
|
1221
|
+
*
|
|
1222
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1223
|
+
* all copies or substantial portions of the Software.
|
|
1224
|
+
*
|
|
1225
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1226
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1227
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1228
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1229
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
1230
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
1231
|
+
* IN THE SOFTWARE.
|
|
1232
|
+
*/
|
|
1233
|
+
|
|
1234
|
+
/** Represents a Tiptap editor JSON string for a single empty paragraph. */
|
|
1235
|
+
declare const emptyParagraph = "{\"type\":\"doc\",\"content\":[{\"type\":\"paragraph\"}]}";
|
|
1236
|
+
/** Defines standard academic degree types. */
|
|
1237
|
+
declare enum Degree {
|
|
1238
|
+
MiddleSchool = "Middle School",
|
|
1239
|
+
HighSchool = "High School",
|
|
1240
|
+
Diploma = "Diploma",
|
|
1241
|
+
Associate = "Associate",
|
|
1242
|
+
Bachelor = "Bachelor",
|
|
1243
|
+
Master = "Master",
|
|
1244
|
+
Doctor = "Doctor"
|
|
1245
|
+
}
|
|
1246
|
+
/** An array containing all possible values from the `Degree` enum. */
|
|
1247
|
+
declare const degreeOptions: Degree[];
|
|
1248
|
+
/** Defines common world languages.
|
|
1249
|
+
*
|
|
1250
|
+
* This list contains the most used languages in the world.
|
|
1251
|
+
*
|
|
1252
|
+
* TODO: allow users to add their own languages
|
|
1253
|
+
*/
|
|
1254
|
+
declare enum Language {
|
|
1255
|
+
Arabic = "Arabic",
|
|
1256
|
+
Bengali = "Bengali",
|
|
1257
|
+
Bhojpuri = "Bhojpuri",
|
|
1258
|
+
Cantonese = "Cantonese",
|
|
1259
|
+
Chinese = "Chinese",
|
|
1260
|
+
Dutch = "Dutch",
|
|
1261
|
+
English = "English",
|
|
1262
|
+
French = "French",
|
|
1263
|
+
German = "German",
|
|
1264
|
+
Gujarati = "Gujarati",
|
|
1265
|
+
Hausa = "Hausa",
|
|
1266
|
+
Hindi = "Hindi",
|
|
1267
|
+
Indonesian = "Indonesian",
|
|
1268
|
+
Italian = "Italian",
|
|
1269
|
+
Japanese = "Japanese",
|
|
1270
|
+
Javanese = "Javanese",
|
|
1271
|
+
Korean = "Korean",
|
|
1272
|
+
Marathi = "Marathi",
|
|
1273
|
+
Mandarin = "Mandarin",
|
|
1274
|
+
Portuguese = "Portuguese",
|
|
1275
|
+
Russian = "Russian",
|
|
1276
|
+
Spanish = "Spanish",
|
|
1277
|
+
Tamil = "Tamil",
|
|
1278
|
+
Turkish = "Turkish",
|
|
1279
|
+
Urdu = "Urdu",
|
|
1280
|
+
Vietnamese = "Vietnamese"
|
|
1281
|
+
}
|
|
1282
|
+
/** An array containing all possible values from the `Language` enum. */
|
|
1283
|
+
declare const languagesOptions: Language[];
|
|
1284
|
+
/** Defines levels of language proficiency.
|
|
1285
|
+
*
|
|
1286
|
+
* This list of options is coming from LinkedIn.
|
|
1287
|
+
*/
|
|
1288
|
+
declare enum LanguageFluency {
|
|
1289
|
+
ElementaryProficiency = "Elementary Proficiency",
|
|
1290
|
+
LimitedWorkingProficiency = "Limited Working Proficiency",
|
|
1291
|
+
MinimumProfessionalProficiency = "Minimum Professional Proficiency",
|
|
1292
|
+
FullProfessionalProficiency = "Full Professional Proficiency",
|
|
1293
|
+
NativeOrBilingualProficiency = "Native or Bilingual Proficiency"
|
|
1294
|
+
}
|
|
1295
|
+
/** An array containing all possible values from the `LanguageFluency` enum. */
|
|
1296
|
+
declare const languageFluenciesOptions: LanguageFluency[];
|
|
1297
|
+
/** Defines levels of skill proficiency. */
|
|
1298
|
+
declare enum SkillLevel {
|
|
1299
|
+
Novice = "Novice",
|
|
1300
|
+
Beginner = "Beginner",
|
|
1301
|
+
Intermediate = "Intermediate",
|
|
1302
|
+
Advanced = "Advanced",
|
|
1303
|
+
Expert = "Expert",
|
|
1304
|
+
Master = "Master"
|
|
1305
|
+
}
|
|
1306
|
+
/** An array containing all possible values from the `SkillLevel` enum. */
|
|
1307
|
+
declare const skillLevelOptions: SkillLevel[];
|
|
1308
|
+
/** Defines identifiers for the available resume templates. */
|
|
1309
|
+
declare enum TemplateOption {
|
|
1310
|
+
ModerncvBanking = "moderncv-banking",
|
|
1311
|
+
ModerncvCasual = "moderncv-casual",
|
|
1312
|
+
ModerncvClassic = "moderncv-classic"
|
|
1313
|
+
}
|
|
1314
|
+
declare function getTemplateOptionDetail(templateOption: TemplateOption): {
|
|
1315
|
+
name: string;
|
|
1316
|
+
description: string;
|
|
1317
|
+
id: TemplateOption;
|
|
1318
|
+
};
|
|
1319
|
+
/** Provides default, empty item structures for each resume section type. */
|
|
1320
|
+
declare const resumeItems: ResumeItem;
|
|
1321
|
+
/** Default content structure for a new resume, containing empty or minimal
|
|
1322
|
+
* sections. */
|
|
1323
|
+
declare const defaultResumeContent: ResumeContent;
|
|
1324
|
+
/**
|
|
1325
|
+
* Resume content structure containing one example item for each section.
|
|
1326
|
+
*
|
|
1327
|
+
* Useful for testing transformations and rendering.
|
|
1328
|
+
*/
|
|
1329
|
+
declare const filledResumeContent: ResumeContent;
|
|
1330
|
+
/** Available font size options for resume layout.
|
|
1331
|
+
*
|
|
1332
|
+
* LaTeX only supports these values.
|
|
1333
|
+
*/
|
|
1334
|
+
declare const fontSizeOptions: string[];
|
|
1335
|
+
/** Available margin size options for resume layout. */
|
|
1336
|
+
declare const marginOptions: string[];
|
|
1337
|
+
/** Defines supported languages for UI display and template translation.
|
|
1338
|
+
*
|
|
1339
|
+
* @see {@link https://en.wikipedia.org/wiki/IETF_language_tag}
|
|
1340
|
+
*/
|
|
1341
|
+
declare enum LocaleLanguageOption {
|
|
1342
|
+
English = "en",
|
|
1343
|
+
SimplifiedChinese = "zh-Hans",
|
|
1344
|
+
TraditionalChineseHK = "zh-Hans-HK",
|
|
1345
|
+
TraditionalChineseTW = "zh-Hans-TW",
|
|
1346
|
+
Spanish = "es"
|
|
1347
|
+
}
|
|
1348
|
+
/**
|
|
1349
|
+
* Get the language code and name of the given locale language.
|
|
1350
|
+
*
|
|
1351
|
+
* @param localeLanguage The locale language to get the name for.
|
|
1352
|
+
* @returns The language code and name of the given locale language.
|
|
1353
|
+
*/
|
|
1354
|
+
declare function getLocaleLanguageOptionDetail(localeLanguage: LocaleLanguageOption): {
|
|
1355
|
+
localeLanguage: LocaleLanguageOption;
|
|
1356
|
+
name: string;
|
|
1357
|
+
};
|
|
1358
|
+
/** Default layout configuration for a new resume. */
|
|
1359
|
+
declare const defaultResumeLayout: ResumeLayout;
|
|
1360
|
+
/** Default value when user creates a new `Resume` object. */
|
|
1361
|
+
declare const defaultResume: Resume;
|
|
1362
|
+
/**
|
|
1363
|
+
* Default value when user wants to use a filled resume.
|
|
1364
|
+
*
|
|
1365
|
+
* This is useful for testing transformations and rendering.
|
|
1366
|
+
*/
|
|
1367
|
+
declare const filledResume: Resume;
|
|
1368
|
+
|
|
1369
|
+
/**
|
|
1370
|
+
* MIT License
|
|
1371
|
+
*
|
|
1372
|
+
* Copyright (c) 2023–Present PPResume (https://ppresume.com)
|
|
1373
|
+
*
|
|
1374
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1375
|
+
* of this software and associated documentation files (the "Software"), to
|
|
1376
|
+
* deal in the Software without restriction, including without limitation the
|
|
1377
|
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
1378
|
+
* sell copies of the Software, and to permit persons to whom the Software is
|
|
1379
|
+
* furnished to do so, subject to the following conditions:
|
|
1380
|
+
*
|
|
1381
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1382
|
+
* all copies or substantial portions of the Software.
|
|
1383
|
+
*
|
|
1384
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1385
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1386
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1387
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1388
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
1389
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
1390
|
+
* IN THE SOFTWARE.
|
|
1391
|
+
*/
|
|
1392
|
+
|
|
1393
|
+
/**
|
|
1394
|
+
* Applies all necessary transformations to a resume object in preparation for
|
|
1395
|
+
* rendering.
|
|
1396
|
+
*
|
|
1397
|
+
* This includes content processing, layout merging/adjustments, and environment
|
|
1398
|
+
* setup.
|
|
1399
|
+
*
|
|
1400
|
+
* The order of transformations is: content, layout, environment.
|
|
1401
|
+
*
|
|
1402
|
+
* @param resume - The original resume object.
|
|
1403
|
+
* @param summaryParser - The parser instance for handling summary fields.
|
|
1404
|
+
* @returns A new, transformed resume object ready for rendering.
|
|
1405
|
+
* @remarks This function operates on and returns a deep clone of the original
|
|
1406
|
+
* resume.
|
|
1407
|
+
*/
|
|
1408
|
+
declare function transformResume(resume: Resume, summaryParser: Parser): Resume;
|
|
1409
|
+
|
|
1410
|
+
/**
|
|
1411
|
+
* MIT License
|
|
1412
|
+
*
|
|
1413
|
+
* Copyright (c) 2023–Present PPResume (https://ppresume.com)
|
|
1414
|
+
*
|
|
1415
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1416
|
+
* of this software and associated documentation files (the "Software"), to
|
|
1417
|
+
* deal in the Software without restriction, including without limitation the
|
|
1418
|
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
1419
|
+
* sell copies of the Software, and to permit persons to whom the Software is
|
|
1420
|
+
* furnished to do so, subject to the following conditions:
|
|
1421
|
+
*
|
|
1422
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1423
|
+
* all copies or substantial portions of the Software.
|
|
1424
|
+
*
|
|
1425
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1426
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1427
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1428
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1429
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
1430
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
1431
|
+
* IN THE SOFTWARE.
|
|
1432
|
+
*/
|
|
1433
|
+
|
|
1434
|
+
/**
|
|
1435
|
+
* Abstract class for rendering resumes in TeX format.
|
|
1436
|
+
*
|
|
1437
|
+
* TeXRenderer provides the base functionality for converting Resume objects
|
|
1438
|
+
* into TeX documents. It follows a specific rendering order for resume
|
|
1439
|
+
* sections:
|
|
1440
|
+
*
|
|
1441
|
+
* 1. Core information (basics, location, profiles)
|
|
1442
|
+
* 2. Education and career (education, work)
|
|
1443
|
+
* 3. Languages and skills
|
|
1444
|
+
* 4. Paper works (awards, certificates, publications)
|
|
1445
|
+
* 5. Persons and projects (references, projects)
|
|
1446
|
+
* 6. Non-essential information (interests, volunteer)
|
|
1447
|
+
*/
|
|
1448
|
+
declare abstract class Renderer {
|
|
1449
|
+
resume: Resume;
|
|
1450
|
+
/**
|
|
1451
|
+
* Constructor for the Renderer class.
|
|
1452
|
+
*
|
|
1453
|
+
* @param resume - The resume to render.
|
|
1454
|
+
*/
|
|
1455
|
+
constructor(resume: Resume);
|
|
1456
|
+
/**
|
|
1457
|
+
* Render the preamble of the TeX document.
|
|
1458
|
+
*
|
|
1459
|
+
* @returns {string} The preamble of the TeX document.
|
|
1460
|
+
*/
|
|
1461
|
+
abstract renderPreamble(): string;
|
|
1462
|
+
/**
|
|
1463
|
+
* Render the basics section of the resume.
|
|
1464
|
+
*
|
|
1465
|
+
* @returns {string} The rendered basics section
|
|
1466
|
+
*/
|
|
1467
|
+
abstract renderBasics(): string;
|
|
1468
|
+
/**
|
|
1469
|
+
* Render the summary section of the resume.
|
|
1470
|
+
*
|
|
1471
|
+
* This method handles rendering the summary text stored in
|
|
1472
|
+
* resume.content.basics.summary. The summary is rendered separately from
|
|
1473
|
+
* other basic information since it may need to appear in a different location
|
|
1474
|
+
* in the output document depending on the template.
|
|
1475
|
+
*
|
|
1476
|
+
* @returns {string} The rendered summary section
|
|
1477
|
+
*/
|
|
1478
|
+
abstract renderSummary(): string;
|
|
1479
|
+
/**
|
|
1480
|
+
* Render the location section of the resume.
|
|
1481
|
+
*
|
|
1482
|
+
* @returns {string} The rendered location section
|
|
1483
|
+
*/
|
|
1484
|
+
abstract renderLocation(): string;
|
|
1485
|
+
/**
|
|
1486
|
+
* Render the profiles section of the resume.
|
|
1487
|
+
*
|
|
1488
|
+
* @returns {string} The rendered profiles section
|
|
1489
|
+
*/
|
|
1490
|
+
abstract renderProfiles(): string;
|
|
1491
|
+
/**
|
|
1492
|
+
* Render the education section of the resume.
|
|
1493
|
+
*
|
|
1494
|
+
* @returns {string} The rendered education section
|
|
1495
|
+
*/
|
|
1496
|
+
abstract renderEducation(): string;
|
|
1497
|
+
/**
|
|
1498
|
+
* Render the work section of the resume.
|
|
1499
|
+
*
|
|
1500
|
+
* @returns {string} The rendered work section
|
|
1501
|
+
*/
|
|
1502
|
+
abstract renderWork(): string;
|
|
1503
|
+
/**
|
|
1504
|
+
* Render the languages section of the resume.
|
|
1505
|
+
*
|
|
1506
|
+
* @returns {string} The rendered languages section
|
|
1507
|
+
*/
|
|
1508
|
+
abstract renderLanguages(): string;
|
|
1509
|
+
/**
|
|
1510
|
+
* Render the skills section of the resume.
|
|
1511
|
+
*
|
|
1512
|
+
* @returns {string} The rendered skills section
|
|
1513
|
+
*/
|
|
1514
|
+
abstract renderSkills(): string;
|
|
1515
|
+
/**
|
|
1516
|
+
* Render the awards section of the resume.
|
|
1517
|
+
*
|
|
1518
|
+
* @returns {string} The rendered awards section
|
|
1519
|
+
*/
|
|
1520
|
+
abstract renderAwards(): string;
|
|
1521
|
+
/**
|
|
1522
|
+
* Render the certificates section of the resume.
|
|
1523
|
+
*
|
|
1524
|
+
* @returns {string} The rendered certificates section
|
|
1525
|
+
*/
|
|
1526
|
+
abstract renderCertificates(): string;
|
|
1527
|
+
/**
|
|
1528
|
+
* Render the publications section of the resume.
|
|
1529
|
+
*
|
|
1530
|
+
* @returns {string} The rendered publications section
|
|
1531
|
+
*/
|
|
1532
|
+
abstract renderPublications(): string;
|
|
1533
|
+
/**
|
|
1534
|
+
* Render the references section of the resume.
|
|
1535
|
+
*
|
|
1536
|
+
* @returns {string} The rendered references section
|
|
1537
|
+
*/
|
|
1538
|
+
abstract renderReferences(): string;
|
|
1539
|
+
/**
|
|
1540
|
+
* Render the projects section of the resume.
|
|
1541
|
+
*
|
|
1542
|
+
* @returns {string} The rendered projects section
|
|
1543
|
+
*/
|
|
1544
|
+
abstract renderProjects(): string;
|
|
1545
|
+
/**
|
|
1546
|
+
* Render the interests section of the resume.
|
|
1547
|
+
*
|
|
1548
|
+
* @returns {string} The rendered interests section
|
|
1549
|
+
*/
|
|
1550
|
+
abstract renderInterests(): string;
|
|
1551
|
+
/**
|
|
1552
|
+
* Render the volunteer section of the resume.
|
|
1553
|
+
*
|
|
1554
|
+
* @returns {string} The rendered volunteer section
|
|
1555
|
+
*/
|
|
1556
|
+
abstract renderVolunteer(): string;
|
|
1557
|
+
/**
|
|
1558
|
+
* Render the resume.
|
|
1559
|
+
*
|
|
1560
|
+
* @returns {string} The rendered resume
|
|
1561
|
+
*/
|
|
1562
|
+
abstract render(): string;
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
/**
|
|
1566
|
+
* MIT License
|
|
1567
|
+
*
|
|
1568
|
+
* Copyright (c) 2023–Present PPResume (https://ppresume.com)
|
|
1569
|
+
*
|
|
1570
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1571
|
+
* of this software and associated documentation files (the "Software"), to
|
|
1572
|
+
* deal in the Software without restriction, including without limitation the
|
|
1573
|
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
1574
|
+
* sell copies of the Software, and to permit persons to whom the Software is
|
|
1575
|
+
* furnished to do so, subject to the following conditions:
|
|
1576
|
+
*
|
|
1577
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1578
|
+
* all copies or substantial portions of the Software.
|
|
1579
|
+
*
|
|
1580
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1581
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1582
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1583
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1584
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
1585
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
1586
|
+
* IN THE SOFTWARE.
|
|
1587
|
+
*/
|
|
1588
|
+
|
|
1589
|
+
/**
|
|
1590
|
+
* Get the appropriate resume renderer based on the provided resume.
|
|
1591
|
+
*
|
|
1592
|
+
* @param {Resume} resume - The resume object
|
|
1593
|
+
* @returns {Renderer} The renderer instance for the specified template.
|
|
1594
|
+
*/
|
|
1595
|
+
declare function getResumeRenderer(resume: Resume, summaryParser: Parser): Renderer;
|
|
1596
|
+
|
|
1597
|
+
/**
|
|
1598
|
+
* MIT License
|
|
1599
|
+
*
|
|
1600
|
+
* Copyright (c) 2023–Present PPResume (https://ppresume.com)
|
|
1601
|
+
*
|
|
1602
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1603
|
+
* of this software and associated documentation files (the "Software"), to
|
|
1604
|
+
* deal in the Software without restriction, including without limitation the
|
|
1605
|
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
1606
|
+
* sell copies of the Software, and to permit persons to whom the Software is
|
|
1607
|
+
* furnished to do so, subject to the following conditions:
|
|
1608
|
+
*
|
|
1609
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1610
|
+
* all copies or substantial portions of the Software.
|
|
1611
|
+
*
|
|
1612
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1613
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1614
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1615
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1616
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
1617
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
1618
|
+
* IN THE SOFTWARE.
|
|
1619
|
+
*/
|
|
1620
|
+
|
|
1621
|
+
/** Specific terms used within resume sections that require translation. */
|
|
1622
|
+
declare enum ResumeTerms {
|
|
1623
|
+
/** The term for academic score or GPA. */
|
|
1624
|
+
Score = "Score"
|
|
1625
|
+
}
|
|
1626
|
+
/** Defines the structure for translated terms for a single language. */
|
|
1627
|
+
type TermsTranslationValue = {
|
|
1628
|
+
/** Translations for degree types. */
|
|
1629
|
+
education: Record<Degree, string>;
|
|
1630
|
+
/** Translations for language names. */
|
|
1631
|
+
languages: Record<Language, string>;
|
|
1632
|
+
/** Translations for language fluency levels. */
|
|
1633
|
+
languageFluencies: Record<LanguageFluency, string>;
|
|
1634
|
+
/** Translations for country names. */
|
|
1635
|
+
location: Record<Country, string>;
|
|
1636
|
+
/** Translations for resume section titles. */
|
|
1637
|
+
sections: Record<SectionID, string>;
|
|
1638
|
+
/** Translations for skill proficiency levels. */
|
|
1639
|
+
skills: Record<SkillLevel, string>;
|
|
1640
|
+
/** Translations for specific resume terms defined in `ResumeTerms`. */
|
|
1641
|
+
terms: Record<ResumeTerms, string>;
|
|
1642
|
+
};
|
|
1643
|
+
/**
|
|
1644
|
+
* Retrieves the translated terms for a specific locale language.
|
|
1645
|
+
*
|
|
1646
|
+
* Includes translations for degrees, languages, fluencies, countries, section
|
|
1647
|
+
* titles, skill levels, and other specific terms.
|
|
1648
|
+
*
|
|
1649
|
+
* @param language - The desired locale language. If undefined, defaults to
|
|
1650
|
+
* English.
|
|
1651
|
+
* @returns An object containing the translated terms for the specified
|
|
1652
|
+
* language.
|
|
1653
|
+
*/
|
|
1654
|
+
declare function getTermsTranslations(language?: LocaleLanguageOption): TermsTranslationValue;
|
|
1655
|
+
|
|
1656
|
+
/**
|
|
1657
|
+
* MIT License
|
|
1658
|
+
*
|
|
1659
|
+
* Copyright (c) 2023–Present PPResume (https://ppresume.com)
|
|
1660
|
+
*
|
|
1661
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1662
|
+
* of this software and associated documentation files (the "Software"), to
|
|
1663
|
+
* deal in the Software without restriction, including without limitation the
|
|
1664
|
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
1665
|
+
* sell copies of the Software, and to permit persons to whom the Software is
|
|
1666
|
+
* furnished to do so, subject to the following conditions:
|
|
1667
|
+
*
|
|
1668
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1669
|
+
* all copies or substantial portions of the Software.
|
|
1670
|
+
*
|
|
1671
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1672
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1673
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1674
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1675
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
1676
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
1677
|
+
* IN THE SOFTWARE.
|
|
1678
|
+
*/
|
|
1679
|
+
|
|
1680
|
+
/** Specific punctuation types used for formatting within templates. */
|
|
1681
|
+
declare enum Punctuation {
|
|
1682
|
+
/** Standard comma, often used between items in a sentence. */
|
|
1683
|
+
Comma = "Comma",
|
|
1684
|
+
/** Standard colon, often used before lists or details. */
|
|
1685
|
+
Colon = "Colon",
|
|
1686
|
+
/** Separator used specifically for lists of items (e.g., keywords, courses),
|
|
1687
|
+
* which might differ from a standard comma in some languages. */
|
|
1688
|
+
Separator = "Separator"
|
|
1689
|
+
}
|
|
1690
|
+
/** Specific terms used within the template structure that need translation. */
|
|
1691
|
+
declare enum TemplateTerms {
|
|
1692
|
+
/** The heading or label for a list of courses. */
|
|
1693
|
+
Courses = "Courses",
|
|
1694
|
+
/** The heading or label for a list of keywords. */
|
|
1695
|
+
Keywords = "Keywords"
|
|
1696
|
+
}
|
|
1697
|
+
/** The structure for template-specific translations (punctuations and terms) */
|
|
1698
|
+
type TemplateTranslationValue = {
|
|
1699
|
+
/** Translations for punctuation types defined in `Punctuation`. */
|
|
1700
|
+
punctuations: Record<Punctuation, string>;
|
|
1701
|
+
/** Translations for template terms defined in `TemplateTerms`. */
|
|
1702
|
+
terms: Record<TemplateTerms, string>;
|
|
1703
|
+
};
|
|
1704
|
+
/**
|
|
1705
|
+
* Retrieves template-specific translations (punctuations and terms) for a given
|
|
1706
|
+
* locale language.
|
|
1707
|
+
*
|
|
1708
|
+
* @param language - The desired locale language. If undefined, defaults to
|
|
1709
|
+
* English.
|
|
1710
|
+
* @returns An object containing the translated punctuations and terms for the
|
|
1711
|
+
* specified language.
|
|
1712
|
+
*/
|
|
1713
|
+
declare function getTemplateTranslations(language?: LocaleLanguageOption): TemplateTranslationValue;
|
|
1714
|
+
|
|
1715
|
+
/**
|
|
1716
|
+
* MIT License
|
|
1717
|
+
*
|
|
1718
|
+
* Copyright (c) 2023–Present PPResume (https://ppresume.com)
|
|
1719
|
+
*
|
|
1720
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1721
|
+
* of this software and associated documentation files (the "Software"), to
|
|
1722
|
+
* deal in the Software without restriction, including without limitation the
|
|
1723
|
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
1724
|
+
* sell copies of the Software, and to permit persons to whom the Software is
|
|
1725
|
+
* furnished to do so, subject to the following conditions:
|
|
1726
|
+
*
|
|
1727
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1728
|
+
* all copies or substantial portions of the Software.
|
|
1729
|
+
*
|
|
1730
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1731
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1732
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1733
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1734
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
1735
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
1736
|
+
* IN THE SOFTWARE.
|
|
1737
|
+
*/
|
|
1738
|
+
|
|
1739
|
+
/**
|
|
1740
|
+
* Parse date from a string
|
|
1741
|
+
*
|
|
1742
|
+
* @param dateStr - date string, `null` or `undefined`
|
|
1743
|
+
* @returns Date object if parse success, otherwise `null`
|
|
1744
|
+
*/
|
|
1745
|
+
declare function parseDate(dateStr: string | undefined | null): Date | null;
|
|
1746
|
+
/**
|
|
1747
|
+
* Localize a date string to a specific language.
|
|
1748
|
+
*
|
|
1749
|
+
* @param date - The date string to localize.
|
|
1750
|
+
* @param language - The language to localize the date string to.
|
|
1751
|
+
* @returns The localized date string.
|
|
1752
|
+
*/
|
|
1753
|
+
declare function localizeDate(date: string, language: LocaleLanguageOption | string): string;
|
|
1754
|
+
/**
|
|
1755
|
+
* Get the date range for a given start and end date.
|
|
1756
|
+
*
|
|
1757
|
+
* @param startDate - The start date.
|
|
1758
|
+
* @param endDate - The end date.
|
|
1759
|
+
* @param language - The language to localize the date string to.
|
|
1760
|
+
* @returns The date range.
|
|
1761
|
+
*/
|
|
1762
|
+
declare function getDateRange(startDate: string, endDate: string, language: LocaleLanguageOption | string): string;
|
|
1763
|
+
/**
|
|
1764
|
+
* The number of seconds in one day
|
|
1765
|
+
*/
|
|
1766
|
+
declare const oneDay: number;
|
|
1767
|
+
/**
|
|
1768
|
+
* Get the current time in UTC seconds
|
|
1769
|
+
*
|
|
1770
|
+
* @returns The current time in UTC seconds
|
|
1771
|
+
*/
|
|
1772
|
+
declare function nowInUTCSeconds(): number;
|
|
1773
|
+
/**
|
|
1774
|
+
* Generate a local date string without timestamp for a epoch time in seconds
|
|
1775
|
+
*
|
|
1776
|
+
* @param epochTime - epoch time in seconds
|
|
1777
|
+
* @param locale - locale for the date string
|
|
1778
|
+
* @returns - a human readable date string
|
|
1779
|
+
*/
|
|
1780
|
+
declare function epochSecondsToLocaleDateString(epochTime: number, locale?: string): string;
|
|
1781
|
+
/**
|
|
1782
|
+
* Convert milliseconds to seconds
|
|
1783
|
+
*/
|
|
1784
|
+
declare function milliSecondsToSeconds(ms: number): number;
|
|
1785
|
+
|
|
1786
|
+
/**
|
|
1787
|
+
* MIT License
|
|
1788
|
+
*
|
|
1789
|
+
* Copyright (c) 2023–Present PPResume (https://ppresume.com)
|
|
1790
|
+
*
|
|
1791
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1792
|
+
* of this software and associated documentation files (the "Software"), to
|
|
1793
|
+
* deal in the Software without restriction, including without limitation the
|
|
1794
|
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
1795
|
+
* sell copies of the Software, and to permit persons to whom the Software is
|
|
1796
|
+
* furnished to do so, subject to the following conditions:
|
|
1797
|
+
*
|
|
1798
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1799
|
+
* all copies or substantial portions of the Software.
|
|
1800
|
+
*
|
|
1801
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1802
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1803
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1804
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1805
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
1806
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
1807
|
+
* IN THE SOFTWARE.
|
|
1808
|
+
*/
|
|
1809
|
+
/**
|
|
1810
|
+
* A wrapper around the escape-latex that handles null and undefined values.
|
|
1811
|
+
*
|
|
1812
|
+
* @param value - value to be escaped
|
|
1813
|
+
* @returns escaped value
|
|
1814
|
+
*/
|
|
1815
|
+
declare function escapeLatex(value: string | null | undefined): any;
|
|
1816
|
+
|
|
1817
|
+
/**
|
|
1818
|
+
* MIT License
|
|
1819
|
+
*
|
|
1820
|
+
* Copyright (c) 2023–Present PPResume (https://ppresume.com)
|
|
1821
|
+
*
|
|
1822
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1823
|
+
* of this software and associated documentation files (the "Software"), to
|
|
1824
|
+
* deal in the Software without restriction, including without limitation the
|
|
1825
|
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
1826
|
+
* sell copies of the Software, and to permit persons to whom the Software is
|
|
1827
|
+
* furnished to do so, subject to the following conditions:
|
|
1828
|
+
*
|
|
1829
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1830
|
+
* all copies or substantial portions of the Software.
|
|
1831
|
+
*
|
|
1832
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1833
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1834
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1835
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1836
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
1837
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
1838
|
+
* IN THE SOFTWARE.
|
|
1839
|
+
*/
|
|
1840
|
+
/**
|
|
1841
|
+
* Check if a value is empty
|
|
1842
|
+
*
|
|
1843
|
+
* Empty values include `undefined`, `null`, empty object and empty string
|
|
1844
|
+
*
|
|
1845
|
+
* @param value - value to check
|
|
1846
|
+
* @returns True if value is empty, false otherwise
|
|
1847
|
+
*
|
|
1848
|
+
* @see {@link https://stackoverflow.com/a/43233163}
|
|
1849
|
+
*/
|
|
1850
|
+
declare function isEmptyValue(value: undefined | null | object | string): boolean;
|
|
1851
|
+
|
|
1852
|
+
/**
|
|
1853
|
+
* MIT License
|
|
1854
|
+
*
|
|
1855
|
+
* Copyright (c) 2023–Present PPResume (https://ppresume.com)
|
|
1856
|
+
*
|
|
1857
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1858
|
+
* of this software and associated documentation files (the "Software"), to
|
|
1859
|
+
* deal in the Software without restriction, including without limitation the
|
|
1860
|
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
1861
|
+
* sell copies of the Software, and to permit persons to whom the Software is
|
|
1862
|
+
* furnished to do so, subject to the following conditions:
|
|
1863
|
+
*
|
|
1864
|
+
* The above copyright notice and this permission notice shall be included in
|
|
1865
|
+
* all copies or substantial portions of the Software.
|
|
1866
|
+
*
|
|
1867
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1868
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1869
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1870
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1871
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
1872
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
1873
|
+
* IN THE SOFTWARE.
|
|
1874
|
+
*/
|
|
1875
|
+
/**
|
|
1876
|
+
* Check if a string is empty or only contains whitespace
|
|
1877
|
+
*
|
|
1878
|
+
* @param value - string to check
|
|
1879
|
+
* @returns True if string is empty or only contains whitespace, false otherwise
|
|
1880
|
+
*/
|
|
1881
|
+
declare function isEmptyString(value: string): boolean;
|
|
1882
|
+
/**
|
|
1883
|
+
* Show content if predicate is true
|
|
1884
|
+
*
|
|
1885
|
+
* @param predicate - The predicate to check
|
|
1886
|
+
* @param content - The content to show
|
|
1887
|
+
* @returns The content if predicate is true, empty string otherwise
|
|
1888
|
+
*/
|
|
1889
|
+
declare function showIf(predicate: boolean, content: string): string;
|
|
1890
|
+
/**
|
|
1891
|
+
* Join an array of strings , but only if the string is not empty
|
|
1892
|
+
*
|
|
1893
|
+
* @param codes - The array of strings to join
|
|
1894
|
+
* @param separator - The separator to join the strings with
|
|
1895
|
+
* @returns The joined string
|
|
1896
|
+
*/
|
|
1897
|
+
declare function joinNonEmptyString(codes: string[], separator?: string): string;
|
|
1898
|
+
|
|
1899
|
+
export { type Awards, type Basics, type BulletListNode, type Certificates, Country, Degree, type DocNode, type Education, FontSpecNumbersStyle, type Interests, Language, LanguageFluency, type LanguageItem, type Languages, LatexCodeGenerator, LocaleLanguageOption, type Location, MarkdownParser, type Node, type OrderedListNode, type ParagraphNode, type Parser, type ProfileItem, type Profiles, type Projects, type Publications, Punctuation, type References, type Resume, type ResumeContent, type ResumeItem, type ResumeLayout, ResumeTerms, type SectionDefaultValues, type SectionID, SkillLevel, type Skills, type SocialNetwork, type SocialNetworkGroup, TemplateOption, TemplateTerms, type TextNode, TiptapParser, type Volunteer, type Work, defaultResume, defaultResumeContent, defaultResumeLayout, degreeOptions, emptyParagraph, englishCountryNames, epochSecondsToLocaleDateString, escapeLatex, filledResume, filledResumeContent, fontSizeOptions, getDateRange, getLocaleLanguageOptionDetail, getResumeRenderer, getTemplateOptionDetail, getTemplateTranslations, getTermsTranslations, isEmptyString, isEmptyValue, joinNonEmptyString, languageFluenciesOptions, languagesOptions, localizeDate, marginOptions, milliSecondsToSeconds, nowInUTCSeconds, oneDay, parseDate, resumeItems, showIf, simplifiedChineseCountryNames, skillLevelOptions, spanishCountryNames, traditionalChineseCountryHKNames, traditionalChineseCountryTWNames, transformResume };
|