@anja.codes/vitakit 0.1.0 → 0.2.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 (63) hide show
  1. package/README.md +51 -131
  2. package/dist/check.mjs +12 -5
  3. package/dist/chunks/authoring.mjs +367 -0
  4. package/dist/chunks/build.mjs +176 -0
  5. package/dist/chunks/documents.mjs +143 -0
  6. package/dist/chunks/draft.mjs +222 -0
  7. package/dist/chunks/eject.mjs +59 -0
  8. package/dist/chunks/emit.mjs +200 -0
  9. package/dist/chunks/eta.mjs +16 -0
  10. package/dist/chunks/fields.mjs +79 -0
  11. package/dist/chunks/inventory.mjs +199 -0
  12. package/dist/chunks/plan.mjs +144 -0
  13. package/dist/chunks/prompt.mjs +33 -0
  14. package/dist/chunks/schema-source.mjs +12 -0
  15. package/dist/chunks/schemas.mjs +109 -0
  16. package/dist/chunks/sections.mjs +109 -0
  17. package/dist/chunks/snippets.mjs +199 -0
  18. package/dist/chunks/validate.mjs +124 -0
  19. package/dist/chunks/vue.mjs +116 -0
  20. package/dist/cli.d.mts +33 -40
  21. package/dist/cli.mjs +7 -224
  22. package/dist/index.d.mts +372 -42
  23. package/dist/index.mjs +10 -4
  24. package/dist/nuxt.mjs +35 -5
  25. package/dist/runtime/components/VitaSection.vue +94 -38
  26. package/dist/schemas/education.ts +4 -4
  27. package/dist/schemas/employment.ts +3 -3
  28. package/dist/schemas/publications.ts +2 -2
  29. package/dist/schemas/supervision.ts +3 -3
  30. package/dist/schemas/talks.ts +1 -1
  31. package/dist/schemas/teaching.ts +3 -3
  32. package/dist/shared/index.d.mts +60 -9
  33. package/dist/shared/index.mjs +3 -57
  34. package/dist/shared/vitakit.BZZIsWlY.mjs +179 -0
  35. package/dist/shared/vitakit.BerUaxtF.mjs +121 -0
  36. package/dist/shared/{vitakit.D8WRg_Xx.d.mts → vitakit.BfpxDtz1.d.mts} +9 -8
  37. package/dist/shared/{vitakit.CypCF-4Q.mjs → vitakit.By5VWQ1n.mjs} +12 -78
  38. package/dist/shared/vitakit.CfB3hMHl.mjs +60 -0
  39. package/dist/shared/vitakit.CoWX2Z4R.mjs +1554 -0
  40. package/dist/shared/{vitakit.BlU-p01e.mjs → vitakit.CtChKO0I.mjs} +1 -1
  41. package/dist/shared/vitakit.D-DdJaDZ.mjs +20 -0
  42. package/dist/shared/vitakit.D10HyDhF.mjs +19 -0
  43. package/dist/shared/vitakit.DQ6PmGoL.mjs +34 -0
  44. package/dist/shared/vitakit.DbSeENVS.mjs +58 -0
  45. package/dist/shared/vitakit.DcQOdM4I.mjs +57 -0
  46. package/dist/shared/vitakit.Do5HC_MD.mjs +142 -0
  47. package/dist/shared/vitakit.TSMTC5Jl.mjs +6 -0
  48. package/dist/tex/templates/_generic.eta +6 -4
  49. package/dist/tex/templates/education.eta +10 -5
  50. package/dist/tex/templates/employment.eta +12 -5
  51. package/dist/tex/templates/publications.eta +4 -2
  52. package/dist/tex/templates/supervision.eta +10 -2
  53. package/dist/tex/templates/talks.eta +5 -1
  54. package/dist/tex/templates/teaching.eta +6 -4
  55. package/dist/tex/vitakit-cv.cls +21 -6
  56. package/dist/tex.d.mts +53 -5
  57. package/dist/tex.mjs +20 -113
  58. package/package.json +10 -7
  59. package/src/bin/vitakit.mjs +3 -153
  60. package/dist/shared/vitakit.BRhjqpAt.mjs +0 -250
  61. package/dist/shared/vitakit.BxcnlFGP.mjs +0 -325
  62. package/src/bin/vitakit-build-cv.mjs +0 -50
  63. package/src/bin/vitakit-check.mjs +0 -57
