@spicemod/creator 0.0.22 → 0.0.24
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/client.d.ts +47 -0
- package/dist/bin.mjs +834 -342
- package/dist/index.d.mts +697 -0
- package/dist/{client/index.mjs → index.mjs} +1 -1
- package/dist/templates/custom-app/js/react/eslint.config.ts +29 -0
- package/dist/templates/custom-app/js/react/src/app.jsx +22 -0
- package/dist/templates/custom-app/js/react/src/components/Onboarding.jsx +82 -0
- package/dist/templates/custom-app/js/react/src/extension/index.jsx +22 -0
- package/dist/templates/custom-app/meta.json +4 -0
- package/dist/templates/custom-app/shared/DOT-gitignore +34 -0
- package/dist/templates/custom-app/shared/DOT-oxlintrc.json +36 -0
- package/dist/templates/custom-app/shared/README.template.md +53 -0
- package/dist/templates/custom-app/shared/app.css +163 -0
- package/dist/templates/custom-app/shared/biome.json +36 -0
- package/dist/templates/custom-app/shared/css/app.module.scss +58 -0
- package/dist/templates/custom-app/shared/icon-active.svg +7 -0
- package/dist/templates/custom-app/shared/icon.svg +7 -0
- package/dist/templates/custom-app/shared/jsconfig.json +32 -0
- package/dist/templates/custom-app/shared/spice.config.js +10 -0
- package/dist/templates/custom-app/shared/spice.config.ts +10 -0
- package/dist/templates/custom-app/shared/tsconfig.json +32 -0
- package/dist/templates/custom-app/ts/react/eslint.config.ts +29 -0
- package/dist/templates/custom-app/ts/react/src/app.tsx +22 -0
- package/dist/templates/custom-app/ts/react/src/components/Onboarding.tsx +92 -0
- package/dist/templates/custom-app/ts/react/src/extension/index.tsx +27 -0
- package/dist/templates/customAppEntry.js +6 -0
- package/dist/templates/extension/js/vanilla/src/components/Onboarding.js +71 -0
- package/dist/templates/extension/shared/DOT-gitignore +34 -0
- package/dist/templates/extension/shared/DOT-oxlintrc.json +36 -0
- package/dist/templates/extension/shared/spice.config.js +2 -1
- package/dist/templates/extension/shared/spice.config.ts +2 -1
- package/dist/templates/liveReload.js +0 -1
- package/dist/templates/theme/shared/DOT-gitignore +34 -0
- package/dist/templates/theme/shared/DOT-oxlintrc.json +36 -0
- package/dist/templates/theme/shared/spice.config.js +2 -1
- package/dist/templates/theme/shared/spice.config.ts +2 -1
- package/dist/templates/wrapper.js +5 -8
- package/package.json +7 -3
- package/templates/custom-app/js/react/eslint.config.ts +29 -0
- package/templates/custom-app/js/react/src/app.jsx +22 -0
- package/templates/custom-app/js/react/src/components/Onboarding.jsx +82 -0
- package/templates/custom-app/js/react/src/extension/index.jsx +22 -0
- package/templates/custom-app/meta.json +4 -0
- package/templates/custom-app/shared/DOT-gitignore +34 -0
- package/templates/custom-app/shared/DOT-oxlintrc.json +36 -0
- package/templates/custom-app/shared/README.template.md +53 -0
- package/templates/custom-app/shared/app.css +163 -0
- package/templates/custom-app/shared/biome.json +36 -0
- package/templates/custom-app/shared/css/app.module.scss +58 -0
- package/templates/custom-app/shared/icon-active.svg +7 -0
- package/templates/custom-app/shared/icon.svg +7 -0
- package/templates/custom-app/shared/jsconfig.json +32 -0
- package/templates/custom-app/shared/spice.config.js +10 -0
- package/templates/custom-app/shared/spice.config.ts +10 -0
- package/templates/custom-app/shared/tsconfig.json +32 -0
- package/templates/custom-app/ts/react/eslint.config.ts +29 -0
- package/templates/custom-app/ts/react/src/app.tsx +22 -0
- package/templates/custom-app/ts/react/src/components/Onboarding.tsx +92 -0
- package/templates/custom-app/ts/react/src/extension/index.tsx +27 -0
- package/templates/customAppEntry.js +6 -0
- package/templates/extension/js/vanilla/src/components/Onboarding.js +71 -0
- package/templates/extension/shared/DOT-gitignore +34 -0
- package/templates/extension/shared/DOT-oxlintrc.json +36 -0
- package/templates/extension/shared/spice.config.js +2 -1
- package/templates/extension/shared/spice.config.ts +2 -1
- package/templates/liveReload.js +0 -1
- package/templates/theme/shared/DOT-gitignore +34 -0
- package/templates/theme/shared/DOT-oxlintrc.json +36 -0
- package/templates/theme/shared/spice.config.js +2 -1
- package/templates/theme/shared/spice.config.ts +2 -1
- package/templates/wrapper.js +5 -8
- package/dist/client/index.d.mts +0 -2183
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
3
|
+
"plugins": null,
|
|
4
|
+
"categories": {},
|
|
5
|
+
"rules": {
|
|
6
|
+
"no-await-in-loop": "error",
|
|
7
|
+
"unicorn/prefer-array-find": "error",
|
|
8
|
+
"unicorn/prefer-array-flat-map": "error",
|
|
9
|
+
"unicorn/prefer-set-has": "error"
|
|
10
|
+
},
|
|
11
|
+
"settings": {
|
|
12
|
+
"jsx-a11y": {
|
|
13
|
+
"polymorphicPropName": null,
|
|
14
|
+
"components": {},
|
|
15
|
+
"attributes": {}
|
|
16
|
+
},
|
|
17
|
+
"react": {
|
|
18
|
+
"formComponents": [],
|
|
19
|
+
"linkComponents": [],
|
|
20
|
+
"version": null,
|
|
21
|
+
"componentWrapperFunctions": []
|
|
22
|
+
},
|
|
23
|
+
"jsdoc": {
|
|
24
|
+
"ignorePrivate": false,
|
|
25
|
+
"ignoreInternal": false,
|
|
26
|
+
"ignoreReplacesDocs": true,
|
|
27
|
+
"overrideReplacesDocs": true,
|
|
28
|
+
"augmentsExtendsReplacesDocs": false,
|
|
29
|
+
"implementsReplacesDocs": false,
|
|
30
|
+
"exemptDestructuredRootsFromChecks": false,
|
|
31
|
+
"tagNamePreference": {}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"globals": {},
|
|
35
|
+
"ignorePatterns": ["dist/**"]
|
|
36
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# {{project-name}}
|
|
2
|
+
|
|
3
|
+
Welcome to your new **Spicetify {{template}}** project! This project was
|
|
4
|
+
bootstrapped using [@spicetify/creator]({{github-link}}).
|
|
5
|
+
|
|
6
|
+
## Getting Started
|
|
7
|
+
|
|
8
|
+
First, install the dependencies using your package manager:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
{{package-manager}} install
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Then, run the development server:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
{{package-manager}} run dev
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The development server will watch for changes and automatically rebuild your
|
|
21
|
+
project.
|
|
22
|
+
|
|
23
|
+
## Available Scripts
|
|
24
|
+
|
|
25
|
+
### `dev`
|
|
26
|
+
|
|
27
|
+
Runs the project in development mode with hot-reloading.
|
|
28
|
+
|
|
29
|
+
### `build`
|
|
30
|
+
|
|
31
|
+
Optimizes and bundles your {{template}} for production. The output will be
|
|
32
|
+
located in the `dist` directory.
|
|
33
|
+
|
|
34
|
+
### `lint`
|
|
35
|
+
|
|
36
|
+
Checks your code for errors and formatting issues using {{linter}}.
|
|
37
|
+
|
|
38
|
+
## Project Structure
|
|
39
|
+
|
|
40
|
+
```text
|
|
41
|
+
.
|
|
42
|
+
├── src/
|
|
43
|
+
│ └── app.{{entry-ext}} # Main entry point for your {{template}}
|
|
44
|
+
└── spice.config.{{language}} # Configuration for @spicetify/creator
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Learn More
|
|
48
|
+
|
|
49
|
+
To learn more about Spicetify and how to customize your Spotify client, check
|
|
50
|
+
out the following resources:
|
|
51
|
+
|
|
52
|
+
- [Spicetify]({{spicetify-link}})
|
|
53
|
+
- [@spicetify/creator]({{docs-link}})
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
|
|
2
|
+
|
|
3
|
+
.onboarding-overlay {
|
|
4
|
+
position: fixed;
|
|
5
|
+
inset: 0;
|
|
6
|
+
background: rgba(0, 0, 0, 0.75);
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
z-index: 10000;
|
|
11
|
+
transition: opacity 0.3s ease;
|
|
12
|
+
font-family: "Poppins", sans-serif;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.onboarding-overlay.fade-out {
|
|
16
|
+
opacity: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.onboarding-card {
|
|
20
|
+
background: rgba(24, 24, 24, 0.5);
|
|
21
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
22
|
+
border-radius: 20px;
|
|
23
|
+
padding: 40px;
|
|
24
|
+
width: 400px;
|
|
25
|
+
box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
|
|
26
|
+
transform: translateY(0);
|
|
27
|
+
transition: transform 0.3s ease;
|
|
28
|
+
backdrop-filter: blur(16px);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.onboarding-overlay.fade-out .onboarding-card {
|
|
32
|
+
transform: translateY(20px);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.status-badge {
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
gap: 12px;
|
|
39
|
+
color: #1db954;
|
|
40
|
+
font-size: 18px;
|
|
41
|
+
font-weight: 800;
|
|
42
|
+
margin-bottom: 30px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.close-icon-btn {
|
|
46
|
+
position: absolute;
|
|
47
|
+
top: 12px;
|
|
48
|
+
right: 12px;
|
|
49
|
+
background: transparent;
|
|
50
|
+
border: none;
|
|
51
|
+
color: #666;
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
padding: 8px;
|
|
54
|
+
display: flex;
|
|
55
|
+
align-items: center;
|
|
56
|
+
justify-content: center;
|
|
57
|
+
border-radius: 50%;
|
|
58
|
+
transition: all 0.2s ease;
|
|
59
|
+
z-index: 10;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.close-icon-btn:hover {
|
|
63
|
+
background: rgba(255, 255, 255, 0.1);
|
|
64
|
+
color: #fff;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.config-grid {
|
|
68
|
+
display: grid;
|
|
69
|
+
grid-template-columns: 120px 1fr;
|
|
70
|
+
gap: 15px;
|
|
71
|
+
margin-bottom: 30px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.label {
|
|
75
|
+
color: #777;
|
|
76
|
+
font-size: 14px;
|
|
77
|
+
}
|
|
78
|
+
.value {
|
|
79
|
+
color: #fff;
|
|
80
|
+
font-size: 14px;
|
|
81
|
+
font-weight: 500;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.footer-tip {
|
|
85
|
+
font-size: 12px;
|
|
86
|
+
color: #555;
|
|
87
|
+
border-top: 1px solid #282828;
|
|
88
|
+
padding-top: 20px;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
code {
|
|
92
|
+
color: #1db954;
|
|
93
|
+
background: rgba(29, 185, 84, 0.1);
|
|
94
|
+
padding: 2px 4px;
|
|
95
|
+
border-radius: 4px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.onboarding-actions {
|
|
99
|
+
display: flex;
|
|
100
|
+
flex-direction: column;
|
|
101
|
+
gap: 12px;
|
|
102
|
+
margin-top: 24px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.get-started-btn,
|
|
106
|
+
.dismiss-btn,
|
|
107
|
+
.discord-btn {
|
|
108
|
+
width: 100%;
|
|
109
|
+
padding: 14px;
|
|
110
|
+
border-radius: 10px;
|
|
111
|
+
cursor: pointer;
|
|
112
|
+
font-size: 15px;
|
|
113
|
+
font-weight: 600;
|
|
114
|
+
text-align: center;
|
|
115
|
+
transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
|
116
|
+
display: flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
justify-content: center;
|
|
119
|
+
backdrop-filter: blur(4px);
|
|
120
|
+
border: 1px solid transparent;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.get-started-btn {
|
|
124
|
+
background: rgba(16, 185, 129, 0.8);
|
|
125
|
+
color: #ffffff;
|
|
126
|
+
box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.get-started-btn:hover {
|
|
130
|
+
background: rgba(16, 185, 129, 1);
|
|
131
|
+
transform: scale(1.02);
|
|
132
|
+
box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.discord-btn {
|
|
136
|
+
background: rgba(88, 101, 242, 0.8);
|
|
137
|
+
color: #ffffff;
|
|
138
|
+
box-shadow: 0 4px 15px rgba(88, 101, 242, 0.2);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.discord-btn:hover {
|
|
142
|
+
background: rgba(88, 101, 242, 1);
|
|
143
|
+
transform: scale(1.02);
|
|
144
|
+
box-shadow: 0 4px 20px rgba(88, 101, 242, 0.4);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.dismiss-btn {
|
|
148
|
+
background: rgba(55, 65, 81, 0.8);
|
|
149
|
+
color: #d1d5db;
|
|
150
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.dismiss-btn:hover {
|
|
154
|
+
background: rgba(75, 85, 99, 0.9);
|
|
155
|
+
color: #ffffff;
|
|
156
|
+
border-color: rgba(255, 255, 255, 0.2);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.get-started-btn:active,
|
|
160
|
+
.discord-btn:active,
|
|
161
|
+
.dismiss-btn:active {
|
|
162
|
+
transform: scale(0.98);
|
|
163
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://biomejs.dev/schemas/2.3.13/schema.json",
|
|
3
|
+
"vcs": {
|
|
4
|
+
"enabled": true,
|
|
5
|
+
"clientKind": "git",
|
|
6
|
+
"useIgnoreFile": true
|
|
7
|
+
},
|
|
8
|
+
"files": {
|
|
9
|
+
"ignoreUnknown": true,
|
|
10
|
+
"includes": ["**", "!node_modules", "!dist"]
|
|
11
|
+
},
|
|
12
|
+
"formatter": {
|
|
13
|
+
"enabled": true,
|
|
14
|
+
"indentStyle": "space",
|
|
15
|
+
"indentWidth": 2
|
|
16
|
+
},
|
|
17
|
+
"linter": {
|
|
18
|
+
"enabled": true,
|
|
19
|
+
"rules": {
|
|
20
|
+
"recommended": true,
|
|
21
|
+
"suspicious": {
|
|
22
|
+
"noUnknownAtRules": "off"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"domains": {
|
|
26
|
+
"react": "recommended"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"assist": {
|
|
30
|
+
"actions": {
|
|
31
|
+
"source": {
|
|
32
|
+
"organizeImports": "on"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
align-items: center;
|
|
6
|
+
height: 100%;
|
|
7
|
+
gap: 40px;
|
|
8
|
+
background-color: #0f172a;
|
|
9
|
+
font-family:
|
|
10
|
+
system-ui,
|
|
11
|
+
-apple-system,
|
|
12
|
+
sans-serif;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.title {
|
|
16
|
+
font-size: 48px;
|
|
17
|
+
font-weight: 800;
|
|
18
|
+
color: #f8fafc;
|
|
19
|
+
letter-spacing: -0.02em;
|
|
20
|
+
margin: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.button {
|
|
24
|
+
padding: 16px 32px;
|
|
25
|
+
font-size: 18px;
|
|
26
|
+
font-weight: 600;
|
|
27
|
+
color: #ffffff;
|
|
28
|
+
background-color: #6366f1;
|
|
29
|
+
border: none;
|
|
30
|
+
border-radius: 12px;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
|
|
33
|
+
transition: all 0.2s ease-in-out;
|
|
34
|
+
|
|
35
|
+
&:hover {
|
|
36
|
+
background-color: #4f46e5;
|
|
37
|
+
transform: translateY(-2px);
|
|
38
|
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:active {
|
|
42
|
+
background-color: #4338ca;
|
|
43
|
+
transform: translateY(0);
|
|
44
|
+
box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.3);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.counter {
|
|
49
|
+
font-size: 80px;
|
|
50
|
+
font-weight: 900;
|
|
51
|
+
color: #818cf8;
|
|
52
|
+
background: #1e293b;
|
|
53
|
+
padding: 24px 48px;
|
|
54
|
+
border-radius: 24px;
|
|
55
|
+
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
|
|
56
|
+
min-width: 150px;
|
|
57
|
+
text-align: center;
|
|
58
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
|
|
2
|
+
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
3
|
+
<circle cx="12" cy="12" r="10" />
|
|
4
|
+
<path d="M18 13a6 6 0 0 1-6 5 6 6 0 0 1-6-5h12Z" />
|
|
5
|
+
<line x1="9" x2="9.01" y1="9" y2="9" />
|
|
6
|
+
<line x1="15" x2="15.01" y1="9" y2="9" />
|
|
7
|
+
</svg>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
|
|
2
|
+
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
3
|
+
<circle cx="12" cy="12" r="10" />
|
|
4
|
+
<path d="M8 14s1.5 2 4 2 4-2 4-2" />
|
|
5
|
+
<line x1="9" x2="9.01" y1="9" y2="9" />
|
|
6
|
+
<line x1="15" x2="15.01" y1="9" y2="9" />
|
|
7
|
+
</svg>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
7
|
+
"types": ["@spicetify/creator/client"],
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"jsx": "react-jsx",
|
|
10
|
+
|
|
11
|
+
/* Bundler mode */
|
|
12
|
+
"moduleResolution": "bundler",
|
|
13
|
+
"allowImportingTsExtensions": true,
|
|
14
|
+
"verbatimModuleSyntax": true,
|
|
15
|
+
"moduleDetection": "force",
|
|
16
|
+
"noEmit": true,
|
|
17
|
+
|
|
18
|
+
/* Linting */
|
|
19
|
+
"strict": true,
|
|
20
|
+
"noUnusedLocals": true,
|
|
21
|
+
"noUnusedParameters": true,
|
|
22
|
+
"erasableSyntaxOnly": true,
|
|
23
|
+
"noFallthroughCasesInSwitch": true,
|
|
24
|
+
|
|
25
|
+
// Paths
|
|
26
|
+
"baseUrl": ".",
|
|
27
|
+
"paths": {
|
|
28
|
+
"@/*": ["./src/*"]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"include": ["src"]
|
|
32
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { defineConfig } from "@spicetify/creator";
|
|
2
|
+
|
|
3
|
+
// Learn more: {{config-reference-link}}
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
name: "{{project-name}}",
|
|
6
|
+
framework: "{{framework}}",
|
|
7
|
+
linter: "{{linter}}",
|
|
8
|
+
template: "{{template}}",
|
|
9
|
+
packageManager: "{{package-manager}}",
|
|
10
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { defineConfig } from "@spicetify/creator";
|
|
2
|
+
|
|
3
|
+
// Learn more: {{config-reference-link}}
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
name: "{{project-name}}",
|
|
6
|
+
framework: "{{framework}}",
|
|
7
|
+
linter: "{{linter}}",
|
|
8
|
+
template: "{{template}}",
|
|
9
|
+
packageManager: "{{package-manager}}",
|
|
10
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
7
|
+
"types": ["@spicetify/creator/client"],
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"jsx": "react-jsx",
|
|
10
|
+
|
|
11
|
+
/* Bundler mode */
|
|
12
|
+
"moduleResolution": "bundler",
|
|
13
|
+
"allowImportingTsExtensions": true,
|
|
14
|
+
"verbatimModuleSyntax": true,
|
|
15
|
+
"moduleDetection": "force",
|
|
16
|
+
"noEmit": true,
|
|
17
|
+
|
|
18
|
+
/* Linting */
|
|
19
|
+
"strict": true,
|
|
20
|
+
"noUnusedLocals": true,
|
|
21
|
+
"noUnusedParameters": true,
|
|
22
|
+
"erasableSyntaxOnly": true,
|
|
23
|
+
"noFallthroughCasesInSwitch": true,
|
|
24
|
+
|
|
25
|
+
// Paths
|
|
26
|
+
"baseUrl": ".",
|
|
27
|
+
"paths": {
|
|
28
|
+
"@/*": ["./src/*"]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"include": ["src"]
|
|
32
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import js from "@eslint/js";
|
|
2
|
+
import globals from "globals";
|
|
3
|
+
import tseslint from "typescript-eslint";
|
|
4
|
+
import react from "eslint-plugin-react";
|
|
5
|
+
import css from "@eslint/css";
|
|
6
|
+
import { defineConfig } from "eslint/config";
|
|
7
|
+
|
|
8
|
+
export default defineConfig([
|
|
9
|
+
{
|
|
10
|
+
files: ["**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
|
|
11
|
+
plugins: { js, react },
|
|
12
|
+
extends: ["js/recommended"],
|
|
13
|
+
languageOptions: {
|
|
14
|
+
parserOptions: {
|
|
15
|
+
ecmaFeatures: {
|
|
16
|
+
jsx: true,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
globals: globals.browser,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
tseslint.configs.recommended,
|
|
23
|
+
{
|
|
24
|
+
files: ["**/*.css"],
|
|
25
|
+
plugins: { css },
|
|
26
|
+
language: "css/css",
|
|
27
|
+
extends: ["css/recommended"],
|
|
28
|
+
},
|
|
29
|
+
]);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import styles from "@/css/app.module.scss";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
|
|
4
|
+
const App: React.FC = () => {
|
|
5
|
+
const [count, setCount] = useState(0);
|
|
6
|
+
|
|
7
|
+
const onButtonClick = () => {
|
|
8
|
+
setCount((prevCount) => prevCount + 1);
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<div className={styles.container}>
|
|
13
|
+
<div className={styles.title}>{"My Custom App!"}</div>
|
|
14
|
+
<button className={styles.button} onClick={onButtonClick}>
|
|
15
|
+
{"Count up"}
|
|
16
|
+
</button>
|
|
17
|
+
<div className={styles.counter}>{count}</div>
|
|
18
|
+
</div>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default App;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
|
|
3
|
+
interface OnboardingProps {
|
|
4
|
+
config: {
|
|
5
|
+
projectName: string;
|
|
6
|
+
framework: string;
|
|
7
|
+
language: string;
|
|
8
|
+
packageManager: string;
|
|
9
|
+
linter: string;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const Onboarding: React.FC<OnboardingProps> = ({ config }) => {
|
|
14
|
+
const [isVisible, setIsVisible] = useState(true);
|
|
15
|
+
const [isFading, setIsFading] = useState(false);
|
|
16
|
+
|
|
17
|
+
const handleDismiss = () => {
|
|
18
|
+
setIsFading(true);
|
|
19
|
+
setTimeout(() => setIsVisible(false), 250);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
if (!isVisible) return null;
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<div className={`onboarding-overlay ${isFading ? "fade-out" : ""}`} onClick={handleDismiss}>
|
|
26
|
+
<div className="onboarding-card" onClick={(e) => e.stopPropagation()}>
|
|
27
|
+
<button className="close-icon-btn" onClick={handleDismiss} aria-label="Close">
|
|
28
|
+
<svg width="12" height="12" viewBox="0 0 12 12" fill="none">
|
|
29
|
+
<path
|
|
30
|
+
d="M1 1L11 11M1 11L11 1"
|
|
31
|
+
stroke="currentColor"
|
|
32
|
+
strokeWidth="2"
|
|
33
|
+
strokeLinecap="round"
|
|
34
|
+
/>
|
|
35
|
+
</svg>
|
|
36
|
+
</button>
|
|
37
|
+
|
|
38
|
+
<div className="status-badge">🚀 {config.projectName} Ready</div>
|
|
39
|
+
|
|
40
|
+
<div className="config-grid">
|
|
41
|
+
<span className="label">Framework</span>
|
|
42
|
+
<span className="value">{config.framework}</span>
|
|
43
|
+
|
|
44
|
+
<span className="label">Language</span>
|
|
45
|
+
<span className="value">{config.language}</span>
|
|
46
|
+
|
|
47
|
+
<span className="label">Manager</span>
|
|
48
|
+
<span className="value">{config.packageManager}</span>
|
|
49
|
+
|
|
50
|
+
<span className="label">Linter</span>
|
|
51
|
+
<span className="value">{config.linter}</span>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<div className="footer-tip">
|
|
55
|
+
Next Step: Edit <code>src/app.tsx</code>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<div className="onboarding-actions">
|
|
59
|
+
<button className="get-started-btn" onClick={() => openLink("{{get-started-link}}")}>
|
|
60
|
+
Get Started
|
|
61
|
+
</button>
|
|
62
|
+
<button
|
|
63
|
+
className="get-started-btn"
|
|
64
|
+
onClick={() => {
|
|
65
|
+
Spicetify.Platform.History.push("{{project-url}}");
|
|
66
|
+
handleDismiss();
|
|
67
|
+
}}
|
|
68
|
+
>
|
|
69
|
+
Go to Custom App
|
|
70
|
+
</button>
|
|
71
|
+
<button className="discord-btn" onClick={() => openLink("{{discord-link}}")}>
|
|
72
|
+
Join Discord
|
|
73
|
+
</button>
|
|
74
|
+
<button className="dismiss-btn" onClick={handleDismiss}>
|
|
75
|
+
Dismiss
|
|
76
|
+
</button>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
);
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export default Onboarding;
|
|
84
|
+
|
|
85
|
+
function openLink(url: string, newTab = true) {
|
|
86
|
+
if (!url) return;
|
|
87
|
+
if (newTab) {
|
|
88
|
+
window.open(url, "_blank", "noopener,noreferrer");
|
|
89
|
+
} else {
|
|
90
|
+
window.location.href = url;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import "@/extension/app.css";
|
|
2
|
+
import { createRoot } from "react-dom/client";
|
|
3
|
+
// you can use aliases too ! (just add them to tsconfig.json)
|
|
4
|
+
import Onboarding from "@/components/Onboarding";
|
|
5
|
+
|
|
6
|
+
const config = {
|
|
7
|
+
projectName: "{{project-name}}",
|
|
8
|
+
framework: "{{framework}}",
|
|
9
|
+
language: "{{language}}",
|
|
10
|
+
packageManager: "{{package-manager}}",
|
|
11
|
+
linter: "{{linter}}",
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
function main() {
|
|
15
|
+
// Create a container for the React application
|
|
16
|
+
// We append this to document.body to ensure it sits above the Spotify UI
|
|
17
|
+
const container = document.createElement("div");
|
|
18
|
+
container.id = "spicetify-onboarding-root";
|
|
19
|
+
document.body.appendChild(container);
|
|
20
|
+
|
|
21
|
+
const root = createRoot(container);
|
|
22
|
+
|
|
23
|
+
// Render the Onboarding UI
|
|
24
|
+
root.render(<Onboarding config={config} />);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
main();
|