@aotter/mantle-admin-ui 0.1.0-alpha.16 → 0.1.0-alpha.17

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/favicon.svg CHANGED
@@ -1,4 +1,20 @@
1
1
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128">
2
- <rect width="128" height="128" rx="28" fill="#1a3062"/>
3
- <path fill="#f7fafc" d="M62.27,18.91c-24.86,0-45.09,20.23-45.09,45.09s20.23,45.09,45.09,45.09,45.09-20.23,45.09-45.09-20.23-45.09-45.09ZM65.07,102.86v-18.98h5.49c1.26,0,2.29-1.03,2.29-2.29v-4.47h11.6c1.26,0,2.29-1.03,2.29-2.29v-20.57c0-1.26-1.03-2.29-2.29-2.29h-5.13v-12.73c0-1.55-1.26-2.8-2.8-2.8s-2.8,1.26-2.8,2.8v12.73h-22.89v-12.73c0-1.55-1.26-2.8-2.81-2.8s-2.8,1.26-2.8,2.8v12.73h-5.13c-1.26,0-2.29,1.03-2.29,2.29v20.57c0,1.26,1.03,2.29,2.29,2.29h11.6v4.47c0,1.26,1.03,2.29,2.29,2.29h5.49v18.98c-20.32-1.45-36.16-18.42-36.16-38.86,0-21.49,17.48-38.97,38.97-38.97s38.97,17.48,38.97,38.97-15.84,37.42-36.16,38.86ZM41.89,73.03v-16.96h14.46c1.94,2.28,5.02,5.87,5.11,5.97.19.19.39.23.52.23s.34-.04.54-.25c.07-.06,1.33-1.44,4.33-4.69.4-.44.8-.87,1.17-1.26h14.63v16.96h-40.75ZM55.78,79.79v-3.15h12.98v3.15h-12.98Z"/>
2
+ <style>
3
+ :root { color: #1a3062; }
4
+ @media (prefers-color-scheme: dark) { :root { color: #f7fafc; } }
5
+ </style>
6
+ <path
7
+ fill="currentColor"
8
+ fill-opacity=".3"
9
+ d="M101.76,64.08c-8.92,11.77-25.79,25.56-25.93,25.68-1.1,1.23-.4,2.67.21,3.94.72,1.5,1.15,2.54.53,3.38-.47.64-.75.83-1.22.83h-22.95c-.46,0-.75-.2-1.22-.83-.61-.84-.19-1.88.53-3.38.61-1.27,1.31-2.71.21-3.94-.15-.11-15.88-13.29-24.81-25.07-.46-.6-.61-1.51-.42-2.54.36-2.03,1.85-4.15,3.8-5.4,1.28-.82,2.75-1.22,4.12-1.22,1.71,0,3.25.63,4.03,1.83,1.16,1.8,14.73,23.3,16.48,26.48,1.3,2.35,2.68,3.27,4.08,2.7,1.4-.56,1-3.17-.57-12.12-1.28-7.28-3.03-22.92-3.03-31.19,0-2.17,2.62-4.45,6.45-5.08v-.03c.57-.08,3.04-.08,3.62,0v.03c3.84.63,6.45,2.91,6.45,5.08,0,8.27-1.75,23.91-3.03,31.19-1.57,8.95-1.96,11.55-.57,12.12,1.4.57,2.77-.34,4.08-2.7,1.75-3.17,16.45-25.28,17.61-27.09.77-1.2,2.32-1.83,4.03-1.83,1.37,0,2.84.4,4.12,1.22,1.95,1.25,3.45,3.38,3.8,5.4.18,1.04.03,1.94-.42,2.54Z"
10
+ />
11
+ <path
12
+ fill="none"
13
+ stroke="currentColor"
14
+ stroke-opacity=".8"
15
+ stroke-width="2"
16
+ stroke-linecap="round"
17
+ stroke-linejoin="round"
18
+ d="M111.76,52.77c-4.05-6.75-13.09-19.07-28.16-25.67-.97-.43-9.36-4.13-19.6-4.13s-18.63,3.7-19.6,4.13c-15.08,6.59-24.12,18.91-28.16,25.67-6.57,10.92-6.56,17.8-6.03,20.94,1.45,8.52,35.82,16.09,33.19,19.03-3.96,4.86-1.12,12.29,7.1,12.29h26.99c8.22,0,11.06-7.44,7.1-12.29-2.63-2.94,31.74-10.5,33.19-19.03.53-3.14.54-10.01-6.03-20.94Z"
19
+ />
4
20
  </svg>
package/dist/index.html CHANGED
@@ -7,83 +7,10 @@
7
7
  <link rel="icon" type="image/svg+xml" sizes="any" href="/_mantle/admin/favicon.svg" />
8
8
  <meta name="theme-color" content="#f6f8fc" />
9
9
  <meta name="theme-color" content="#02050d" media="(prefers-color-scheme: dark)" />
10
- <!--
11
- Inline blocking script — applies `class="dark"` to <html> BEFORE
12
- first paint to avoid FOUC. Preferences are browser-local and do
13
- not mutate site settings.
14
- -->
15
- <script>
16
- (function () {
17
- try {
18
- var pref = localStorage.getItem("cms.preference.theme") || localStorage.getItem("cms.theme");
19
- var lang = localStorage.getItem("cms.preference.language");
20
- var dir = localStorage.getItem("cms.preference.direction");
21
- var normalize = function (value) {
22
- var lower = String(value || "").toLowerCase();
23
- if (lower === "zh-tw" || lower === "zh-hant" || lower.indexOf("zh-hant") === 0) return "zh-TW";
24
- if (lower === "zh-cn" || lower === "zh-hans" || lower.indexOf("zh-hans") === 0) return "zh-CN";
25
- if (lower.indexOf("pt-br") === 0 || lower === "pt") return "pt-BR";
26
- var base = lower.split("-")[0];
27
- if (base === "iw") return "he";
28
- if (base === "pt") return "pt-BR";
29
- if (base === "zh") return "zh-TW";
30
- return base;
31
- };
32
- var htmlLang = {
33
- en: "en",
34
- ar: "ar",
35
- cs: "cs",
36
- de: "de",
37
- es: "es",
38
- fa: "fa",
39
- fr: "fr",
40
- he: "he",
41
- id: "id",
42
- it: "it",
43
- ja: "ja",
44
- ko: "ko",
45
- nl: "nl",
46
- pl: "pl",
47
- "pt-BR": "pt-BR",
48
- ru: "ru",
49
- th: "th",
50
- tr: "tr",
51
- uk: "uk",
52
- vi: "vi",
53
- "zh-CN": "zh-Hans-CN",
54
- "zh-TW": "zh-Hant-TW"
55
- };
56
- var langDir = {
57
- ar: "rtl",
58
- fa: "rtl",
59
- he: "rtl"
60
- };
61
- if (!htmlLang[lang]) {
62
- var navs = navigator.languages && navigator.languages.length
63
- ? navigator.languages
64
- : [navigator.language];
65
- for (var i = 0; i < navs.length; i += 1) {
66
- var candidate = normalize(navs[i]);
67
- if (htmlLang[candidate]) {
68
- lang = candidate;
69
- break;
70
- }
71
- }
72
- }
73
- if (htmlLang[lang]) document.documentElement.lang = htmlLang[lang];
74
- if (dir === "rtl" || dir === "ltr") document.documentElement.dir = dir;
75
- else if (langDir[lang]) document.documentElement.dir = langDir[lang];
76
- if (
77
- pref === "dark" ||
78
- ((!pref || pref === "system") && matchMedia("(prefers-color-scheme: dark)").matches)
79
- ) {
80
- document.documentElement.classList.add("dark");
81
- }
82
- } catch (_) {}
83
- })();
84
- </script>
85
- <script type="module" crossorigin src="/_mantle/admin/assets/index-0G4lQz4H.js"></script>
86
- <link rel="stylesheet" crossorigin href="/_mantle/admin/assets/index-AktWG8V4.css">
10
+ <!-- Blocking so system theme + browser-local override apply before first paint. -->
11
+ <script src="/_mantle/admin/theme.js"></script>
12
+ <script type="module" crossorigin src="/_mantle/admin/assets/index-DfPXjqH7.js"></script>
13
+ <link rel="stylesheet" crossorigin href="/_mantle/admin/assets/index-B5BaJFtQ.css">
87
14
  </head>
88
15
  <body>
89
16
  <div id="root"></div>
package/dist/theme.js ADDED
@@ -0,0 +1,64 @@
1
+ (function () {
2
+ try {
3
+ var pref = localStorage.getItem("cms.preference.theme") || localStorage.getItem("cms.theme");
4
+ var lang = localStorage.getItem("cms.preference.language");
5
+ var dir = localStorage.getItem("cms.preference.direction");
6
+ var normalize = function (value) {
7
+ var lower = String(value || "").toLowerCase();
8
+ if (lower === "zh-tw" || lower === "zh-hant" || lower.indexOf("zh-hant") === 0) return "zh-TW";
9
+ if (lower === "zh-cn" || lower === "zh-hans" || lower.indexOf("zh-hans") === 0) return "zh-CN";
10
+ if (lower.indexOf("pt-br") === 0 || lower === "pt") return "pt-BR";
11
+ var base = lower.split("-")[0];
12
+ if (base === "iw") return "he";
13
+ if (base === "pt") return "pt-BR";
14
+ if (base === "zh") return "zh-TW";
15
+ return base;
16
+ };
17
+ var htmlLang = {
18
+ en: "en",
19
+ ar: "ar",
20
+ cs: "cs",
21
+ de: "de",
22
+ es: "es",
23
+ fa: "fa",
24
+ fr: "fr",
25
+ he: "he",
26
+ id: "id",
27
+ it: "it",
28
+ ja: "ja",
29
+ ko: "ko",
30
+ nl: "nl",
31
+ pl: "pl",
32
+ "pt-BR": "pt-BR",
33
+ ru: "ru",
34
+ th: "th",
35
+ tr: "tr",
36
+ uk: "uk",
37
+ vi: "vi",
38
+ "zh-CN": "zh-Hans-CN",
39
+ "zh-TW": "zh-Hant-TW"
40
+ };
41
+ var langDir = { ar: "rtl", fa: "rtl", he: "rtl" };
42
+ if (!htmlLang[lang]) {
43
+ var navs = navigator.languages && navigator.languages.length
44
+ ? navigator.languages
45
+ : [navigator.language];
46
+ for (var i = 0; i < navs.length; i += 1) {
47
+ var candidate = normalize(navs[i]);
48
+ if (htmlLang[candidate]) {
49
+ lang = candidate;
50
+ break;
51
+ }
52
+ }
53
+ }
54
+ if (htmlLang[lang]) document.documentElement.lang = htmlLang[lang];
55
+ if (dir === "rtl" || dir === "ltr") document.documentElement.dir = dir;
56
+ else if (langDir[lang]) document.documentElement.dir = langDir[lang];
57
+ if (
58
+ pref === "dark" ||
59
+ ((!pref || pref === "system") && matchMedia("(prefers-color-scheme: dark)").matches)
60
+ ) {
61
+ document.documentElement.classList.add("dark");
62
+ }
63
+ } catch (_) {}
64
+ })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aotter/mantle-admin-ui",
3
- "version": "0.1.0-alpha.16",
3
+ "version": "0.1.0-alpha.17",
4
4
  "description": "Admin SPA for mantle — React 19 + Vite + Tailwind v4 + shadcn, shipped as static assets.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://mantle.tools/",
@@ -35,7 +35,7 @@
35
35
  "class-variance-authority": "^0.7.1",
36
36
  "clsx": "^2.1.1",
37
37
  "date-fns": "^4.4.0",
38
- "lucide-react": "^1.27.0",
38
+ "lucide-react": "^1.33.0",
39
39
  "radix-ui": "^1.6.7",
40
40
  "react": "^19.2.8",
41
41
  "react-day-picker": "^10.0.1",
@@ -53,7 +53,8 @@
53
53
  "tw-animate-css": "^1.4.0",
54
54
  "typescript": "^6.0.3",
55
55
  "vite": "^8.2.1",
56
- "vitest": "^4.1.11"
56
+ "vitest": "^4.1.11",
57
+ "@aotter/mantle-admin": "0.1.0-alpha.17"
57
58
  },
58
59
  "scripts": {
59
60
  "build": "vite build",