@viglet/viglet-design-system 2026.2.49 → 2026.2.51

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,223 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});function e(e){let{title:a,subtitle:o,color:s,colorDark:c=s,prefix:l=`viglet`,storageKey:u=`vite-ui-theme`,testFlag:d=`__VIGLET_LOADING_TEST__`,placeholder:f=`<!--viglet-boot-loader-->`}=e,p=t(s)??`37, 99, 235`,m={pfx:l,title:a,subtitle:o,color:s,colorDark:c,rgb:p,rgbDark:t(c)??p,storageKey:u,testFlag:d},h=n(m),g=r(m),_=i(m);return{name:`viglet-boot-loader`,transformIndexHtml(e){return{html:e.includes(f)?e.replace(f,_):e.replace(/(<div\b[^>]*\bid=["']root["'][^>]*>)/,e=>`${e}\n${_}\n`),tags:[{tag:`style`,attrs:{"data-viglet-boot-loader":``},children:h,injectTo:`head`},{tag:`script`,children:g,injectTo:`head`}]}}}}function t(e){if(!e)return null;let t=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(e.trim());if(t){let[,e,n,r]=t;return`${Number.parseInt(e+e,16)}, ${Number.parseInt(n+n,16)}, ${Number.parseInt(r+r,16)}`}let n=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e.trim());if(n){let[,e,t,r]=n;return`${Number.parseInt(e,16)}, ${Number.parseInt(t,16)}, ${Number.parseInt(r,16)}`}return null}function n({pfx:e,color:t,colorDark:n,rgb:r}){return`
2
+ html, body { margin: 0; padding: 0; height: 100%; }
3
+ body {
4
+ background:
5
+ radial-gradient(1200px 600px at 20% 10%, rgba(${r}, 0.18), transparent 60%),
6
+ radial-gradient(900px 500px at 80% 90%, rgba(${r}, 0.18), transparent 60%),
7
+ #0a0a0f;
8
+ color: #e5e7eb;
9
+ font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
10
+ }
11
+ body.${e}-light-boot {
12
+ background:
13
+ radial-gradient(1200px 600px at 20% 10%, rgba(${r}, 0.10), transparent 60%),
14
+ radial-gradient(900px 500px at 80% 90%, rgba(${r}, 0.10), transparent 60%),
15
+ #fafafa;
16
+ color: #0f172a;
17
+ }
18
+ #${e}-boot-loader {
19
+ position: fixed; inset: 0;
20
+ display: flex; align-items: center; justify-content: center; flex-direction: column;
21
+ z-index: 9999;
22
+ animation: ${e}-boot-fade-in 0.4s ease-out;
23
+ }
24
+ .${e}-boot-stage {
25
+ position: relative; width: 160px; height: 160px;
26
+ display: flex; align-items: center; justify-content: center;
27
+ }
28
+ .${e}-boot-ring {
29
+ position: absolute; inset: 0; border-radius: 50%;
30
+ border: 2px solid rgba(${r}, 0.55); opacity: 0;
31
+ animation: ${e}-boot-ring-pulse 2.4s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
32
+ }
33
+ .${e}-boot-ring.delay-1 { animation-delay: 0.6s; }
34
+ .${e}-boot-ring.delay-2 { animation-delay: 1.2s; }
35
+ .${e}-boot-ring.delay-3 { animation-delay: 1.8s; }
36
+ .${e}-boot-logo-mark {
37
+ position: relative; width: 110px; height: 110px;
38
+ color: #FFDEAD;
39
+ display: flex; align-items: center; justify-content: center;
40
+ -webkit-user-select: none; user-select: none;
41
+ animation: ${e}-boot-breathe 2.2s ease-in-out infinite;
42
+ }
43
+ .${e}-boot-logo-mark::before {
44
+ content: ""; position: absolute; inset: 0; border-radius: 50%;
45
+ background: linear-gradient(135deg, ${t}, ${n}, ${t});
46
+ background-size: 300% 300%;
47
+ z-index: -2; filter: blur(18px); opacity: 0.5;
48
+ animation: ${e}-boot-glow 6s linear infinite;
49
+ }
50
+ .${e}-boot-logo-mark::after {
51
+ content: ""; position: absolute; inset: 8px; border-radius: 50%;
52
+ background: radial-gradient(circle at center, ${t} 0%, rgba(${r},0.6) 55%, rgba(${r},0) 100%);
53
+ filter: blur(5px); z-index: -1;
54
+ animation: ${e}-boot-gas 4s ease-in-out infinite;
55
+ }
56
+ @keyframes ${e}-boot-gas {
57
+ 0%, 100% { transform: scale(1); opacity: 0.85; }
58
+ 50% { transform: scale(1.08); opacity: 1; }
59
+ }
60
+ .${e}-boot-molecules { width: 62px; height: 62px; overflow: visible; }
61
+ .${e}-boot-molecules line, .${e}-boot-molecules path {
62
+ stroke: #FFDEAD; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; fill: none;
63
+ }
64
+ .${e}-boot-molecules circle { fill: #FFDEAD; }
65
+ .${e}-boot-molecule {
66
+ opacity: 0; transform-origin: center;
67
+ animation: ${e}-boot-molecule-cycle 10s ease-in-out infinite both;
68
+ }
69
+ .${e}-boot-molecule.m-2 { animation-delay: -1.667s; }
70
+ .${e}-boot-molecule.m-3 { animation-delay: -3.333s; }
71
+ .${e}-boot-molecule.m-4 { animation-delay: -5.000s; }
72
+ .${e}-boot-molecule.m-5 { animation-delay: -6.667s; }
73
+ .${e}-boot-molecule.m-6 { animation-delay: -8.333s; }
74
+ @keyframes ${e}-boot-molecule-cycle {
75
+ 0% { opacity: 0; transform: scale(0.7); }
76
+ 3% { opacity: 1; transform: scale(1); }
77
+ 14% { opacity: 1; transform: scale(1); }
78
+ 17% { opacity: 0; transform: scale(0.7); }
79
+ 100% { opacity: 0; transform: scale(0.7); }
80
+ }
81
+ .${e}-boot-text { margin-top: 2rem; text-align: center; }
82
+ .${e}-boot-title {
83
+ font-size: 1.15rem; font-weight: 700; letter-spacing: 0.01em;
84
+ background: linear-gradient(90deg, ${t}, ${n});
85
+ background-size: 200% auto;
86
+ -webkit-background-clip: text; background-clip: text; color: transparent;
87
+ animation: ${e}-boot-shimmer 3s linear infinite;
88
+ }
89
+ .${e}-boot-subtitle {
90
+ margin-top: 0.35rem; font-size: 0.8rem;
91
+ opacity: 0.55; letter-spacing: 0.05em; text-transform: uppercase;
92
+ }
93
+ .${e}-boot-progress {
94
+ margin-top: 1.5rem; width: 180px; height: 3px;
95
+ border-radius: 999px; background: rgba(148, 163, 184, 0.15);
96
+ overflow: hidden; position: relative;
97
+ }
98
+ .${e}-boot-progress::after {
99
+ content: ""; position: absolute; top: 0; left: 0;
100
+ width: 40%; height: 100%; border-radius: 999px;
101
+ background: linear-gradient(90deg, transparent, ${t} 30%, ${n} 70%, transparent);
102
+ transform: translateX(-100%); will-change: transform;
103
+ animation: ${e}-boot-slide 1.6s cubic-bezier(0.4, 0, 0.6, 1) infinite;
104
+ }
105
+ @keyframes ${e}-boot-fade-in { from { opacity: 0; } to { opacity: 1; } }
106
+ @keyframes ${e}-boot-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
107
+ @keyframes ${e}-boot-glow { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }
108
+ @keyframes ${e}-boot-ring-pulse {
109
+ 0% { transform: scale(0.55); opacity: 0.7; border-width: 2px; }
110
+ 70% { opacity: 0.05; }
111
+ 100% { transform: scale(1.25); opacity: 0; border-width: 1px; }
112
+ }
113
+ @keyframes ${e}-boot-shimmer { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
114
+ @keyframes ${e}-boot-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(450%); } }
115
+ @media (prefers-reduced-motion: reduce) {
116
+ .${e}-boot-ring,
117
+ .${e}-boot-logo-mark,
118
+ .${e}-boot-logo-mark::before,
119
+ .${e}-boot-logo-mark::after,
120
+ .${e}-boot-molecule,
121
+ .${e}-boot-title,
122
+ .${e}-boot-progress::after { animation: none !important; }
123
+ .${e}-boot-ring { opacity: 0.2; transform: scale(1); }
124
+ .${e}-boot-molecule { opacity: 0; }
125
+ .${e}-boot-molecule.m-1 { opacity: 1; transform: scale(1); }
126
+ }
127
+ .${e}-boot-test-badge {
128
+ position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
129
+ padding: 6px 12px; font-size: 11px; font-weight: 700;
130
+ letter-spacing: 0.08em; text-transform: uppercase; color: #fff;
131
+ background: linear-gradient(135deg, #dc2626, #ea580c);
132
+ border-radius: 999px; box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
133
+ z-index: 10000;
134
+ }
135
+ `.trim()}function r({pfx:e,storageKey:t,testFlag:n}){return`
136
+ (function () {
137
+ try {
138
+ var stored = localStorage.getItem(${JSON.stringify(t)});
139
+ var prefersLight = stored === "light"
140
+ || (stored === "system" && globalThis.matchMedia("(prefers-color-scheme: light)").matches)
141
+ || (!stored && globalThis.matchMedia("(prefers-color-scheme: light)").matches);
142
+ if (prefersLight) {
143
+ document.documentElement.classList.remove("dark");
144
+ document.addEventListener("DOMContentLoaded", function () {
145
+ document.body.classList.add(${JSON.stringify(e+`-light-boot`)});
146
+ });
147
+ }
148
+ } catch (e) { /* ignore */ }
149
+ try {
150
+ if (new URLSearchParams(globalThis.location.search).has("loading")) {
151
+ globalThis[${JSON.stringify(n)}] = true;
152
+ document.addEventListener("DOMContentLoaded", function () {
153
+ var badge = document.createElement("div");
154
+ badge.className = ${JSON.stringify(e+`-boot-test-badge`)};
155
+ badge.textContent = "Loading \xb7 Test Mode \xb7 ?loading=1";
156
+ document.body.appendChild(badge);
157
+ });
158
+ }
159
+ } catch (e) { /* ignore */ }
160
+ })();
161
+ `.trim()}function i({pfx:e,title:t,subtitle:n}){return`
162
+ <div id="${e}-boot-loader" role="status" aria-live="polite" aria-label="Loading ${a(t)}">
163
+ <div class="${e}-boot-stage">
164
+ <div class="${e}-boot-ring"></div>
165
+ <div class="${e}-boot-ring delay-1"></div>
166
+ <div class="${e}-boot-ring delay-2"></div>
167
+ <div class="${e}-boot-ring delay-3"></div>
168
+ <div class="${e}-boot-logo-mark" aria-label="${a(t)}">
169
+ <svg class="${e}-boot-molecules" viewBox="0 0 100 100" aria-hidden="true">
170
+ <g class="${e}-boot-molecule m-1">
171
+ <line x1="28" y1="50" x2="72" y2="50" />
172
+ <circle cx="28" cy="50" r="7" />
173
+ <circle cx="72" cy="50" r="7" />
174
+ </g>
175
+ <g class="${e}-boot-molecule m-2">
176
+ <path d="M28,68 L50,38 L72,68" />
177
+ <circle cx="28" cy="68" r="5" />
178
+ <circle cx="50" cy="38" r="8" />
179
+ <circle cx="72" cy="68" r="5" />
180
+ </g>
181
+ <g class="${e}-boot-molecule m-3">
182
+ <line x1="50" y1="50" x2="25" y2="28" />
183
+ <line x1="50" y1="50" x2="75" y2="28" />
184
+ <line x1="50" y1="50" x2="25" y2="72" />
185
+ <line x1="50" y1="50" x2="75" y2="72" />
186
+ <circle cx="50" cy="50" r="7" />
187
+ <circle cx="25" cy="28" r="4.5" />
188
+ <circle cx="75" cy="28" r="4.5" />
189
+ <circle cx="25" cy="72" r="4.5" />
190
+ <circle cx="75" cy="72" r="4.5" />
191
+ </g>
192
+ <g class="${e}-boot-molecule m-4">
193
+ <path d="M50,28 L28,68 L72,68 Z" />
194
+ <circle cx="50" cy="28" r="7" />
195
+ <circle cx="28" cy="68" r="5" />
196
+ <circle cx="72" cy="68" r="5" />
197
+ </g>
198
+ <g class="${e}-boot-molecule m-5">
199
+ <line x1="18" y1="50" x2="82" y2="50" />
200
+ <circle cx="18" cy="50" r="5.5" />
201
+ <circle cx="39.3" cy="50" r="5.5" />
202
+ <circle cx="60.6" cy="50" r="5.5" />
203
+ <circle cx="82" cy="50" r="5.5" />
204
+ </g>
205
+ <g class="${e}-boot-molecule m-6">
206
+ <path d="M50,22 L74,36 L74,64 L50,78 L26,64 L26,36 Z" />
207
+ <circle cx="50" cy="22" r="4.5" />
208
+ <circle cx="74" cy="36" r="4.5" />
209
+ <circle cx="74" cy="64" r="4.5" />
210
+ <circle cx="50" cy="78" r="4.5" />
211
+ <circle cx="26" cy="64" r="4.5" />
212
+ <circle cx="26" cy="36" r="4.5" />
213
+ </g>
214
+ </svg>
215
+ </div>
216
+ </div>
217
+ <div class="${e}-boot-text">
218
+ <div class="${e}-boot-title">${a(t)}</div>
219
+ <div class="${e}-boot-subtitle">${a(n)}</div>
220
+ </div>
221
+ <div class="${e}-boot-progress" aria-hidden="true"></div>
222
+ </div>
223
+ `.trim()}function a(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`)}exports.vigletBootLoader=e;
@@ -0,0 +1,282 @@
1
+ //#region src/vite/boot-loader.ts
2
+ function e(e) {
3
+ let { title: a, subtitle: o, color: s, colorDark: c = s, prefix: l = "viglet", storageKey: u = "vite-ui-theme", testFlag: d = "__VIGLET_LOADING_TEST__", placeholder: f = "<!--viglet-boot-loader-->" } = e, p = t(s) ?? "37, 99, 235", m = {
4
+ pfx: l,
5
+ title: a,
6
+ subtitle: o,
7
+ color: s,
8
+ colorDark: c,
9
+ rgb: p,
10
+ rgbDark: t(c) ?? p,
11
+ storageKey: u,
12
+ testFlag: d
13
+ }, h = n(m), g = r(m), _ = i(m);
14
+ return {
15
+ name: "viglet-boot-loader",
16
+ transformIndexHtml(e) {
17
+ return {
18
+ html: e.includes(f) ? e.replace(f, _) : e.replace(/(<div\b[^>]*\bid=["']root["'][^>]*>)/, (e) => `${e}\n${_}\n`),
19
+ tags: [{
20
+ tag: "style",
21
+ attrs: { "data-viglet-boot-loader": "" },
22
+ children: h,
23
+ injectTo: "head"
24
+ }, {
25
+ tag: "script",
26
+ children: g,
27
+ injectTo: "head"
28
+ }]
29
+ };
30
+ }
31
+ };
32
+ }
33
+ function t(e) {
34
+ if (!e) return null;
35
+ let t = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(e.trim());
36
+ if (t) {
37
+ let [, e, n, r] = t;
38
+ return `${Number.parseInt(e + e, 16)}, ${Number.parseInt(n + n, 16)}, ${Number.parseInt(r + r, 16)}`;
39
+ }
40
+ let n = /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e.trim());
41
+ if (n) {
42
+ let [, e, t, r] = n;
43
+ return `${Number.parseInt(e, 16)}, ${Number.parseInt(t, 16)}, ${Number.parseInt(r, 16)}`;
44
+ }
45
+ return null;
46
+ }
47
+ function n({ pfx: e, color: t, colorDark: n, rgb: r }) {
48
+ return `
49
+ html, body { margin: 0; padding: 0; height: 100%; }
50
+ body {
51
+ background:
52
+ radial-gradient(1200px 600px at 20% 10%, rgba(${r}, 0.18), transparent 60%),
53
+ radial-gradient(900px 500px at 80% 90%, rgba(${r}, 0.18), transparent 60%),
54
+ #0a0a0f;
55
+ color: #e5e7eb;
56
+ font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
57
+ }
58
+ body.${e}-light-boot {
59
+ background:
60
+ radial-gradient(1200px 600px at 20% 10%, rgba(${r}, 0.10), transparent 60%),
61
+ radial-gradient(900px 500px at 80% 90%, rgba(${r}, 0.10), transparent 60%),
62
+ #fafafa;
63
+ color: #0f172a;
64
+ }
65
+ #${e}-boot-loader {
66
+ position: fixed; inset: 0;
67
+ display: flex; align-items: center; justify-content: center; flex-direction: column;
68
+ z-index: 9999;
69
+ animation: ${e}-boot-fade-in 0.4s ease-out;
70
+ }
71
+ .${e}-boot-stage {
72
+ position: relative; width: 160px; height: 160px;
73
+ display: flex; align-items: center; justify-content: center;
74
+ }
75
+ .${e}-boot-ring {
76
+ position: absolute; inset: 0; border-radius: 50%;
77
+ border: 2px solid rgba(${r}, 0.55); opacity: 0;
78
+ animation: ${e}-boot-ring-pulse 2.4s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
79
+ }
80
+ .${e}-boot-ring.delay-1 { animation-delay: 0.6s; }
81
+ .${e}-boot-ring.delay-2 { animation-delay: 1.2s; }
82
+ .${e}-boot-ring.delay-3 { animation-delay: 1.8s; }
83
+ .${e}-boot-logo-mark {
84
+ position: relative; width: 110px; height: 110px;
85
+ color: #FFDEAD;
86
+ display: flex; align-items: center; justify-content: center;
87
+ -webkit-user-select: none; user-select: none;
88
+ animation: ${e}-boot-breathe 2.2s ease-in-out infinite;
89
+ }
90
+ .${e}-boot-logo-mark::before {
91
+ content: ""; position: absolute; inset: 0; border-radius: 50%;
92
+ background: linear-gradient(135deg, ${t}, ${n}, ${t});
93
+ background-size: 300% 300%;
94
+ z-index: -2; filter: blur(18px); opacity: 0.5;
95
+ animation: ${e}-boot-glow 6s linear infinite;
96
+ }
97
+ .${e}-boot-logo-mark::after {
98
+ content: ""; position: absolute; inset: 8px; border-radius: 50%;
99
+ background: radial-gradient(circle at center, ${t} 0%, rgba(${r},0.6) 55%, rgba(${r},0) 100%);
100
+ filter: blur(5px); z-index: -1;
101
+ animation: ${e}-boot-gas 4s ease-in-out infinite;
102
+ }
103
+ @keyframes ${e}-boot-gas {
104
+ 0%, 100% { transform: scale(1); opacity: 0.85; }
105
+ 50% { transform: scale(1.08); opacity: 1; }
106
+ }
107
+ .${e}-boot-molecules { width: 62px; height: 62px; overflow: visible; }
108
+ .${e}-boot-molecules line, .${e}-boot-molecules path {
109
+ stroke: #FFDEAD; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; fill: none;
110
+ }
111
+ .${e}-boot-molecules circle { fill: #FFDEAD; }
112
+ .${e}-boot-molecule {
113
+ opacity: 0; transform-origin: center;
114
+ animation: ${e}-boot-molecule-cycle 10s ease-in-out infinite both;
115
+ }
116
+ .${e}-boot-molecule.m-2 { animation-delay: -1.667s; }
117
+ .${e}-boot-molecule.m-3 { animation-delay: -3.333s; }
118
+ .${e}-boot-molecule.m-4 { animation-delay: -5.000s; }
119
+ .${e}-boot-molecule.m-5 { animation-delay: -6.667s; }
120
+ .${e}-boot-molecule.m-6 { animation-delay: -8.333s; }
121
+ @keyframes ${e}-boot-molecule-cycle {
122
+ 0% { opacity: 0; transform: scale(0.7); }
123
+ 3% { opacity: 1; transform: scale(1); }
124
+ 14% { opacity: 1; transform: scale(1); }
125
+ 17% { opacity: 0; transform: scale(0.7); }
126
+ 100% { opacity: 0; transform: scale(0.7); }
127
+ }
128
+ .${e}-boot-text { margin-top: 2rem; text-align: center; }
129
+ .${e}-boot-title {
130
+ font-size: 1.15rem; font-weight: 700; letter-spacing: 0.01em;
131
+ background: linear-gradient(90deg, ${t}, ${n});
132
+ background-size: 200% auto;
133
+ -webkit-background-clip: text; background-clip: text; color: transparent;
134
+ animation: ${e}-boot-shimmer 3s linear infinite;
135
+ }
136
+ .${e}-boot-subtitle {
137
+ margin-top: 0.35rem; font-size: 0.8rem;
138
+ opacity: 0.55; letter-spacing: 0.05em; text-transform: uppercase;
139
+ }
140
+ .${e}-boot-progress {
141
+ margin-top: 1.5rem; width: 180px; height: 3px;
142
+ border-radius: 999px; background: rgba(148, 163, 184, 0.15);
143
+ overflow: hidden; position: relative;
144
+ }
145
+ .${e}-boot-progress::after {
146
+ content: ""; position: absolute; top: 0; left: 0;
147
+ width: 40%; height: 100%; border-radius: 999px;
148
+ background: linear-gradient(90deg, transparent, ${t} 30%, ${n} 70%, transparent);
149
+ transform: translateX(-100%); will-change: transform;
150
+ animation: ${e}-boot-slide 1.6s cubic-bezier(0.4, 0, 0.6, 1) infinite;
151
+ }
152
+ @keyframes ${e}-boot-fade-in { from { opacity: 0; } to { opacity: 1; } }
153
+ @keyframes ${e}-boot-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
154
+ @keyframes ${e}-boot-glow { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }
155
+ @keyframes ${e}-boot-ring-pulse {
156
+ 0% { transform: scale(0.55); opacity: 0.7; border-width: 2px; }
157
+ 70% { opacity: 0.05; }
158
+ 100% { transform: scale(1.25); opacity: 0; border-width: 1px; }
159
+ }
160
+ @keyframes ${e}-boot-shimmer { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
161
+ @keyframes ${e}-boot-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(450%); } }
162
+ @media (prefers-reduced-motion: reduce) {
163
+ .${e}-boot-ring,
164
+ .${e}-boot-logo-mark,
165
+ .${e}-boot-logo-mark::before,
166
+ .${e}-boot-logo-mark::after,
167
+ .${e}-boot-molecule,
168
+ .${e}-boot-title,
169
+ .${e}-boot-progress::after { animation: none !important; }
170
+ .${e}-boot-ring { opacity: 0.2; transform: scale(1); }
171
+ .${e}-boot-molecule { opacity: 0; }
172
+ .${e}-boot-molecule.m-1 { opacity: 1; transform: scale(1); }
173
+ }
174
+ .${e}-boot-test-badge {
175
+ position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
176
+ padding: 6px 12px; font-size: 11px; font-weight: 700;
177
+ letter-spacing: 0.08em; text-transform: uppercase; color: #fff;
178
+ background: linear-gradient(135deg, #dc2626, #ea580c);
179
+ border-radius: 999px; box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
180
+ z-index: 10000;
181
+ }
182
+ `.trim();
183
+ }
184
+ function r({ pfx: e, storageKey: t, testFlag: n }) {
185
+ return `
186
+ (function () {
187
+ try {
188
+ var stored = localStorage.getItem(${JSON.stringify(t)});
189
+ var prefersLight = stored === "light"
190
+ || (stored === "system" && globalThis.matchMedia("(prefers-color-scheme: light)").matches)
191
+ || (!stored && globalThis.matchMedia("(prefers-color-scheme: light)").matches);
192
+ if (prefersLight) {
193
+ document.documentElement.classList.remove("dark");
194
+ document.addEventListener("DOMContentLoaded", function () {
195
+ document.body.classList.add(${JSON.stringify(e + "-light-boot")});
196
+ });
197
+ }
198
+ } catch (e) { /* ignore */ }
199
+ try {
200
+ if (new URLSearchParams(globalThis.location.search).has("loading")) {
201
+ globalThis[${JSON.stringify(n)}] = true;
202
+ document.addEventListener("DOMContentLoaded", function () {
203
+ var badge = document.createElement("div");
204
+ badge.className = ${JSON.stringify(e + "-boot-test-badge")};
205
+ badge.textContent = "Loading \xb7 Test Mode \xb7 ?loading=1";
206
+ document.body.appendChild(badge);
207
+ });
208
+ }
209
+ } catch (e) { /* ignore */ }
210
+ })();
211
+ `.trim();
212
+ }
213
+ function i({ pfx: e, title: t, subtitle: n }) {
214
+ return `
215
+ <div id="${e}-boot-loader" role="status" aria-live="polite" aria-label="Loading ${a(t)}">
216
+ <div class="${e}-boot-stage">
217
+ <div class="${e}-boot-ring"></div>
218
+ <div class="${e}-boot-ring delay-1"></div>
219
+ <div class="${e}-boot-ring delay-2"></div>
220
+ <div class="${e}-boot-ring delay-3"></div>
221
+ <div class="${e}-boot-logo-mark" aria-label="${a(t)}">
222
+ <svg class="${e}-boot-molecules" viewBox="0 0 100 100" aria-hidden="true">
223
+ <g class="${e}-boot-molecule m-1">
224
+ <line x1="28" y1="50" x2="72" y2="50" />
225
+ <circle cx="28" cy="50" r="7" />
226
+ <circle cx="72" cy="50" r="7" />
227
+ </g>
228
+ <g class="${e}-boot-molecule m-2">
229
+ <path d="M28,68 L50,38 L72,68" />
230
+ <circle cx="28" cy="68" r="5" />
231
+ <circle cx="50" cy="38" r="8" />
232
+ <circle cx="72" cy="68" r="5" />
233
+ </g>
234
+ <g class="${e}-boot-molecule m-3">
235
+ <line x1="50" y1="50" x2="25" y2="28" />
236
+ <line x1="50" y1="50" x2="75" y2="28" />
237
+ <line x1="50" y1="50" x2="25" y2="72" />
238
+ <line x1="50" y1="50" x2="75" y2="72" />
239
+ <circle cx="50" cy="50" r="7" />
240
+ <circle cx="25" cy="28" r="4.5" />
241
+ <circle cx="75" cy="28" r="4.5" />
242
+ <circle cx="25" cy="72" r="4.5" />
243
+ <circle cx="75" cy="72" r="4.5" />
244
+ </g>
245
+ <g class="${e}-boot-molecule m-4">
246
+ <path d="M50,28 L28,68 L72,68 Z" />
247
+ <circle cx="50" cy="28" r="7" />
248
+ <circle cx="28" cy="68" r="5" />
249
+ <circle cx="72" cy="68" r="5" />
250
+ </g>
251
+ <g class="${e}-boot-molecule m-5">
252
+ <line x1="18" y1="50" x2="82" y2="50" />
253
+ <circle cx="18" cy="50" r="5.5" />
254
+ <circle cx="39.3" cy="50" r="5.5" />
255
+ <circle cx="60.6" cy="50" r="5.5" />
256
+ <circle cx="82" cy="50" r="5.5" />
257
+ </g>
258
+ <g class="${e}-boot-molecule m-6">
259
+ <path d="M50,22 L74,36 L74,64 L50,78 L26,64 L26,36 Z" />
260
+ <circle cx="50" cy="22" r="4.5" />
261
+ <circle cx="74" cy="36" r="4.5" />
262
+ <circle cx="74" cy="64" r="4.5" />
263
+ <circle cx="50" cy="78" r="4.5" />
264
+ <circle cx="26" cy="64" r="4.5" />
265
+ <circle cx="26" cy="36" r="4.5" />
266
+ </g>
267
+ </svg>
268
+ </div>
269
+ </div>
270
+ <div class="${e}-boot-text">
271
+ <div class="${e}-boot-title">${a(t)}</div>
272
+ <div class="${e}-boot-subtitle">${a(n)}</div>
273
+ </div>
274
+ <div class="${e}-boot-progress" aria-hidden="true"></div>
275
+ </div>
276
+ `.trim();
277
+ }
278
+ function a(e) {
279
+ return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
280
+ }
281
+ //#endregion
282
+ export { e as vigletBootLoader };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viglet/viglet-design-system",
3
- "version": "2026.2.49",
3
+ "version": "2026.2.51",
4
4
  "type": "module",
5
5
  "description": "Viglet Design System - Shared components, hooks, utilities and design tokens for Viglet products",
6
6
  "license": "Apache-2.0",
@@ -17,29 +17,34 @@
17
17
  "types": "./dist/src/index.d.ts",
18
18
  "exports": {
19
19
  ".": {
20
+ "types": "./dist/src/index.d.ts",
20
21
  "import": "./dist/index.es.js",
21
- "require": "./dist/index.cjs.js",
22
- "types": "./dist/src/index.d.ts"
22
+ "require": "./dist/index.cjs.js"
23
23
  },
24
24
  "./styles": "./dist/viglet-design-system.css",
25
25
  "./preset": "./dist/preset.css",
26
26
  "./preset.css": "./dist/preset.css",
27
27
  "./i18n": {
28
+ "types": "./dist/src/i18n/index.d.ts",
28
29
  "import": "./dist/i18n.es.js",
29
- "require": "./dist/i18n.cjs.js",
30
- "types": "./dist/src/i18n/index.d.ts"
30
+ "require": "./dist/i18n.cjs.js"
31
31
  },
32
32
  "./router": {
33
+ "types": "./dist/src/router.d.ts",
33
34
  "import": "./dist/router.es.js",
34
- "require": "./dist/router.cjs.js",
35
- "types": "./dist/src/router.d.ts"
35
+ "require": "./dist/router.cjs.js"
36
36
  },
37
37
  "./floating-formulas-bg": {
38
+ "types": "./dist/src/components/ui/floating-formulas-bg.d.ts",
38
39
  "import": "./dist/floating-formulas-bg.es.js",
39
- "require": "./dist/floating-formulas-bg.cjs.js",
40
- "types": "./dist/src/components/ui/floating-formulas-bg.d.ts"
40
+ "require": "./dist/floating-formulas-bg.cjs.js"
41
41
  },
42
- "./floating-formulas-bg.css": "./dist/floating-formulas-bg.css"
42
+ "./floating-formulas-bg.css": "./dist/floating-formulas-bg.css",
43
+ "./vite": {
44
+ "types": "./dist/src/vite/index.d.ts",
45
+ "import": "./dist/vite.es.js",
46
+ "require": "./dist/vite.cjs.js"
47
+ }
43
48
  },
44
49
  "files": [
45
50
  "dist"
@@ -51,6 +56,8 @@
51
56
  "dev": "vite build --watch",
52
57
  "build": "tsc -b && node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && vite build && node -e \"require('fs').cpSync('src/styles/preset.css','dist/preset.css')\"",
53
58
  "lint": "eslint .",
59
+ "storybook": "storybook dev -p 6006",
60
+ "build-storybook": "storybook build",
54
61
  "prepublishOnly": "npm run build"
55
62
  },
56
63
  "peerDependencies": {
@@ -106,6 +113,10 @@
106
113
  },
107
114
  "devDependencies": {
108
115
  "@eslint/js": "^9.39.0",
116
+ "@storybook/addon-a11y": "^10.3.5",
117
+ "@storybook/addon-docs": "^10.3.5",
118
+ "@storybook/addon-themes": "^10.3.5",
119
+ "@storybook/react-vite": "^10.3.5",
109
120
  "@tailwindcss/typography": "^0.5.19",
110
121
  "@tailwindcss/vite": "^4.2.2",
111
122
  "@types/node": "^25.5.0",
@@ -117,6 +128,7 @@
117
128
  "eslint-plugin-react-refresh": "^0.5.2",
118
129
  "globals": "^17.4.0",
119
130
  "react-router-dom": "^7.0.0",
131
+ "storybook": "^10.3.5",
120
132
  "tailwindcss": "^4.1.11",
121
133
  "tw-animate-css": "^1.4.0",
122
134
  "typescript": "~6.0.2",