@prosophia/personal-cv 0.0.3 → 0.0.5

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/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/components/About.tsx
2
- import styles from "@/styles/About.module.css";
2
+ import styles from "./About.module.css";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  var socialIcons = {
5
5
  scholar: "school",
@@ -60,7 +60,7 @@ function About({
60
60
  }
61
61
 
62
62
  // src/components/CVSection.tsx
63
- import styles2 from "@/styles/CVSection.module.css";
63
+ import styles2 from "./CVSection.module.css";
64
64
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
65
65
  function CVSection({
66
66
  heading,
@@ -97,7 +97,7 @@ function CVSection({
97
97
  }
98
98
 
99
99
  // src/components/Footer.tsx
100
- import styles3 from "@/styles/Footer.module.css";
100
+ import styles3 from "./Footer.module.css";
101
101
  import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
102
102
  function Footer({ footerText, email }) {
103
103
  return /* @__PURE__ */ jsx3("footer", { className: styles3.footer, children: /* @__PURE__ */ jsxs3("div", { className: styles3.content, children: [
@@ -110,11 +110,49 @@ function Footer({ footerText, email }) {
110
110
  }
111
111
 
112
112
  // src/components/Header.tsx
113
- import { useState } from "react";
113
+ import { useState as useState2 } from "react";
114
114
  import Link from "next/link";
115
- import styles4 from "@/styles/Header.module.css";
116
- import { useTheme } from "@/context/ThemeContext";
117
- import { Fragment, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
115
+ import styles4 from "./Header.module.css";
116
+
117
+ // src/context/ThemeContext.tsx
118
+ import { createContext, useContext, useEffect, useState } from "react";
119
+ import { jsx as jsx4 } from "react/jsx-runtime";
120
+ var ThemeContext = createContext({
121
+ theme: "light",
122
+ toggleTheme: () => {
123
+ },
124
+ mounted: false
125
+ });
126
+ function ThemeProvider({ children }) {
127
+ const [theme, setTheme] = useState("light");
128
+ const [mounted, setMounted] = useState(false);
129
+ useEffect(() => {
130
+ setMounted(true);
131
+ const savedTheme = localStorage.getItem("theme");
132
+ const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
133
+ if (savedTheme) {
134
+ setTheme(savedTheme);
135
+ } else if (prefersDark) {
136
+ setTheme("dark");
137
+ }
138
+ }, []);
139
+ useEffect(() => {
140
+ if (mounted) {
141
+ document.documentElement.setAttribute("data-theme", theme);
142
+ localStorage.setItem("theme", theme);
143
+ }
144
+ }, [theme, mounted]);
145
+ const toggleTheme = () => {
146
+ setTheme((prev) => prev === "light" ? "dark" : "light");
147
+ };
148
+ return /* @__PURE__ */ jsx4(ThemeContext.Provider, { value: { theme, toggleTheme, mounted }, children });
149
+ }
150
+ function useTheme() {
151
+ return useContext(ThemeContext);
152
+ }
153
+
154
+ // src/components/Header.tsx
155
+ import { Fragment, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
118
156
  function Header({
119
157
  siteName,
120
158
  navLinks,
@@ -122,7 +160,7 @@ function Header({
122
160
  contactButtonText = "Contact",
123
161
  contactEmail = ""
124
162
  }) {
125
- const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
163
+ const [mobileMenuOpen, setMobileMenuOpen] = useState2(false);
126
164
  const { theme, toggleTheme, mounted } = useTheme();
127
165
  const toggleMobileMenu = () => {
128
166
  setMobileMenuOpen(!mobileMenuOpen);
@@ -131,13 +169,13 @@ function Header({
131
169
  setMobileMenuOpen(false);
132
170
  };
133
171
  return /* @__PURE__ */ jsxs4(Fragment, { children: [
134
- /* @__PURE__ */ jsx4("header", { className: styles4.header, children: /* @__PURE__ */ jsxs4("div", { className: styles4.headerInner, children: [
172
+ /* @__PURE__ */ jsx5("header", { className: styles4.header, children: /* @__PURE__ */ jsxs4("div", { className: styles4.headerInner, children: [
135
173
  /* @__PURE__ */ jsxs4(Link, { href: "/", className: styles4.logo, children: [
136
- /* @__PURE__ */ jsx4("div", { className: styles4.logoIcon, children: /* @__PURE__ */ jsx4("span", { className: "material-symbols-outlined", children: "hexagon" }) }),
137
- /* @__PURE__ */ jsx4("h2", { className: styles4.siteName, children: siteName })
174
+ /* @__PURE__ */ jsx5("div", { className: styles4.logoIcon, children: /* @__PURE__ */ jsx5("span", { className: "material-symbols-outlined", children: "hexagon" }) }),
175
+ /* @__PURE__ */ jsx5("h2", { className: styles4.siteName, children: siteName })
138
176
  ] }),
139
177
  /* @__PURE__ */ jsxs4("div", { className: styles4.desktopNav, children: [
140
- /* @__PURE__ */ jsx4("nav", { className: styles4.navLinks, children: navLinks.map((link) => /* @__PURE__ */ jsx4(
178
+ /* @__PURE__ */ jsx5("nav", { className: styles4.navLinks, children: navLinks.map((link) => /* @__PURE__ */ jsx5(
141
179
  Link,
142
180
  {
143
181
  href: link.href,
@@ -146,47 +184,47 @@ function Header({
146
184
  },
147
185
  link.href
148
186
  )) }),
149
- mounted && /* @__PURE__ */ jsx4(
187
+ mounted && /* @__PURE__ */ jsx5(
150
188
  "button",
151
189
  {
152
190
  className: styles4.themeToggle,
153
191
  onClick: toggleTheme,
154
192
  "aria-label": `Switch to ${theme === "light" ? "dark" : "light"} mode`,
155
- children: /* @__PURE__ */ jsx4("span", { className: "material-symbols-outlined", children: theme === "light" ? "dark_mode" : "light_mode" })
193
+ children: /* @__PURE__ */ jsx5("span", { className: "material-symbols-outlined", children: theme === "light" ? "dark_mode" : "light_mode" })
156
194
  }
157
195
  ),
158
- showContactButton && contactEmail && /* @__PURE__ */ jsx4(
196
+ showContactButton && contactEmail && /* @__PURE__ */ jsx5(
159
197
  "a",
160
198
  {
161
199
  href: `mailto:${contactEmail}`,
162
200
  className: styles4.contactBtn,
163
- children: /* @__PURE__ */ jsx4("span", { children: contactButtonText })
201
+ children: /* @__PURE__ */ jsx5("span", { children: contactButtonText })
164
202
  }
165
203
  )
166
204
  ] }),
167
205
  /* @__PURE__ */ jsxs4("div", { className: styles4.mobileActions, children: [
168
- mounted && /* @__PURE__ */ jsx4(
206
+ mounted && /* @__PURE__ */ jsx5(
169
207
  "button",
170
208
  {
171
209
  className: styles4.mobileThemeToggle,
172
210
  onClick: toggleTheme,
173
211
  "aria-label": `Switch to ${theme === "light" ? "dark" : "light"} mode`,
174
- children: /* @__PURE__ */ jsx4("span", { className: "material-symbols-outlined", children: theme === "light" ? "dark_mode" : "light_mode" })
212
+ children: /* @__PURE__ */ jsx5("span", { className: "material-symbols-outlined", children: theme === "light" ? "dark_mode" : "light_mode" })
175
213
  }
176
214
  ),
177
- /* @__PURE__ */ jsx4(
215
+ /* @__PURE__ */ jsx5(
178
216
  "button",
179
217
  {
180
218
  className: styles4.mobileMenuBtn,
181
219
  onClick: toggleMobileMenu,
182
220
  "aria-label": "Toggle menu",
183
- children: /* @__PURE__ */ jsx4("span", { className: "material-symbols-outlined", children: mobileMenuOpen ? "close" : "menu" })
221
+ children: /* @__PURE__ */ jsx5("span", { className: "material-symbols-outlined", children: mobileMenuOpen ? "close" : "menu" })
184
222
  }
185
223
  )
186
224
  ] })
187
225
  ] }) }),
188
226
  /* @__PURE__ */ jsxs4("div", { className: `${styles4.mobileMenu} ${mobileMenuOpen ? styles4.open : ""}`, children: [
189
- /* @__PURE__ */ jsx4("nav", { className: styles4.mobileNavLinks, children: navLinks.map((link) => /* @__PURE__ */ jsx4(
227
+ /* @__PURE__ */ jsx5("nav", { className: styles4.mobileNavLinks, children: navLinks.map((link) => /* @__PURE__ */ jsx5(
190
228
  Link,
191
229
  {
192
230
  href: link.href,
@@ -196,7 +234,7 @@ function Header({
196
234
  },
197
235
  link.href
198
236
  )) }),
199
- showContactButton && contactEmail && /* @__PURE__ */ jsx4(
237
+ showContactButton && contactEmail && /* @__PURE__ */ jsx5(
200
238
  "a",
201
239
  {
202
240
  href: `mailto:${contactEmail}`,
@@ -208,24 +246,63 @@ function Header({
208
246
  ] });
209
247
  }
210
248
 
249
+ // src/components/HomePage.tsx
250
+ import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
251
+ var defaultNavLinks = [
252
+ { label: "About", href: "#about" },
253
+ { label: "Experience", href: "#experience" },
254
+ { label: "Projects", href: "#projects" },
255
+ { label: "Publications", href: "#publications" }
256
+ ];
257
+ function HomePage({
258
+ children,
259
+ settings = null,
260
+ header,
261
+ footer
262
+ }) {
263
+ const siteName = settings?.siteName || "My CV";
264
+ const navLinks = settings?.navLinks?.length ? settings.navLinks : defaultNavLinks;
265
+ const footerText = settings?.footerText || `\xA9 ${(/* @__PURE__ */ new Date()).getFullYear()} All rights reserved.`;
266
+ return /* @__PURE__ */ jsxs5(Fragment2, { children: [
267
+ header ?? /* @__PURE__ */ jsx6(
268
+ Header,
269
+ {
270
+ siteName,
271
+ navLinks,
272
+ showContactButton: settings?.showContactButton,
273
+ contactButtonText: settings?.contactButtonText,
274
+ contactEmail: settings?.contactEmail
275
+ }
276
+ ),
277
+ /* @__PURE__ */ jsx6("main", { children }),
278
+ footer ?? /* @__PURE__ */ jsx6(
279
+ Footer,
280
+ {
281
+ footerText,
282
+ email: settings?.contactEmail
283
+ }
284
+ )
285
+ ] });
286
+ }
287
+
211
288
  // src/components/Projects.tsx
212
289
  import Link2 from "next/link";
213
- import styles5 from "@/styles/Projects.module.css";
214
- import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
290
+ import styles5 from "./Projects.module.css";
291
+ import { Fragment as Fragment3, jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
215
292
  function Projects({
216
293
  projects,
217
294
  showViewAll = true,
218
295
  viewAllUrl = "#"
219
296
  }) {
220
- return /* @__PURE__ */ jsxs5("section", { className: styles5.projects, id: "projects", children: [
221
- /* @__PURE__ */ jsxs5("div", { className: styles5.header, children: [
222
- /* @__PURE__ */ jsx5("h2", { className: styles5.title, children: "Selected Projects" }),
223
- showViewAll && /* @__PURE__ */ jsx5(Link2, { href: viewAllUrl, className: styles5.viewAllLink, children: "View all projects" })
297
+ return /* @__PURE__ */ jsxs6("section", { className: styles5.projects, id: "projects", children: [
298
+ /* @__PURE__ */ jsxs6("div", { className: styles5.header, children: [
299
+ /* @__PURE__ */ jsx7("h2", { className: styles5.title, children: "Selected Projects" }),
300
+ showViewAll && /* @__PURE__ */ jsx7(Link2, { href: viewAllUrl, className: styles5.viewAllLink, children: "View all projects" })
224
301
  ] }),
225
- /* @__PURE__ */ jsx5("div", { className: styles5.grid, children: projects.map((project) => {
302
+ /* @__PURE__ */ jsx7("div", { className: styles5.grid, children: projects.map((project) => {
226
303
  const projectUrl = project.slug?.current ? `/projects/${project.slug.current}` : project.caseStudyUrl;
227
- const CardContent = /* @__PURE__ */ jsxs5(Fragment2, { children: [
228
- /* @__PURE__ */ jsx5("div", { className: styles5.imageWrapper, children: /* @__PURE__ */ jsx5(
304
+ const CardContent = /* @__PURE__ */ jsxs6(Fragment3, { children: [
305
+ /* @__PURE__ */ jsx7("div", { className: styles5.imageWrapper, children: /* @__PURE__ */ jsx7(
229
306
  "div",
230
307
  {
231
308
  className: styles5.image,
@@ -237,17 +314,17 @@ function Projects({
237
314
  "aria-label": project.imageAlt || project.title
238
315
  }
239
316
  ) }),
240
- /* @__PURE__ */ jsxs5("div", { className: styles5.content, children: [
241
- /* @__PURE__ */ jsx5("h3", { className: styles5.projectTitle, children: project.title }),
242
- /* @__PURE__ */ jsx5("p", { className: styles5.description, children: project.description }),
243
- /* @__PURE__ */ jsxs5("span", { className: styles5.caseStudyLink, children: [
317
+ /* @__PURE__ */ jsxs6("div", { className: styles5.content, children: [
318
+ /* @__PURE__ */ jsx7("h3", { className: styles5.projectTitle, children: project.title }),
319
+ /* @__PURE__ */ jsx7("p", { className: styles5.description, children: project.description }),
320
+ /* @__PURE__ */ jsxs6("span", { className: styles5.caseStudyLink, children: [
244
321
  "View Project",
245
322
  " ",
246
- /* @__PURE__ */ jsx5("span", { className: "material-symbols-outlined", children: "arrow_forward" })
323
+ /* @__PURE__ */ jsx7("span", { className: "material-symbols-outlined", children: "arrow_forward" })
247
324
  ] })
248
325
  ] })
249
326
  ] });
250
- return project.slug?.current ? /* @__PURE__ */ jsx5(
327
+ return project.slug?.current ? /* @__PURE__ */ jsx7(
251
328
  Link2,
252
329
  {
253
330
  href: projectUrl,
@@ -255,26 +332,26 @@ function Projects({
255
332
  children: CardContent
256
333
  },
257
334
  project._id
258
- ) : /* @__PURE__ */ jsx5("div", { className: styles5.card, children: CardContent }, project._id);
335
+ ) : /* @__PURE__ */ jsx7("div", { className: styles5.card, children: CardContent }, project._id);
259
336
  }) })
260
337
  ] });
261
338
  }
262
339
 
263
340
  // src/components/Publications.tsx
264
- import styles6 from "@/styles/Publications.module.css";
265
- import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
341
+ import styles6 from "./Publications.module.css";
342
+ import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
266
343
  function Publications({ publications }) {
267
- return /* @__PURE__ */ jsxs6("section", { className: styles6.publications, id: "publications", children: [
268
- /* @__PURE__ */ jsx6("div", { className: styles6.header, children: /* @__PURE__ */ jsx6("h2", { className: styles6.title, children: "Recent Publications" }) }),
269
- /* @__PURE__ */ jsx6("div", { className: styles6.list, children: publications.map((pub) => /* @__PURE__ */ jsxs6("div", { className: styles6.item, children: [
270
- /* @__PURE__ */ jsxs6("div", { className: styles6.itemHeader, children: [
271
- /* @__PURE__ */ jsx6("h3", { className: styles6.pubTitle, children: pub.title }),
272
- /* @__PURE__ */ jsx6("span", { className: styles6.year, children: pub.year })
344
+ return /* @__PURE__ */ jsxs7("section", { className: styles6.publications, id: "publications", children: [
345
+ /* @__PURE__ */ jsx8("div", { className: styles6.header, children: /* @__PURE__ */ jsx8("h2", { className: styles6.title, children: "Recent Publications" }) }),
346
+ /* @__PURE__ */ jsx8("div", { className: styles6.list, children: publications.map((pub) => /* @__PURE__ */ jsxs7("div", { className: styles6.item, children: [
347
+ /* @__PURE__ */ jsxs7("div", { className: styles6.itemHeader, children: [
348
+ /* @__PURE__ */ jsx8("h3", { className: styles6.pubTitle, children: pub.title }),
349
+ /* @__PURE__ */ jsx8("span", { className: styles6.year, children: pub.year })
273
350
  ] }),
274
- /* @__PURE__ */ jsx6("p", { className: styles6.authors, children: pub.authors }),
275
- /* @__PURE__ */ jsx6("p", { className: styles6.venue, children: pub.venue }),
276
- /* @__PURE__ */ jsxs6("div", { className: styles6.links, children: [
277
- pub.pdfUrl && /* @__PURE__ */ jsxs6(
351
+ /* @__PURE__ */ jsx8("p", { className: styles6.authors, children: pub.authors }),
352
+ /* @__PURE__ */ jsx8("p", { className: styles6.venue, children: pub.venue }),
353
+ /* @__PURE__ */ jsxs7("div", { className: styles6.links, children: [
354
+ pub.pdfUrl && /* @__PURE__ */ jsxs7(
278
355
  "a",
279
356
  {
280
357
  href: pub.pdfUrl,
@@ -282,12 +359,12 @@ function Publications({ publications }) {
282
359
  rel: "noopener noreferrer",
283
360
  className: styles6.linkBtn,
284
361
  children: [
285
- /* @__PURE__ */ jsx6("span", { className: "material-symbols-outlined", children: "description" }),
362
+ /* @__PURE__ */ jsx8("span", { className: "material-symbols-outlined", children: "description" }),
286
363
  "PDF"
287
364
  ]
288
365
  }
289
366
  ),
290
- pub.codeUrl && /* @__PURE__ */ jsxs6(
367
+ pub.codeUrl && /* @__PURE__ */ jsxs7(
291
368
  "a",
292
369
  {
293
370
  href: pub.codeUrl,
@@ -295,12 +372,12 @@ function Publications({ publications }) {
295
372
  rel: "noopener noreferrer",
296
373
  className: styles6.linkBtn,
297
374
  children: [
298
- /* @__PURE__ */ jsx6("span", { className: "material-symbols-outlined", children: "code" }),
375
+ /* @__PURE__ */ jsx8("span", { className: "material-symbols-outlined", children: "code" }),
299
376
  "Code"
300
377
  ]
301
378
  }
302
379
  ),
303
- pub.videoUrl && /* @__PURE__ */ jsxs6(
380
+ pub.videoUrl && /* @__PURE__ */ jsxs7(
304
381
  "a",
305
382
  {
306
383
  href: pub.videoUrl,
@@ -308,12 +385,12 @@ function Publications({ publications }) {
308
385
  rel: "noopener noreferrer",
309
386
  className: styles6.linkBtn,
310
387
  children: [
311
- /* @__PURE__ */ jsx6("span", { className: "material-symbols-outlined", children: "videocam" }),
388
+ /* @__PURE__ */ jsx8("span", { className: "material-symbols-outlined", children: "videocam" }),
312
389
  "Video"
313
390
  ]
314
391
  }
315
392
  ),
316
- pub.bibtex && /* @__PURE__ */ jsxs6(
393
+ pub.bibtex && /* @__PURE__ */ jsxs7(
317
394
  "button",
318
395
  {
319
396
  onClick: () => {
@@ -322,7 +399,7 @@ function Publications({ publications }) {
322
399
  },
323
400
  className: styles6.linkBtn,
324
401
  children: [
325
- /* @__PURE__ */ jsx6("span", { className: "material-symbols-outlined", children: "format_quote" }),
402
+ /* @__PURE__ */ jsx8("span", { className: "material-symbols-outlined", children: "format_quote" }),
326
403
  "BibTeX"
327
404
  ]
328
405
  }
@@ -331,11 +408,182 @@ function Publications({ publications }) {
331
408
  ] }, pub._id)) })
332
409
  ] });
333
410
  }
411
+
412
+ // src/config.ts
413
+ function defineConfig(config) {
414
+ return config;
415
+ }
416
+
417
+ // src/schemas/client.ts
418
+ import { createClient } from "next-sanity";
419
+
420
+ // src/schemas/env.ts
421
+ var apiVersion = process.env.NEXT_PUBLIC_SANITY_API_VERSION || "2024-01-01";
422
+ var dataset = process.env.NEXT_PUBLIC_SANITY_DATASET || "production";
423
+ var projectId = process.env.NEXT_PUBLIC_SANITY_PROJECT_ID || "";
424
+ var useCdn = false;
425
+
426
+ // src/schemas/client.ts
427
+ var client = projectId ? createClient({
428
+ projectId,
429
+ dataset,
430
+ apiVersion,
431
+ useCdn
432
+ }) : null;
433
+
434
+ // src/schemas/queries.ts
435
+ import { groq } from "next-sanity";
436
+ var siteSettingsQuery = groq`
437
+ *[_type == "siteSettings"][0] {
438
+ siteName,
439
+ siteTitle,
440
+ primaryColor,
441
+ backgroundColor,
442
+ textColor,
443
+ secondaryTextColor,
444
+ contactEmail,
445
+ footerText
446
+ }
447
+ `;
448
+ var navigationQuery = groq`
449
+ *[_type == "navigation"][0] {
450
+ links[] {
451
+ label,
452
+ href
453
+ },
454
+ showContactButton,
455
+ contactButtonText
456
+ }
457
+ `;
458
+ var aboutQuery = groq`
459
+ *[_type == "about"][0] {
460
+ name,
461
+ greeting,
462
+ title,
463
+ bio,
464
+ "profileImageUrl": profileImage.asset->url,
465
+ socialLinks[] {
466
+ platform,
467
+ url
468
+ }
469
+ }
470
+ `;
471
+ var projectsQuery = groq`
472
+ *[_type == "project" && featured == true] | order(order asc) {
473
+ _id,
474
+ title,
475
+ description,
476
+ "imageUrl": image.asset->url,
477
+ imageAlt,
478
+ caseStudyUrl,
479
+ slug
480
+ }
481
+ `;
482
+ var publicationsQuery = groq`
483
+ *[_type == "publication"] | order(year desc, order asc) {
484
+ _id,
485
+ title,
486
+ authors,
487
+ venue,
488
+ year,
489
+ pdfUrl,
490
+ codeUrl,
491
+ videoUrl,
492
+ bibtex
493
+ }
494
+ `;
495
+ var cvSectionQuery = groq`
496
+ *[_type == "cvSection"][0] {
497
+ heading,
498
+ description,
499
+ buttonText,
500
+ "cvFileUrl": cvFile.asset->url
501
+ }
502
+ `;
503
+ var projectBySlugQuery = groq`
504
+ *[_type == "project" && slug.current == $slug][0] {
505
+ _id,
506
+ title,
507
+ description,
508
+ "imageUrl": image.asset->url,
509
+ imageAlt,
510
+ caseStudyUrl,
511
+ slug
512
+ }
513
+ `;
514
+ var allProjectSlugsQuery = groq`
515
+ *[_type == "project" && defined(slug.current)][].slug.current
516
+ `;
517
+
518
+ // src/lib/sanity.ts
519
+ async function getSiteSettings() {
520
+ if (!client) return null;
521
+ return client.fetch(siteSettingsQuery);
522
+ }
523
+ async function getNavigation() {
524
+ if (!client) return null;
525
+ return client.fetch(navigationQuery);
526
+ }
527
+ async function getAbout() {
528
+ if (!client) return null;
529
+ return client.fetch(aboutQuery);
530
+ }
531
+ async function getProjects() {
532
+ if (!client) return [];
533
+ return client.fetch(projectsQuery);
534
+ }
535
+ async function getPublications() {
536
+ if (!client) return [];
537
+ return client.fetch(publicationsQuery);
538
+ }
539
+ async function getCVSection() {
540
+ if (!client) return null;
541
+ return client.fetch(cvSectionQuery);
542
+ }
543
+ async function getAllPageData() {
544
+ const [siteSettings, navigation, about, projects, publications, cvSection] = await Promise.all([
545
+ getSiteSettings(),
546
+ getNavigation(),
547
+ getAbout(),
548
+ getProjects(),
549
+ getPublications(),
550
+ getCVSection()
551
+ ]);
552
+ return {
553
+ siteSettings,
554
+ navigation,
555
+ about,
556
+ projects,
557
+ publications,
558
+ cvSection
559
+ };
560
+ }
561
+ async function getProjectBySlug(slug) {
562
+ if (!client) return null;
563
+ return client.fetch(projectBySlugQuery, { slug });
564
+ }
565
+ async function getAllProjectSlugs() {
566
+ if (!client) return [];
567
+ return client.fetch(allProjectSlugsQuery);
568
+ }
334
569
  export {
335
570
  About,
336
571
  CVSection,
337
572
  Footer,
338
573
  Header,
574
+ HomePage,
339
575
  Projects,
340
- Publications
576
+ Publications,
577
+ ThemeProvider,
578
+ defineConfig,
579
+ getAbout,
580
+ getAllPageData,
581
+ getAllProjectSlugs,
582
+ getCVSection,
583
+ getNavigation,
584
+ getProjectBySlug,
585
+ getProjects,
586
+ getPublications,
587
+ getSiteSettings,
588
+ useTheme
341
589
  };
@@ -0,0 +1,14 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { S as SiteSettings, A as About } from '../index-CZBtPfWB.mjs';
3
+
4
+ interface RootLayoutProps {
5
+ children: React.ReactNode;
6
+ settings?: SiteSettings | null;
7
+ about?: About | null;
8
+ }
9
+ /**
10
+ * Root layout component that provides theme context
11
+ */
12
+ declare function RootLayout({ children, settings, about, }: RootLayoutProps): react_jsx_runtime.JSX.Element;
13
+
14
+ export { RootLayout, type RootLayoutProps };
@@ -0,0 +1,14 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { S as SiteSettings, A as About } from '../index-CZBtPfWB.js';
3
+
4
+ interface RootLayoutProps {
5
+ children: React.ReactNode;
6
+ settings?: SiteSettings | null;
7
+ about?: About | null;
8
+ }
9
+ /**
10
+ * Root layout component that provides theme context
11
+ */
12
+ declare function RootLayout({ children, settings, about, }: RootLayoutProps): react_jsx_runtime.JSX.Element;
13
+
14
+ export { RootLayout, type RootLayoutProps };
@@ -1 +1,73 @@
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/layouts/index.ts
21
+ var layouts_exports = {};
22
+ __export(layouts_exports, {
23
+ RootLayout: () => RootLayout
24
+ });
25
+ module.exports = __toCommonJS(layouts_exports);
26
+
27
+ // src/context/ThemeContext.tsx
28
+ var import_react = require("react");
29
+ var import_jsx_runtime = require("react/jsx-runtime");
30
+ var ThemeContext = (0, import_react.createContext)({
31
+ theme: "light",
32
+ toggleTheme: () => {
33
+ },
34
+ mounted: false
35
+ });
36
+ function ThemeProvider({ children }) {
37
+ const [theme, setTheme] = (0, import_react.useState)("light");
38
+ const [mounted, setMounted] = (0, import_react.useState)(false);
39
+ (0, import_react.useEffect)(() => {
40
+ setMounted(true);
41
+ const savedTheme = localStorage.getItem("theme");
42
+ const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
43
+ if (savedTheme) {
44
+ setTheme(savedTheme);
45
+ } else if (prefersDark) {
46
+ setTheme("dark");
47
+ }
48
+ }, []);
49
+ (0, import_react.useEffect)(() => {
50
+ if (mounted) {
51
+ document.documentElement.setAttribute("data-theme", theme);
52
+ localStorage.setItem("theme", theme);
53
+ }
54
+ }, [theme, mounted]);
55
+ const toggleTheme = () => {
56
+ setTheme((prev) => prev === "light" ? "dark" : "light");
57
+ };
58
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThemeContext.Provider, { value: { theme, toggleTheme, mounted }, children });
59
+ }
60
+
61
+ // src/layouts/RootLayout.tsx
62
+ var import_jsx_runtime2 = require("react/jsx-runtime");
63
+ function RootLayout({
64
+ children,
65
+ settings = null,
66
+ about = null
67
+ }) {
68
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ThemeProvider, { children });
69
+ }
70
+ // Annotate the CommonJS export names for ESM import in node:
71
+ 0 && (module.exports = {
72
+ RootLayout
73
+ });