@otmc/ui 0.1.5 → 0.1.7
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-BGUL4HIW.js +410 -0
- package/dist/chunk-BGUL4HIW.js.map +1 -0
- package/dist/editor.cjs +5075 -0
- package/dist/editor.cjs.map +1 -0
- package/dist/editor.d.cts +217 -0
- package/dist/editor.d.ts +217 -0
- package/dist/editor.js +4807 -0
- package/dist/editor.js.map +1 -0
- package/dist/index.cjs +417 -128
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +27 -1
- package/dist/index.d.ts +27 -1
- package/dist/index.js +104 -203
- package/dist/index.js.map +1 -1
- package/dist/instructions-CCxIhaa6.d.cts +116 -0
- package/dist/instructions-CCxIhaa6.d.ts +116 -0
- package/package.json +91 -12
- package/{scripts → src/scripts}/prebuild.js +3 -1
package/dist/index.js
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BACKEND_URL,
|
|
3
|
+
NotificationCenter_default,
|
|
4
|
+
ThemeProvider,
|
|
5
|
+
apiClient,
|
|
6
|
+
apiUtils,
|
|
7
|
+
copyToClipboard,
|
|
8
|
+
debug,
|
|
9
|
+
getBackendUrl,
|
|
10
|
+
instructionsApi,
|
|
11
|
+
llmApi,
|
|
12
|
+
resolveColorScheme,
|
|
13
|
+
setAccessTokenGetter,
|
|
14
|
+
setBackendUrl,
|
|
15
|
+
useTheme
|
|
16
|
+
} from "./chunk-BGUL4HIW.js";
|
|
17
|
+
|
|
1
18
|
// src/branding/Footer.tsx
|
|
2
19
|
import { Stack, Group, Text, Anchor, Tooltip, ActionIcon } from "@mantine/core";
|
|
3
20
|
import { Copyright } from "lucide-react";
|
|
@@ -107,108 +124,7 @@ import {
|
|
|
107
124
|
Tooltip as Tooltip2
|
|
108
125
|
} from "@mantine/core";
|
|
109
126
|
import { Sun, Moon, Monitor, Clock } from "lucide-react";
|
|
110
|
-
|
|
111
|
-
// src/contexts/ThemeProvider.tsx
|
|
112
|
-
import { createContext, useContext, useEffect, useState } from "react";
|
|
113
|
-
import {
|
|
114
|
-
useMantineColorScheme
|
|
115
|
-
} from "@mantine/core";
|
|
116
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
117
|
-
var ThemeContext = createContext(null);
|
|
118
|
-
var useTheme = () => {
|
|
119
|
-
const ctx = useContext(ThemeContext);
|
|
120
|
-
if (!ctx) {
|
|
121
|
-
throw new Error("useTheme must be used inside ThemeProvider");
|
|
122
|
-
}
|
|
123
|
-
return ctx;
|
|
124
|
-
};
|
|
125
|
-
var resolveColorScheme = (colorScheme) => {
|
|
126
|
-
if (colorScheme === "auto") {
|
|
127
|
-
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
128
|
-
}
|
|
129
|
-
return colorScheme;
|
|
130
|
-
};
|
|
131
|
-
var resolveTimeBasedTheme = (settings) => {
|
|
132
|
-
const now = /* @__PURE__ */ new Date();
|
|
133
|
-
const minutes = now.getHours() * 60 + now.getMinutes();
|
|
134
|
-
const [lh, lm] = settings.lightStartTime.split(":").map(Number);
|
|
135
|
-
const [dh, dm] = settings.darkStartTime.split(":").map(Number);
|
|
136
|
-
const light = lh * 60 + lm;
|
|
137
|
-
const dark = dh * 60 + dm;
|
|
138
|
-
return light < dark ? minutes >= light && minutes < dark ? "light" : "dark" : minutes >= light || minutes < dark ? "light" : "dark";
|
|
139
|
-
};
|
|
140
|
-
var resolveAutoScheme = () => window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
141
|
-
var ThemeProvider = ({
|
|
142
|
-
children,
|
|
143
|
-
defaultTheme = "auto",
|
|
144
|
-
defaultTimeBasedSettings = {
|
|
145
|
-
lightStartTime: "07:00",
|
|
146
|
-
darkStartTime: "19:00"
|
|
147
|
-
},
|
|
148
|
-
storagePrefix = ""
|
|
149
|
-
}) => {
|
|
150
|
-
const themeStorageKey = `${storagePrefix}theme`;
|
|
151
|
-
const timeStorageKey = `${storagePrefix}time-theme`;
|
|
152
|
-
const { colorScheme, setColorScheme } = useMantineColorScheme();
|
|
153
|
-
const [theme, setThemeState] = useState(
|
|
154
|
-
() => localStorage.getItem(themeStorageKey) ?? defaultTheme
|
|
155
|
-
);
|
|
156
|
-
const [timeBasedSettings, setTimeBasedSettings] = useState(
|
|
157
|
-
() => JSON.parse(localStorage.getItem(timeStorageKey) || "null") ?? defaultTimeBasedSettings
|
|
158
|
-
);
|
|
159
|
-
const handleSetTimeBasedSettings = (settings) => {
|
|
160
|
-
setTimeBasedSettings(settings);
|
|
161
|
-
localStorage.setItem(timeStorageKey, JSON.stringify(settings));
|
|
162
|
-
if (theme === "time-based") {
|
|
163
|
-
applyTheme("time-based");
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
|
-
const applyTheme = (mode) => {
|
|
167
|
-
let scheme;
|
|
168
|
-
switch (mode) {
|
|
169
|
-
case "light":
|
|
170
|
-
case "dark":
|
|
171
|
-
case "auto":
|
|
172
|
-
scheme = mode;
|
|
173
|
-
break;
|
|
174
|
-
case "time-based":
|
|
175
|
-
scheme = resolveTimeBasedTheme(timeBasedSettings);
|
|
176
|
-
break;
|
|
177
|
-
default:
|
|
178
|
-
scheme = "auto";
|
|
179
|
-
}
|
|
180
|
-
setColorScheme(scheme);
|
|
181
|
-
};
|
|
182
|
-
useEffect(() => {
|
|
183
|
-
applyTheme(theme);
|
|
184
|
-
}, [theme, timeBasedSettings]);
|
|
185
|
-
const setTheme = (mode) => {
|
|
186
|
-
setThemeState(mode);
|
|
187
|
-
localStorage.setItem(themeStorageKey, mode);
|
|
188
|
-
applyTheme(mode);
|
|
189
|
-
};
|
|
190
|
-
const toggleTheme = () => {
|
|
191
|
-
setTheme(colorScheme === "dark" ? "light" : "dark");
|
|
192
|
-
};
|
|
193
|
-
const currentTheme = theme === "time-based" ? resolveTimeBasedTheme(timeBasedSettings) : colorScheme === "auto" ? resolveAutoScheme() : colorScheme;
|
|
194
|
-
return /* @__PURE__ */ jsx2(
|
|
195
|
-
ThemeContext.Provider,
|
|
196
|
-
{
|
|
197
|
-
value: {
|
|
198
|
-
theme,
|
|
199
|
-
currentTheme,
|
|
200
|
-
setTheme,
|
|
201
|
-
toggleTheme,
|
|
202
|
-
timeBasedSettings,
|
|
203
|
-
setTimeBasedSettings: handleSetTimeBasedSettings
|
|
204
|
-
},
|
|
205
|
-
children
|
|
206
|
-
}
|
|
207
|
-
);
|
|
208
|
-
};
|
|
209
|
-
|
|
210
|
-
// src/components/ThemeMenu.tsx
|
|
211
|
-
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
127
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
212
128
|
var DEFAULT_LABELS = {
|
|
213
129
|
tooltip: "Ch\u1EBF \u0111\u1ED9 giao di\u1EC7n",
|
|
214
130
|
title: "Ch\u1EBF \u0111\u1ED9 giao di\u1EC7n",
|
|
@@ -218,10 +134,10 @@ var DEFAULT_LABELS = {
|
|
|
218
134
|
timeBased: "Theo th\u1EDDi gian"
|
|
219
135
|
};
|
|
220
136
|
var MODE_ICONS = {
|
|
221
|
-
light: /* @__PURE__ */
|
|
222
|
-
dark: /* @__PURE__ */
|
|
223
|
-
auto: /* @__PURE__ */
|
|
224
|
-
"time-based": /* @__PURE__ */
|
|
137
|
+
light: /* @__PURE__ */ jsx2(Sun, { size: 16 }),
|
|
138
|
+
dark: /* @__PURE__ */ jsx2(Moon, { size: 16 }),
|
|
139
|
+
auto: /* @__PURE__ */ jsx2(Monitor, { size: 16 }),
|
|
140
|
+
"time-based": /* @__PURE__ */ jsx2(Clock, { size: 16 })
|
|
225
141
|
};
|
|
226
142
|
function ThemeMenu({
|
|
227
143
|
modes = ["light", "dark", "auto", "time-based"],
|
|
@@ -234,9 +150,9 @@ function ThemeMenu({
|
|
|
234
150
|
const text = { ...DEFAULT_LABELS, ...labels };
|
|
235
151
|
const isDark = currentTheme === "dark";
|
|
236
152
|
const activeColor = isDark ? "yellow.8" : "blue.8";
|
|
237
|
-
const triggerIcon = theme === "light" ? /* @__PURE__ */
|
|
153
|
+
const triggerIcon = theme === "light" ? /* @__PURE__ */ jsx2(Sun, { size: iconSize, strokeWidth: 2 }) : theme === "dark" ? /* @__PURE__ */ jsx2(Moon, { size: iconSize, strokeWidth: 2 }) : theme === "auto" ? /* @__PURE__ */ jsx2(Monitor, { size: iconSize, strokeWidth: 2 }) : /* @__PURE__ */ jsx2(Clock, { size: iconSize, strokeWidth: 2 });
|
|
238
154
|
return /* @__PURE__ */ jsxs2(Menu, { shadow: "md", width: 200, position: "bottom-end", ...menuProps, children: [
|
|
239
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ jsx2(Menu.Target, { children: /* @__PURE__ */ jsx2(Tooltip2, { label: text.tooltip, position: "bottom", withArrow: true, children: /* @__PURE__ */ jsx2(
|
|
240
156
|
ActionIcon2,
|
|
241
157
|
{
|
|
242
158
|
variant: "subtle",
|
|
@@ -250,8 +166,8 @@ function ThemeMenu({
|
|
|
250
166
|
}
|
|
251
167
|
) }) }),
|
|
252
168
|
/* @__PURE__ */ jsxs2(Menu.Dropdown, { style: { borderRadius: "11px" }, children: [
|
|
253
|
-
/* @__PURE__ */
|
|
254
|
-
modes.map((mode) => /* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ jsx2(Menu.Label, { children: text.title }),
|
|
170
|
+
modes.map((mode) => /* @__PURE__ */ jsx2(
|
|
255
171
|
Menu.Item,
|
|
256
172
|
{
|
|
257
173
|
leftSection: MODE_ICONS[mode],
|
|
@@ -286,7 +202,7 @@ import {
|
|
|
286
202
|
IconPalette,
|
|
287
203
|
IconSun
|
|
288
204
|
} from "@tabler/icons-react";
|
|
289
|
-
import { Fragment, jsx as
|
|
205
|
+
import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
290
206
|
var DEFAULT_LABELS2 = {
|
|
291
207
|
title: "Appearance",
|
|
292
208
|
subtitle: "Control how the application looks and feels",
|
|
@@ -302,10 +218,10 @@ var DEFAULT_LABELS2 = {
|
|
|
302
218
|
timeBased: "Time-based"
|
|
303
219
|
};
|
|
304
220
|
var MODE_ICONS2 = {
|
|
305
|
-
light: /* @__PURE__ */
|
|
306
|
-
dark: /* @__PURE__ */
|
|
307
|
-
auto: /* @__PURE__ */
|
|
308
|
-
"time-based": /* @__PURE__ */
|
|
221
|
+
light: /* @__PURE__ */ jsx3(IconSun, { size: 16 }),
|
|
222
|
+
dark: /* @__PURE__ */ jsx3(IconMoon, { size: 16 }),
|
|
223
|
+
auto: /* @__PURE__ */ jsx3(IconDeviceLaptop, { size: 16 }),
|
|
224
|
+
"time-based": /* @__PURE__ */ jsx3(IconClock, { size: 16 })
|
|
309
225
|
};
|
|
310
226
|
var MODE_ORDER = ["light", "dark", "auto", "time-based"];
|
|
311
227
|
function ThemeSetting({
|
|
@@ -324,7 +240,7 @@ function ThemeSetting({
|
|
|
324
240
|
const isTimeBased = theme === "time-based";
|
|
325
241
|
const isDark = currentTheme === "dark";
|
|
326
242
|
const showTimeBased = modes.includes("time-based");
|
|
327
|
-
return /* @__PURE__ */
|
|
243
|
+
return /* @__PURE__ */ jsx3(
|
|
328
244
|
Card,
|
|
329
245
|
{
|
|
330
246
|
withBorder: true,
|
|
@@ -336,15 +252,15 @@ function ThemeSetting({
|
|
|
336
252
|
children: /* @__PURE__ */ jsxs3(Stack2, { gap: "lg", style: { flex: 1 }, children: [
|
|
337
253
|
/* @__PURE__ */ jsxs3(Box, { children: [
|
|
338
254
|
/* @__PURE__ */ jsxs3(Group2, { gap: "xs", children: [
|
|
339
|
-
/* @__PURE__ */
|
|
340
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ jsx3(ThemeIcon, { variant: "subtle", color: "blue.8", size: "md", radius: "md", children: /* @__PURE__ */ jsx3(IconPalette, { size: 25 }) }),
|
|
256
|
+
/* @__PURE__ */ jsx3(Title, { order: 4, children: text.title })
|
|
341
257
|
] }),
|
|
342
|
-
/* @__PURE__ */
|
|
258
|
+
/* @__PURE__ */ jsx3(Text2, { size: "sm", c: "dimmed", children: text.subtitle })
|
|
343
259
|
] }),
|
|
344
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ jsx3(Divider, {}),
|
|
345
261
|
/* @__PURE__ */ jsxs3(Box, { children: [
|
|
346
|
-
/* @__PURE__ */
|
|
347
|
-
/* @__PURE__ */
|
|
262
|
+
/* @__PURE__ */ jsx3(Text2, { fw: 500, mb: 6, children: text.themeMode }),
|
|
263
|
+
/* @__PURE__ */ jsx3(
|
|
348
264
|
SegmentedControl,
|
|
349
265
|
{
|
|
350
266
|
fullWidth: true,
|
|
@@ -358,21 +274,21 @@ function ThemeSetting({
|
|
|
358
274
|
value: mode,
|
|
359
275
|
label: /* @__PURE__ */ jsxs3(Group2, { gap: 6, children: [
|
|
360
276
|
MODE_ICONS2[mode],
|
|
361
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ jsx3("span", { children: mode === "light" ? text.light : mode === "dark" ? text.dark : mode === "auto" ? text.system : text.timeBased })
|
|
362
278
|
] })
|
|
363
279
|
})
|
|
364
280
|
)
|
|
365
281
|
}
|
|
366
282
|
),
|
|
367
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ jsx3(Text2, { size: "xs", c: "dimmed", mt: "xs", children: text.themeModeHint }),
|
|
368
284
|
/* @__PURE__ */ jsxs3(Text2, { size: "xs", mt: 4, children: [
|
|
369
285
|
text.currentlyActive,
|
|
370
286
|
" ",
|
|
371
|
-
/* @__PURE__ */
|
|
287
|
+
/* @__PURE__ */ jsx3("b", { children: isDark ? text.dark : text.light })
|
|
372
288
|
] })
|
|
373
289
|
] }),
|
|
374
290
|
showTimeBased && /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
375
|
-
/* @__PURE__ */
|
|
291
|
+
/* @__PURE__ */ jsx3(Divider, {}),
|
|
376
292
|
/* @__PURE__ */ jsxs3(
|
|
377
293
|
Box,
|
|
378
294
|
{
|
|
@@ -383,13 +299,13 @@ function ThemeSetting({
|
|
|
383
299
|
},
|
|
384
300
|
children: [
|
|
385
301
|
/* @__PURE__ */ jsxs3(Group2, { gap: 6, mb: 6, children: [
|
|
386
|
-
/* @__PURE__ */
|
|
387
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ jsx3(IconClock, { size: 16 }),
|
|
303
|
+
/* @__PURE__ */ jsx3(Text2, { fw: 500, children: text.timeBasedSettings })
|
|
388
304
|
] }),
|
|
389
305
|
/* @__PURE__ */ jsxs3(Group2, { grow: true, children: [
|
|
390
306
|
/* @__PURE__ */ jsxs3(Box, { children: [
|
|
391
|
-
/* @__PURE__ */
|
|
392
|
-
/* @__PURE__ */
|
|
307
|
+
/* @__PURE__ */ jsx3(Text2, { size: "sm", mb: 4, children: text.lightStartTime }),
|
|
308
|
+
/* @__PURE__ */ jsx3(
|
|
393
309
|
TimeInput,
|
|
394
310
|
{
|
|
395
311
|
withSeconds: false,
|
|
@@ -403,8 +319,8 @@ function ThemeSetting({
|
|
|
403
319
|
)
|
|
404
320
|
] }),
|
|
405
321
|
/* @__PURE__ */ jsxs3(Box, { children: [
|
|
406
|
-
/* @__PURE__ */
|
|
407
|
-
/* @__PURE__ */
|
|
322
|
+
/* @__PURE__ */ jsx3(Text2, { size: "sm", mb: 4, children: text.darkStartTime }),
|
|
323
|
+
/* @__PURE__ */ jsx3(
|
|
408
324
|
TimeInput,
|
|
409
325
|
{
|
|
410
326
|
withSeconds: false,
|
|
@@ -425,7 +341,7 @@ function ThemeSetting({
|
|
|
425
341
|
" \u2192",
|
|
426
342
|
" ",
|
|
427
343
|
timeBasedSettings.darkStartTime,
|
|
428
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ jsx3("br", {}),
|
|
429
345
|
text.dark,
|
|
430
346
|
": ",
|
|
431
347
|
timeBasedSettings.darkStartTime,
|
|
@@ -443,7 +359,7 @@ function ThemeSetting({
|
|
|
443
359
|
}
|
|
444
360
|
|
|
445
361
|
// src/modals/Information.tsx
|
|
446
|
-
import { useState
|
|
362
|
+
import { useState } from "react";
|
|
447
363
|
import {
|
|
448
364
|
Modal,
|
|
449
365
|
Stack as Stack3,
|
|
@@ -471,31 +387,6 @@ import {
|
|
|
471
387
|
User
|
|
472
388
|
} from "lucide-react";
|
|
473
389
|
|
|
474
|
-
// src/utils/commonUtils.ts
|
|
475
|
-
var copyToClipboard = async (text) => {
|
|
476
|
-
try {
|
|
477
|
-
if (navigator.clipboard && window.isSecureContext) {
|
|
478
|
-
await navigator.clipboard.writeText(text);
|
|
479
|
-
return true;
|
|
480
|
-
}
|
|
481
|
-
const textarea = document.createElement("textarea");
|
|
482
|
-
textarea.value = text;
|
|
483
|
-
textarea.style.position = "fixed";
|
|
484
|
-
textarea.style.left = "-9999px";
|
|
485
|
-
textarea.style.top = "-9999px";
|
|
486
|
-
textarea.style.opacity = "0";
|
|
487
|
-
document.body.appendChild(textarea);
|
|
488
|
-
textarea.focus();
|
|
489
|
-
textarea.select();
|
|
490
|
-
const success = document.execCommand("copy");
|
|
491
|
-
document.body.removeChild(textarea);
|
|
492
|
-
return success;
|
|
493
|
-
} catch (err) {
|
|
494
|
-
console.error("Failed to copy to clipboard:", err);
|
|
495
|
-
return false;
|
|
496
|
-
}
|
|
497
|
-
};
|
|
498
|
-
|
|
499
390
|
// src/utils/timeUtils.ts
|
|
500
391
|
function normalizeDate(dateInput) {
|
|
501
392
|
if (dateInput instanceof Date) {
|
|
@@ -609,10 +500,10 @@ function formatHumanDate(date, options) {
|
|
|
609
500
|
}
|
|
610
501
|
|
|
611
502
|
// src/modals/Information.tsx
|
|
612
|
-
import { jsx as
|
|
503
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
613
504
|
var DEFAULT_TITLE = /* @__PURE__ */ jsxs4(Group3, { gap: "xs", wrap: "nowrap", children: [
|
|
614
|
-
/* @__PURE__ */
|
|
615
|
-
/* @__PURE__ */
|
|
505
|
+
/* @__PURE__ */ jsx4(Cpu, { size: 20 }),
|
|
506
|
+
/* @__PURE__ */ jsx4("span", { children: "System Information" })
|
|
616
507
|
] });
|
|
617
508
|
function InformationContent({ info }) {
|
|
618
509
|
const colorScheme = useComputedColorScheme();
|
|
@@ -620,31 +511,31 @@ function InformationContent({ info }) {
|
|
|
620
511
|
const versionType = info.versionType ?? DEFAULT_VERSION_TYPE;
|
|
621
512
|
const cards = [
|
|
622
513
|
{
|
|
623
|
-
icon: /* @__PURE__ */
|
|
514
|
+
icon: /* @__PURE__ */ jsx4(User, { size: 18 }),
|
|
624
515
|
label: "Author",
|
|
625
516
|
value: author,
|
|
626
517
|
color: "blue"
|
|
627
518
|
},
|
|
628
519
|
{
|
|
629
|
-
icon: /* @__PURE__ */
|
|
520
|
+
icon: /* @__PURE__ */ jsx4(Award, { size: 18 }),
|
|
630
521
|
label: "License",
|
|
631
522
|
value: info.license ?? DEFAULT_LICENSE,
|
|
632
523
|
color: "orange"
|
|
633
524
|
},
|
|
634
525
|
{
|
|
635
|
-
icon: /* @__PURE__ */
|
|
526
|
+
icon: /* @__PURE__ */ jsx4(MapPin, { size: 18 }),
|
|
636
527
|
label: "Location",
|
|
637
528
|
value: info.location ?? DEFAULT_LOCATION,
|
|
638
529
|
color: "teal"
|
|
639
530
|
},
|
|
640
531
|
{
|
|
641
|
-
icon: /* @__PURE__ */
|
|
532
|
+
icon: /* @__PURE__ */ jsx4(Tag, { size: 18 }),
|
|
642
533
|
label: "Version Type",
|
|
643
534
|
value: versionType,
|
|
644
535
|
color: "red"
|
|
645
536
|
},
|
|
646
537
|
{
|
|
647
|
-
icon: /* @__PURE__ */
|
|
538
|
+
icon: /* @__PURE__ */ jsx4(Calendar, { size: 18 }),
|
|
648
539
|
label: "Build Time",
|
|
649
540
|
value: info.buildTime !== void 0 ? formatAbsoluteAndRelativeTime(info.buildTime) : UNKNOWN,
|
|
650
541
|
color: "green"
|
|
@@ -655,8 +546,8 @@ function InformationContent({ info }) {
|
|
|
655
546
|
/* @__PURE__ */ jsxs4(Stack3, { gap: "xs", align: "center", children: [
|
|
656
547
|
info.logo,
|
|
657
548
|
/* @__PURE__ */ jsxs4(Stack3, { gap: 2, align: "center", children: [
|
|
658
|
-
/* @__PURE__ */
|
|
659
|
-
info.tagline && /* @__PURE__ */
|
|
549
|
+
/* @__PURE__ */ jsx4(Title2, { order: 2, children: info.name }),
|
|
550
|
+
info.tagline && /* @__PURE__ */ jsx4(Text3, { size: "sm", c: "dimmed", w: 600, ta: "center", children: info.tagline })
|
|
660
551
|
] }),
|
|
661
552
|
/* @__PURE__ */ jsxs4(Group3, { gap: "xs", children: [
|
|
662
553
|
info.version && /* @__PURE__ */ jsxs4(
|
|
@@ -691,19 +582,19 @@ function InformationContent({ info }) {
|
|
|
691
582
|
)
|
|
692
583
|
] })
|
|
693
584
|
] }),
|
|
694
|
-
/* @__PURE__ */
|
|
585
|
+
/* @__PURE__ */ jsx4(Divider2, { label: "System Information", labelPosition: "center" }),
|
|
695
586
|
/* @__PURE__ */ jsxs4(SimpleGrid, { cols: { base: 1, sm: 2 }, children: [
|
|
696
|
-
cards.map((card) => /* @__PURE__ */
|
|
587
|
+
cards.map((card) => /* @__PURE__ */ jsx4(
|
|
697
588
|
InfoCard,
|
|
698
589
|
{
|
|
699
|
-
icon: card.icon ?? /* @__PURE__ */
|
|
590
|
+
icon: card.icon ?? /* @__PURE__ */ jsx4(Award, { size: 18 }),
|
|
700
591
|
label: card.label,
|
|
701
592
|
value: card.value,
|
|
702
593
|
color: card.color ?? "gray"
|
|
703
594
|
},
|
|
704
595
|
card.label
|
|
705
596
|
)),
|
|
706
|
-
/* @__PURE__ */
|
|
597
|
+
/* @__PURE__ */ jsx4(
|
|
707
598
|
Paper,
|
|
708
599
|
{
|
|
709
600
|
withBorder: true,
|
|
@@ -712,18 +603,18 @@ function InformationContent({ info }) {
|
|
|
712
603
|
bg: colorScheme === "dark" ? "gray.9" : "gray.0",
|
|
713
604
|
children: /* @__PURE__ */ jsxs4(Group3, { justify: "space-between", wrap: "nowrap", children: [
|
|
714
605
|
/* @__PURE__ */ jsxs4(Group3, { gap: "sm", flex: 1, children: [
|
|
715
|
-
/* @__PURE__ */
|
|
606
|
+
/* @__PURE__ */ jsx4(ThemeIcon2, { variant: "light", color: "yellow", size: "lg", radius: "14px", children: /* @__PURE__ */ jsx4(Hash, { size: 18 }) }),
|
|
716
607
|
/* @__PURE__ */ jsxs4(Stack3, { gap: 2, children: [
|
|
717
|
-
/* @__PURE__ */
|
|
718
|
-
/* @__PURE__ */
|
|
608
|
+
/* @__PURE__ */ jsx4(Text3, { size: "xs", c: "dimmed", fw: 700, tt: "uppercase", children: "Build ID" }),
|
|
609
|
+
/* @__PURE__ */ jsx4(Text3, { size: "sm", fw: 500, truncate: true, children: info.buildId ?? UNKNOWN })
|
|
719
610
|
] })
|
|
720
611
|
] }),
|
|
721
|
-
info.buildId && /* @__PURE__ */
|
|
612
|
+
info.buildId && /* @__PURE__ */ jsx4(CopyBuildIdButton, { buildId: info.buildId })
|
|
722
613
|
] })
|
|
723
614
|
}
|
|
724
615
|
)
|
|
725
616
|
] }),
|
|
726
|
-
/* @__PURE__ */
|
|
617
|
+
/* @__PURE__ */ jsx4(
|
|
727
618
|
Footer,
|
|
728
619
|
{
|
|
729
620
|
copyright: info.copyright,
|
|
@@ -740,7 +631,7 @@ function InformationModal({
|
|
|
740
631
|
info,
|
|
741
632
|
title = DEFAULT_TITLE
|
|
742
633
|
}) {
|
|
743
|
-
return /* @__PURE__ */
|
|
634
|
+
return /* @__PURE__ */ jsx4(
|
|
744
635
|
Modal,
|
|
745
636
|
{
|
|
746
637
|
opened,
|
|
@@ -760,12 +651,12 @@ function InformationModal({
|
|
|
760
651
|
}
|
|
761
652
|
},
|
|
762
653
|
title,
|
|
763
|
-
children: /* @__PURE__ */
|
|
654
|
+
children: /* @__PURE__ */ jsx4(InformationContent, { info })
|
|
764
655
|
}
|
|
765
656
|
);
|
|
766
657
|
}
|
|
767
658
|
function CopyBuildIdButton({ buildId }) {
|
|
768
|
-
const [copied, setCopied] =
|
|
659
|
+
const [copied, setCopied] = useState(false);
|
|
769
660
|
const handleCopy = async () => {
|
|
770
661
|
const success = await copyToClipboard(buildId);
|
|
771
662
|
if (success) {
|
|
@@ -773,13 +664,13 @@ function CopyBuildIdButton({ buildId }) {
|
|
|
773
664
|
setTimeout(() => setCopied(false), 2e3);
|
|
774
665
|
}
|
|
775
666
|
};
|
|
776
|
-
return /* @__PURE__ */
|
|
667
|
+
return /* @__PURE__ */ jsx4(Tooltip3, { label: copied ? "Copied!" : "Copy ID", withArrow: true, children: /* @__PURE__ */ jsx4(
|
|
777
668
|
ActionIcon3,
|
|
778
669
|
{
|
|
779
670
|
variant: "subtle",
|
|
780
671
|
color: copied ? "teal" : "gray",
|
|
781
672
|
onClick: handleCopy,
|
|
782
|
-
children: copied ? /* @__PURE__ */
|
|
673
|
+
children: copied ? /* @__PURE__ */ jsx4(Check, { size: 16 }) : /* @__PURE__ */ jsx4(Copy, { size: 16 })
|
|
783
674
|
}
|
|
784
675
|
) });
|
|
785
676
|
}
|
|
@@ -790,11 +681,11 @@ function InfoCard({
|
|
|
790
681
|
color
|
|
791
682
|
}) {
|
|
792
683
|
const colorScheme = useComputedColorScheme();
|
|
793
|
-
return /* @__PURE__ */
|
|
794
|
-
/* @__PURE__ */
|
|
684
|
+
return /* @__PURE__ */ jsx4(Paper, { withBorder: true, p: "md", radius: "18px", h: "100%", bg: colorScheme === "dark" ? "gray.9" : "gray.0", children: /* @__PURE__ */ jsxs4(Group3, { gap: "sm", align: "flex-start", children: [
|
|
685
|
+
/* @__PURE__ */ jsx4(ThemeIcon2, { color, variant: "light", size: "lg", radius: "14px", children: icon }),
|
|
795
686
|
/* @__PURE__ */ jsxs4(Stack3, { gap: 2, flex: 1, children: [
|
|
796
|
-
/* @__PURE__ */
|
|
797
|
-
/* @__PURE__ */
|
|
687
|
+
/* @__PURE__ */ jsx4(Text3, { size: "xs", c: "dimmed", fw: 700, tt: "uppercase", children: label }),
|
|
688
|
+
/* @__PURE__ */ jsx4(Text3, { size: "sm", fw: 500, lineClamp: 1, children: value })
|
|
798
689
|
] })
|
|
799
690
|
] }) });
|
|
800
691
|
}
|
|
@@ -817,14 +708,14 @@ import {
|
|
|
817
708
|
IconSearch,
|
|
818
709
|
IconFileOff
|
|
819
710
|
} from "@tabler/icons-react";
|
|
820
|
-
import { jsx as
|
|
711
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
821
712
|
function NotFound({
|
|
822
713
|
path,
|
|
823
714
|
onSearchClick,
|
|
824
715
|
onHomeClick
|
|
825
716
|
}) {
|
|
826
717
|
const currentPath = path || (typeof window !== "undefined" ? window.location.pathname : "/404");
|
|
827
|
-
return /* @__PURE__ */
|
|
718
|
+
return /* @__PURE__ */ jsx5(
|
|
828
719
|
Box2,
|
|
829
720
|
{
|
|
830
721
|
style: {
|
|
@@ -833,8 +724,8 @@ function NotFound({
|
|
|
833
724
|
alignItems: "center",
|
|
834
725
|
background: "radial-gradient(circle at top left, rgba(34, 139, 230, 0.15), transparent 45%), radial-gradient(circle at bottom right, rgba(34, 211, 238, 0.12), transparent 45%), var(--mantine-color-body)"
|
|
835
726
|
},
|
|
836
|
-
children: /* @__PURE__ */
|
|
837
|
-
/* @__PURE__ */
|
|
727
|
+
children: /* @__PURE__ */ jsx5(Container, { size: "xl", py: 80, children: /* @__PURE__ */ jsxs5(Paper2, { radius: "xl", p: 48, withBorder: true, style: { borderColor: "var(--mantine-color-default-border)", textAlign: "center" }, children: [
|
|
728
|
+
/* @__PURE__ */ jsx5(
|
|
838
729
|
Box2,
|
|
839
730
|
{
|
|
840
731
|
mx: "auto",
|
|
@@ -849,10 +740,10 @@ function NotFound({
|
|
|
849
740
|
background: "linear-gradient(135deg, var(--mantine-color-blue-6), var(--mantine-color-cyan-6))",
|
|
850
741
|
boxShadow: "0 12px 32px rgba(34, 139, 230, 0.35)"
|
|
851
742
|
},
|
|
852
|
-
children: /* @__PURE__ */
|
|
743
|
+
children: /* @__PURE__ */ jsx5(IconFileOff, { size: 44, stroke: 1.5, color: "white" })
|
|
853
744
|
}
|
|
854
745
|
),
|
|
855
|
-
/* @__PURE__ */
|
|
746
|
+
/* @__PURE__ */ jsx5(
|
|
856
747
|
Text4,
|
|
857
748
|
{
|
|
858
749
|
fz: { base: 72, sm: 100 },
|
|
@@ -863,33 +754,33 @@ function NotFound({
|
|
|
863
754
|
children: "404"
|
|
864
755
|
}
|
|
865
756
|
),
|
|
866
|
-
/* @__PURE__ */
|
|
867
|
-
/* @__PURE__ */
|
|
868
|
-
/* @__PURE__ */
|
|
869
|
-
/* @__PURE__ */
|
|
757
|
+
/* @__PURE__ */ jsx5(Badge2, { variant: "light", color: "blue", size: "lg", mb: "xs", children: "NOT FOUND" }),
|
|
758
|
+
/* @__PURE__ */ jsx5(Title3, { order: 2, mt: "sm", mb: "xs", children: "Trang kh\xF4ng t\u1ED3n t\u1EA1i" }),
|
|
759
|
+
/* @__PURE__ */ jsx5(Text4, { c: "dimmed", size: "sm", maw: 440, mx: "auto", children: "Trang ho\u1EB7c \u0111\u01B0\u1EDDng d\u1EABn b\u1EA1n truy c\u1EADp kh\xF4ng t\u1ED3n t\u1EA1i ho\u1EB7c \u0111\xE3 \u0111\u01B0\u1EE3c di chuy\u1EC3n. Vui l\xF2ng ki\u1EC3m tra l\u1EA1i \u0111\u01B0\u1EDDng d\u1EABn ho\u1EB7c quay v\u1EC1 trang ch\u1EE7." }),
|
|
760
|
+
/* @__PURE__ */ jsx5(Box2, { mt: "lg", children: /* @__PURE__ */ jsx5(Code, { color: "blue", variant: "light", px: "md", py: 6, children: currentPath }) }),
|
|
870
761
|
/* @__PURE__ */ jsxs5(Group4, { gap: "sm", mt: "xl", justify: "center", children: [
|
|
871
|
-
/* @__PURE__ */
|
|
762
|
+
/* @__PURE__ */ jsx5(
|
|
872
763
|
Button,
|
|
873
764
|
{
|
|
874
765
|
variant: "light",
|
|
875
|
-
leftSection: /* @__PURE__ */
|
|
766
|
+
leftSection: /* @__PURE__ */ jsx5(IconArrowLeft, { size: 16 }),
|
|
876
767
|
onClick: () => window.history.back(),
|
|
877
768
|
children: "Quay l\u1EA1i"
|
|
878
769
|
}
|
|
879
770
|
),
|
|
880
|
-
onSearchClick && /* @__PURE__ */
|
|
771
|
+
onSearchClick && /* @__PURE__ */ jsx5(
|
|
881
772
|
Button,
|
|
882
773
|
{
|
|
883
774
|
variant: "outline",
|
|
884
|
-
leftSection: /* @__PURE__ */
|
|
775
|
+
leftSection: /* @__PURE__ */ jsx5(IconSearch, { size: 16 }),
|
|
885
776
|
onClick: onSearchClick,
|
|
886
777
|
children: "T\xECm Docs"
|
|
887
778
|
}
|
|
888
779
|
),
|
|
889
|
-
/* @__PURE__ */
|
|
780
|
+
/* @__PURE__ */ jsx5(
|
|
890
781
|
Button,
|
|
891
782
|
{
|
|
892
|
-
leftSection: /* @__PURE__ */
|
|
783
|
+
leftSection: /* @__PURE__ */ jsx5(IconHome, { size: 16 }),
|
|
893
784
|
onClick: onHomeClick || (() => window.location.href = "/"),
|
|
894
785
|
children: "Trang ch\u1EE7"
|
|
895
786
|
}
|
|
@@ -900,6 +791,7 @@ function NotFound({
|
|
|
900
791
|
);
|
|
901
792
|
}
|
|
902
793
|
export {
|
|
794
|
+
BACKEND_URL,
|
|
903
795
|
DEFAULT_AUTHOR,
|
|
904
796
|
DEFAULT_AUTHOR_HREF,
|
|
905
797
|
DEFAULT_COPYRIGHT,
|
|
@@ -914,15 +806,24 @@ export {
|
|
|
914
806
|
ThemeProvider,
|
|
915
807
|
ThemeSetting,
|
|
916
808
|
UNKNOWN,
|
|
809
|
+
apiClient,
|
|
810
|
+
apiUtils,
|
|
917
811
|
calculateRemainingTime,
|
|
918
812
|
copyToClipboard,
|
|
813
|
+
debug,
|
|
919
814
|
formatAbsolute,
|
|
920
815
|
formatAbsoluteAndRelativeTime,
|
|
921
816
|
formatHumanDate,
|
|
922
817
|
formatRelativeTime,
|
|
818
|
+
getBackendUrl,
|
|
819
|
+
instructionsApi,
|
|
820
|
+
llmApi,
|
|
923
821
|
normalizeDate,
|
|
822
|
+
NotificationCenter_default as notificationCenter,
|
|
924
823
|
pad,
|
|
925
824
|
resolveColorScheme,
|
|
825
|
+
setAccessTokenGetter,
|
|
826
|
+
setBackendUrl,
|
|
926
827
|
useTheme
|
|
927
828
|
};
|
|
928
829
|
//# sourceMappingURL=index.js.map
|