wechat-md-publisher 0.2.2 → 0.2.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/dist/cli.js +0 -0
- package/package.json +13 -11
- package/themes/builtin/sports.css +78 -172
package/dist/cli.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wechat-md-publisher",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "全功能微信公众号 Markdown 发布工具 - 支持草稿、发布、删除和多主题",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -15,6 +15,16 @@
|
|
|
15
15
|
"README.md",
|
|
16
16
|
"LICENSE"
|
|
17
17
|
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"dev": "vite build --watch",
|
|
20
|
+
"build": "vite build && tsc",
|
|
21
|
+
"test": "vitest",
|
|
22
|
+
"test:unit": "vitest run tests/unit",
|
|
23
|
+
"test:integration": "vitest run tests/integration",
|
|
24
|
+
"lint": "eslint src --ext .ts",
|
|
25
|
+
"format": "prettier --write \"src/**/*.ts\"",
|
|
26
|
+
"prepublishOnly": "pnpm build"
|
|
27
|
+
},
|
|
18
28
|
"keywords": [
|
|
19
29
|
"wechat",
|
|
20
30
|
"weixin",
|
|
@@ -35,6 +45,7 @@
|
|
|
35
45
|
"url": "https://github.com/sipingme/wechat-md-publisher/issues"
|
|
36
46
|
},
|
|
37
47
|
"homepage": "https://github.com/sipingme/wechat-md-publisher#readme",
|
|
48
|
+
"packageManager": "pnpm@10.7.1",
|
|
38
49
|
"dependencies": {
|
|
39
50
|
"@wenyan-md/core": "^2.0.8",
|
|
40
51
|
"commander": "^12.1.0",
|
|
@@ -65,14 +76,5 @@
|
|
|
65
76
|
"jsdom": "^27.4.0",
|
|
66
77
|
"form-data-encoder": "^4.1.0",
|
|
67
78
|
"formdata-node": "^6.0.3"
|
|
68
|
-
},
|
|
69
|
-
"scripts": {
|
|
70
|
-
"dev": "vite build --watch",
|
|
71
|
-
"build": "vite build && tsc",
|
|
72
|
-
"test": "vitest",
|
|
73
|
-
"test:unit": "vitest run tests/unit",
|
|
74
|
-
"test:integration": "vitest run tests/integration",
|
|
75
|
-
"lint": "eslint src --ext .ts",
|
|
76
|
-
"format": "prettier --write \"src/**/*.ts\""
|
|
77
79
|
}
|
|
78
|
-
}
|
|
80
|
+
}
|
|
@@ -1,237 +1,143 @@
|
|
|
1
|
-
/* Sports Theme -
|
|
2
|
-
*
|
|
3
|
-
* 主色调:#00A968 (翠绿色)
|
|
1
|
+
/* * Sports Theme - Optimized for WeChat
|
|
2
|
+
* 优化点:1. 解决伪元素失效 2. 修正 Strong 布局 3. 增强移动端对比度
|
|
4
3
|
*/
|
|
5
4
|
|
|
6
5
|
#wenyan {
|
|
7
6
|
font-size: 15px;
|
|
8
|
-
line-height: 1.
|
|
7
|
+
line-height: 1.7; /* 稍微压缩,增强运动紧凑感 */
|
|
9
8
|
color: #2c2c2c;
|
|
10
9
|
background-color: #ffffff;
|
|
11
|
-
padding:
|
|
12
|
-
max-width:
|
|
10
|
+
padding: 10px; /* 微信内边距不宜过大,防止撑破容器 */
|
|
11
|
+
max-width: 100%;
|
|
13
12
|
margin: 0 auto;
|
|
14
|
-
|
|
13
|
+
word-wrap: break-word;
|
|
14
|
+
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
/* 一级标题 -
|
|
17
|
+
/* 一级标题 - 运动胶囊风格 */
|
|
18
18
|
#wenyan h1 {
|
|
19
|
-
padding:
|
|
20
|
-
margin:
|
|
19
|
+
padding: 10px 20px;
|
|
20
|
+
margin: 25px 5px 15px;
|
|
21
21
|
color: #ffffff;
|
|
22
|
-
font-size:
|
|
23
|
-
font-weight:
|
|
22
|
+
font-size: 20px;
|
|
23
|
+
font-weight: bold;
|
|
24
24
|
text-align: center;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
box-shadow: 0 8px 20px rgba(0, 169, 104, 0.3);
|
|
30
|
-
text-transform: uppercase;
|
|
25
|
+
background-color: #00A968; /* 兜底色 */
|
|
26
|
+
background: linear-gradient(90deg, #00A968, #008A56);
|
|
27
|
+
border-radius: 30px;
|
|
28
|
+
box-shadow: 0 4px 12px rgba(0, 169, 104, 0.2);
|
|
31
29
|
}
|
|
32
30
|
|
|
33
|
-
/* 二级标题 -
|
|
31
|
+
/* 二级标题 - 侧边能量条 */
|
|
34
32
|
#wenyan h2 {
|
|
35
|
-
padding:
|
|
36
|
-
margin:
|
|
37
|
-
font-size:
|
|
38
|
-
font-weight:
|
|
39
|
-
text-align: left;
|
|
40
|
-
letter-spacing: 0.06em;
|
|
41
|
-
line-height: 1.4;
|
|
33
|
+
padding: 6px 15px;
|
|
34
|
+
margin: 20px 0 10px;
|
|
35
|
+
font-size: 18px;
|
|
36
|
+
font-weight: bold;
|
|
42
37
|
color: #00A968;
|
|
43
|
-
background:
|
|
44
|
-
border-left:
|
|
45
|
-
border-radius: 0
|
|
46
|
-
box-shadow: 0 3px 8px rgba(0, 169, 104, 0.12);
|
|
47
|
-
text-transform: uppercase;
|
|
38
|
+
background-color: #f0f9f5; /* 替代渐变,兼容性更好 */
|
|
39
|
+
border-left: 5px solid #00A968;
|
|
40
|
+
border-radius: 0 8px 8px 0;
|
|
48
41
|
}
|
|
49
42
|
|
|
50
|
-
/* 三级标题
|
|
43
|
+
/* 三级标题 */
|
|
51
44
|
#wenyan h3 {
|
|
52
|
-
padding:
|
|
53
|
-
margin:
|
|
45
|
+
padding: 4px 12px;
|
|
46
|
+
margin: 15px 0 10px;
|
|
54
47
|
color: #00A968;
|
|
55
|
-
font-size:
|
|
56
|
-
font-weight:
|
|
57
|
-
|
|
58
|
-
letter-spacing: 0.08em;
|
|
59
|
-
border-left: 4px solid #00A968;
|
|
60
|
-
background: linear-gradient(to right, rgba(255, 102, 0, 0.05), rgba(0, 169, 104, 0.05));
|
|
61
|
-
border-radius: 0 25px 25px 0;
|
|
48
|
+
font-size: 16px;
|
|
49
|
+
font-weight: bold;
|
|
50
|
+
border-left: 3px solid #00A968;
|
|
62
51
|
}
|
|
63
52
|
|
|
64
|
-
/* 段落 */
|
|
53
|
+
/* 段落 - 修正对齐方式 */
|
|
65
54
|
#wenyan p {
|
|
66
|
-
margin:
|
|
67
|
-
text-align: justify
|
|
68
|
-
line-height: 1.
|
|
55
|
+
margin: 1em 0;
|
|
56
|
+
text-align: left; /* 移动端 justify 容易导致间隙过大,建议居左 */
|
|
57
|
+
line-height: 1.7;
|
|
69
58
|
}
|
|
70
59
|
|
|
71
|
-
/* 加粗 -
|
|
60
|
+
/* 加粗 - 关键优化:不再使用 padding 防止撑开行高 */
|
|
72
61
|
#wenyan strong {
|
|
73
|
-
font-weight:
|
|
74
|
-
|
|
75
|
-
-
|
|
76
|
-
-webkit-text-fill-color: transparent;
|
|
77
|
-
background-clip: text;
|
|
62
|
+
font-weight: bold;
|
|
63
|
+
color: #00A968;
|
|
64
|
+
border-bottom: 1px solid rgba(0, 169, 104, 0.3);
|
|
78
65
|
}
|
|
79
66
|
|
|
80
67
|
/* 斜体 */
|
|
81
68
|
#wenyan em {
|
|
82
|
-
color: #
|
|
69
|
+
color: #555;
|
|
83
70
|
font-style: italic;
|
|
84
|
-
font-weight: 500;
|
|
85
71
|
}
|
|
86
72
|
|
|
87
|
-
/* 行内代码 */
|
|
73
|
+
/* 行内代码 - 简化渐变 */
|
|
88
74
|
#wenyan code {
|
|
89
|
-
font-size:
|
|
75
|
+
font-size: 13px;
|
|
90
76
|
color: #00A968;
|
|
91
|
-
background:
|
|
92
|
-
padding:
|
|
93
|
-
border-radius:
|
|
94
|
-
font-family:
|
|
77
|
+
background-color: #f3f3f3;
|
|
78
|
+
padding: 2px 4px;
|
|
79
|
+
border-radius: 3px;
|
|
80
|
+
font-family: Consolas, Monaco, monospace;
|
|
95
81
|
}
|
|
96
82
|
|
|
97
|
-
/* 代码块 */
|
|
83
|
+
/* 代码块 - 强化暗色动感 */
|
|
98
84
|
#wenyan pre {
|
|
99
|
-
font-size:
|
|
100
|
-
|
|
85
|
+
font-size: 13px;
|
|
86
|
+
background-color: #2d2d2d;
|
|
87
|
+
color: #ddd;
|
|
88
|
+
padding: 15px;
|
|
101
89
|
border-radius: 8px;
|
|
102
|
-
|
|
103
|
-
line-height: 1.6;
|
|
90
|
+
border-left: 5px solid #00A968;
|
|
104
91
|
margin: 1.5em 0;
|
|
105
|
-
|
|
106
|
-
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
#wenyan pre code {
|
|
110
|
-
background: none;
|
|
111
|
-
padding: 0;
|
|
112
|
-
font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, Menlo, monospace;
|
|
113
|
-
font-size: 14px;
|
|
114
|
-
color: #2c2c2c;
|
|
115
|
-
line-height: 1.6;
|
|
92
|
+
overflow-x: auto;
|
|
116
93
|
}
|
|
117
94
|
|
|
118
95
|
/* 引用块 */
|
|
119
96
|
#wenyan blockquote {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
color: #
|
|
124
|
-
background: #f8f8f8;
|
|
125
|
-
border-radius: 0 8px 8px 0;
|
|
126
|
-
margin: 1.8em 0;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
#wenyan blockquote p {
|
|
130
|
-
margin: 0;
|
|
131
|
-
color: #3c3c3e;
|
|
132
|
-
line-height: 1.8;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/* 无序列表 */
|
|
136
|
-
#wenyan ul {
|
|
137
|
-
list-style: none;
|
|
138
|
-
padding: 0;
|
|
97
|
+
padding: 10px 15px;
|
|
98
|
+
border-left: 4px solid #ddd;
|
|
99
|
+
color: #666;
|
|
100
|
+
background-color: #f9f9f9;
|
|
139
101
|
margin: 1.5em 0;
|
|
140
102
|
}
|
|
141
103
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
padding:
|
|
145
|
-
|
|
104
|
+
/* 列表 - 关键修改:微信不支持伪元素 content,建议通过插件在 HTML 层面解决 */
|
|
105
|
+
#wenyan ul, #wenyan ol {
|
|
106
|
+
padding-left: 20px;
|
|
107
|
+
margin: 1em 0;
|
|
146
108
|
}
|
|
147
109
|
|
|
148
|
-
#wenyan
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
font-weight: bold;
|
|
152
|
-
margin-right: 0.5em;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
/* 有序列表 */
|
|
156
|
-
#wenyan ol {
|
|
157
|
-
list-style: none;
|
|
158
|
-
padding: 0;
|
|
159
|
-
margin: 1.5em 0;
|
|
160
|
-
counter-reset: list-counter;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
#wenyan ol li {
|
|
164
|
-
margin: 0.6em 0;
|
|
165
|
-
padding: 0;
|
|
166
|
-
line-height: 1.8;
|
|
167
|
-
counter-increment: list-counter;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
#wenyan ol li::before {
|
|
171
|
-
content: counter(list-counter) ". ";
|
|
172
|
-
color: #00A968;
|
|
173
|
-
font-weight: bold;
|
|
174
|
-
margin-right: 0.5em;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
/* 链接 */
|
|
178
|
-
#wenyan a {
|
|
179
|
-
color: #00A968;
|
|
180
|
-
text-decoration: none;
|
|
181
|
-
border-bottom: 1px solid #00A968;
|
|
182
|
-
transition: all 0.3s ease;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
#wenyan a:hover {
|
|
186
|
-
color: #008A56;
|
|
187
|
-
border-bottom-color: #008A56;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
/* 图片 */
|
|
191
|
-
#wenyan img {
|
|
192
|
-
max-width: 100%;
|
|
193
|
-
height: auto;
|
|
194
|
-
border-radius: 8px;
|
|
195
|
-
margin: 1.5em 0;
|
|
196
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
110
|
+
#wenyan li {
|
|
111
|
+
margin: 0.5em 0;
|
|
112
|
+
line-height: 1.6;
|
|
197
113
|
}
|
|
198
114
|
|
|
199
|
-
/* 表格 */
|
|
115
|
+
/* 表格 - 去掉阴影,强化边框 */
|
|
200
116
|
#wenyan table {
|
|
117
|
+
display: table;
|
|
201
118
|
width: 100%;
|
|
202
119
|
border-collapse: collapse;
|
|
203
|
-
margin: 1.
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
|
|
207
|
-
border: 2px solid transparent;
|
|
120
|
+
margin: 1.5em 0;
|
|
121
|
+
font-size: 14px;
|
|
122
|
+
border: 1px solid #eee;
|
|
208
123
|
}
|
|
209
124
|
|
|
210
125
|
#wenyan table th {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
color: #00A968;
|
|
216
|
-
border-bottom: 2px solid rgba(255, 102, 0, 0.2);
|
|
217
|
-
text-transform: uppercase;
|
|
218
|
-
letter-spacing: 0.04em;
|
|
126
|
+
background-color: #00A968;
|
|
127
|
+
color: #fff;
|
|
128
|
+
padding: 8px;
|
|
129
|
+
text-align: center;
|
|
219
130
|
}
|
|
220
131
|
|
|
221
132
|
#wenyan table td {
|
|
222
|
-
padding:
|
|
223
|
-
border-bottom: 1px solid
|
|
224
|
-
color: #2c2c2c;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
#wenyan table tr:last-child td {
|
|
228
|
-
border-bottom: none;
|
|
133
|
+
padding: 8px;
|
|
134
|
+
border-bottom: 1px solid #eee;
|
|
229
135
|
}
|
|
230
136
|
|
|
231
137
|
/* 分割线 */
|
|
232
138
|
#wenyan hr {
|
|
233
|
-
height:
|
|
139
|
+
height: 1px;
|
|
234
140
|
border: none;
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
}
|
|
141
|
+
border-top: 1px dashed #00A968;
|
|
142
|
+
margin: 2em 0;
|
|
143
|
+
}
|