package/dist/index.d.mts CHANGED
@@ -1,9 +1,9 @@
1
1
  import * as zod from 'zod';
2
2
  import { z } from 'zod';
3
3
  export { z } from 'zod';
4
- import { D as DateRange, V as Visibility, a as VitakitContent } from './shared/vitakit.D8WRg_Xx.mjs';
4
+ import { D as DateRange, V as Visibility, a as VitakitContent } from './shared/vitakit.BfpxDtz1.mjs';
5
5
  import { RichTextMarker } from './shared/index.mjs';
6
- export { C as ContentIssue, b as DatePoint, E as Entry, c as EntryBase, I as Institution, L as Link, P as Page, d as Profile, e as Publication, f as PublicationBadge, g as PublicationGroup, h as RichText } from './shared/vitakit.D8WRg_Xx.mjs';
6
+ export { C as ContentIssue, b as DatePoint, E as Entry, c as EntryBase, L as Link, d as Linked, P as Page, e as Profile, f as Publication, g as PublicationBadge, h as PublicationGroup, i as RichText } from './shared/vitakit.BfpxDtz1.mjs';
7
7
  import { BadgeConfig } from '@behackl/citation-js-extras';
8
8
  export { BadgeConfig, badgePresets } from '@behackl/citation-js-extras';
9
9
  import * as zod_v4_core from 'zod/v4/core';
@@ -67,19 +67,91 @@ declare const dateRange: z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<rea
67
67
  from: string;
68
68
  to?: string | undefined;
69
69
  }>>;
70
- declare const institution: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<{
71
- name: string;
70
+ /**
71
+ * A label, optionally with a URL: an institution, a funder, a supervisor, a
72
+ * link to slides. One shape for everything that is "a name that may link".
73
+ *
74
+ * ```yaml
75
+ * institution: University of Graz # a label
76
+ * institution: https://uni-graz.at # a URL, labelled by itself
77
+ * institution: { label: University of Graz, url: https://uni-graz.at }
78
+ * institution: { name: University of Graz, url: https://uni-graz.at } # same
79
+ * ```
80
+ *
81
+ * `name` is accepted as a synonym of `label` because it reads better for
82
+ * people and institutions. Every form becomes `{ label, url? }`.
83
+ */
84
+ declare const linked: z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>, z.ZodTransform<{
85
+ label: string;
86
+ url: string | SitePathMarker;
87
+ }, string | SitePathMarker>>, z.ZodPipe<z.ZodString, z.ZodTransform<{
88
+ label: string;
72
89
  }, string>>, z.ZodObject<{
90
+ label: z.ZodString;
91
+ url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>>;
92
+ }, z.core.$strict>, z.ZodPipe<z.ZodObject<{
73
93
  name: z.ZodString;
74
94
  url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>>;
75
- }, z.core.$strict>]>;
76
- declare const link: z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>, z.ZodTransform<{
95
+ }, z.core.$strict>, z.ZodTransform<{
96
+ label: string;
97
+ url: string | SitePathMarker | undefined;
98
+ }, {
99
+ name: string;
100
+ url?: string | SitePathMarker | undefined;
101
+ }>>]>, z.ZodTransform<{
102
+ label: string;
103
+ url?: string | SitePathMarker;
104
+ }, {
77
105
  label: string;
78
106
  url: string | SitePathMarker;
79
- }, string | SitePathMarker>>, z.ZodObject<{
107
+ } | {
108
+ label: string;
109
+ } | {
110
+ label: string;
111
+ url: string | SitePathMarker | undefined;
112
+ } | {
113
+ label: string;
114
+ url?: string | SitePathMarker | undefined;
115
+ }>>;
116
+ /** A `linked` value that must have a URL, e.g. the links in the profile. */
117
+ declare const requiredLink: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>, z.ZodTransform<{
118
+ label: string;
119
+ url: string | SitePathMarker;
120
+ }, string | SitePathMarker>>, z.ZodPipe<z.ZodString, z.ZodTransform<{
121
+ label: string;
122
+ }, string>>, z.ZodObject<{
80
123
  label: z.ZodString;
81
- url: z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>;
82
- }, z.core.$strict>]>;
124
+ url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>>;
125
+ }, z.core.$strict>, z.ZodPipe<z.ZodObject<{
126
+ name: z.ZodString;
127
+ url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>>;
128
+ }, z.core.$strict>, z.ZodTransform<{
129
+ label: string;
130
+ url: string | SitePathMarker | undefined;
131
+ }, {
132
+ name: string;
133
+ url?: string | SitePathMarker | undefined;
134
+ }>>]>, z.ZodTransform<{
135
+ label: string;
136
+ url?: string | SitePathMarker;
137
+ }, {
138
+ label: string;
139
+ url: string | SitePathMarker;
140
+ } | {
141
+ label: string;
142
+ } | {
143
+ label: string;
144
+ url: string | SitePathMarker | undefined;
145
+ } | {
146
+ label: string;
147
+ url?: string | SitePathMarker | undefined;
148
+ }>>, z.ZodTransform<{
149
+ label: string;
150
+ url: string | SitePathMarker;
151
+ }, {
152
+ label: string;
153
+ url?: string | SitePathMarker;
154
+ }>>;
83
155
  declare const visibility: z.ZodDefault<z.ZodEnum<Record<Visibility, Visibility>>>;
