@yamlresume/core 0.9.1 → 0.10.1
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 +64 -9
- package/dist/index.js +452 -117
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -166,6 +166,10 @@ declare const SpanishCountryNames: Record<Country, string>;
|
|
|
166
166
|
*/
|
|
167
167
|
declare const FrenchCountryNames: Record<Country, string>;
|
|
168
168
|
declare const NorwegianCountryNames: Record<Country, string>;
|
|
169
|
+
/**
|
|
170
|
+
* Represents all possible countries & regions with their corresponding Dutch names.
|
|
171
|
+
*/
|
|
172
|
+
declare const DutchCountryNames: Record<Country, string>;
|
|
169
173
|
|
|
170
174
|
/**
|
|
171
175
|
* MIT License
|
|
@@ -202,10 +206,12 @@ declare const DEGREE_OPTIONS: readonly ["Middle School", "High School", "Diploma
|
|
|
202
206
|
declare const FLUENCY_OPTIONS: readonly ["Elementary Proficiency", "Limited Working Proficiency", "Minimum Professional Proficiency", "Full Professional Proficiency", "Native or Bilingual Proficiency"];
|
|
203
207
|
/** The options for the latex layout font size. */
|
|
204
208
|
declare const LATEX_FONT_SIZE_OPTIONS: readonly ["10pt", "11pt", "12pt"];
|
|
209
|
+
/** The options for the paper size. */
|
|
210
|
+
declare const LATEX_PAPER_SIZE_OPTIONS: readonly ["a4", "letter"];
|
|
205
211
|
/** The options for the HTML layout font size. */
|
|
206
212
|
declare const HTML_FONT_SIZE_OPTIONS: readonly ["14px", "15px", "16px", "17px", "18px", "19px", "20px"];
|
|
207
213
|
/** Defines identifiers for the available HTML layout templates. */
|
|
208
|
-
declare const HTML_TEMPLATE_OPTIONS: readonly ["calm"];
|
|
214
|
+
declare const HTML_TEMPLATE_OPTIONS: readonly ["calm", "vscode"];
|
|
209
215
|
/** The options for the latex layout fontspec numbers style. */
|
|
210
216
|
declare const LATEX_FONTSPEC_NUMBERS_OPTIONS: readonly ["Lining", "OldStyle", "Auto"];
|
|
211
217
|
/** Defines identifiers for the available latex layout templates. */
|
|
@@ -229,7 +235,7 @@ declare const LEVEL_OPTIONS: readonly ["Novice", "Beginner", "Intermediate", "Ad
|
|
|
229
235
|
*
|
|
230
236
|
* @see {@link https://en.wikipedia.org/wiki/IETF_language_tag}
|
|
231
237
|
*/
|
|
232
|
-
declare const LOCALE_LANGUAGE_OPTIONS: readonly ["en", "zh-hans", "zh-hant-hk", "zh-hant-tw", "es", "fr", "no"];
|
|
238
|
+
declare const LOCALE_LANGUAGE_OPTIONS: readonly ["en", "zh-hans", "zh-hant-hk", "zh-hant-tw", "es", "fr", "no", "nl"];
|
|
233
239
|
/**
|
|
234
240
|
* Defines network options.
|
|
235
241
|
*/
|
|
@@ -319,6 +325,10 @@ type LatexTemplate = (typeof LATEX_TEMPLATE_OPTIONS)[number];
|
|
|
319
325
|
* A union type for all possible skill proficiency levels.
|
|
320
326
|
*/
|
|
321
327
|
type Level = (typeof LEVEL_OPTIONS)[number];
|
|
328
|
+
/**
|
|
329
|
+
* A union type for all possible latex paper size options.
|
|
330
|
+
*/
|
|
331
|
+
type LatexPaperSize = (typeof LATEX_PAPER_SIZE_OPTIONS)[number];
|
|
322
332
|
/**
|
|
323
333
|
* A union type for all possible locale languages.
|
|
324
334
|
*
|
|
@@ -905,8 +915,6 @@ type Content = {
|
|
|
905
915
|
volunteer?: string;
|
|
906
916
|
work?: string;
|
|
907
917
|
};
|
|
908
|
-
/** Combined and formatted string of URLs from basics and profiles. */
|
|
909
|
-
urls?: string;
|
|
910
918
|
};
|
|
911
919
|
};
|
|
912
920
|
|
|
@@ -1072,6 +1080,21 @@ type HtmlTypography = {
|
|
|
1072
1080
|
/** Base font size for the document (e.g., "small", "medium", "large"). */
|
|
1073
1081
|
fontSize?: HtmlFontSize;
|
|
1074
1082
|
};
|
|
1083
|
+
/**
|
|
1084
|
+
* Defines advanced HTML configuration options.
|
|
1085
|
+
*/
|
|
1086
|
+
type HtmlAdvanced = {
|
|
1087
|
+
/** Whether to show icons for links and profiles. */
|
|
1088
|
+
showIcons?: boolean;
|
|
1089
|
+
/** Custom title for the HTML document. */
|
|
1090
|
+
title?: string;
|
|
1091
|
+
/** Custom footer for the HTML document. */
|
|
1092
|
+
footer?: string;
|
|
1093
|
+
/** Meta description for the HTML document. */
|
|
1094
|
+
description?: string;
|
|
1095
|
+
/** Meta keywords for the HTML document. */
|
|
1096
|
+
keywords?: string;
|
|
1097
|
+
};
|
|
1075
1098
|
/**
|
|
1076
1099
|
* HTML layout configuration.
|
|
1077
1100
|
*
|
|
@@ -1086,6 +1109,8 @@ type HtmlLayout = {
|
|
|
1086
1109
|
typography?: HtmlTypography;
|
|
1087
1110
|
/** Defines section customization settings. */
|
|
1088
1111
|
sections?: Sections;
|
|
1112
|
+
/** Defines advanced configuration options. */
|
|
1113
|
+
advanced?: HtmlAdvanced;
|
|
1089
1114
|
};
|
|
1090
1115
|
|
|
1091
1116
|
/**
|
|
@@ -1137,6 +1162,8 @@ type LatexAdvanced = {
|
|
|
1137
1162
|
/** Style for rendering numbers (Lining or OldStyle). */
|
|
1138
1163
|
numbers?: LatexFontspecNumbers;
|
|
1139
1164
|
};
|
|
1165
|
+
/** Whether to show icons for links and profiles. */
|
|
1166
|
+
showIcons?: boolean;
|
|
1140
1167
|
};
|
|
1141
1168
|
/**
|
|
1142
1169
|
* Defines latex page-level settings for document presentation.
|
|
@@ -1146,6 +1173,7 @@ type LatexPage = {
|
|
|
1146
1173
|
showPageNumbers?: boolean;
|
|
1147
1174
|
/** Defines page margin settings for document layout. */
|
|
1148
1175
|
margins?: Margins;
|
|
1176
|
+
paperSize?: LatexPaperSize;
|
|
1149
1177
|
};
|
|
1150
1178
|
/**
|
|
1151
1179
|
* LaTeX layout configuration.
|
|
@@ -1292,7 +1320,7 @@ declare function getHtmlTemplateDetail(template: HtmlTemplate): {
|
|
|
1292
1320
|
engine: LayoutEngine;
|
|
1293
1321
|
name: string;
|
|
1294
1322
|
description: string;
|
|
1295
|
-
id: "calm";
|
|
1323
|
+
id: "calm" | "vscode";
|
|
1296
1324
|
};
|
|
1297
1325
|
/** Provides default, empty item structures for each resume section type. */
|
|
1298
1326
|
declare const RESUME_SECTION_ITEMS: ResumeItem;
|
|
@@ -1316,7 +1344,7 @@ declare const MARGIN_OPTIONS: string[];
|
|
|
1316
1344
|
* @returns The language code and name of the given locale language.
|
|
1317
1345
|
*/
|
|
1318
1346
|
declare function getLocaleLanguageDetail(localeLanguage: LocaleLanguage): {
|
|
1319
|
-
localeLanguage: "en" | "zh-hans" | "zh-hant-hk" | "zh-hant-tw" | "es" | "fr" | "no";
|
|
1347
|
+
localeLanguage: "en" | "zh-hans" | "zh-hant-hk" | "zh-hant-tw" | "es" | "fr" | "no" | "nl";
|
|
1320
1348
|
name: string;
|
|
1321
1349
|
};
|
|
1322
1350
|
/** Default HTML layout configuration. */
|
|
@@ -1895,6 +1923,10 @@ declare class HtmlRenderer extends Renderer {
|
|
|
1895
1923
|
* various sections.
|
|
1896
1924
|
*/
|
|
1897
1925
|
constructor(resume: Resume, layoutIndex: number, summaryParser?: Parser);
|
|
1926
|
+
/**
|
|
1927
|
+
* Get whether to show icons.
|
|
1928
|
+
*/
|
|
1929
|
+
private get showIcons();
|
|
1898
1930
|
/**
|
|
1899
1931
|
* Get the CSS styles for the HTML document.
|
|
1900
1932
|
*
|
|
@@ -2001,6 +2033,12 @@ declare class HtmlRenderer extends Renderer {
|
|
|
2001
2033
|
* @returns {string} The rendered volunteer section
|
|
2002
2034
|
*/
|
|
2003
2035
|
renderVolunteer(): string;
|
|
2036
|
+
/**
|
|
2037
|
+
* Render the footer section of the resume.
|
|
2038
|
+
*
|
|
2039
|
+
* @returns {string} The rendered footer section
|
|
2040
|
+
*/
|
|
2041
|
+
renderFooter(): string;
|
|
2004
2042
|
/**
|
|
2005
2043
|
* Render the complete HTML resume.
|
|
2006
2044
|
*
|
|
@@ -2065,6 +2103,10 @@ declare class ModerncvBase extends Renderer {
|
|
|
2065
2103
|
* various sections.
|
|
2066
2104
|
*/
|
|
2067
2105
|
constructor(resume: Resume, style: ModerncvStyle, layoutIndex: number, summaryParser: Parser);
|
|
2106
|
+
/**
|
|
2107
|
+
* Whether to show icons in the rendered LaTeX.
|
|
2108
|
+
*/
|
|
2109
|
+
private get showIcons();
|
|
2068
2110
|
/**
|
|
2069
2111
|
* Check if the resume is a CJK resume.
|
|
2070
2112
|
*/
|
|
@@ -2115,6 +2157,10 @@ declare class ModerncvBase extends Renderer {
|
|
|
2115
2157
|
* @returns The LaTeX code for the location section
|
|
2116
2158
|
*/
|
|
2117
2159
|
renderLocation(): string;
|
|
2160
|
+
/**
|
|
2161
|
+
* Get FontAwesome icon for a network.
|
|
2162
|
+
*/
|
|
2163
|
+
private getFaIcon;
|
|
2118
2164
|
/**
|
|
2119
2165
|
* Render the profiles section of the resume.
|
|
2120
2166
|
*
|
|
@@ -2482,10 +2528,17 @@ declare const ResumeSchema: z.ZodObject<{
|
|
|
2482
2528
|
projects: z.ZodOptional<z.ZodNullable<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>>;
|
|
2483
2529
|
}, z.core.$strip>>>;
|
|
2484
2530
|
}, z.core.$strip>>>;
|
|
2531
|
+
advanced: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
2532
|
+
showIcons: z.ZodDefault<z.ZodBoolean>;
|
|
2533
|
+
title: z.ZodOptional<z.ZodString>;
|
|
2534
|
+
footer: z.ZodDefault<z.ZodString>;
|
|
2535
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2536
|
+
keywords: z.ZodOptional<z.ZodString>;
|
|
2537
|
+
}, z.core.$strip>>>;
|
|
2485
2538
|
typography: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
2486
2539
|
fontSize: z.ZodOptional<z.ZodNullable<z.ZodType<"14px" | "15px" | "16px" | "17px" | "18px" | "19px" | "20px", unknown, z.core.$ZodTypeInternals<"14px" | "15px" | "16px" | "17px" | "18px" | "19px" | "20px", unknown>>>>;
|
|
2487
2540
|
}, z.core.$strip>>>;
|
|
2488
|
-
template: z.ZodOptional<z.ZodNullable<z.ZodType<"calm", unknown, z.core.$ZodTypeInternals<"calm", unknown>>>>;
|
|
2541
|
+
template: z.ZodOptional<z.ZodNullable<z.ZodType<"calm" | "vscode", unknown, z.core.$ZodTypeInternals<"calm" | "vscode", unknown>>>>;
|
|
2489
2542
|
engine: z.ZodLiteral<"html">;
|
|
2490
2543
|
}, z.core.$strip>, z.ZodObject<{
|
|
2491
2544
|
sections: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -2522,6 +2575,7 @@ declare const ResumeSchema: z.ZodObject<{
|
|
|
2522
2575
|
fontspec: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
2523
2576
|
numbers: z.ZodOptional<z.ZodNullable<z.ZodType<"Lining" | "OldStyle" | "Auto", unknown, z.core.$ZodTypeInternals<"Lining" | "OldStyle" | "Auto", unknown>>>>;
|
|
2524
2577
|
}, z.core.$strip>>>;
|
|
2578
|
+
showIcons: z.ZodDefault<z.ZodBoolean>;
|
|
2525
2579
|
}, z.core.$strip>>>;
|
|
2526
2580
|
typography: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
2527
2581
|
links: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -2538,6 +2592,7 @@ declare const ResumeSchema: z.ZodObject<{
|
|
|
2538
2592
|
right: z.ZodOptional<z.ZodNullable<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>>;
|
|
2539
2593
|
}, z.core.$strip>>>;
|
|
2540
2594
|
showPageNumbers: z.ZodOptional<z.ZodNullable<z.ZodType<boolean, unknown, z.core.$ZodTypeInternals<boolean, unknown>>>>;
|
|
2595
|
+
paperSize: z.ZodOptional<z.ZodNullable<z.ZodType<"a4" | "letter", unknown, z.core.$ZodTypeInternals<"a4" | "letter", unknown>>>>;
|
|
2541
2596
|
}, z.core.$strip>>>;
|
|
2542
2597
|
engine: z.ZodLiteral<"latex">;
|
|
2543
2598
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -2574,7 +2629,7 @@ declare const ResumeSchema: z.ZodObject<{
|
|
|
2574
2629
|
engine: z.ZodLiteral<"markdown">;
|
|
2575
2630
|
}, z.core.$strip>], "engine">>>>;
|
|
2576
2631
|
locale: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
2577
|
-
language: z.ZodOptional<z.ZodNullable<z.ZodType<"en" | "zh-hans" | "zh-hant-hk" | "zh-hant-tw" | "es" | "fr" | "no", unknown, z.core.$ZodTypeInternals<"en" | "zh-hans" | "zh-hant-hk" | "zh-hant-tw" | "es" | "fr" | "no", unknown>>>>;
|
|
2632
|
+
language: z.ZodOptional<z.ZodNullable<z.ZodType<"en" | "zh-hans" | "zh-hant-hk" | "zh-hant-tw" | "es" | "fr" | "no" | "nl", unknown, z.core.$ZodTypeInternals<"en" | "zh-hans" | "zh-hant-hk" | "zh-hant-tw" | "es" | "fr" | "no" | "nl", unknown>>>>;
|
|
2578
2633
|
}, z.core.$strip>>>;
|
|
2579
2634
|
content: z.ZodObject<{
|
|
2580
2635
|
work: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
@@ -3157,4 +3212,4 @@ declare function joinNonEmptyString(codes: string[], separator?: string): string
|
|
|
3157
3212
|
*/
|
|
3158
3213
|
declare function toCodeBlock(code?: string, lang?: string): string;
|
|
3159
3214
|
|
|
3160
|
-
export { type Awards, type Basics, type BulletListNode, COUNTRY_OPTIONS, type Certificates, type Content, type Country, DEFAULT_HTML_LAYOUT, DEFAULT_LATEX_LAYOUT, DEFAULT_MARKDOWN_LAYOUT, DEFAULT_RESUME, DEFAULT_RESUME_CONTENT, DEFAULT_RESUME_LAYOUTS, DEFAULT_RESUME_LOCALE, DEFAULT_SECTIONS_ORDER, DEGREE_OPTIONS, type Degree, type DocNode, type Education, EnglishCountryNames, ErrorType, FILLED_RESUME, FILLED_RESUME_CONTENT, FLUENCY_OPTIONS, type Fluency, FrenchCountryNames, HTML_FONT_SIZE_OPTIONS, HTML_TEMPLATE_OPTIONS, HtmlCodeGenerator, type HtmlFontSize, type HtmlLayout, HtmlRenderer, type HtmlTemplate, type Interests, type Keywords, LANGUAGE_OPTIONS, LATEX_FONTSPEC_NUMBERS_OPTIONS, LATEX_FONT_SIZE_OPTIONS, LATEX_TEMPLATE_OPTIONS, LEVEL_OPTIONS, LOCALE_LANGUAGE_OPTIONS, type Language, type Languages, LatexCodeGenerator, type LatexFontSize, type LatexFontspecNumbers, type LatexLayout, type LatexTemplate, type LayoutEngine, type Layouts, type Level, type Locale, type LocaleLanguage, type Location, MARGIN_OPTIONS, type MarkdownLayout, MarkdownParser, MarkdownRenderer, ModerncvBankingRenderer, ModerncvCasualRenderer, ModerncvClassicRenderer, NETWORK_OPTIONS, type Network, type Node, NorwegianCountryNames, ONE_DAY, ORDERABLE_SECTION_IDS, type OrderableSectionID, type OrderedListNode, PUNCTUATIONS, type ParagraphNode, type Parser, type Profiles, type Projects, type Publications, type Punctuation, RESUME_SECTION_ITEMS, type References, type Resume, type ResumeItem, ResumeSchema, SECTION_IDS, type SectionID, SimplifiedChineseCountryNames, type Skills, SpanishCountryNames, TERMS, type Term, type TextNode, TraditionalChineseCountryHKNames, TraditionalChineseCountryTWNames, type Volunteer, type Work, YAMLResumeError, collectAllKeys, epochSecondsToLocaleDateString, escapeHtml, escapeLatex, getDateRange, getHtmlTemplateDetail, getLatexTemplateDetail, getLocaleLanguageDetail, getOptionTranslation, getResumeRenderer, getTemplateTranslations, isEmptyString, isEmptyValue, joinNonEmptyString, localizeDate, mergeArrayWithOrder, milliSecondsToSeconds, nowInUTCSeconds, parseDate, removeKeysFromObject, showIf, showIfNotEmpty, toCodeBlock, transformResume };
|
|
3215
|
+
export { type Awards, type Basics, type BulletListNode, COUNTRY_OPTIONS, type Certificates, type Content, type Country, DEFAULT_HTML_LAYOUT, DEFAULT_LATEX_LAYOUT, DEFAULT_MARKDOWN_LAYOUT, DEFAULT_RESUME, DEFAULT_RESUME_CONTENT, DEFAULT_RESUME_LAYOUTS, DEFAULT_RESUME_LOCALE, DEFAULT_SECTIONS_ORDER, DEGREE_OPTIONS, type Degree, type DocNode, DutchCountryNames, type Education, EnglishCountryNames, ErrorType, FILLED_RESUME, FILLED_RESUME_CONTENT, FLUENCY_OPTIONS, type Fluency, FrenchCountryNames, HTML_FONT_SIZE_OPTIONS, HTML_TEMPLATE_OPTIONS, HtmlCodeGenerator, type HtmlFontSize, type HtmlLayout, HtmlRenderer, type HtmlTemplate, type Interests, type Keywords, LANGUAGE_OPTIONS, LATEX_FONTSPEC_NUMBERS_OPTIONS, LATEX_FONT_SIZE_OPTIONS, LATEX_PAPER_SIZE_OPTIONS, LATEX_TEMPLATE_OPTIONS, LEVEL_OPTIONS, LOCALE_LANGUAGE_OPTIONS, type Language, type Languages, LatexCodeGenerator, type LatexFontSize, type LatexFontspecNumbers, type LatexLayout, type LatexPaperSize, type LatexTemplate, type LayoutEngine, type Layouts, type Level, type Locale, type LocaleLanguage, type Location, MARGIN_OPTIONS, type MarkdownLayout, MarkdownParser, MarkdownRenderer, ModerncvBankingRenderer, ModerncvCasualRenderer, ModerncvClassicRenderer, NETWORK_OPTIONS, type Network, type Node, NorwegianCountryNames, ONE_DAY, ORDERABLE_SECTION_IDS, type OrderableSectionID, type OrderedListNode, PUNCTUATIONS, type ParagraphNode, type Parser, type Profiles, type Projects, type Publications, type Punctuation, RESUME_SECTION_ITEMS, type References, type Resume, type ResumeItem, ResumeSchema, SECTION_IDS, type SectionID, SimplifiedChineseCountryNames, type Skills, SpanishCountryNames, TERMS, type Term, type TextNode, TraditionalChineseCountryHKNames, TraditionalChineseCountryTWNames, type Volunteer, type Work, YAMLResumeError, collectAllKeys, epochSecondsToLocaleDateString, escapeHtml, escapeLatex, getDateRange, getHtmlTemplateDetail, getLatexTemplateDetail, getLocaleLanguageDetail, getOptionTranslation, getResumeRenderer, getTemplateTranslations, isEmptyString, isEmptyValue, joinNonEmptyString, localizeDate, mergeArrayWithOrder, milliSecondsToSeconds, nowInUTCSeconds, parseDate, removeKeysFromObject, showIf, showIfNotEmpty, toCodeBlock, transformResume };
|