@prosophia/personal-cv 0.0.2 → 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.
@@ -0,0 +1,73 @@
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
+ });
@@ -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 };