@internetarchive/bookreader 5.0.0-63 → 5.0.0-64
Sign up to get free protection for your applications and to get access to all the features.
- package/.github/workflows/node.js.yml +1 -0
- package/BookReader/BookReader.css +45 -58
- package/BookReader/BookReader.js +1 -1
- package/BookReader/BookReader.js.LICENSE.txt +2 -0
- package/BookReader/BookReader.js.map +1 -1
- package/BookReader/ia-bookreader-bundle.js +95 -95
- package/BookReader/ia-bookreader-bundle.js.LICENSE.txt +2 -0
- package/BookReader/ia-bookreader-bundle.js.map +1 -1
- package/BookReader/icons/1up.svg +1 -1
- package/BookReader/icons/2up.svg +1 -1
- package/BookReader/icons/advance.svg +1 -1
- package/BookReader/icons/chevron-right.svg +1 -1
- package/BookReader/icons/close-circle-dark.svg +1 -1
- package/BookReader/icons/close-circle.svg +1 -1
- package/BookReader/icons/fullscreen.svg +1 -1
- package/BookReader/icons/fullscreen_exit.svg +1 -1
- package/BookReader/icons/hamburger.svg +1 -1
- package/BookReader/icons/left-arrow.svg +1 -1
- package/BookReader/icons/magnify-minus.svg +1 -1
- package/BookReader/icons/magnify-plus.svg +1 -1
- package/BookReader/icons/magnify.svg +1 -1
- package/BookReader/icons/pause.svg +1 -1
- package/BookReader/icons/play.svg +1 -1
- package/BookReader/icons/playback-speed.svg +1 -1
- package/BookReader/icons/read-aloud.svg +1 -1
- package/BookReader/icons/review.svg +1 -1
- package/BookReader/icons/thumbnails.svg +1 -1
- package/BookReader/icons/voice.svg +1 -1
- package/BookReader/icons/volume-full.svg +1 -1
- package/BookReader/images/BRicons.svg +3 -3
- package/BookReader/images/books_graphic.svg +1 -1
- package/BookReader/images/icon_book.svg +1 -1
- package/BookReader/images/icon_bookmark.svg +1 -1
- package/BookReader/images/icon_gear.svg +1 -1
- package/BookReader/images/icon_hamburger.svg +1 -1
- package/BookReader/images/icon_home.svg +1 -1
- package/BookReader/images/icon_info.svg +1 -1
- package/BookReader/images/icon_one_page.svg +1 -1
- package/BookReader/images/icon_pause.svg +1 -1
- package/BookReader/images/icon_play.svg +1 -1
- package/BookReader/images/icon_search_button.svg +1 -1
- package/BookReader/images/icon_share.svg +1 -1
- package/BookReader/images/icon_skip-ahead.svg +1 -1
- package/BookReader/images/icon_skip-back.svg +1 -1
- package/BookReader/images/icon_speaker.svg +1 -1
- package/BookReader/images/icon_speaker_open.svg +1 -1
- package/BookReader/images/icon_thumbnails.svg +1 -1
- package/BookReader/images/icon_toc.svg +1 -1
- package/BookReader/images/icon_two_pages.svg +1 -1
- package/BookReader/images/marker_chap-off.svg +1 -1
- package/BookReader/images/marker_chap-on.svg +1 -1
- package/BookReader/images/marker_srch-on.svg +1 -1
- package/BookReader/jquery-3.js +1 -1
- package/BookReader/plugins/plugin.archive_analytics.js +1 -1
- package/BookReader/plugins/plugin.archive_analytics.js.map +1 -1
- package/BookReader/plugins/plugin.autoplay.js +1 -1
- package/BookReader/plugins/plugin.autoplay.js.map +1 -1
- package/BookReader/plugins/plugin.chapters.js +2 -1
- package/BookReader/plugins/plugin.chapters.js.LICENSE.txt +1 -0
- package/BookReader/plugins/plugin.chapters.js.map +1 -1
- package/BookReader/plugins/plugin.iframe.js.map +1 -1
- package/BookReader/plugins/plugin.mobile_nav.js +1 -1
- package/BookReader/plugins/plugin.mobile_nav.js.map +1 -1
- package/BookReader/plugins/plugin.resume.js +1 -1
- package/BookReader/plugins/plugin.resume.js.map +1 -1
- package/BookReader/plugins/plugin.search.js +2 -1
- package/BookReader/plugins/plugin.search.js.LICENSE.txt +1 -0
- package/BookReader/plugins/plugin.search.js.map +1 -1
- package/BookReader/plugins/plugin.text_selection.js +2 -1
- package/BookReader/plugins/plugin.text_selection.js.LICENSE.txt +1 -0
- package/BookReader/plugins/plugin.text_selection.js.map +1 -1
- package/BookReader/plugins/plugin.tts.js +1 -1
- package/BookReader/plugins/plugin.tts.js.LICENSE.txt +2 -0
- package/BookReader/plugins/plugin.tts.js.map +1 -1
- package/BookReader/plugins/plugin.url.js +1 -1
- package/BookReader/plugins/plugin.url.js.map +1 -1
- package/BookReader/plugins/plugin.vendor-fullscreen.js +1 -1
- package/BookReader/plugins/plugin.vendor-fullscreen.js.map +1 -1
- package/BookReader/webcomponents-bundle.js +1 -1
- package/BookReader/webcomponents-bundle.js.map +1 -1
- package/CHANGELOG.md +5 -0
- package/babel.config.js +5 -4
- package/netlify.toml +4 -0
- package/package.json +15 -15
- package/src/BookNavigator/search/search-results.js +1 -7
- package/src/BookReader/utils.js +10 -0
- package/src/css/_BRnav.scss +2 -2
- package/src/css/_BRsearch.scss +38 -10
- package/src/plugins/search/plugin.search.js +14 -21
- package/src/plugins/search/utils.js +43 -0
- package/src/plugins/search/view.js +11 -24
- package/tests/e2e/helpers/desktopSearch.js +3 -3
- package/tests/jest/BookNavigator/search/search-results.test.js +6 -1
- package/tests/jest/BookReader/utils.test.js +12 -0
- package/tests/jest/plugins/search/plugin.search.test.js +2 -39
- package/tests/jest/plugins/search/plugin.search.view.test.js +5 -0
- package/tests/jest/plugins/search/utils.js +25 -0
- package/tests/jest/plugins/search/utils.test.js +29 -0
@@ -1,5 +1,4 @@
|
|
1
|
-
/* Variables */
|
2
|
-
/* COLORBOX POP-UP */
|
1
|
+
/* Variables */ /* COLORBOX POP-UP */
|
3
2
|
#colorbox, #cboxOverlay, #cboxWrapper {
|
4
3
|
position: absolute;
|
5
4
|
top: 0;
|
@@ -323,47 +322,38 @@ body.BRfullscreenActive .mm-menu {
|
|
323
322
|
.BRinfoLeftCol {
|
324
323
|
font-size: 14px;
|
325
324
|
}
|
326
|
-
|
327
325
|
.BRimageW {
|
328
326
|
text-align: center;
|
329
327
|
margin-bottom: 10px;
|
330
328
|
}
|
331
|
-
|
332
329
|
.BRimageW img {
|
333
330
|
height: 200px;
|
334
331
|
width: auto;
|
335
332
|
}
|
336
|
-
|
337
333
|
.BRinfoValue.larger {
|
338
334
|
font-size: 16px;
|
339
335
|
}
|
340
|
-
|
341
336
|
.BRinfoMoreInfoWrapper a {
|
342
337
|
font-size: inherit;
|
343
338
|
color: white;
|
344
339
|
text-decoration: none;
|
345
340
|
}
|
346
|
-
|
347
341
|
.BRinfoOtherFormatsFormat {
|
348
342
|
margin-bottom: 6px;
|
349
343
|
}
|
350
|
-
|
351
344
|
.BRinfoFooter {
|
352
345
|
margin-bottom: 10px;
|
353
346
|
text-align: left;
|
354
347
|
}
|
355
|
-
|
356
348
|
.BRinfoFooter a {
|
357
349
|
display: block;
|
358
350
|
}
|
359
|
-
|
360
351
|
.BRfloatFoot.BRinfoFooter {
|
361
352
|
margin: initial;
|
362
353
|
padding: initial;
|
363
354
|
border: initial;
|
364
355
|
font-size: inherit;
|
365
356
|
}
|
366
|
-
|
367
357
|
.BookReader .fieldset-embed, .BRmobileMenu .fieldset-embed, .BRfloat .fieldset-embed {
|
368
358
|
display: none;
|
369
359
|
}
|
@@ -380,56 +370,46 @@ body.BRfullscreenActive .mm-menu {
|
|
380
370
|
position: relative;
|
381
371
|
padding: 15px;
|
382
372
|
}
|
383
|
-
|
384
373
|
.BRinfoLeftCol {
|
385
374
|
float: left;
|
386
375
|
width: 40%;
|
387
376
|
min-height: 1px;
|
388
377
|
}
|
389
|
-
|
390
378
|
.BRinfoRightCol {
|
391
379
|
float: left;
|
392
380
|
width: 58%;
|
393
381
|
}
|
394
|
-
|
395
382
|
.BRimageW {
|
396
383
|
text-align: center;
|
397
384
|
margin-bottom: 10px;
|
398
385
|
margin-right: 26px;
|
399
386
|
}
|
400
|
-
|
401
387
|
.BRimageW img {
|
402
388
|
height: auto;
|
403
389
|
width: 100%;
|
404
390
|
}
|
405
|
-
|
406
391
|
.BRinfoValue.larger {
|
407
392
|
font-size: 20px;
|
408
393
|
line-height: 1.2;
|
409
394
|
}
|
410
|
-
|
411
395
|
.BRinfoMoreInfoWrapper a {
|
412
396
|
font-size: 14px;
|
413
397
|
color: white;
|
414
398
|
text-decoration: none;
|
415
399
|
font-weight: bold;
|
416
400
|
}
|
417
|
-
|
418
401
|
.BRinfoOtherFormatsFormat {
|
419
402
|
display: inline;
|
420
403
|
margin-right: 10px;
|
421
404
|
}
|
422
|
-
|
423
405
|
.BRinfoFooter {
|
424
406
|
font-size: 1em;
|
425
407
|
clear: both;
|
426
408
|
}
|
427
|
-
|
428
409
|
.BRinfoFooter a {
|
429
410
|
display: inline;
|
430
411
|
margin-right: 10px;
|
431
412
|
}
|
432
|
-
|
433
413
|
.BookReader .BRaction, .BRmobileMenu .BRaction, .BRfloat .BRaction {
|
434
414
|
padding: 8px 16px;
|
435
415
|
}
|
@@ -984,14 +964,13 @@ i.BRicon {
|
|
984
964
|
/* Desktop Only */
|
985
965
|
@media (min-width: 801px) {
|
986
966
|
.BRfloat .message,
|
987
|
-
.BRfloatBody {
|
967
|
+
.BRfloatBody {
|
988
968
|
padding: 10px 15px 10px 15px;
|
989
969
|
font-size: 16px;
|
990
970
|
line-height: normal;
|
991
971
|
margin-top: 0;
|
992
972
|
margin-bottom: 0px;
|
993
973
|
}
|
994
|
-
|
995
974
|
.BRfloatHead {
|
996
975
|
box-sizing: border-box;
|
997
976
|
line-height: normal;
|
@@ -1001,7 +980,6 @@ i.BRicon {
|
|
1001
980
|
text-align: center;
|
1002
981
|
border-bottom: 1px solid rgb(216, 216, 216);
|
1003
982
|
}
|
1004
|
-
|
1005
983
|
.BRfloatFoot {
|
1006
984
|
padding: 10px;
|
1007
985
|
margin-bottom: 10px;
|
@@ -1012,10 +990,9 @@ i.BRicon {
|
|
1012
990
|
.BRfloatBody {
|
1013
991
|
padding: 10px 10px;
|
1014
992
|
}
|
1015
|
-
|
1016
993
|
.BRfloat .message,
|
1017
|
-
.BRfloatBody,
|
1018
|
-
.BRfloatHead {
|
994
|
+
.BRfloatBody,
|
995
|
+
.BRfloatHead {
|
1019
996
|
box-sizing: border-box;
|
1020
997
|
line-height: normal;
|
1021
998
|
border-bottom: 1px solid rgb(216, 216, 216);
|
@@ -1025,12 +1002,10 @@ i.BRicon {
|
|
1025
1002
|
font-weight: 700;
|
1026
1003
|
text-align: center;
|
1027
1004
|
}
|
1028
|
-
|
1029
1005
|
.BRfloatFoot {
|
1030
1006
|
padding: 10px 10px 0 10px;
|
1031
1007
|
border-top: 1px solid #ccc;
|
1032
1008
|
}
|
1033
|
-
|
1034
1009
|
.BRfloatFoot .BRaction {
|
1035
1010
|
margin-bottom: 10px;
|
1036
1011
|
}
|
@@ -1040,7 +1015,6 @@ i.BRicon {
|
|
1040
1015
|
max-width: initial;
|
1041
1016
|
width: 455px;
|
1042
1017
|
}
|
1043
|
-
|
1044
1018
|
.BRfloat.wide {
|
1045
1019
|
max-width: initial;
|
1046
1020
|
width: 555px;
|
@@ -1064,11 +1038,11 @@ i.BRicon {
|
|
1064
1038
|
@keyframes fadeUp {
|
1065
1039
|
from {
|
1066
1040
|
opacity: 0;
|
1067
|
-
|
1041
|
+
translate: 0 10px;
|
1068
1042
|
}
|
1069
1043
|
to {
|
1070
1044
|
opacity: 1;
|
1071
|
-
|
1045
|
+
translate: 0 0;
|
1072
1046
|
}
|
1073
1047
|
}
|
1074
1048
|
.BRfooter {
|
@@ -1240,8 +1214,7 @@ i.BRicon {
|
|
1240
1214
|
appearance: none;
|
1241
1215
|
border: 0;
|
1242
1216
|
text-align: center;
|
1243
|
-
text-align-last: center;
|
1244
|
-
/* Chrome */
|
1217
|
+
text-align-last: center; /* Chrome */
|
1245
1218
|
padding-top: 60%;
|
1246
1219
|
padding-left: 10%;
|
1247
1220
|
padding-right: 10%;
|
@@ -1340,8 +1313,7 @@ i.BRicon {
|
|
1340
1313
|
height: 20px;
|
1341
1314
|
border-radius: 50%;
|
1342
1315
|
top: -5px;
|
1343
|
-
margin-left: -9px;
|
1344
|
-
/* Center icon */
|
1316
|
+
margin-left: -9px; /* Center icon */
|
1345
1317
|
z-index: 6;
|
1346
1318
|
border: none;
|
1347
1319
|
}
|
@@ -1425,11 +1397,9 @@ i.BRicon {
|
|
1425
1397
|
.BRnavline .BRchapter {
|
1426
1398
|
display: none;
|
1427
1399
|
}
|
1428
|
-
|
1429
1400
|
.BRnavCntlBtm {
|
1430
1401
|
bottom: 34px;
|
1431
1402
|
}
|
1432
|
-
|
1433
1403
|
.BRpager.ui-slider {
|
1434
1404
|
height: 10px;
|
1435
1405
|
top: 12px;
|
@@ -1543,24 +1513,31 @@ i.BRicon {
|
|
1543
1513
|
bottom: calc(100% + 5px);
|
1544
1514
|
left: 50%;
|
1545
1515
|
transform: translateX(-50%);
|
1546
|
-
width:
|
1516
|
+
width: 350px;
|
1517
|
+
max-width: 100vw;
|
1547
1518
|
padding: 12px 14px;
|
1519
|
+
padding-bottom: 10px;
|
1548
1520
|
color: #fff;
|
1549
|
-
font-weight: bold;
|
1550
1521
|
background: #333;
|
1551
1522
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
|
1523
|
+
border-radius: 4px;
|
1524
|
+
animation: fadeUp 0.2s;
|
1525
|
+
-webkit-user-select: none;
|
1526
|
+
-moz-user-select: none;
|
1527
|
+
-ms-user-select: none;
|
1528
|
+
-o-user-select: none;
|
1529
|
+
user-select: none;
|
1552
1530
|
}
|
1553
1531
|
.BookReader .BRquery:after, .BRmobileMenu .BRquery:after, .BRfloat .BRquery:after, .BookReader .BRchapter > div:after, .BRmobileMenu .BRchapter > div:after, .BRfloat .BRchapter > div:after {
|
1554
|
-
display: none;
|
1555
1532
|
position: absolute;
|
1556
|
-
|
1533
|
+
content: "";
|
1534
|
+
bottom: -9px;
|
1557
1535
|
left: 50%;
|
1536
|
+
margin-left: -1px;
|
1558
1537
|
transform: translateX(-50%);
|
1559
|
-
|
1560
|
-
|
1561
|
-
|
1562
|
-
border-bottom: none;
|
1563
|
-
border-top-color: #333;
|
1538
|
+
width: 30px;
|
1539
|
+
height: 10px;
|
1540
|
+
clip-path: polygon(0 0, 100% 0, 50% 100%);
|
1564
1541
|
}
|
1565
1542
|
|
1566
1543
|
.BookReader .searchHiliteLayer, .BookReader .ttsHiliteLayer, .BRmobileMenu .searchHiliteLayer, .BRmobileMenu .ttsHiliteLayer, .BRfloat .searchHiliteLayer, .BRfloat .ttsHiliteLayer {
|
@@ -1606,8 +1583,7 @@ i.BRicon {
|
|
1606
1583
|
}
|
1607
1584
|
.BookReader .BRchapter, .BookReader .BRsearch, .BRmobileMenu .BRchapter, .BRmobileMenu .BRsearch, .BRfloat .BRchapter, .BRfloat .BRsearch {
|
1608
1585
|
position: absolute;
|
1609
|
-
bottom: 0;
|
1610
|
-
/* Relative to nav line */
|
1586
|
+
bottom: 0; /* Relative to nav line */
|
1611
1587
|
cursor: pointer;
|
1612
1588
|
z-index: 3;
|
1613
1589
|
background-color: transparent;
|
@@ -1620,8 +1596,7 @@ i.BRicon {
|
|
1620
1596
|
height: 8px;
|
1621
1597
|
width: 4px;
|
1622
1598
|
bottom: -13px;
|
1623
|
-
margin-left: -12px;
|
1624
|
-
/* Center icon */
|
1599
|
+
margin-left: -12px; /* Center icon */
|
1625
1600
|
}
|
1626
1601
|
.BookReader .BRchapter:hover > div, .BRmobileMenu .BRchapter:hover > div, .BRfloat .BRchapter:hover > div {
|
1627
1602
|
display: block;
|
@@ -1650,7 +1625,19 @@ i.BRicon {
|
|
1650
1625
|
.BookReader .BRsearch .BRquery, .BRmobileMenu .BRsearch .BRquery, .BRfloat .BRsearch .BRquery {
|
1651
1626
|
display: none;
|
1652
1627
|
}
|
1653
|
-
.BookReader .BRquery
|
1628
|
+
.BookReader .BRquery main, .BRmobileMenu .BRquery main, .BRfloat .BRquery main {
|
1629
|
+
display: -webkit-box;
|
1630
|
+
-webkit-line-clamp: 4;
|
1631
|
+
-webkit-box-orient: vertical;
|
1632
|
+
overflow: hidden;
|
1633
|
+
margin-bottom: 6px;
|
1634
|
+
}
|
1635
|
+
.BookReader .BRquery footer, .BRmobileMenu .BRquery footer, .BRfloat .BRquery footer {
|
1636
|
+
text-align: center;
|
1637
|
+
font-weight: bold;
|
1638
|
+
font-size: 0.9em;
|
1639
|
+
}
|
1640
|
+
.BookReader .BRquery mark, .BRmobileMenu .BRquery mark, .BRfloat .BRquery mark {
|
1654
1641
|
color: #adaedc;
|
1655
1642
|
font-weight: bold;
|
1656
1643
|
background-color: #272958;
|
@@ -2535,7 +2522,7 @@ html.mm-background .BookReader {
|
|
2535
2522
|
/* Mobile Only */
|
2536
2523
|
@media (max-width: 800px) {
|
2537
2524
|
.BRbodyMobileNavEnabled .BRtoolbar.responsive,
|
2538
|
-
.BRbodyMobileNavEnabledFullscreen.BRfullscreenActive .BRtoolbar.responsive {
|
2525
|
+
.BRbodyMobileNavEnabledFullscreen.BRfullscreenActive .BRtoolbar.responsive {
|
2539
2526
|
display: block;
|
2540
2527
|
height: 40px;
|
2541
2528
|
box-sizing: border-box;
|
@@ -2544,15 +2531,15 @@ html.mm-background .BookReader {
|
|
2544
2531
|
background: #333;
|
2545
2532
|
}
|
2546
2533
|
.BRbodyMobileNavEnabled .BRtoolbar.responsive .BRtoolbarbuttons,
|
2547
|
-
.BRbodyMobileNavEnabledFullscreen.BRfullscreenActive .BRtoolbar.responsive .BRtoolbarbuttons {
|
2534
|
+
.BRbodyMobileNavEnabledFullscreen.BRfullscreenActive .BRtoolbar.responsive .BRtoolbarbuttons {
|
2548
2535
|
display: none;
|
2549
2536
|
}
|
2550
2537
|
.BRbodyMobileNavEnabled .BRtoolbar.responsive .BRmobileHamburgerWrapper,
|
2551
|
-
.BRbodyMobileNavEnabledFullscreen.BRfullscreenActive .BRtoolbar.responsive .BRmobileHamburgerWrapper {
|
2538
|
+
.BRbodyMobileNavEnabledFullscreen.BRfullscreenActive .BRtoolbar.responsive .BRmobileHamburgerWrapper {
|
2552
2539
|
display: block;
|
2553
2540
|
}
|
2554
2541
|
.BRbodyMobileNavEnabled .BRtoolbar.responsive .BRmobileMenu,
|
2555
|
-
.BRbodyMobileNavEnabledFullscreen.BRfullscreenActive .BRtoolbar.responsive .BRmobileMenu {
|
2542
|
+
.BRbodyMobileNavEnabledFullscreen.BRfullscreenActive .BRtoolbar.responsive .BRmobileMenu {
|
2556
2543
|
display: block;
|
2557
2544
|
}
|
2558
2545
|
}
|
@@ -2996,10 +2983,10 @@ li.BRtable-contents-el .BRTOCElementPage {
|
|
2996
2983
|
}
|
2997
2984
|
|
2998
2985
|
.BRwordElement::selection, .BRspace::selection, .BRparagraphElement::selection, .BRparagraphElement br::selection {
|
2999
|
-
background: hsla(
|
2986
|
+
background: hsla(210, 74%, 62%, 0.4);
|
3000
2987
|
}
|
3001
2988
|
.BRwordElement::-moz-selection, .BRspace::-moz-selection, .BRparagraphElement::-moz-selection, .BRparagraphElement br::-moz-selection {
|
3002
|
-
background: hsla(
|
2989
|
+
background: hsla(210, 74%, 62%, 0.4);
|
3003
2990
|
color: transparent;
|
3004
2991
|
}
|
3005
2992
|
|