@fdm-monster/client-next 0.0.24 → 0.0.26
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/.yarn/install-state.gz +0 -0
- package/RELEASE_NOTES.MD +14 -0
- package/dist/assets/index-Do7s4nYD.css +1 -0
- package/dist/assets/index-DptX0-sw.js +60 -0
- package/dist/assets/{index-DlsW6Z1X.js.map → index-DptX0-sw.js.map} +1 -1
- package/dist/img/logo.svg +17 -1
- package/dist/index.html +21 -4
- package/package.json +1 -1
- package/plugins/plugin.ts +25 -23
- package/public/img/logo.svg +17 -1
- package/vite.config.ts +1 -1
- package/dist/assets/index-CT4EcjmG.css +0 -1
- package/dist/assets/index-DlsW6Z1X.js +0 -60
package/dist/img/logo.svg
CHANGED
|
@@ -1 +1,17 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg id="svg2" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" width="72" height="72"
|
|
3
|
+
viewBox="0 0 412 412">
|
|
4
|
+
<defs>
|
|
5
|
+
<style>.cls-1{fill:#e60012;}</style>
|
|
6
|
+
</defs>
|
|
7
|
+
<g>
|
|
8
|
+
<circle cx="206.21" cy="206.21" r="206.21"/>
|
|
9
|
+
<path d="M34.9,185.49c-.71,5.88-1.13,11.86-1.26,17.9,22.27-14.3,45.49-25.72,45.49-25.72-14.56-.07-33.13,4.59-44.23,7.82Z"/>
|
|
10
|
+
<g>
|
|
11
|
+
<path class="cls-1"
|
|
12
|
+
d="M127.11,154.6c-21.55,.7-61.54,5-91.52,25.69-3.61,2.49-7.07,5.22-10.34,8.21,0,0,3.78-1.31,9.64-3.01,11.1-3.23,29.67-7.89,44.23-7.82,0,0-23.22,11.42-45.49,25.72-.03,1.28-.05,2.55-.05,3.83,0,7.19,.44,14.27,1.26,21.23,28.85-38.28,73.71-64.21,92.26-73.85Z"/>
|
|
13
|
+
<path class="cls-1"
|
|
14
|
+
d="M316.16,304.46c-13.24,9.59-32.06,2.21-26.71-14.19,0,0-8.39,6.35-16.59-1.14-8.2-7.49-5.32-14.28-5.32-14.28,0,0-4.76,5.93-15.82-1.2-4.18-2.69-4.92-3.16-6.61-8.41-5.2-16.2,.4-27.23,11.47-36.03,14.05-11.62,27.38-10.43,32.98-10.03,18.18,1.3,21.3,16.88,21.3,16.88,49.54-20.18,37.78,30.33,37.78,30.33,25.69-9.17,21.51-58.49,21.51-58.49-63.73,1.75-69.01-33.33-69.01-33.33h0c-73.34-32.35-98.93-136.88-98.93-136.88-10.09,33.49,8.45,101.01,8.45,101.01-41.28-21.1-66.05-63.3-66.05-63.3-2.69,20.6,29.6,66.99,31.13,69.18-1.05-1.46-16.46-21.08-81.61-15.27,0,0,43.43,8.91,47.96,23.52-1.19,.34-2.36,.68-3.53,1.02-45.03,20.97-82.6,57.7-102.36,83.99,8.94,52.17,40.31,96.68,83.84,123.22-29.33-58.5,4.94-109.29,21.47-121.26,15.22-11.02,28.12-12.32,34.24-10.75-8.32-18.53-31.75-29.17-31.75-29.17,45.98,15.71,39.57,45.39,39.57,45.39,0,0-4.35,14.14-5.8,13.79-.09,.17-.14,.26-.14,.26,105.64,26.71,92.52,74.54,92.52,74.54,37.61-6.42,46.18-29.67,46.18-29.67m-22.54-100.14c-4.43,.24-20.05-7.97-25.11-12.39-5.9-5.16-15.37-31.65-15.37-31.65,0,0,14.68,12.21,25.98,21.53,9.88,8.15,16.96,13.82,18.1,17.98l-3.6,4.53Z"/>
|
|
15
|
+
</g>
|
|
16
|
+
</g>
|
|
17
|
+
</svg>
|
package/dist/index.html
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<head>
|
|
5
5
|
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin="anonymous">
|
|
6
6
|
<link rel="preload" as="style" onload="this.rel='stylesheet'" href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&display=swap">
|
|
7
|
-
<link rel="preload" as="font" type="font/eot" href="/assets/MaterialIcons-Regular-BjXOXp5c.eot" crossorigin="anonymous">
|
|
8
7
|
<link rel="preload" as="font" type="font/woff2" href="/assets/MaterialIcons-Regular-DOtZ65Va.woff2" crossorigin="anonymous">
|
|
8
|
+
<link rel="preload" as="font" type="font/eot" href="/assets/MaterialIcons-Regular-BjXOXp5c.eot" crossorigin="anonymous">
|
|
9
9
|
<link rel="preload" as="font" type="font/woff" href="/assets/MaterialIcons-Regular-FsbMSDLx.woff" crossorigin="anonymous">
|
|
10
10
|
<link rel="preload" as="font" type="font/ttf" href="/assets/MaterialIcons-Regular-DEUTIz1o.ttf" crossorigin="anonymous">
|
|
11
11
|
|
|
@@ -13,8 +13,8 @@
|
|
|
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-
|
|
16
|
+
<script type="module" crossorigin src="/assets/index-DptX0-sw.js"></script>
|
|
17
|
+
<link rel="stylesheet" crossorigin href="/assets/index-Do7s4nYD.css">
|
|
18
18
|
|
|
19
19
|
<style id="vpss-style">
|
|
20
20
|
#vpss {
|
|
@@ -115,7 +115,24 @@
|
|
|
115
115
|
<div id="app"></div>
|
|
116
116
|
|
|
117
117
|
<div id="vpss">
|
|
118
|
-
<div class="vpss-logo"
|
|
118
|
+
<div class="vpss-logo"><?xml version="1.0" encoding="UTF-8"?>
|
|
119
|
+
<svg id="svg2" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" width="72" height="72"
|
|
120
|
+
viewBox="0 0 412 412">
|
|
121
|
+
<defs>
|
|
122
|
+
<style>.cls-1{fill:#e60012;}</style>
|
|
123
|
+
</defs>
|
|
124
|
+
<g>
|
|
125
|
+
<circle cx="206.21" cy="206.21" r="206.21"/>
|
|
126
|
+
<path d="M34.9,185.49c-.71,5.88-1.13,11.86-1.26,17.9,22.27-14.3,45.49-25.72,45.49-25.72-14.56-.07-33.13,4.59-44.23,7.82Z"/>
|
|
127
|
+
<g>
|
|
128
|
+
<path class="cls-1"
|
|
129
|
+
d="M127.11,154.6c-21.55,.7-61.54,5-91.52,25.69-3.61,2.49-7.07,5.22-10.34,8.21,0,0,3.78-1.31,9.64-3.01,11.1-3.23,29.67-7.89,44.23-7.82,0,0-23.22,11.42-45.49,25.72-.03,1.28-.05,2.55-.05,3.83,0,7.19,.44,14.27,1.26,21.23,28.85-38.28,73.71-64.21,92.26-73.85Z"/>
|
|
130
|
+
<path class="cls-1"
|
|
131
|
+
d="M316.16,304.46c-13.24,9.59-32.06,2.21-26.71-14.19,0,0-8.39,6.35-16.59-1.14-8.2-7.49-5.32-14.28-5.32-14.28,0,0-4.76,5.93-15.82-1.2-4.18-2.69-4.92-3.16-6.61-8.41-5.2-16.2,.4-27.23,11.47-36.03,14.05-11.62,27.38-10.43,32.98-10.03,18.18,1.3,21.3,16.88,21.3,16.88,49.54-20.18,37.78,30.33,37.78,30.33,25.69-9.17,21.51-58.49,21.51-58.49-63.73,1.75-69.01-33.33-69.01-33.33h0c-73.34-32.35-98.93-136.88-98.93-136.88-10.09,33.49,8.45,101.01,8.45,101.01-41.28-21.1-66.05-63.3-66.05-63.3-2.69,20.6,29.6,66.99,31.13,69.18-1.05-1.46-16.46-21.08-81.61-15.27,0,0,43.43,8.91,47.96,23.52-1.19,.34-2.36,.68-3.53,1.02-45.03,20.97-82.6,57.7-102.36,83.99,8.94,52.17,40.31,96.68,83.84,123.22-29.33-58.5,4.94-109.29,21.47-121.26,15.22-11.02,28.12-12.32,34.24-10.75-8.32-18.53-31.75-29.17-31.75-29.17,45.98,15.71,39.57,45.39,39.57,45.39,0,0-4.35,14.14-5.8,13.79-.09,.17-.14,.26-.14,.26,105.64,26.71,92.52,74.54,92.52,74.54,37.61-6.42,46.18-29.67,46.18-29.67m-22.54-100.14c-4.43,.24-20.05-7.97-25.11-12.39-5.9-5.16-15.37-31.65-15.37-31.65,0,0,14.68,12.21,25.98,21.53,9.88,8.15,16.96,13.82,18.1,17.98l-3.6,4.53Z"/>
|
|
132
|
+
</g>
|
|
133
|
+
</g>
|
|
134
|
+
</svg>
|
|
135
|
+
</div>
|
|
119
136
|
<div class="vpss-loader">
|
|
120
137
|
<div class="vpss-dot"></div>
|
|
121
138
|
<div class="vpss-dot"></div>
|
package/package.json
CHANGED
package/plugins/plugin.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
|
-
import
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
3
|
import type { PluginOption, ResolvedConfig } from "vite";
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -14,6 +14,8 @@ type PluginOptions = {
|
|
|
14
14
|
loaderBg?: string;
|
|
15
15
|
loaderType?: LoaderType;
|
|
16
16
|
minDurationMs?: number;
|
|
17
|
+
// Add this to allow specifying where the plugin assets are located
|
|
18
|
+
pluginAssetsPath?: string;
|
|
17
19
|
};
|
|
18
20
|
|
|
19
21
|
export function splashScreen(options: PluginOptions) {
|
|
@@ -29,6 +31,7 @@ export function splashScreen(options: PluginOptions) {
|
|
|
29
31
|
loaderType = "line",
|
|
30
32
|
loaderBg = "#1eb6c3",
|
|
31
33
|
splashBg = "#ffffff",
|
|
34
|
+
pluginAssetsPath = "src/plugins/dev-splashscreen",
|
|
32
35
|
} = options;
|
|
33
36
|
|
|
34
37
|
let config: ResolvedConfig;
|
|
@@ -39,18 +42,18 @@ export function splashScreen(options: PluginOptions) {
|
|
|
39
42
|
config = resolvedConfig;
|
|
40
43
|
},
|
|
41
44
|
transformIndexHtml(html: string) {
|
|
42
|
-
const baseStyles = readPluginFile("styles.css");
|
|
45
|
+
const baseStyles = readPluginFile("styles.css", pluginAssetsPath, config.root);
|
|
43
46
|
|
|
44
47
|
let loaderStyles = "";
|
|
45
48
|
|
|
46
49
|
if (loaderType === "line") {
|
|
47
|
-
loaderStyles = readPluginFile("loaders/line.css");
|
|
50
|
+
loaderStyles = readPluginFile("loaders/line.css", pluginAssetsPath, config.root);
|
|
48
51
|
} else if (loaderType === "dots") {
|
|
49
|
-
loaderStyles = readPluginFile("loaders/dots.css");
|
|
52
|
+
loaderStyles = readPluginFile("loaders/dots.css", pluginAssetsPath, config.root);
|
|
50
53
|
}
|
|
51
54
|
|
|
52
55
|
const logoHtml = fs.readFileSync(
|
|
53
|
-
|
|
56
|
+
resolve(config.publicDir, logoSrc),
|
|
54
57
|
"utf8"
|
|
55
58
|
);
|
|
56
59
|
|
|
@@ -58,21 +61,23 @@ export function splashScreen(options: PluginOptions) {
|
|
|
58
61
|
logoHtml,
|
|
59
62
|
loaderType,
|
|
60
63
|
minDurationMs,
|
|
64
|
+
pluginAssetsPath,
|
|
65
|
+
projectRoot: config.root,
|
|
61
66
|
});
|
|
62
67
|
|
|
63
68
|
const styles = `
|
|
64
69
|
<style id="vpss-style">
|
|
65
|
-
${baseStyles.replace("/*BG_SPLASH*/", splashBg)}
|
|
66
|
-
${loaderStyles.replace("/*BG_LOADER*/", loaderBg)}
|
|
70
|
+
${ baseStyles.replace("/*BG_SPLASH*/", splashBg) }
|
|
71
|
+
${ loaderStyles.replace("/*BG_LOADER*/", loaderBg) }
|
|
67
72
|
</style>
|
|
68
73
|
`;
|
|
69
74
|
|
|
70
75
|
return (
|
|
71
76
|
html
|
|
72
77
|
// Add styles to end of head
|
|
73
|
-
.replace("</head>", `${styles}</head>`)
|
|
78
|
+
.replace("</head>", `${ styles }</head>`)
|
|
74
79
|
// Add splash screen to end of body
|
|
75
|
-
.replace("</body>", `${splash}</body>`)
|
|
80
|
+
.replace("</body>", `${ splash }</body>`)
|
|
76
81
|
);
|
|
77
82
|
},
|
|
78
83
|
} satisfies PluginOption;
|
|
@@ -82,42 +87,39 @@ function splashTemplate({
|
|
|
82
87
|
logoHtml,
|
|
83
88
|
loaderType,
|
|
84
89
|
minDurationMs,
|
|
90
|
+
pluginAssetsPath,
|
|
91
|
+
projectRoot,
|
|
85
92
|
}: {
|
|
86
93
|
logoHtml: string;
|
|
87
94
|
loaderType: LoaderType;
|
|
88
95
|
minDurationMs?: number;
|
|
96
|
+
pluginAssetsPath: string;
|
|
97
|
+
projectRoot: string;
|
|
89
98
|
}) {
|
|
90
|
-
/**
|
|
91
|
-
* TODO: add more loader options.
|
|
92
|
-
* Inspiration: https://cssloaders.github.io/
|
|
93
|
-
*/
|
|
94
99
|
let loaderHtml = "";
|
|
95
100
|
|
|
96
101
|
if (loaderType === "line") {
|
|
97
|
-
loaderHtml = readPluginFile("loaders/line.html");
|
|
102
|
+
loaderHtml = readPluginFile("loaders/line.html", pluginAssetsPath, projectRoot);
|
|
98
103
|
} else if (loaderType === "dots") {
|
|
99
|
-
loaderHtml = readPluginFile("loaders/dots.html");
|
|
104
|
+
loaderHtml = readPluginFile("loaders/dots.html", pluginAssetsPath, projectRoot);
|
|
100
105
|
}
|
|
101
106
|
|
|
102
107
|
return /*html*/ `
|
|
103
108
|
<div id="vpss">
|
|
104
|
-
<div class="vpss-logo">${logoHtml}</div>
|
|
105
|
-
${loaderHtml}
|
|
109
|
+
<div class="vpss-logo">${ logoHtml }</div>
|
|
110
|
+
${ loaderHtml }
|
|
106
111
|
</div>
|
|
107
112
|
<script>
|
|
108
113
|
(function () {
|
|
109
114
|
window.__VPSS__ = {
|
|
110
115
|
renderedAt: new Date().getTime(),
|
|
111
|
-
minDurationMs: ${minDurationMs || 0},
|
|
116
|
+
minDurationMs: ${ minDurationMs || 0 },
|
|
112
117
|
};
|
|
113
118
|
})();
|
|
114
119
|
</script>
|
|
115
120
|
`;
|
|
116
121
|
}
|
|
117
122
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
function readPluginFile(filePath: string) {
|
|
122
|
-
return fs.readFileSync(path.resolve(pluginPath, filePath), "utf8");
|
|
123
|
+
function readPluginFile(filePath: string, pluginAssetsPath: string, projectRoot: string) {
|
|
124
|
+
return fs.readFileSync(resolve(projectRoot, pluginAssetsPath, filePath), "utf8");
|
|
123
125
|
}
|
package/public/img/logo.svg
CHANGED
|
@@ -1 +1,17 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg id="svg2" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" width="72" height="72"
|
|
3
|
+
viewBox="0 0 412 412">
|
|
4
|
+
<defs>
|
|
5
|
+
<style>.cls-1{fill:#e60012;}</style>
|
|
6
|
+
</defs>
|
|
7
|
+
<g>
|
|
8
|
+
<circle cx="206.21" cy="206.21" r="206.21"/>
|
|
9
|
+
<path d="M34.9,185.49c-.71,5.88-1.13,11.86-1.26,17.9,22.27-14.3,45.49-25.72,45.49-25.72-14.56-.07-33.13,4.59-44.23,7.82Z"/>
|
|
10
|
+
<g>
|
|
11
|
+
<path class="cls-1"
|
|
12
|
+
d="M127.11,154.6c-21.55,.7-61.54,5-91.52,25.69-3.61,2.49-7.07,5.22-10.34,8.21,0,0,3.78-1.31,9.64-3.01,11.1-3.23,29.67-7.89,44.23-7.82,0,0-23.22,11.42-45.49,25.72-.03,1.28-.05,2.55-.05,3.83,0,7.19,.44,14.27,1.26,21.23,28.85-38.28,73.71-64.21,92.26-73.85Z"/>
|
|
13
|
+
<path class="cls-1"
|
|
14
|
+
d="M316.16,304.46c-13.24,9.59-32.06,2.21-26.71-14.19,0,0-8.39,6.35-16.59-1.14-8.2-7.49-5.32-14.28-5.32-14.28,0,0-4.76,5.93-15.82-1.2-4.18-2.69-4.92-3.16-6.61-8.41-5.2-16.2,.4-27.23,11.47-36.03,14.05-11.62,27.38-10.43,32.98-10.03,18.18,1.3,21.3,16.88,21.3,16.88,49.54-20.18,37.78,30.33,37.78,30.33,25.69-9.17,21.51-58.49,21.51-58.49-63.73,1.75-69.01-33.33-69.01-33.33h0c-73.34-32.35-98.93-136.88-98.93-136.88-10.09,33.49,8.45,101.01,8.45,101.01-41.28-21.1-66.05-63.3-66.05-63.3-2.69,20.6,29.6,66.99,31.13,69.18-1.05-1.46-16.46-21.08-81.61-15.27,0,0,43.43,8.91,47.96,23.52-1.19,.34-2.36,.68-3.53,1.02-45.03,20.97-82.6,57.7-102.36,83.99,8.94,52.17,40.31,96.68,83.84,123.22-29.33-58.5,4.94-109.29,21.47-121.26,15.22-11.02,28.12-12.32,34.24-10.75-8.32-18.53-31.75-29.17-31.75-29.17,45.98,15.71,39.57,45.39,39.57,45.39,0,0-4.35,14.14-5.8,13.79-.09,.17-.14,.26-.14,.26,105.64,26.71,92.52,74.54,92.52,74.54,37.61-6.42,46.18-29.67,46.18-29.67m-22.54-100.14c-4.43,.24-20.05-7.97-25.11-12.39-5.9-5.16-15.37-31.65-15.37-31.65,0,0,14.68,12.21,25.98,21.53,9.88,8.15,16.96,13.82,18.1,17.98l-3.6,4.53Z"/>
|
|
15
|
+
</g>
|
|
16
|
+
</g>
|
|
17
|
+
</svg>
|
package/vite.config.ts
CHANGED