@open-file-viewer/core 0.1.18 → 0.1.20

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/dist/style.css CHANGED
@@ -605,6 +605,26 @@
605
605
  font-weight: 600;
606
606
  }
607
607
 
608
+ .ofv-pdf-web-fallback {
609
+ display: flex;
610
+ width: 100%;
611
+ max-width: 100%;
612
+ height: 100%;
613
+ min-height: 480px;
614
+ min-width: 0;
615
+ }
616
+
617
+ .ofv-pdf-web-fallback-frame {
618
+ flex: 1 1 auto;
619
+ width: 100%;
620
+ max-width: 100%;
621
+ min-width: 0;
622
+ height: 100%;
623
+ min-height: inherit;
624
+ border: 0;
625
+ background: #fff;
626
+ }
627
+
608
628
  .ofv-panel {
609
629
  width: 100%;
610
630
  max-width: 100%;
@@ -786,15 +806,31 @@
786
806
  }
787
807
 
788
808
  .ofv-msdoc-line-numbered {
789
- padding: calc(44px * var(--ofv-office-zoom, 1)) calc(64px * var(--ofv-office-zoom, 1)) calc(86px * var(--ofv-office-zoom, 1)) calc(132px * var(--ofv-office-zoom, 1));
809
+ padding: calc(44px * var(--ofv-office-zoom, 1)) calc(114px * var(--ofv-office-zoom, 1)) calc(86px * var(--ofv-office-zoom, 1)) calc(132px * var(--ofv-office-zoom, 1));
810
+ font-size: calc(9pt * var(--ofv-office-zoom, 1));
811
+ line-height: 1.25;
790
812
  }
791
813
 
792
814
  .ofv-msdoc-page-header {
815
+ position: relative;
793
816
  margin: 0 0 calc(8px * var(--ofv-office-zoom, 1));
794
817
  padding: 0 0 calc(8px * var(--ofv-office-zoom, 1));
795
818
  border-bottom: 1px solid #6b7280;
796
819
  }
797
820
 
821
+ .ofv-msdoc-oasis-header::before {
822
+ position: absolute;
823
+ top: calc(20px * var(--ofv-office-zoom, 1));
824
+ right: calc(100% + 28px * var(--ofv-office-zoom, 1));
825
+ width: calc(30px * var(--ofv-office-zoom, 1));
826
+ color: #111827;
827
+ content: "1";
828
+ font-family: "Times New Roman", Times, serif;
829
+ font-size: calc(12px * var(--ofv-office-zoom, 1));
830
+ font-weight: 400;
831
+ text-align: right;
832
+ }
833
+
798
834
  .ofv-msdoc-oasis-logo {
799
835
  display: flex;
800
836
  align-items: center;
@@ -813,7 +849,7 @@
813
849
  }
814
850
 
815
851
  .ofv-msdoc-oasis-logo-image img {
816
- width: calc(232px * var(--ofv-office-zoom, 1));
852
+ width: calc(190px * var(--ofv-office-zoom, 1));
817
853
  height: auto;
818
854
  max-width: 100%;
819
855
  object-fit: contain;
@@ -864,6 +900,17 @@
864
900
  line-height: 1.18;
865
901
  }
866
902
 
903
+ .ofv-msdoc-line-numbered .ofv-msdoc-title {
904
+ font-size: calc(20px * var(--ofv-office-zoom, 1));
905
+ }
906
+
907
+ .ofv-msdoc-form-document .ofv-msdoc-title {
908
+ color: #111827;
909
+ font-family: "Microsoft YaHei", "PingFang SC", Arial, Helvetica, sans-serif;
910
+ font-size: calc(18pt * var(--ofv-office-zoom, 1));
911
+ text-align: center;
912
+ }
913
+
867
914
  .ofv-msdoc-subtitle {
868
915
  margin: 0 0 calc(18px * var(--ofv-office-zoom, 1));
869
916
  color: #333399;
@@ -872,6 +919,11 @@
872
919
  line-height: 1.2;
873
920
  }
