@yamlresume/core 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.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
- declare const HTML_FONT_SIZE_OPTIONS: readonly ["10px", "11px", "12px", "13px", "14px", "15px", "16px", "17px", "18px", "19px", "20px", "21px", "22px", "23px", "24px"];
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,13 @@ 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
+ };
1075
1090
  /**
1076
1091
  * HTML layout configuration.
1077
1092
  *
@@ -1086,6 +1101,8 @@ type HtmlLayout = {
1086
1101
  typography?: HtmlTypography;
1087
1102
  /** Defines section customization settings. */
1088
1103
  sections?: Sections;
1104
+ /** Defines advanced configuration options. */
1105
+ advanced?: HtmlAdvanced;
1089
1106
  };
1090
1107
 
1091
1108
  /**
@@ -1137,6 +1154,8 @@ type LatexAdvanced = {
1137
1154
  /** Style for rendering numbers (Lining or OldStyle). */
1138
1155
  numbers?: LatexFontspecNumbers;
1139
1156
  };
1157
+ /** Whether to show icons for links and profiles. */
1158
+ showIcons?: boolean;
1140
1159
  };
1141
1160
  /**
1142
1161
  * Defines latex page-level settings for document presentation.
@@ -1146,6 +1165,7 @@ type LatexPage = {
1146
1165
  showPageNumbers?: boolean;
1147
1166
  /** Defines page margin settings for document layout. */
1148
1167
  margins?: Margins;
1168
+ paperSize?: LatexPaperSize;
1149
1169
  };
1150
1170
  /**
1151
1171
  * LaTeX layout configuration.
@@ -1292,7 +1312,7 @@ declare function getHtmlTemplateDetail(template: HtmlTemplate): {
1292
1312
  engine: LayoutEngine;
1293
1313
  name: string;
1294
1314
  description: string;
1295
- id: "calm";
1315
+ id: "calm" | "vscode";
1296
1316
  };
1297
1317
  /** Provides default, empty item structures for each resume section type. */
1298
1318
  declare const RESUME_SECTION_ITEMS: ResumeItem;
@@ -1316,7 +1336,7 @@ declare const MARGIN_OPTIONS: string[];
1316
1336
  * @returns The language code and name of the given locale language.
1317
1337
  */
1318
1338
  declare function getLocaleLanguageDetail(localeLanguage: LocaleLanguage): {
1319
- localeLanguage: "en" | "zh-hans" | "zh-hant-hk" | "zh-hant-tw" | "es" | "fr" | "no";
1339
+ localeLanguage: "en" | "zh-hans" | "zh-hant-hk" | "zh-hant-tw" | "es" | "fr" | "no" | "nl";
1320
1340
  name: string;
1321
1341
  };
1322
1342
  /** Default HTML layout configuration. */
