colbrush 1.5.0 → 1.7.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.
- package/dist/chunk-EFIJAMPH.js +104 -0
- package/dist/cli.cjs +41 -97
- package/dist/client.cjs +13 -2
- package/dist/client.d.cts +5 -1
- package/dist/client.d.ts +5 -1
- package/dist/client.js +84 -165
- package/dist/devtools.cjs +296 -0
- package/dist/devtools.d.cts +26 -0
- package/dist/devtools.d.ts +26 -0
- package/dist/devtools.js +260 -0
- package/package.json +12 -1
package/dist/client.js
CHANGED
|
@@ -1,97 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
// src/react/ThemeProvider.tsx
|
|
4
2
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} from "react";
|
|
11
|
-
import { jsx } from "react/jsx-runtime";
|
|
12
|
-
var THEME_KEYS = [
|
|
13
|
-
"default",
|
|
14
|
-
"protanopia",
|
|
15
|
-
"deuteranopia",
|
|
16
|
-
"tritanopia"
|
|
17
|
-
];
|
|
18
|
-
var THEME_LABEL = {
|
|
19
|
-
English: {
|
|
20
|
-
default: "default",
|
|
21
|
-
protanopia: "protanopia",
|
|
22
|
-
deuteranopia: "deuteranopia",
|
|
23
|
-
tritanopia: "tritanopia"
|
|
24
|
-
},
|
|
25
|
-
Korean: {
|
|
26
|
-
default: "\uAE30\uBCF8",
|
|
27
|
-
protanopia: "\uC801\uC0C9\uB9F9",
|
|
28
|
-
deuteranopia: "\uB179\uC0C9\uB9F9",
|
|
29
|
-
tritanopia: "\uCCAD\uC0C9\uB9F9"
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
var getThemeOptions = (lang) => THEME_KEYS.map((key) => ({ key, label: THEME_LABEL[lang][key] }));
|
|
33
|
-
var KEY = "theme";
|
|
34
|
-
var LANG_KEY = "theme_lang";
|
|
35
|
-
var ThemeContext = createContext({
|
|
36
|
-
theme: "default",
|
|
37
|
-
language: "English",
|
|
38
|
-
updateTheme: () => {
|
|
39
|
-
},
|
|
40
|
-
updateLanguage: () => {
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
var useTheme = () => useContext(ThemeContext);
|
|
44
|
-
function normalizeToKey(value) {
|
|
45
|
-
if (!value) return "default";
|
|
46
|
-
if (THEME_KEYS.includes(value))
|
|
47
|
-
return value;
|
|
48
|
-
const reverse = {};
|
|
49
|
-
["English", "Korean"].forEach((lang) => {
|
|
50
|
-
Object.entries(THEME_LABEL[lang]).forEach(
|
|
51
|
-
([k, label]) => {
|
|
52
|
-
reverse[label] = k;
|
|
53
|
-
}
|
|
54
|
-
);
|
|
55
|
-
});
|
|
56
|
-
return reverse[value] ?? "default";
|
|
57
|
-
}
|
|
58
|
-
function ThemeProvider({ children }) {
|
|
59
|
-
const [theme, setTheme] = useState("default");
|
|
60
|
-
const [language, setLanguage] = useState("English");
|
|
61
|
-
useEffect(() => {
|
|
62
|
-
if (typeof window === "undefined") return;
|
|
63
|
-
const storedTheme = normalizeToKey(localStorage.getItem(KEY));
|
|
64
|
-
const storedLang = localStorage.getItem(LANG_KEY) || "English";
|
|
65
|
-
setTheme(storedTheme);
|
|
66
|
-
setLanguage(storedLang);
|
|
67
|
-
document.documentElement.setAttribute("data-theme", storedTheme);
|
|
68
|
-
}, []);
|
|
69
|
-
const updateTheme = (k) => {
|
|
70
|
-
setTheme(k);
|
|
71
|
-
if (typeof window !== "undefined") {
|
|
72
|
-
localStorage.setItem(KEY, k);
|
|
73
|
-
document.documentElement.setAttribute("data-theme", k);
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
const updateLanguage = (t) => {
|
|
77
|
-
setLanguage(t);
|
|
78
|
-
if (typeof window !== "undefined") {
|
|
79
|
-
localStorage.setItem(LANG_KEY, t);
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
const value = useMemo(
|
|
83
|
-
() => ({ theme, language, updateTheme, updateLanguage }),
|
|
84
|
-
[theme, language]
|
|
85
|
-
);
|
|
86
|
-
return /* @__PURE__ */ jsx(ThemeContext.Provider, { value, children });
|
|
87
|
-
}
|
|
88
|
-
var THEMES = THEME_LABEL;
|
|
3
|
+
THEMES,
|
|
4
|
+
ThemeProvider,
|
|
5
|
+
getThemeOptions,
|
|
6
|
+
useTheme
|
|
7
|
+
} from "./chunk-EFIJAMPH.js";
|
|
89
8
|
|
|
90
9
|
// src/react/ThemeSwitcher.tsx
|
|
91
|
-
import { useEffect as
|
|
10
|
+
import { useEffect as useEffect2, useRef as useRef2, useState as useState2, useMemo } from "react";
|
|
92
11
|
|
|
93
12
|
// src/icons/Logo.tsx
|
|
94
|
-
import { jsx
|
|
13
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
95
14
|
var SvgLogo = (props) => /* @__PURE__ */ jsxs(
|
|
96
15
|
"svg",
|
|
97
16
|
{
|
|
@@ -100,50 +19,50 @@ var SvgLogo = (props) => /* @__PURE__ */ jsxs(
|
|
|
100
19
|
viewBox: "0 0 39 40",
|
|
101
20
|
...props,
|
|
102
21
|
children: [
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
/* @__PURE__ */
|
|
22
|
+
/* @__PURE__ */ jsx("path", { fill: "#CE78A9", d: "m.5 17.805 1.516-3.514 16.812-7.924-1.309 3.308z" }),
|
|
23
|
+
/* @__PURE__ */ jsx(
|
|
105
24
|
"path",
|
|
106
25
|
{
|
|
107
26
|
fill: "#D55D00",
|
|
108
27
|
d: "M3.187 24.212 1.05 19.32l14.056-7.097-1.378 3.376-9.233 4.685 2.48 5.72z"
|
|
109
28
|
}
|
|
110
29
|
),
|
|
111
|
-
/* @__PURE__ */
|
|
30
|
+
/* @__PURE__ */ jsx(
|
|
112
31
|
"path",
|
|
113
32
|
{
|
|
114
33
|
fill: "#E59F01",
|
|
115
34
|
d: "m22.276.741 3.496 1.556 7.732 16.901-3.292-1.347z"
|
|
116
35
|
}
|
|
117
36
|
),
|
|
118
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ jsx(
|
|
119
38
|
"path",
|
|
120
39
|
{
|
|
121
40
|
fill: "#000",
|
|
122
41
|
d: "m15.837 3.355 4.916-2.08L27.69 15.41l-3.36-1.417-4.58-9.285-5.747 2.415z"
|
|
123
42
|
}
|
|
124
43
|
),
|
|
125
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ jsx(
|
|
126
45
|
"path",
|
|
127
46
|
{
|
|
128
47
|
fill: "#0072B1",
|
|
129
48
|
d: "m17.036 39.246-3.493-1.562-7.699-16.917 3.29 1.354z"
|
|
130
49
|
}
|
|
131
50
|
),
|
|
132
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ jsx(
|
|
133
52
|
"path",
|
|
134
53
|
{
|
|
135
54
|
fill: "#F0E442",
|
|
136
55
|
d: "m23.477 36.645-4.92 2.07-6.908-14.149 3.357 1.423 4.562 9.295 5.751-2.404z"
|
|
137
56
|
}
|
|
138
57
|
),
|
|
139
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ jsx(
|
|
140
59
|
"path",
|
|
141
60
|
{
|
|
142
61
|
fill: "#009F73",
|
|
143
62
|
d: "m38.889 22.215-1.482 3.529-16.734 8.087 1.277-3.32z"
|
|
144
63
|
}
|
|
145
64
|
),
|
|
146
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ jsx(
|
|
147
66
|
"path",
|
|
148
67
|
{
|
|
149
68
|
fill: "#56B4E8",
|
|
@@ -156,7 +75,7 @@ var SvgLogo = (props) => /* @__PURE__ */ jsxs(
|
|
|
156
75
|
var Logo_default = SvgLogo;
|
|
157
76
|
|
|
158
77
|
// src/icons/Us.tsx
|
|
159
|
-
import { jsx as
|
|
78
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
160
79
|
var SvgUs = (props) => /* @__PURE__ */ jsxs2(
|
|
161
80
|
"svg",
|
|
162
81
|
{
|
|
@@ -166,16 +85,16 @@ var SvgUs = (props) => /* @__PURE__ */ jsxs2(
|
|
|
166
85
|
...props,
|
|
167
86
|
children: [
|
|
168
87
|
/* @__PURE__ */ jsxs2("g", { clipPath: "url(#a)", filter: "url(#b)", children: [
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ jsx2("path", { fill: "#fff", d: "M3.996 4.166h20v13.333h-20z" }),
|
|
89
|
+
/* @__PURE__ */ jsx2(
|
|
171
90
|
"path",
|
|
172
91
|
{
|
|
173
92
|
fill: "#D80027",
|
|
174
93
|
d: "M3.996 4.166h20v1.025h-20zm0 2.05h20v1.026h-20zm0 2.051h20v1.026h-20zm0 2.051h20v1.025h-20zm0 2.055h20v1.025h-20zm0 2.05h20v1.026h-20zm0 2.051h20v1.025h-20z"
|
|
175
94
|
}
|
|
176
95
|
),
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ jsx2("path", { fill: "#2E52B2", d: "M3.996 4.166h10v7.177h-10z" }),
|
|
97
|
+
/* @__PURE__ */ jsx2(
|
|
179
98
|
"path",
|
|
180
99
|
{
|
|
181
100
|
fill: "#fff",
|
|
@@ -184,7 +103,7 @@ var SvgUs = (props) => /* @__PURE__ */ jsxs2(
|
|
|
184
103
|
)
|
|
185
104
|
] }),
|
|
186
105
|
/* @__PURE__ */ jsxs2("defs", { children: [
|
|
187
|
-
/* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ jsx2("clipPath", { id: "a", children: /* @__PURE__ */ jsx2("path", { fill: "#fff", d: "M3.996 4.166h20v13.333h-20z" }) }),
|
|
188
107
|
/* @__PURE__ */ jsxs2(
|
|
189
108
|
"filter",
|
|
190
109
|
{
|
|
@@ -196,8 +115,8 @@ var SvgUs = (props) => /* @__PURE__ */ jsxs2(
|
|
|
196
115
|
colorInterpolationFilters: "sRGB",
|
|
197
116
|
filterUnits: "userSpaceOnUse",
|
|
198
117
|
children: [
|
|
199
|
-
/* @__PURE__ */
|
|
200
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ jsx2("feFlood", { floodOpacity: 0, result: "BackgroundImageFix" }),
|
|
119
|
+
/* @__PURE__ */ jsx2(
|
|
201
120
|
"feColorMatrix",
|
|
202
121
|
{
|
|
203
122
|
in: "SourceAlpha",
|
|
@@ -205,18 +124,18 @@ var SvgUs = (props) => /* @__PURE__ */ jsxs2(
|
|
|
205
124
|
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
|
|
206
125
|
}
|
|
207
126
|
),
|
|
208
|
-
/* @__PURE__ */
|
|
209
|
-
/* @__PURE__ */
|
|
210
|
-
/* @__PURE__ */
|
|
211
|
-
/* @__PURE__ */
|
|
212
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ jsx2("feOffset", {}),
|
|
128
|
+
/* @__PURE__ */ jsx2("feGaussianBlur", { stdDeviation: 1.743 }),
|
|
129
|
+
/* @__PURE__ */ jsx2("feComposite", { in2: "hardAlpha", operator: "out" }),
|
|
130
|
+
/* @__PURE__ */ jsx2("feColorMatrix", { values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0" }),
|
|
131
|
+
/* @__PURE__ */ jsx2(
|
|
213
132
|
"feBlend",
|
|
214
133
|
{
|
|
215
134
|
in2: "BackgroundImageFix",
|
|
216
135
|
result: "effect1_dropShadow_306_3300"
|
|
217
136
|
}
|
|
218
137
|
),
|
|
219
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ jsx2(
|
|
220
139
|
"feBlend",
|
|
221
140
|
{
|
|
222
141
|
in: "SourceGraphic",
|
|
@@ -234,7 +153,7 @@ var SvgUs = (props) => /* @__PURE__ */ jsxs2(
|
|
|
234
153
|
var Us_default = SvgUs;
|
|
235
154
|
|
|
236
155
|
// src/icons/Kr.tsx
|
|
237
|
-
import { jsx as
|
|
156
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
238
157
|
var SvgKr = (props) => /* @__PURE__ */ jsxs3(
|
|
239
158
|
"svg",
|
|
240
159
|
{
|
|
@@ -244,8 +163,8 @@ var SvgKr = (props) => /* @__PURE__ */ jsxs3(
|
|
|
244
163
|
...props,
|
|
245
164
|
children: [
|
|
246
165
|
/* @__PURE__ */ jsxs3("g", { clipPath: "url(#a)", filter: "url(#b)", children: [
|
|
247
|
-
/* @__PURE__ */
|
|
248
|
-
/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ jsx3("path", { fill: "#fff", d: "M1.906 2h20v13.333h-20z" }),
|
|
167
|
+
/* @__PURE__ */ jsx3(
|
|
249
168
|
"path",
|
|
250
169
|
{
|
|
251
170
|
fill: "#000",
|
|
@@ -254,7 +173,7 @@ var SvgKr = (props) => /* @__PURE__ */ jsxs3(
|
|
|
254
173
|
clipRule: "evenodd"
|
|
255
174
|
}
|
|
256
175
|
),
|
|
257
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ jsx3(
|
|
258
177
|
"path",
|
|
259
178
|
{
|
|
260
179
|
fill: "#fff",
|
|
@@ -263,21 +182,21 @@ var SvgKr = (props) => /* @__PURE__ */ jsxs3(
|
|
|
263
182
|
clipRule: "evenodd"
|
|
264
183
|
}
|
|
265
184
|
),
|
|
266
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ jsx3(
|
|
267
186
|
"path",
|
|
268
187
|
{
|
|
269
188
|
fill: "#CA163A",
|
|
270
189
|
d: "M14.68 10.514a3.333 3.333 0 1 0-5.548-3.698 3.333 3.333 0 0 0 5.547 3.698"
|
|
271
190
|
}
|
|
272
191
|
),
|
|
273
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ jsx3(
|
|
274
193
|
"path",
|
|
275
194
|
{
|
|
276
195
|
fill: "#0E4896",
|
|
277
196
|
d: "M9.132 6.816a1.667 1.667 0 0 0 2.774 1.85 1.667 1.667 0 0 1 2.773 1.848 3.334 3.334 0 0 1-5.547-3.698"
|
|
278
197
|
}
|
|
279
198
|
),
|
|
280
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ jsx3(
|
|
281
200
|
"path",
|
|
282
201
|
{
|
|
283
202
|
fill: "#000",
|
|
@@ -286,14 +205,14 @@ var SvgKr = (props) => /* @__PURE__ */ jsxs3(
|
|
|
286
205
|
clipRule: "evenodd"
|
|
287
206
|
}
|
|
288
207
|
),
|
|
289
|
-
/* @__PURE__ */
|
|
208
|
+
/* @__PURE__ */ jsx3(
|
|
290
209
|
"path",
|
|
291
210
|
{
|
|
292
211
|
fill: "#000",
|
|
293
212
|
d: "m6.475 12.286.693-.462zm9.36-6.24.81-.54zm1.502-1.002.694-.462z"
|
|
294
213
|
}
|
|
295
214
|
),
|
|
296
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ jsx3(
|
|
297
216
|
"path",
|
|
298
217
|
{
|
|
299
218
|
fill: "#fff",
|
|
@@ -304,7 +223,7 @@ var SvgKr = (props) => /* @__PURE__ */ jsxs3(
|
|
|
304
223
|
)
|
|
305
224
|
] }),
|
|
306
225
|
/* @__PURE__ */ jsxs3("defs", { children: [
|
|
307
|
-
/* @__PURE__ */
|
|
226
|
+
/* @__PURE__ */ jsx3("clipPath", { id: "a", children: /* @__PURE__ */ jsx3("path", { fill: "#fff", d: "M1.906 2h20v13.333h-20z" }) }),
|
|
308
227
|
/* @__PURE__ */ jsxs3(
|
|
309
228
|
"filter",
|
|
310
229
|
{
|
|
@@ -316,8 +235,8 @@ var SvgKr = (props) => /* @__PURE__ */ jsxs3(
|
|
|
316
235
|
colorInterpolationFilters: "sRGB",
|
|
317
236
|
filterUnits: "userSpaceOnUse",
|
|
318
237
|
children: [
|
|
319
|
-
/* @__PURE__ */
|
|
320
|
-
/* @__PURE__ */
|
|
238
|
+
/* @__PURE__ */ jsx3("feFlood", { floodOpacity: 0, result: "BackgroundImageFix" }),
|
|
239
|
+
/* @__PURE__ */ jsx3(
|
|
321
240
|
"feColorMatrix",
|
|
322
241
|
{
|
|
323
242
|
in: "SourceAlpha",
|
|
@@ -325,18 +244,18 @@ var SvgKr = (props) => /* @__PURE__ */ jsxs3(
|
|
|
325
244
|
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
|
|
326
245
|
}
|
|
327
246
|
),
|
|
328
|
-
/* @__PURE__ */
|
|
329
|
-
/* @__PURE__ */
|
|
330
|
-
/* @__PURE__ */
|
|
331
|
-
/* @__PURE__ */
|
|
332
|
-
/* @__PURE__ */
|
|
247
|
+
/* @__PURE__ */ jsx3("feOffset", {}),
|
|
248
|
+
/* @__PURE__ */ jsx3("feGaussianBlur", { stdDeviation: 0.65 }),
|
|
249
|
+
/* @__PURE__ */ jsx3("feComposite", { in2: "hardAlpha", operator: "out" }),
|
|
250
|
+
/* @__PURE__ */ jsx3("feColorMatrix", { values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0" }),
|
|
251
|
+
/* @__PURE__ */ jsx3(
|
|
333
252
|
"feBlend",
|
|
334
253
|
{
|
|
335
254
|
in2: "BackgroundImageFix",
|
|
336
255
|
result: "effect1_dropShadow_306_2477"
|
|
337
256
|
}
|
|
338
257
|
),
|
|
339
|
-
/* @__PURE__ */
|
|
258
|
+
/* @__PURE__ */ jsx3(
|
|
340
259
|
"feBlend",
|
|
341
260
|
{
|
|
342
261
|
in: "SourceGraphic",
|
|
@@ -354,7 +273,7 @@ var SvgKr = (props) => /* @__PURE__ */ jsxs3(
|
|
|
354
273
|
var Kr_default = SvgKr;
|
|
355
274
|
|
|
356
275
|
// src/icons/X.tsx
|
|
357
|
-
import { jsx as
|
|
276
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
358
277
|
var SvgX = (props) => /* @__PURE__ */ jsxs4(
|
|
359
278
|
"svg",
|
|
360
279
|
{
|
|
@@ -363,7 +282,7 @@ var SvgX = (props) => /* @__PURE__ */ jsxs4(
|
|
|
363
282
|
viewBox: "0 0 30 30",
|
|
364
283
|
...props,
|
|
365
284
|
children: [
|
|
366
|
-
/* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ jsx4(
|
|
367
286
|
"path",
|
|
368
287
|
{
|
|
369
288
|
fill: "#000",
|
|
@@ -372,7 +291,7 @@ var SvgX = (props) => /* @__PURE__ */ jsxs4(
|
|
|
372
291
|
clipRule: "evenodd"
|
|
373
292
|
}
|
|
374
293
|
),
|
|
375
|
-
/* @__PURE__ */
|
|
294
|
+
/* @__PURE__ */ jsx4(
|
|
376
295
|
"path",
|
|
377
296
|
{
|
|
378
297
|
fill: "#000",
|
|
@@ -387,7 +306,7 @@ var SvgX = (props) => /* @__PURE__ */ jsxs4(
|
|
|
387
306
|
var X_default = SvgX;
|
|
388
307
|
|
|
389
308
|
// src/icons/theme/Tritanopia.tsx
|
|
390
|
-
import { jsx as
|
|
309
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
391
310
|
var SvgTritanopia = (props) => /* @__PURE__ */ jsxs5(
|
|
392
311
|
"svg",
|
|
393
312
|
{
|
|
@@ -396,7 +315,7 @@ var SvgTritanopia = (props) => /* @__PURE__ */ jsxs5(
|
|
|
396
315
|
viewBox: "0 0 28 29",
|
|
397
316
|
...props,
|
|
398
317
|
children: [
|
|
399
|
-
/* @__PURE__ */
|
|
318
|
+
/* @__PURE__ */ jsx5(
|
|
400
319
|
"rect",
|
|
401
320
|
{
|
|
402
321
|
width: 26.18,
|
|
@@ -408,14 +327,14 @@ var SvgTritanopia = (props) => /* @__PURE__ */ jsxs5(
|
|
|
408
327
|
rx: 13.09
|
|
409
328
|
}
|
|
410
329
|
),
|
|
411
|
-
/* @__PURE__ */
|
|
330
|
+
/* @__PURE__ */ jsx5(
|
|
412
331
|
"path",
|
|
413
332
|
{
|
|
414
333
|
fill: "currentColor",
|
|
415
334
|
d: "M8.64 7.152h5.21q1.508 0 2.532.513 1.026.513 1.528 1.405.513.892.513 2.02 0 1.333-.667 2.081-.666.74-1.753 1.036v.144q.717.04 1.415.492.698.45 1.148 1.282.452.819.452 1.938 0 1.158-.534 2.04-.522.882-1.64 1.395-1.118.502-2.81.502H8.641zm5.374 13.207q1.65 0 2.43-.635.79-.636.79-1.682 0-.758-.39-1.395a2.63 2.63 0 0 0-1.097-1.015q-.709-.38-1.63-.38h-3.63v5.107zm-.226-6.706q.8 0 1.456-.307.657-.319 1.036-.892.38-.585.38-1.344 0-1.024-.708-1.671-.708-.646-2.102-.646h-3.364v4.86z"
|
|
416
335
|
}
|
|
417
336
|
),
|
|
418
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ jsx5(
|
|
419
338
|
"path",
|
|
420
339
|
{
|
|
421
340
|
stroke: "currentColor",
|
|
@@ -429,7 +348,7 @@ var SvgTritanopia = (props) => /* @__PURE__ */ jsxs5(
|
|
|
429
348
|
var Tritanopia_default = SvgTritanopia;
|
|
430
349
|
|
|
431
350
|
// src/icons/theme/Default.tsx
|
|
432
|
-
import { jsx as
|
|
351
|
+
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
433
352
|
var SvgDefault = (props) => /* @__PURE__ */ jsxs6(
|
|
434
353
|
"svg",
|
|
435
354
|
{
|
|
@@ -438,14 +357,14 @@ var SvgDefault = (props) => /* @__PURE__ */ jsxs6(
|
|
|
438
357
|
viewBox: "0 0 31 31",
|
|
439
358
|
...props,
|
|
440
359
|
children: [
|
|
441
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ jsx6(
|
|
442
361
|
"path",
|
|
443
362
|
{
|
|
444
363
|
fill: "currentColor",
|
|
445
364
|
d: "M30.5 15.5s-5.625-10.312-15-10.312S.5 15.5.5 15.5s5.625 10.313 15 10.313 15-10.313 15-10.313m-27.801 0q.16-.245.365-.54c.628-.9 1.554-2.098 2.746-3.29 2.417-2.417 5.716-4.607 9.69-4.607s7.273 2.19 9.69 4.607A24.6 24.6 0 0 1 28.3 15.5q-.16.245-.365.54c-.628.9-1.554 2.098-2.746 3.29-2.417 2.417-5.716 4.608-9.69 4.608s-7.273-2.19-9.69-4.608A24.6 24.6 0 0 1 2.7 15.5"
|
|
446
365
|
}
|
|
447
366
|
),
|
|
448
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ jsx6(
|
|
449
368
|
"path",
|
|
450
369
|
{
|
|
451
370
|
fill: "currentColor",
|
|
@@ -458,7 +377,7 @@ var SvgDefault = (props) => /* @__PURE__ */ jsxs6(
|
|
|
458
377
|
var Default_default = SvgDefault;
|
|
459
378
|
|
|
460
379
|
// src/icons/theme/Protanopia.tsx
|
|
461
|
-
import { jsx as
|
|
380
|
+
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
462
381
|
var SvgProtanopia = (props) => /* @__PURE__ */ jsxs7(
|
|
463
382
|
"svg",
|
|
464
383
|
{
|
|
@@ -467,7 +386,7 @@ var SvgProtanopia = (props) => /* @__PURE__ */ jsxs7(
|
|
|
467
386
|
viewBox: "0 0 28 29",
|
|
468
387
|
...props,
|
|
469
388
|
children: [
|
|
470
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ jsx7(
|
|
471
390
|
"rect",
|
|
472
391
|
{
|
|
473
392
|
width: 26.18,
|
|
@@ -479,14 +398,14 @@ var SvgProtanopia = (props) => /* @__PURE__ */ jsxs7(
|
|
|
479
398
|
rx: 13.09
|
|
480
399
|
}
|
|
481
400
|
),
|
|
482
|
-
/* @__PURE__ */
|
|
401
|
+
/* @__PURE__ */ jsx7(
|
|
483
402
|
"path",
|
|
484
403
|
{
|
|
485
404
|
fill: "currentColor",
|
|
486
405
|
d: "M9.252 7.152h5.045q1.692 0 2.83.585 1.14.575 1.682 1.61.554 1.024.554 2.379 0 1.507-.697 2.594-.688 1.086-2.072 1.569L19.937 22h-2.153l-3.107-5.773-.36.01h-3.219V22H9.252zm4.984 7.404q1.711 0 2.502-.728.8-.729.8-2.102 0-1.395-.8-2.164t-2.523-.769h-3.117v5.763z"
|
|
487
406
|
}
|
|
488
407
|
),
|
|
489
|
-
/* @__PURE__ */
|
|
408
|
+
/* @__PURE__ */ jsx7(
|
|
490
409
|
"path",
|
|
491
410
|
{
|
|
492
411
|
stroke: "currentColor",
|
|
@@ -500,7 +419,7 @@ var SvgProtanopia = (props) => /* @__PURE__ */ jsxs7(
|
|
|
500
419
|
var Protanopia_default = SvgProtanopia;
|
|
501
420
|
|
|
502
421
|
// src/icons/theme/Deuteranopia.tsx
|
|
503
|
-
import { jsx as
|
|
422
|
+
import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
504
423
|
var SvgDeuteranopia = (props) => /* @__PURE__ */ jsxs8(
|
|
505
424
|
"svg",
|
|
506
425
|
{
|
|
@@ -509,7 +428,7 @@ var SvgDeuteranopia = (props) => /* @__PURE__ */ jsxs8(
|
|
|
509
428
|
viewBox: "0 0 15 15",
|
|
510
429
|
...props,
|
|
511
430
|
children: [
|
|
512
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ jsx8(
|
|
513
432
|
"rect",
|
|
514
433
|
{
|
|
515
434
|
width: 13.09,
|
|
@@ -521,14 +440,14 @@ var SvgDeuteranopia = (props) => /* @__PURE__ */ jsxs8(
|
|
|
521
440
|
rx: 6.545
|
|
522
441
|
}
|
|
523
442
|
),
|
|
524
|
-
/* @__PURE__ */
|
|
443
|
+
/* @__PURE__ */ jsx8(
|
|
525
444
|
"path",
|
|
526
445
|
{
|
|
527
446
|
fill: "currentColor",
|
|
528
447
|
d: "M9.51 5.894q-.245-.734-.789-1.144-.538-.415-1.312-.415-.667 0-1.205.343-.534.345-.846 1.01-.308.667-.308 1.6t.313 1.6q.313.665.861 1.01.549.343 1.246.343.626 0 1.103-.261a1.87 1.87 0 0 0 .748-.754q.271-.492.282-1.138H7.665v-.81h2.84v.8q0 .907-.39 1.594-.389.687-1.081 1.061-.687.37-1.564.37-.984 0-1.738-.462-.748-.466-1.164-1.328-.41-.866-.41-2.025 0-1.153.41-2.015.416-.866 1.154-1.333.738-.465 1.687-.466.774 0 1.42.307.646.303 1.071.851.426.548.564 1.262z"
|
|
529
448
|
}
|
|
530
449
|
),
|
|
531
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ jsx8(
|
|
532
451
|
"path",
|
|
533
452
|
{
|
|
534
453
|
stroke: "currentColor",
|
|
@@ -542,7 +461,7 @@ var SvgDeuteranopia = (props) => /* @__PURE__ */ jsxs8(
|
|
|
542
461
|
var Deuteranopia_default = SvgDeuteranopia;
|
|
543
462
|
|
|
544
463
|
// src/react/ThemeSwitcherPortal.tsx
|
|
545
|
-
import { useEffect
|
|
464
|
+
import { useEffect, useRef, useState } from "react";
|
|
546
465
|
import { createPortal } from "react-dom";
|
|
547
466
|
var PORTAL_ID = "theme-switcher-portal";
|
|
548
467
|
var portalEl = null;
|
|
@@ -558,9 +477,9 @@ function ensurePortal() {
|
|
|
558
477
|
function ThemeSwitcherPortal({
|
|
559
478
|
children
|
|
560
479
|
}) {
|
|
561
|
-
const [container, setContainer] =
|
|
480
|
+
const [container, setContainer] = useState(null);
|
|
562
481
|
const ownerId = useRef(Symbol("ThemeSwitcherPortal"));
|
|
563
|
-
|
|
482
|
+
useEffect(() => {
|
|
564
483
|
const el = ensurePortal();
|
|
565
484
|
setContainer(el);
|
|
566
485
|
if (activeOwner === null) activeOwner = ownerId.current;
|
|
@@ -576,7 +495,7 @@ function ThemeSwitcherPortal({
|
|
|
576
495
|
}
|
|
577
496
|
|
|
578
497
|
// src/react/ThemeSwitcher.tsx
|
|
579
|
-
import { jsx as
|
|
498
|
+
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
580
499
|
var THEME_ICON = {
|
|
581
500
|
default: Default_default,
|
|
582
501
|
protanopia: Protanopia_default,
|
|
@@ -585,14 +504,14 @@ var THEME_ICON = {
|
|
|
585
504
|
};
|
|
586
505
|
function ThemeSwitcher({ options }) {
|
|
587
506
|
const { theme, updateTheme, language, updateLanguage } = useTheme();
|
|
588
|
-
const [hovered, setHovered] =
|
|
589
|
-
const list =
|
|
507
|
+
const [hovered, setHovered] = useState2(null);
|
|
508
|
+
const list = useMemo(
|
|
590
509
|
() => options?.length ? options : getThemeOptions(language),
|
|
591
510
|
[options, language]
|
|
592
511
|
);
|
|
593
|
-
const [isOpen, setIsOpen] =
|
|
512
|
+
const [isOpen, setIsOpen] = useState2(false);
|
|
594
513
|
const wrapperRef = useRef2(null);
|
|
595
|
-
|
|
514
|
+
useEffect2(() => {
|
|
596
515
|
const handleClickOutside = (event) => {
|
|
597
516
|
if (wrapperRef.current && !wrapperRef.current.contains(event.target)) {
|
|
598
517
|
setIsOpen(false);
|
|
@@ -605,8 +524,8 @@ function ThemeSwitcher({ options }) {
|
|
|
605
524
|
e.stopPropagation();
|
|
606
525
|
setIsOpen((prev) => !prev);
|
|
607
526
|
};
|
|
608
|
-
return /* @__PURE__ */
|
|
609
|
-
/* @__PURE__ */
|
|
527
|
+
return /* @__PURE__ */ jsx9(ThemeSwitcherPortal, { children: /* @__PURE__ */ jsxs9("div", { ref: wrapperRef, className: "z-[10000]", children: [
|
|
528
|
+
/* @__PURE__ */ jsx9(
|
|
610
529
|
"button",
|
|
611
530
|
{
|
|
612
531
|
type: "button",
|
|
@@ -614,7 +533,7 @@ function ThemeSwitcher({ options }) {
|
|
|
614
533
|
"aria-expanded": isOpen,
|
|
615
534
|
onClick: toggle,
|
|
616
535
|
className: "fixed right-[25px] bottom-[25px] w-[60px] h-[60px] p-[10px] bg-[#ffffff] rounded-full flex justify-center items-center shadow-[0_0_3px_0_rgba(0,0,0,0.17)]",
|
|
617
|
-
children: isOpen ? /* @__PURE__ */
|
|
536
|
+
children: isOpen ? /* @__PURE__ */ jsx9(X_default, { className: "self-center" }) : /* @__PURE__ */ jsx9(Logo_default, { className: "self-center" })
|
|
618
537
|
}
|
|
619
538
|
),
|
|
620
539
|
isOpen && /* @__PURE__ */ jsxs9(
|
|
@@ -624,7 +543,7 @@ function ThemeSwitcher({ options }) {
|
|
|
624
543
|
"aria-label": "Select theme",
|
|
625
544
|
className: "fixed bottom-[100px] right-[25px] flex-col bg-[#ffffff] rounded-[18px] w-[220px] gap-[11px] filter drop-shadow-[0_0_1.3px_rgba(0,0,0,0.25)]",
|
|
626
545
|
children: [
|
|
627
|
-
/* @__PURE__ */
|
|
546
|
+
/* @__PURE__ */ jsx9("div", { children: list.map((opt) => {
|
|
628
547
|
const Icon = THEME_ICON[opt.key];
|
|
629
548
|
return /* @__PURE__ */ jsxs9("div", { children: [
|
|
630
549
|
/* @__PURE__ */ jsxs9(
|
|
@@ -644,7 +563,7 @@ function ThemeSwitcher({ options }) {
|
|
|
644
563
|
theme === opt.key ? "bg-[#3D4852] text-[#ffffff]" : ""
|
|
645
564
|
].join(" "),
|
|
646
565
|
children: [
|
|
647
|
-
/* @__PURE__ */
|
|
566
|
+
/* @__PURE__ */ jsx9(
|
|
648
567
|
Icon,
|
|
649
568
|
{
|
|
650
569
|
width: 24,
|
|
@@ -652,22 +571,22 @@ function ThemeSwitcher({ options }) {
|
|
|
652
571
|
className: `inline-block ${theme === opt.key || hovered === opt.key ? "text-white" : "text-[#3D4852]"}`
|
|
653
572
|
}
|
|
654
573
|
),
|
|
655
|
-
/* @__PURE__ */
|
|
574
|
+
/* @__PURE__ */ jsx9("span", { className: "group-hover:text-[#ffffff]", children: opt.label })
|
|
656
575
|
]
|
|
657
576
|
},
|
|
658
577
|
opt.key
|
|
659
578
|
),
|
|
660
|
-
opt.key !== "tritanopia" && /* @__PURE__ */
|
|
579
|
+
opt.key !== "tritanopia" && /* @__PURE__ */ jsx9("div", { className: "border-b-[0.5px] border-b-[#D9D9D9] w-full" })
|
|
661
580
|
] }, opt.key);
|
|
662
581
|
}) }),
|
|
663
|
-
/* @__PURE__ */
|
|
664
|
-
/* @__PURE__ */
|
|
582
|
+
/* @__PURE__ */ jsx9("div", { className: "w-full border-[0.5px] border-[#B8B8B8]" }),
|
|
583
|
+
/* @__PURE__ */ jsx9("div", { className: "flex justify-evenly items-center gap-[10px] px-[10px] my-[15px]", children: language === "English" ? /* @__PURE__ */ jsxs9(
|
|
665
584
|
"div",
|
|
666
585
|
{
|
|
667
586
|
className: `hover:cursor-pointer flex text-[18px] text-[#3D4852] gap-[8px] items-center justify-center`,
|
|
668
587
|
onClick: () => updateLanguage("Korean"),
|
|
669
588
|
children: [
|
|
670
|
-
/* @__PURE__ */
|
|
589
|
+
/* @__PURE__ */ jsx9(Us_default, { width: 20 }),
|
|
671
590
|
"English"
|
|
672
591
|
]
|
|
673
592
|
}
|
|
@@ -677,7 +596,7 @@ function ThemeSwitcher({ options }) {
|
|
|
677
596
|
className: `hover:cursor-pointer flex text-[18px] text-[#3D4852] gap-[8px] items-center justify-center `,
|
|
678
597
|
onClick: () => updateLanguage("English"),
|
|
679
598
|
children: [
|
|
680
|
-
/* @__PURE__ */
|
|
599
|
+
/* @__PURE__ */ jsx9(Kr_default, { width: 20 }),
|
|
681
600
|
"Korean"
|
|
682
601
|
]
|
|
683
602
|
}
|