@tsparticles/template-404 4.1.3

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Matteo Bruni
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/package.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "@tsparticles/template-404",
3
+ "version": "4.1.3",
4
+ "private": false,
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "scripts": {
9
+ "prebuild": "node scripts/prebuild.js",
10
+ "build": "pnpm run prebuild",
11
+ "build:ci": "pnpm run prebuild"
12
+ },
13
+ "gitHead": "9b666025d968f6551b02397a0c5223766fb14d6b"
14
+ }
@@ -0,0 +1,64 @@
1
+ const fs = require("fs-extra");
2
+
3
+ const libPackage = "./template.json";
4
+
5
+ const workspaceVersions = {
6
+ "@tsparticles/engine": require("../../../engine/package.json").version,
7
+ "@tsparticles/slim": require("../../../bundles/slim/package.json").version,
8
+ };
9
+
10
+ function resolveWorkspaceDependency(name) {
11
+ const libObj = JSON.parse(fs.readFileSync(libPackage, "utf-8"));
12
+
13
+ const allDeps = {
14
+ ...libObj.package.dependencies,
15
+ ...libObj.package.devDependencies,
16
+ };
17
+
18
+ const spec = allDeps[name];
19
+
20
+ if (!spec?.startsWith("workspace:")) {
21
+ return spec;
22
+ }
23
+
24
+ const workspaceRange = spec.replace("workspace:", "");
25
+
26
+ if (workspaceRange.length > 0 && workspaceRange !== "*" && workspaceRange !== "^" && workspaceRange !== "~") {
27
+ return workspaceRange;
28
+ }
29
+
30
+ const version = workspaceVersions[name];
31
+
32
+ if (!version) {
33
+ throw new Error(`Cannot resolve workspace dependency version for ${name}`);
34
+ }
35
+
36
+ return workspaceRange === "^" || workspaceRange === "~" ? `${workspaceRange}${version}` : `^${version}`;
37
+ }
38
+
39
+ fs.readFile(libPackage, function (error, data) {
40
+ if (error) {
41
+ throw error;
42
+ }
43
+
44
+ const text = data.toString();
45
+ const libObj = JSON.parse(text);
46
+
47
+ for (const dep of Object.keys(libObj.package.dependencies)) {
48
+ const resolved = resolveWorkspaceDependency(dep);
49
+ if (resolved) {
50
+ libObj.package.dependencies[dep] = resolved;
51
+ }
52
+ }
53
+
54
+ for (const dep of Object.keys(libObj.package.devDependencies)) {
55
+ const resolved = resolveWorkspaceDependency(dep);
56
+ if (resolved) {
57
+ libObj.package.devDependencies[dep] = resolved;
58
+ }
59
+ }
60
+
61
+ fs.writeFile(libPackage, JSON.stringify(libObj, undefined, 2), "utf-8", function () {
62
+ console.log("template.json dependencies updated successfully");
63
+ });
64
+ });
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Matteo Bruni
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,10 @@
1
+ # {{projectName}}
2
+
3
+ A tsParticles 404 error page scaffolded with [tsparticles-create](https://github.com/tsparticles/tsparticles).
4
+
5
+ ## Getting started
6
+
7
+ ```bash
8
+ npm install
9
+ npm run dev
10
+ ```
@@ -0,0 +1,14 @@
1
+ # dependencies
2
+ /node_modules
3
+
4
+ # production
5
+ /dist
6
+
7
+ # misc
8
+ .DS_Store
9
+ *.local
10
+
11
+ # debug
12
+ npm-debug.log*
13
+ yarn-debug.log*
14
+ yarn-error.log*
@@ -0,0 +1,18 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>{{projectName}} - 404 Not Found</title>
7
+ </head>
8
+ <body>
9
+ <div class="container">
10
+ <div class="content">
11
+ <p class="error-code">404</p>
12
+ <p class="message">The page you are looking for was moved, removed, renamed or might never have existed.</p>
13
+ <a href="/" class="home-link">Go back home</a>
14
+ </div>
15
+ </div>
16
+ <script type="module" src="/src/main.ts"></script>
17
+ </body>
18
+ </html>
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "{{projectName}}",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "tsc && vite build",
9
+ "preview": "vite preview"
10
+ }
11
+ }
@@ -0,0 +1,48 @@
1
+ import "./style.css";
2
+ import { tsParticles } from "@tsparticles/engine";
3
+ import { loadSlim } from "@tsparticles/slim";
4
+
5
+ (async () => {
6
+ await loadSlim(tsParticles);
7
+
8
+ await tsParticles.load({
9
+ id: "tsparticles",
10
+ options: {
11
+ fullScreen: { enable: true, zIndex: -1 },
12
+ particles: {
13
+ number: { value: 50 },
14
+ color: {
15
+ value: [
16
+ "#3998D0", "#2EB6AF", "#A9BD33", "#FEC73B",
17
+ "#F89930", "#F45623", "#D62E32", "#EB586E", "#9952CF"
18
+ ]
19
+ },
20
+ shape: { type: "circle" },
21
+ opacity: {
22
+ value: 0.8,
23
+ random: { enable: true, minimumValue: 0.4 }
24
+ },
25
+ size: {
26
+ value: 400,
27
+ random: { enable: true, minimumValue: 200 },
28
+ animation: {
29
+ enable: true,
30
+ speed: 100,
31
+ minimumValue: 200,
32
+ sync: false
33
+ }
34
+ },
35
+ move: {
36
+ enable: true,
37
+ speed: 10,
38
+ direction: "top",
39
+ random: false,
40
+ straight: false,
41
+ outModes: { default: "out" }
42
+ }
43
+ },
44
+ background: { color: "#ffffff" },
45
+ detectRetina: true
46
+ }
47
+ });
48
+ })();
@@ -0,0 +1,63 @@
1
+ * {
2
+ margin: 0;
3
+ padding: 0;
4
+ box-sizing: border-box;
5
+ }
6
+
7
+ body {
8
+ font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
9
+ min-height: 100vh;
10
+ position: relative;
11
+ }
12
+
13
+ .container {
14
+ position: absolute;
15
+ top: 50%;
16
+ left: 50%;
17
+ transform: translate(-50%, -50%);
18
+ text-align: center;
19
+ z-index: 10;
20
+ width: 100%;
21
+ padding: 1rem;
22
+ }
23
+
24
+ .error-code {
25
+ font-family: "Share Tech Mono", monospace;
26
+ font-weight: 900;
27
+ text-transform: uppercase;
28
+ letter-spacing: 0.7em;
29
+ font-size: 2rem;
30
+ padding: 0 0 0 1.4em;
31
+ color: #000;
32
+ margin-bottom: 1rem;
33
+ }
34
+
35
+ .message {
36
+ font-family: "Space Mono", monospace;
37
+ line-height: 1.8;
38
+ font-size: 0.9rem;
39
+ letter-spacing: 0.15rem;
40
+ color: #000;
41
+ max-width: 500px;
42
+ margin: 0 auto 2rem;
43
+ padding: 0 1rem;
44
+ }
45
+
46
+ .home-link {
47
+ display: inline-block;
48
+ padding: 0.8em 2em;
49
+ border: 1px solid #000;
50
+ color: #000;
51
+ text-decoration: none;
52
+ font-family: "Space Mono", monospace;
53
+ text-transform: uppercase;
54
+ font-size: 0.75rem;
55
+ letter-spacing: 0.1rem;
56
+ transition: all 0.3s;
57
+ position: relative;
58
+ }
59
+
60
+ .home-link:hover {
61
+ background: #000;
62
+ color: #fff;
63
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "useDefineForClassFields": true,
5
+ "module": "ESNext",
6
+ "lib": ["ES2020", "DOM", "DOM.Iterable"],
7
+ "skipLibCheck": true,
8
+ "moduleResolution": "bundler",
9
+ "allowImportingTsExtensions": true,
10
+ "resolveJsonModule": true,
11
+ "isolatedModules": true,
12
+ "noEmit": true,
13
+ "strict": true,
14
+ "noUnusedLocals": true,
15
+ "noUnusedParameters": true,
16
+ "noFallthroughCasesInSwitch": true
17
+ },
18
+ "include": ["src"]
19
+ }
@@ -0,0 +1,5 @@
1
+ import { defineConfig } from "vite";
2
+
3
+ export default defineConfig({
4
+ base: "./",
5
+ });
package/template.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "package": {
3
+ "dependencies": {
4
+ "@tsparticles/engine": "^4.1.3",
5
+ "@tsparticles/slim": "^4.1.3"
6
+ },
7
+ "devDependencies": {
8
+ "typescript": "^6.0.3",
9
+ "vite": "^8.0.14"
10
+ }
11
+ }
12
+ }