@@ -1895,6 +1915,10 @@ declare class HtmlRenderer extends Renderer {
1895
1915
  * various sections.
1896
1916
  */
1897
1917
  constructor(resume: Resume, layoutIndex: number, summaryParser?: Parser);
1918
+ /**
1919
+ * Get whether to show icons.
1920
+ */
1921
+ private get showIcons();
1898
1922
  /**
1899
1923
  * Get the CSS styles for the HTML document.
1900
1924
  *
@@ -2065,6 +2089,10 @@ declare class ModerncvBase extends Renderer {
2065
2089
  * various sections.
2066
2090
  */
2067
2091
  constructor(resume: Resume, style: ModerncvStyle, layoutIndex: number, summaryParser: Parser);
2092
+ /**
2093
+ * Whether to show icons in the rendered LaTeX.
2094
+ */
2095
+ private get showIcons();
2068
2096
  /**
2069
2097
  * Check if the resume is a CJK resume.
2070
2098
  */
@@ -2115,6 +2143,10 @@ declare class ModerncvBase extends Renderer {
2115
2143
  * @returns The LaTeX code for the location section
2116
2144
  */
2117
2145
  renderLocation(): string;
2146
+ /**
2147
+ * Get FontAwesome icon for a network.
2148
+ */
2149
+ private getFaIcon;
2118
2150
  /**
2119
2151
  * Render the profiles section of the resume.
2120
2152
  *
@@ -2482,10 +2514,13 @@ declare const ResumeSchema: z.ZodObject<{
2482
2514
  projects: z.ZodOptional<z.ZodNullable<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>>;
2483
2515
  }, z.core.$strip>>>;
2484
2516
  }, z.core.$strip>>>;
2517
+ advanced: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2518
+ showIcons: z.ZodDefault<z.ZodBoolean>;
2519
+ }, z.core.$strip>>>;
2485
2520
  typography: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2486
- fontSize: z.ZodOptional<z.ZodNullable<z.ZodType<"10px" | "11px" | "12px" | "13px" | "14px" | "15px" | "16px" | "17px" | "18px" | "19px" | "20px" | "21px" | "22px" | "23px" | "24px", unknown, z.core.$ZodTypeInternals<"10px" | "11px" | "12px" | "13px" | "14px" | "15px" | "16px" | "17px" | "18px" | "19px" | "20px" | "21px" | "22px" | "23px" | "24px", unknown>>>>;
2521
+ 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
2522
  }, z.core.$strip>>>;
2488
- template: z.ZodOptional<z.ZodNullable<z.ZodType<"calm", unknown, z.core.$ZodTypeInternals<"calm", unknown>>>>;
2523
+ template: z.ZodOptional<z.ZodNullable<z.ZodType<"calm" | "vscode", unknown, z.core.$ZodTypeInternals<"calm" | "vscode", unknown>>>>;
2489
2524
  engine: z.ZodLiteral<"html">;
2490
2525
  }, z.core.$strip>, z.ZodObject<{
2491
2526
  sections: z.ZodOptional<z.ZodNullable<z.ZodObject<{
@@ -2522,6 +2557,7 @@ declare const ResumeSchema: z.ZodObject<{
2522
2557
  fontspec: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2523
2558
  numbers: z.ZodOptional<z.ZodNullable<z.ZodType<"Lining" | "OldStyle" | "Auto", unknown, z.core.$ZodTypeInternals<"Lining" | "OldStyle" | "Auto", unknown>>>>;
2524
2559
  }, z.core.$strip>>>;
2560
+ showIcons: z.ZodDefault<z.ZodBoolean>;
2525
2561
  }, z.core.$strip>>>;
2526
2562
  typography: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2527
2563
  links: z.ZodOptional<z.ZodNullable<z.ZodObject<{
@@ -2538,6 +2574,7 @@ declare const ResumeSchema: z.ZodObject<{
2538
2574
  right: z.ZodOptional<z.ZodNullable<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>>;
2539
2575
  }, z.core.$strip>>>;
2540
2576
  showPageNumbers: z.ZodOptional<z.ZodNullable<z.ZodType<boolean, unknown, z.core.$ZodTypeInternals<boolean, unknown>>>>;
2577
+ paperSize: z.ZodOptional<z.ZodNullable<z.ZodType<"a4" | "letter", unknown, z.core.$ZodTypeInternals<"a4" | "letter", unknown>>>>;
2541
2578
  }, z.core.$strip>>>;
2542
2579
  engine: z.ZodLiteral<"latex">;
2543
2580
  }, z.core.$strip>, z.ZodObject<{
@@ -2574,7 +2611,7 @@ declare const ResumeSchema: z.ZodObject<{
2574
2611
  engine: z.ZodLiteral<"markdown">;
2575
2612
  }, z.core.$strip>], "engine">>>>;
2576
2613
  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>>>>;
2614
+ 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
2615
  }, z.core.$strip>>>;
2579
2616
  content: z.ZodObject<{
2580
2617
  work: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
@@ -3157,4 +3194,4 @@ declare function joinNonEmptyString(codes: string[], separator?: string): string
3157
3194
  */
3158
3195
  declare function toCodeBlock(code?: string, lang?: string): string;
3159
3196
 
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 };
3197
+ 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 };