84
156
  /**
85
157
  * Wrap an entry shape so that every section entry supports `visibility`.
@@ -103,22 +175,73 @@ declare const _default$4: z.ZodArray<z.ZodObject<{
103
175
  to?: string | undefined;
104
176
  }>>;
105
177
  degree: z.ZodString;
106
- institution: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<{
107
- name: string;
178
+ institution: z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>, z.ZodTransform<{
179
+ label: string;
180
+ url: string | SitePathMarker;
181
+ }, string | SitePathMarker>>, z.ZodPipe<z.ZodString, z.ZodTransform<{
182
+ label: string;
108
183
  }, string>>, z.ZodObject<{
184
+ label: z.ZodString;
185
+ url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>>;
186
+ }, z.core.$strict>, z.ZodPipe<z.ZodObject<{
109
187
  name: z.ZodString;
110
188
  url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>>;
111
- }, z.core.$strict>]>;
189
+ }, z.core.$strict>, z.ZodTransform<{
190
+ label: string;
191
+ url: string | SitePathMarker | undefined;
192
+ }, {
193
+ name: string;
194
+ url?: string | SitePathMarker | undefined;
195
+ }>>]>, z.ZodTransform<{
196
+ label: string;
197
+ url?: string | SitePathMarker;
198
+ }, {
199
+ label: string;
200
+ url: string | SitePathMarker;
201
+ } | {
202
+ label: string;
203
+ } | {
204
+ label: string;
205
+ url: string | SitePathMarker | undefined;
206
+ } | {
207
+ label: string;
208
+ url?: string | SitePathMarker | undefined;
209
+ }>>;
112
210
  thesis: z.ZodOptional<z.ZodObject<{
113
211
  title: z.ZodPipe<z.ZodString, z.ZodTransform<RichTextMarker, string>>;
114
212
  type: z.ZodOptional<z.ZodString>;
115
- supervisor: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>, z.ZodTransform<{
213
+ supervisor: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>, z.ZodTransform<{
116
214
  label: string;
117
215
  url: string | SitePathMarker;
118
- }, string | SitePathMarker>>, z.ZodObject<{
216
+ }, string | SitePathMarker>>, z.ZodPipe<z.ZodString, z.ZodTransform<{
217
+ label: string;
218
+ }, string>>, z.ZodObject<{
119
219
  label: z.ZodString;
120
- url: z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>;
121
- }, z.core.$strict>]>]>>;
220
+ url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>>;
221
+ }, z.core.$strict>, z.ZodPipe<z.ZodObject<{
222
+ name: z.ZodString;
223
+ url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>>;
224
+ }, z.core.$strict>, z.ZodTransform<{
225
+ label: string;
226
+ url: string | SitePathMarker | undefined;
227
+ }, {
228
+ name: string;
229
+ url?: string | SitePathMarker | undefined;
230
+ }>>]>, z.ZodTransform<{
231
+ label: string;
232
+ url?: string | SitePathMarker;
233
+ }, {
234
+ label: string;
235
+ url: string | SitePathMarker;
236
+ } | {
237
+ label: string;
238
+ } | {
239
+ label: string;
240
+ url: string | SitePathMarker | undefined;
241
+ } | {
242
+ label: string;
243
+ url?: string | SitePathMarker | undefined;
244
+ }>>>;
122
245
  url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>>;
123
246
  }, z.core.$strict>>;
124
247
  note: z.ZodOptional<z.ZodString>;
@@ -134,12 +257,38 @@ declare const _default$3: z.ZodArray<z.ZodObject<{
134
257
  to?: string | undefined;
135
258
  }>>;
136
259
  position: z.ZodString;
137
- institution: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<{
138
- name: string;
260
+ institution: z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>, z.ZodTransform<{
261
+ label: string;
262
+ url: string | SitePathMarker;
263
+ }, string | SitePathMarker>>, z.ZodPipe<z.ZodString, z.ZodTransform<{
264
+ label: string;
139
265
  }, string>>, z.ZodObject<{
266
+ label: z.ZodString;
267
+ url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>>;
268
+ }, z.core.$strict>, z.ZodPipe<z.ZodObject<{
140
269
  name: z.ZodString;
141
270
  url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>>;
142
- }, z.core.$strict>]>;
271
+ }, z.core.$strict>, z.ZodTransform<{
272
+ label: string;
273
+ url: string | SitePathMarker | undefined;
274
+ }, {
275
+ name: string;
276
+ url?: string | SitePathMarker | undefined;
277
+ }>>]>, z.ZodTransform<{
278
+ label: string;
279
+ url?: string | SitePathMarker;
280
+ }, {
281
+ label: string;
282
+ url: string | SitePathMarker;
283
+ } | {
284
+ label: string;
285
+ } | {
286
+ label: string;
287
+ url: string | SitePathMarker | undefined;
288
+ } | {
289
+ label: string;
290
+ url?: string | SitePathMarker | undefined;
291
+ }>>;
143
292
  project: z.ZodOptional<z.ZodObject<{
144
293
  title: z.ZodPipe<z.ZodString, z.ZodTransform<RichTextMarker, string>>;
145
294
  funder: z.ZodOptional<z.ZodString>;
@@ -160,12 +309,38 @@ declare const _default$2: zod.ZodArray<zod.ZodObject<{
160
309
  }>>;
161
310
  title: zod.ZodPipe<zod.ZodString, zod.ZodTransform<RichTextMarker, string>>;
162
311
  role: zod.ZodOptional<zod.ZodString>;
163
- institution: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodPipe<zod.ZodString, zod.ZodTransform<{
164
- name: string;
312
+ institution: zod.ZodOptional<zod.ZodPipe<zod.ZodUnion<readonly [zod.ZodPipe<zod.ZodPipe<zod.ZodString, zod.ZodTransform<string | SitePathMarker, string>>, zod.ZodTransform<{
313
+ label: string;
314
+ url: string | SitePathMarker;
315
+ }, string | SitePathMarker>>, zod.ZodPipe<zod.ZodString, zod.ZodTransform<{
316
+ label: string;
165
317
  }, string>>, zod.ZodObject<{
318
+ label: zod.ZodString;
319
+ url: zod.ZodOptional<zod.ZodPipe<zod.ZodString, zod.ZodTransform<string | SitePathMarker, string>>>;
320
+ }, zod_v4_core.$strict>, zod.ZodPipe<zod.ZodObject<{
166
321
  name: zod.ZodString;
167
322
  url: zod.ZodOptional<zod.ZodPipe<zod.ZodString, zod.ZodTransform<string | SitePathMarker, string>>>;
168
- }, zod_v4_core.$strict>]>>;
323
+ }, zod_v4_core.$strict>, zod.ZodTransform<{
324
+ label: string;
325
+ url: string | SitePathMarker | undefined;
326
+ }, {
327
+ name: string;
328
+ url?: string | SitePathMarker | undefined;
329
+ }>>]>, zod.ZodTransform<{
330
+ label: string;
331
+ url?: string | SitePathMarker;
332
+ }, {
333
+ label: string;
334
+ url: string | SitePathMarker;
335
+ } | {
336
+ label: string;
337
+ } | {
338
+ label: string;
339
+ url: string | SitePathMarker | undefined;
340
+ } | {
341
+ label: string;
342
+ url?: string | SitePathMarker | undefined;
343
+ }>>>;
169
344
  term: zod.ZodOptional<zod.ZodString>;
170
345
  url: zod.ZodOptional<zod.ZodPipe<zod.ZodString, zod.ZodTransform<string | SitePathMarker, string>>>;
171
346
  note: zod.ZodOptional<zod.ZodString>;
@@ -207,12 +382,38 @@ declare const _default: z.ZodArray<z.ZodObject<{
207
382
  ongoing: z.ZodDefault<z.ZodBoolean>;
208
383
  title: z.ZodPipe<z.ZodString, z.ZodTransform<RichTextMarker, string>>;
209
384
  degree: z.ZodOptional<z.ZodString>;
210
- institution: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<{
211
- name: string;
385
+ institution: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>, z.ZodTransform<{
386
+ label: string;
387
+ url: string | SitePathMarker;
388
+ }, string | SitePathMarker>>, z.ZodPipe<z.ZodString, z.ZodTransform<{
389
+ label: string;
212
390
  }, string>>, z.ZodObject<{
391
+ label: z.ZodString;
392
+ url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>>;
393
+ }, z.core.$strict>, z.ZodPipe<z.ZodObject<{
213
394
  name: z.ZodString;
214
395
  url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>>;
215
- }, z.core.$strict>]>>;
396
+ }, z.core.$strict>, z.ZodTransform<{
397
+ label: string;
398
+ url: string | SitePathMarker | undefined;
399
+ }, {
400
+ name: string;
401
+ url?: string | SitePathMarker | undefined;
402
+ }>>]>, z.ZodTransform<{
403
+ label: string;
404
+ url?: string | SitePathMarker;
405
+ }, {
406
+ label: string;
407
+ url: string | SitePathMarker;
408
+ } | {
409
+ label: string;
410
+ } | {
411
+ label: string;
412
+ url: string | SitePathMarker | undefined;
413
+ } | {
414
+ label: string;
415
+ url?: string | SitePathMarker | undefined;
416
+ }>>>;
216
417
  coSupervisor: z.ZodOptional<z.ZodString>;
217
418
  }, z.core.$strict>>;
218
419
 
@@ -228,22 +429,73 @@ declare const schemas: {
228
429
  to?: string | undefined;
229
430
  }>>;
230
431
  degree: z.ZodString;
231
- institution: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<{
232
- name: string;
432
+ institution: z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>, z.ZodTransform<{
433
+ label: string;
434
+ url: string | SitePathMarker;
435
+ }, string | SitePathMarker>>, z.ZodPipe<z.ZodString, z.ZodTransform<{
436
+ label: string;
233
437
  }, string>>, z.ZodObject<{
438
+ label: z.ZodString;
439
+ url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>>;
440
+ }, z.core.$strict>, z.ZodPipe<z.ZodObject<{
234
441
  name: z.ZodString;
235
442
  url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>>;
236
- }, z.core.$strict>]>;
443
+ }, z.core.$strict>, z.ZodTransform<{
444
+ label: string;
445
+ url: string | SitePathMarker | undefined;
446
+ }, {
447
+ name: string;
448
+ url?: string | SitePathMarker | undefined;
449
+ }>>]>, z.ZodTransform<{
450
+ label: string;
451
+ url?: string | SitePathMarker;
452
+ }, {
453
+ label: string;
454
+ url: string | SitePathMarker;
455
+ } | {
456
+ label: string;
457
+ } | {
458
+ label: string;
459
+ url: string | SitePathMarker | undefined;
460
+ } | {
461
+ label: string;
462
+ url?: string | SitePathMarker | undefined;
463
+ }>>;
237
464
  thesis: z.ZodOptional<z.ZodObject<{
238
465
  title: z.ZodPipe<z.ZodString, z.ZodTransform<RichTextMarker, string>>;
239
466
  type: z.ZodOptional<z.ZodString>;
240
- supervisor: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>, z.ZodTransform<{
467
+ supervisor: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>, z.ZodTransform<{
241
468
  label: string;
242
469
  url: string | SitePathMarker;
243
- }, string | SitePathMarker>>, z.ZodObject<{
470
+ }, string | SitePathMarker>>, z.ZodPipe<z.ZodString, z.ZodTransform<{
471
+ label: string;
472
+ }, string>>, z.ZodObject<{
244
473
  label: z.ZodString;
245
- url: z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>;
246
- }, z.core.$strict>]>]>>;
474
+ url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>>;
475
+ }, z.core.$strict>, z.ZodPipe<z.ZodObject<{
476
+ name: z.ZodString;
477
+ url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>>;
478
+ }, z.core.$strict>, z.ZodTransform<{
479
+ label: string;
480
+ url: string | SitePathMarker | undefined;
481
+ }, {
482
+ name: string;
483
+ url?: string | SitePathMarker | undefined;
484
+ }>>]>, z.ZodTransform<{
485
+ label: string;
486
+ url?: string | SitePathMarker;
487
+ }, {
488
+ label: string;
489
+ url: string | SitePathMarker;
490
+ } | {
491
+ label: string;
492
+ } | {
493
+ label: string;
494
+ url: string | SitePathMarker | undefined;
495
+ } | {
496
+ label: string;
497
+ url?: string | SitePathMarker | undefined;
498
+ }>>>;
247
499
  url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>>;
248
500
  }, z.core.$strict>>;
249
501
  note: z.ZodOptional<z.ZodString>;
@@ -258,12 +510,38 @@ declare const schemas: {
258
510
  to?: string | undefined;
259
511
  }>>;
260
512
  position: z.ZodString;
261
- institution: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<{
262
- name: string;
513
+ institution: z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>, z.ZodTransform<{
514
+ label: string;
515
+ url: string | SitePathMarker;
516
+ }, string | SitePathMarker>>, z.ZodPipe<z.ZodString, z.ZodTransform<{
517
+ label: string;
263
518
  }, string>>, z.ZodObject<{
519
+ label: z.ZodString;
520
+ url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>>;
521
+ }, z.core.$strict>, z.ZodPipe<z.ZodObject<{
264
522
  name: z.ZodString;
265
523
  url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>>;
266
- }, z.core.$strict>]>;
524
+ }, z.core.$strict>, z.ZodTransform<{
525
+ label: string;
526
+ url: string | SitePathMarker | undefined;
527
+ }, {
528
+ name: string;
529
+ url?: string | SitePathMarker | undefined;
530
+ }>>]>, z.ZodTransform<{
531
+ label: string;
532
+ url?: string | SitePathMarker;
533
+ }, {
534
+ label: string;
535
+ url: string | SitePathMarker;
536
+ } | {
537
+ label: string;
538
+ } | {
539
+ label: string;
540
+ url: string | SitePathMarker | undefined;
541
+ } | {
542
+ label: string;
543
+ url?: string | SitePathMarker | undefined;
544
+ }>>;
267
545
  project: z.ZodOptional<z.ZodObject<{
268
546
  title: z.ZodPipe<z.ZodString, z.ZodTransform<RichTextMarker, string>>;
269
547
  funder: z.ZodOptional<z.ZodString>;
@@ -283,12 +561,38 @@ declare const schemas: {
283
561
  }>>;
284
562
  title: z.ZodPipe<z.ZodString, z.ZodTransform<RichTextMarker, string>>;
285
563
  role: z.ZodOptional<z.ZodString>;
286
- institution: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<{
287
- name: string;
564
+ institution: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>, z.ZodTransform<{
565
+ label: string;
566
+ url: string | SitePathMarker;
567
+ }, string | SitePathMarker>>, z.ZodPipe<z.ZodString, z.ZodTransform<{
568
+ label: string;
288
569
  }, string>>, z.ZodObject<{
570
+ label: z.ZodString;
571
+ url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>>;
572
+ }, z.core.$strict>, z.ZodPipe<z.ZodObject<{
289
573
  name: z.ZodString;
290
574
  url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>>;
291
- }, z.core.$strict>]>>;
575
+ }, z.core.$strict>, z.ZodTransform<{
576
+ label: string;
577
+ url: string | SitePathMarker | undefined;
578
+ }, {
579
+ name: string;
580
+ url?: string | SitePathMarker | undefined;
581
+ }>>]>, z.ZodTransform<{
582
+ label: string;
583
+ url?: string | SitePathMarker;
584
+ }, {
585
+ label: string;
586
+ url: string | SitePathMarker;
587
+ } | {
588
+ label: string;
589
+ } | {
590
+ label: string;
591
+ url: string | SitePathMarker | undefined;
592
+ } | {
593
+ label: string;
594
+ url?: string | SitePathMarker | undefined;
595
+ }>>>;
292
596
  term: z.ZodOptional<z.ZodString>;
293
597
  url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>>;
294
598
  note: z.ZodOptional<z.ZodString>;
@@ -328,12 +632,38 @@ declare const schemas: {
328
632
  ongoing: z.ZodDefault<z.ZodBoolean>;
329
633
  title: z.ZodPipe<z.ZodString, z.ZodTransform<RichTextMarker, string>>;
330
634
  degree: z.ZodOptional<z.ZodString>;
331
- institution: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<{
332
- name: string;
635
+ institution: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>, z.ZodTransform<{
636
+ label: string;
637
+ url: string | SitePathMarker;
638
+ }, string | SitePathMarker>>, z.ZodPipe<z.ZodString, z.ZodTransform<{
639
+ label: string;
333
640
  }, string>>, z.ZodObject<{
641
+ label: z.ZodString;
642
+ url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>>;
643
+ }, z.core.$strict>, z.ZodPipe<z.ZodObject<{
334
644
  name: z.ZodString;
335
645
  url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | SitePathMarker, string>>>;
336
- }, z.core.$strict>]>>;
646
+ }, z.core.$strict>, z.ZodTransform<{
647
+ label: string;
648
+ url: string | SitePathMarker | undefined;
649
+ }, {
650
+ name: string;
651
+ url?: string | SitePathMarker | undefined;
652
+ }>>]>, z.ZodTransform<{
653
+ label: string;
654
+ url?: string | SitePathMarker;
655
+ }, {
656
+ label: string;
657
+ url: string | SitePathMarker;
658
+ } | {
659
+ label: string;
660
+ } | {
661
+ label: string;
662
+ url: string | SitePathMarker | undefined;
663
+ } | {
664
+ label: string;
665
+ url?: string | SitePathMarker | undefined;
666
+ }>>>;
337
667
  coSupervisor: z.ZodOptional<z.ZodString>;
338
668
  }, z.core.$strict>>;
339
669
  };
@@ -394,5 +724,5 @@ interface PublicationsInput {
394
724
  */
