@internetarchive/bookreader 5.0.0-71 → 5.0.0-73

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.
Files changed (71) hide show
  1. package/.github/workflows/node.js.yml +16 -16
  2. package/.github/workflows/npm-publish.yml +6 -6
  3. package/BookReader/BookReader.css +9 -6
  4. package/BookReader/BookReader.js +1 -1
  5. package/BookReader/BookReader.js.map +1 -1
  6. package/BookReader/ia-bookreader-bundle.js +9 -9
  7. package/BookReader/ia-bookreader-bundle.js.map +1 -1
  8. package/BookReader/icons/1up.svg +1 -1
  9. package/BookReader/icons/2up.svg +1 -1
  10. package/BookReader/icons/advance.svg +1 -1
  11. package/BookReader/icons/close-circle-dark.svg +1 -1
  12. package/BookReader/icons/close-circle.svg +1 -1
  13. package/BookReader/icons/fullscreen.svg +1 -1
  14. package/BookReader/icons/fullscreen_exit.svg +1 -1
  15. package/BookReader/icons/hamburger.svg +1 -1
  16. package/BookReader/icons/left-arrow.svg +1 -1
  17. package/BookReader/icons/magnify-minus.svg +1 -1
  18. package/BookReader/icons/magnify-plus.svg +1 -1
  19. package/BookReader/icons/magnify.svg +1 -1
  20. package/BookReader/icons/pause.svg +1 -1
  21. package/BookReader/icons/play.svg +1 -1
  22. package/BookReader/icons/playback-speed.svg +1 -1
  23. package/BookReader/icons/read-aloud.svg +1 -1
  24. package/BookReader/icons/review.svg +1 -1
  25. package/BookReader/icons/thumbnails.svg +1 -1
  26. package/BookReader/images/BRicons.svg +2 -2
  27. package/BookReader/images/books_graphic.svg +1 -1
  28. package/BookReader/images/icon_book.svg +1 -1
  29. package/BookReader/images/icon_gear.svg +1 -1
  30. package/BookReader/images/icon_info.svg +1 -1
  31. package/BookReader/images/icon_one_page.svg +1 -1
  32. package/BookReader/images/icon_search_button.svg +1 -1
  33. package/BookReader/images/icon_share.svg +1 -1
  34. package/BookReader/images/icon_speaker.svg +1 -1
  35. package/BookReader/images/icon_speaker_open.svg +1 -1
  36. package/BookReader/images/icon_thumbnails.svg +1 -1
  37. package/BookReader/images/icon_toc.svg +1 -1
  38. package/BookReader/images/icon_two_pages.svg +1 -1
  39. package/BookReader/images/marker_chap-off.svg +1 -1
  40. package/BookReader/images/marker_chap-on.svg +1 -1
  41. package/BookReader/images/marker_srch-on.svg +1 -1
  42. package/BookReader/plugins/plugin.archive_analytics.js +1 -1
  43. package/BookReader/plugins/plugin.autoplay.js +1 -1
  44. package/BookReader/plugins/plugin.autoplay.js.map +1 -1
  45. package/BookReader/plugins/plugin.chapters.js +2 -2
  46. package/BookReader/plugins/plugin.chapters.js.map +1 -1
  47. package/BookReader/plugins/plugin.resume.js +1 -1
  48. package/BookReader/plugins/plugin.search.js +1 -1
  49. package/BookReader/plugins/plugin.search.js.map +1 -1
  50. package/BookReader/plugins/plugin.text_selection.js +1 -1
  51. package/BookReader/plugins/plugin.text_selection.js.map +1 -1
  52. package/BookReader/plugins/plugin.tts.js +1 -1
  53. package/BookReader/plugins/plugin.tts.js.map +1 -1
  54. package/BookReader/plugins/plugin.url.js +1 -1
  55. package/BookReader/plugins/plugin.url.js.map +1 -1
  56. package/BookReader/plugins/plugin.vendor-fullscreen.js +1 -1
  57. package/BookReader/plugins/plugin.vendor-fullscreen.js.map +1 -1
  58. package/BookReaderDemo/BookReaderDemo.css +3 -0
  59. package/CHANGELOG.md +11 -0
  60. package/netlify.toml +1 -1
  61. package/package.json +14 -15
  62. package/scripts/preversion.js +0 -4
  63. package/src/BookReader/options.js +3 -0
  64. package/src/BookReader/utils/SelectionObserver.js +3 -1
  65. package/src/css/_BRsearch.scss +4 -6
  66. package/src/plugins/plugin.chapters.js +36 -16
  67. package/src/plugins/tts/AbstractTTSEngine.js +5 -2
  68. package/src/plugins/tts/plugin.tts.js +1 -1
  69. package/src/plugins/tts/utils.js +15 -0
  70. package/tests/jest/BookReader/utils/SelectionObserver.test.js +14 -0
  71. package/tests/jest/plugins/plugin.chapters.test.js +51 -3
@@ -14,11 +14,11 @@ jobs:
14
14
  runs-on: ubuntu-latest
15
15
 
16
16
  steps:
17
- - uses: actions/checkout@v3
18
- - uses: actions/setup-node@v3
17
+ - uses: actions/checkout@v4
18
+ - uses: actions/setup-node@v4
19
19
  with:
20
20
  # Keep in sync with netlify.toml
21
- node-version: 16.x
21
+ node-version: 20.x
22
22
  - name: Cache node_modules
23
23
  uses: actions/cache@v3
24
24
  id: cache
@@ -29,7 +29,7 @@ jobs:
29
29
  # we don't use `npm ci` specifically to try to get faster CI flows. So caching
30
30
  # `node_modules` directly.
31
31
  path: 'node_modules'