874
921
 
922
+ .ofv-msdoc-line-numbered .ofv-msdoc-subtitle {
923
+ margin-bottom: calc(14px * var(--ofv-office-zoom, 1));
924
+ font-size: calc(16px * var(--ofv-office-zoom, 1));
925
+ }
926
+
875
927
  .ofv-msdoc-heading {
876
928
  margin: calc(18px * var(--ofv-office-zoom, 1)) 0 calc(6px * var(--ofv-office-zoom, 1));
877
929
  color: #000099;
@@ -966,50 +1018,66 @@
966
1018
 
967
1019
  .ofv-msdoc-toc {
968
1020
  display: grid;
969
- grid-template-columns: auto max-content;
970
- column-gap: calc(10px * var(--ofv-office-zoom, 1));
1021
+ grid-template-columns: auto minmax(calc(20px * var(--ofv-office-zoom, 1)), 1fr) max-content;
1022
+ column-gap: calc(3px * var(--ofv-office-zoom, 1));
971
1023
  align-items: baseline;
972
- margin: calc(3px * var(--ofv-office-zoom, 1)) 0;
1024
+ margin: calc(1px * var(--ofv-office-zoom, 1)) 0;
973
1025
  color: #0000ee;
974
1026
  }
975
1027
 
976
- .ofv-msdoc-toc::before {
977
- grid-column: 1 / 3;
978
- grid-row: 1;
979
- align-self: end;
980
- border-bottom: 1px dotted #9ca3af;
981
- content: "";
1028
+ .ofv-msdoc-line-numbered .ofv-msdoc-toc {
1029
+ color: #111827;
982
1030
  }
983
1031
 
984
1032
  .ofv-msdoc-toc span {
985
1033
  position: relative;
986
1034
  z-index: 1;
1035
+ }
1036
+
1037
+ .ofv-msdoc-toc-title {
987
1038
  background: #fff;
1039
+ white-space: nowrap;
988
1040
  }
989
1041
 
990
- .ofv-msdoc-toc span:first-child {
991
- padding-right: 4px;
1042
+ .ofv-msdoc-toc-number {
1043
+ display: inline-block;
1044
+ min-width: calc(28px * var(--ofv-office-zoom, 1));
1045
+ }
1046
+
1047
+ .ofv-msdoc-toc-leader {
1048
+ align-self: center;
1049
+ height: 0;
1050
+ border-bottom: 1px dotted #111827;
992
1051
  }
993
1052
 
994
- .ofv-msdoc-toc span:last-child {
995
- padding-left: 4px;
1053
+ .ofv-msdoc-toc-page {
1054
+ padding-left: calc(2px * var(--ofv-office-zoom, 1));
1055
+ background: #fff;
996
1056
  text-align: right;
997
1057
  }
998
1058
 
999
1059
  .ofv-msdoc-toc-level-2 {
1000
- margin-left: calc(12px * var(--ofv-office-zoom, 1));
1060
+ margin-left: calc(16px * var(--ofv-office-zoom, 1));
1001
1061
  }
1002
1062
 
1003
1063
  .ofv-msdoc-toc-level-3 {
1004
- margin-left: calc(24px * var(--ofv-office-zoom, 1));
1064
+ margin-left: calc(32px * var(--ofv-office-zoom, 1));
1005
1065
  }
1006
1066
 
1007
- .ofv-msdoc-code {
1067
+ .ofv-msdoc-page .ofv-msdoc-code {
1008
1068
  margin: 0 calc(22px * var(--ofv-office-zoom, 1));
1069
+ padding: 0 calc(4px * var(--ofv-office-zoom, 1));
1070
+ background: #e5e5e5;
1009
1071
  color: #800000;
1010
1072
  font-family: "Courier New", Courier, monospace;
1011
- font-size: calc(9px * var(--ofv-office-zoom, 1));
1012
- line-height: 1.18;
1073
+ font-size: calc(8px * var(--ofv-office-zoom, 1));
1074
+ line-height: 1.05;
1075
+ }
1076
+
1077
+ .ofv-msdoc-page .ofv-msdoc-code-ruler {
1078
+ display: flex;
1079
+ justify-content: space-between;
1080
+ color: #111827;
1013
1081
  }
1014
1082
 
1015
1083
  .ofv-msdoc-table {
@@ -1025,6 +1093,14 @@
1025
1093
  table-layout: fixed;
1026
1094
  }
1027
1095
 
1096
+ .ofv-msdoc-form-table {
1097
+ width: 100%;
1098
+ table-layout: fixed;
1099
+ border: 2px solid #111827;
1100
+ color: #111827;
1101
+ font-family: "Microsoft YaHei", "PingFang SC", Arial, Helvetica, sans-serif;
1102
+ }
1103
+
1028
1104
  .ofv-msdoc-table th,
1029
1105
  .ofv-msdoc-table td {
1030
1106
  padding: 0 calc(5px * var(--ofv-office-zoom, 1));
@@ -1039,6 +1115,217 @@
1039
1115
  font-weight: 700;
1040
1116
  }
1041
1117
 
1118
+ .ofv-msdoc-form-table th,
1119
+ .ofv-msdoc-form-table td {
1120
+ min-height: calc(34px * var(--ofv-office-zoom, 1));
1121
+ padding: calc(6px * var(--ofv-office-zoom, 1)) calc(8px * var(--ofv-office-zoom, 1));
1122
+ border-color: #111827;
1123
+ font-size: calc(11pt * var(--ofv-office-zoom, 1));
1124
+ line-height: 1.45;
1125
+ }
1126
+
1127
+ .ofv-msdoc-form-label,
1128
+ .ofv-msdoc-form-section {
1129
+ background: #b7e63a;
1130
+ font-weight: 700;
1131
+ }
1132
+
1133
+ .ofv-msdoc-form-label {
1134
+ text-align: center;
1135
+ }
1136
+
1137
+ .ofv-msdoc-form-section {
1138
+ font-size: calc(12pt * var(--ofv-office-zoom, 1));
1139
+ }
1140
+
1141
+ .ofv-msdoc-form-caption {
1142
+ font-weight: 700;
1143
+ }
1144
+
1145
+ .ofv-msdoc-form-empty {
1146
+ background: #fff;
1147
+ }
1148
+
1149
+ .ofv-msdoc-training-workbook {
1150
+ font-family: SimSun, "Songti SC", serif;
1151
+ }
1152
+
1153
+ .ofv-msdoc-training-page {
1154
+ padding: calc(74px * var(--ofv-office-zoom, 1)) calc(68px * var(--ofv-office-zoom, 1));
1155
+ color: #111;
1156
+ font-family: SimSun, "Songti SC", serif;
1157
+ font-size: calc(10pt * var(--ofv-office-zoom, 1));
1158
+ line-height: 1.55;
1159
+ }
1160
+
1161
+ .ofv-msdoc-training-page::after {
1162
+ position: absolute;
1163
+ inset: calc(110px * var(--ofv-office-zoom, 1)) calc(66px * var(--ofv-office-zoom, 1)) calc(70px * var(--ofv-office-zoom, 1));
1164
+ border: 1px solid #111;
1165
+ content: "";
1166
+ pointer-events: none;
1167
+ }
1168
+
1169
+ .ofv-msdoc-training-page > * {
1170
+ position: relative;
1171
+ z-index: 1;
1172
+ }
1173
+
1174
+ .ofv-msdoc-training-page .ofv-msdoc-title {
1175
+ margin: 0 0 calc(8px * var(--ofv-office-zoom, 1));
1176
+ color: #111;
1177
+ font-family: SimHei, "Microsoft YaHei", sans-serif;
1178
+ font-size: calc(16pt * var(--ofv-office-zoom, 1));
1179
+ line-height: 1.3;
1180
+ text-align: center;
1181
+ }
1182
+
1183
+ .ofv-msdoc-training-paragraph {
1184
+ margin: 0;
1185
+ padding: calc(2px * var(--ofv-office-zoom, 1)) calc(4px * var(--ofv-office-zoom, 1));
1186
+ white-space: pre-line;
1187
+ }
1188
+
1189
+ .ofv-msdoc-training-indent {
1190
+ padding-left: calc(30px * var(--ofv-office-zoom, 1));
1191
+ text-indent: 2em;
1192
+ }
1193
+
1194
+ .ofv-msdoc-training-center {
1195
+ border: 1px solid #111;
1196
+ text-align: center;
1197
+ }
1198
+
1199
+ .ofv-msdoc-training-table {
1200
+ width: 100%;
1201
+ margin: 0;
1202
+ border-collapse: collapse;
1203
+ table-layout: fixed;
1204
+ }
1205
+
1206
+ .ofv-msdoc-training-table td {
1207
+ box-sizing: border-box;
1208
+ padding: calc(3px * var(--ofv-office-zoom, 1)) calc(5px * var(--ofv-office-zoom, 1));
1209
+ border: 1px solid #111;
1210
+ vertical-align: middle;
1211
+ white-space: pre-line;
1212
+ }
1213
+
1214
+ .ofv-msdoc-training-identity td:nth-child(odd) {
1215
+ width: 25%;
1216
+ background: #a6e600;
1217
+ font-family: SimHei, "Microsoft YaHei", sans-serif;
1218
+ font-weight: 700;
1219
+ text-align: center;
1220
+ }
1221
+
1222
+ .ofv-msdoc-training-identity td:nth-child(even) {
1223
+ width: 25%;
1224
+ height: calc(36px * var(--ofv-office-zoom, 1));
1225
+ }
1226
+
1227
+ .ofv-msdoc-training-section {
1228
+ margin: 0;
1229
+ }
1230
+
1231
+ .ofv-msdoc-training-section-head td {
1232
+ width: 50%;
1233
+ padding: calc(7px * var(--ofv-office-zoom, 1));
1234
+ font-family: SimHei, "Microsoft YaHei", sans-serif;
1235
+ font-size: calc(11pt * var(--ofv-office-zoom, 1));
1236
+ font-weight: 700;
1237
+ }
1238
+
1239
+ .ofv-msdoc-training-green {
1240
+ background: #a6e600;
1241
+ }
1242
+
1243
+ .ofv-msdoc-training-image-strip {
1244
+ display: flex;
1245
+ align-items: center;
1246
+ justify-content: center;
1247
+ gap: calc(8px * var(--ofv-office-zoom, 1));
1248
+ margin: calc(6px * var(--ofv-office-zoom, 1)) auto;
1249
+ }
1250
+
1251
+ .ofv-msdoc-training-image {
1252
+ display: block;
1253
+ width: 100%;
1254
+ height: 100%;
1255
+ object-fit: cover;
1256
+ }
1257
+
1258
+ .ofv-msdoc-training-switches .ofv-msdoc-training-image {
1259
+ width: calc(128px * var(--ofv-office-zoom, 1));
1260
+ height: calc(138px * var(--ofv-office-zoom, 1));
1261
+ }
1262
+
1263
+ .ofv-msdoc-training-plan td:first-child { width: 10%; }
1264
+ .ofv-msdoc-training-plan td { height: calc(34px * var(--ofv-office-zoom, 1)); text-align: center; }
1265
+ .ofv-msdoc-training-plan tr:first-child td { height: auto; }
1266
+ .ofv-msdoc-training-plan tr:last-child td { height: calc(88px * var(--ofv-office-zoom, 1)); text-align: left; }
1267
+ .ofv-msdoc-training-assignment td { text-align: center; }
1268
+
1269
+ .ofv-msdoc-training-equipment {
1270
+ margin-bottom: calc(50px * var(--ofv-office-zoom, 1));
1271
+ }
1272
+ .ofv-msdoc-training-equipment tr:first-child td { text-align: center; }
1273
+ .ofv-msdoc-training-equipment tr:not(:first-child) td:nth-child(1) { width: 8%; }
1274
+ .ofv-msdoc-training-equipment tr:not(:first-child) td:nth-child(2) { width: 43%; }
1275
+ .ofv-msdoc-training-equipment tr:not(:first-child) td:nth-child(3) { width: 27%; }
1276
+ .ofv-msdoc-training-equipment tr:not(:first-child) td:nth-child(4) { width: 22%; text-align: center; }
1277
+ .ofv-msdoc-training-equipment tr:nth-child(n+3) td { height: calc(33px * var(--ofv-office-zoom, 1)); }
1278
+
1279
+ .ofv-msdoc-training-people td:first-child { width: 29%; padding: 0; }
1280
+ .ofv-msdoc-training-people td:nth-child(2) { width: 22%; }
1281
+ .ofv-msdoc-training-people td:nth-child(3) { width: 49%; }
1282
+ .ofv-msdoc-training-people .ofv-msdoc-training-image { height: calc(112px * var(--ofv-office-zoom, 1)); object-fit: contain; }
1283
+
1284
+ .ofv-msdoc-training-work-table td:first-child {
1285
+ width: 34%;
1286
+ padding: calc(3px * var(--ofv-office-zoom, 1));
1287
+ }
1288
+ .ofv-msdoc-training-work-table td:last-child { width: 66%; }
1289
+ .ofv-msdoc-training-work-table .ofv-msdoc-training-image { height: calc(115px * var(--ofv-office-zoom, 1)); }
1290
+ .ofv-msdoc-training-work { break-inside: avoid; }
1291
+
1292
+ .ofv-msdoc-training-quality td:first-child { width: 18%; text-align: center; }
1293
+ .ofv-msdoc-training-quality td:nth-child(2) { width: 55%; }
1294
+ .ofv-msdoc-training-quality td:nth-child(3) { width: 27%; text-align: center; }
1295
+ .ofv-msdoc-training-quality tr:last-child td { height: calc(105px * var(--ofv-office-zoom, 1)); }
1296
+
1297
+ .ofv-msdoc-training-reflection {
1298
+ margin: calc(20px * var(--ofv-office-zoom, 1));
1299
+ padding: calc(12px * var(--ofv-office-zoom, 1));
1300
+ border: 1px solid #111;
1301
+ white-space: pre-line;
1302
+ }
1303
+
1304
+ .ofv-msdoc-training-score {
1305
+ margin-top: calc(18px * var(--ofv-office-zoom, 1));
1306
+ }
1307
+ .ofv-msdoc-training-score tr:first-child td {
1308
+ background: #a6e600;
1309
+ font-family: SimHei, "Microsoft YaHei", sans-serif;
1310
+ font-size: calc(12pt * var(--ofv-office-zoom, 1));
1311
+ font-weight: 700;
1312
+ text-align: center;
1313
+ }
1314
+ .ofv-msdoc-training-score td:first-child { width: 20%; text-align: center; }
1315
+ .ofv-msdoc-training-score td:nth-child(2) { width: 58%; }
1316
+ .ofv-msdoc-training-score td:nth-child(3),
1317
+ .ofv-msdoc-training-score td:nth-child(4) { width: 11%; text-align: center; }
1318
+
1319
+ .ofv-msdoc-training-footer {
1320
+ position: absolute !important;
1321
+ right: 0;
1322
+ bottom: calc(54px * var(--ofv-office-zoom, 1));
1323
+ left: 0;
1324
+ color: #9ca3af;
1325
+ font-size: calc(8px * var(--ofv-office-zoom, 1));
1326
+ text-align: center;
1327
+ }
1328
+
1042
1329
  .ofv-msdoc-meta,
1043
1330
  .ofv-msdoc-warning {
1044
1331
  display: none;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-file-viewer/core",
3
- "version": "0.1.18",
3
+ "version": "0.1.20",
4
4
  "description": "Framework-agnostic browser file preview core.",
5
5
  "license": "MIT",
6
6
  "type": "module",