rendercv-ts 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.
Files changed (77) hide show
  1. package/LICENSE +26 -0
  2. package/README.md +112 -0
  3. package/assets/fonts/EB Garamond/EBGaramond-Bold.ttf +0 -0
  4. package/assets/fonts/EB Garamond/EBGaramond-BoldItalic.ttf +0 -0
  5. package/assets/fonts/EB Garamond/EBGaramond-Italic.ttf +0 -0
  6. package/assets/fonts/EB Garamond/EBGaramond-Regular.ttf +0 -0
  7. package/assets/fonts/Fontin/Fontin-Bold.otf +0 -0
  8. package/assets/fonts/Fontin/Fontin-Italic.otf +0 -0
  9. package/assets/fonts/Fontin/Fontin-Regular.otf +0 -0
  10. package/assets/fonts/Gentium Book Plus/GentiumBookPlus-Bold.ttf +0 -0
  11. package/assets/fonts/Gentium Book Plus/GentiumBookPlus-BoldItalic.ttf +0 -0
  12. package/assets/fonts/Gentium Book Plus/GentiumBookPlus-Italic.ttf +0 -0
  13. package/assets/fonts/Gentium Book Plus/GentiumBookPlus-Regular.ttf +0 -0
  14. package/assets/fonts/Lato/Lato-Bold.ttf +0 -0
  15. package/assets/fonts/Lato/Lato-BoldItalic.ttf +0 -0
  16. package/assets/fonts/Lato/Lato-Italic.ttf +0 -0
  17. package/assets/fonts/Lato/Lato-Regular.ttf +0 -0
  18. package/assets/fonts/Raleway/Raleway-Bold.ttf +0 -0
  19. package/assets/fonts/Raleway/Raleway-BoldItalic.ttf +0 -0
  20. package/assets/fonts/Raleway/Raleway-Italic.ttf +0 -0
  21. package/assets/fonts/Raleway/Raleway-Regular.ttf +0 -0
  22. package/assets/fonts/Source Sans 3/SourceSans3-Bold.ttf +0 -0
  23. package/assets/fonts/Source Sans 3/SourceSans3-BoldItalic.ttf +0 -0
  24. package/assets/fonts/Source Sans 3/SourceSans3-Italic.ttf +0 -0
  25. package/assets/fonts/Source Sans 3/SourceSans3-Regular.ttf +0 -0
  26. package/assets/fonts/Ubuntu/Ubuntu-Bold.ttf +0 -0
  27. package/assets/fonts/Ubuntu/Ubuntu-BoldItalic.ttf +0 -0
  28. package/assets/fonts/Ubuntu/Ubuntu-Italic.ttf +0 -0
  29. package/assets/fonts/Ubuntu/Ubuntu-Regular.ttf +0 -0
  30. package/assets/fonts/Vazirmatn/Vazirmatn-Black.ttf +0 -0
  31. package/assets/fonts/Vazirmatn/Vazirmatn-Bold.ttf +0 -0
  32. package/assets/fonts/Vazirmatn/Vazirmatn-ExtraBold.ttf +0 -0
  33. package/assets/fonts/Vazirmatn/Vazirmatn-ExtraLight.ttf +0 -0
  34. package/assets/fonts/Vazirmatn/Vazirmatn-Light.ttf +0 -0
  35. package/assets/fonts/Vazirmatn/Vazirmatn-Medium.ttf +0 -0
  36. package/assets/fonts/Vazirmatn/Vazirmatn-Regular.ttf +0 -0
  37. package/assets/fonts/Vazirmatn/Vazirmatn-SemiBold.ttf +0 -0
  38. package/assets/fonts/Vazirmatn/Vazirmatn-Thin.ttf +0 -0
  39. package/assets/fonts/XCharter/XCharter-Bold.otf +0 -0
  40. package/assets/fonts/XCharter/XCharter-BoldItalic.otf +0 -0
  41. package/assets/fonts/XCharter/XCharter-Italic.otf +0 -0
  42. package/assets/fonts/XCharter/XCharter-Regular.otf +0 -0
  43. package/assets/wasm/typst_ts_renderer_bg.wasm +0 -0
  44. package/assets/wasm/typst_ts_web_compiler_bg.wasm +0 -0
  45. package/dist/asset_paths-Q3SHUESH.js +12 -0
  46. package/dist/asset_paths-Q3SHUESH.js.map +1 -0
  47. package/dist/chunk-CJBTP63L.js +94 -0
  48. package/dist/chunk-CJBTP63L.js.map +1 -0
  49. package/dist/chunk-EVM6BVMO.js +16 -0
  50. package/dist/chunk-EVM6BVMO.js.map +1 -0
  51. package/dist/chunk-QZVXUQ72.js +91 -0
  52. package/dist/chunk-QZVXUQ72.js.map +1 -0
  53. package/dist/chunk-VZSMPOAA.js +1012 -0
  54. package/dist/chunk-VZSMPOAA.js.map +1 -0
  55. package/dist/font_cache-BZENGUJA.js +84 -0
  56. package/dist/font_cache-BZENGUJA.js.map +1 -0
  57. package/dist/font_registry-TJ7PJJTJ.js +183 -0
  58. package/dist/font_registry-TJ7PJJTJ.js.map +1 -0
  59. package/dist/index.cjs +9979 -0
  60. package/dist/index.cjs.map +1 -0
  61. package/dist/index.d.cts +195 -0
  62. package/dist/index.d.ts +195 -0
  63. package/dist/index.js +8396 -0
  64. package/dist/index.js.map +1 -0
  65. package/dist/renderer/worker/pdf_worker.cjs +1518 -0
  66. package/dist/renderer/worker/pdf_worker.cjs.map +1 -0
  67. package/dist/renderer/worker/pdf_worker.d.cts +24 -0
  68. package/dist/renderer/worker/pdf_worker.d.ts +24 -0
  69. package/dist/renderer/worker/pdf_worker.js +51 -0
  70. package/dist/renderer/worker/pdf_worker.js.map +1 -0
  71. package/dist/typst_font_cache-LYHXH5UA.js +60 -0
  72. package/dist/typst_font_cache-LYHXH5UA.js.map +1 -0
  73. package/dist/typst_setup-SW3GQFSL.js +30 -0
  74. package/dist/typst_setup-SW3GQFSL.js.map +1 -0
  75. package/dist/typst_setup-WebjDI32.d.cts +266 -0
  76. package/dist/typst_setup-WebjDI32.d.ts +266 -0
  77. package/package.json +80 -0
