@fdm-monster/client-next 0.0.8 → 0.0.10
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/.eslintrc-auto-import.json +4 -1
- package/.yarn/install-state.gz +0 -0
- package/RELEASE_NOTES.MD +17 -0
- package/dist/assets/{index-xg8J8Ham.css → index-B9gkoFzI.css} +1 -1
- package/dist/assets/index-CM4We7__.js +90 -0
- package/dist/assets/index-CM4We7__.js.map +1 -0
- package/dist/index.html +116 -4
- package/dist/vite.svg +1 -0
- package/package.json +1 -1
- package/plugins/plugin.ts +123 -0
- package/public/vite.svg +1 -0
- package/vite.config.mts +8 -6
- package/dist/assets/index-FAsYkUz6.js +0 -90
- package/dist/assets/index-FAsYkUz6.js.map +0 -1
package/dist/index.html
CHANGED
|
@@ -13,12 +13,124 @@
|
|
|
13
13
|
<link rel="icon" href="/favicon.ico" />
|
|
14
14
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
15
15
|
<title>FDM Monster</title>
|
|
16
|
-
<script type="module" crossorigin src="/assets/index-
|
|
17
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
18
|
-
|
|
16
|
+
<script type="module" crossorigin src="/assets/index-CM4We7__.js"></script>
|
|
17
|
+
<link rel="stylesheet" crossorigin href="/assets/index-B9gkoFzI.css">
|
|
18
|
+
|
|
19
|
+
<style id="vpss-style">
|
|
20
|
+
#vpss {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
align-items: center;
|
|
25
|
+
gap: 16px;
|
|
26
|
+
position: fixed;
|
|
27
|
+
background-color: var(--vpss-bg-splash, rgb(40, 40, 40));
|
|
28
|
+
top: 0px;
|
|
29
|
+
right: 0px;
|
|
30
|
+
left: 0px;
|
|
31
|
+
bottom: 0;
|
|
32
|
+
z-index: 99999;
|
|
33
|
+
opacity: 1;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
#vpss.vpss-hidden {
|
|
37
|
+
pointer-events: none;
|
|
38
|
+
animation: vpss-hide 200ms forwards;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@keyframes vpss-hide {
|
|
42
|
+
from {
|
|
43
|
+
opacity: 1;
|
|
44
|
+
}
|
|
45
|
+
to {
|
|
46
|
+
opacity: 0;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
#vpss .vpss-loader {
|
|
50
|
+
display: inline-block;
|
|
51
|
+
position: relative;
|
|
52
|
+
width: 72px;
|
|
53
|
+
height: 10px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
#vpss .vpss-loader .vpss-dot {
|
|
57
|
+
position: absolute;
|
|
58
|
+
width: 10px;
|
|
59
|
+
height: 10px;
|
|
60
|
+
border-radius: 50%;
|
|
61
|
+
background: var(--vpss-bg-loader, rgb(155, 5, 5));
|
|
62
|
+
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
#vpss .vpss-loader .vpss-dot:nth-child(1) {
|
|
66
|
+
left: 8px;
|
|
67
|
+
animation: vpss-dot1 0.6s infinite;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
#vpss .vpss-loader .vpss-dot:nth-child(2) {
|
|
71
|
+
left: 8px;
|
|
72
|
+
animation: vpss-dot2 0.6s infinite;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
#vpss .vpss-loader .vpss-dot:nth-child(3) {
|
|
76
|
+
left: 32px;
|
|
77
|
+
animation: vpss-dot2 0.6s infinite;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
#vpss .vpss-loader .vpss-dot:nth-child(4) {
|
|
81
|
+
left: 56px;
|
|
82
|
+
animation: vpss-dot3 0.6s infinite;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@keyframes vpss-dot1 {
|
|
86
|
+
0% {
|
|
87
|
+
transform: scale(0);
|
|
88
|
+
}
|
|
89
|
+
100% {
|
|
90
|
+
transform: scale(1);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@keyframes vpss-dot2 {
|
|
95
|
+
0% {
|
|
96
|
+
transform: translate(0, 0);
|
|
97
|
+
}
|
|
98
|
+
100% {
|
|
99
|
+
transform: translate(24px, 0);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@keyframes vpss-dot3 {
|
|
104
|
+
0% {
|
|
105
|
+
transform: scale(1);
|
|
106
|
+
}
|
|
107
|
+
100% {
|
|
108
|
+
transform: scale(0);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
</style>
|
|
112
|
+
</head>
|
|
19
113
|
|
|
20
114
|
<body>
|
|
21
115
|
<div id="app"></div>
|
|
22
|
-
|
|
116
|
+
|
|
117
|
+
<div id="vpss">
|
|
118
|
+
<div class="vpss-logo"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="72" height="72" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg></div>
|
|
119
|
+
<div class="vpss-loader">
|
|
120
|
+
<div class="vpss-dot"></div>
|
|
121
|
+
<div class="vpss-dot"></div>
|
|
122
|
+
<div class="vpss-dot"></div>
|
|
123
|
+
<div class="vpss-dot"></div>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
<script>
|
|
127
|
+
(function () {
|
|
128
|
+
window.__VPSS__ = {
|
|
129
|
+
renderedAt: new Date().getTime(),
|
|
130
|
+
minDurationMs: 0,
|
|
131
|
+
};
|
|
132
|
+
})();
|
|
133
|
+
</script>
|
|
134
|
+
</body>
|
|
23
135
|
|
|
24
136
|
</html>
|
package/dist/vite.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="72" height="72" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
package/package.json
CHANGED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import path from "path";
|
|
3
|
+
import type { PluginOption, ResolvedConfig } from "vite";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A copy of the plugin vite-plugin-splash-screen
|
|
7
|
+
* https://github.com/Temzasse/vite-plugin-splash-screen/commit/2982d266cf8a7e64b62befb187347058d72ff56a
|
|
8
|
+
*/
|
|
9
|
+
type LoaderType = "line" | "dots" | "none";
|
|
10
|
+
|
|
11
|
+
type PluginOptions = {
|
|
12
|
+
logoSrc: string;
|
|
13
|
+
splashBg?: string;
|
|
14
|
+
loaderBg?: string;
|
|
15
|
+
loaderType?: LoaderType;
|
|
16
|
+
minDurationMs?: number;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export function splashScreen(options: PluginOptions) {
|
|
20
|
+
if (!options.logoSrc) {
|
|
21
|
+
throw new Error(
|
|
22
|
+
"The `logoSrc` option is required for vite-plugin-splash-screen!"
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const {
|
|
27
|
+
logoSrc,
|
|
28
|
+
minDurationMs,
|
|
29
|
+
loaderType = "line",
|
|
30
|
+
loaderBg = "#0072f5",
|
|
31
|
+
splashBg = "#ffffff",
|
|
32
|
+
} = options;
|
|
33
|
+
|
|
34
|
+
let config: ResolvedConfig;
|
|
35
|
+
|
|
36
|
+
return {
|
|
37
|
+
name: "vite-plugin-splash-screen",
|
|
38
|
+
configResolved(resolvedConfig: any) {
|
|
39
|
+
config = resolvedConfig;
|
|
40
|
+
},
|
|
41
|
+
transformIndexHtml(html: string) {
|
|
42
|
+
const baseStyles = readPluginFile("styles.css");
|
|
43
|
+
|
|
44
|
+
let loaderStyles = "";
|
|
45
|
+
|
|
46
|
+
if (loaderType === "line") {
|
|
47
|
+
loaderStyles = readPluginFile("loaders/line.css");
|
|
48
|
+
} else if (loaderType === "dots") {
|
|
49
|
+
loaderStyles = readPluginFile("loaders/dots.css");
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const logoHtml = fs.readFileSync(
|
|
53
|
+
path.resolve(config.publicDir, logoSrc),
|
|
54
|
+
"utf8"
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
const splash = splashTemplate({
|
|
58
|
+
logoHtml,
|
|
59
|
+
loaderType,
|
|
60
|
+
minDurationMs,
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
const styles = `
|
|
64
|
+
<style id="vpss-style">
|
|
65
|
+
${baseStyles.replace("/*BG_SPLASH*/", splashBg)}
|
|
66
|
+
${loaderStyles.replace("/*BG_LOADER*/", loaderBg)}
|
|
67
|
+
</style>
|
|
68
|
+
`;
|
|
69
|
+
|
|
70
|
+
return (
|
|
71
|
+
html
|
|
72
|
+
// Add styles to end of head
|
|
73
|
+
.replace("</head>", `${styles}</head>`)
|
|
74
|
+
// Add splash screen to end of body
|
|
75
|
+
.replace("</body>", `${splash}</body>`)
|
|
76
|
+
);
|
|
77
|
+
},
|
|
78
|
+
} satisfies PluginOption;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function splashTemplate({
|
|
82
|
+
logoHtml,
|
|
83
|
+
loaderType,
|
|
84
|
+
minDurationMs,
|
|
85
|
+
}: {
|
|
86
|
+
logoHtml: string;
|
|
87
|
+
loaderType: LoaderType;
|
|
88
|
+
minDurationMs?: number;
|
|
89
|
+
}) {
|
|
90
|
+
/**
|
|
91
|
+
* TODO: add more loader options.
|
|
92
|
+
* Inspiration: https://cssloaders.github.io/
|
|
93
|
+
*/
|
|
94
|
+
let loaderHtml = "";
|
|
95
|
+
|
|
96
|
+
if (loaderType === "line") {
|
|
97
|
+
loaderHtml = readPluginFile("loaders/line.html");
|
|
98
|
+
} else if (loaderType === "dots") {
|
|
99
|
+
loaderHtml = readPluginFile("loaders/dots.html");
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return /*html*/ `
|
|
103
|
+
<div id="vpss">
|
|
104
|
+
<div class="vpss-logo">${logoHtml}</div>
|
|
105
|
+
${loaderHtml}
|
|
106
|
+
</div>
|
|
107
|
+
<script>
|
|
108
|
+
(function () {
|
|
109
|
+
window.__VPSS__ = {
|
|
110
|
+
renderedAt: new Date().getTime(),
|
|
111
|
+
minDurationMs: ${minDurationMs || 0},
|
|
112
|
+
};
|
|
113
|
+
})();
|
|
114
|
+
</script>
|
|
115
|
+
`;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// TODO: is there an easier way to resolve static files relative to the plugin?
|
|
119
|
+
const pluginPath = "src/plugins/dev-splashscreen";
|
|
120
|
+
|
|
121
|
+
function readPluginFile(filePath: string) {
|
|
122
|
+
return fs.readFileSync(path.resolve(pluginPath, filePath), "utf8");
|
|
123
|
+
}
|
package/public/vite.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="72" height="72" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
package/vite.config.mts
CHANGED
|
@@ -10,16 +10,18 @@ import { defineConfig } from 'vite'
|
|
|
10
10
|
import { fileURLToPath, URL } from 'url'
|
|
11
11
|
import packageJson from './package.json'
|
|
12
12
|
import { sentryVitePlugin } from '@sentry/vite-plugin'
|
|
13
|
+
import { splashScreen } from './plugins/plugin'
|
|
13
14
|
|
|
14
15
|
// https://vitejs.dev/config/
|
|
15
16
|
export default defineConfig({
|
|
16
17
|
plugins: [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
splashScreen({
|
|
19
|
+
logoSrc: 'vite.svg',
|
|
20
|
+
splashBg: 'rgb(40, 40, 40)',
|
|
21
|
+
loaderType: 'dots',
|
|
22
|
+
loaderBg: 'rgb(155, 5, 5)',
|
|
23
|
+
minTime: 1000
|
|
24
|
+
}),
|
|
23
25
|
AutoImport({
|
|
24
26
|
imports: ['vue'],
|
|
25
27
|
dts: 'src/auto-imports.d.ts',
|