@d-i-t-a/reader 2.1.0-alpha.3 → 2.1.0-beta.1

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 (104) hide show
  1. package/README.md +52 -3
  2. package/dist/esm/index.js +48628 -0
  3. package/dist/esm/index.js.map +7 -0
  4. package/dist/injectables/click/click.js +1774 -2
  5. package/dist/injectables/click/click.js.map +7 -1
  6. package/dist/injectables/mui/script.js +205 -0
  7. package/dist/injectables/mui/style.css +271 -0
  8. package/dist/injectables/style/linefocus.css +55 -0
  9. package/dist/injectables/style/popover.css +125 -0
  10. package/dist/injectables/style/popup.css +121 -0
  11. package/dist/injectables/style/style.css +255 -0
  12. package/dist/injectables/style/toast.css +76 -0
  13. package/dist/reader.css +178 -87
  14. package/dist/reader.js +128 -3
  15. package/dist/reader.js.map +7 -1
  16. package/dist/reader.map.css +21 -0
  17. package/dist/types/index.d.ts +7 -0
  18. package/dist/{model → types/model}/Link.d.ts +2 -1
  19. package/dist/{model → types/model}/Locator.d.ts +3 -18
  20. package/dist/types/model/Publication.d.ts +51 -0
  21. package/dist/{model → types/model}/user-settings/ReadiumCSS.d.ts +0 -0
  22. package/dist/{model → types/model}/user-settings/UserProperties.d.ts +10 -4
  23. package/dist/{model → types/model}/user-settings/UserSettings.d.ts +23 -23
  24. package/dist/{modules → types/modules}/AnnotationModule.d.ts +31 -19
  25. package/dist/types/modules/BookmarkModule.d.ts +57 -0
  26. package/dist/types/modules/ReaderModule.d.ts +2 -0
  27. package/dist/types/modules/TTS/TTSModule2.d.ts +74 -0
  28. package/dist/{modules → types/modules}/TTS/TTSSettings.d.ts +44 -20
  29. package/dist/types/modules/citation/CitationModule.d.ts +40 -0
  30. package/dist/{modules → types/modules}/highlight/HtmlElementSelector.d.ts +0 -0
  31. package/dist/types/modules/highlight/LayerSettings.d.ts +19 -0
  32. package/dist/{modules → types/modules}/highlight/TextHighlighter.d.ts +65 -61
  33. package/dist/{modules → types/modules}/highlight/common/document.d.ts +0 -0
  34. package/dist/{modules → types/modules}/highlight/common/events.d.ts +0 -0
  35. package/dist/types/modules/highlight/common/highlight.d.ts +71 -0
  36. package/dist/{modules → types/modules}/highlight/common/rect-utils.d.ts +2 -2
  37. package/dist/{modules → types/modules}/highlight/common/selection.d.ts +8 -3
  38. package/dist/{modules → types/modules}/highlight/renderer/common/cssselector.d.ts +0 -0
  39. package/dist/{modules → types/modules}/highlight/renderer/common/cssselector2.d.ts +0 -0
  40. package/dist/{modules → types/modules}/highlight/renderer/iframe/selection.d.ts +2 -2
  41. package/dist/{modules → types/modules}/highlight/renderer/iframe/state.d.ts +0 -3
  42. package/dist/types/modules/history/HistoryModule.d.ts +34 -0
  43. package/dist/types/modules/linefocus/LineFocusModule.d.ts +51 -0
  44. package/dist/{modules → types/modules}/mediaoverlays/MediaOverlayModule.d.ts +19 -14
  45. package/dist/{modules → types/modules}/mediaoverlays/MediaOverlaySettings.d.ts +21 -16
  46. package/dist/types/modules/pagebreak/PageBreakModule.d.ts +30 -0
  47. package/dist/{modules → types/modules}/positions/TimelineModule.d.ts +3 -3
  48. package/dist/{modules → types/modules}/protection/ContentProtectionModule.d.ts +14 -10
  49. package/dist/types/modules/sampleread/SampleReadEventHandler.d.ts +8 -0
  50. package/dist/types/modules/search/DefinitionsModule.d.ts +52 -0
  51. package/dist/types/modules/search/Popup.d.ts +10 -0
  52. package/dist/{modules → types/modules}/search/SearchModule.d.ts +22 -18
  53. package/dist/{modules → types/modules}/search/searchWithDomSeek.d.ts +1 -1
  54. package/dist/{navigator → types/navigator}/IFrameNavigator.d.ts +99 -74
  55. package/dist/{navigator → types/navigator}/Navigator.d.ts +0 -0
  56. package/dist/types/reader.d.ts +202 -0
  57. package/dist/types/store/Annotator.d.ts +25 -0
  58. package/dist/types/store/LocalAnnotator.d.ts +31 -0
  59. package/dist/{store → types/store}/LocalStorageStore.d.ts +3 -3
  60. package/dist/{store → types/store}/MemoryStore.d.ts +3 -3
  61. package/dist/types/store/Store.d.ts +6 -0
  62. package/dist/{utils → types/utils}/BrowserUtilities.d.ts +0 -0
  63. package/dist/types/utils/EventHandler.d.ts +23 -0
  64. package/dist/{utils → types/utils}/HTMLTemplates.d.ts +0 -0
  65. package/dist/{utils → types/utils}/HTMLUtilities.d.ts +3 -3
  66. package/dist/{utils → types/utils}/IconLib.d.ts +1 -0
  67. package/dist/{utils → types/utils}/JsonUtil.d.ts +0 -0
  68. package/dist/types/utils/KeyboardEventHandler.d.ts +10 -0
  69. package/dist/{utils → types/utils}/TouchEventHandler.d.ts +4 -1
  70. package/dist/types/utils/index.d.ts +6 -0
  71. package/dist/{views → types/views}/BookView.d.ts +10 -7
  72. package/dist/{views → types/views}/FixedBookView.d.ts +8 -4
  73. package/dist/{views → types/views}/ReflowableBookView.d.ts +7 -5
  74. package/package.json +54 -25
  75. package/NOTICE +0 -20
  76. package/dist/index.d.ts +0 -61
  77. package/dist/injectables/click/click.d.ts +0 -1
  78. package/dist/injectables/footnotes/footnotes.d.ts +0 -1
  79. package/dist/injectables/footnotes/footnotes.js +0 -2
  80. package/dist/injectables/footnotes/footnotes.js.map +0 -1
  81. package/dist/injectables/glossary/glossary.d.ts +0 -5
  82. package/dist/injectables/glossary/glossary.js +0 -3
  83. package/dist/injectables/glossary/glossary.js.LICENSE.txt +0 -6
  84. package/dist/injectables/glossary/glossary.js.map +0 -1
  85. package/dist/material.css +0 -4637
  86. package/dist/material.css.map +0 -30
  87. package/dist/model/MediaOverlayNode.d.ts +0 -3
  88. package/dist/model/Publication.d.ts +0 -26
  89. package/dist/modules/BookmarkModule.d.ts +0 -46
  90. package/dist/modules/ReaderModule.d.ts +0 -3
  91. package/dist/modules/TTS/TTSModule.d.ts +0 -58
  92. package/dist/modules/highlight/common/highlight.d.ts +0 -19
  93. package/dist/modules/highlight/common/styles.d.ts +0 -35
  94. package/dist/modules/syncnarration/SyncSettings.d.ts +0 -67
  95. package/dist/modules/syncnarration/SynchronizedNarrationModule.d.ts +0 -81
  96. package/dist/modules/syncnarration/renderer/media-overlays.d.ts +0 -0
  97. package/dist/reader.css.map +0 -21
  98. package/dist/reader.js.LICENSE.txt +0 -66
  99. package/dist/store/Annotator.d.ts +0 -25
  100. package/dist/store/LocalAnnotator.d.ts +0 -31
  101. package/dist/store/Store.d.ts +0 -6
  102. package/dist/utils/EventHandler.d.ts +0 -9
  103. package/dist/utils/KeyboardEventHandler.d.ts +0 -7
  104. package/dist/utils/decodeURI.d.ts +0 -1
