@umijs/plugin-docs 4.0.0-rc.1 → 4.0.0-rc.4
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/client/theme-blog/index.ts +1 -0
- package/client/theme-doc/LangSwitch.tsx +1 -1
- package/client/theme-doc/Layout.tsx +46 -5
- package/client/theme-doc/Logo.tsx +7 -3
- package/client/theme-doc/ThemeSwitch.tsx +2 -2
- package/client/theme-doc/Toc.tsx +8 -2
- package/client/theme-doc/components/Announcement.tsx +7 -0
- package/client/theme-doc/components/FeatureItem.tsx +48 -0
- package/client/theme-doc/components/Features.tsx +44 -0
- package/client/theme-doc/components/Hero.tsx +10 -7
- package/client/theme-doc/components/Message.tsx +22 -16
- package/client/theme-doc/context.ts +1 -0
- package/client/theme-doc/firefox-polyfill.css +32 -0
- package/client/theme-doc/index.ts +4 -1
- package/client/theme-doc/tailwind.css +89 -5
- package/client/theme-doc/tailwind.out.css +333 -57
- package/client/theme-doc/useLanguage.ts +5 -3
- package/dist/compiler.d.ts +1 -1
- package/dist/compiler.js +13 -13
- package/dist/index.js +54 -18
- package/package.json +20 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
! tailwindcss v3.0.
|
|
2
|
+
! tailwindcss v3.0.23 | MIT License | https://tailwindcss.com
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
/*
|
|
@@ -502,6 +502,123 @@ Ensure the default browser behavior of the `hidden` attribute.
|
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
504
|
|
|
505
|
+
.features {
|
|
506
|
+
background-image: radial-gradient(#f8f8f5 20%, transparent 20%);
|
|
507
|
+
background-color: white;
|
|
508
|
+
background-size: 6px 6px;
|
|
509
|
+
width: 100%;
|
|
510
|
+
-ms-overflow-style: none;
|
|
511
|
+
scrollbar-width: none;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
.features::-webkit-scrollbar {
|
|
515
|
+
display: none;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
.mdx-message {
|
|
519
|
+
border-left-width: 8px;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.mdx-message > p {
|
|
523
|
+
margin-top: 0px;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
.mdx-message-info {
|
|
527
|
+
--tw-border-opacity: 1;
|
|
528
|
+
border-color: rgb(147 197 253 / var(--tw-border-opacity));
|
|
529
|
+
--tw-bg-opacity: 1;
|
|
530
|
+
background-color: rgb(239 246 255 / var(--tw-bg-opacity));
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
.dark .mdx-message-info {
|
|
534
|
+
--tw-border-opacity: 1;
|
|
535
|
+
border-color: rgb(59 130 246 / var(--tw-border-opacity));
|
|
536
|
+
--tw-bg-opacity: 1;
|
|
537
|
+
background-color: rgb(219 234 254 / var(--tw-bg-opacity));
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
.mdx-message-info > p {
|
|
541
|
+
--tw-text-opacity: 1;
|
|
542
|
+
color: rgb(30 58 138 / var(--tw-text-opacity));
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
.dark .mdx-message-info > p {
|
|
546
|
+
--tw-text-opacity: 1;
|
|
547
|
+
color: rgb(30 58 138 / var(--tw-text-opacity));
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
.mdx-message-success {
|
|
551
|
+
--tw-border-opacity: 1;
|
|
552
|
+
border-color: rgb(134 239 172 / var(--tw-border-opacity));
|
|
553
|
+
--tw-bg-opacity: 1;
|
|
554
|
+
background-color: rgb(240 253 244 / var(--tw-bg-opacity));
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
.dark .mdx-message-success {
|
|
558
|
+
--tw-border-opacity: 1;
|
|
559
|
+
border-color: rgb(34 197 94 / var(--tw-border-opacity));
|
|
560
|
+
--tw-bg-opacity: 1;
|
|
561
|
+
background-color: rgb(220 252 231 / var(--tw-bg-opacity));
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
.mdx-message-success > p {
|
|
565
|
+
--tw-text-opacity: 1;
|
|
566
|
+
color: rgb(20 83 45 / var(--tw-text-opacity));
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
.dark .mdx-message-success > p {
|
|
570
|
+
--tw-text-opacity: 1;
|
|
571
|
+
color: rgb(20 83 45 / var(--tw-text-opacity));
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
.mdx-message-warning {
|
|
575
|
+
--tw-border-opacity: 1;
|
|
576
|
+
border-color: rgb(253 186 116 / var(--tw-border-opacity));
|
|
577
|
+
--tw-bg-opacity: 1;
|
|
578
|
+
background-color: rgb(255 247 237 / var(--tw-bg-opacity));
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
.dark .mdx-message-warning {
|
|
582
|
+
--tw-border-opacity: 1;
|
|
583
|
+
border-color: rgb(249 115 22 / var(--tw-border-opacity));
|
|
584
|
+
--tw-bg-opacity: 1;
|
|
585
|
+
background-color: rgb(255 237 213 / var(--tw-bg-opacity));
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
.mdx-message-warning > p {
|
|
589
|
+
--tw-text-opacity: 1;
|
|
590
|
+
color: rgb(124 45 18 / var(--tw-text-opacity));
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.dark .mdx-message-warning > p {
|
|
594
|
+
--tw-text-opacity: 1;
|
|
595
|
+
color: rgb(124 45 18 / var(--tw-text-opacity));
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
.mdx-message-error {
|
|
599
|
+
--tw-border-opacity: 1;
|
|
600
|
+
border-color: rgb(252 165 165 / var(--tw-border-opacity));
|
|
601
|
+
--tw-bg-opacity: 1;
|
|
602
|
+
background-color: rgb(254 242 242 / var(--tw-bg-opacity));
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
.dark .mdx-message-error {
|
|
606
|
+
--tw-border-opacity: 1;
|
|
607
|
+
border-color: rgb(239 68 68 / var(--tw-border-opacity));
|
|
608
|
+
--tw-bg-opacity: 1;
|
|
609
|
+
background-color: rgb(254 226 226 / var(--tw-bg-opacity));
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
.mdx-message-error > p {
|
|
613
|
+
--tw-text-opacity: 1;
|
|
614
|
+
color: rgb(127 29 29 / var(--tw-text-opacity));
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
.dark .mdx-message-error > p {
|
|
618
|
+
--tw-text-opacity: 1;
|
|
619
|
+
color: rgb(127 29 29 / var(--tw-text-opacity));
|
|
620
|
+
}
|
|
621
|
+
|
|
505
622
|
.fixed {
|
|
506
623
|
position: fixed;
|
|
507
624
|
}
|
|
@@ -602,6 +719,11 @@ Ensure the default browser behavior of the `hidden` attribute.
|
|
|
602
719
|
margin-right: 0.25rem;
|
|
603
720
|
}
|
|
604
721
|
|
|
722
|
+
.my-4 {
|
|
723
|
+
margin-top: 1rem;
|
|
724
|
+
margin-bottom: 1rem;
|
|
725
|
+
}
|
|
726
|
+
|
|
605
727
|
.ml-4 {
|
|
606
728
|
margin-left: 1rem;
|
|
607
729
|
}
|
|
@@ -618,6 +740,22 @@ Ensure the default browser behavior of the `hidden` attribute.
|
|
|
618
740
|
margin-top: 0.75rem;
|
|
619
741
|
}
|
|
620
742
|
|
|
743
|
+
.mb-8 {
|
|
744
|
+
margin-bottom: 2rem;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
.mt-4 {
|
|
748
|
+
margin-top: 1rem;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
.mt-8 {
|
|
752
|
+
margin-top: 2rem;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
.mb-24 {
|
|
756
|
+
margin-bottom: 6rem;
|
|
757
|
+
}
|
|
758
|
+
|
|
621
759
|
.mb-4 {
|
|
622
760
|
margin-bottom: 1rem;
|
|
623
761
|
}
|
|
@@ -634,6 +772,10 @@ Ensure the default browser behavior of the `hidden` attribute.
|
|
|
634
772
|
display: block;
|
|
635
773
|
}
|
|
636
774
|
|
|
775
|
+
.inline {
|
|
776
|
+
display: inline;
|
|
777
|
+
}
|
|
778
|
+
|
|
637
779
|
.flex {
|
|
638
780
|
display: flex;
|
|
639
781
|
}
|
|
@@ -674,6 +816,10 @@ Ensure the default browser behavior of the `hidden` attribute.
|
|
|
674
816
|
height: 100%;
|
|
675
817
|
}
|
|
676
818
|
|
|
819
|
+
.h-72 {
|
|
820
|
+
height: 18rem;
|
|
821
|
+
}
|
|
822
|
+
|
|
677
823
|
.h-\[calc\(100vh-60px\)\] {
|
|
678
824
|
height: calc(100vh - 60px);
|
|
679
825
|
}
|
|
@@ -742,6 +888,10 @@ Ensure the default browser behavior of the `hidden` attribute.
|
|
|
742
888
|
width: 0.75rem;
|
|
743
889
|
}
|
|
744
890
|
|
|
891
|
+
.w-5\/6 {
|
|
892
|
+
width: 83.333333%;
|
|
893
|
+
}
|
|
894
|
+
|
|
745
895
|
.w-4 {
|
|
746
896
|
width: 1rem;
|
|
747
897
|
}
|
|
@@ -827,6 +977,10 @@ Ensure the default browser behavior of the `hidden` attribute.
|
|
|
827
977
|
flex-direction: column;
|
|
828
978
|
}
|
|
829
979
|
|
|
980
|
+
.flex-wrap {
|
|
981
|
+
flex-wrap: wrap;
|
|
982
|
+
}
|
|
983
|
+
|
|
830
984
|
.items-center {
|
|
831
985
|
align-items: center;
|
|
832
986
|
}
|
|
@@ -851,6 +1005,10 @@ Ensure the default browser behavior of the `hidden` attribute.
|
|
|
851
1005
|
overflow: hidden;
|
|
852
1006
|
}
|
|
853
1007
|
|
|
1008
|
+
.overflow-y-auto {
|
|
1009
|
+
overflow-y: auto;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
854
1012
|
.overflow-x-hidden {
|
|
855
1013
|
overflow-x: hidden;
|
|
856
1014
|
}
|
|
@@ -931,16 +1089,6 @@ Ensure the default browser behavior of the `hidden` attribute.
|
|
|
931
1089
|
background-color: rgb(239 246 255 / var(--tw-bg-opacity));
|
|
932
1090
|
}
|
|
933
1091
|
|
|
934
|
-
.bg-gray-300 {
|
|
935
|
-
--tw-bg-opacity: 1;
|
|
936
|
-
background-color: rgb(209 213 219 / var(--tw-bg-opacity));
|
|
937
|
-
}
|
|
938
|
-
|
|
939
|
-
.bg-blue-300 {
|
|
940
|
-
--tw-bg-opacity: 1;
|
|
941
|
-
background-color: rgb(147 197 253 / var(--tw-bg-opacity));
|
|
942
|
-
}
|
|
943
|
-
|
|
944
1092
|
.bg-gray-700 {
|
|
945
1093
|
--tw-bg-opacity: 1;
|
|
946
1094
|
background-color: rgb(55 65 81 / var(--tw-bg-opacity));
|
|
@@ -961,21 +1109,6 @@ Ensure the default browser behavior of the `hidden` attribute.
|
|
|
961
1109
|
background-color: rgb(37 99 235 / var(--tw-bg-opacity));
|
|
962
1110
|
}
|
|
963
1111
|
|
|
964
|
-
.bg-green-50 {
|
|
965
|
-
--tw-bg-opacity: 1;
|
|
966
|
-
background-color: rgb(240 253 244 / var(--tw-bg-opacity));
|
|
967
|
-
}
|
|
968
|
-
|
|
969
|
-
.bg-orange-50 {
|
|
970
|
-
--tw-bg-opacity: 1;
|
|
971
|
-
background-color: rgb(255 247 237 / var(--tw-bg-opacity));
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
.bg-red-50 {
|
|
975
|
-
--tw-bg-opacity: 1;
|
|
976
|
-
background-color: rgb(254 242 242 / var(--tw-bg-opacity));
|
|
977
|
-
}
|
|
978
|
-
|
|
979
1112
|
.object-cover {
|
|
980
1113
|
-o-object-fit: cover;
|
|
981
1114
|
object-fit: cover;
|
|
@@ -1029,6 +1162,21 @@ Ensure the default browser behavior of the `hidden` attribute.
|
|
|
1029
1162
|
padding-right: 0.25rem;
|
|
1030
1163
|
}
|
|
1031
1164
|
|
|
1165
|
+
.py-12 {
|
|
1166
|
+
padding-top: 3rem;
|
|
1167
|
+
padding-bottom: 3rem;
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
.px-6 {
|
|
1171
|
+
padding-left: 1.5rem;
|
|
1172
|
+
padding-right: 1.5rem;
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
.py-36 {
|
|
1176
|
+
padding-top: 9rem;
|
|
1177
|
+
padding-bottom: 9rem;
|
|
1178
|
+
}
|
|
1179
|
+
|
|
1032
1180
|
.pt-4 {
|
|
1033
1181
|
padding-top: 1rem;
|
|
1034
1182
|
}
|
|
@@ -1073,16 +1221,21 @@ Ensure the default browser behavior of the `hidden` attribute.
|
|
|
1073
1221
|
line-height: 1.75rem;
|
|
1074
1222
|
}
|
|
1075
1223
|
|
|
1076
|
-
.text-5xl {
|
|
1077
|
-
font-size: 3rem;
|
|
1078
|
-
line-height: 1;
|
|
1079
|
-
}
|
|
1080
|
-
|
|
1081
1224
|
.text-3xl {
|
|
1082
1225
|
font-size: 1.875rem;
|
|
1083
1226
|
line-height: 2.25rem;
|
|
1084
1227
|
}
|
|
1085
1228
|
|
|
1229
|
+
.text-4xl {
|
|
1230
|
+
font-size: 2.25rem;
|
|
1231
|
+
line-height: 2.5rem;
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
.text-5xl {
|
|
1235
|
+
font-size: 3rem;
|
|
1236
|
+
line-height: 1;
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1086
1239
|
.font-extrabold {
|
|
1087
1240
|
font-weight: 800;
|
|
1088
1241
|
}
|
|
@@ -1111,34 +1264,24 @@ Ensure the default browser behavior of the `hidden` attribute.
|
|
|
1111
1264
|
color: rgb(75 85 99 / var(--tw-text-opacity));
|
|
1112
1265
|
}
|
|
1113
1266
|
|
|
1114
|
-
.text-
|
|
1267
|
+
.text-gray-900 {
|
|
1115
1268
|
--tw-text-opacity: 1;
|
|
1116
|
-
color: rgb(
|
|
1269
|
+
color: rgb(17 24 39 / var(--tw-text-opacity));
|
|
1117
1270
|
}
|
|
1118
1271
|
|
|
1119
|
-
.text-
|
|
1272
|
+
.text-gray-500 {
|
|
1120
1273
|
--tw-text-opacity: 1;
|
|
1121
|
-
color: rgb(
|
|
1274
|
+
color: rgb(107 114 128 / var(--tw-text-opacity));
|
|
1122
1275
|
}
|
|
1123
1276
|
|
|
1124
|
-
.text-
|
|
1125
|
-
--tw-text-opacity: 1;
|
|
1126
|
-
color: rgb(30 58 138 / var(--tw-text-opacity));
|
|
1127
|
-
}
|
|
1128
|
-
|
|
1129
|
-
.text-green-900 {
|
|
1130
|
-
--tw-text-opacity: 1;
|
|
1131
|
-
color: rgb(20 83 45 / var(--tw-text-opacity));
|
|
1132
|
-
}
|
|
1133
|
-
|
|
1134
|
-
.text-orange-900 {
|
|
1277
|
+
.text-white {
|
|
1135
1278
|
--tw-text-opacity: 1;
|
|
1136
|
-
color: rgb(
|
|
1279
|
+
color: rgb(255 255 255 / var(--tw-text-opacity));
|
|
1137
1280
|
}
|
|
1138
1281
|
|
|
1139
|
-
.text-
|
|
1282
|
+
.text-blue-300 {
|
|
1140
1283
|
--tw-text-opacity: 1;
|
|
1141
|
-
color: rgb(
|
|
1284
|
+
color: rgb(147 197 253 / var(--tw-text-opacity));
|
|
1142
1285
|
}
|
|
1143
1286
|
|
|
1144
1287
|
.opacity-0 {
|
|
@@ -1161,6 +1304,12 @@ Ensure the default browser behavior of the `hidden` attribute.
|
|
|
1161
1304
|
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
1162
1305
|
}
|
|
1163
1306
|
|
|
1307
|
+
.shadow-lg {
|
|
1308
|
+
--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
1309
|
+
--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
|
|
1310
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1164
1313
|
.shadow-xl {
|
|
1165
1314
|
--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
|
|
1166
1315
|
--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);
|
|
@@ -1186,6 +1335,11 @@ Ensure the default browser behavior of the `hidden` attribute.
|
|
|
1186
1335
|
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
1187
1336
|
}
|
|
1188
1337
|
|
|
1338
|
+
.\!blur {
|
|
1339
|
+
--tw-blur: blur(8px) !important;
|
|
1340
|
+
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow) !important;
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1189
1343
|
.blur-xl {
|
|
1190
1344
|
--tw-blur: blur(24px);
|
|
1191
1345
|
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
@@ -1200,6 +1354,11 @@ Ensure the default browser behavior of the `hidden` attribute.
|
|
|
1200
1354
|
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
1201
1355
|
}
|
|
1202
1356
|
|
|
1357
|
+
.backdrop-filter {
|
|
1358
|
+
-webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
|
|
1359
|
+
backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1203
1362
|
.transition {
|
|
1204
1363
|
transition-property: color, background-color, border-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-text-decoration-color, -webkit-backdrop-filter;
|
|
1205
1364
|
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
|
|
@@ -1321,7 +1480,6 @@ article h6 {
|
|
|
1321
1480
|
article p {
|
|
1322
1481
|
margin-top: 1rem;
|
|
1323
1482
|
font-size: 1rem;
|
|
1324
|
-
font-weight: 300;
|
|
1325
1483
|
line-height: 2rem;
|
|
1326
1484
|
--tw-text-opacity: 1;
|
|
1327
1485
|
color: rgb(55 65 81 / var(--tw-text-opacity));
|
|
@@ -1527,7 +1685,39 @@ article a:hover {
|
|
|
1527
1685
|
}
|
|
1528
1686
|
|
|
1529
1687
|
article a {
|
|
1530
|
-
background-image: linear-gradient(
|
|
1688
|
+
background-image: linear-gradient(
|
|
1689
|
+
transparent 60%,
|
|
1690
|
+
rgba(130, 199, 255, 0.28) 55%
|
|
1691
|
+
);
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1694
|
+
.link-with-underline {
|
|
1695
|
+
margin-left: 0.25rem;
|
|
1696
|
+
margin-right: 0.25rem;
|
|
1697
|
+
--tw-text-opacity: 1;
|
|
1698
|
+
color: rgb(37 99 235 / var(--tw-text-opacity));
|
|
1699
|
+
transition-property: color, background-color, border-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-text-decoration-color, -webkit-backdrop-filter;
|
|
1700
|
+
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
|
|
1701
|
+
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-text-decoration-color, -webkit-backdrop-filter;
|
|
1702
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
1703
|
+
transition-duration: 150ms;
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1706
|
+
.link-with-underline:hover {
|
|
1707
|
+
--tw-text-opacity: 1;
|
|
1708
|
+
color: rgb(147 197 253 / var(--tw-text-opacity));
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
.dark .link-with-underline {
|
|
1712
|
+
--tw-text-opacity: 1;
|
|
1713
|
+
color: rgb(96 165 250 / var(--tw-text-opacity));
|
|
1714
|
+
}
|
|
1715
|
+
|
|
1716
|
+
.link-with-underline {
|
|
1717
|
+
background-image: linear-gradient(
|
|
1718
|
+
transparent 60%,
|
|
1719
|
+
rgba(130, 199, 255, 0.28) 55%
|
|
1720
|
+
);
|
|
1531
1721
|
}
|
|
1532
1722
|
|
|
1533
1723
|
/*article pre {*/
|
|
@@ -1559,13 +1749,22 @@ article hr {
|
|
|
1559
1749
|
}
|
|
1560
1750
|
|
|
1561
1751
|
html {
|
|
1562
|
-
scroll-behavior: smooth
|
|
1752
|
+
scroll-behavior: smooth;
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
:root {
|
|
1756
|
+
--anchor-offset: 28px;
|
|
1563
1757
|
}
|
|
1564
1758
|
|
|
1565
1759
|
/** Anchor with offset for headings */
|
|
1566
1760
|
|
|
1567
|
-
h1,
|
|
1568
|
-
|
|
1761
|
+
h1,
|
|
1762
|
+
h2,
|
|
1763
|
+
h3,
|
|
1764
|
+
h4,
|
|
1765
|
+
h5,
|
|
1766
|
+
h6 {
|
|
1767
|
+
scroll-margin-top: calc(var(--anchor-offset) + 88px);
|
|
1569
1768
|
}
|
|
1570
1769
|
|
|
1571
1770
|
.before\:absolute::before {
|
|
@@ -1621,6 +1820,12 @@ h1, h2, h3, h4, h5, h6 {
|
|
|
1621
1820
|
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
|
|
1622
1821
|
}
|
|
1623
1822
|
|
|
1823
|
+
.hover\:scale-105:hover {
|
|
1824
|
+
--tw-scale-x: 1.05;
|
|
1825
|
+
--tw-scale-y: 1.05;
|
|
1826
|
+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1624
1829
|
.hover\:border-gray-100:hover {
|
|
1625
1830
|
--tw-border-opacity: 1;
|
|
1626
1831
|
border-color: rgb(243 244 246 / var(--tw-border-opacity));
|
|
@@ -1641,6 +1846,12 @@ h1, h2, h3, h4, h5, h6 {
|
|
|
1641
1846
|
color: rgb(59 130 246 / var(--tw-text-opacity));
|
|
1642
1847
|
}
|
|
1643
1848
|
|
|
1849
|
+
.hover\:shadow-2xl:hover {
|
|
1850
|
+
--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
|
|
1851
|
+
--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);
|
|
1852
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
1853
|
+
}
|
|
1854
|
+
|
|
1644
1855
|
.hover\:shadow-blue-700:hover {
|
|
1645
1856
|
--tw-shadow-color: #1d4ed8;
|
|
1646
1857
|
--tw-shadow: var(--tw-shadow-colored);
|
|
@@ -1651,6 +1862,16 @@ h1, h2, h3, h4, h5, h6 {
|
|
|
1651
1862
|
background-color: rgb(191 219 254 / var(--tw-bg-opacity));
|
|
1652
1863
|
}
|
|
1653
1864
|
|
|
1865
|
+
.dark .dark\:features-dark {
|
|
1866
|
+
--tw-bg-opacity: 1;
|
|
1867
|
+
background-color: rgb(17 24 39 / var(--tw-bg-opacity));
|
|
1868
|
+
background-image: radial-gradient(#2a2a2a 20%, transparent 20%);
|
|
1869
|
+
background-size: 6px 6px;
|
|
1870
|
+
width: 100%;
|
|
1871
|
+
-ms-overflow-style: none;
|
|
1872
|
+
scrollbar-width: none;
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1654
1875
|
.dark .dark\:border-gray-800 {
|
|
1655
1876
|
--tw-border-opacity: 1;
|
|
1656
1877
|
border-color: rgb(31 41 55 / var(--tw-border-opacity));
|
|
@@ -1661,6 +1882,11 @@ h1, h2, h3, h4, h5, h6 {
|
|
|
1661
1882
|
border-color: rgb(55 65 81 / var(--tw-border-opacity));
|
|
1662
1883
|
}
|
|
1663
1884
|
|
|
1885
|
+
.dark .dark\:border-gray-500 {
|
|
1886
|
+
--tw-border-opacity: 1;
|
|
1887
|
+
border-color: rgb(107 114 128 / var(--tw-border-opacity));
|
|
1888
|
+
}
|
|
1889
|
+
|
|
1664
1890
|
.dark .dark\:border-b-gray-800 {
|
|
1665
1891
|
--tw-border-opacity: 1;
|
|
1666
1892
|
border-bottom-color: rgb(31 41 55 / var(--tw-border-opacity));
|
|
@@ -1711,6 +1937,21 @@ h1, h2, h3, h4, h5, h6 {
|
|
|
1711
1937
|
color: rgb(156 163 175 / var(--tw-text-opacity));
|
|
1712
1938
|
}
|
|
1713
1939
|
|
|
1940
|
+
.dark .dark\:text-gray-200 {
|
|
1941
|
+
--tw-text-opacity: 1;
|
|
1942
|
+
color: rgb(229 231 235 / var(--tw-text-opacity));
|
|
1943
|
+
}
|
|
1944
|
+
|
|
1945
|
+
.dark .dark\:text-gray-300 {
|
|
1946
|
+
--tw-text-opacity: 1;
|
|
1947
|
+
color: rgb(209 213 219 / var(--tw-text-opacity));
|
|
1948
|
+
}
|
|
1949
|
+
|
|
1950
|
+
.dark .dark\:shadow-gray-700 {
|
|
1951
|
+
--tw-shadow-color: #374151;
|
|
1952
|
+
--tw-shadow: var(--tw-shadow-colored);
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1714
1955
|
.dark .dark\:invert {
|
|
1715
1956
|
--tw-invert: invert(100%);
|
|
1716
1957
|
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
@@ -1769,6 +2010,10 @@ h1, h2, h3, h4, h5, h6 {
|
|
|
1769
2010
|
.md\:w-4 {
|
|
1770
2011
|
width: 1rem;
|
|
1771
2012
|
}
|
|
2013
|
+
|
|
2014
|
+
.md\:w-1\/2 {
|
|
2015
|
+
width: 50%;
|
|
2016
|
+
}
|
|
1772
2017
|
}
|
|
1773
2018
|
|
|
1774
2019
|
@media (min-width: 1024px) {
|
|
@@ -1776,6 +2021,10 @@ h1, h2, h3, h4, h5, h6 {
|
|
|
1776
2021
|
margin: 3rem;
|
|
1777
2022
|
}
|
|
1778
2023
|
|
|
2024
|
+
.lg\:mb-16 {
|
|
2025
|
+
margin-bottom: 4rem;
|
|
2026
|
+
}
|
|
2027
|
+
|
|
1779
2028
|
.lg\:block {
|
|
1780
2029
|
display: block;
|
|
1781
2030
|
}
|
|
@@ -1788,6 +2037,10 @@ h1, h2, h3, h4, h5, h6 {
|
|
|
1788
2037
|
height: calc(100vh - 8rem);
|
|
1789
2038
|
}
|
|
1790
2039
|
|
|
2040
|
+
.lg\:h-96 {
|
|
2041
|
+
height: 24rem;
|
|
2042
|
+
}
|
|
2043
|
+
|
|
1791
2044
|
.lg\:w-1\/2 {
|
|
1792
2045
|
width: 50%;
|
|
1793
2046
|
}
|
|
@@ -1796,9 +2049,17 @@ h1, h2, h3, h4, h5, h6 {
|
|
|
1796
2049
|
width: 16rem;
|
|
1797
2050
|
}
|
|
1798
2051
|
|
|
1799
|
-
.lg\:
|
|
1800
|
-
|
|
1801
|
-
|
|
2052
|
+
.lg\:w-1\/3 {
|
|
2053
|
+
width: 33.333333%;
|
|
2054
|
+
}
|
|
2055
|
+
|
|
2056
|
+
.lg\:w-3\/4 {
|
|
2057
|
+
width: 75%;
|
|
2058
|
+
}
|
|
2059
|
+
|
|
2060
|
+
.lg\:px-2 {
|
|
2061
|
+
padding-left: 0.5rem;
|
|
2062
|
+
padding-right: 0.5rem;
|
|
1802
2063
|
}
|
|
1803
2064
|
|
|
1804
2065
|
.lg\:py-12 {
|
|
@@ -1811,6 +2072,21 @@ h1, h2, h3, h4, h5, h6 {
|
|
|
1811
2072
|
padding-right: 8rem;
|
|
1812
2073
|
}
|
|
1813
2074
|
|
|
2075
|
+
.lg\:text-base {
|
|
2076
|
+
font-size: 1rem;
|
|
2077
|
+
line-height: 1.5rem;
|
|
2078
|
+
}
|
|
2079
|
+
|
|
2080
|
+
.lg\:text-5xl {
|
|
2081
|
+
font-size: 3rem;
|
|
2082
|
+
line-height: 1;
|
|
2083
|
+
}
|
|
2084
|
+
|
|
2085
|
+
.lg\:text-xl {
|
|
2086
|
+
font-size: 1.25rem;
|
|
2087
|
+
line-height: 1.75rem;
|
|
2088
|
+
}
|
|
2089
|
+
|
|
1814
2090
|
.lg\:text-7xl {
|
|
1815
2091
|
font-size: 4.5rem;
|
|
1816
2092
|
line-height: 1;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// @ts-ignore
|
|
2
|
+
import { history } from 'umi';
|
|
1
3
|
import { useThemeContext } from './context';
|
|
2
4
|
|
|
3
5
|
interface useLanguageResult {
|
|
@@ -36,19 +38,19 @@ function useLanguage(): useLanguageResult {
|
|
|
36
38
|
let p = location.pathname.split('/');
|
|
37
39
|
p.shift();
|
|
38
40
|
p.shift();
|
|
39
|
-
|
|
41
|
+
history.push('/' + p.join('/'));
|
|
40
42
|
return;
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
// 当前在默认语言,切换到其他语言
|
|
44
46
|
if (!isFromPath) {
|
|
45
|
-
|
|
47
|
+
history.push('/' + locale + location.pathname);
|
|
46
48
|
return;
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
let p = location.pathname.split('/');
|
|
50
52
|
p[1] = locale;
|
|
51
|
-
|
|
53
|
+
history.push('/' + p.join('/'));
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
function render(key: string) {
|
package/dist/compiler.d.ts
CHANGED
package/dist/compiler.js
CHANGED
|
@@ -14,21 +14,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.compile = void 0;
|
|
16
16
|
// @ts-ignore
|
|
17
|
-
const mdx_1 =
|
|
18
|
-
|
|
17
|
+
const mdx_1 = require("../compiled/@mdx-js/mdx");
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
const rehype_slug_1 = __importDefault(require("../compiled/rehype-slug"));
|
|
19
20
|
function compile(opts) {
|
|
20
21
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
const compiler = (0, mdx_1.createProcessor)({
|
|
23
|
+
jsx: true,
|
|
24
|
+
remarkPlugins: [],
|
|
25
|
+
rehypePlugins: [rehype_slug_1.default],
|
|
25
26
|
});
|
|
26
|
-
result =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
result = result.replace('return <MDXLayout', `
|
|
27
|
+
let result = String(yield compiler.process(opts.content));
|
|
28
|
+
result = result.replace('function MDXContent(props = {}) {', `
|
|
29
|
+
import { useEffect } from 'react';
|
|
30
|
+
|
|
31
|
+
function MDXContent(props = {}) {
|
|
32
32
|
|
|
33
33
|
useEffect(() => {
|
|
34
34
|
if (window.location.hash.length !== 0) {
|
|
@@ -38,7 +38,7 @@ ${result}`;
|
|
|
38
38
|
}
|
|
39
39
|
}, []);
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
`);
|
|
42
42
|
return { result };
|
|
43
43
|
});
|
|
44
44
|
}
|