395
725
  declare function publications(input: PublicationsInput): PublicationsInput;
396
726
 
397
- export { DateRange, Visibility, VitakitContent, dateRange, _default$4 as education, _default$3 as employment, entry, extendSection, institution, link, loadContent, publications, richText, schemas, section, _default as supervision, _default$1 as talks, _default$2 as teaching, text, url, visibility };
727
+ export { DateRange, Visibility, VitakitContent, dateRange, _default$4 as education, _default$3 as employment, entry, extendSection, linked, loadContent, publications, requiredLink, richText, schemas, section, _default as supervision, _default$1 as talks, _default$2 as teaching, text, url, visibility };
398
728
  export type { BuiltinSection, LoadContentOptions, PublicationGroupConfig, PublicationsInput };
package/dist/index.mjs CHANGED
@@ -1,11 +1,13 @@
1
- export { d as dateRange, e as education, a as employment, b as entry, c as extendSection, i as institution, l as link, r as richText, s as schemas, f as section, g as supervision, t as talks, h as teaching, j as text, u as url, v as visibility } from './shared/vitakit.BxcnlFGP.mjs';
2
- export { l as loadContent, p as publications } from './shared/vitakit.CypCF-4Q.mjs';
1
+ export { d as dateRange, e as entry, l as linked, r as requiredLink, a as richText, s as section, t as text, u as url, v as visibility } from './shared/vitakit.BerUaxtF.mjs';
2
+ export { education, employment, extendSection, schemas, supervision, talks, teaching } from './chunks/schemas.mjs';
3
+ export { l as loadContent, p as publications } from './shared/vitakit.By5VWQ1n.mjs';
3
4
  export { badgePresets } from '@behackl/citation-js-extras';
