tona-options 1.0.1
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 +21 -0
- package/README.md +35 -0
- package/dist/index.cjs +247 -0
- package/dist/index.d.cts +356 -0
- package/dist/index.d.mts +356 -0
- package/dist/index.mjs +215 -0
- package/package.json +58 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 guangzan
|
|
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/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# tona-options
|
|
2
|
+
|
|
3
|
+
Collection of Option Utilities for Tona.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm i tona-options
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```js
|
|
12
|
+
import { getBackgroundOptions } from 'tona-options'
|
|
13
|
+
|
|
14
|
+
const backgroundOptions = getBackgroundOptions()
|
|
15
|
+
console.log(backgroundOptions)
|
|
16
|
+
// {
|
|
17
|
+
// enable: false,
|
|
18
|
+
// value: "",
|
|
19
|
+
// opacity: 0.85,
|
|
20
|
+
// repeat: false,
|
|
21
|
+
// }
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
const backgroundOptions = getBackgroundOptions({
|
|
26
|
+
enable: true,
|
|
27
|
+
})
|
|
28
|
+
console.log(backgroundOptions)
|
|
29
|
+
// {
|
|
30
|
+
// enable: true,
|
|
31
|
+
// value: "",
|
|
32
|
+
// opacity: 0.85,
|
|
33
|
+
// repeat: false,
|
|
34
|
+
// }
|
|
35
|
+
```
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
let tona = require("tona");
|
|
2
|
+
|
|
3
|
+
//#region src/index.ts
|
|
4
|
+
const getThemeOptions = (0, tona.defineOptions)("theme", {
|
|
5
|
+
name: "reacg",
|
|
6
|
+
color: "#FFB3CC",
|
|
7
|
+
avatar: "",
|
|
8
|
+
headerBackground: ""
|
|
9
|
+
});
|
|
10
|
+
const getBackgroundOptions = (0, tona.defineOptions)("bodyBackground", {
|
|
11
|
+
enable: false,
|
|
12
|
+
value: "",
|
|
13
|
+
opacity: .85,
|
|
14
|
+
repeat: false
|
|
15
|
+
});
|
|
16
|
+
const getBarragesOptions = (0, tona.defineOptions)("barrages", {
|
|
17
|
+
enable: false,
|
|
18
|
+
opacity: .6,
|
|
19
|
+
fontSize: "20px",
|
|
20
|
+
colors: [],
|
|
21
|
+
barrages: [],
|
|
22
|
+
indexBarrages: [],
|
|
23
|
+
postPageBarrages: []
|
|
24
|
+
});
|
|
25
|
+
const getCatalogOptions = (0, tona.defineOptions)("catalog", {
|
|
26
|
+
enable: false,
|
|
27
|
+
position: "left"
|
|
28
|
+
});
|
|
29
|
+
const getChartsOptions = (0, tona.defineOptions)(["chart", "charts"], {
|
|
30
|
+
enable: false,
|
|
31
|
+
labels: [
|
|
32
|
+
"Vue",
|
|
33
|
+
"React",
|
|
34
|
+
"Flutter",
|
|
35
|
+
"Java",
|
|
36
|
+
"NodeJs",
|
|
37
|
+
"TypeScript",
|
|
38
|
+
"CSS"
|
|
39
|
+
],
|
|
40
|
+
datasets: [{
|
|
41
|
+
label: "My First Chart",
|
|
42
|
+
data: [
|
|
43
|
+
65,
|
|
44
|
+
59,
|
|
45
|
+
90,
|
|
46
|
+
81,
|
|
47
|
+
56,
|
|
48
|
+
55,
|
|
49
|
+
40
|
|
50
|
+
],
|
|
51
|
+
fill: true,
|
|
52
|
+
backgroundColor: "rgba(255, 99, 132, 0.2)",
|
|
53
|
+
borderColor: "rgb(255, 99, 132)",
|
|
54
|
+
pointBackgroundColor: "rgb(255, 99, 132)",
|
|
55
|
+
pointBorderColor: "#fff",
|
|
56
|
+
pointHoverBackgroundColor: "#fff",
|
|
57
|
+
pointHoverBorderColor: "rgb(255, 99, 132)"
|
|
58
|
+
}, {
|
|
59
|
+
label: "My Second Dataset",
|
|
60
|
+
data: [
|
|
61
|
+
28,
|
|
62
|
+
48,
|
|
63
|
+
40,
|
|
64
|
+
19,
|
|
65
|
+
96,
|
|
66
|
+
27,
|
|
67
|
+
100
|
|
68
|
+
],
|
|
69
|
+
fill: true,
|
|
70
|
+
backgroundColor: "rgba(54, 162, 235, 0.2)",
|
|
71
|
+
borderColor: "rgb(54, 162, 235)",
|
|
72
|
+
pointBackgroundColor: "rgb(54, 162, 235)",
|
|
73
|
+
pointBorderColor: "#fff",
|
|
74
|
+
pointHoverBackgroundColor: "#fff",
|
|
75
|
+
pointHoverBorderColor: "rgb(54, 162, 235)"
|
|
76
|
+
}]
|
|
77
|
+
});
|
|
78
|
+
const getClickEffectsOptions = (0, tona.defineOptions)(["clickEffects", "click"], {
|
|
79
|
+
enable: false,
|
|
80
|
+
colors: [],
|
|
81
|
+
size: 30,
|
|
82
|
+
maxCount: 10
|
|
83
|
+
});
|
|
84
|
+
const getCodeCopyOptions = (0, tona.defineOptions)("codeCopy", { enable: false });
|
|
85
|
+
const getCodeHighlightOptions = (0, tona.defineOptions)(["codeHighlight", "highLight"], {
|
|
86
|
+
dark: "atomOneDark",
|
|
87
|
+
light: "atomOneLight"
|
|
88
|
+
});
|
|
89
|
+
const getCodeLangOptions = (0, tona.defineOptions)("codeLang", { enable: false });
|
|
90
|
+
const getCodeLinenumbersOptions = (0, tona.defineOptions)([
|
|
91
|
+
"codeLinenumbers",
|
|
92
|
+
"lineNumbers",
|
|
93
|
+
"codeLineNumbers"
|
|
94
|
+
], { enable: false });
|
|
95
|
+
const getCodeTrafficLightOptions = (0, tona.defineOptions)("codeTrafficLight", { enable: false });
|
|
96
|
+
const getDonationOptions = (0, tona.defineOptions)("donation", {
|
|
97
|
+
enable: false,
|
|
98
|
+
qrcodes: []
|
|
99
|
+
});
|
|
100
|
+
const getEmojiOptions = (0, tona.defineOptions)("emoji", {
|
|
101
|
+
enable: false,
|
|
102
|
+
buttonIcon: "",
|
|
103
|
+
emojiList: []
|
|
104
|
+
});
|
|
105
|
+
const getLinksOptions = (0, tona.defineOptions)("links", {
|
|
106
|
+
enable: false,
|
|
107
|
+
value: []
|
|
108
|
+
});
|
|
109
|
+
const getImagePreviewOptions = (0, tona.defineOptions)(["imagePreview", "imagebox"], { enable: false });
|
|
110
|
+
const getLive2dOptions = (0, tona.defineOptions)("live2d", {
|
|
111
|
+
enable: false,
|
|
112
|
+
page: "all",
|
|
113
|
+
agent: "pc",
|
|
114
|
+
model: "haru-01",
|
|
115
|
+
width: 150,
|
|
116
|
+
height: 200,
|
|
117
|
+
position: "left",
|
|
118
|
+
gap: "default"
|
|
119
|
+
});
|
|
120
|
+
const getLockScreenOptions = (0, tona.defineOptions)("lock", {
|
|
121
|
+
enable: false,
|
|
122
|
+
background: "",
|
|
123
|
+
strings: []
|
|
124
|
+
});
|
|
125
|
+
const getDarkModeOptions = (0, tona.defineOptions)(["mode", "darkMode"], {
|
|
126
|
+
enable: false,
|
|
127
|
+
darkDefault: false,
|
|
128
|
+
autoDark: false,
|
|
129
|
+
autoLight: false
|
|
130
|
+
});
|
|
131
|
+
const getMusicPlayerOptions = (0, tona.defineOptions)("musicPlayer", {
|
|
132
|
+
enable: false,
|
|
133
|
+
page: "all",
|
|
134
|
+
agent: "pc",
|
|
135
|
+
autoplay: false,
|
|
136
|
+
volume: .4,
|
|
137
|
+
lrc: {
|
|
138
|
+
enable: false,
|
|
139
|
+
type: 1,
|
|
140
|
+
color: ""
|
|
141
|
+
},
|
|
142
|
+
audio: [{
|
|
143
|
+
name: "",
|
|
144
|
+
artist: "",
|
|
145
|
+
url: "",
|
|
146
|
+
cover: "",
|
|
147
|
+
lrc: ""
|
|
148
|
+
}]
|
|
149
|
+
});
|
|
150
|
+
const getNotationOptions = (0, tona.defineOptions)("notation", { enable: false });
|
|
151
|
+
const getNoticeOptions = (0, tona.defineOptions)("notice", {
|
|
152
|
+
enable: false,
|
|
153
|
+
contents: []
|
|
154
|
+
});
|
|
155
|
+
const getPostBottomImageOptions = (0, tona.defineOptions)("postBottomImage", {
|
|
156
|
+
enable: false,
|
|
157
|
+
img: "",
|
|
158
|
+
height: ""
|
|
159
|
+
});
|
|
160
|
+
const getLicenseOptions = (0, tona.defineOptions)(["license", "postSignature"], {
|
|
161
|
+
enable: false,
|
|
162
|
+
license: true,
|
|
163
|
+
licenseName: "",
|
|
164
|
+
licenseLink: "",
|
|
165
|
+
contents: []
|
|
166
|
+
});
|
|
167
|
+
const getPostTopImageOptions = (0, tona.defineOptions)("postTopImage", {
|
|
168
|
+
enable: false,
|
|
169
|
+
fixed: false,
|
|
170
|
+
imgs: []
|
|
171
|
+
});
|
|
172
|
+
const getQrcodeOptions = (0, tona.defineOptions)("qrcode", {
|
|
173
|
+
enable: false,
|
|
174
|
+
img: "",
|
|
175
|
+
desc: ""
|
|
176
|
+
});
|
|
177
|
+
const getSignatureOptions = (0, tona.defineOptions)("signature", {
|
|
178
|
+
enable: false,
|
|
179
|
+
contents: []
|
|
180
|
+
});
|
|
181
|
+
const getToolsOptions = (0, tona.defineOptions)("tools", {
|
|
182
|
+
initialOpen: true,
|
|
183
|
+
mobileAutoClose: true
|
|
184
|
+
});
|
|
185
|
+
const getGithubOptions = (0, tona.defineOptions)("github", {
|
|
186
|
+
enable: false,
|
|
187
|
+
color: "#ffb3cc",
|
|
188
|
+
url: ""
|
|
189
|
+
});
|
|
190
|
+
const getGiteeOptions = (0, tona.defineOptions)("gitee", {
|
|
191
|
+
enable: false,
|
|
192
|
+
color: "#ffb3cc",
|
|
193
|
+
url: ""
|
|
194
|
+
});
|
|
195
|
+
const getPostListImageOptions = (0, tona.defineOptions)("postListImage", {
|
|
196
|
+
enable: false,
|
|
197
|
+
images: []
|
|
198
|
+
});
|
|
199
|
+
const getWebsiteTagOptions = (0, tona.defineOptions)(["webTag", "tab"], {
|
|
200
|
+
enable: false,
|
|
201
|
+
title: "",
|
|
202
|
+
favicon: ""
|
|
203
|
+
});
|
|
204
|
+
const getAboutOptions = (0, tona.defineOptions)("about", {
|
|
205
|
+
enable: false,
|
|
206
|
+
bio: "",
|
|
207
|
+
tags: []
|
|
208
|
+
});
|
|
209
|
+
const getItemGroupsOptions = (0, tona.defineOptions)("itemGroups", {
|
|
210
|
+
enable: false,
|
|
211
|
+
groups: []
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
//#endregion
|
|
215
|
+
exports.getAboutOptions = getAboutOptions;
|
|
216
|
+
exports.getBackgroundOptions = getBackgroundOptions;
|
|
217
|
+
exports.getBarragesOptions = getBarragesOptions;
|
|
218
|
+
exports.getCatalogOptions = getCatalogOptions;
|
|
219
|
+
exports.getChartsOptions = getChartsOptions;
|
|
220
|
+
exports.getClickEffectsOptions = getClickEffectsOptions;
|
|
221
|
+
exports.getCodeCopyOptions = getCodeCopyOptions;
|
|
222
|
+
exports.getCodeHighlightOptions = getCodeHighlightOptions;
|
|
223
|
+
exports.getCodeLangOptions = getCodeLangOptions;
|
|
224
|
+
exports.getCodeLinenumbersOptions = getCodeLinenumbersOptions;
|
|
225
|
+
exports.getCodeTrafficLightOptions = getCodeTrafficLightOptions;
|
|
226
|
+
exports.getDarkModeOptions = getDarkModeOptions;
|
|
227
|
+
exports.getDonationOptions = getDonationOptions;
|
|
228
|
+
exports.getEmojiOptions = getEmojiOptions;
|
|
229
|
+
exports.getGiteeOptions = getGiteeOptions;
|
|
230
|
+
exports.getGithubOptions = getGithubOptions;
|
|
231
|
+
exports.getImagePreviewOptions = getImagePreviewOptions;
|
|
232
|
+
exports.getItemGroupsOptions = getItemGroupsOptions;
|
|
233
|
+
exports.getLicenseOptions = getLicenseOptions;
|
|
234
|
+
exports.getLinksOptions = getLinksOptions;
|
|
235
|
+
exports.getLive2dOptions = getLive2dOptions;
|
|
236
|
+
exports.getLockScreenOptions = getLockScreenOptions;
|
|
237
|
+
exports.getMusicPlayerOptions = getMusicPlayerOptions;
|
|
238
|
+
exports.getNotationOptions = getNotationOptions;
|
|
239
|
+
exports.getNoticeOptions = getNoticeOptions;
|
|
240
|
+
exports.getPostBottomImageOptions = getPostBottomImageOptions;
|
|
241
|
+
exports.getPostListImageOptions = getPostListImageOptions;
|
|
242
|
+
exports.getPostTopImageOptions = getPostTopImageOptions;
|
|
243
|
+
exports.getQrcodeOptions = getQrcodeOptions;
|
|
244
|
+
exports.getSignatureOptions = getSignatureOptions;
|
|
245
|
+
exports.getThemeOptions = getThemeOptions;
|
|
246
|
+
exports.getToolsOptions = getToolsOptions;
|
|
247
|
+
exports.getWebsiteTagOptions = getWebsiteTagOptions;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
//#region src/types.d.ts
|
|
2
|
+
type CodeTheme = 'atomOneDark' | 'atomOneLight' | 'github';
|
|
3
|
+
type Page = 'all' | 'post' | 'index';
|
|
4
|
+
type Agent = 'desktop' | 'pad' | 'phone';
|
|
5
|
+
type Audio = Array<{
|
|
6
|
+
name: string;
|
|
7
|
+
artist: string;
|
|
8
|
+
url: string;
|
|
9
|
+
cover: string;
|
|
10
|
+
lrc: string;
|
|
11
|
+
}>;
|
|
12
|
+
interface Lrc {
|
|
13
|
+
enable: boolean;
|
|
14
|
+
type: 1 | 3;
|
|
15
|
+
color: string;
|
|
16
|
+
}
|
|
17
|
+
interface Link {
|
|
18
|
+
name: string;
|
|
19
|
+
link: string;
|
|
20
|
+
}
|
|
21
|
+
interface ThemeOptions {
|
|
22
|
+
name: string;
|
|
23
|
+
color: string;
|
|
24
|
+
avatar: string;
|
|
25
|
+
headerBackground: string;
|
|
26
|
+
}
|
|
27
|
+
interface BackgroundOptions {
|
|
28
|
+
enable: boolean;
|
|
29
|
+
value: string;
|
|
30
|
+
opacity: number;
|
|
31
|
+
repeat: boolean;
|
|
32
|
+
}
|
|
33
|
+
interface BarragesOptions {
|
|
34
|
+
enable: boolean;
|
|
35
|
+
opacity: number;
|
|
36
|
+
fontSize: string;
|
|
37
|
+
colors: string[];
|
|
38
|
+
barrages: string[];
|
|
39
|
+
indexBarrages: string[];
|
|
40
|
+
postPageBarrages: string[];
|
|
41
|
+
}
|
|
42
|
+
interface CatalogOptions {
|
|
43
|
+
enable: boolean;
|
|
44
|
+
position: 'left' | 'right';
|
|
45
|
+
}
|
|
46
|
+
interface ChartsOptions {
|
|
47
|
+
enable: boolean;
|
|
48
|
+
labels: string[];
|
|
49
|
+
datasets: Array<object>;
|
|
50
|
+
}
|
|
51
|
+
interface ClickEffectsOptions {
|
|
52
|
+
enable: boolean;
|
|
53
|
+
colors: string[];
|
|
54
|
+
size: number;
|
|
55
|
+
maxCount: number;
|
|
56
|
+
}
|
|
57
|
+
interface CodeCopyOptions {
|
|
58
|
+
enable: boolean;
|
|
59
|
+
}
|
|
60
|
+
interface CodeHighlightOptions {
|
|
61
|
+
dark: CodeTheme;
|
|
62
|
+
light: CodeTheme;
|
|
63
|
+
}
|
|
64
|
+
interface CodeLangOptions {
|
|
65
|
+
enable: boolean;
|
|
66
|
+
}
|
|
67
|
+
interface CodeLinenumbersOptions {
|
|
68
|
+
enable: boolean;
|
|
69
|
+
}
|
|
70
|
+
interface DonationOptions {
|
|
71
|
+
enable: boolean;
|
|
72
|
+
qrcodes: string[];
|
|
73
|
+
}
|
|
74
|
+
interface EmojiOptions {
|
|
75
|
+
enable: boolean;
|
|
76
|
+
buttonIcon: string;
|
|
77
|
+
emojiList: string[];
|
|
78
|
+
}
|
|
79
|
+
interface LinksOptions {
|
|
80
|
+
enable: boolean;
|
|
81
|
+
value: Array<Link>;
|
|
82
|
+
}
|
|
83
|
+
interface ImagePreviewOptions {
|
|
84
|
+
enable: boolean;
|
|
85
|
+
}
|
|
86
|
+
interface Live2dOptions {
|
|
87
|
+
enable: boolean;
|
|
88
|
+
}
|
|
89
|
+
interface LockScreenOptions {
|
|
90
|
+
enable: boolean;
|
|
91
|
+
background: string;
|
|
92
|
+
strings: string[];
|
|
93
|
+
}
|
|
94
|
+
interface DarkModeOptions {
|
|
95
|
+
enable: boolean;
|
|
96
|
+
darkDefault: boolean;
|
|
97
|
+
autoDark: boolean;
|
|
98
|
+
autoLight: boolean;
|
|
99
|
+
}
|
|
100
|
+
interface MusicPlayerOptions {
|
|
101
|
+
enable: boolean;
|
|
102
|
+
page: Page;
|
|
103
|
+
agent: Agent;
|
|
104
|
+
autoplay: boolean;
|
|
105
|
+
volume: number;
|
|
106
|
+
lrc: Lrc;
|
|
107
|
+
audio: Audio;
|
|
108
|
+
}
|
|
109
|
+
interface NotationOptions {
|
|
110
|
+
enable: boolean;
|
|
111
|
+
}
|
|
112
|
+
interface NoticeOptions {
|
|
113
|
+
enable: boolean;
|
|
114
|
+
contents: string[];
|
|
115
|
+
}
|
|
116
|
+
interface PostBottomImageOptions {
|
|
117
|
+
enable: boolean;
|
|
118
|
+
img: string;
|
|
119
|
+
height: string;
|
|
120
|
+
}
|
|
121
|
+
interface LicenseOptions {
|
|
122
|
+
enable: boolean;
|
|
123
|
+
license: boolean;
|
|
124
|
+
licenseName: string;
|
|
125
|
+
licenseLink: string;
|
|
126
|
+
contents: string[];
|
|
127
|
+
}
|
|
128
|
+
interface PostTopImageOptions {
|
|
129
|
+
enable: boolean;
|
|
130
|
+
fixed: boolean;
|
|
131
|
+
imgs: string[];
|
|
132
|
+
}
|
|
133
|
+
interface QrcodeOptions {
|
|
134
|
+
enable: boolean;
|
|
135
|
+
img: string;
|
|
136
|
+
desc: string;
|
|
137
|
+
}
|
|
138
|
+
interface SignatureOptions {
|
|
139
|
+
enable: boolean;
|
|
140
|
+
contents: string[];
|
|
141
|
+
}
|
|
142
|
+
interface ToolsOptions {
|
|
143
|
+
initialOpen: boolean;
|
|
144
|
+
mobileAutoClose: boolean;
|
|
145
|
+
}
|
|
146
|
+
interface GithubOptions {
|
|
147
|
+
enable: boolean;
|
|
148
|
+
color: string;
|
|
149
|
+
url: string;
|
|
150
|
+
}
|
|
151
|
+
interface GiteeOptions {
|
|
152
|
+
enable: boolean;
|
|
153
|
+
color: string;
|
|
154
|
+
url: string;
|
|
155
|
+
}
|
|
156
|
+
interface PostListImageOptions {
|
|
157
|
+
enable: boolean;
|
|
158
|
+
images: string[];
|
|
159
|
+
}
|
|
160
|
+
interface WebsiteTagOptions {
|
|
161
|
+
enable: boolean;
|
|
162
|
+
title: string;
|
|
163
|
+
favicon: string;
|
|
164
|
+
}
|
|
165
|
+
interface CodeTrafficLightOptions {
|
|
166
|
+
enable: boolean;
|
|
167
|
+
}
|
|
168
|
+
interface AboutOptions {
|
|
169
|
+
enable: boolean;
|
|
170
|
+
bio: string;
|
|
171
|
+
tags: string[];
|
|
172
|
+
}
|
|
173
|
+
interface ItemGroupItem {
|
|
174
|
+
title: string;
|
|
175
|
+
href: string;
|
|
176
|
+
lightIcon: string;
|
|
177
|
+
darkIcon?: string;
|
|
178
|
+
}
|
|
179
|
+
interface ItemGroup {
|
|
180
|
+
group: string;
|
|
181
|
+
items: ItemGroupItem[];
|
|
182
|
+
}
|
|
183
|
+
interface ItemGroupsOptions {
|
|
184
|
+
enable: boolean;
|
|
185
|
+
groups: ItemGroup[];
|
|
186
|
+
}
|
|
187
|
+
type GenericGetFn<T> = (arg?: Partial<T>) => T;
|
|
188
|
+
/**
|
|
189
|
+
* 皮肤基本配置
|
|
190
|
+
*/
|
|
191
|
+
type GetThemeOptions = GenericGetFn<ThemeOptions>;
|
|
192
|
+
/**
|
|
193
|
+
* 背景配置
|
|
194
|
+
*/
|
|
195
|
+
type GetBackgroundOptions = GenericGetFn<BackgroundOptions>;
|
|
196
|
+
/**
|
|
197
|
+
* 弹幕配置
|
|
198
|
+
*/
|
|
199
|
+
type GetBarragesOptions = GenericGetFn<BarragesOptions>;
|
|
200
|
+
/**
|
|
201
|
+
* 博文目录配置
|
|
202
|
+
*/
|
|
203
|
+
type GetCatalogOptions = GenericGetFn<CatalogOptions>;
|
|
204
|
+
/**
|
|
205
|
+
* 图表配置
|
|
206
|
+
*/
|
|
207
|
+
type GetChartsOptions = GenericGetFn<ChartsOptions>;
|
|
208
|
+
/**
|
|
209
|
+
* 点击特效配置
|
|
210
|
+
*/
|
|
211
|
+
type GetClickEffectsOptions = GenericGetFn<ClickEffectsOptions>;
|
|
212
|
+
/**
|
|
213
|
+
* 代码块复制配置
|
|
214
|
+
*/
|
|
215
|
+
type GetCodeCopyOptions = GenericGetFn<CodeCopyOptions>;
|
|
216
|
+
/**
|
|
217
|
+
* 代码块高亮皮肤配置
|
|
218
|
+
*/
|
|
219
|
+
type GetCodeHighlightOptions = GenericGetFn<CodeHighlightOptions>;
|
|
220
|
+
/**
|
|
221
|
+
* 代码块语言配置
|
|
222
|
+
*/
|
|
223
|
+
type GetCodeLangOptions = GenericGetFn<CodeLangOptions>;
|
|
224
|
+
/**
|
|
225
|
+
* 代码块行号配置
|
|
226
|
+
*/
|
|
227
|
+
type GetCodeLinenumbersOptions = GenericGetFn<CodeLinenumbersOptions>;
|
|
228
|
+
/**
|
|
229
|
+
* 捐赠配置
|
|
230
|
+
*/
|
|
231
|
+
type GetDonationOptions = GenericGetFn<DonationOptions>;
|
|
232
|
+
/**
|
|
233
|
+
* 表情输入配置
|
|
234
|
+
*/
|
|
235
|
+
type GetEmojiOptions = GenericGetFn<EmojiOptions>;
|
|
236
|
+
/**
|
|
237
|
+
* 自定义链接配置
|
|
238
|
+
*/
|
|
239
|
+
type GetLinksOptions = GenericGetFn<LinksOptions>;
|
|
240
|
+
/**
|
|
241
|
+
* 图片查看配置
|
|
242
|
+
*/
|
|
243
|
+
type GetImagePreviewOptions = GenericGetFn<ImagePreviewOptions>;
|
|
244
|
+
/**
|
|
245
|
+
* live2d 配置
|
|
246
|
+
*/
|
|
247
|
+
type GetLive2dOptions = GenericGetFn<Live2dOptions>;
|
|
248
|
+
/**
|
|
249
|
+
* 锁屏配置
|
|
250
|
+
*/
|
|
251
|
+
type GetLockScreenOptions = GenericGetFn<LockScreenOptions>;
|
|
252
|
+
/**
|
|
253
|
+
* 深色模式配置
|
|
254
|
+
*/
|
|
255
|
+
type GetDarkModeOptions = GenericGetFn<DarkModeOptions>;
|
|
256
|
+
/**
|
|
257
|
+
* 音乐播放器配置
|
|
258
|
+
*/
|
|
259
|
+
type GetMusicPlayerOptions = GenericGetFn<MusicPlayerOptions>;
|
|
260
|
+
/**
|
|
261
|
+
* 笔注配置
|
|
262
|
+
*/
|
|
263
|
+
type GetNotationOptions = GenericGetFn<NotationOptions>;
|
|
264
|
+
/**
|
|
265
|
+
* 公告配置
|
|
266
|
+
*/
|
|
267
|
+
type GetNoticeOptions = GenericGetFn<NoticeOptions>;
|
|
268
|
+
/**
|
|
269
|
+
* 博文底部图片配置
|
|
270
|
+
*/
|
|
271
|
+
type GetPostBottomImageOptions = GenericGetFn<PostBottomImageOptions>;
|
|
272
|
+
/**
|
|
273
|
+
* 版权配置
|
|
274
|
+
*/
|
|
275
|
+
type GetLicenseOptions = GenericGetFn<LicenseOptions>;
|
|
276
|
+
/**
|
|
277
|
+
* 博文顶部图片配置
|
|
278
|
+
*/
|
|
279
|
+
type GetPostTopImageOptions = GenericGetFn<PostTopImageOptions>;
|
|
280
|
+
/**
|
|
281
|
+
* 二维码配置
|
|
282
|
+
*/
|
|
283
|
+
type GetQrcodeOptions = GenericGetFn<QrcodeOptions>;
|
|
284
|
+
/**
|
|
285
|
+
* 个性签名配置
|
|
286
|
+
*/
|
|
287
|
+
type GetSignatureOptions = GenericGetFn<SignatureOptions>;
|
|
288
|
+
/**
|
|
289
|
+
* 工具栏配置
|
|
290
|
+
*/
|
|
291
|
+
type GetToolsOptions = GenericGetFn<ToolsOptions>;
|
|
292
|
+
/**
|
|
293
|
+
* Github 配置
|
|
294
|
+
*/
|
|
295
|
+
type GetGithubOptions = GenericGetFn<GithubOptions>;
|
|
296
|
+
/**
|
|
297
|
+
* Gitee 配置
|
|
298
|
+
*/
|
|
299
|
+
type GetGiteeOptions = GenericGetFn<GiteeOptions>;
|
|
300
|
+
/**
|
|
301
|
+
* 博文列表图片配置
|
|
302
|
+
*/
|
|
303
|
+
type GetPostListImageOptions = GenericGetFn<PostListImageOptions>;
|
|
304
|
+
/**
|
|
305
|
+
* 站点标签配置
|
|
306
|
+
*/
|
|
307
|
+
type GetWebsiteTagOptions = GenericGetFn<WebsiteTagOptions>;
|
|
308
|
+
/**
|
|
309
|
+
* 代码块红绿灯
|
|
310
|
+
*/
|
|
311
|
+
type GetCodeTrafficLightOptions = GenericGetFn<CodeTrafficLightOptions>;
|
|
312
|
+
/**
|
|
313
|
+
* 关于我配置
|
|
314
|
+
*/
|
|
315
|
+
type GetAboutOptions = GenericGetFn<AboutOptions>;
|
|
316
|
+
/**
|
|
317
|
+
* 图标分组配置
|
|
318
|
+
*/
|
|
319
|
+
type GetItemGroupsOptions = GenericGetFn<ItemGroupsOptions>;
|
|
320
|
+
//#endregion
|
|
321
|
+
//#region src/index.d.ts
|
|
322
|
+
declare const getThemeOptions: GetThemeOptions;
|
|
323
|
+
declare const getBackgroundOptions: GetBackgroundOptions;
|
|
324
|
+
declare const getBarragesOptions: GetBarragesOptions;
|
|
325
|
+
declare const getCatalogOptions: GetCatalogOptions;
|
|
326
|
+
declare const getChartsOptions: GetChartsOptions;
|
|
327
|
+
declare const getClickEffectsOptions: GetClickEffectsOptions;
|
|
328
|
+
declare const getCodeCopyOptions: GetCodeCopyOptions;
|
|
329
|
+
declare const getCodeHighlightOptions: GetCodeHighlightOptions;
|
|
330
|
+
declare const getCodeLangOptions: GetCodeLangOptions;
|
|
331
|
+
declare const getCodeLinenumbersOptions: GetCodeLinenumbersOptions;
|
|
332
|
+
declare const getCodeTrafficLightOptions: GetCodeTrafficLightOptions;
|
|
333
|
+
declare const getDonationOptions: GetDonationOptions;
|
|
334
|
+
declare const getEmojiOptions: GetEmojiOptions;
|
|
335
|
+
declare const getLinksOptions: GetLinksOptions;
|
|
336
|
+
declare const getImagePreviewOptions: GetImagePreviewOptions;
|
|
337
|
+
declare const getLive2dOptions: GetLive2dOptions;
|
|
338
|
+
declare const getLockScreenOptions: GetLockScreenOptions;
|
|
339
|
+
declare const getDarkModeOptions: GetDarkModeOptions;
|
|
340
|
+
declare const getMusicPlayerOptions: GetMusicPlayerOptions;
|
|
341
|
+
declare const getNotationOptions: GetNotationOptions;
|
|
342
|
+
declare const getNoticeOptions: GetNoticeOptions;
|
|
343
|
+
declare const getPostBottomImageOptions: GetPostBottomImageOptions;
|
|
344
|
+
declare const getLicenseOptions: GetLicenseOptions;
|
|
345
|
+
declare const getPostTopImageOptions: GetPostTopImageOptions;
|
|
346
|
+
declare const getQrcodeOptions: GetQrcodeOptions;
|
|
347
|
+
declare const getSignatureOptions: GetSignatureOptions;
|
|
348
|
+
declare const getToolsOptions: GetToolsOptions;
|
|
349
|
+
declare const getGithubOptions: GetGithubOptions;
|
|
350
|
+
declare const getGiteeOptions: GetGiteeOptions;
|
|
351
|
+
declare const getPostListImageOptions: GetPostListImageOptions;
|
|
352
|
+
declare const getWebsiteTagOptions: GetWebsiteTagOptions;
|
|
353
|
+
declare const getAboutOptions: GetAboutOptions;
|
|
354
|
+
declare const getItemGroupsOptions: GetItemGroupsOptions;
|
|
355
|
+
//#endregion
|
|
356
|
+
export { getAboutOptions, getBackgroundOptions, getBarragesOptions, getCatalogOptions, getChartsOptions, getClickEffectsOptions, getCodeCopyOptions, getCodeHighlightOptions, getCodeLangOptions, getCodeLinenumbersOptions, getCodeTrafficLightOptions, getDarkModeOptions, getDonationOptions, getEmojiOptions, getGiteeOptions, getGithubOptions, getImagePreviewOptions, getItemGroupsOptions, getLicenseOptions, getLinksOptions, getLive2dOptions, getLockScreenOptions, getMusicPlayerOptions, getNotationOptions, getNoticeOptions, getPostBottomImageOptions, getPostListImageOptions, getPostTopImageOptions, getQrcodeOptions, getSignatureOptions, getThemeOptions, getToolsOptions, getWebsiteTagOptions };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
//#region src/types.d.ts
|
|
2
|
+
type CodeTheme = 'atomOneDark' | 'atomOneLight' | 'github';
|
|
3
|
+
type Page = 'all' | 'post' | 'index';
|
|
4
|
+
type Agent = 'desktop' | 'pad' | 'phone';
|
|
5
|
+
type Audio = Array<{
|
|
6
|
+
name: string;
|
|
7
|
+
artist: string;
|
|
8
|
+
url: string;
|
|
9
|
+
cover: string;
|
|
10
|
+
lrc: string;
|
|
11
|
+
}>;
|
|
12
|
+
interface Lrc {
|
|
13
|
+
enable: boolean;
|
|
14
|
+
type: 1 | 3;
|
|
15
|
+
color: string;
|
|
16
|
+
}
|
|
17
|
+
interface Link {
|
|
18
|
+
name: string;
|
|
19
|
+
link: string;
|
|
20
|
+
}
|
|
21
|
+
interface ThemeOptions {
|
|
22
|
+
name: string;
|
|
23
|
+
color: string;
|
|
24
|
+
avatar: string;
|
|
25
|
+
headerBackground: string;
|
|
26
|
+
}
|
|
27
|
+
interface BackgroundOptions {
|
|
28
|
+
enable: boolean;
|
|
29
|
+
value: string;
|
|
30
|
+
opacity: number;
|
|
31
|
+
repeat: boolean;
|
|
32
|
+
}
|
|
33
|
+
interface BarragesOptions {
|
|
34
|
+
enable: boolean;
|
|
35
|
+
opacity: number;
|
|
36
|
+
fontSize: string;
|
|
37
|
+
colors: string[];
|
|
38
|
+
barrages: string[];
|
|
39
|
+
indexBarrages: string[];
|
|
40
|
+
postPageBarrages: string[];
|
|
41
|
+
}
|
|
42
|
+
interface CatalogOptions {
|
|
43
|
+
enable: boolean;
|
|
44
|
+
position: 'left' | 'right';
|
|
45
|
+
}
|
|
46
|
+
interface ChartsOptions {
|
|
47
|
+
enable: boolean;
|
|
48
|
+
labels: string[];
|
|
49
|
+
datasets: Array<object>;
|
|
50
|
+
}
|
|
51
|
+
interface ClickEffectsOptions {
|
|
52
|
+
enable: boolean;
|
|
53
|
+
colors: string[];
|
|
54
|
+
size: number;
|
|
55
|
+
maxCount: number;
|
|
56
|
+
}
|
|
57
|
+
interface CodeCopyOptions {
|
|
58
|
+
enable: boolean;
|
|
59
|
+
}
|
|
60
|
+
interface CodeHighlightOptions {
|
|
61
|
+
dark: CodeTheme;
|
|
62
|
+
light: CodeTheme;
|
|
63
|
+
}
|
|
64
|
+
interface CodeLangOptions {
|
|
65
|
+
enable: boolean;
|
|
66
|
+
}
|
|
67
|
+
interface CodeLinenumbersOptions {
|
|
68
|
+
enable: boolean;
|
|
69
|
+
}
|
|
70
|
+
interface DonationOptions {
|
|
71
|
+
enable: boolean;
|
|
72
|
+
qrcodes: string[];
|
|
73
|
+
}
|
|
74
|
+
interface EmojiOptions {
|
|
75
|
+
enable: boolean;
|
|
76
|
+
buttonIcon: string;
|
|
77
|
+
emojiList: string[];
|
|
78
|
+
}
|
|
79
|
+
interface LinksOptions {
|
|
80
|
+
enable: boolean;
|
|
81
|
+
value: Array<Link>;
|
|
82
|
+
}
|
|
83
|
+
interface ImagePreviewOptions {
|
|
84
|
+
enable: boolean;
|
|
85
|
+
}
|
|
86
|
+
interface Live2dOptions {
|
|
87
|
+
enable: boolean;
|
|
88
|
+
}
|
|
89
|
+
interface LockScreenOptions {
|
|
90
|
+
enable: boolean;
|
|
91
|
+
background: string;
|
|
92
|
+
strings: string[];
|
|
93
|
+
}
|
|
94
|
+
interface DarkModeOptions {
|
|
95
|
+
enable: boolean;
|
|
96
|
+
darkDefault: boolean;
|
|
97
|
+
autoDark: boolean;
|
|
98
|
+
autoLight: boolean;
|
|
99
|
+
}
|
|
100
|
+
interface MusicPlayerOptions {
|
|
101
|
+
enable: boolean;
|
|
102
|
+
page: Page;
|
|
103
|
+
agent: Agent;
|
|
104
|
+
autoplay: boolean;
|
|
105
|
+
volume: number;
|
|
106
|
+
lrc: Lrc;
|
|
107
|
+
audio: Audio;
|
|
108
|
+
}
|
|
109
|
+
interface NotationOptions {
|
|
110
|
+
enable: boolean;
|
|
111
|
+
}
|
|
112
|
+
interface NoticeOptions {
|
|
113
|
+
enable: boolean;
|
|
114
|
+
contents: string[];
|
|
115
|
+
}
|
|
116
|
+
interface PostBottomImageOptions {
|
|
117
|
+
enable: boolean;
|
|
118
|
+
img: string;
|
|
119
|
+
height: string;
|
|
120
|
+
}
|
|
121
|
+
interface LicenseOptions {
|
|
122
|
+
enable: boolean;
|
|
123
|
+
license: boolean;
|
|
124
|
+
licenseName: string;
|
|
125
|
+
licenseLink: string;
|
|
126
|
+
contents: string[];
|
|
127
|
+
}
|
|
128
|
+
interface PostTopImageOptions {
|
|
129
|
+
enable: boolean;
|
|
130
|
+
fixed: boolean;
|
|
131
|
+
imgs: string[];
|
|
132
|
+
}
|
|
133
|
+
interface QrcodeOptions {
|
|
134
|
+
enable: boolean;
|
|
135
|
+
img: string;
|
|
136
|
+
desc: string;
|
|
137
|
+
}
|
|
138
|
+
interface SignatureOptions {
|
|
139
|
+
enable: boolean;
|
|
140
|
+
contents: string[];
|
|
141
|
+
}
|
|
142
|
+
interface ToolsOptions {
|
|
143
|
+
initialOpen: boolean;
|
|
144
|
+
mobileAutoClose: boolean;
|
|
145
|
+
}
|
|
146
|
+
interface GithubOptions {
|
|
147
|
+
enable: boolean;
|
|
148
|
+
color: string;
|
|
149
|
+
url: string;
|
|
150
|
+
}
|
|
151
|
+
interface GiteeOptions {
|
|
152
|
+
enable: boolean;
|
|
153
|
+
color: string;
|
|
154
|
+
url: string;
|
|
155
|
+
}
|
|
156
|
+
interface PostListImageOptions {
|
|
157
|
+
enable: boolean;
|
|
158
|
+
images: string[];
|
|
159
|
+
}
|
|
160
|
+
interface WebsiteTagOptions {
|
|
161
|
+
enable: boolean;
|
|
162
|
+
title: string;
|
|
163
|
+
favicon: string;
|
|
164
|
+
}
|
|
165
|
+
interface CodeTrafficLightOptions {
|
|
166
|
+
enable: boolean;
|
|
167
|
+
}
|
|
168
|
+
interface AboutOptions {
|
|
169
|
+
enable: boolean;
|
|
170
|
+
bio: string;
|
|
171
|
+
tags: string[];
|
|
172
|
+
}
|
|
173
|
+
interface ItemGroupItem {
|
|
174
|
+
title: string;
|
|
175
|
+
href: string;
|
|
176
|
+
lightIcon: string;
|
|
177
|
+
darkIcon?: string;
|
|
178
|
+
}
|
|
179
|
+
interface ItemGroup {
|
|
180
|
+
group: string;
|
|
181
|
+
items: ItemGroupItem[];
|
|
182
|
+
}
|
|
183
|
+
interface ItemGroupsOptions {
|
|
184
|
+
enable: boolean;
|
|
185
|
+
groups: ItemGroup[];
|
|
186
|
+
}
|
|
187
|
+
type GenericGetFn<T> = (arg?: Partial<T>) => T;
|
|
188
|
+
/**
|
|
189
|
+
* 皮肤基本配置
|
|
190
|
+
*/
|
|
191
|
+
type GetThemeOptions = GenericGetFn<ThemeOptions>;
|
|
192
|
+
/**
|
|
193
|
+
* 背景配置
|
|
194
|
+
*/
|
|
195
|
+
type GetBackgroundOptions = GenericGetFn<BackgroundOptions>;
|
|
196
|
+
/**
|
|
197
|
+
* 弹幕配置
|
|
198
|
+
*/
|
|
199
|
+
type GetBarragesOptions = GenericGetFn<BarragesOptions>;
|
|
200
|
+
/**
|
|
201
|
+
* 博文目录配置
|
|
202
|
+
*/
|
|
203
|
+
type GetCatalogOptions = GenericGetFn<CatalogOptions>;
|
|
204
|
+
/**
|
|
205
|
+
* 图表配置
|
|
206
|
+
*/
|
|
207
|
+
type GetChartsOptions = GenericGetFn<ChartsOptions>;
|
|
208
|
+
/**
|
|
209
|
+
* 点击特效配置
|
|
210
|
+
*/
|
|
211
|
+
type GetClickEffectsOptions = GenericGetFn<ClickEffectsOptions>;
|
|
212
|
+
/**
|
|
213
|
+
* 代码块复制配置
|
|
214
|
+
*/
|
|
215
|
+
type GetCodeCopyOptions = GenericGetFn<CodeCopyOptions>;
|
|
216
|
+
/**
|
|
217
|
+
* 代码块高亮皮肤配置
|
|
218
|
+
*/
|
|
219
|
+
type GetCodeHighlightOptions = GenericGetFn<CodeHighlightOptions>;
|
|
220
|
+
/**
|
|
221
|
+
* 代码块语言配置
|
|
222
|
+
*/
|
|
223
|
+
type GetCodeLangOptions = GenericGetFn<CodeLangOptions>;
|
|
224
|
+
/**
|
|
225
|
+
* 代码块行号配置
|
|
226
|
+
*/
|
|
227
|
+
type GetCodeLinenumbersOptions = GenericGetFn<CodeLinenumbersOptions>;
|
|
228
|
+
/**
|
|
229
|
+
* 捐赠配置
|
|
230
|
+
*/
|
|
231
|
+
type GetDonationOptions = GenericGetFn<DonationOptions>;
|
|
232
|
+
/**
|
|
233
|
+
* 表情输入配置
|
|
234
|
+
*/
|
|
235
|
+
type GetEmojiOptions = GenericGetFn<EmojiOptions>;
|
|
236
|
+
/**
|
|
237
|
+
* 自定义链接配置
|
|
238
|
+
*/
|
|
239
|
+
type GetLinksOptions = GenericGetFn<LinksOptions>;
|
|
240
|
+
/**
|
|
241
|
+
* 图片查看配置
|
|
242
|
+
*/
|
|
243
|
+
type GetImagePreviewOptions = GenericGetFn<ImagePreviewOptions>;
|
|
244
|
+
/**
|
|
245
|
+
* live2d 配置
|
|
246
|
+
*/
|
|
247
|
+
type GetLive2dOptions = GenericGetFn<Live2dOptions>;
|
|
248
|
+
/**
|
|
249
|
+
* 锁屏配置
|
|
250
|
+
*/
|
|
251
|
+
type GetLockScreenOptions = GenericGetFn<LockScreenOptions>;
|
|
252
|
+
/**
|
|
253
|
+
* 深色模式配置
|
|
254
|
+
*/
|
|
255
|
+
type GetDarkModeOptions = GenericGetFn<DarkModeOptions>;
|
|
256
|
+
/**
|
|
257
|
+
* 音乐播放器配置
|
|
258
|
+
*/
|
|
259
|
+
type GetMusicPlayerOptions = GenericGetFn<MusicPlayerOptions>;
|
|
260
|
+
/**
|
|
261
|
+
* 笔注配置
|
|
262
|
+
*/
|
|
263
|
+
type GetNotationOptions = GenericGetFn<NotationOptions>;
|
|
264
|
+
/**
|
|
265
|
+
* 公告配置
|
|
266
|
+
*/
|
|
267
|
+
type GetNoticeOptions = GenericGetFn<NoticeOptions>;
|
|
268
|
+
/**
|
|
269
|
+
* 博文底部图片配置
|
|
270
|
+
*/
|
|
271
|
+
type GetPostBottomImageOptions = GenericGetFn<PostBottomImageOptions>;
|
|
272
|
+
/**
|
|
273
|
+
* 版权配置
|
|
274
|
+
*/
|
|
275
|
+
type GetLicenseOptions = GenericGetFn<LicenseOptions>;
|
|
276
|
+
/**
|
|
277
|
+
* 博文顶部图片配置
|
|
278
|
+
*/
|
|
279
|
+
type GetPostTopImageOptions = GenericGetFn<PostTopImageOptions>;
|
|
280
|
+
/**
|
|
281
|
+
* 二维码配置
|
|
282
|
+
*/
|
|
283
|
+
type GetQrcodeOptions = GenericGetFn<QrcodeOptions>;
|
|
284
|
+
/**
|
|
285
|
+
* 个性签名配置
|
|
286
|
+
*/
|
|
287
|
+
type GetSignatureOptions = GenericGetFn<SignatureOptions>;
|
|
288
|
+
/**
|
|
289
|
+
* 工具栏配置
|
|
290
|
+
*/
|
|
291
|
+
type GetToolsOptions = GenericGetFn<ToolsOptions>;
|
|
292
|
+
/**
|
|
293
|
+
* Github 配置
|
|
294
|
+
*/
|
|
295
|
+
type GetGithubOptions = GenericGetFn<GithubOptions>;
|
|
296
|
+
/**
|
|
297
|
+
* Gitee 配置
|
|
298
|
+
*/
|
|
299
|
+
type GetGiteeOptions = GenericGetFn<GiteeOptions>;
|
|
300
|
+
/**
|
|
301
|
+
* 博文列表图片配置
|
|
302
|
+
*/
|
|
303
|
+
type GetPostListImageOptions = GenericGetFn<PostListImageOptions>;
|
|
304
|
+
/**
|
|
305
|
+
* 站点标签配置
|
|
306
|
+
*/
|
|
307
|
+
type GetWebsiteTagOptions = GenericGetFn<WebsiteTagOptions>;
|
|
308
|
+
/**
|
|
309
|
+
* 代码块红绿灯
|
|
310
|
+
*/
|
|
311
|
+
type GetCodeTrafficLightOptions = GenericGetFn<CodeTrafficLightOptions>;
|
|
312
|
+
/**
|
|
313
|
+
* 关于我配置
|
|
314
|
+
*/
|
|
315
|
+
type GetAboutOptions = GenericGetFn<AboutOptions>;
|
|
316
|
+
/**
|
|
317
|
+
* 图标分组配置
|
|
318
|
+
*/
|
|
319
|
+
type GetItemGroupsOptions = GenericGetFn<ItemGroupsOptions>;
|
|
320
|
+
//#endregion
|
|
321
|
+
//#region src/index.d.ts
|
|
322
|
+
declare const getThemeOptions: GetThemeOptions;
|
|
323
|
+
declare const getBackgroundOptions: GetBackgroundOptions;
|
|
324
|
+
declare const getBarragesOptions: GetBarragesOptions;
|
|
325
|
+
declare const getCatalogOptions: GetCatalogOptions;
|
|
326
|
+
declare const getChartsOptions: GetChartsOptions;
|
|
327
|
+
declare const getClickEffectsOptions: GetClickEffectsOptions;
|
|
328
|
+
declare const getCodeCopyOptions: GetCodeCopyOptions;
|
|
329
|
+
declare const getCodeHighlightOptions: GetCodeHighlightOptions;
|
|
330
|
+
declare const getCodeLangOptions: GetCodeLangOptions;
|
|
331
|
+
declare const getCodeLinenumbersOptions: GetCodeLinenumbersOptions;
|
|
332
|
+
declare const getCodeTrafficLightOptions: GetCodeTrafficLightOptions;
|
|
333
|
+
declare const getDonationOptions: GetDonationOptions;
|
|
334
|
+
declare const getEmojiOptions: GetEmojiOptions;
|
|
335
|
+
declare const getLinksOptions: GetLinksOptions;
|
|
336
|
+
declare const getImagePreviewOptions: GetImagePreviewOptions;
|
|
337
|
+
declare const getLive2dOptions: GetLive2dOptions;
|
|
338
|
+
declare const getLockScreenOptions: GetLockScreenOptions;
|
|
339
|
+
declare const getDarkModeOptions: GetDarkModeOptions;
|
|
340
|
+
declare const getMusicPlayerOptions: GetMusicPlayerOptions;
|
|
341
|
+
declare const getNotationOptions: GetNotationOptions;
|
|
342
|
+
declare const getNoticeOptions: GetNoticeOptions;
|
|
343
|
+
declare const getPostBottomImageOptions: GetPostBottomImageOptions;
|
|
344
|
+
declare const getLicenseOptions: GetLicenseOptions;
|
|
345
|
+
declare const getPostTopImageOptions: GetPostTopImageOptions;
|
|
346
|
+
declare const getQrcodeOptions: GetQrcodeOptions;
|
|
347
|
+
declare const getSignatureOptions: GetSignatureOptions;
|
|
348
|
+
declare const getToolsOptions: GetToolsOptions;
|
|
349
|
+
declare const getGithubOptions: GetGithubOptions;
|
|
350
|
+
declare const getGiteeOptions: GetGiteeOptions;
|
|
351
|
+
declare const getPostListImageOptions: GetPostListImageOptions;
|
|
352
|
+
declare const getWebsiteTagOptions: GetWebsiteTagOptions;
|
|
353
|
+
declare const getAboutOptions: GetAboutOptions;
|
|
354
|
+
declare const getItemGroupsOptions: GetItemGroupsOptions;
|
|
355
|
+
//#endregion
|
|
356
|
+
export { getAboutOptions, getBackgroundOptions, getBarragesOptions, getCatalogOptions, getChartsOptions, getClickEffectsOptions, getCodeCopyOptions, getCodeHighlightOptions, getCodeLangOptions, getCodeLinenumbersOptions, getCodeTrafficLightOptions, getDarkModeOptions, getDonationOptions, getEmojiOptions, getGiteeOptions, getGithubOptions, getImagePreviewOptions, getItemGroupsOptions, getLicenseOptions, getLinksOptions, getLive2dOptions, getLockScreenOptions, getMusicPlayerOptions, getNotationOptions, getNoticeOptions, getPostBottomImageOptions, getPostListImageOptions, getPostTopImageOptions, getQrcodeOptions, getSignatureOptions, getThemeOptions, getToolsOptions, getWebsiteTagOptions };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { defineOptions } from "tona";
|
|
2
|
+
|
|
3
|
+
//#region src/index.ts
|
|
4
|
+
const getThemeOptions = defineOptions("theme", {
|
|
5
|
+
name: "reacg",
|
|
6
|
+
color: "#FFB3CC",
|
|
7
|
+
avatar: "",
|
|
8
|
+
headerBackground: ""
|
|
9
|
+
});
|
|
10
|
+
const getBackgroundOptions = defineOptions("bodyBackground", {
|
|
11
|
+
enable: false,
|
|
12
|
+
value: "",
|
|
13
|
+
opacity: .85,
|
|
14
|
+
repeat: false
|
|
15
|
+
});
|
|
16
|
+
const getBarragesOptions = defineOptions("barrages", {
|
|
17
|
+
enable: false,
|
|
18
|
+
opacity: .6,
|
|
19
|
+
fontSize: "20px",
|
|
20
|
+
colors: [],
|
|
21
|
+
barrages: [],
|
|
22
|
+
indexBarrages: [],
|
|
23
|
+
postPageBarrages: []
|
|
24
|
+
});
|
|
25
|
+
const getCatalogOptions = defineOptions("catalog", {
|
|
26
|
+
enable: false,
|
|
27
|
+
position: "left"
|
|
28
|
+
});
|
|
29
|
+
const getChartsOptions = defineOptions(["chart", "charts"], {
|
|
30
|
+
enable: false,
|
|
31
|
+
labels: [
|
|
32
|
+
"Vue",
|
|
33
|
+
"React",
|
|
34
|
+
"Flutter",
|
|
35
|
+
"Java",
|
|
36
|
+
"NodeJs",
|
|
37
|
+
"TypeScript",
|
|
38
|
+
"CSS"
|
|
39
|
+
],
|
|
40
|
+
datasets: [{
|
|
41
|
+
label: "My First Chart",
|
|
42
|
+
data: [
|
|
43
|
+
65,
|
|
44
|
+
59,
|
|
45
|
+
90,
|
|
46
|
+
81,
|
|
47
|
+
56,
|
|
48
|
+
55,
|
|
49
|
+
40
|
|
50
|
+
],
|
|
51
|
+
fill: true,
|
|
52
|
+
backgroundColor: "rgba(255, 99, 132, 0.2)",
|
|
53
|
+
borderColor: "rgb(255, 99, 132)",
|
|
54
|
+
pointBackgroundColor: "rgb(255, 99, 132)",
|
|
55
|
+
pointBorderColor: "#fff",
|
|
56
|
+
pointHoverBackgroundColor: "#fff",
|
|
57
|
+
pointHoverBorderColor: "rgb(255, 99, 132)"
|
|
58
|
+
}, {
|
|
59
|
+
label: "My Second Dataset",
|
|
60
|
+
data: [
|
|
61
|
+
28,
|
|
62
|
+
48,
|
|
63
|
+
40,
|
|
64
|
+
19,
|
|
65
|
+
96,
|
|
66
|
+
27,
|
|
67
|
+
100
|
|
68
|
+
],
|
|
69
|
+
fill: true,
|
|
70
|
+
backgroundColor: "rgba(54, 162, 235, 0.2)",
|
|
71
|
+
borderColor: "rgb(54, 162, 235)",
|
|
72
|
+
pointBackgroundColor: "rgb(54, 162, 235)",
|
|
73
|
+
pointBorderColor: "#fff",
|
|
74
|
+
pointHoverBackgroundColor: "#fff",
|
|
75
|
+
pointHoverBorderColor: "rgb(54, 162, 235)"
|
|
76
|
+
}]
|
|
77
|
+
});
|
|
78
|
+
const getClickEffectsOptions = defineOptions(["clickEffects", "click"], {
|
|
79
|
+
enable: false,
|
|
80
|
+
colors: [],
|
|
81
|
+
size: 30,
|
|
82
|
+
maxCount: 10
|
|
83
|
+
});
|
|
84
|
+
const getCodeCopyOptions = defineOptions("codeCopy", { enable: false });
|
|
85
|
+
const getCodeHighlightOptions = defineOptions(["codeHighlight", "highLight"], {
|
|
86
|
+
dark: "atomOneDark",
|
|
87
|
+
light: "atomOneLight"
|
|
88
|
+
});
|
|
89
|
+
const getCodeLangOptions = defineOptions("codeLang", { enable: false });
|
|
90
|
+
const getCodeLinenumbersOptions = defineOptions([
|
|
91
|
+
"codeLinenumbers",
|
|
92
|
+
"lineNumbers",
|
|
93
|
+
"codeLineNumbers"
|
|
94
|
+
], { enable: false });
|
|
95
|
+
const getCodeTrafficLightOptions = defineOptions("codeTrafficLight", { enable: false });
|
|
96
|
+
const getDonationOptions = defineOptions("donation", {
|
|
97
|
+
enable: false,
|
|
98
|
+
qrcodes: []
|
|
99
|
+
});
|
|
100
|
+
const getEmojiOptions = defineOptions("emoji", {
|
|
101
|
+
enable: false,
|
|
102
|
+
buttonIcon: "",
|
|
103
|
+
emojiList: []
|
|
104
|
+
});
|
|
105
|
+
const getLinksOptions = defineOptions("links", {
|
|
106
|
+
enable: false,
|
|
107
|
+
value: []
|
|
108
|
+
});
|
|
109
|
+
const getImagePreviewOptions = defineOptions(["imagePreview", "imagebox"], { enable: false });
|
|
110
|
+
const getLive2dOptions = defineOptions("live2d", {
|
|
111
|
+
enable: false,
|
|
112
|
+
page: "all",
|
|
113
|
+
agent: "pc",
|
|
114
|
+
model: "haru-01",
|
|
115
|
+
width: 150,
|
|
116
|
+
height: 200,
|
|
117
|
+
position: "left",
|
|
118
|
+
gap: "default"
|
|
119
|
+
});
|
|
120
|
+
const getLockScreenOptions = defineOptions("lock", {
|
|
121
|
+
enable: false,
|
|
122
|
+
background: "",
|
|
123
|
+
strings: []
|
|
124
|
+
});
|
|
125
|
+
const getDarkModeOptions = defineOptions(["mode", "darkMode"], {
|
|
126
|
+
enable: false,
|
|
127
|
+
darkDefault: false,
|
|
128
|
+
autoDark: false,
|
|
129
|
+
autoLight: false
|
|
130
|
+
});
|
|
131
|
+
const getMusicPlayerOptions = defineOptions("musicPlayer", {
|
|
132
|
+
enable: false,
|
|
133
|
+
page: "all",
|
|
134
|
+
agent: "pc",
|
|
135
|
+
autoplay: false,
|
|
136
|
+
volume: .4,
|
|
137
|
+
lrc: {
|
|
138
|
+
enable: false,
|
|
139
|
+
type: 1,
|
|
140
|
+
color: ""
|
|
141
|
+
},
|
|
142
|
+
audio: [{
|
|
143
|
+
name: "",
|
|
144
|
+
artist: "",
|
|
145
|
+
url: "",
|
|
146
|
+
cover: "",
|
|
147
|
+
lrc: ""
|
|
148
|
+
}]
|
|
149
|
+
});
|
|
150
|
+
const getNotationOptions = defineOptions("notation", { enable: false });
|
|
151
|
+
const getNoticeOptions = defineOptions("notice", {
|
|
152
|
+
enable: false,
|
|
153
|
+
contents: []
|
|
154
|
+
});
|
|
155
|
+
const getPostBottomImageOptions = defineOptions("postBottomImage", {
|
|
156
|
+
enable: false,
|
|
157
|
+
img: "",
|
|
158
|
+
height: ""
|
|
159
|
+
});
|
|
160
|
+
const getLicenseOptions = defineOptions(["license", "postSignature"], {
|
|
161
|
+
enable: false,
|
|
162
|
+
license: true,
|
|
163
|
+
licenseName: "",
|
|
164
|
+
licenseLink: "",
|
|
165
|
+
contents: []
|
|
166
|
+
});
|
|
167
|
+
const getPostTopImageOptions = defineOptions("postTopImage", {
|
|
168
|
+
enable: false,
|
|
169
|
+
fixed: false,
|
|
170
|
+
imgs: []
|
|
171
|
+
});
|
|
172
|
+
const getQrcodeOptions = defineOptions("qrcode", {
|
|
173
|
+
enable: false,
|
|
174
|
+
img: "",
|
|
175
|
+
desc: ""
|
|
176
|
+
});
|
|
177
|
+
const getSignatureOptions = defineOptions("signature", {
|
|
178
|
+
enable: false,
|
|
179
|
+
contents: []
|
|
180
|
+
});
|
|
181
|
+
const getToolsOptions = defineOptions("tools", {
|
|
182
|
+
initialOpen: true,
|
|
183
|
+
mobileAutoClose: true
|
|
184
|
+
});
|
|
185
|
+
const getGithubOptions = defineOptions("github", {
|
|
186
|
+
enable: false,
|
|
187
|
+
color: "#ffb3cc",
|
|
188
|
+
url: ""
|
|
189
|
+
});
|
|
190
|
+
const getGiteeOptions = defineOptions("gitee", {
|
|
191
|
+
enable: false,
|
|
192
|
+
color: "#ffb3cc",
|
|
193
|
+
url: ""
|
|
194
|
+
});
|
|
195
|
+
const getPostListImageOptions = defineOptions("postListImage", {
|
|
196
|
+
enable: false,
|
|
197
|
+
images: []
|
|
198
|
+
});
|
|
199
|
+
const getWebsiteTagOptions = defineOptions(["webTag", "tab"], {
|
|
200
|
+
enable: false,
|
|
201
|
+
title: "",
|
|
202
|
+
favicon: ""
|
|
203
|
+
});
|
|
204
|
+
const getAboutOptions = defineOptions("about", {
|
|
205
|
+
enable: false,
|
|
206
|
+
bio: "",
|
|
207
|
+
tags: []
|
|
208
|
+
});
|
|
209
|
+
const getItemGroupsOptions = defineOptions("itemGroups", {
|
|
210
|
+
enable: false,
|
|
211
|
+
groups: []
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
//#endregion
|
|
215
|
+
export { getAboutOptions, getBackgroundOptions, getBarragesOptions, getCatalogOptions, getChartsOptions, getClickEffectsOptions, getCodeCopyOptions, getCodeHighlightOptions, getCodeLangOptions, getCodeLinenumbersOptions, getCodeTrafficLightOptions, getDarkModeOptions, getDonationOptions, getEmojiOptions, getGiteeOptions, getGithubOptions, getImagePreviewOptions, getItemGroupsOptions, getLicenseOptions, getLinksOptions, getLive2dOptions, getLockScreenOptions, getMusicPlayerOptions, getNotationOptions, getNoticeOptions, getPostBottomImageOptions, getPostListImageOptions, getPostTopImageOptions, getQrcodeOptions, getSignatureOptions, getThemeOptions, getToolsOptions, getWebsiteTagOptions };
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tona-options",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "guangzan",
|
|
7
|
+
"url": "https://www.cnblogs.com/guangzan",
|
|
8
|
+
"email": "guangzan1999@outlook.com"
|
|
9
|
+
},
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"homepage": "https://github.com/guangzan",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/guangzan/options.git"
|
|
15
|
+
},
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/guangzan/options/issues"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"博客园"
|
|
21
|
+
],
|
|
22
|
+
"sideEffects": false,
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"import": "./dist/index.mjs",
|
|
27
|
+
"require": "./dist/index.cjs"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"main": "./dist/index.cjs",
|
|
31
|
+
"module": "./dist/index.mjs",
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"typesVersions": {
|
|
34
|
+
"*": {
|
|
35
|
+
"*": [
|
|
36
|
+
"./dist/*",
|
|
37
|
+
"./dist/index.d.ts"
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"files": [
|
|
42
|
+
"dist"
|
|
43
|
+
],
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"tona": "1.0.1"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@types/node": "^25.0.3",
|
|
49
|
+
"tsdown": "latest",
|
|
50
|
+
"vitest": "^4.0.16"
|
|
51
|
+
},
|
|
52
|
+
"scripts": {
|
|
53
|
+
"dev": "tsdown --watch",
|
|
54
|
+
"build": "tsdown",
|
|
55
|
+
"test": "vitest",
|
|
56
|
+
"test:run": "vitest run"
|
|
57
|
+
}
|
|
58
|
+
}
|