vitepress-plugin-filelist 0.3.1 → 0.4.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.
@@ -798,3 +798,256 @@
798
798
  padding: 10px 12px;
799
799
  }
800
800
  }
801
+
802
+ /* ---------------- preview dialog ---------------- */
803
+
804
+ .fl-preview {
805
+ /* themes (VitePress included) reset margin, which drops the UA centring */
806
+ position: fixed;
807
+ inset: 0;
808
+ box-sizing: border-box;
809
+ width: min(1100px, calc(100vw - 48px));
810
+ max-width: none;
811
+ height: min(820px, calc(100dvh - 48px));
812
+ max-height: none;
813
+ padding: 0;
814
+ overflow: hidden;
815
+ color: var(--vp-c-text-1);
816
+ background: var(--vp-c-bg);
817
+ border: 1px solid var(--vp-c-divider);
818
+ margin: auto;
819
+ border-radius: 14px;
820
+ box-shadow: 0 24px 64px rgb(0 0 0 / 28%);
821
+ }
822
+
823
+ .fl-preview::backdrop {
824
+ background: rgb(0 0 0 / 55%);
825
+ }
826
+
827
+ .fl-preview-panel {
828
+ display: flex;
829
+ flex-direction: column;
830
+ height: 100%;
831
+ }
832
+
833
+ .fl-preview-head {
834
+ display: flex;
835
+ flex: none;
836
+ gap: 10px;
837
+ align-items: center;
838
+ min-height: 56px;
839
+ box-sizing: border-box;
840
+ padding: 8px 8px 8px 16px;
841
+ border-bottom: 1px solid var(--vp-c-divider);
842
+ }
843
+
844
+ .fl-preview .fl-type {
845
+ width: 40px;
846
+ height: 22px;
847
+ font-size: 10px;
848
+ }
849
+
850
+ .fl-preview-title {
851
+ display: flex;
852
+ flex: 1 1 auto;
853
+ flex-direction: column;
854
+ min-width: 0;
855
+ }
856
+
857
+ .fl-preview-name {
858
+ overflow: hidden;
859
+ font-size: 15px;
860
+ text-overflow: ellipsis;
861
+ white-space: nowrap;
862
+ }
863
+
864
+ .fl-preview-meta {
865
+ font-size: 12px;
866
+ font-variant-numeric: tabular-nums;
867
+ color: var(--vp-c-text-2);
868
+ }
869
+
870
+ .fl-preview-tools {
871
+ display: flex;
872
+ flex: none;
873
+ gap: 2px;
874
+ align-items: center;
875
+ }
876
+
877
+ .fl-preview-tool {
878
+ display: inline-flex;
879
+ align-items: center;
880
+ justify-content: center;
881
+ width: 40px;
882
+ height: 40px;
883
+ padding: 0;
884
+ color: var(--vp-c-text-2);
885
+ cursor: pointer;
886
+ background: transparent;
887
+ border: 0;
888
+ border-radius: 10px;
889
+ transition: color 0.15s, background-color 0.15s;
890
+ }
891
+
892
+ .fl-preview-tool:hover,
893
+ .fl-preview-tool[aria-pressed='true'] {
894
+ color: var(--vp-c-brand-1);
895
+ background: var(--vp-c-default-soft);
896
+ }
897
+
898
+ .fl-preview-count {
899
+ min-width: 44px;
900
+ font-size: 12px;
901
+ font-variant-numeric: tabular-nums;
902
+ color: var(--vp-c-text-2);
903
+ text-align: center;
904
+ }
905
+
906
+ .fl-preview-body {
907
+ position: relative;
908
+ display: flex;
909
+ flex: 1 1 auto;
910
+ align-items: center;
911
+ justify-content: center;
912
+ min-height: 0;
913
+ overflow: auto;
914
+ background: var(--vp-c-bg-soft);
915
+ }
916
+
917
+ .fl-preview-status {
918
+ color: var(--vp-c-text-2);
919
+ }
920
+
921
+ .fl-preview-image {
922
+ max-width: 100%;
923
+ max-height: 100%;
924
+ object-fit: contain;
925
+ transition: transform 0.2s;
926
+ }
927
+
928
+ .fl-preview-image.fl-preview-actual {
929
+ max-width: none;
930
+ max-height: none;
931
+ margin: auto;
932
+ }
933
+
934
+ .fl-preview-video {
935
+ max-width: 100%;
936
+ max-height: 100%;
937
+ background: #000;
938
+ }
939
+
940
+ .fl-preview-audio {
941
+ width: min(560px, calc(100% - 32px));
942
+ }
943
+
944
+ .fl-preview-text {
945
+ align-self: stretch;
946
+ width: 100%;
947
+ overflow: auto;
948
+ background: var(--vp-c-bg);
949
+ }
950
+
951
+ .fl-preview-text pre {
952
+ box-sizing: border-box;
953
+ margin: 0;
954
+ padding: 16px 20px;
955
+ font-family: var(--vp-font-family-mono, ui-monospace, monospace);
956
+ font-size: 13px;
957
+ line-height: 1.6;
958
+ color: var(--vp-c-text-1);
959
+ white-space: pre-wrap;
960
+ overflow-wrap: anywhere;
961
+ background: transparent;
962
+ }
963
+
964
+ .fl-preview-note {
965
+ position: sticky;
966
+ top: 0;
967
+ margin: 0;
968
+ padding: 8px 20px;
969
+ font-size: 12px;
970
+ color: var(--vp-c-text-2);
971
+ background: var(--vp-c-bg-soft);
972
+ border-bottom: 1px solid var(--vp-c-divider);
973
+ }
974
+
975
+ .fl-preview-frame {
976
+ align-self: stretch;
977
+ width: 100%;
978
+ height: 100%;
979
+ border: 0;
980
+ background: #fff;
981
+ }
982
+
983
+ .fl-preview-info {
984
+ display: flex;
985
+ flex-direction: column;
986
+ gap: 14px;
987
+ align-items: center;
988
+ max-width: 420px;
989
+ padding: 32px 24px;
990
+ text-align: center;
991
+ }
992
+
993
+ .fl-preview .fl-preview-badge {
994
+ width: 72px;
995
+ height: 44px;
996
+ font-size: 15px;
997
+ border-radius: 10px;
998
+ }
999
+
1000
+ .fl-preview-message {
1001
+ margin: 0;
1002
+ font-size: 14px;
1003
+ line-height: 1.6;
1004
+ color: var(--vp-c-text-2);
1005
+ }
1006
+
1007
+ .fl-preview-info .fl-btn-primary {
1008
+ height: 40px;
1009
+ padding: 0 18px;
1010
+ font-size: 14px;
1011
+ border-radius: 10px;
1012
+ }
1013
+
1014
+ @media (max-width: 640px) {
1015
+ .fl-preview {
1016
+ width: 100vw;
1017
+ height: 100dvh;
1018
+ border: 0;
1019
+ border-radius: 0;
1020
+ }
1021
+
1022
+ .fl-preview-head {
1023
+ flex-wrap: wrap;
1024
+ gap: 0 8px;
1025
+ padding: 6px 4px 0 12px;
1026
+ }
1027
+
1028
+ .fl-preview-actions {
1029
+ margin-left: auto;
1030
+ }
1031
+
1032
+ /* navigation and image tools drop to a second row */
1033
+ .fl-preview-nav {
1034
+ order: 3;
1035
+ flex: 1 0 100%;
1036
+ justify-content: center;
1037
+ margin: 0 -4px 0 -12px;
1038
+ border-top: 1px solid var(--vp-c-divider);
1039
+ }
1040
+
1041
+ .fl-preview-tool {
1042
+ width: 44px;
1043
+ height: 44px;
1044
+ }
1045
+
1046
+ .fl-preview-count {
1047
+ min-width: 36px;
1048
+ }
1049
+
1050
+ .fl-preview .fl-preview-head .fl-type {
1051
+ display: none;
1052
+ }
1053
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vitepress-plugin-filelist",
3
- "version": "0.3.1",
3
+ "version": "0.4.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.",