colbrush 1.0.0

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,393 @@
1
+ "use strict";
2
+ "use client";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+
31
+ // src/client.ts
32
+ var client_exports = {};
33
+ __export(client_exports, {
34
+ THEMES: () => THEMES,
35
+ ThemeProvider: () => ThemeProvider,
36
+ ThemeSwitcher: () => ThemeSwitcher,
37
+ useUpdateLanguage: () => useUpdateLanguage,
38
+ useUpdateTheme: () => useUpdateTheme
39
+ });
40
+ module.exports = __toCommonJS(client_exports);
41
+
42
+ // src/components/ThemeProvider.tsx
43
+ var import_react = require("react");
44
+ var import_jsx_runtime = require("react/jsx-runtime");
45
+ var THEME_KEYS = [
46
+ "default",
47
+ "protanopia",
48
+ "deuteranopia",
49
+ "tritanopia"
50
+ ];
51
+ var THEME_LABEL = {
52
+ English: {
53
+ default: "default",
54
+ protanopia: "protanopia",
55
+ deuteranopia: "deuteranopia",
56
+ tritanopia: "tritanopia"
57
+ },
58
+ Korean: {
59
+ default: "\uAE30\uBCF8",
60
+ protanopia: "\uC801\uC0C9\uB9F9",
61
+ deuteranopia: "\uB179\uC0C9\uB9F9",
62
+ tritanopia: "\uCCAD\uC0C9\uB9F9"
63
+ }
64
+ };
65
+ var getThemeOptions = (lang) => THEME_KEYS.map((key) => ({ key, label: THEME_LABEL[lang][key] }));
66
+ var KEY = "theme";
67
+ var LANG_KEY = "theme_lang";
68
+ var ThemeContext = (0, import_react.createContext)({
69
+ theme: "default",
70
+ language: "English",
71
+ updateTheme: () => {
72
+ },
73
+ updateLanguage: () => {
74
+ }
75
+ });
76
+ var useTheme = () => (0, import_react.useContext)(ThemeContext);
77
+ function normalizeToKey(value) {
78
+ if (!value) return "default";
79
+ if (THEME_KEYS.includes(value))
80
+ return value;
81
+ const reverse = {};
82
+ ["English", "Korean"].forEach((lang) => {
83
+ Object.entries(THEME_LABEL[lang]).forEach(
84
+ ([k, label]) => {
85
+ reverse[label] = k;
86
+ }
87
+ );
88
+ });
89
+ return reverse[value] ?? "default";
90
+ }
91
+ function ThemeProvider({ children }) {
92
+ const [theme, setTheme] = (0, import_react.useState)("default");
93
+ const [language, setLanguage] = (0, import_react.useState)("English");
94
+ (0, import_react.useEffect)(() => {
95
+ if (typeof window === "undefined") return;
96
+ const storedTheme = normalizeToKey(localStorage.getItem(KEY));
97
+ const storedLang = localStorage.getItem(LANG_KEY) || "English";
98
+ setTheme(storedTheme);
99
+ setLanguage(storedLang);
100
+ document.documentElement.setAttribute("data-theme", storedTheme);
101
+ }, []);
102
+ const updateTheme = (k) => {
103
+ setTheme(k);
104
+ if (typeof window !== "undefined") {
105
+ localStorage.setItem(KEY, k);
106
+ document.documentElement.setAttribute("data-theme", k);
107
+ }
108
+ };
109
+ const updateLanguage = (t) => {
110
+ setLanguage(t);
111
+ if (typeof window !== "undefined") {
112
+ localStorage.setItem(LANG_KEY, t);
113
+ }
114
+ };
115
+ const value = (0, import_react.useMemo)(
116
+ () => ({ theme, updateTheme, language, updateLanguage }),
117
+ [theme, language]
118
+ );
119
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThemeContext.Provider, { value, children });
120
+ }
121
+ var useUpdateTheme = () => useTheme().updateTheme;
122
+ var useUpdateLanguage = () => useTheme().updateLanguage;
123
+ var THEMES = THEME_LABEL;
124
+
125
+ // src/components/ThemeSwitcher.tsx
126
+ var import_react9 = require("react");
127
+
128
+ // src/assets/logo.svg?react
129
+ var React = __toESM(require("react"));
130
+ var import_react2 = require("react");
131
+ var import_jsx_runtime2 = require("react/jsx-runtime");
132
+ var SvgLogo = (props, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: 77, height: 78, viewBox: "0 0 77 78", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref, ...props, children: [
133
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M0 34.6052L3.03172 27.5771L36.6562 11.7295L34.0379 18.3441L0 34.6052Z", fill: "#CE78A9" }),
134
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M5.3745 47.4212L1.10254 37.6371L29.2148 23.4431L26.4587 30.1956L7.9928 39.5663L12.9538 51.0042L5.3745 47.4212Z", fill: "#D55D00" }),
135
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M43.5491 0.478061L50.5423 3.58953L66.0064 37.3921L59.4219 34.6987L43.5491 0.478061Z", fill: "#E59F01" }),
136
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M30.6731 5.70644L40.5052 1.54606L54.3785 29.818L47.6578 26.9852L38.4977 8.41393L27.0042 13.2445L30.6731 5.70644Z", fill: "black" }),
137
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M33.0714 77.4894L26.0844 74.3641L10.6869 40.5311L17.2661 43.2375L33.0714 77.4894Z", fill: "#0072B1" }),
138
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M45.9578 72.2865L36.1175 76.4275L22.3 48.1283L29.0151 50.9742L38.1385 69.5636L49.6416 64.7557L45.9578 72.2865Z", fill: "#F0E442" }),
139
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M76.7775 43.4237L73.8143 50.481L40.3455 66.6549L42.8994 60.0151L76.7775 43.4237Z", fill: "#009F73" }),
140
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M71.2787 30.661L75.6456 40.4032L47.6727 54.8699L50.363 48.0909L68.7369 38.541L63.6649 27.152L71.2787 30.661Z", fill: "#56B4E8" })
141
+ ] });
142
+ var ForwardRef = (0, import_react2.forwardRef)(SvgLogo);
143
+ var logo_default = ForwardRef;
144
+
145
+ // src/assets/US.svg?react
146
+ var React2 = __toESM(require("react"));
147
+ var import_react3 = require("react");
148
+ var import_jsx_runtime3 = require("react/jsx-runtime");
149
+ var SvgUs = (props, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("svg", { width: 50, height: 38, viewBox: "0 0 50 38", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref, ...props, children: [
150
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("g", { clipPath: "url(#clip0_85_779)", filter: "url(#filter0_d_85_779)", children: [
151
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M7 7H42.7847V30.8565H7V7Z", fill: "white" }),
152
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M7 7H42.7847V8.83458H7V7ZM7 10.6692H42.7847V12.5037H7V10.6692ZM7 14.3383H42.7847V16.1729H7V14.3383ZM7 18.0075H42.7847V19.842H7V18.0075ZM7 21.6836H42.7847V23.5182H7V21.6836ZM7 25.3527H42.7847V27.1873H7V25.3527ZM7 29.0219H42.7847V30.8565H7V29.0219Z", fill: "#D80027" }),
153
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M7 7H24.8923V19.842H7V7Z", fill: "#2E52B2" }),
154
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M10.3344 16.6892L10.0553 15.7964L9.74841 16.6892H8.82764L9.57402 17.2264L9.295 18.1192L10.0553 17.5682L10.7947 18.1192L10.5087 17.2264L11.2691 16.6892H10.3344ZM14.2616 16.6892L13.9756 15.7964L13.6826 16.6892H12.7619L13.5082 17.2264L13.2292 18.1192L13.9756 17.5682L14.729 18.1192L14.4499 17.2264L15.1963 16.6892H14.2616ZM18.2028 16.6892L17.9029 15.7964L17.6238 16.6892H16.6821L17.4494 17.2264L17.1565 18.1192L17.9029 17.5682L18.6702 18.1192L18.3772 17.2264L19.1236 16.6892H18.2028ZM22.1231 16.6892L21.8441 15.7964L21.5511 16.6892H20.6233L21.3767 17.2264L21.0977 18.1192L21.8441 17.5682L22.5974 18.1192L22.2975 17.2264L23.0648 16.6892H22.1231ZM13.9756 12.2528L13.6826 13.1457H12.7619L13.5082 13.6967L13.2292 14.5757L13.9756 14.0316L14.729 14.5757L14.4499 13.6967L15.1963 13.1457H14.2616L13.9756 12.2528ZM10.0553 12.2528L9.74841 13.1457H8.82764L9.57402 13.6967L9.295 14.5757L10.0553 14.0316L10.7947 14.5757L10.5087 13.6967L11.2691 13.1457H10.3344L10.0553 12.2528ZM17.9029 12.2528L17.6238 13.1457H16.6821L17.4494 13.6967L17.1565 14.5757L17.9029 14.0316L18.6702 14.5757L18.3772 13.6967L19.1236 13.1457H18.2028L17.9029 12.2528ZM21.8441 12.2528L21.5511 13.1457H20.6233L21.3767 13.6967L21.0977 14.5757L21.8441 14.0316L22.5974 14.5757L22.2975 13.6967L23.0648 13.1457H22.1231L21.8441 12.2528ZM10.0553 8.72314L9.74841 9.60207H8.82764L9.57402 10.1531L9.295 11.039L10.0553 10.488L10.7947 11.039L10.5087 10.1531L11.2691 9.60207H10.3344L10.0553 8.72314ZM13.9756 8.72314L13.6826 9.60207H12.7619L13.5082 10.1531L13.2292 11.039L13.9756 10.488L14.729 11.039L14.4499 10.1531L15.1963 9.60207H14.2616L13.9756 8.72314ZM17.9029 8.72314L17.6238 9.60207H16.6821L17.4494 10.1531L17.1565 11.039L17.9029 10.488L18.6702 11.039L18.3772 10.1531L19.1236 9.60207H18.2028L17.9029 8.72314ZM21.8441 8.72314L21.5511 9.60207H20.6233L21.3767 10.1531L21.0977 11.039L21.8441 10.488L22.5974 11.039L22.2975 10.1531L23.0648 9.60207H22.1231L21.8441 8.72314Z", fill: "white" })
155
+ ] }),
156
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("defs", { children: [
157
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("filter", { id: "filter0_d_85_779", x: 0.761634, y: 0.761634, width: 48.2614, height: 36.3332, filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB", children: [
158
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("feFlood", { floodOpacity: 0, result: "BackgroundImageFix" }),
159
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }),
160
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("feOffset", {}),
161
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("feGaussianBlur", { stdDeviation: 3.11918 }),
162
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("feComposite", { in2: "hardAlpha", operator: "out" }),
163
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("feColorMatrix", { type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0" }),
164
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("feBlend", { mode: "normal", in2: "BackgroundImageFix", result: "effect1_dropShadow_85_779" }),
165
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("feBlend", { mode: "normal", in: "SourceGraphic", in2: "effect1_dropShadow_85_779", result: "shape" })
166
+ ] }),
167
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("clipPath", { id: "clip0_85_779", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { width: 35.7847, height: 23.8565, fill: "white", transform: "translate(7 7)" }) })
168
+ ] })
169
+ ] });
170
+ var ForwardRef2 = (0, import_react3.forwardRef)(SvgUs);
171
+ var US_default = ForwardRef2;
172
+
173
+ // src/assets/KR.svg?react
174
+ var React3 = __toESM(require("react"));
175
+ var import_react4 = require("react");
176
+ var import_jsx_runtime4 = require("react/jsx-runtime");
177
+ var SvgKr = (props, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("svg", { width: 42, height: 30, viewBox: "0 0 42 30", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref, ...props, children: [
178
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("g", { clipPath: "url(#clip0_85_784)", filter: "url(#filter0_d_85_784)", children: [
179
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M3 3H39V27H3V3Z", fill: "white" }),
180
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.49609 10.27L11.8243 5.27771L12.7001 5.86161L9.37194 10.8539L8.49609 10.27ZM9.74417 11.1021L13.0724 6.10976L13.9482 6.69366L10.62 11.686L9.74417 11.1021ZM10.9922 11.9341L14.3204 6.94181L15.1963 7.52571L11.8681 12.518L10.9922 11.9341ZM26.8012 22.4734L30.1294 17.4811L31.0053 18.065L27.6771 23.0573L26.8012 22.4734ZM28.0493 23.3055L31.3775 18.3131L32.2533 18.897L28.9251 23.8893L28.0493 23.3055ZM33.5014 19.7291L30.1732 24.7214L29.2974 24.1375L32.6256 19.1452L33.5014 19.7291Z", fill: "black" }),
181
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M31.9884 22.8526L27.8281 20.0791L28.3147 19.3492L32.475 22.1227L31.9884 22.8526Z", fill: "white" }),
182
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M25.9915 18.3277C27.8296 15.5705 27.0846 11.8453 24.3274 10.0072C21.5702 8.16905 17.845 8.9141 16.0069 11.6713C14.1688 14.4284 14.9138 18.1537 17.671 19.9918C20.4282 21.8299 24.1534 21.0848 25.9915 18.3277Z", fill: "#CA163A" }),
183
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M16.0069 11.6713C15.0883 13.0491 15.4611 14.9129 16.839 15.8315C18.2168 16.7501 20.0806 16.3773 20.9992 14.9995C21.9178 13.6216 23.7816 13.2488 25.1595 14.1674C26.5373 15.086 26.9101 16.9498 25.9915 18.3277C24.1544 21.0834 20.4268 21.8289 17.671 19.9918C14.9153 18.1546 14.1697 14.427 16.0069 11.6713Z", fill: "#0E4896" }),
184
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M30.1732 5.27734L33.5014 10.2697L32.6255 10.8536L29.2973 5.86124L30.1732 5.27734ZM28.9251 6.10942L32.2533 11.1017L31.3775 11.6856L28.0493 6.69332L28.9251 6.10942ZM27.677 6.94146L31.0052 11.9337L30.1294 12.5176L26.8012 7.52536L27.677 6.94146ZM11.868 17.4807L15.1962 22.4731L14.3204 23.057L10.9922 18.0646L11.868 17.4807ZM10.6199 18.3128L13.9481 23.3051L13.0723 23.889L9.74409 18.8967L10.6199 18.3128ZM9.37194 19.1449L12.7001 24.1372L11.8243 24.7211L8.49609 19.7288L9.37194 19.1449Z", fill: "black" }),
185
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M11.2241 21.5159L12.4722 20.6839L11.2241 21.5159ZM28.0714 10.2844L29.5292 9.31252L28.0714 10.2844ZM30.7773 8.48048L32.0254 7.64844L30.7773 8.48048Z", fill: "black" }),
186
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M32.2688 8.01308L31.0207 8.84512L30.5341 8.11524L31.7822 7.2832L32.2688 8.01308ZM29.7726 9.67715L28.3148 10.649L27.8283 9.91912L29.286 8.94728L29.7726 9.67715ZM12.7156 21.0486L11.4675 21.8806L10.981 21.1507L12.229 20.3187L12.7156 21.0486Z", fill: "white" })
187
+ ] }),
188
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("defs", { children: [
189
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("filter", { id: "filter0_d_85_784", x: 0.658202, y: 0.658202, width: 40.6836, height: 28.6836, filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB", children: [
190
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("feFlood", { floodOpacity: 0, result: "BackgroundImageFix" }),
191
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }),
192
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("feOffset", {}),
193
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("feGaussianBlur", { stdDeviation: 1.1709 }),
194
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("feComposite", { in2: "hardAlpha", operator: "out" }),
195
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("feColorMatrix", { type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0" }),
196
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("feBlend", { mode: "normal", in2: "BackgroundImageFix", result: "effect1_dropShadow_85_784" }),
197
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("feBlend", { mode: "normal", in: "SourceGraphic", in2: "effect1_dropShadow_85_784", result: "shape" })
198
+ ] }),
199
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("clipPath", { id: "clip0_85_784", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("rect", { width: 36, height: 24, fill: "white", transform: "translate(3 3)" }) })
200
+ ] })
201
+ ] });
202
+ var ForwardRef3 = (0, import_react4.forwardRef)(SvgKr);
203
+ var KR_default = ForwardRef3;
204
+
205
+ // src/assets/theme/tritanopia.svg?react
206
+ var React4 = __toESM(require("react"));
207
+ var import_react5 = require("react");
208
+ var import_jsx_runtime5 = require("react/jsx-runtime");
209
+ var SvgTritanopia = (props, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { width: 28, height: 29, viewBox: "0 0 28 29", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref, ...props, children: [
210
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("rect", { x: 0.91, y: 1.41, width: 26.18, fill: "none", height: 26.18, rx: 13.09, stroke: "currentColor", strokeWidth: 1.82 }),
211
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M8.64062 7.15234H13.8496C14.8545 7.15234 15.6987 7.32324 16.3823 7.66504C17.0659 8.00684 17.5752 8.4751 17.9102 9.06982C18.252 9.66455 18.4229 10.3379 18.4229 11.0898C18.4229 11.9785 18.2007 12.6724 17.7563 13.1714C17.312 13.6636 16.7275 14.0088 16.0029 14.207V14.3506C16.4814 14.3779 16.9531 14.542 17.418 14.8428C17.8828 15.1436 18.2656 15.5708 18.5664 16.1245C18.8672 16.6714 19.0176 17.3174 19.0176 18.0625C19.0176 18.835 18.8398 19.5151 18.4844 20.103C18.1357 20.6909 17.5889 21.1558 16.8438 21.4976C16.0986 21.8325 15.1621 22 14.0342 22H8.64062V7.15234ZM14.0137 20.3594C15.1143 20.3594 15.9243 20.1475 16.4438 19.7236C16.9702 19.2998 17.2334 18.7393 17.2334 18.042C17.2334 17.5361 17.1035 17.0713 16.8438 16.6475C16.5908 16.2168 16.2251 15.8784 15.7466 15.6323C15.2749 15.3794 14.7314 15.2529 14.1162 15.2529H10.4863V20.3594H14.0137ZM13.7881 13.6533C14.3213 13.6533 14.8066 13.5508 15.2441 13.3457C15.6816 13.1338 16.0269 12.8364 16.2798 12.4536C16.5327 12.064 16.6592 11.6162 16.6592 11.1104C16.6592 10.4268 16.4233 9.86963 15.9517 9.43896C15.48 9.0083 14.7793 8.79297 13.8496 8.79297H10.4863V13.6533H13.7881Z", fill: "currentColor" }),
212
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M3.5 1.66602L26.8333 24.9993", fill: "none", stroke: "currentColor", strokeWidth: 1.51667 })
213
+ ] });
214
+ var ForwardRef4 = (0, import_react5.forwardRef)(SvgTritanopia);
215
+ var tritanopia_default = ForwardRef4;
216
+
217
+ // src/assets/theme/default.svg?react
218
+ var React5 = __toESM(require("react"));
219
+ var import_react6 = require("react");
220
+ var import_jsx_runtime6 = require("react/jsx-runtime");
221
+ var SvgDefault = (props, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("svg", { width: 31, height: 31, viewBox: "0 0 31 31", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref, ...props, children: [
222
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M30.5 15.5C30.5 15.5 24.875 5.1875 15.5 5.1875C6.125 5.1875 0.5 15.5 0.5 15.5C0.5 15.5 6.125 25.8125 15.5 25.8125C24.875 25.8125 30.5 15.5 30.5 15.5ZM2.69881 15.5C2.80555 15.3373 2.92726 15.1564 3.06364 14.9608C3.69155 14.0599 4.61808 12.8617 5.8102 11.6696C8.22693 9.25284 11.5262 7.0625 15.5 7.0625C19.4738 7.0625 22.7731 9.25284 25.1898 11.6696C26.3819 12.8617 27.3085 14.0599 27.9364 14.9608C28.0727 15.1564 28.1945 15.3373 28.3012 15.5C28.1945 15.6627 28.0727 15.8436 27.9364 16.0392C27.3085 16.9401 26.3819 18.1383 25.1898 19.3304C22.7731 21.7472 19.4738 23.9375 15.5 23.9375C11.5262 23.9375 8.22693 21.7472 5.8102 19.3304C4.61808 18.1383 3.69155 16.9401 3.06364 16.0392C2.92726 15.8436 2.80555 15.6627 2.69881 15.5Z", fill: "currentColor" }),
223
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M15.5 10.8125C12.9112 10.8125 10.8125 12.9112 10.8125 15.5C10.8125 18.0888 12.9112 20.1875 15.5 20.1875C18.0888 20.1875 20.1875 18.0888 20.1875 15.5C20.1875 12.9112 18.0888 10.8125 15.5 10.8125ZM8.9375 15.5C8.9375 11.8756 11.8756 8.9375 15.5 8.9375C19.1244 8.9375 22.0625 11.8756 22.0625 15.5C22.0625 19.1244 19.1244 22.0625 15.5 22.0625C11.8756 22.0625 8.9375 19.1244 8.9375 15.5Z", fill: "currentColor" })
224
+ ] });
225
+ var ForwardRef5 = (0, import_react6.forwardRef)(SvgDefault);
226
+ var default_default = ForwardRef5;
227
+
228
+ // src/assets/theme/protanopia.svg?react
229
+ var React6 = __toESM(require("react"));
230
+ var import_react7 = require("react");
231
+ var import_jsx_runtime7 = require("react/jsx-runtime");
232
+ var SvgProtanopia = (props, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("svg", { width: 28, height: 29, viewBox: "0 0 28 29", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref, ...props, children: [
233
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("rect", { x: 0.91, y: 1.41, width: 26.18, height: 26.18, fill: "none", rx: 13.09, stroke: "currentColor", strokeWidth: 1.82 }),
234
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M9.25244 7.15234H14.2974C15.4253 7.15234 16.3687 7.34717 17.1274 7.73682C17.8862 8.11963 18.4468 8.65625 18.8091 9.34668C19.1782 10.0303 19.3628 10.8232 19.3628 11.7256C19.3628 12.7305 19.1304 13.5952 18.6655 14.3198C18.2075 15.0444 17.5171 15.5674 16.5942 15.8887L19.937 22H17.7837L14.6768 16.2271L14.3179 16.2373H11.0981V22H9.25244V7.15234ZM14.2358 14.5557C15.3774 14.5557 16.2114 14.313 16.7378 13.8276C17.271 13.3423 17.5376 12.6416 17.5376 11.7256C17.5376 10.7959 17.271 10.0747 16.7378 9.56201C16.2046 9.04932 15.3638 8.79297 14.2153 8.79297H11.0981V14.5557H14.2358Z", fill: "currentColor" }),
235
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M3.5 1.66602L26.8333 24.9993", fill: "none", stroke: "currentColor", strokeWidth: 1.51667 })
236
+ ] });
237
+ var ForwardRef6 = (0, import_react7.forwardRef)(SvgProtanopia);
238
+ var protanopia_default = ForwardRef6;
239
+
240
+ // src/assets/theme/deuteranopia.svg?react
241
+ var React7 = __toESM(require("react"));
242
+ var import_react8 = require("react");
243
+ var import_jsx_runtime8 = require("react/jsx-runtime");
244
+ var SvgDeuteranopia = (props, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("svg", { width: 28, height: 29, viewBox: "0 0 28 29", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref, ...props, children: [
245
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("rect", { x: 0.91, y: 1.41, width: 26.18, height: 26.18, rx: 13.09, fill: "none", stroke: "currentColor", strokeWidth: 1.82 }),
246
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("path", { d: "M18.2715 11.7871C17.9434 10.8096 17.417 10.0474 16.6924 9.50049C15.9746 8.94678 15.0996 8.66992 14.0674 8.66992C13.1787 8.66992 12.3755 8.89893 11.6577 9.35693C10.9468 9.81494 10.3828 10.4883 9.96582 11.377C9.55566 12.2656 9.35059 13.332 9.35059 14.5762C9.35059 15.8203 9.55908 16.8867 9.97607 17.7754C10.3931 18.6641 10.9673 19.3374 11.6987 19.7954C12.4302 20.2534 13.2607 20.4824 14.1904 20.4824C15.0244 20.4824 15.7593 20.3081 16.395 19.9595C17.0376 19.604 17.5366 19.1016 17.8921 18.4521C18.2544 17.7959 18.4424 17.0371 18.4561 16.1758H14.5801V14.5557H20.2607V16.1553C20.2607 17.3652 20.001 18.4282 19.4814 19.3442C18.9619 20.2603 18.2407 20.9678 17.3179 21.4668C16.4019 21.959 15.3594 22.2051 14.1904 22.2051C12.8779 22.2051 11.7192 21.8975 10.7144 21.2822C9.71631 20.6602 8.94043 19.7749 8.38672 18.6265C7.83984 17.4712 7.56641 16.1211 7.56641 14.5762C7.56641 13.0381 7.83984 11.6948 8.38672 10.5464C8.94043 9.39111 9.70947 8.50244 10.6938 7.88037C11.6782 7.2583 12.8027 6.94727 14.0674 6.94727C15.0996 6.94727 16.0464 7.15234 16.9077 7.5625C17.769 7.96582 18.4834 8.5332 19.0508 9.26465C19.6182 9.99609 19.9941 10.8369 20.1787 11.7871H18.2715Z", fill: "currentColor" })
247
+ ] });
248
+ var ForwardRef7 = (0, import_react8.forwardRef)(SvgDeuteranopia);
249
+ var deuteranopia_default = ForwardRef7;
250
+
251
+ // src/components/ThemeSwitcher.tsx
252
+ var import_jsx_runtime9 = require("react/jsx-runtime");
253
+ var THEME_ICON = {
254
+ default: default_default,
255
+ protanopia: protanopia_default,
256
+ deuteranopia: deuteranopia_default,
257
+ tritanopia: tritanopia_default
258
+ };
259
+ function ThemeSwitcher({ options, className }) {
260
+ const { theme, updateTheme, language, updateLanguage } = useTheme();
261
+ const list = (0, import_react9.useMemo)(
262
+ () => options?.length ? options : getThemeOptions(language),
263
+ [options, language]
264
+ );
265
+ const [isOpen, setIsOpen] = (0, import_react9.useState)(false);
266
+ const wrapperRef = (0, import_react9.useRef)(null);
267
+ (0, import_react9.useEffect)(() => {
268
+ const handleClickOutside = (event) => {
269
+ if (wrapperRef.current && !wrapperRef.current.contains(event.target)) {
270
+ setIsOpen(false);
271
+ }
272
+ };
273
+ document.addEventListener("mousedown", handleClickOutside);
274
+ return () => document.removeEventListener("mousedown", handleClickOutside);
275
+ }, []);
276
+ const toggle = (e) => {
277
+ e.stopPropagation();
278
+ setIsOpen((prev) => !prev);
279
+ };
280
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
281
+ "div",
282
+ {
283
+ ref: wrapperRef,
284
+ className: [
285
+ "fixed bottom-[20px] right-[20px] flex justify-center items-center text-[20px] bg-[#ffffff] drop-shadow-md",
286
+ isOpen ? "w-[220px] h-fit rounded-[18px]" : "w-[60px] h-[60px] rounded-full",
287
+ className ?? ""
288
+ ].join(" "),
289
+ role: "presentation",
290
+ children: [
291
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
292
+ "button",
293
+ {
294
+ type: "button",
295
+ "aria-haspopup": "menu",
296
+ "aria-expanded": isOpen,
297
+ onClick: toggle,
298
+ className: [
299
+ "w-[60px] h-[60px] p-[10px] bg-[#ffffff] rounded-full flex justify-center items-center",
300
+ isOpen ? "hidden" : "block"
301
+ ].join(" "),
302
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(logo_default, { className: "self-center", width: 40, height: 40 })
303
+ }
304
+ ),
305
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
306
+ "div",
307
+ {
308
+ role: "menu",
309
+ "aria-label": "Select theme",
310
+ className: "flex flex-col bg-[#ffffff] rounded-[18px] w-[220px]",
311
+ children: [
312
+ list.map((opt) => {
313
+ const Icon = THEME_ICON[opt.key];
314
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
315
+ "button",
316
+ {
317
+ type: "button",
318
+ role: "menuitemradio",
319
+ "aria-checked": theme === opt.key,
320
+ onClick: (e) => {
321
+ e.stopPropagation();
322
+ updateTheme(opt.key);
323
+ },
324
+ className: [
325
+ "text-[18px] text-[#3D4852] py-1 w-full h-[50px] text-center gap-[8px] flex items-center justify-center rounded-[18px]",
326
+ "hover:bg-[#0072B1]",
327
+ theme === opt.key ? "bg-[#0072B1] text-[#ffffff]" : ""
328
+ ].join(" "),
329
+ children: [
330
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
331
+ Icon,
332
+ {
333
+ width: 18,
334
+ height: 18,
335
+ stroke: `${theme === opt.key} ? '#ffffff': '#3D4852'`,
336
+ fill: `${theme === opt.key} ? '#ffffff': '#3D4852'`,
337
+ className: "inline-block"
338
+ }
339
+ ),
340
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: opt.label })
341
+ ]
342
+ },
343
+ opt.key
344
+ );
345
+ }),
346
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "w-full border-[0.5px] border-[#B8B8B8]" }),
347
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex h-[80px] justify-evenly items-center gap-[10px] px-[10px]", children: [
348
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
349
+ "div",
350
+ {
351
+ className: `relative hover:cursor-pointer flex text-[18px] text-[#3D4852] ${language === "English" ? "underline" : ""}`,
352
+ onClick: () => updateLanguage("English"),
353
+ children: [
354
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "absolute top-[-20px] left-[0px] text-[#3D4852] text-[8px] px-[9px] py-[2px] rounded-[13px] bg-[#D9D9D9]", children: "Language" }),
355
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
356
+ US_default,
357
+ {
358
+ className: "self-center",
359
+ width: 30,
360
+ height: 30
361
+ }
362
+ ),
363
+ "English"
364
+ ]
365
+ }
366
+ ),
367
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "h-full w-[1px] border-r-[0.5px] border-r-[#B8B8B8]" }),
368
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
369
+ "div",
370
+ {
371
+ className: `hover:cursor-pointer flex text-[18px] text-[#3D4852] ${language === "Korean" ? "underline" : ""}`,
372
+ onClick: () => updateLanguage("Korean"),
373
+ children: [
374
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
375
+ KR_default,
376
+ {
377
+ className: "self-center",
378
+ width: 30,
379
+ height: 30
380
+ }
381
+ ),
382
+ "Korean"
383
+ ]
384
+ }
385
+ )
386
+ ] })
387
+ ]
388
+ }
389
+ )
390
+ ]
391
+ }
392
+ );
393
+ }
@@ -0,0 +1,23 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ type TLanguage = 'English' | 'Korean';
4
+ declare const THEME_KEYS: readonly ["default", "protanopia", "deuteranopia", "tritanopia"];
5
+ type ThemeKey = (typeof THEME_KEYS)[number];
6
+ declare function ThemeProvider({ children }: {
7
+ children: React.ReactNode;
8
+ }): react_jsx_runtime.JSX.Element;
9
+ declare const useUpdateTheme: () => (k: ThemeKey) => void;
10
+ declare const useUpdateLanguage: () => (t: TLanguage) => void;
11
+ type ThemeType = ThemeKey;
12
+ declare const THEMES: Record<TLanguage, Record<"default" | "protanopia" | "deuteranopia" | "tritanopia", string>>;
13
+
14
+ type Props = {
15
+ options?: {
16
+ key: ThemeKey;
17
+ label: string;
18
+ }[];
19
+ className?: string;
20
+ };
21
+ declare function ThemeSwitcher({ options, className }: Props): react_jsx_runtime.JSX.Element;
22
+
23
+ export { THEMES, ThemeProvider, ThemeSwitcher, type ThemeType, useUpdateLanguage, useUpdateTheme };
@@ -0,0 +1,23 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ type TLanguage = 'English' | 'Korean';
4
+ declare const THEME_KEYS: readonly ["default", "protanopia", "deuteranopia", "tritanopia"];
5
+ type ThemeKey = (typeof THEME_KEYS)[number];
6
+ declare function ThemeProvider({ children }: {
7
+ children: React.ReactNode;
8
+ }): react_jsx_runtime.JSX.Element;
9
+ declare const useUpdateTheme: () => (k: ThemeKey) => void;
10
+ declare const useUpdateLanguage: () => (t: TLanguage) => void;
11
+ type ThemeType = ThemeKey;
12
+ declare const THEMES: Record<TLanguage, Record<"default" | "protanopia" | "deuteranopia" | "tritanopia", string>>;
13
+
14
+ type Props = {
15
+ options?: {
16
+ key: ThemeKey;
17
+ label: string;
18
+ }[];
19
+ className?: string;
20
+ };
21
+ declare function ThemeSwitcher({ options, className }: Props): react_jsx_runtime.JSX.Element;
22
+
23
+ export { THEMES, ThemeProvider, ThemeSwitcher, type ThemeType, useUpdateLanguage, useUpdateTheme };