4
5
  export { z } from 'zod';
5
- import 'node:fs';
6
- import 'node:path';
6
+ import './shared/vitakit.DbSeENVS.mjs';
7
7
  import 'node:url';
8
+ import './shared/vitakit.D10HyDhF.mjs';
8
9
  import 'node:fs/promises';
10
+ import 'node:path';
9
11
  import 'gray-matter';
10
12
  import 'yaml';
11
13
  import 'unified';
@@ -17,5 +19,9 @@ import 'rehype-katex';
17
19
  import 'rehype-raw';
18
20
  import 'rehype-stringify';
19
21
  import 'unist-util-visit';
22
+ import 'node:fs';
23
+ import './shared/vitakit.DQ6PmGoL.mjs';
20
24
  import 'rehype-parse';
21
25
  import 'rehype-sanitize';
26
+ import './chunks/sections.mjs';
27
+ import './shared/vitakit.TSMTC5Jl.mjs';
package/dist/nuxt.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import { defineNuxtModule, createResolver, addTemplate, addTypeTemplate, addImportsDir, addComponentsDir, addPrerenderRoutes, updateTemplates } from '@nuxt/kit';
2
2
  import { createRequire } from 'node:module';
3
- import { l as loadContent } from './shared/vitakit.CypCF-4Q.mjs';
4
- import 'node:fs/promises';
5
- import 'node:path';
3
+ import { l as loadContent } from './shared/vitakit.By5VWQ1n.mjs';
4
+ import { readdir } from 'node:fs/promises';
5
+ import { isAbsolute, resolve, relative } from 'node:path';
6
6
  import 'gray-matter';
