create-kepo-plugin 1.0.9 → 1.0.11
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/index.js +11 -6
- package/package.json +2 -2
- package/template/src/tailwind.css +41 -2
package/index.js
CHANGED
|
@@ -246,18 +246,23 @@ async function init() {
|
|
|
246
246
|
'../template'
|
|
247
247
|
)
|
|
248
248
|
|
|
249
|
-
// 需要排除的 example
|
|
250
|
-
const exampleFiles = ['example.ts', 'Example.tsx']
|
|
249
|
+
// 需要排除的 example 文件列表(相对路径)
|
|
250
|
+
const exampleFiles = ['src/provider/example.ts', 'src/viewer/Example.tsx']
|
|
251
251
|
|
|
252
252
|
function copyDir(srcDir, destDir) {
|
|
253
253
|
fs.mkdirSync(destDir, { recursive: true })
|
|
254
254
|
for (const file of fs.readdirSync(srcDir)) {
|
|
255
|
-
// 如果启用 noExample 且文件在排除列表中,则跳过
|
|
256
|
-
if (noExample && exampleFiles.includes(file)) {
|
|
257
|
-
continue
|
|
258
|
-
}
|
|
259
255
|
const srcFile = path.resolve(srcDir, file)
|
|
260
256
|
const destFile = path.resolve(destDir, file)
|
|
257
|
+
|
|
258
|
+
// 计算相对于模板目录的路径
|
|
259
|
+
const relativePath = path.relative(templateDir, srcFile)
|
|
260
|
+
|
|
261
|
+
// 如果启用 noExample 且当前文件是 example 文件,则跳过
|
|
262
|
+
if (noExample && exampleFiles.includes(relativePath.replace(/\\/g, '/'))) {
|
|
263
|
+
continue
|
|
264
|
+
}
|
|
265
|
+
|
|
261
266
|
const stat = fs.statSync(srcFile)
|
|
262
267
|
if (stat.isDirectory()) {
|
|
263
268
|
copyDir(srcFile, destFile)
|
package/package.json
CHANGED
|
@@ -1,6 +1,45 @@
|
|
|
1
1
|
@tailwind base;
|
|
2
2
|
@tailwind components;
|
|
3
3
|
@tailwind utilities;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
|
|
5
|
+
/* ========== 滚动条样式系统 ========== */
|
|
6
|
+
|
|
7
|
+
/* 完全隐藏滚动条(默认推荐) */
|
|
8
|
+
.scrollbar-hidden {
|
|
9
|
+
-ms-overflow-style: none;
|
|
10
|
+
scrollbar-width: none;
|
|
11
|
+
}
|
|
12
|
+
.scrollbar-hidden::-webkit-scrollbar {
|
|
13
|
+
display: none;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* 极简细滚动条(4px,半透明,用户要求时使用) */
|
|
17
|
+
.scrollbar-thin {
|
|
18
|
+
scrollbar-width: thin;
|
|
19
|
+
scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
|
|
20
|
+
}
|
|
21
|
+
.scrollbar-thin::-webkit-scrollbar {
|
|
22
|
+
width: 4px;
|
|
23
|
+
height: 4px;
|
|
24
|
+
}
|
|
25
|
+
.scrollbar-thin::-webkit-scrollbar-track {
|
|
26
|
+
background: transparent;
|
|
27
|
+
}
|
|
28
|
+
.scrollbar-thin::-webkit-scrollbar-thumb {
|
|
29
|
+
background: rgba(0, 0, 0, 0.15);
|
|
30
|
+
border-radius: 9999px;
|
|
31
|
+
}
|
|
32
|
+
.scrollbar-thin::-webkit-scrollbar-thumb:hover {
|
|
33
|
+
background: rgba(0, 0, 0, 0.3);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* 暗色模式适配 */
|
|
37
|
+
.dark .scrollbar-thin {
|
|
38
|
+
scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
|
|
39
|
+
}
|
|
40
|
+
.dark .scrollbar-thin::-webkit-scrollbar-thumb {
|
|
41
|
+
background: rgba(255, 255, 255, 0.15);
|
|
42
|
+
}
|
|
43
|
+
.dark .scrollbar-thin::-webkit-scrollbar-thumb:hover {
|
|
44
|
+
background: rgba(255, 255, 255, 0.3);
|
|
6
45
|
}
|