devfolio-page 0.2.2 → 0.2.3
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.
|
@@ -96,8 +96,8 @@ const contentSectionSchema = z.discriminatedUnion('type', [
|
|
|
96
96
|
const simpleProjectSchema = z.object({
|
|
97
97
|
name: z.string().min(1, 'Project name is required'),
|
|
98
98
|
url: urlString.optional(),
|
|
99
|
-
description: z.string().
|
|
100
|
-
tags: z.array(z.string()).
|
|
99
|
+
description: z.string().optional(),
|
|
100
|
+
tags: z.array(z.string()).optional(),
|
|
101
101
|
featured: z.boolean().optional(),
|
|
102
102
|
});
|
|
103
103
|
// Rich project schema (for case studies)
|
|
@@ -109,10 +109,10 @@ const richProjectSchema = z.object({
|
|
|
109
109
|
thumbnail: urlOrPath.optional(),
|
|
110
110
|
hero: urlOrPath.optional(),
|
|
111
111
|
meta: z.object({
|
|
112
|
-
year: z.union([z.string(), z.number()]),
|
|
113
|
-
role: z.string().
|
|
112
|
+
year: z.union([z.string(), z.number()]).optional(),
|
|
113
|
+
role: z.string().optional(),
|
|
114
114
|
timeline: z.string().optional(),
|
|
115
|
-
tech: z.array(z.string()).
|
|
115
|
+
tech: z.array(z.string()).optional(),
|
|
116
116
|
links: z
|
|
117
117
|
.object({
|
|
118
118
|
github: urlString.optional(),
|
|
@@ -121,30 +121,30 @@ const richProjectSchema = z.object({
|
|
|
121
121
|
case_study: urlString.optional(),
|
|
122
122
|
})
|
|
123
123
|
.optional(),
|
|
124
|
-
}),
|
|
125
|
-
sections: z.array(contentSectionSchema).
|
|
124
|
+
}).optional(),
|
|
125
|
+
sections: z.array(contentSectionSchema).optional(),
|
|
126
126
|
});
|
|
127
127
|
// =============================================================================
|
|
128
128
|
// Experience & Education Schemas
|
|
129
129
|
// =============================================================================
|
|
130
130
|
const experienceSchema = z.object({
|
|
131
131
|
company: z.string().min(1, 'Company name is required'),
|
|
132
|
-
role: z.string().
|
|
132
|
+
role: z.string().optional(),
|
|
133
133
|
date: z.object({
|
|
134
|
-
start: dateFormat,
|
|
135
|
-
end: dateOrPresent,
|
|
136
|
-
}),
|
|
134
|
+
start: dateFormat.optional(),
|
|
135
|
+
end: dateOrPresent.optional(),
|
|
136
|
+
}).optional(),
|
|
137
137
|
location: z.string().optional(),
|
|
138
138
|
description: z.string().optional(),
|
|
139
|
-
highlights: z.array(z.string()).
|
|
139
|
+
highlights: z.array(z.string()).optional(),
|
|
140
140
|
});
|
|
141
141
|
const educationSchema = z.object({
|
|
142
142
|
institution: z.string().min(1, 'Institution name is required'),
|
|
143
|
-
degree: z.string().
|
|
143
|
+
degree: z.string().optional(),
|
|
144
144
|
date: z.object({
|
|
145
|
-
start: dateFormat,
|
|
146
|
-
end: dateFormat,
|
|
147
|
-
}),
|
|
145
|
+
start: dateFormat.optional(),
|
|
146
|
+
end: dateFormat.optional(),
|
|
147
|
+
}).optional(),
|
|
148
148
|
location: z.string().optional(),
|
|
149
149
|
description: z.string().optional(),
|
|
150
150
|
highlights: z.array(z.string()).optional(),
|
|
@@ -172,9 +172,9 @@ const richSkillsSchema = z.object({
|
|
|
172
172
|
// =============================================================================
|
|
173
173
|
const writingSchema = z.object({
|
|
174
174
|
title: z.string().min(1, 'Article title is required'),
|
|
175
|
-
url: urlString,
|
|
176
|
-
date: dateFormat,
|
|
177
|
-
description: z.string().optional(),
|
|
175
|
+
url: urlString.optional(),
|
|
176
|
+
date: dateFormat.optional(),
|
|
177
|
+
description: z.string().optional(),
|
|
178
178
|
excerpt: z.string().optional(),
|
|
179
179
|
cover: urlOrPath.optional(),
|
|
180
180
|
publication: z.string().optional(),
|
|
@@ -186,23 +186,23 @@ const writingSchema = z.object({
|
|
|
186
186
|
// =============================================================================
|
|
187
187
|
const experimentSchema = z.object({
|
|
188
188
|
title: z.string().min(1, 'Experiment title is required'),
|
|
189
|
-
description: z.string().
|
|
189
|
+
description: z.string().optional(),
|
|
190
190
|
image: urlOrPath.optional(),
|
|
191
191
|
github: urlString.optional(),
|
|
192
192
|
demo: urlString.optional(),
|
|
193
|
-
tags: z.array(z.string()).
|
|
193
|
+
tags: z.array(z.string()).optional(),
|
|
194
194
|
});
|
|
195
195
|
const testimonialSchema = z.object({
|
|
196
196
|
quote: z.string().min(1, 'Quote is required'),
|
|
197
|
-
author: z.string().
|
|
197
|
+
author: z.string().optional(),
|
|
198
198
|
company: z.string().optional(),
|
|
199
199
|
role: z.string().optional(),
|
|
200
200
|
image: urlOrPath.optional(),
|
|
201
201
|
});
|
|
202
202
|
const timelineItemSchema = z.object({
|
|
203
|
-
year: z.union([z.string(), z.number()]),
|
|
203
|
+
year: z.union([z.string(), z.number()]).optional(),
|
|
204
204
|
title: z.string().min(1, 'Timeline item title is required'),
|
|
205
|
-
description: z.string().
|
|
205
|
+
description: z.string().optional(),
|
|
206
206
|
image: urlOrPath.optional(),
|
|
207
207
|
});
|
|
208
208
|
// =============================================================================
|
|
@@ -227,28 +227,28 @@ export const portfolioSchema = z.object({
|
|
|
227
227
|
// Core metadata
|
|
228
228
|
meta: z.object({
|
|
229
229
|
name: z.string().min(1, 'Name is required'),
|
|
230
|
-
title: z.string().
|
|
230
|
+
title: z.string().optional(),
|
|
231
231
|
tagline: z.string().optional(),
|
|
232
|
-
location: z.string().
|
|
232
|
+
location: z.string().optional(),
|
|
233
233
|
timezone: z.string().optional(),
|
|
234
234
|
avatar: urlOrPath.optional(),
|
|
235
235
|
hero_image: urlOrPath.optional(),
|
|
236
236
|
}),
|
|
237
237
|
// Contact information
|
|
238
238
|
contact: z.object({
|
|
239
|
-
email: z.string().email('Must be a valid email address'),
|
|
239
|
+
email: z.string().email('Must be a valid email address').optional(),
|
|
240
240
|
website: urlString.optional(),
|
|
241
241
|
github: z.string().optional(),
|
|
242
242
|
linkedin: z.string().optional(),
|
|
243
243
|
twitter: z.string().optional(),
|
|
244
|
-
}),
|
|
245
|
-
// Bio
|
|
246
|
-
bio: z.string().
|
|
244
|
+
}).optional(),
|
|
245
|
+
// Bio
|
|
246
|
+
bio: z.string().optional(),
|
|
247
247
|
// Extended about section (optional)
|
|
248
248
|
about: z
|
|
249
249
|
.object({
|
|
250
|
-
short: z.string().
|
|
251
|
-
long: z.string().
|
|
250
|
+
short: z.string().optional(),
|
|
251
|
+
long: z.string().optional(),
|
|
252
252
|
})
|
|
253
253
|
.optional(),
|
|
254
254
|
// Sections (backwards compatible structure)
|
|
@@ -258,7 +258,7 @@ export const portfolioSchema = z.object({
|
|
|
258
258
|
skills: simpleSkillsSchema.optional(),
|
|
259
259
|
writing: z.array(writingSchema).optional(),
|
|
260
260
|
education: z.array(educationSchema).optional(),
|
|
261
|
-
}),
|
|
261
|
+
}).optional(),
|
|
262
262
|
// Rich projects (new structure for case studies)
|
|
263
263
|
projects: z.array(richProjectSchema).optional(),
|
|
264
264
|
// New content types
|