@@ -0,0 +1,195 @@
1
+ import { C as ClassicTheme, L as Locale, R as RenderCVModel, Y as YamlDocumentBundle, O as OverlayDocuments, a as YamlSource, b as RenderCVValidationError } from './typst_setup-WebjDI32.cjs';
2
+ export { c as Cv, d as LocaleName, e as RenderCVInternalError, f as RenderCVUserError, g as RenderCVUserValidationError, h as RenderCvModelSchema, i as buildRendercvModel, j as clearFontCache, k as configureBrowserWasm, l as cvSchema, p as preloadTypst } from './typst_setup-WebjDI32.cjs';
3
+ import { z, ZodIssue } from 'zod';
4
+ import 'yaml';
5
+
6
+ /**
7
+ * Variant generator — TS replacement for Python's `variant_pydantic_model_generator.py`.
8
+ *
9
+ * The Python version dynamically builds new Pydantic classes with overridden
10
+ * defaults at import time. In Zod we don't need new classes — every theme has
11
+ * the *same shape* (it's all ClassicTheme), they differ only in default values.
12
+ *
13
+ * Our approach keeps everything as RAW INPUT data (strings, plain objects) and
14
+ * lets ClassicThemeSchema do the parsing:
15
+ * 1. Define `RAW_CLASSIC_DEFAULTS` — plain JSON of classic's default values
16
+ * (color values are strings like "rgb(0, 79, 144)", NOT Color instances).
17
+ * 2. Each theme is described by a plain JSON config object (`ThemeConfig`) —
18
+ * a deep-merge overlay over classic defaults.
19
+ * 3. `buildThemeSchema(themeConfig)` produces a Zod schema whose input is
20
+ * deep-merged (rawDefaults over user input) and then parsed by
21
+ * ClassicThemeSchema. The `theme` field is pinned via the overlay.
22
+ *
23
+ * This sidesteps the type-mismatch that arises when pre-parsed Color objects
24
+ * are fed back into a `z.string().transform(Color)` schema.
25
+ */
26
+
27
+ /** All theme names rendercv ships with (classic + 8 variants). */
28
+ declare const THEME_NAMES: readonly ["classic", "ember", "engineeringclassic", "engineeringresumes", "harvard", "ink", "moderncv", "opal", "sb2nov"];
29
+ type ThemeName = (typeof THEME_NAMES)[number];
30
+
31
+ /**
32
+ * Design — ported from `design/design.py` + `design/built_in_design.py`.
33
+ */
34
+
35
+ declare const DesignSchema: z.ZodType<ClassicTheme>;
36
+ declare const availableThemes: readonly string[];
37
+
38
+ /**
39
+ * Locales registry + LocaleSchema dispatcher.
40
+ *
41
+ * The 21 locale YAMLs (copied verbatim from the Python source) are imported
42
+ * as raw strings via Vite/Node's `?raw` suffix and parsed at module load by
43
+ * the `yaml` package. Each becomes a deep-merge overlay over English defaults.
44
+ *
45
+ * LocaleSchema dispatches to the matching variant based on the `language`
46
+ * field — same pattern as DesignSchema.
47
+ */
48
+
49
+ /**
50
+ * LocaleSchema — dispatches to the right locale based on the `language` field.
51
+ */
52
+ declare const LocaleSchema: z.ZodType<Locale>;
53
+ /** All locale names exported for callers (UI dropdowns, schema gen). */
54
+ declare const availableLocales: readonly string[];
55
+
56
+ /** Options accepted by buildRendercvModelFromYaml(). */
57
+ interface BuildOptions {
58
+ /** Relative-path assets (path → URL or data URL) for photo/overlay files. */
59
+ assets?: Record<string, string>;
60
+ designYaml?: string;
61
+ localeYaml?: string;
62
+ settingsYaml?: string;
63
+ outputFolder?: string;
64
+ typstPath?: string;
65
+ pdfPath?: string;
66
+ markdownPath?: string;
67
+ htmlPath?: string;
68
+ pngPath?: string;
69
+ dontGenerateTypst?: boolean;
70
+ dontGenerateHtml?: boolean;
71
+ dontGenerateMarkdown?: boolean;
72
+ dontGeneratePdf?: boolean;
73
+ dontGeneratePng?: boolean;
74
+ overrides?: Record<string, unknown>;
75
+ }
76
+ interface BuildResult {
77
+ model: RenderCVModel;
78
+ dictionary: Record<string, unknown>;
79
+ documents: {
80
+ main: YamlDocumentBundle;
81
+ overlays: OverlayDocuments;
82
+ };
83
+ }
84
+ declare function readYaml(content: string, source: YamlSource): unknown;
85
+ declare function buildRendercvModelFromYaml(mainYaml: string, opts?: BuildOptions): BuildResult;
86
+ declare function setByDottedPath(target: Record<string, unknown> | unknown[], fullPath: string, value: unknown): void;
87
+
88
+ interface ParseValidationErrorsOptions {
89
+ mainDocument: YamlDocumentBundle;
90
+ overlayDocuments?: OverlayDocuments;
91
+ }
92
+ declare function parseValidationErrors(issues: readonly ZodIssue[], options: ParseValidationErrorsOptions): RenderCVValidationError[];
93
+
94
+ /**
95
+ * Render options for browser-oriented rendering.
96
+ */
97
+ interface RenderOptions {
98
+ /** Map of asset paths/keys to bundled content (e.g. photo data URLs, lib.typ text). */
99
+ assets?: Record<string, string>;
100
+ /** Optional user template overrides keyed by relative template path. */
101
+ customTemplates?: Record<string, string>;
102
+ }
103
+
104
+ /**
105
+ * Typst generation — browser port of `typst.py` (returns string, no filesystem).
106
+ */
107
+
108
+ declare function generateTypst(rendercvModel: RenderCVModel, options?: RenderOptions): string | null;
109
+
110
+ /**
111
+ * Markdown generation — browser port of `markdown.py` (returns string, no filesystem).
112
+ */
113
+
114
+ declare function generateMarkdown(rendercvModel: RenderCVModel, options?: RenderOptions): string | null;
115
+
116
+ /**
117
+ * HTML generation — browser port of `html.py` (returns string, no filesystem).
118
+ */
119
+
120
+ declare function generateHtml(rendercvModel: RenderCVModel, options?: RenderOptions): string | null;
121
+
122
+ declare global {
123
+ var __rendercvRasterizeSvgToPng: ((svg: string, widthPx: number, heightPx: number, backgroundColor: string) => Promise<Uint8Array>) | undefined;
124
+ }
125
+ declare function generatePdf(rendercvModel: RenderCVModel, options?: RenderOptions): Promise<Uint8Array | null>;
126
+ declare function generatePng(rendercvModel: RenderCVModel, options?: RenderOptions): Promise<Uint8Array[] | null>;
127
+
128
+ /** Discriminator-free registry: entry-type name → schema factory. */
129
+ declare const ENTRY_TYPE_NAMES: readonly ["OneLineEntry", "NormalEntry", "ExperienceEntry", "EducationEntry", "PublicationEntry", "BulletEntry", "NumberedEntry", "ReversedNumberedEntry", "TextEntry"];
130
+ type EntryTypeName = (typeof ENTRY_TYPE_NAMES)[number];
131
+
132
+ /**
133
+ * Section validation + entry-type inference — ported from `cv/section.py`.
134
+ */
135
+
136
+ /** A validated section: title (post-formatting), entry type, entries. */
137
+ interface RenderCVSection {
138
+ title: string;
139
+ entryType: EntryTypeName;
140
+ entries: unknown[];
141
+ }
142
+
143
+ interface ProcessedCvFields {
144
+ _plainName?: string | null;
145
+ _plain_name?: string | null;
146
+ _connections?: string[];
147
+ _topNote?: string;
148
+ _top_note?: string;
149
+ _footer?: string;
150
+ photo?: string;
151
+ photo_name?: string;
152
+ _rendercvSections?: RenderCVSection[];
153
+ [key: string]: unknown;
154
+ }
155
+ type ProcessedRenderCVModel = RenderCVModel & {
156
+ cv: RenderCVModel['cv'] & ProcessedCvFields;
157
+ };
158
+ declare function processModel(rendercvModel: RenderCVModel, fileType: 'typst' | 'markdown', options?: RenderOptions): ProcessedRenderCVModel;
159
+
160
+ /**
161
+ * Path placeholder expansion — browser port of `path_resolver.py` (no filesystem).
162
+ */
163
+
164
+ declare function buildNameVariants(name: string | null | undefined): Record<string, string>;
165
+ declare function resolveRendercvFilePath(rendercvModel: RenderCVModel, filePath: string): string;
166
+
167
+ declare function configureBrowserFonts(baseUrl?: string): void;
168
+
169
+ interface RendercvAssetPaths {
170
+ wasmBaseUrl: string;
171
+ fontsBaseUrl: string;
172
+ }
173
+ /** Default browser URLs when assets are served from the app origin (e.g. /wasm, /fonts). */
174
+ declare function resolveBundledAssetPaths(origin?: string): RendercvAssetPaths;
175
+ /**
176
+ * Configure font/WASM loading. In the browser, defaults to `{origin}/wasm` and `{origin}/fonts`.
177
+ * In Node (tests), loads WASM bytes from the bundled assets/ directory on disk.
178
+ */
179
+ declare function configureDefaultAssets(options?: {
180
+ origin?: string;
181
+ }): Promise<RendercvAssetPaths>;
182
+
183
+ /** Auto-generated by scripts/generate-connection-icons.mjs — do not edit. */
184
+ declare const PRESET_ICON_IDS: readonly ["envelope", "phone", "link", "location-dot", "linkedin", "github", "gitlab", "imdb", "instagram", "mastodon", "orcid", "stack-overflow", "researchgate", "youtube", "graduation-cap", "telegram", "whatsapp", "code", "x-twitter", "bluesky", "reddit", "external-link"];
185
+
186
+ /** Map YAML custom_connections.fontawesome_icon values to bundled SVG preset ids. */
187
+ declare function resolveIconId(iconName: string): string;
188
+
189
+ /**
190
+ * rendercv-ts — TypeScript port (browser programmatic API).
191
+ */
192
+
193
+ declare const VERSION = "0.1.0";
194
+
195
+ export { type BuildOptions, type BuildResult, ClassicTheme, DesignSchema, Locale, LocaleSchema, PRESET_ICON_IDS, type ProcessedRenderCVModel, RenderCVModel, RenderCVValidationError, type RenderOptions, type RendercvAssetPaths, THEME_NAMES, type ThemeName, VERSION, availableLocales, availableThemes, buildNameVariants, buildRendercvModelFromYaml, configureBrowserFonts, configureDefaultAssets, generateHtml, generateMarkdown, generatePdf, generatePng, generateTypst, parseValidationErrors, processModel, readYaml, resolveBundledAssetPaths, resolveIconId, resolveRendercvFilePath, setByDottedPath };
@@ -0,0 +1,195 @@
1
+ import { C as ClassicTheme, L as Locale, R as RenderCVModel, Y as YamlDocumentBundle, O as OverlayDocuments, a as YamlSource, b as RenderCVValidationError } from './typst_setup-WebjDI32.js';
2
+ export { c as Cv, d as LocaleName, e as RenderCVInternalError, f as RenderCVUserError, g as RenderCVUserValidationError, h as RenderCvModelSchema, i as buildRendercvModel, j as clearFontCache, k as configureBrowserWasm, l as cvSchema, p as preloadTypst } from './typst_setup-WebjDI32.js';
3
+ import { z, ZodIssue } from 'zod';
4
+ import 'yaml';
5
+
6
+ /**
7
+ * Variant generator — TS replacement for Python's `variant_pydantic_model_generator.py`.
8
+ *
9
+ * The Python version dynamically builds new Pydantic classes with overridden
10
+ * defaults at import time. In Zod we don't need new classes — every theme has
11
+ * the *same shape* (it's all ClassicTheme), they differ only in default values.
12
+ *
13
+ * Our approach keeps everything as RAW INPUT data (strings, plain objects) and
14
+ * lets ClassicThemeSchema do the parsing:
15
+ * 1. Define `RAW_CLASSIC_DEFAULTS` — plain JSON of classic's default values
16
+ * (color values are strings like "rgb(0, 79, 144)", NOT Color instances).
17
+ * 2. Each theme is described by a plain JSON config object (`ThemeConfig`) —
18
+ * a deep-merge overlay over classic defaults.
19
+ * 3. `buildThemeSchema(themeConfig)` produces a Zod schema whose input is
20
+ * deep-merged (rawDefaults over user input) and then parsed by
21
+ * ClassicThemeSchema. The `theme` field is pinned via the overlay.
22
+ *
23
+ * This sidesteps the type-mismatch that arises when pre-parsed Color objects
24
+ * are fed back into a `z.string().transform(Color)` schema.
25
+ */
26
+
27
+ /** All theme names rendercv ships with (classic + 8 variants). */
28
+ declare const THEME_NAMES: readonly ["classic", "ember", "engineeringclassic", "engineeringresumes", "harvard", "ink", "moderncv", "opal", "sb2nov"];
29
+ type ThemeName = (typeof THEME_NAMES)[number];
30
+
31
+ /**
32
+ * Design — ported from `design/design.py` + `design/built_in_design.py`.
33
+ */
34
+
35
+ declare const DesignSchema: z.ZodType<ClassicTheme>;
36
+ declare const availableThemes: readonly string[];
37
+
38
+ /**
39
+ * Locales registry + LocaleSchema dispatcher.
40
+ *
41
+ * The 21 locale YAMLs (copied verbatim from the Python source) are imported
42
+ * as raw strings via Vite/Node's `?raw` suffix and parsed at module load by
43
+ * the `yaml` package. Each becomes a deep-merge overlay over English defaults.
44
+ *
45
+ * LocaleSchema dispatches to the matching variant based on the `language`
46
+ * field — same pattern as DesignSchema.
47
+ */
48
+
49
+ /**
50
+ * LocaleSchema — dispatches to the right locale based on the `language` field.
51
+ */
52
+ declare const LocaleSchema: z.ZodType<Locale>;
53
+ /** All locale names exported for callers (UI dropdowns, schema gen). */
54
+ declare const availableLocales: readonly string[];
55
+
56
+ /** Options accepted by buildRendercvModelFromYaml(). */
57
+ interface BuildOptions {
58
+ /** Relative-path assets (path → URL or data URL) for photo/overlay files. */
59
+ assets?: Record<string, string>;
60
+ designYaml?: string;
61
+ localeYaml?: string;
62
+ settingsYaml?: string;
63
+ outputFolder?: string;
64
+ typstPath?: string;
65
+ pdfPath?: string;
66
+ markdownPath?: string;
67
+ htmlPath?: string;
68
+ pngPath?: string;
69
+ dontGenerateTypst?: boolean;
70
+ dontGenerateHtml?: boolean;
71
+ dontGenerateMarkdown?: boolean;
72
+ dontGeneratePdf?: boolean;
73
+ dontGeneratePng?: boolean;
74
+ overrides?: Record<string, unknown>;
75
+ }
76
+ interface BuildResult {
77
+ model: RenderCVModel;
78
+ dictionary: Record<string, unknown>;
79
+ documents: {
80
+ main: YamlDocumentBundle;
81
+ overlays: OverlayDocuments;
82
+ };
83
+ }
84
+ declare function readYaml(content: string, source: YamlSource): unknown;
85
+ declare function buildRendercvModelFromYaml(mainYaml: string, opts?: BuildOptions): BuildResult;
86
+ declare function setByDottedPath(target: Record<string, unknown> | unknown[], fullPath: string, value: unknown): void;
87
+
88
+ interface ParseValidationErrorsOptions {
89
+ mainDocument: YamlDocumentBundle;
90
+ overlayDocuments?: OverlayDocuments;
91
+ }
92
+ declare function parseValidationErrors(issues: readonly ZodIssue[], options: ParseValidationErrorsOptions): RenderCVValidationError[];
93
+
94
+ /**
95
+ * Render options for browser-oriented rendering.
96
+ */
97
+ interface RenderOptions {
98
+ /** Map of asset paths/keys to bundled content (e.g. photo data URLs, lib.typ text). */
99
+ assets?: Record<string, string>;
100
+ /** Optional user template overrides keyed by relative template path. */
101
+ customTemplates?: Record<string, string>;
102
+ }
103
+
104
+ /**
105
+ * Typst generation — browser port of `typst.py` (returns string, no filesystem).
106
+ */
107
+
108
+ declare function generateTypst(rendercvModel: RenderCVModel, options?: RenderOptions): string | null;
109
+
110
+ /**
111
+ * Markdown generation — browser port of `markdown.py` (returns string, no filesystem).
112
+ */
113
+
114
+ declare function generateMarkdown(rendercvModel: RenderCVModel, options?: RenderOptions): string | null;
115
+
116
+ /**
117
+ * HTML generation — browser port of `html.py` (returns string, no filesystem).
118
+ */
119
+
120
+ declare function generateHtml(rendercvModel: RenderCVModel, options?: RenderOptions): string | null;
121
+
122
+ declare global {
123
+ var __rendercvRasterizeSvgToPng: ((svg: string, widthPx: number, heightPx: number, backgroundColor: string) => Promise<Uint8Array>) | undefined;
124
+ }
125
+ declare function generatePdf(rendercvModel: RenderCVModel, options?: RenderOptions): Promise<Uint8Array | null>;
126
+ declare function generatePng(rendercvModel: RenderCVModel, options?: RenderOptions): Promise<Uint8Array[] | null>;
127
+
128
+ /** Discriminator-free registry: entry-type name → schema factory. */
129
+ declare const ENTRY_TYPE_NAMES: readonly ["OneLineEntry", "NormalEntry", "ExperienceEntry", "EducationEntry", "PublicationEntry", "BulletEntry", "NumberedEntry", "ReversedNumberedEntry", "TextEntry"];
130
+ type EntryTypeName = (typeof ENTRY_TYPE_NAMES)[number];
131
+
132
+ /**
133
+ * Section validation + entry-type inference — ported from `cv/section.py`.
134
+ */
135
+
136
+ /** A validated section: title (post-formatting), entry type, entries. */
137
+ interface RenderCVSection {
138
+ title: string;
139
+ entryType: EntryTypeName;
140
+ entries: unknown[];
141
+ }
142
+
143
+ interface ProcessedCvFields {
144
+ _plainName?: string | null;
145
+ _plain_name?: string | null;
146
+ _connections?: string[];
147
+ _topNote?: string;
148
+ _top_note?: string;
149
+ _footer?: string;
150
+ photo?: string;
151
+ photo_name?: string;
152
+ _rendercvSections?: RenderCVSection[];
153
+ [key: string]: unknown;
154
+ }
155
+ type ProcessedRenderCVModel = RenderCVModel & {
156
+ cv: RenderCVModel['cv'] & ProcessedCvFields;
157
+ };
158
+ declare function processModel(rendercvModel: RenderCVModel, fileType: 'typst' | 'markdown', options?: RenderOptions): ProcessedRenderCVModel;
159
+
160
+ /**
161
+ * Path placeholder expansion — browser port of `path_resolver.py` (no filesystem).
162
+ */
163
+
164
+ declare function buildNameVariants(name: string | null | undefined): Record<string, string>;
165
+ declare function resolveRendercvFilePath(rendercvModel: RenderCVModel, filePath: string): string;
166
+
167
+ declare function configureBrowserFonts(baseUrl?: string): void;
168
+
169
+ interface RendercvAssetPaths {
170
+ wasmBaseUrl: string;
171
+ fontsBaseUrl: string;
172
+ }
173
+ /** Default browser URLs when assets are served from the app origin (e.g. /wasm, /fonts). */
174
+ declare function resolveBundledAssetPaths(origin?: string): RendercvAssetPaths;
175
+ /**
176
+ * Configure font/WASM loading. In the browser, defaults to `{origin}/wasm` and `{origin}/fonts`.
177
+ * In Node (tests), loads WASM bytes from the bundled assets/ directory on disk.
178
+ */
179
+ declare function configureDefaultAssets(options?: {
180
+ origin?: string;
181
+ }): Promise<RendercvAssetPaths>;
182
+
183
+ /** Auto-generated by scripts/generate-connection-icons.mjs — do not edit. */
184
+ declare const PRESET_ICON_IDS: readonly ["envelope", "phone", "link", "location-dot", "linkedin", "github", "gitlab", "imdb", "instagram", "mastodon", "orcid", "stack-overflow", "researchgate", "youtube", "graduation-cap", "telegram", "whatsapp", "code", "x-twitter", "bluesky", "reddit", "external-link"];
185
+
186
+ /** Map YAML custom_connections.fontawesome_icon values to bundled SVG preset ids. */
187
+ declare function resolveIconId(iconName: string): string;
188
+
189
+ /**
190
+ * rendercv-ts — TypeScript port (browser programmatic API).
191
+ */
192
+
193
+ declare const VERSION = "0.1.0";
194
+
195
+ export { type BuildOptions, type BuildResult, ClassicTheme, DesignSchema, Locale, LocaleSchema, PRESET_ICON_IDS, type ProcessedRenderCVModel, RenderCVModel, RenderCVValidationError, type RenderOptions, type RendercvAssetPaths, THEME_NAMES, type ThemeName, VERSION, availableLocales, availableThemes, buildNameVariants, buildRendercvModelFromYaml, configureBrowserFonts, configureDefaultAssets, generateHtml, generateMarkdown, generatePdf, generatePng, generateTypst, parseValidationErrors, processModel, readYaml, resolveBundledAssetPaths, resolveIconId, resolveRendercvFilePath, setByDottedPath };