vitepress-plugin-filelist 0.6.2 → 0.7.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/README.md +28 -2
- package/dist/client/browser/index.d.ts +35 -1
- package/dist/client/browser/index.js +622 -214
- package/dist/client/ssr/index.d.ts +35 -1
- package/dist/client/ssr/index.js +362 -23
- package/dist/client/style.css +175 -1
- package/package.json +8 -2
package/dist/client/style.css
CHANGED
|
@@ -868,6 +868,94 @@
|
|
|
868
868
|
border-color: transparent;
|
|
869
869
|
}
|
|
870
870
|
|
|
871
|
+
/* ---------------- filter and deep search ---------------- */
|
|
872
|
+
|
|
873
|
+
.fl-hit {
|
|
874
|
+
padding: 0 1px;
|
|
875
|
+
color: inherit;
|
|
876
|
+
background: var(--fl-hit-bg, rgb(250 204 21 / 32%));
|
|
877
|
+
border-radius: 3px;
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
.fl-search-clear {
|
|
881
|
+
display: inline-flex;
|
|
882
|
+
flex: none;
|
|
883
|
+
align-items: center;
|
|
884
|
+
justify-content: center;
|
|
885
|
+
width: 20px;
|
|
886
|
+
height: 20px;
|
|
887
|
+
padding: 0;
|
|
888
|
+
color: var(--vp-c-text-2);
|
|
889
|
+
cursor: pointer;
|
|
890
|
+
background: var(--vp-c-default-soft);
|
|
891
|
+
border: 0;
|
|
892
|
+
border-radius: 50%;
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
.fl-search-clear:hover {
|
|
896
|
+
color: var(--vp-c-text-1);
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
/* the status line closing a filtered list: centred, wraps, never overflows */
|
|
900
|
+
.fl-deep {
|
|
901
|
+
position: relative;
|
|
902
|
+
padding: 10px 16px;
|
|
903
|
+
text-align: center;
|
|
904
|
+
background: var(--vp-c-bg-soft);
|
|
905
|
+
border-bottom: 1px solid var(--vp-c-divider);
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
.fl-deep-text {
|
|
909
|
+
margin: 0;
|
|
910
|
+
font-size: 13px;
|
|
911
|
+
line-height: 1.6;
|
|
912
|
+
color: var(--vp-c-text-2);
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
.fl-deep-link {
|
|
916
|
+
padding: 0;
|
|
917
|
+
font: inherit;
|
|
918
|
+
font-weight: 600;
|
|
919
|
+
color: var(--vp-c-brand-1);
|
|
920
|
+
text-decoration: underline;
|
|
921
|
+
text-underline-offset: 3px;
|
|
922
|
+
cursor: pointer;
|
|
923
|
+
background: none;
|
|
924
|
+
border: 0;
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
.fl-deep-link:hover {
|
|
928
|
+
color: var(--vp-c-brand-2);
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
.fl-locked-note {
|
|
932
|
+
font-size: 12px;
|
|
933
|
+
color: var(--fl-lock-fg);
|
|
934
|
+
white-space: nowrap;
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
.fl-locked-hint {
|
|
938
|
+
margin-left: 8px;
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
.fl-deep-bar {
|
|
942
|
+
position: absolute;
|
|
943
|
+
bottom: -1px;
|
|
944
|
+
left: 0;
|
|
945
|
+
width: 30%;
|
|
946
|
+
height: 2px;
|
|
947
|
+
background: var(--vp-c-brand-1);
|
|
948
|
+
animation: fl-progress 1.2s ease-in-out infinite;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
@media (prefers-reduced-motion: reduce) {
|
|
952
|
+
.fl-deep-bar {
|
|
953
|
+
width: 100%;
|
|
954
|
+
animation: none;
|
|
955
|
+
opacity: 0.6;
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
|
|
871
959
|
/* ---------------- confirm dialog ---------------- */
|
|
872
960
|
|
|
873
961
|
.fl-confirm {
|
|
@@ -931,7 +1019,31 @@
|
|
|
931
1019
|
flex: 1 1 auto;
|
|
932
1020
|
width: auto;
|
|
933
1021
|
height: 40px;
|
|
934
|
-
padding: 0 12px;
|
|
1022
|
+
padding: 0 4px 0 12px;
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
.fl-search-clear {
|
|
1026
|
+
width: 36px;
|
|
1027
|
+
height: 36px;
|
|
1028
|
+
background: transparent;
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
.fl-deep {
|
|
1032
|
+
padding: 12px 16px;
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
.fl-deep-text {
|
|
1036
|
+
font-size: 14px;
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
/* a taller tap target without changing the line */
|
|
1040
|
+
.fl-deep-link {
|
|
1041
|
+
padding: 10px 2px;
|
|
1042
|
+
margin: -10px 0;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
.fl-locked-hint {
|
|
1046
|
+
display: none;
|
|
935
1047
|
}
|
|
936
1048
|
|
|
937
1049
|
/* 16px keeps iOS Safari from zooming in on focus */
|
|
@@ -1316,6 +1428,62 @@
|
|
|
1316
1428
|
background: var(--vp-c-default-soft);
|
|
1317
1429
|
}
|
|
1318
1430
|
|
|
1431
|
+
/* Markdown / HTML: source or rendered */
|
|
1432
|
+
.fl-preview-view {
|
|
1433
|
+
display: inline-flex;
|
|
1434
|
+
padding: 2px;
|
|
1435
|
+
margin-left: 6px;
|
|
1436
|
+
background: var(--vp-c-default-soft);
|
|
1437
|
+
border-radius: 8px;
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
.fl-preview-view-btn {
|
|
1441
|
+
height: 28px;
|
|
1442
|
+
padding: 0 10px;
|
|
1443
|
+
font-size: 12px;
|
|
1444
|
+
color: var(--vp-c-text-2);
|
|
1445
|
+
cursor: pointer;
|
|
1446
|
+
background: transparent;
|
|
1447
|
+
border: 0;
|
|
1448
|
+
border-radius: 6px;
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
.fl-preview-view-btn[aria-pressed='true'] {
|
|
1452
|
+
font-weight: 600;
|
|
1453
|
+
color: var(--vp-c-text-1);
|
|
1454
|
+
background: var(--vp-c-bg);
|
|
1455
|
+
box-shadow: 0 1px 2px rgb(0 0 0 / 12%);
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
.fl-preview-rendered {
|
|
1459
|
+
display: flex;
|
|
1460
|
+
flex-direction: column;
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
.fl-preview .fl-md {
|
|
1464
|
+
box-sizing: border-box;
|
|
1465
|
+
max-width: 860px;
|
|
1466
|
+
padding: 16px 24px 32px;
|
|
1467
|
+
margin: 0 auto;
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
.fl-md-image {
|
|
1471
|
+
display: inline-block;
|
|
1472
|
+
padding: 2px 8px;
|
|
1473
|
+
font-size: 12px;
|
|
1474
|
+
color: var(--vp-c-text-2);
|
|
1475
|
+
border: 1px dashed var(--vp-c-divider);
|
|
1476
|
+
border-radius: 6px;
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
.fl-preview-html {
|
|
1480
|
+
flex: 1 1 auto;
|
|
1481
|
+
width: 100%;
|
|
1482
|
+
min-height: 0;
|
|
1483
|
+
background: #fff;
|
|
1484
|
+
border: 0;
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1319
1487
|
.fl-preview-count {
|
|
1320
1488
|
min-width: 44px;
|
|
1321
1489
|
font-size: 12px;
|
|
@@ -1487,6 +1655,12 @@
|
|
|
1487
1655
|
min-width: 36px;
|
|
1488
1656
|
}
|
|
1489
1657
|
|
|
1658
|
+
.fl-preview-view-btn {
|
|
1659
|
+
height: 36px;
|
|
1660
|
+
padding: 0 14px;
|
|
1661
|
+
font-size: 14px;
|
|
1662
|
+
}
|
|
1663
|
+
|
|
1490
1664
|
.fl-preview .fl-preview-head .fl-type {
|
|
1491
1665
|
display: none;
|
|
1492
1666
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitepress-plugin-filelist",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"packageManager": "pnpm@11.25.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "OpenList file browser for VitePress: tree view, batch ZIP download, i18n, password and token support.",
|
|
@@ -42,7 +42,9 @@
|
|
|
42
42
|
"typecheck": "vue-tsc --noEmit",
|
|
43
43
|
"test": "vitest run",
|
|
44
44
|
"test:watch": "vitest",
|
|
45
|
-
"pack:check": "npm pack --dry-run"
|
|
45
|
+
"pack:check": "npm pack --dry-run",
|
|
46
|
+
"test:e2e": "playwright test",
|
|
47
|
+
"e2e:site": "pnpm run build && pnpm --dir demo install --force && pnpm --dir demo run build:e2e"
|
|
46
48
|
},
|
|
47
49
|
"peerDependencies": {
|
|
48
50
|
"vitepress": "^1.0.0 || ^2.0.0-alpha.0",
|
|
@@ -50,9 +52,13 @@
|
|
|
50
52
|
},
|
|
51
53
|
"dependencies": {
|
|
52
54
|
"client-zip": "^2.5.1",
|
|
55
|
+
"dompurify": "^3.4.17",
|
|
56
|
+
"markdown-it": "^14.3.3",
|
|
53
57
|
"vitepress-tuck": "^0.12.2"
|
|
54
58
|
},
|
|
55
59
|
"devDependencies": {
|
|
60
|
+
"@playwright/test": "1.63.0",
|
|
61
|
+
"@types/markdown-it": "^14.2.0",
|
|
56
62
|
"@types/node": "^22.10.0",
|
|
57
63
|
"@vue/test-utils": "^2.5.1",
|
|
58
64
|
"happy-dom": "^21.0.4",
|