@otmc/ui 0.0.0-stage → 0.1.2

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,93 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+
4
+ interface FooterSocialLink {
5
+ label: string;
6
+ href: string;
7
+ icon: ReactNode;
8
+ color?: string;
9
+ external?: boolean;
10
+ }
11
+ interface FooterProps {
12
+ copyright?: string;
13
+ author?: string;
14
+ authorHref?: string;
15
+ socialLinks?: FooterSocialLink[];
16
+ showCopyright?: boolean;
17
+ showAuthor?: boolean;
18
+ showSocialLinks?: boolean;
19
+ }
20
+ declare function Footer({ copyright, author, authorHref, socialLinks, showSocialLinks, }: FooterProps): react.JSX.Element;
21
+
22
+ interface InformationMetadata {
23
+ icon?: ReactNode;
24
+ label: string;
25
+ value: string;
26
+ color?: string;
27
+ }
28
+ interface ApplicationInfo {
29
+ name: string;
30
+ version?: string;
31
+ versionType?: string;
32
+ tagline?: string;
33
+ logo?: ReactNode;
34
+ author?: string;
35
+ authorHref?: string;
36
+ license?: string;
37
+ location?: string;
38
+ copyright?: string;
39
+ buildId?: string;
40
+ buildTime?: string | number | Date;
41
+ metadata?: InformationMetadata[];
42
+ socialLinks?: FooterSocialLink[];
43
+ }
44
+ interface InformationContentProps {
45
+ info: ApplicationInfo;
46
+ }
47
+ interface InformationModalProps {
48
+ opened: boolean;
49
+ onClose: () => void;
50
+ info: ApplicationInfo;
51
+ title?: ReactNode;
52
+ }
53
+ declare function InformationContent({ info }: InformationContentProps): react.JSX.Element;
54
+ declare function InformationModal({ opened, onClose, info, title, }: InformationModalProps): react.JSX.Element;
55
+
56
+ /**
57
+ * @License OTMC License
58
+ * @Copyright (c) 2026 OTMC Softwares. All rights reserved.
59
+ * @Contributors Trung Ng, OTMC Authors.
60
+ **/
61
+ declare const copyToClipboard: (text: string) => Promise<boolean>;
62
+
63
+ /**
64
+ * @License OTMC License
65
+ * @Copyright (c) 2026 OTMC Softwares. All rights reserved.
66
+ * @Contributors Trung Ng, OTMC Authors.
67
+ **/
68
+ declare const DEFAULT_AUTHOR = "Nguyen Van Trung, OTMC Contributors.";
69
+ declare const DEFAULT_AUTHOR_HREF = "https://github.com/otmc-sw";
70
+ declare const DEFAULT_COPYRIGHT = "OTMC Softwares. All rights reserved.";
71
+ declare const DEFAULT_LICENSE = "OTMC License.";
72
+ declare const DEFAULT_LOCATION = "An Nhon, Gia Lai, Viet Nam.";
73
+ declare const DEFAULT_VERSION_TYPE = "Internal";
74
+ declare const UNKNOWN = "Unknown";
75
+
76
+ /**
77
+ * @License OTMC License
78
+ * @Copyright (c) 2026 OTMC Softwares. All rights reserved.
79
+ * @Contributors Trung Ng, OTMC Authors.
80
+ **/
81
+ type TimestampFormatType = "absolute" | "relative";
82
+ declare function normalizeDate(dateInput: string | number | Date): Date | null;
83
+ declare function pad(n: number, width?: number): string;
84
+ declare function formatAbsolute(date: Date): string;
85
+ declare function formatRelativeTime(date: string | number | Date): string;
86
+ declare function formatAbsoluteAndRelativeTime(date: string | number | Date): string;
87
+ declare function calculateRemainingTime(targetDate: string | number | Date | undefined): string;
88
+ declare function formatHumanDate(date: string | number | Date, options?: {
89
+ showTime?: boolean;
90
+ showSeconds?: boolean;
91
+ }): string;
92
+
93
+ export { type ApplicationInfo, DEFAULT_AUTHOR, DEFAULT_AUTHOR_HREF, DEFAULT_COPYRIGHT, DEFAULT_LICENSE, DEFAULT_LOCATION, DEFAULT_VERSION_TYPE, Footer, type FooterProps, type FooterSocialLink, InformationContent, type InformationContentProps, type InformationMetadata, InformationModal, type InformationModalProps, type TimestampFormatType, UNKNOWN, calculateRemainingTime, copyToClipboard, formatAbsolute, formatAbsoluteAndRelativeTime, formatHumanDate, formatRelativeTime, normalizeDate, pad };
package/dist/index.js ADDED
@@ -0,0 +1,480 @@
1
+ // src/branding/Footer.tsx
2
+ import { Stack, Group, Text, Anchor, Tooltip, ActionIcon } from "@mantine/core";
3
+ import {
4
+ IconCopyright,
5
+ IconHeart,
6
+ IconBrandFacebook,
7
+ IconBrandGithub,
8
+ IconMail
9
+ } from "@tabler/icons-react";
10
+
11
+ // src/utils/constants.ts
12
+ var DEFAULT_AUTHOR = "Nguyen Van Trung, OTMC Contributors.";
13
+ var DEFAULT_AUTHOR_HREF = "https://github.com/otmc-sw";
14
+ var DEFAULT_COPYRIGHT = "OTMC Softwares. All rights reserved.";
15
+ var DEFAULT_LICENSE = "OTMC License.";
16
+ var DEFAULT_LOCATION = "An Nhon, Gia Lai, Viet Nam.";
17
+ var DEFAULT_VERSION_TYPE = "Internal";
18
+ var UNKNOWN = "Unknown";
19
+
20
+ // src/branding/Footer.tsx
21
+ import { jsx, jsxs } from "react/jsx-runtime";
22
+ var DEFAULT_SOCIAL_LINKS = [
23
+ {
24
+ label: "Facebook",
25
+ href: "https://www.facebook.com",
26
+ icon: /* @__PURE__ */ jsx(IconBrandFacebook, { size: 20 }),
27
+ color: "blue.8",
28
+ external: true
29
+ },
30
+ {
31
+ label: "GitHub",
32
+ href: "https://github.com",
33
+ icon: /* @__PURE__ */ jsx(IconBrandGithub, { size: 20 }),
34
+ color: "gray.6",
35
+ external: true
36
+ },
37
+ {
38
+ label: "Gmail",
39
+ href: "mailto:test@gmail.com",
40
+ icon: /* @__PURE__ */ jsx(IconMail, { size: 20 }),
41
+ color: "red.8",
42
+ external: false
43
+ }
44
+ ];
45
+ function Footer({
46
+ copyright = DEFAULT_COPYRIGHT,
47
+ author = DEFAULT_AUTHOR,
48
+ authorHref = DEFAULT_AUTHOR_HREF,
49
+ socialLinks = DEFAULT_SOCIAL_LINKS,
50
+ showSocialLinks = true
51
+ }) {
52
+ return /* @__PURE__ */ jsxs(Stack, { gap: "sm", mt: "md", align: "center", children: [
53
+ /* @__PURE__ */ jsxs(Stack, { gap: 2, align: "center", children: [
54
+ /* @__PURE__ */ jsxs(Group, { gap: 4, wrap: "nowrap", children: [
55
+ /* @__PURE__ */ jsxs(Text, { c: "dimmed", size: "xs", children: [
56
+ "Copyright",
57
+ " "
58
+ ] }),
59
+ /* @__PURE__ */ jsx(IconCopyright, { size: 15 }),
60
+ /* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", children: [
61
+ (/* @__PURE__ */ new Date()).getFullYear(),
62
+ " ",
63
+ copyright
64
+ ] })
65
+ ] }),
66
+ /* @__PURE__ */ jsxs(Group, { gap: 4, wrap: "nowrap", children: [
67
+ /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: "Built with" }),
68
+ /* @__PURE__ */ jsx(
69
+ IconHeart,
70
+ {
71
+ size: 15,
72
+ style: { color: "var(--mantine-color-red-7)" }
73
+ }
74
+ ),
75
+ /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: "by" }),
76
+ /* @__PURE__ */ jsx(
77
+ Anchor,
78
+ {
79
+ href: authorHref,
80
+ size: "xs",
81
+ fw: 500,
82
+ target: "_blank",
83
+ children: author
84
+ }
85
+ )
86
+ ] })
87
+ ] }),
88
+ showSocialLinks && socialLinks.length > 0 && /* @__PURE__ */ jsx(Group, { gap: "sm", children: socialLinks.map((link) => /* @__PURE__ */ jsx(Tooltip, { label: link.label, withArrow: true, children: /* @__PURE__ */ jsx(
89
+ ActionIcon,
90
+ {
91
+ variant: "subtle",
92
+ color: link.color,
93
+ component: "a",
94
+ href: link.href,
95
+ target: link.external ? "_blank" : void 0,
96
+ rel: link.external ? "noopener noreferrer" : void 0,
97
+ children: link.icon
98
+ }
99
+ ) }, link.href)) })
100
+ ] });
101
+ }
102
+
103
+ // src/modals/Information.tsx
104
+ import { useState } from "react";
105
+ import {
106
+ Modal,
107
+ Stack as Stack2,
108
+ Title,
109
+ Text as Text2,
110
+ Group as Group2,
111
+ Divider,
112
+ Badge,
113
+ ThemeIcon,
114
+ SimpleGrid,
115
+ Paper,
116
+ ActionIcon as ActionIcon2,
117
+ Tooltip as Tooltip2,
118
+ useComputedColorScheme
119
+ } from "@mantine/core";
120
+ import {
121
+ IconAward,
122
+ IconCalendar,
123
+ IconCheck,
124
+ IconCopy,
125
+ IconCpu,
126
+ IconHash,
127
+ IconLicense,
128
+ IconMapPin,
129
+ IconTag,
130
+ IconUser
131
+ } from "@tabler/icons-react";
132
+
133
+ // src/utils/commonUtils.ts
134
+ var copyToClipboard = async (text) => {
135
+ try {
136
+ if (navigator.clipboard && window.isSecureContext) {
137
+ await navigator.clipboard.writeText(text);
138
+ return true;
139
+ }
140
+ const textarea = document.createElement("textarea");
141
+ textarea.value = text;
142
+ textarea.style.position = "fixed";
143
+ textarea.style.left = "-9999px";
144
+ textarea.style.top = "-9999px";
145
+ textarea.style.opacity = "0";
146
+ document.body.appendChild(textarea);
147
+ textarea.focus();
148
+ textarea.select();
149
+ const success = document.execCommand("copy");
150
+ document.body.removeChild(textarea);
151
+ return success;
152
+ } catch (err) {
153
+ console.error("Failed to copy to clipboard:", err);
154
+ return false;
155
+ }
156
+ };
157
+
158
+ // src/utils/timeUtils.ts
159
+ function normalizeDate(dateInput) {
160
+ if (dateInput instanceof Date) {
161
+ return isNaN(dateInput.getTime()) ? null : dateInput;
162
+ }
163
+ if (typeof dateInput === "string") {
164
+ const date = new Date(dateInput);
165
+ return isNaN(date.getTime()) ? null : date;
166
+ }
167
+ if (typeof dateInput === "number") {
168
+ const timestamp = dateInput < 1e12 ? dateInput * 1e3 : dateInput;
169
+ const date = new Date(timestamp);
170
+ return isNaN(date.getTime()) ? null : date;
171
+ }
172
+ return null;
173
+ }
174
+ function pad(n, width = 2) {
175
+ return String(n).padStart(width, "0");
176
+ }
177
+ function formatAbsolute(date) {
178
+ const tz = -date.getTimezoneOffset();
179
+ const sign = tz >= 0 ? "+" : "-";
180
+ return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())} ${pad(date.getHours())}:${pad(date.getMinutes())}:${pad(date.getSeconds())} ${sign}${pad(Math.floor(Math.abs(tz) / 60))}:${pad(Math.abs(tz) % 60)}`;
181
+ }
182
+ function formatRelativeTime(date) {
183
+ const normalizedDate = normalizeDate(date);
184
+ if (!normalizedDate) return "Invalid date";
185
+ const now = Date.now();
186
+ const diffMs = now - normalizedDate.getTime();
187
+ const diffSeconds = Math.floor(diffMs / 1e3);
188
+ if (diffSeconds < 0) {
189
+ return "Just now";
190
+ }
191
+ if (diffSeconds < 60) {
192
+ return "Just now";
193
+ }
194
+ const minute = 60;
195
+ const hour = minute * 60;
196
+ const day = hour * 24;
197
+ const week = day * 7;
198
+ const month = day * 30;
199
+ const year = day * 365;
200
+ if (diffSeconds < hour) {
201
+ const mins = Math.floor(diffSeconds / minute);
202
+ return `${mins} min${mins !== 1 ? "s" : ""} ago`;
203
+ } else if (diffSeconds < day) {
204
+ const hours = Math.floor(diffSeconds / hour);
205
+ return `${hours} hour${hours !== 1 ? "s" : ""} ago`;
206
+ } else if (diffSeconds < week) {
207
+ const days = Math.floor(diffSeconds / day);
208
+ return `${days} day${days !== 1 ? "s" : ""} ago`;
209
+ } else if (diffSeconds < month) {
210
+ const weeks = Math.floor(diffSeconds / week);
211
+ return `${weeks} week${weeks !== 1 ? "s" : ""} ago`;
212
+ } else if (diffSeconds < year) {
213
+ const months = Math.floor(diffSeconds / month);
214
+ return `${months} month${months !== 1 ? "s" : ""} ago`;
215
+ } else {
216
+ const years = Math.floor(diffSeconds / year);
217
+ return `${years} year${years !== 1 ? "s" : ""} ago`;
218
+ }
219
+ }
220
+ function formatAbsoluteAndRelativeTime(date) {
221
+ const normalizedDate = normalizeDate(date);
222
+ if (!normalizedDate) return "Invalid date";
223
+ const absoluteTime = formatAbsolute(normalizedDate);
224
+ const relativeTime = formatRelativeTime(normalizedDate);
225
+ return `${absoluteTime} (${relativeTime})`;
226
+ }
227
+ function calculateRemainingTime(targetDate) {
228
+ if (!targetDate) return "Not set";
229
+ const normalizedDate = normalizeDate(targetDate);
230
+ if (!normalizedDate) return "Invalid date";
231
+ const now = /* @__PURE__ */ new Date();
232
+ const diffMs = normalizedDate.getTime() - now.getTime();
233
+ if (diffMs < 0) {
234
+ const daysOverdue = Math.floor(Math.abs(diffMs) / (1e3 * 60 * 60 * 24));
235
+ return `Overdue ${daysOverdue}d`;
236
+ }
237
+ const days = Math.floor(diffMs / (1e3 * 60 * 60 * 24));
238
+ const hours = Math.floor(diffMs % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60));
239
+ if (days > 0) {
240
+ return `${days}d ${hours}h`;
241
+ } else if (hours > 0) {
242
+ return `${hours}h`;
243
+ } else {
244
+ return "< 1h";
245
+ }
246
+ }
247
+ var MONTH_NAMES = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
248
+ function formatHumanDate(date, options) {
249
+ const normalizedDate = normalizeDate(date);
250
+ if (!normalizedDate) return "Invalid date";
251
+ const month = MONTH_NAMES[normalizedDate.getMonth()];
252
+ const day = normalizedDate.getDate();
253
+ const year = normalizedDate.getFullYear();
254
+ if (!options?.showTime) {
255
+ return `${month} ${day}, ${year}`;
256
+ }
257
+ const hours = normalizedDate.getHours();
258
+ const minutes = normalizedDate.getMinutes();
259
+ const seconds = normalizedDate.getSeconds();
260
+ const ampm = hours >= 12 ? "PM" : "AM";
261
+ const hours12 = hours % 12 || 12;
262
+ let timeStr = `${hours12}:${pad(minutes)}`;
263
+ if (options.showSeconds) {
264
+ timeStr += `:${pad(seconds)}`;
265
+ }
266
+ timeStr += ` ${ampm}`;
267
+ return `${month} ${day}, ${year} ${timeStr}`;
268
+ }
269
+
270
+ // src/modals/Information.tsx
271
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
272
+ var DEFAULT_TITLE = /* @__PURE__ */ jsxs2(Group2, { gap: "xs", wrap: "nowrap", children: [
273
+ /* @__PURE__ */ jsx2(IconCpu, { size: 20 }),
274
+ /* @__PURE__ */ jsx2("span", { children: "System Information" })
275
+ ] });
276
+ function InformationContent({ info }) {
277
+ const colorScheme = useComputedColorScheme();
278
+ const author = info.author ?? DEFAULT_AUTHOR;
279
+ const versionType = info.versionType ?? DEFAULT_VERSION_TYPE;
280
+ const cards = [
281
+ {
282
+ icon: /* @__PURE__ */ jsx2(IconUser, { size: 18 }),
283
+ label: "Author",
284
+ value: author,
285
+ color: "blue"
286
+ },
287
+ {
288
+ icon: /* @__PURE__ */ jsx2(IconLicense, { size: 18 }),
289
+ label: "License",
290
+ value: info.license ?? DEFAULT_LICENSE,
291
+ color: "orange"
292
+ },
293
+ {
294
+ icon: /* @__PURE__ */ jsx2(IconMapPin, { size: 18 }),
295
+ label: "Location",
296
+ value: info.location ?? DEFAULT_LOCATION,
297
+ color: "teal"
298
+ },
299
+ {
300
+ icon: /* @__PURE__ */ jsx2(IconTag, { size: 18 }),
301
+ label: "Version Type",
302
+ value: versionType,
303
+ color: "red"
304
+ },
305
+ {
306
+ icon: /* @__PURE__ */ jsx2(IconCalendar, { size: 18 }),
307
+ label: "Build Time",
308
+ value: info.buildTime !== void 0 ? formatAbsoluteAndRelativeTime(info.buildTime) : UNKNOWN,
309
+ color: "green"
310
+ },
311
+ ...info.metadata ?? []
312
+ ];
313
+ return /* @__PURE__ */ jsxs2(Stack2, { gap: "lg", children: [
314
+ /* @__PURE__ */ jsxs2(Stack2, { gap: "xs", align: "center", children: [
315
+ info.logo,
316
+ /* @__PURE__ */ jsxs2(Stack2, { gap: 2, align: "center", children: [
317
+ /* @__PURE__ */ jsx2(Title, { order: 2, children: info.name }),
318
+ info.tagline && /* @__PURE__ */ jsx2(Text2, { size: "sm", c: "dimmed", w: 600, ta: "center", children: info.tagline })
319
+ ] }),
320
+ /* @__PURE__ */ jsxs2(Group2, { gap: "xs", children: [
321
+ info.version && /* @__PURE__ */ jsxs2(
322
+ Badge,
323
+ {
324
+ size: "lg",
325
+ color: "blue",
326
+ variant: "outline",
327
+ mt: "sm",
328
+ tt: "none",
329
+ fw: 600,
330
+ children: [
331
+ "\u2728 v",
332
+ info.version
333
+ ]
334
+ }
335
+ ),
336
+ /* @__PURE__ */ jsxs2(
337
+ Badge,
338
+ {
339
+ size: "lg",
340
+ color: "teal",
341
+ variant: "light",
342
+ mt: "sm",
343
+ tt: "none",
344
+ fw: 600,
345
+ children: [
346
+ "\u{1F9E9} ",
347
+ versionType
348
+ ]
349
+ }
350
+ )
351
+ ] })
352
+ ] }),
353
+ /* @__PURE__ */ jsx2(Divider, { label: "System Information", labelPosition: "center" }),
354
+ /* @__PURE__ */ jsxs2(SimpleGrid, { cols: { base: 1, sm: 2 }, children: [
355
+ cards.map((card) => /* @__PURE__ */ jsx2(
356
+ InfoCard,
357
+ {
358
+ icon: card.icon ?? /* @__PURE__ */ jsx2(IconAward, { size: 18 }),
359
+ label: card.label,
360
+ value: card.value,
361
+ color: card.color ?? "gray"
362
+ },
363
+ card.label
364
+ )),
365
+ /* @__PURE__ */ jsx2(
366
+ Paper,
367
+ {
368
+ withBorder: true,
369
+ p: "sm",
370
+ radius: "18px",
371
+ bg: colorScheme === "dark" ? "gray.9" : "gray.0",
372
+ children: /* @__PURE__ */ jsxs2(Group2, { justify: "space-between", wrap: "nowrap", children: [
373
+ /* @__PURE__ */ jsxs2(Group2, { gap: "sm", flex: 1, children: [
374
+ /* @__PURE__ */ jsx2(ThemeIcon, { variant: "light", color: "yellow", size: "lg", radius: "14px", children: /* @__PURE__ */ jsx2(IconHash, { size: 18 }) }),
375
+ /* @__PURE__ */ jsxs2(Stack2, { gap: 2, children: [
376
+ /* @__PURE__ */ jsx2(Text2, { size: "xs", c: "dimmed", fw: 700, tt: "uppercase", children: "Build ID" }),
377
+ /* @__PURE__ */ jsx2(Text2, { size: "sm", fw: 500, truncate: true, children: info.buildId ?? UNKNOWN })
378
+ ] })
379
+ ] }),
380
+ info.buildId && /* @__PURE__ */ jsx2(CopyBuildIdButton, { buildId: info.buildId })
381
+ ] })
382
+ }
383
+ )
384
+ ] }),
385
+ /* @__PURE__ */ jsx2(
386
+ Footer,
387
+ {
388
+ copyright: info.copyright,
389
+ author,
390
+ authorHref: info.authorHref,
391
+ socialLinks: info.socialLinks
392
+ }
393
+ )
394
+ ] });
395
+ }
396
+ function InformationModal({
397
+ opened,
398
+ onClose,
399
+ info,
400
+ title = DEFAULT_TITLE
401
+ }) {
402
+ return /* @__PURE__ */ jsx2(
403
+ Modal,
404
+ {
405
+ opened,
406
+ onClose,
407
+ withCloseButton: true,
408
+ centered: true,
409
+ radius: "lg",
410
+ size: "60%",
411
+ styles: {
412
+ content: {
413
+ maxHeight: "90vh",
414
+ height: "90vh"
415
+ },
416
+ body: {
417
+ flex: 1,
418
+ overflow: "auto"
419
+ }
420
+ },
421
+ title,
422
+ children: /* @__PURE__ */ jsx2(InformationContent, { info })
423
+ }
424
+ );
425
+ }
426
+ function CopyBuildIdButton({ buildId }) {
427
+ const [copied, setCopied] = useState(false);
428
+ const handleCopy = async () => {
429
+ const success = await copyToClipboard(buildId);
430
+ if (success) {
431
+ setCopied(true);
432
+ setTimeout(() => setCopied(false), 2e3);
433
+ }
434
+ };
435
+ return /* @__PURE__ */ jsx2(Tooltip2, { label: copied ? "Copied!" : "Copy ID", withArrow: true, children: /* @__PURE__ */ jsx2(
436
+ ActionIcon2,
437
+ {
438
+ variant: "subtle",
439
+ color: copied ? "teal" : "gray",
440
+ onClick: handleCopy,
441
+ children: copied ? /* @__PURE__ */ jsx2(IconCheck, { size: 16 }) : /* @__PURE__ */ jsx2(IconCopy, { size: 16 })
442
+ }
443
+ ) });
444
+ }
445
+ function InfoCard({
446
+ icon,
447
+ label,
448
+ value,
449
+ color
450
+ }) {
451
+ const colorScheme = useComputedColorScheme();
452
+ return /* @__PURE__ */ jsx2(Paper, { withBorder: true, p: "md", radius: "18px", h: "100%", bg: colorScheme === "dark" ? "gray.9" : "gray.0", children: /* @__PURE__ */ jsxs2(Group2, { gap: "sm", align: "flex-start", children: [
453
+ /* @__PURE__ */ jsx2(ThemeIcon, { color, variant: "light", size: "lg", radius: "14px", children: icon }),
454
+ /* @__PURE__ */ jsxs2(Stack2, { gap: 2, flex: 1, children: [
455
+ /* @__PURE__ */ jsx2(Text2, { size: "xs", c: "dimmed", fw: 700, tt: "uppercase", children: label }),
456
+ /* @__PURE__ */ jsx2(Text2, { size: "sm", fw: 500, lineClamp: 1, children: value })
457
+ ] })
458
+ ] }) });
459
+ }
460
+ export {
461
+ DEFAULT_AUTHOR,
462
+ DEFAULT_AUTHOR_HREF,
463
+ DEFAULT_COPYRIGHT,
464
+ DEFAULT_LICENSE,
465
+ DEFAULT_LOCATION,
466
+ DEFAULT_VERSION_TYPE,
467
+ Footer,
468
+ InformationContent,
469
+ InformationModal,
470
+ UNKNOWN,
471
+ calculateRemainingTime,
472
+ copyToClipboard,
473
+ formatAbsolute,
474
+ formatAbsoluteAndRelativeTime,
475
+ formatHumanDate,
476
+ formatRelativeTime,
477
+ normalizeDate,
478
+ pad
479
+ };
480
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/branding/Footer.tsx","../src/utils/constants.ts","../src/modals/Information.tsx","../src/utils/commonUtils.ts","../src/utils/timeUtils.ts"],"sourcesContent":["/***\r\n * OTMC License.\r\n * Copyright (c) 2026 OTMC Softwares. All rights reserved.\r\n * Contributors: Nguyen Van Trung, OTMC Contributors.\r\n***/\r\n\r\nimport { Stack, Group, Text, Anchor, Tooltip, ActionIcon } from '@mantine/core';\r\nimport {\r\n IconCopyright,\r\n IconHeart,\r\n IconBrandFacebook,\r\n IconBrandGithub,\r\n IconMail,\r\n} from '@tabler/icons-react';\r\nimport { ReactNode } from 'react';\r\n\r\nimport {\r\n DEFAULT_AUTHOR,\r\n DEFAULT_AUTHOR_HREF,\r\n DEFAULT_COPYRIGHT,\r\n} from '../utils/constants';\r\n\r\nexport interface FooterSocialLink {\r\n label: string;\r\n href: string;\r\n icon: ReactNode;\r\n color?: string;\r\n external?: boolean;\r\n}\r\n\r\nexport interface FooterProps {\r\n copyright?: string;\r\n author?: string;\r\n authorHref?: string;\r\n socialLinks?: FooterSocialLink[];\r\n showCopyright?: boolean;\r\n showAuthor?: boolean;\r\n showSocialLinks?: boolean;\r\n}\r\n\r\nconst DEFAULT_SOCIAL_LINKS: FooterSocialLink[] = [\r\n {\r\n label: 'Facebook',\r\n href: 'https://www.facebook.com',\r\n icon: <IconBrandFacebook size={20} />,\r\n color: 'blue.8',\r\n external: true,\r\n },\r\n {\r\n label: 'GitHub',\r\n href: 'https://github.com',\r\n icon: <IconBrandGithub size={20} />,\r\n color: 'gray.6',\r\n external: true,\r\n },\r\n {\r\n label: 'Gmail',\r\n href: 'mailto:test@gmail.com',\r\n icon: <IconMail size={20} />,\r\n color: 'red.8',\r\n external: false,\r\n },\r\n];\r\n\r\nexport function Footer({\r\n copyright = DEFAULT_COPYRIGHT,\r\n author = DEFAULT_AUTHOR,\r\n authorHref = DEFAULT_AUTHOR_HREF,\r\n socialLinks = DEFAULT_SOCIAL_LINKS,\r\n showSocialLinks = true,\r\n}: FooterProps) {\r\n\r\n return (\r\n <Stack gap=\"sm\" mt=\"md\" align=\"center\">\r\n <Stack gap={2} align=\"center\">\r\n <Group gap={4} wrap=\"nowrap\">\r\n <Text c=\"dimmed\" size=\"xs\">\r\n Copyright{' '}\r\n </Text>\r\n <IconCopyright size={15} />\r\n <Text size=\"xs\" c=\"dimmed\">\r\n {new Date().getFullYear()} {copyright}\r\n </Text>\r\n </Group>\r\n <Group gap={4} wrap=\"nowrap\">\r\n <Text size=\"xs\" c=\"dimmed\">\r\n Built with\r\n </Text>\r\n <IconHeart\r\n size={15}\r\n style={{ color: 'var(--mantine-color-red-7)' }}\r\n />\r\n <Text size=\"xs\" c=\"dimmed\">\r\n by\r\n </Text>\r\n <Anchor\r\n href={authorHref}\r\n size=\"xs\"\r\n fw={500}\r\n target=\"_blank\"\r\n >\r\n {author}\r\n </Anchor>\r\n </Group>\r\n </Stack>\r\n\r\n {showSocialLinks && socialLinks.length > 0 && (\r\n <Group gap=\"sm\">\r\n {socialLinks.map((link) => (\r\n <Tooltip key={link.href} label={link.label} withArrow>\r\n <ActionIcon\r\n variant=\"subtle\"\r\n color={link.color}\r\n component=\"a\"\r\n href={link.href}\r\n target={link.external ? '_blank' : undefined}\r\n rel={link.external ? 'noopener noreferrer' : undefined}\r\n >\r\n {link.icon}\r\n </ActionIcon>\r\n </Tooltip>\r\n ))}\r\n </Group>\r\n )}\r\n </Stack>\r\n );\r\n}\r\n\r\n","/**\r\n * @License OTMC License\r\n * @Copyright (c) 2026 OTMC Softwares. All rights reserved.\r\n * @Contributors Trung Ng, OTMC Authors.\r\n**/\r\n\r\nexport const DEFAULT_AUTHOR = 'Nguyen Van Trung, OTMC Contributors.';\r\nexport const DEFAULT_AUTHOR_HREF = 'https://github.com/otmc-sw';\r\nexport const DEFAULT_COPYRIGHT = 'OTMC Softwares. All rights reserved.';\r\nexport const DEFAULT_LICENSE = 'OTMC License.';\r\nexport const DEFAULT_LOCATION = 'An Nhon, Gia Lai, Viet Nam.';\r\nexport const DEFAULT_VERSION_TYPE = 'Internal';\r\nexport const UNKNOWN = 'Unknown';\r\n","/***\n * OTMC License.\n * Copyright (c) 2026 OTMC Softwares. All rights reserved.\n * Contributors: Nguyen Van Trung, OTMC Contributors.\n***/\n\nimport { useState, type ReactNode } from 'react';\nimport {\n Modal,\n Stack,\n Title,\n Text,\n Group,\n Divider,\n Badge,\n ThemeIcon,\n SimpleGrid,\n Paper,\n ActionIcon,\n Tooltip,\n useComputedColorScheme,\n} from '@mantine/core';\nimport {\n IconAward,\n IconCalendar,\n IconCheck,\n IconCopy,\n IconCpu,\n IconHash,\n IconLicense,\n IconMapPin,\n IconTag,\n IconUser,\n} from '@tabler/icons-react';\n\nimport { Footer, type FooterSocialLink } from '../branding';\nimport { copyToClipboard } from '../utils/commonUtils';\nimport {\n DEFAULT_AUTHOR,\n DEFAULT_LICENSE,\n DEFAULT_LOCATION,\n DEFAULT_VERSION_TYPE,\n UNKNOWN,\n} from '../utils/constants';\nimport { formatAbsoluteAndRelativeTime } from '../utils/timeUtils';\n\nexport interface InformationMetadata {\n icon?: ReactNode;\n label: string;\n value: string;\n color?: string;\n}\n\nexport interface ApplicationInfo {\n name: string;\n version?: string;\n versionType?: string;\n tagline?: string;\n logo?: ReactNode;\n author?: string;\n authorHref?: string;\n license?: string;\n location?: string;\n copyright?: string;\n buildId?: string;\n buildTime?: string | number | Date;\n metadata?: InformationMetadata[];\n socialLinks?: FooterSocialLink[];\n}\n\nexport interface InformationContentProps {\n info: ApplicationInfo;\n}\n\nexport interface InformationModalProps {\n opened: boolean;\n onClose: () => void;\n info: ApplicationInfo;\n title?: ReactNode;\n}\n\nconst DEFAULT_TITLE = (\n <Group gap=\"xs\" wrap=\"nowrap\">\n <IconCpu size={20} />\n <span>System Information</span>\n </Group>\n);\n\n\nexport function InformationContent({ info }: InformationContentProps) {\n const colorScheme = useComputedColorScheme();\n\n const author = info.author ?? DEFAULT_AUTHOR;\n const versionType = info.versionType ?? DEFAULT_VERSION_TYPE;\n\n const cards: InformationMetadata[] = [\n {\n icon: <IconUser size={18} />,\n label: 'Author',\n value: author,\n color: 'blue',\n },\n {\n icon: <IconLicense size={18} />,\n label: 'License',\n value: info.license ?? DEFAULT_LICENSE,\n color: 'orange',\n },\n {\n icon: <IconMapPin size={18} />,\n label: 'Location',\n value: info.location ?? DEFAULT_LOCATION,\n color: 'teal',\n },\n {\n icon: <IconTag size={18} />,\n label: 'Version Type',\n value: versionType,\n color: 'red',\n },\n {\n icon: <IconCalendar size={18} />,\n label: 'Build Time',\n value:\n info.buildTime !== undefined\n ? formatAbsoluteAndRelativeTime(info.buildTime)\n : UNKNOWN,\n color: 'green',\n },\n ...(info.metadata ?? []),\n ];\n\n return (\n <Stack gap=\"lg\">\n <Stack gap=\"xs\" align=\"center\">\n {info.logo}\n\n <Stack gap={2} align=\"center\">\n <Title order={2}>{info.name}</Title>\n {info.tagline && (\n <Text size=\"sm\" c=\"dimmed\" w={600} ta=\"center\">\n {info.tagline}\n </Text>\n )}\n </Stack>\n\n <Group gap=\"xs\">\n {info.version && (\n <Badge\n size=\"lg\"\n color=\"blue\"\n variant=\"outline\"\n mt=\"sm\"\n tt=\"none\"\n fw={600}\n >\n ✨ v{info.version}\n </Badge>\n )}\n <Badge\n size=\"lg\"\n color=\"teal\"\n variant=\"light\"\n mt=\"sm\"\n tt=\"none\"\n fw={600}\n >\n 🧩 {versionType}\n </Badge>\n </Group>\n </Stack>\n\n <Divider label=\"System Information\" labelPosition=\"center\" />\n\n <SimpleGrid cols={{ base: 1, sm: 2 }}>\n {cards.map((card) => (\n <InfoCard\n key={card.label}\n icon={card.icon ?? <IconAward size={18} />}\n label={card.label}\n value={card.value}\n color={card.color ?? 'gray'}\n />\n ))}\n\n <Paper\n withBorder\n p=\"sm\"\n radius=\"18px\"\n bg={colorScheme === 'dark' ? 'gray.9' : 'gray.0'}\n >\n <Group justify=\"space-between\" wrap=\"nowrap\">\n <Group gap=\"sm\" flex={1}>\n <ThemeIcon variant=\"light\" color=\"yellow\" size=\"lg\" radius=\"14px\">\n <IconHash size={18} />\n </ThemeIcon>\n\n <Stack gap={2}>\n <Text size=\"xs\" c=\"dimmed\" fw={700} tt=\"uppercase\">\n Build ID\n </Text>\n <Text size=\"sm\" fw={500} truncate>\n {info.buildId ?? UNKNOWN}\n </Text>\n </Stack>\n </Group>\n\n {info.buildId && <CopyBuildIdButton buildId={info.buildId} />}\n </Group>\n </Paper>\n </SimpleGrid>\n\n <Footer\n copyright={info.copyright}\n author={author}\n authorHref={info.authorHref}\n socialLinks={info.socialLinks}\n />\n </Stack>\n );\n}\n\nexport function InformationModal({\n opened,\n onClose,\n info,\n title = DEFAULT_TITLE,\n}: InformationModalProps) {\n return (\n <Modal\n opened={opened}\n onClose={onClose}\n withCloseButton\n centered\n radius=\"lg\"\n size=\"60%\"\n styles={{\n content: {\n maxHeight: '90vh',\n height: '90vh',\n },\n body: {\n flex: 1,\n overflow: 'auto',\n },\n }}\n title={title}\n >\n <InformationContent info={info} />\n </Modal>\n );\n}\n\nfunction CopyBuildIdButton({ buildId }: { buildId: string }) {\n const [copied, setCopied] = useState(false);\n\n const handleCopy = async () => {\n const success = await copyToClipboard(buildId);\n if (success) {\n setCopied(true);\n setTimeout(() => setCopied(false), 2000);\n }\n };\n\n return (\n <Tooltip label={copied ? 'Copied!' : 'Copy ID'} withArrow>\n <ActionIcon\n variant=\"subtle\"\n color={copied ? 'teal' : 'gray'}\n onClick={handleCopy}\n >\n {copied ? <IconCheck size={16} /> : <IconCopy size={16} />}\n </ActionIcon>\n </Tooltip>\n );\n}\n\nfunction InfoCard({\n icon,\n label,\n value,\n color,\n}: {\n icon: ReactNode;\n label: string;\n value: string;\n color: string;\n}) {\n const colorScheme = useComputedColorScheme();\n return (\n <Paper withBorder p=\"md\" radius=\"18px\" h=\"100%\" bg={colorScheme === 'dark' ? 'gray.9' : 'gray.0'}>\n <Group gap=\"sm\" align=\"flex-start\">\n <ThemeIcon color={color} variant=\"light\" size=\"lg\" radius=\"14px\">\n {icon}\n </ThemeIcon>\n\n <Stack gap={2} flex={1}>\n <Text size=\"xs\" c=\"dimmed\" fw={700} tt=\"uppercase\">\n {label}\n </Text>\n <Text size=\"sm\" fw={500} lineClamp={1}>\n {value}\n </Text>\n </Stack>\n </Group>\n </Paper>\n );\n}\n\n","/**\n * @License OTMC License\n * @Copyright (c) 2026 OTMC Softwares. All rights reserved.\n * @Contributors Trung Ng, OTMC Authors.\n**/\nexport const copyToClipboard = async (text: string): Promise<boolean> => {\n try {\n if (navigator.clipboard && window.isSecureContext) {\n await navigator.clipboard.writeText(text);\n return true;\n }\n \n const textarea = document.createElement('textarea');\n textarea.value = text;\n textarea.style.position = 'fixed';\n textarea.style.left = '-9999px';\n textarea.style.top = '-9999px';\n textarea.style.opacity = '0';\n document.body.appendChild(textarea);\n textarea.focus();\n textarea.select();\n \n const success = document.execCommand('copy');\n document.body.removeChild(textarea);\n \n return success;\n } catch (err) {\n console.error('Failed to copy to clipboard:', err);\n return false;\n }\n};\n","/**\n * @License OTMC License\n * @Copyright (c) 2026 OTMC Softwares. All rights reserved.\n * @Contributors Trung Ng, OTMC Authors.\n**/\n\nexport type TimestampFormatType = \"absolute\" | \"relative\";\n\n\nexport function normalizeDate(dateInput: string | number | Date): Date | null {\n if (dateInput instanceof Date) {\n return isNaN(dateInput.getTime()) ? null : dateInput;\n }\n\n if (typeof dateInput === 'string') {\n const date = new Date(dateInput);\n return isNaN(date.getTime()) ? null : date;\n }\n\n if (typeof dateInput === 'number') {\n const timestamp = dateInput < 1e12 ? dateInput * 1000 : dateInput;\n const date = new Date(timestamp);\n return isNaN(date.getTime()) ? null : date;\n }\n\n return null;\n}\n\nexport function pad(n: number, width: number = 2): string {\n return String(n).padStart(width, \"0\");\n}\n\nexport function formatAbsolute(date: Date): string {\n const tz = -date.getTimezoneOffset();\n const sign = tz >= 0 ? \"+\" : \"-\";\n \n return (\n `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())} ` +\n `${pad(date.getHours())}:${pad(date.getMinutes())}:${pad(date.getSeconds())} ` +\n `${sign}${pad(Math.floor(Math.abs(tz) / 60))}:${pad(Math.abs(tz) % 60)}`\n );\n}\n\nexport function formatRelativeTime(date: string | number | Date): string {\n const normalizedDate = normalizeDate(date);\n if (!normalizedDate) return \"Invalid date\";\n\n const now = Date.now();\n const diffMs = now - normalizedDate.getTime();\n const diffSeconds = Math.floor(diffMs / 1000);\n\n if (diffSeconds < 0) {\n return \"Just now\";\n }\n\n if (diffSeconds < 60) {\n return \"Just now\";\n }\n\n const minute = 60;\n const hour = minute * 60;\n const day = hour * 24;\n const week = day * 7;\n const month = day * 30;\n const year = day * 365;\n\n if (diffSeconds < hour) {\n const mins = Math.floor(diffSeconds / minute);\n return `${mins} min${mins !== 1 ? 's' : ''} ago`;\n } else if (diffSeconds < day) {\n const hours = Math.floor(diffSeconds / hour);\n return `${hours} hour${hours !== 1 ? 's' : ''} ago`;\n } else if (diffSeconds < week) {\n const days = Math.floor(diffSeconds / day);\n return `${days} day${days !== 1 ? 's' : ''} ago`;\n } else if (diffSeconds < month) {\n const weeks = Math.floor(diffSeconds / week);\n return `${weeks} week${weeks !== 1 ? 's' : ''} ago`;\n } else if (diffSeconds < year) {\n const months = Math.floor(diffSeconds / month);\n return `${months} month${months !== 1 ? 's' : ''} ago`;\n } else {\n const years = Math.floor(diffSeconds / year);\n return `${years} year${years !== 1 ? 's' : ''} ago`;\n }\n}\n\nexport function formatAbsoluteAndRelativeTime(date: string | number | Date): string {\n const normalizedDate = normalizeDate(date);\n if (!normalizedDate) return \"Invalid date\";\n\n const absoluteTime = formatAbsolute(normalizedDate);\n const relativeTime = formatRelativeTime(normalizedDate);\n\n return `${absoluteTime} (${relativeTime})`;\n}\n\nexport function calculateRemainingTime(targetDate: string | number | Date | undefined): string {\n if (!targetDate) return 'Not set';\n\n const normalizedDate = normalizeDate(targetDate);\n if (!normalizedDate) return 'Invalid date';\n\n const now = new Date();\n const diffMs = normalizedDate.getTime() - now.getTime();\n\n if (diffMs < 0) {\n const daysOverdue = Math.floor(Math.abs(diffMs) / (1000 * 60 * 60 * 24));\n return `Overdue ${daysOverdue}d`;\n }\n\n const days = Math.floor(diffMs / (1000 * 60 * 60 * 24));\n const hours = Math.floor((diffMs % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));\n\n if (days > 0) {\n return `${days}d ${hours}h`;\n } else if (hours > 0) {\n return `${hours}h`;\n } else {\n return '< 1h';\n }\n}\n\nconst MONTH_NAMES = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n\nexport function formatHumanDate(date: string | number | Date, options?: { showTime?: boolean; showSeconds?: boolean }): string {\n const normalizedDate = normalizeDate(date);\n if (!normalizedDate) return 'Invalid date';\n\n const month = MONTH_NAMES[normalizedDate.getMonth()];\n const day = normalizedDate.getDate();\n const year = normalizedDate.getFullYear();\n\n if (!options?.showTime) {\n return `${month} ${day}, ${year}`;\n }\n\n const hours = normalizedDate.getHours();\n const minutes = normalizedDate.getMinutes();\n const seconds = normalizedDate.getSeconds();\n const ampm = hours >= 12 ? 'PM' : 'AM';\n const hours12 = hours % 12 || 12;\n\n let timeStr = `${hours12}:${pad(minutes)}`;\n if (options.showSeconds) {\n timeStr += `:${pad(seconds)}`;\n }\n timeStr += ` ${ampm}`;\n\n return `${month} ${day}, ${year} ${timeStr}`;\n}\n\n"],"mappings":";AAMA,SAAS,OAAO,OAAO,MAAM,QAAQ,SAAS,kBAAkB;AAChE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACPA,IAAM,iBAAiB;AACvB,IAAM,sBAAsB;AAC5B,IAAM,oBAAoB;AAC1B,IAAM,kBAAkB;AACxB,IAAM,mBAAmB;AACzB,IAAM,uBAAuB;AAC7B,IAAM,UAAU;;;ADgCb,cAgCA,YAhCA;AAJV,IAAM,uBAA2C;AAAA,EAC/C;AAAA,IACE,OAAO;AAAA,IACP,MAAM;AAAA,IACN,MAAM,oBAAC,qBAAkB,MAAM,IAAI;AAAA,IACnC,OAAO;AAAA,IACP,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,MAAM;AAAA,IACN,MAAM,oBAAC,mBAAgB,MAAM,IAAI;AAAA,IACjC,OAAO;AAAA,IACP,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,MAAM;AAAA,IACN,MAAM,oBAAC,YAAS,MAAM,IAAI;AAAA,IAC1B,OAAO;AAAA,IACP,UAAU;AAAA,EACZ;AACF;AAEO,SAAS,OAAO;AAAA,EACrB,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,aAAa;AAAA,EACb,cAAc;AAAA,EACd,kBAAkB;AACpB,GAAgB;AAEd,SACE,qBAAC,SAAM,KAAI,MAAK,IAAG,MAAK,OAAM,UAC5B;AAAA,yBAAC,SAAM,KAAK,GAAG,OAAM,UACnB;AAAA,2BAAC,SAAM,KAAK,GAAG,MAAK,UAClB;AAAA,6BAAC,QAAK,G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