vitepress-plugin-filelist 0.7.1 → 0.8.0

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.
@@ -771,6 +771,7 @@
771
771
  .fl-hint {
772
772
  margin: 6px 0 0;
773
773
  font-size: 12px;
774
+ line-height: 1.5;
774
775
  color: var(--vp-c-text-2);
775
776
  }
776
777
 
@@ -825,47 +826,138 @@
825
826
  /* ---------------- long folders ---------------- */
826
827
 
827
828
  .fl-more {
828
- background: var(--vp-c-bg-soft);
829
+ color: var(--vp-c-text-2);
829
830
  }
830
831
 
831
832
  .fl-more-cell {
832
833
  grid-column: 2 / -1;
833
- gap: 12px;
834
+ /* the same gaps as a file's name cell, so the tag and count line up with its type and name */
835
+ gap: 8px;
834
836
  align-self: stretch;
835
837
  }
836
838
 
837
- .fl-more-cell .fl-indent {
838
- /* line the row up with the folder's files (arrow + icon columns) */
839
- margin-right: 36px;
839
+ /* “⋯” in the file-type column: the size of .fl-type */
840
+ .fl-more-tag {
841
+ display: inline-flex;
842
+ flex: none;
843
+ align-items: center;
844
+ justify-content: center;
845
+ width: 34px;
846
+ height: 20px;
847
+ font-size: 13px;
848
+ font-weight: 700;
849
+ line-height: 1;
850
+ color: var(--vp-c-text-3);
851
+ letter-spacing: 1px;
852
+ background: var(--vp-c-default-soft);
853
+ border-radius: 4px;
840
854
  }
841
855
 
842
856
  .fl-more-count {
857
+ min-width: 0;
858
+ overflow: hidden;
843
859
  font-size: 13px;
844
- color: var(--vp-c-text-2);
860
+ text-overflow: ellipsis;
845
861
  white-space: nowrap;
846
862
  }
847
863
 
848
- .fl-more-btn {
864
+ /* the short forms are for narrow lists */
865
+ .fl-more-short {
866
+ display: none;
867
+ }
868
+
869
+ .fl-more-actions {
870
+ display: flex;
871
+ flex: none;
872
+ gap: 2px;
873
+ align-items: center;
874
+ margin-left: auto;
875
+ }
876
+
877
+ .fl-more-link {
849
878
  height: 28px;
850
- padding: 0 12px;
879
+ padding: 0 8px;
851
880
  font-size: 13px;
852
- font-weight: 600;
853
881
  color: var(--vp-c-brand-1);
854
882
  white-space: nowrap;
855
883
  cursor: pointer;
884
+ background: transparent;
885
+ border: 0;
886
+ border-radius: 6px;
887
+ }
888
+
889
+ .fl-more-all {
890
+ font-weight: 600;
891
+ }
892
+
893
+ /* hover only where there is a pointer, so a tap does not leave a mark behind */
894
+ @media (hover: hover) {
895
+ .fl-more-link:hover,
896
+ .fl-pin-less:hover {
897
+ background: var(--vp-c-default-soft);
898
+ }
899
+ }
900
+
901
+ /* the folder row pinned at the top while scrolling through a long folder */
902
+ .fl-pin-anchor {
903
+ position: sticky;
904
+ top: calc(var(--fl-sticky) + var(--fl-pin-offset, 0px));
905
+ z-index: 5;
906
+ height: 0;
907
+ }
908
+
909
+ .fl-pin {
910
+ position: absolute;
911
+ inset: 0 0 auto;
912
+ display: grid;
913
+ grid-template-columns: 40px minmax(0, 1fr) auto;
914
+ align-items: center;
915
+ min-height: var(--fl-row-h);
916
+ padding: 0 8px;
856
917
  background: var(--vp-c-bg);
857
- border: 1px solid var(--vp-c-brand-soft);
858
- border-radius: 7px;
918
+ border-bottom: 1px solid var(--vp-c-divider);
919
+ box-shadow: 0 6px 12px -8px rgb(0 0 0 / 25%);
859
920
  }
860
921
 
861
- .fl-more-btn:hover {
862
- border-color: var(--vp-c-brand-1);
922
+ .fl-pin-arrow {
923
+ display: inline-flex;
924
+ flex: none;
925
+ align-items: center;
926
+ justify-content: center;
927
+ width: 18px;
928
+ color: var(--vp-c-text-2);
929
+ transform: rotate(90deg);
863
930
  }
864
931
 
865
- .fl-more-all {
866
- font-weight: 400;
867
- background: transparent;
868
- border-color: transparent;
932
+ .fl-pin-name {
933
+ min-width: 0;
934
+ overflow: hidden;
935
+ font-weight: 500;
936
+ text-overflow: ellipsis;
937
+ white-space: nowrap;
938
+ }
939
+
940
+ .fl-pin-count {
941
+ flex: none;
942
+ font-size: 12px;
943
+ color: var(--vp-c-text-2);
944
+ white-space: nowrap;
945
+ }
946
+
947
+ .fl-pin-less {
948
+ display: inline-flex;
949
+ gap: 4px;
950
+ align-items: center;
951
+ height: 26px;
952
+ padding: 0 10px;
953
+ font-size: 12px;
954
+ font-weight: 600;
955
+ color: var(--vp-c-brand-1);
956
+ white-space: nowrap;
957
+ cursor: pointer;
958
+ background: var(--vp-c-brand-soft);
959
+ border: 0;
960
+ border-radius: 13px;
869
961
  }
870
962
 
871
963
  /* ---------------- filter and deep search ---------------- */
@@ -899,14 +991,18 @@
899
991
  /* the status line closing a filtered list: centred, wraps, never overflows */
900
992
  .fl-deep {
901
993
  position: relative;
902
- padding: 10px 16px;
994
+ display: flex;
995
+ align-items: center;
996
+ justify-content: center;
997
+ box-sizing: border-box;
998
+ min-height: 40px;
999
+ padding: 8px 16px;
903
1000
  text-align: center;
904
1001
  background: var(--vp-c-bg-soft);
905
1002
  border-bottom: 1px solid var(--vp-c-divider);
906
1003
  }
907
1004
 
908
1005
  .fl-deep-text {
909
- margin: 0;
910
1006
  font-size: 13px;
911
1007
  line-height: 1.6;
912
1008
  color: var(--vp-c-text-2);
@@ -981,6 +1077,7 @@
981
1077
  .fl-confirm-title {
982
1078
  margin: 0 0 10px;
983
1079
  font-size: 16px;
1080
+ line-height: 1.5;
984
1081
  font-weight: 600;
985
1082
  }
986
1083
 
@@ -1029,7 +1126,7 @@
1029
1126
  }
1030
1127
 
1031
1128
  .fl-deep {
1032
- padding: 12px 16px;
1129
+ min-height: 48px;
1033
1130
  }
1034
1131
 
1035
1132
  .fl-deep-text {
@@ -1038,8 +1135,8 @@
1038
1135
 
1039
1136
  /* a taller tap target without changing the line */
1040
1137
  .fl-deep-link {
1041
- padding: 10px 2px;
1042
- margin: -10px 0;
1138
+ padding: 11px 2px;
1139
+ margin: -11px 0;
1043
1140
  }
1044
1141
 
1045
1142
  .fl-locked-hint {
@@ -1121,31 +1218,63 @@
1121
1218
  border-radius: 10px;
1122
1219
  }
1123
1220
 
1124
- .fl-more-cell {
1125
- gap: 4px;
1126
- }
1127
-
1128
- .fl-more-cell .fl-indent {
1129
- margin-right: 10px;
1221
+ .fl-more-tag {
1222
+ width: 36px;
1223
+ height: 22px;
1130
1224
  }
1131
1225
 
1132
1226
  .fl-more-count {
1133
1227
  flex: 1 1 auto;
1134
1228
  }
1135
1229
 
1136
- .fl-more-btn {
1137
- height: 44px;
1138
- padding: 0 12px;
1230
+ .fl-more-long {
1231
+ display: none;
1232
+ }
1233
+
1234
+ .fl-more-short {
1235
+ display: inline;
1236
+ }
1237
+
1238
+ /* smaller to look at, still a 44px target */
1239
+ .fl-more-link {
1240
+ position: relative;
1241
+ height: 32px;
1242
+ padding: 0 10px;
1139
1243
  font-size: 14px;
1140
- border-radius: 10px;
1141
1244
  }
1142
1245
 
1143
- .fl-more-page {
1246
+ .fl-more-link::after {
1247
+ position: absolute;
1248
+ inset: -6px 0;
1249
+ content: '';
1250
+ }
1251
+
1252
+ .fl-pin {
1253
+ grid-template-columns: 44px minmax(0, 1fr) auto;
1254
+ padding: 0 8px 0 0;
1255
+ }
1256
+
1257
+ .fl-pin-count {
1144
1258
  display: none;
1145
1259
  }
1146
1260
 
1261
+ .fl-pin-less {
1262
+ position: relative;
1263
+ height: 32px;
1264
+ padding: 0 12px;
1265
+ font-size: 13px;
1266
+ border-radius: 16px;
1267
+ }
1268
+
1269
+ .fl-pin-less::after {
1270
+ position: absolute;
1271
+ inset: -6px 0;
1272
+ content: '';
1273
+ }
1274
+
1147
1275
  /* rows (container queries cannot restyle .fl-root itself) */
1148
- .fl-row {
1276
+ .fl-row,
1277
+ .fl-pin {
1149
1278
  --fl-indent: 16px;
1150
1279
  --fl-row-h: 56px;
1151
1280
  --fl-cols: 44px minmax(0, 1fr) auto;
@@ -1215,6 +1344,7 @@
1215
1344
 
1216
1345
  .fl-arrow,
1217
1346
  .fl-arrow-placeholder,
1347
+ .fl-pin-arrow,
1218
1348
  .fl-count {
1219
1349
  display: none;
1220
1350
  }
@@ -1556,6 +1686,7 @@
1556
1686
  margin: 0;
1557
1687
  padding: 8px 20px;
1558
1688
  font-size: 12px;
1689
+ line-height: 1.5;
1559
1690
  color: var(--vp-c-text-2);
1560
1691
  background: var(--vp-c-bg-soft);
1561
1692
  border-bottom: 1px solid var(--vp-c-divider);
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "vitepress-plugin-filelist",
3
- "version": "0.7.1",
3
+ "version": "0.8.0",
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.",
7
7
  "author": "nrjycyd",
8
8
  "license": "MIT",
9
- "homepage": "https://github.com/nrjycyd/vitepress-plugin-filelist#readme",
9
+ "homepage": "https://nrjycyd.github.io/vitepress-plugin-filelist/",
10
10
  "repository": {
11
11
  "type": "git",
12
12
  "url": "git+https://github.com/nrjycyd/vitepress-plugin-filelist.git"