@@ -0,0 +1,255 @@
1
+ /*
2
+ * Copyright 2018-2020 DITA (AM Consulting LLC)
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ *
16
+ * Developed on behalf of: DITA
17
+ * Licensed to: CAST under one or more contributor license agreements.
18
+ */
19
+
20
+ :root {
21
+ --RS__highlightColor: rgba(255, 255, 0, 0.5);
22
+ --RS__highlightMixBlendMode: multiply;
23
+ --RS__highlightHoverColor: rgba(255, 255, 0, 0.75);
24
+ --RS__underlineBorderColor: rgba(255, 255, 0, 1);
25
+ --RS__underlineHoverColor: rgba(255, 255, 0, 0.1);
26
+
27
+ --RS__definitionsColor: rgba(255, 111, 111, 0.5);
28
+ --RS__definitionsMixBlendMode: multiply;
29
+ --RS__definitionsHoverColor: rgba(255, 111, 111, 0.75);
30
+ --RS__definitionsUnderlineBorderColor: rgba(255, 111, 111, 1);
31
+ --RS__definitionsUnderlineHoverColor: rgba(255, 111, 111, 0.1);
32
+
33
+ --USER__maxMediaHeight: 95vh;
34
+ }
35
+
36
+ .R2_CLASS_HIGHLIGHT_AREA[data-marker="0"] {
37
+ background-color: var(--RS__highlightColor) !important;
38
+ mix-blend-mode: var(--RS__highlightMixBlendMode) !important;
39
+ z-index: 1;
40
+ }
41
+ .R2_CLASS_HIGHLIGHT_AREA[data-marker="0"]:hover,
42
+ .R2_CLASS_HIGHLIGHT_AREA[data-marker="0"].hover {
43
+ background-color: var(--RS__highlightHoverColor) !important;
44
+ }
45
+ .R2_CLASS_HIGHLIGHT_AREA[data-marker="1"] {
46
+ border-bottom: 2px solid var(--RS__underlineBorderColor);
47
+ mix-blend-mode: var(--RS__highlightMixBlendMode) !important;
48
+ z-index: 1;
49
+ }
50
+ .R2_CLASS_HIGHLIGHT_AREA[data-marker="1"]:hover,
51
+ .R2_CLASS_HIGHLIGHT_AREA[data-marker="1"].hover {
52
+ background-color: var(--RS__underlineHoverColor) !important;
53
+ }
54
+
55
+ #R2_ID_DEFINITIONS_CONTAINER .R2_CLASS_HIGHLIGHT_AREA[data-marker="0"] {
56
+ background-color: var(--RS__definitionsColor) !important;
57
+ mix-blend-mode: var(--RS__definitionsMixBlendMode) !important;
58
+ z-index: 1;
59
+ }
60
+ #R2_ID_DEFINITIONS_CONTAINER .R2_CLASS_HIGHLIGHT_AREA[data-marker="0"]:hover,
61
+ #R2_ID_DEFINITIONS_CONTAINER .R2_CLASS_HIGHLIGHT_AREA[data-marker="0"].hover {
62
+ background-color: var(--RS__definitionsHoverColor) !important;
63
+ }
64
+ #R2_ID_DEFINITIONS_CONTAINER .R2_CLASS_HIGHLIGHT_AREA[data-marker="1"] {
65
+ border-bottom: 2px solid var(--RS__definitionsUnderlineBorderColor);
66
+ mix-blend-mode: var(--RS__definitionsMixBlendMode) !important;
67
+ z-index: 1;
68
+ }
69
+ #R2_ID_DEFINITIONS_CONTAINER .R2_CLASS_HIGHLIGHT_AREA[data-marker="1"]:hover,
70
+ #R2_ID_DEFINITIONS_CONTAINER .R2_CLASS_HIGHLIGHT_AREA[data-marker="1"].hover {
71
+ background-color: var(--RS__definitionsUnderlineHoverColor) !important;
72
+ }
73
+
74
+ :root[style] .r2-mo-active,
75
+ :root .r2-mo-active {
76
+ background-color: yellow !important;
77
+ color: black !important;
78
+ }
79
+ :root[style*="readium-night-on"] .r2-mo-active {
80
+ background-color: #333333 !important;
81
+ color: white !important;
82
+ }
83
+ :root[style*="readium-sepia-on"] .r2-mo-active {
84
+ background-color: silver !important;
85
+ color: black !important;
86
+ }
87
+
88
+ .orange {
89
+ background: rgba(255, 165, 0, 0.5) !important;
90
+ border-bottom: solid 2px rgb(255, 165, 0) !important;
91
+ z-index: 2;
92
+ position: relative;
93
+ }
94
+ .red {
95
+ background: rgba(255,0,0,0.5) !important;
96
+ border-bottom: solid 2px rgb(255,0,0) !important;
97
+ z-index: 2;
98
+ position: relative;
99
+ }
100
+ .blue {
101
+ background: rgba(0,0,255,0.5) !important;
102
+ border-bottom: solid 2px rgb(0,0,255) !important;
103
+ z-index: 2;
104
+ position: relative;
105
+ }
106
+ .purple {
107
+ background: rgba(102,0,153,0.5) !important;
108
+ border-bottom: solid 2px rgb(102,0,153) !important;
109
+ z-index: 2;
110
+ position: relative;
111
+ }
112
+ .green {
113
+ background: rgba(0,102,0,0.5) !important;
114
+ border-bottom: solid 2px rgb(0,102,0) !important;
115
+ z-index: 2;
116
+ position: relative;
117
+ }
118
+ .gray {
119
+ background: rgba(85,85,85,0.5) !important;
120
+ border-bottom: solid 2px rgb(85,85,85) !important;
121
+ z-index: 2;
122
+ position: relative;
123
+ }
124
+ .orangetext {
125
+ color: rgb(255, 165, 0) !important;
126
+ }
127
+ .redtext {
128
+ color: rgb(255,0,0) !important;
129
+ }
130
+ .bluetext {
131
+ color: rgb(0,0,255) !important;
132
+ }
133
+ .purpletext {
134
+ color: rgb(102,0,153) !important;
135
+ }
136
+ .greentext {
137
+ color: rgb(0,102,0) !important;
138
+ }
139
+ .graytext {
140
+ color: rgb(85,85,85) !important;
141
+ }
142
+ [data-tts-current-word="true"][data-tts-color="orange"] {
143
+ background: rgba(255, 165, 0, 0.5) !important;
144
+ border-bottom: solid 2px rgb(255, 165, 0) !important;
145
+ z-index: 2;
146
+ position: relative;
147
+ }
148
+ [data-tts-current-line="true"][data-tts-color="orange"] {
149
+ background: rgba(255, 165, 0, 0.5) !important;
150
+ z-index: 2;
151
+ position: relative;
152
+ }
153
+
154
+
155
+ [data-tts-current-word="true"][data-tts-color="red"] {
156
+ background: rgba(255,0,0,0.5) !important;
157
+ border-bottom: solid 2px rgba(255,0,0) !important;
158
+ z-index: 2;
159
+ position: relative;
160
+ }
161
+ [data-tts-current-line="true"][data-tts-color="red"] {
162
+ background: rgba(255,0,0,0.5) !important;
163
+ z-index: 2;
164
+ position: relative;
165
+ }
166
+
167
+ [data-tts-current-word="true"][data-tts-color="blue"] {
168
+ background: rgba(0,0,255,0.5) !important;
169
+ border-bottom: solid 2px rgba(0,0,255) !important;
170
+ z-index: 2;
171
+ position: relative;
172
+ }
173
+ [data-tts-current-line="true"][data-tts-color="blue"] {
174
+ background: rgba(0,0,255,0.5) !important;
175
+ z-index: 2;
176
+ position: relative;
177
+ }
178
+
179
+ [data-tts-current-word="true"][data-tts-color="purple"] {
180
+ background: rgba(102,0,153,0.5) !important;
181
+ border-bottom: solid 2px rgba(102,0,153) !important;
182
+ z-index: 2;
183
+ position: relative;
184
+ }
185
+ [data-tts-current-line="true"][data-tts-color="purple"] {
186
+ background: rgba(102,0,153,0.5) !important;
187
+ z-index: 2;
188
+ position: relative;
189
+ }
190
+
191
+ [data-tts-current-word="true"][data-tts-color="green"] {
192
+ background: rgba(0,102,0,0.5) !important;
193
+ border-bottom: solid 2px rgba(0,102,0) !important;
194
+ z-index: 2;
195
+ position: relative;
196
+ }
197
+ [data-tts-current-line="true"][data-tts-color="green"] {
198
+ background: rgba(0,102,0,0.5) !important;
199
+ z-index: 2;
200
+ position: relative;
201
+ }
202
+
203
+ [data-tts-current-word="true"][data-tts-color="gray"] {
204
+ background: rgba(85,85,85,0.5) !important;
205
+ border-bottom: solid 2px rgba(85,85,85) !important;
206
+ z-index: 2;
207
+ position: relative;
208
+ }
209
+ [data-tts-current-line="true"][data-tts-color="gray"] {
210
+ background: rgba(85,85,85,0.5) !important;
211
+ z-index: 2;
212
+ position: relative;
213
+ }
214
+
215
+ .icon:hover .icon-tooltip {
216
+ display: block;
217
+ }
218
+
219
+ .icon-tooltip {
220
+ display: none;
221
+ position: absolute;
222
+ left: 50%;
223
+ /*top: 50%;*/
224
+ transform: translate(-50%, -105%);
225
+ background: #DADADA;
226
+ padding: 0.25rem 0.5rem;
227
+ text-overflow: ellipsis;
228
+ max-width: 22rem;
229
+ min-width: 100px;
230
+ z-index: 1000;
231
+ border: 1px dotted #5b5852;
232
+ }
233
+
234
+ .icon-tooltip:before, .icon-tooltip:after {
235
+ content: '';
236
+ display: block;
237
+ }
238
+
239
+ .icon-tooltip:before {
240
+ content: " ";
241
+ display: block;
242
+ position: absolute;
243
+ top: 100%;
244
+ left: 50%;
245
+ width: 0;
246
+ height: 0;
247
+ border-left: 10px solid transparent;
248
+ border-right: 10px solid transparent;
249
+ border-top: 5px solid #5b5852;
250
+ margin-left: -10px;
251
+ }
252
+
253
+ img {
254
+ max-height: var(--USER__maxMediaHeight) !important;
255
+ }
@@ -0,0 +1,76 @@
1
+ #toast {
2
+ visibility: hidden;
3
+ max-width: 1px;
4
+ height: 50px;
5
+ margin: auto;
6
+ background-color: #333;
7
+ color: #fff;
8
+ text-align: center;
9
+ border-radius: 2px;
10
+ position: fixed;
11
+ z-index: 1;
12
+ left: 0;right:0;
13
+ bottom: 30px;
14
+ font-size: 17px;
15
+ white-space: nowrap;
16
+ }
17
+ #toast #description{
18
+ color: #fff;
19
+ padding: 16px;
20
+ overflow: hidden;
21
+ white-space: nowrap;
22
+ }
23
+
24
+ #toast.show {
25
+ visibility: visible;
26
+ -webkit-animation: fadein 0.5s, expand 0.5s 0.5s,stay 3s 1s, shrink 0.5s 2s, fadeout 0.5s 2.5s;
27
+ animation: fadein 0.5s, expand 0.5s 0.5s,stay 3s 1s, shrink 0.5s 4s, fadeout 0.5s 4.5s;
28
+ }
29
+
30
+ @-webkit-keyframes fadein {
31
+ from {bottom: 0; opacity: 0;}
32
+ to {bottom: 30px; opacity: 1;}
33
+ }
34
+
35
+ @keyframes fadein {
36
+ from {bottom: 0; opacity: 0;}
37
+ to {bottom: 30px; opacity: 1;}
38
+ }
39
+
40
+ @-webkit-keyframes expand {
41
+ from {min-width: 1px}
42
+ to {min-width: 350px}
43
+ }
44
+
45
+ @keyframes expand {
46
+ from {min-width: 1px}
47
+ to {min-width: 350px}
48
+ }
49
+ @-webkit-keyframes stay {
50
+ from {min-width: 350px}
51
+ to {min-width: 350px}
52
+ }
53
+
54
+ @keyframes stay {
55
+ from {min-width: 350px}
56
+ to {min-width: 350px}
57
+ }
58
+ @-webkit-keyframes shrink {
59
+ from {min-width: 350px;}
60
+ to {min-width: 1px;}
61
+ }
62
+
63
+ @keyframes shrink {
64
+ from {min-width: 350px;}
65
+ to {min-width: 1px;}
66
+ }
67
+
68
+ @-webkit-keyframes fadeout {
69
+ from {bottom: 30px; opacity: 1;}
70
+ to {bottom: 60px; opacity: 0;}
71
+ }
72
+
73
+ @keyframes fadeout {
74
+ from {bottom: 30px; opacity: 1;}
75
+ to {bottom: 60px; opacity: 0;}
76
+ }