@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.
@@ -0,0 +1,46 @@
1
+ // src/context/ThemeContext.tsx
2
+ import { createContext, useContext, useEffect, useState } from "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+ var ThemeContext = createContext({
5
+ theme: "light",
6
+ toggleTheme: () => {
7
+ },
8
+ mounted: false
9
+ });
10
+ function ThemeProvider({ children }) {
11
+ const [theme, setTheme] = useState("light");
12
+ const [mounted, setMounted] = useState(false);
13
+ useEffect(() => {
14
+ setMounted(true);
15
+ const savedTheme = localStorage.getItem("theme");
16
+ const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
17
+ if (savedTheme) {
18
+ setTheme(savedTheme);
19
+ } else if (prefersDark) {
20
+ setTheme("dark");
21
+ }
22
+ }, []);
23
+ useEffect(() => {
24
+ if (mounted) {
25
+ document.documentElement.setAttribute("data-theme", theme);
26
+ localStorage.setItem("theme", theme);
27
+ }
28
+ }, [theme, mounted]);
29
+ const toggleTheme = () => {
30
+ setTheme((prev) => prev === "light" ? "dark" : "light");
31
+ };
32
+ return /* @__PURE__ */ jsx(ThemeContext.Provider, { value: { theme, toggleTheme, mounted }, children });
33
+ }
34
+
35
+ // src/layouts/RootLayout.tsx
36
+ import { jsx as jsx2 } from "react/jsx-runtime";
37
+ function RootLayout({
38
+ children,
39
+ settings = null,
40
+ about = null
41
+ }) {
42
+ return /* @__PURE__ */ jsx2(ThemeProvider, { children });
43
+ }
44
+ export {
45
+ RootLayout
46
+ };
@@ -0,0 +1,144 @@
1
+ import * as sanity from 'sanity';
2
+
3
+ declare const _default$5: {
4
+ type: "document";
5
+ name: "siteSettings";
6
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
7
+ preview?: sanity.PreviewConfig<Record<string, string>, Record<never, any>> | undefined;
8
+ };
9
+
10
+ declare const _default$4: {
11
+ type: "document";
12
+ name: "about";
13
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
14
+ preview?: sanity.PreviewConfig<{
15
+ title: string;
16
+ media: string;
17
+ }, Record<"title" | "media", any>> | undefined;
18
+ };
19
+
20
+ declare const _default$3: {
21
+ type: "document";
22
+ name: "project";
23
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
24
+ preview?: sanity.PreviewConfig<{
25
+ title: string;
26
+ media: string;
27
+ }, Record<"title" | "media", any>> | undefined;
28
+ };
29
+
30
+ declare const _default$2: {
31
+ type: "document";
32
+ name: "publication";
33
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
34
+ preview?: sanity.PreviewConfig<{
35
+ title: string;
36
+ subtitle: string;
37
+ }, Record<"title" | "subtitle", any>> | undefined;
38
+ };
39
+
40
+ declare const _default$1: {
41
+ type: "document";
42
+ name: "cvSection";
43
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
44
+ preview?: sanity.PreviewConfig<Record<string, string>, Record<never, any>> | undefined;
45
+ };
46
+
47
+ declare const _default: {
48
+ type: "document";
49
+ name: "navigation";
50
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
51
+ preview?: sanity.PreviewConfig<Record<string, string>, Record<never, any>> | undefined;
52
+ };
53
+
54
+ declare const siteSettingsQuery: string;
55
+ declare const navigationQuery: string;
56
+ declare const aboutQuery: string;
57
+ declare const projectsQuery: string;
58
+ declare const publicationsQuery: string;
59
+ declare const cvSectionQuery: string;
60
+ declare const projectBySlugQuery: string;
61
+ declare const allProjectSlugsQuery: string;
62
+
63
+ declare const schemas: (({
64
+ type: "document";
65
+ name: "siteSettings";
66
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
67
+ preview?: sanity.PreviewConfig<Record<string, string>, Record<never, any>> | undefined;
68
+ }) | ({
69
+ type: "document";
70
+ name: "about";
71
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
72
+ preview?: sanity.PreviewConfig<{
73
+ title: string;
74
+ media: string;
75
+ }, Record<"title" | "media", any>> | undefined;
76
+ }) | ({
77
+ type: "document";
78
+ name: "project";
79
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
80
+ preview?: sanity.PreviewConfig<{
81
+ title: string;
82
+ media: string;
83
+ }, Record<"title" | "media", any>> | undefined;
84
+ }) | ({
85
+ type: "document";
86
+ name: "publication";
87
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
88
+ preview?: sanity.PreviewConfig<{
89
+ title: string;
90
+ subtitle: string;
91
+ }, Record<"title" | "subtitle", any>> | undefined;
92
+ }) | ({
93
+ type: "document";
94
+ name: "cvSection";
95
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
96
+ preview?: sanity.PreviewConfig<Record<string, string>, Record<never, any>> | undefined;
97
+ }) | ({
98
+ type: "document";
99
+ name: "navigation";
100
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
101
+ preview?: sanity.PreviewConfig<Record<string, string>, Record<never, any>> | undefined;
102
+ }))[];
103
+ declare const schemaTypes: (({
104
+ type: "document";
105
+ name: "siteSettings";
106
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
107
+ preview?: sanity.PreviewConfig<Record<string, string>, Record<never, any>> | undefined;
108
+ }) | ({
109
+ type: "document";
110
+ name: "about";
111
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
112
+ preview?: sanity.PreviewConfig<{
113
+ title: string;
114
+ media: string;
115
+ }, Record<"title" | "media", any>> | undefined;
116
+ }) | ({
117
+ type: "document";
118
+ name: "project";
119
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
120
+ preview?: sanity.PreviewConfig<{
121
+ title: string;
122
+ media: string;
123
+ }, Record<"title" | "media", any>> | undefined;
124
+ }) | ({
125
+ type: "document";
126
+ name: "publication";
127
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
128
+ preview?: sanity.PreviewConfig<{
129
+ title: string;
130
+ subtitle: string;
131
+ }, Record<"title" | "subtitle", any>> | undefined;
132
+ }) | ({
133
+ type: "document";
134
+ name: "cvSection";
135
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
136
+ preview?: sanity.PreviewConfig<Record<string, string>, Record<never, any>> | undefined;
137
+ }) | ({
138
+ type: "document";
139
+ name: "navigation";
140
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
141
+ preview?: sanity.PreviewConfig<Record<string, string>, Record<never, any>> | undefined;
142
+ }))[];
143
+
144
+ export { _default$4 as about, aboutQuery, allProjectSlugsQuery, _default$1 as cvSection, cvSectionQuery, _default as navigation, navigationQuery, _default$3 as project, projectBySlugQuery, projectsQuery, _default$2 as publication, publicationsQuery, schemaTypes, schemas, _default$5 as siteSettings, siteSettingsQuery };
@@ -0,0 +1,144 @@
1
+ import * as sanity from 'sanity';
2
+
3
+ declare const _default$5: {
4
+ type: "document";
5
+ name: "siteSettings";
6
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
7
+ preview?: sanity.PreviewConfig<Record<string, string>, Record<never, any>> | undefined;
8
+ };
9
+
10
+ declare const _default$4: {
11
+ type: "document";
12
+ name: "about";
13
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
14
+ preview?: sanity.PreviewConfig<{
15
+ title: string;
16
+ media: string;
17
+ }, Record<"title" | "media", any>> | undefined;
18
+ };
19
+
20
+ declare const _default$3: {
21
+ type: "document";
22
+ name: "project";
23
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
24
+ preview?: sanity.PreviewConfig<{
25
+ title: string;
26
+ media: string;
27
+ }, Record<"title" | "media", any>> | undefined;
28
+ };
29
+
30
+ declare const _default$2: {
31
+ type: "document";
32
+ name: "publication";
33
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
34
+ preview?: sanity.PreviewConfig<{
35
+ title: string;
36
+ subtitle: string;
37
+ }, Record<"title" | "subtitle", any>> | undefined;
38
+ };
39
+
40
+ declare const _default$1: {
41
+ type: "document";
42
+ name: "cvSection";
43
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
44
+ preview?: sanity.PreviewConfig<Record<string, string>, Record<never, any>> | undefined;
45
+ };
46
+
47
+ declare const _default: {
48
+ type: "document";
49
+ name: "navigation";
50
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
51
+ preview?: sanity.PreviewConfig<Record<string, string>, Record<never, any>> | undefined;
52
+ };
53
+
54
+ declare const siteSettingsQuery: string;
55
+ declare const navigationQuery: string;
56
+ declare const aboutQuery: string;
57
+ declare const projectsQuery: string;
58
+ declare const publicationsQuery: string;
59
+ declare const cvSectionQuery: string;
60
+ declare const projectBySlugQuery: string;
61
+ declare const allProjectSlugsQuery: string;
62
+
63
+ declare const schemas: (({
64
+ type: "document";
65
+ name: "siteSettings";
66
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
67
+ preview?: sanity.PreviewConfig<Record<string, string>, Record<never, any>> | undefined;
68
+ }) | ({
69
+ type: "document";
70
+ name: "about";
71
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
72
+ preview?: sanity.PreviewConfig<{
73
+ title: string;
74
+ media: string;
75
+ }, Record<"title" | "media", any>> | undefined;
76
+ }) | ({
77
+ type: "document";
78
+ name: "project";
79
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
80
+ preview?: sanity.PreviewConfig<{
81
+ title: string;
82
+ media: string;
83
+ }, Record<"title" | "media", any>> | undefined;
84
+ }) | ({
85
+ type: "document";
86
+ name: "publication";
87
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
88
+ preview?: sanity.PreviewConfig<{
89
+ title: string;
90
+ subtitle: string;
91
+ }, Record<"title" | "subtitle", any>> | undefined;
92
+ }) | ({
93
+ type: "document";
94
+ name: "cvSection";
95
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
96
+ preview?: sanity.PreviewConfig<Record<string, string>, Record<never, any>> | undefined;
97
+ }) | ({
98
+ type: "document";
99
+ name: "navigation";
100
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
101
+ preview?: sanity.PreviewConfig<Record<string, string>, Record<never, any>> | undefined;
102
+ }))[];
103
+ declare const schemaTypes: (({
104
+ type: "document";
105
+ name: "siteSettings";
106
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
107
+ preview?: sanity.PreviewConfig<Record<string, string>, Record<never, any>> | undefined;
108
+ }) | ({
109
+ type: "document";
110
+ name: "about";
111
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
112
+ preview?: sanity.PreviewConfig<{
113
+ title: string;
114
+ media: string;
115
+ }, Record<"title" | "media", any>> | undefined;
116
+ }) | ({
117
+ type: "document";
118
+ name: "project";
119
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
120
+ preview?: sanity.PreviewConfig<{
121
+ title: string;
122
+ media: string;
123
+ }, Record<"title" | "media", any>> | undefined;
124
+ }) | ({
125
+ type: "document";
126
+ name: "publication";
127
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
128
+ preview?: sanity.PreviewConfig<{
129
+ title: string;
130
+ subtitle: string;
131
+ }, Record<"title" | "subtitle", any>> | undefined;
132
+ }) | ({
133
+ type: "document";
134
+ name: "cvSection";
135
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
136
+ preview?: sanity.PreviewConfig<Record<string, string>, Record<never, any>> | undefined;
137
+ }) | ({
138
+ type: "document";
139
+ name: "navigation";
140
+ } & Omit<sanity.DocumentDefinition, "preview"> & {
141
+ preview?: sanity.PreviewConfig<Record<string, string>, Record<never, any>> | undefined;
142
+ }))[];
143
+
144
+ export { _default$4 as about, aboutQuery, allProjectSlugsQuery, _default$1 as cvSection, cvSectionQuery, _default as navigation, navigationQuery, _default$3 as project, projectBySlugQuery, projectsQuery, _default$2 as publication, publicationsQuery, schemaTypes, schemas, _default$5 as siteSettings, siteSettingsQuery };