7
7
  import 'yaml';
8
8
  import 'unified';
@@ -14,13 +14,42 @@ import 'rehype-katex';
14
14
  import 'rehype-raw';
15
15
  import 'rehype-stringify';
16
16
  import 'unist-util-visit';
17
- import './shared/vitakit.BxcnlFGP.mjs';
17
+ import './shared/vitakit.D10HyDhF.mjs';
18
18
  import 'node:fs';
19
+ import './shared/vitakit.DQ6PmGoL.mjs';
19
20
  import 'node:url';
20
- import 'zod';
21
21
  import '@behackl/citation-js-extras';
22
22
  import 'rehype-parse';
23
23
  import 'rehype-sanitize';
24
+ import './shared/vitakit.DbSeENVS.mjs';
25
+ import 'zod';
26
+ import './chunks/sections.mjs';
27
+ import './chunks/schemas.mjs';
28
+ import './shared/vitakit.BerUaxtF.mjs';
29
+ import './shared/vitakit.TSMTC5Jl.mjs';
30
+
31
+ function isWithin(directory, path) {
32
+ const child = relative(directory, path);
33
+ return child === "" || !isAbsolute(child) && child.split(/[/\\]/)[0] !== "..";
34
+ }
35
+ async function watchComponentOverrides(nuxt, packagedDir) {
36
+ const names = new Set((await readdir(packagedDir)).filter((file) => file.endsWith(".vue")).map((file) => file.slice(0, -4)));
37
+ let previous;
38
+ let restarting = false;
39
+ nuxt.hook("components:extend", async (components) => {
40
+ const overrides = new Set(components.filter((component) => names.has(component.pascalName) && isAbsolute(component.filePath) && !isWithin(packagedDir, component.filePath) && !component.filePath.replace(/\\/g, "/").split("/").includes("node_modules") && (isWithin(nuxt.options.srcDir, component.filePath) || isWithin(nuxt.options.rootDir, component.filePath))).map((component) => resolve(component.filePath)));
41
+ const before = previous;
42
+ previous = overrides;
43
+ if (!before || restarting || before.size === overrides.size && [...before].every((path) => overrides.has(path))) return;
44
+ restarting = true;
45
+ try {
46
+ await nuxt.callHook("restart");
47
+ } catch (error) {
48
+ restarting = false;
49
+ throw error;
50
+ }
51
+ });
52
+ }
24
53
 
25
54
  function katexStylesheet() {
26
55
  const renderer = createRequire(createRequire(import.meta.url).resolve("rehype-katex"));
@@ -78,6 +107,7 @@ const module$1 = defineNuxtModule({
78
107
  await addComponentsDir({ path: resolver.resolve("./runtime/components"), prefix: "Vita", pathPrefix: false });
79
108
  addPrerenderRoutes(content.pages.map((page) => page.route));
80
109
  if (!nuxt.options.dev) return;
110
+ await watchComponentOverrides(nuxt, resolver.resolve("./runtime/components"));
81
111
  nuxt.options.watch.push("../content", "../schemas");
82
112
  nuxt.hook("builder:watch", async (_event, path) => {
83
113
  if (!/[/\\](content|schemas)[/\\]/.test(path)) return;