@anja.codes/vitakit 0.2.0 → 0.3.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/README.md +4 -3
- package/dist/check.mjs +14 -12
- package/dist/chunks/authoring.mjs +50 -45
- package/dist/{shared/vitakit.By5VWQ1n.mjs → chunks/bibliography.mjs} +73 -170
- package/dist/chunks/build.mjs +19 -17
- package/dist/chunks/documents.mjs +15 -6
- package/dist/chunks/draft.mjs +3 -3
- package/dist/chunks/eject.mjs +2 -2
- package/dist/chunks/emit.mjs +38 -22
- package/dist/chunks/fields.mjs +2 -2
- package/dist/chunks/inventory.mjs +29 -27
- package/dist/chunks/migrations.mjs +218 -0
- package/dist/chunks/plan.mjs +36 -8
- package/dist/chunks/publication-lists.mjs +202 -0
- package/dist/chunks/schemas.mjs +2 -2
- package/dist/chunks/sections.mjs +3 -3
- package/dist/chunks/validate.mjs +25 -16
- package/dist/chunks/vue.mjs +89 -52
- package/dist/chunks/yaml.mjs +62 -0
- package/dist/cli.mjs +1 -1
- package/dist/index.d.mts +9 -9
- package/dist/index.mjs +12 -10
- package/dist/nuxt.mjs +19 -11
- package/dist/runtime/components/VitaPublications.vue +21 -22
- package/dist/runtime/composables/useVitakit.ts +14 -3
- package/dist/schemas/publications.ts +9 -7
- package/dist/shared/index.d.mts +2 -2
- package/dist/shared/{vitakit.BfpxDtz1.d.mts → vitakit.BfR_mUHm.d.mts} +17 -5
- package/dist/shared/{vitakit.BZZIsWlY.mjs → vitakit.CCTDg7pz.mjs} +21 -1
- package/dist/shared/{vitakit.DbSeENVS.mjs → vitakit.DCK90zq4.mjs} +10 -1
- package/dist/shared/vitakit.DteA9vLy.mjs +135 -0
- package/dist/shared/{vitakit.BerUaxtF.mjs → vitakit.DvABWuUc.mjs} +1 -1
- package/dist/shared/{vitakit.Do5HC_MD.mjs → vitakit.DvvUYUTS.mjs} +61 -3
- package/dist/shared/vitakit.UfoXdL7U.mjs +22 -0
- package/dist/shared/{vitakit.CoWX2Z4R.mjs → vitakit.zwr1ssO5.mjs} +353 -57
- package/dist/tex/templates/publications.eta +4 -2
- package/dist/tex/vitakit-cv.cls +15 -4
- package/dist/tex.d.mts +29 -8
- package/dist/tex.mjs +13 -10
- package/package.json +1 -1
package/dist/tex.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { Entry,
|
|
2
|
+
import { Entry, PublicationList } from './index.mjs';
|
|
3
3
|
|
|
4
4
|
interface BuildOptions {
|
|
5
5
|
rootDir: string;
|
|
@@ -34,6 +34,25 @@ declare function buildCv(options: BuildOptions): Promise<string[]>;
|
|
|
34
34
|
/** Read a generated file, for tests and diagnostics. */
|
|
35
35
|
declare function readGenerated(rootDir: string, document: string, section: string): Promise<string>;
|
|
36
36
|
|
|
37
|
+
interface PdfPlacement {
|
|
38
|
+
section: string;
|
|
39
|
+
document: string;
|
|
40
|
+
/** `cv-tex/cv.tex`. */
|
|
41
|
+
file: string;
|
|
42
|
+
line: number;
|
|
43
|
+
macro: 'vitasection' | 'vitainput';
|
|
44
|
+
/** The optional heading of `\vitasection[Heading]{id}`. */
|
|
45
|
+
heading?: string;
|
|
46
|
+
}
|
|
47
|
+
/** A `\vitapublications[Heading]{list}` line. */
|
|
48
|
+
interface PdfPublicationPlacement {
|
|
49
|
+
list: string;
|
|
50
|
+
document: string;
|
|
51
|
+
file: string;
|
|
52
|
+
line: number;
|
|
53
|
+
heading?: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
37
56
|
declare const documentSchema: z.ZodObject<{
|
|
38
57
|
visibility: z.ZodDefault<z.ZodEnum<{
|
|
39
58
|
public: "public";
|
|
@@ -47,9 +66,6 @@ declare const documentSchema: z.ZodObject<{
|
|
|
47
66
|
until: z.ZodOptional<z.ZodNumber>;
|
|
48
67
|
title: z.ZodOptional<z.ZodString>;
|
|
49
68
|
}, z.core.$strict>>>;
|
|
50
|
-
publications: z.ZodDefault<z.ZodObject<{
|
|
51
|
-
groups: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
52
|
-
}, z.core.$strict>>;
|
|
53
69
|
}, z.core.$strict>;
|
|
54
70
|
type DocumentOptions = z.infer<typeof documentSchema>;
|
|
55
71
|
interface DocumentSource {
|
|
@@ -57,6 +73,10 @@ interface DocumentSource {
|
|
|
57
73
|
name: string;
|
|
58
74
|
texFile: string;
|
|
59
75
|
options: DocumentOptions;
|
|
76
|
+
/** Its `\vitasection` and `\vitainput` lines. */
|
|
77
|
+
placements: PdfPlacement[];
|
|
78
|
+
/** Its `\vitapublications` lines. */
|
|
79
|
+
publications: PdfPublicationPlacement[];
|
|
60
80
|
}
|
|
61
81
|
/** Read every `cv-tex/*.tex` and its options. Strict: the first problem throws. */
|
|
62
82
|
declare function discoverDocuments(cvDir: string): Promise<DocumentSource[]>;
|
|
@@ -85,7 +105,8 @@ declare function resolveTemplate(id: string, userDir: string, { exclude }?: {
|
|
|
85
105
|
}): Promise<ResolvedTemplate>;
|
|
86
106
|
interface EmitOptions {
|
|
87
107
|
sections: Record<string, Entry[]>;
|
|
88
|
-
|
|
108
|
+
/** The publication lists the document shows, by name. */
|
|
109
|
+
publications: Record<string, PublicationList>;
|
|
89
110
|
options: DocumentOptions;
|
|
90
111
|
/** `cv-tex/templates/`, where user overrides live. */
|
|
91
112
|
templateDir: string;
|
|
@@ -101,9 +122,9 @@ interface EmitOptions {
|
|
|
101
122
|
* `entries` are all loaded entries; the document's selection is applied here.
|
|
102
123
|
*/
|
|
103
124
|
declare function renderSection(id: string, entries: Entry[], options: DocumentOptions, templateDir: string): Promise<string>;
|
|
104
|
-
/** Render
|
|
105
|
-
declare function renderPublications(
|
|
106
|
-
/** Write one `.tex` file per section,
|
|
125
|
+
/** Render one publication list, without writing anything. */
|
|
126
|
+
declare function renderPublications(list: PublicationList, templateDir: string, siteUrl?: string): Promise<string>;
|
|
127
|
+
/** Write one `.tex` file per section, and one per publication list in `publications/`. */
|
|
107
128
|
declare function emitDocument(emit: EmitOptions): Promise<string[]>;
|
|
108
129
|
|
|
109
130
|
/**
|
package/dist/tex.mjs
CHANGED
|
@@ -7,30 +7,33 @@ import 'node:fs/promises';
|
|
|
7
7
|
import 'node:fs';
|
|
8
8
|
import 'node:process';
|
|
9
9
|
import 'node:path';
|
|
10
|
-
import './shared/vitakit.
|
|
10
|
+
import './shared/vitakit.DteA9vLy.mjs';
|
|
11
11
|
import 'gray-matter';
|
|
12
12
|
import 'yaml';
|
|
13
|
+
import './chunks/bibliography.mjs';
|
|
14
|
+
import './shared/vitakit.DQ6PmGoL.mjs';
|
|
15
|
+
import 'node:url';
|
|
16
|
+
import '@behackl/citation-js-extras';
|
|
13
17
|
import 'unified';
|
|
18
|
+
import 'rehype-parse';
|
|
19
|
+
import 'rehype-sanitize';
|
|
20
|
+
import 'rehype-stringify';
|
|
14
21
|
import 'remark-parse';
|
|
15
22
|
import 'remark-gfm';
|
|
16
23
|
import 'remark-math';
|
|
17
24
|
import 'remark-rehype';
|
|
18
25
|
import 'rehype-katex';
|
|
19
26
|
import 'rehype-raw';
|
|
20
|
-
import 'rehype-stringify';
|
|
21
27
|
import 'unist-util-visit';
|
|
22
|
-
import './shared/vitakit.
|
|
23
|
-
import './shared/vitakit.DQ6PmGoL.mjs';
|
|
24
|
-
import 'node:url';
|
|
25
|
-
import '@behackl/citation-js-extras';
|
|
26
|
-
import 'rehype-parse';
|
|
27
|
-
import 'rehype-sanitize';
|
|
28
|
-
import './shared/vitakit.DbSeENVS.mjs';
|
|
28
|
+
import './shared/vitakit.DCK90zq4.mjs';
|
|
29
29
|
import 'zod';
|
|
30
|
+
import './chunks/publication-lists.mjs';
|
|
31
|
+
import './shared/vitakit.D10HyDhF.mjs';
|
|
30
32
|
import './chunks/sections.mjs';
|
|
31
33
|
import './chunks/schemas.mjs';
|
|
32
|
-
import './shared/vitakit.
|
|
34
|
+
import './shared/vitakit.DvABWuUc.mjs';
|
|
33
35
|
import './shared/vitakit.TSMTC5Jl.mjs';
|
|
36
|
+
import './shared/vitakit.DvvUYUTS.mjs';
|
|
34
37
|
import 'eta';
|
|
35
38
|
import './shared/vitakit.CfB3hMHl.mjs';
|
|
36
39
|
import './shared/vitakit.D-DdJaDZ.mjs';
|