@prosophia/personal-cv 0.0.3 → 0.0.4

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.
@@ -1 +1,582 @@
1
1
  "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/schemas/index.ts
21
+ var schemas_exports = {};
22
+ __export(schemas_exports, {
23
+ about: () => about_default,
24
+ aboutQuery: () => aboutQuery,
25
+ allProjectSlugsQuery: () => allProjectSlugsQuery,
26
+ cvSection: () => cvSection_default,
27
+ cvSectionQuery: () => cvSectionQuery,
28
+ navigation: () => navigation_default,
29
+ navigationQuery: () => navigationQuery,
30
+ project: () => project_default,
31
+ projectBySlugQuery: () => projectBySlugQuery,
32
+ projectsQuery: () => projectsQuery,
33
+ publication: () => publication_default,
34
+ publicationsQuery: () => publicationsQuery,
35
+ schemaTypes: () => schemaTypes,
36
+ schemas: () => schemas,
37
+ siteSettings: () => siteSettings_default,
38
+ siteSettingsQuery: () => siteSettingsQuery
39
+ });
40
+ module.exports = __toCommonJS(schemas_exports);
41
+
42
+ // src/schemas/schemas/siteSettings.ts
43
+ var import_sanity = require("sanity");
44
+ var siteSettings_default = (0, import_sanity.defineType)({
45
+ name: "siteSettings",
46
+ title: "Site Settings",
47
+ type: "document",
48
+ fields: [
49
+ (0, import_sanity.defineField)({
50
+ name: "siteName",
51
+ title: "Site Name",
52
+ type: "string",
53
+ validation: (Rule) => Rule.required()
54
+ }),
55
+ (0, import_sanity.defineField)({
56
+ name: "siteTitle",
57
+ title: "Site Title (Browser Tab)",
58
+ type: "string",
59
+ validation: (Rule) => Rule.required()
60
+ }),
61
+ (0, import_sanity.defineField)({
62
+ name: "primaryColor",
63
+ title: "Primary Color",
64
+ type: "string",
65
+ description: "Main accent color (hex code, e.g., #000000)",
66
+ validation: (Rule) => Rule.required().regex(/^#[0-9A-Fa-f]{6}$/, "Must be a valid hex color")
67
+ }),
68
+ (0, import_sanity.defineField)({
69
+ name: "backgroundColor",
70
+ title: "Background Color",
71
+ type: "string",
72
+ description: "Main background color (hex code, e.g., #ffffff)",
73
+ validation: (Rule) => Rule.required().regex(/^#[0-9A-Fa-f]{6}$/, "Must be a valid hex color")
74
+ }),
75
+ (0, import_sanity.defineField)({
76
+ name: "textColor",
77
+ title: "Text Color",
78
+ type: "string",
79
+ description: "Main text color (hex code, e.g., #111418)",
80
+ validation: (Rule) => Rule.required().regex(/^#[0-9A-Fa-f]{6}$/, "Must be a valid hex color")
81
+ }),
82
+ (0, import_sanity.defineField)({
83
+ name: "secondaryTextColor",
84
+ title: "Secondary Text Color",
85
+ type: "string",
86
+ description: "Secondary/muted text color (hex code, e.g., #637588)",
87
+ validation: (Rule) => Rule.required().regex(/^#[0-9A-Fa-f]{6}$/, "Must be a valid hex color")
88
+ }),
89
+ (0, import_sanity.defineField)({
90
+ name: "contactEmail",
91
+ title: "Contact Email",
92
+ type: "string",
93
+ validation: (Rule) => Rule.email()
94
+ }),
95
+ (0, import_sanity.defineField)({
96
+ name: "footerText",
97
+ title: "Footer Text",
98
+ type: "string"
99
+ })
100
+ ],
101
+ preview: {
102
+ prepare() {
103
+ return {
104
+ title: "Site Settings"
105
+ };
106
+ }
107
+ }
108
+ });
109
+
110
+ // src/schemas/schemas/about.ts
111
+ var import_sanity2 = require("sanity");
112
+ var about_default = (0, import_sanity2.defineType)({
113
+ name: "about",
114
+ title: "About Section",
115
+ type: "document",
116
+ fields: [
117
+ (0, import_sanity2.defineField)({
118
+ name: "name",
119
+ title: "Full Name",
120
+ type: "string",
121
+ validation: (Rule) => Rule.required()
122
+ }),
123
+ (0, import_sanity2.defineField)({
124
+ name: "greeting",
125
+ title: "Greeting",
126
+ type: "string",
127
+ description: `e.g., "Hello, I'm Jane Doe."`,
128
+ validation: (Rule) => Rule.required()
129
+ }),
130
+ (0, import_sanity2.defineField)({
131
+ name: "title",
132
+ title: "Professional Title",
133
+ type: "string",
134
+ description: 'e.g., "PhD Candidate at MIT focusing on Human-Computer Interaction."',
135
+ validation: (Rule) => Rule.required()
136
+ }),
137
+ (0, import_sanity2.defineField)({
138
+ name: "bio",
139
+ title: "Bio",
140
+ type: "text",
141
+ description: "A longer description of your research interests and background.",
142
+ validation: (Rule) => Rule.required()
143
+ }),
144
+ (0, import_sanity2.defineField)({
145
+ name: "profileImage",
146
+ title: "Profile Image",
147
+ type: "image",
148
+ options: {
149
+ hotspot: true
150
+ }
151
+ }),
152
+ (0, import_sanity2.defineField)({
153
+ name: "socialLinks",
154
+ title: "Social Links",
155
+ type: "array",
156
+ of: [
157
+ {
158
+ type: "object",
159
+ fields: [
160
+ (0, import_sanity2.defineField)({
161
+ name: "platform",
162
+ title: "Platform",
163
+ type: "string",
164
+ options: {
165
+ list: [
166
+ { title: "Google Scholar", value: "scholar" },
167
+ { title: "LinkedIn", value: "linkedin" },
168
+ { title: "Twitter/X", value: "twitter" },
169
+ { title: "GitHub", value: "github" },
170
+ { title: "ORCID", value: "orcid" },
171
+ { title: "ResearchGate", value: "researchgate" }
172
+ ]
173
+ },
174
+ validation: (Rule) => Rule.required()
175
+ }),
176
+ (0, import_sanity2.defineField)({
177
+ name: "url",
178
+ title: "URL",
179
+ type: "url",
180
+ validation: (Rule) => Rule.required()
181
+ })
182
+ ],
183
+ preview: {
184
+ select: {
185
+ title: "platform",
186
+ subtitle: "url"
187
+ }
188
+ }
189
+ }
190
+ ]
191
+ })
192
+ ],
193
+ preview: {
194
+ select: {
195
+ title: "name",
196
+ media: "profileImage"
197
+ }
198
+ }
199
+ });
200
+
201
+ // src/schemas/schemas/project.ts
202
+ var import_sanity3 = require("sanity");
203
+ var project_default = (0, import_sanity3.defineType)({
204
+ name: "project",
205
+ title: "Project",
206
+ type: "document",
207
+ fields: [
208
+ (0, import_sanity3.defineField)({
209
+ name: "title",
210
+ title: "Title",
211
+ type: "string",
212
+ validation: (Rule) => Rule.required()
213
+ }),
214
+ (0, import_sanity3.defineField)({
215
+ name: "slug",
216
+ title: "Slug",
217
+ type: "slug",
218
+ options: {
219
+ source: "title",
220
+ maxLength: 96
221
+ },
222
+ validation: (Rule) => Rule.required()
223
+ }),
224
+ (0, import_sanity3.defineField)({
225
+ name: "description",
226
+ title: "Short Description",
227
+ type: "text",
228
+ rows: 3,
229
+ validation: (Rule) => Rule.required()
230
+ }),
231
+ (0, import_sanity3.defineField)({
232
+ name: "image",
233
+ title: "Cover Image",
234
+ type: "image",
235
+ options: {
236
+ hotspot: true
237
+ }
238
+ }),
239
+ (0, import_sanity3.defineField)({
240
+ name: "imageAlt",
241
+ title: "Image Alt Text",
242
+ type: "string",
243
+ description: "Describe the image for accessibility"
244
+ }),
245
+ (0, import_sanity3.defineField)({
246
+ name: "caseStudyUrl",
247
+ title: "Case Study URL",
248
+ type: "url",
249
+ description: "Link to the full case study (optional)"
250
+ }),
251
+ (0, import_sanity3.defineField)({
252
+ name: "order",
253
+ title: "Display Order",
254
+ type: "number",
255
+ description: "Lower numbers appear first"
256
+ }),
257
+ (0, import_sanity3.defineField)({
258
+ name: "featured",
259
+ title: "Featured",
260
+ type: "boolean",
261
+ description: "Show this project on the homepage",
262
+ initialValue: true
263
+ })
264
+ ],
265
+ orderings: [
266
+ {
267
+ title: "Display Order",
268
+ name: "orderAsc",
269
+ by: [{ field: "order", direction: "asc" }]
270
+ }
271
+ ],
272
+ preview: {
273
+ select: {
274
+ title: "title",
275
+ media: "image"
276
+ }
277
+ }
278
+ });
279
+
280
+ // src/schemas/schemas/publication.ts
281
+ var import_sanity4 = require("sanity");
282
+ var publication_default = (0, import_sanity4.defineType)({
283
+ name: "publication",
284
+ title: "Publication",
285
+ type: "document",
286
+ fields: [
287
+ (0, import_sanity4.defineField)({
288
+ name: "title",
289
+ title: "Title",
290
+ type: "string",
291
+ validation: (Rule) => Rule.required()
292
+ }),
293
+ (0, import_sanity4.defineField)({
294
+ name: "authors",
295
+ title: "Authors",
296
+ type: "string",
297
+ description: 'e.g., "Jane Doe, John Smith, Alice Johnson"',
298
+ validation: (Rule) => Rule.required()
299
+ }),
300
+ (0, import_sanity4.defineField)({
301
+ name: "venue",
302
+ title: "Venue/Journal",
303
+ type: "string",
304
+ description: 'e.g., "Proceedings of the CHI Conference on Human Factors in Computing Systems"',
305
+ validation: (Rule) => Rule.required()
306
+ }),
307
+ (0, import_sanity4.defineField)({
308
+ name: "year",
309
+ title: "Year",
310
+ type: "number",
311
+ validation: (Rule) => Rule.required().min(1900).max(2100)
312
+ }),
313
+ (0, import_sanity4.defineField)({
314
+ name: "pdfUrl",
315
+ title: "PDF URL",
316
+ type: "url"
317
+ }),
318
+ (0, import_sanity4.defineField)({
319
+ name: "codeUrl",
320
+ title: "Code URL",
321
+ type: "url"
322
+ }),
323
+ (0, import_sanity4.defineField)({
324
+ name: "videoUrl",
325
+ title: "Video URL",
326
+ type: "url"
327
+ }),
328
+ (0, import_sanity4.defineField)({
329
+ name: "bibtex",
330
+ title: "BibTeX",
331
+ type: "text",
332
+ rows: 6
333
+ }),
334
+ (0, import_sanity4.defineField)({
335
+ name: "order",
336
+ title: "Display Order",
337
+ type: "number",
338
+ description: "Lower numbers appear first (default: sort by year)"
339
+ })
340
+ ],
341
+ orderings: [
342
+ {
343
+ title: "Year (Newest First)",
344
+ name: "yearDesc",
345
+ by: [{ field: "year", direction: "desc" }]
346
+ },
347
+ {
348
+ title: "Display Order",
349
+ name: "orderAsc",
350
+ by: [{ field: "order", direction: "asc" }]
351
+ }
352
+ ],
353
+ preview: {
354
+ select: {
355
+ title: "title",
356
+ subtitle: "year"
357
+ },
358
+ prepare({ title, subtitle }) {
359
+ return {
360
+ title,
361
+ subtitle: subtitle?.toString()
362
+ };
363
+ }
364
+ }
365
+ });
366
+
367
+ // src/schemas/schemas/cvSection.ts
368
+ var import_sanity5 = require("sanity");
369
+ var cvSection_default = (0, import_sanity5.defineType)({
370
+ name: "cvSection",
371
+ title: "CV Section",
372
+ type: "document",
373
+ fields: [
374
+ (0, import_sanity5.defineField)({
375
+ name: "heading",
376
+ title: "Heading",
377
+ type: "string",
378
+ validation: (Rule) => Rule.required()
379
+ }),
380
+ (0, import_sanity5.defineField)({
381
+ name: "description",
382
+ title: "Description",
383
+ type: "text",
384
+ rows: 3
385
+ }),
386
+ (0, import_sanity5.defineField)({
387
+ name: "cvFile",
388
+ title: "CV File (PDF)",
389
+ type: "file",
390
+ options: {
391
+ accept: ".pdf"
392
+ }
393
+ }),
394
+ (0, import_sanity5.defineField)({
395
+ name: "buttonText",
396
+ title: "Button Text",
397
+ type: "string",
398
+ initialValue: "Download Full CV"
399
+ })
400
+ ],
401
+ preview: {
402
+ prepare() {
403
+ return {
404
+ title: "CV Section"
405
+ };
406
+ }
407
+ }
408
+ });
409
+
410
+ // src/schemas/schemas/navigation.ts
411
+ var import_sanity6 = require("sanity");
412
+ var navigation_default = (0, import_sanity6.defineType)({
413
+ name: "navigation",
414
+ title: "Navigation",
415
+ type: "document",
416
+ fields: [
417
+ (0, import_sanity6.defineField)({
418
+ name: "links",
419
+ title: "Navigation Links",
420
+ type: "array",
421
+ of: [
422
+ {
423
+ type: "object",
424
+ fields: [
425
+ (0, import_sanity6.defineField)({
426
+ name: "label",
427
+ title: "Label",
428
+ type: "string",
429
+ validation: (Rule) => Rule.required()
430
+ }),
431
+ (0, import_sanity6.defineField)({
432
+ name: "href",
433
+ title: "Link",
434
+ type: "string",
435
+ description: "e.g., #about, #projects, /some-page",
436
+ validation: (Rule) => Rule.required()
437
+ })
438
+ ],
439
+ preview: {
440
+ select: {
441
+ title: "label",
442
+ subtitle: "href"
443
+ }
444
+ }
445
+ }
446
+ ]
447
+ }),
448
+ (0, import_sanity6.defineField)({
449
+ name: "showContactButton",
450
+ title: "Show Contact Button",
451
+ type: "boolean",
452
+ initialValue: true
453
+ }),
454
+ (0, import_sanity6.defineField)({
455
+ name: "contactButtonText",
456
+ title: "Contact Button Text",
457
+ type: "string",
458
+ initialValue: "Contact"
459
+ })
460
+ ],
461
+ preview: {
462
+ prepare() {
463
+ return {
464
+ title: "Navigation"
465
+ };
466
+ }
467
+ }
468
+ });
469
+
470
+ // src/schemas/queries.ts
471
+ var import_next_sanity = require("next-sanity");
472
+ var siteSettingsQuery = import_next_sanity.groq`
473
+ *[_type == "siteSettings"][0] {
474
+ siteName,
475
+ siteTitle,
476
+ primaryColor,
477
+ backgroundColor,
478
+ textColor,
479
+ secondaryTextColor,
480
+ contactEmail,
481
+ footerText
482
+ }
483
+ `;
484
+ var navigationQuery = import_next_sanity.groq`
485
+ *[_type == "navigation"][0] {
486
+ links[] {
487
+ label,
488
+ href
489
+ },
490
+ showContactButton,
491
+ contactButtonText
492
+ }
493
+ `;
494
+ var aboutQuery = import_next_sanity.groq`
495
+ *[_type == "about"][0] {
496
+ name,
497
+ greeting,
498
+ title,
499
+ bio,
500
+ "profileImageUrl": profileImage.asset->url,
501
+ socialLinks[] {
502
+ platform,
503
+ url
504
+ }
505
+ }
506
+ `;
507
+ var projectsQuery = import_next_sanity.groq`
508
+ *[_type == "project" && featured == true] | order(order asc) {
509
+ _id,
510
+ title,
511
+ description,
512
+ "imageUrl": image.asset->url,
513
+ imageAlt,
514
+ caseStudyUrl,
515
+ slug
516
+ }
517
+ `;
518
+ var publicationsQuery = import_next_sanity.groq`
519
+ *[_type == "publication"] | order(year desc, order asc) {
520
+ _id,
521
+ title,
522
+ authors,
523
+ venue,
524
+ year,
525
+ pdfUrl,
526
+ codeUrl,
527
+ videoUrl,
528
+ bibtex
529
+ }
530
+ `;
531
+ var cvSectionQuery = import_next_sanity.groq`
532
+ *[_type == "cvSection"][0] {
533
+ heading,
534
+ description,
535
+ buttonText,
536
+ "cvFileUrl": cvFile.asset->url
537
+ }
538
+ `;
539
+ var projectBySlugQuery = import_next_sanity.groq`
540
+ *[_type == "project" && slug.current == $slug][0] {
541
+ _id,
542
+ title,
543
+ description,
544
+ "imageUrl": image.asset->url,
545
+ imageAlt,
546
+ caseStudyUrl,
547
+ slug
548
+ }
549
+ `;
550
+ var allProjectSlugsQuery = import_next_sanity.groq`
551
+ *[_type == "project" && defined(slug.current)][].slug.current
552
+ `;
553
+
554
+ // src/schemas/index.ts
555
+ var schemas = [
556
+ siteSettings_default,
557
+ about_default,
558
+ project_default,
559
+ publication_default,
560
+ cvSection_default,
561
+ navigation_default
562
+ ];
563
+ var schemaTypes = schemas;
564
+ // Annotate the CommonJS export names for ESM import in node:
565
+ 0 && (module.exports = {
566
+ about,
567
+ aboutQuery,
568
+ allProjectSlugsQuery,
569
+ cvSection,
570
+ cvSectionQuery,
571
+ navigation,
572
+ navigationQuery,
573
+ project,
574
+ projectBySlugQuery,
575
+ projectsQuery,
576
+ publication,
577
+ publicationsQuery,
578
+ schemaTypes,
579
+ schemas,
580
+ siteSettings,
581
+ siteSettingsQuery
582
+ });