32
- key: ${{ runner.os }}-node-16-${{ hashFiles('package*.json') }}
32
+ key: ${{ runner.os }}-node-20-${{ hashFiles('package*.json') }}
33
33
  - if: steps.cache.outputs.cache-hit != 'true'
34
34
  run: npm install
35
35
 
@@ -37,16 +37,16 @@ jobs:
37
37
  needs: install
38
38
  runs-on: ubuntu-latest
39
39
  steps:
40
- - uses: actions/checkout@v3
41
- - uses: actions/setup-node@v3
40
+ - uses: actions/checkout@v4
41
+ - uses: actions/setup-node@v4
42
42
  with:
43
- node-version: 16.x
43
+ node-version: 20.x
44
44
  - name: Load node_modules from cache
45
45
  uses: actions/cache@v3
46
46
  with:
47
47
  # Use node_modules from previous jobs
48
48
  path: 'node_modules'
49
- key: ${{ runner.os }}-node-16-${{ hashFiles('package*.json') }}
49
+ key: ${{ runner.os }}-node-20-${{ hashFiles('package*.json') }}
50
50
  - name: Cache BookReader/
51
51
  uses: actions/cache@v3
52
52
  id: build-cache
@@ -61,16 +61,16 @@ jobs:
61
61
  needs: install
62
62
  runs-on: ubuntu-latest
63
63
  steps:
64
- - uses: actions/checkout@v3
65
- - uses: actions/setup-node@v3
64
+ - uses: actions/checkout@v4
65
+ - uses: actions/setup-node@v4
66
66
  with:
67
- node-version: 16.x
67
+ node-version: 20.x
68
68
  - name: Load node_modules from cache
69
69
  uses: actions/cache@v3
70
70
  with:
71
71
  # Use node_modules from previous jobs
72
72
  path: 'node_modules'
73
- key: ${{ runner.os }}-node-16-${{ hashFiles('package*.json') }}
73
+ key: ${{ runner.os }}-node-20-${{ hashFiles('package*.json') }}
74
74
  - run: npm run lint
75
75
  - run: npm run test
76
76
  - run: npm run codecov
@@ -79,16 +79,16 @@ jobs:
79
79
  needs: build
80
80
  runs-on: ubuntu-latest
81
81
  steps:
82
- - uses: actions/checkout@v3
83
- - uses: actions/setup-node@v3
82
+ - uses: actions/checkout@v4
83
+ - uses: actions/setup-node@v4
84
84
  with:
85
- node-version: 16.x
85
+ node-version: 20.x
86
86
  - name: Load node_modules from cache
87
87
  uses: actions/cache@v3
88
88
  with:
89
89
  # Use node_modules from previous jobs
90
90
  path: 'node_modules'
91
- key: ${{ runner.os }}-node-16-${{ hashFiles('package*.json') }}
91
+ key: ${{ runner.os }}-node-20-${{ hashFiles('package*.json') }}
92
92
  - name: Load BookReader/ from cache
93
93
  uses: actions/cache@v3
94
94
  with:
@@ -11,10 +11,10 @@ jobs:
11
11
  build:
12
12
  runs-on: ubuntu-latest
13
13
  steps:
14
- - uses: actions/checkout@v3
15
- - uses: actions/setup-node@v3
14
+ - uses: actions/checkout@v4
15
+ - uses: actions/setup-node@v4
16
16
  with:
17
- node-version: 16
17
+ node-version: 20
18
18
  - run: npm ci
19
19
  - run: npm test
20
20
 
@@ -22,10 +22,10 @@ jobs:
22
22
  needs: build
23
23
  runs-on: ubuntu-latest
24
24
  steps:
25
- - uses: actions/checkout@v3
26
- - uses: actions/setup-node@v3
25
+ - uses: actions/checkout@v4
26
+ - uses: actions/setup-node@v4
27
27
  with:
28
- node-version: 16
28
+ node-version: 20
29
29
  registry-url: https://registry.npmjs.org/
30
30
  - run: npm ci
31
31
  - run: npm publish --tag next
@@ -1,3 +1,4 @@
1
+ @charset "UTF-8";
1
2
  /* Variables */
2
3
  /* COLORBOX POP-UP */
3
4
  #colorbox, #cboxOverlay, #cboxWrapper {
@@ -1476,8 +1477,7 @@ i.BRicon {
1476
1477
  display: none;
1477
1478
  position: absolute;
1478
1479
  bottom: calc(100% + 5px);
1479
- left: 50%;
1480
- transform: translateX(-50%);
1480
+ left: -14px;
1481
1481
  width: 350px;
1482
1482
  max-width: 100vw;
1483
1483
  padding: 12px 14px;
@@ -1497,9 +1497,7 @@ i.BRicon {
1497
1497
  position: absolute;
1498
1498
  content: "";
1499
1499
  bottom: -9px;
1500
- left: 50%;
1501
- margin-left: -1px;
1502
- transform: translateX(-50%);
1500
+ left: 0;
1503
1501
  width: 30px;
1504
1502
  height: 10px;
1505
1503
  clip-path: polygon(0 0, 100% 0, 50% 100%);
@@ -1601,8 +1599,13 @@ i.BRicon {
1601
1599
  overflow: hidden;
1602
1600
  margin-bottom: 6px;
1603
1601
  }
1602
+ .BookReader .BRquery main:before, .BRfloat .BRquery main:before {
1603
+ content: "“";
1604
+ }
1605
+ .BookReader .BRquery main:after, .BRfloat .BRquery main:after {
1606
+ content: "”";
1607
+ }
1604
1608
  .BookReader .BRquery footer, .BRfloat .BRquery footer {
1605
- text-align: center;
1606
1609
  font-size: 0.85em;
1607
1610
  opacity: 0.8;
1608
1611
  }