@d-i-t-a/reader 2.0.0-alpha.2 → 2.0.0-beta.10
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/README.md +10 -0
- package/dist/esm/index.js +60633 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/injectables/click/click.js +1774 -2
- package/dist/injectables/click/click.js.map +7 -1
- package/dist/injectables/style/linefocus.css +55 -0
- package/dist/injectables/style/popup.css +121 -0
- package/dist/injectables/style/style.css +250 -0
- package/dist/{material.css.map → material.map.css} +0 -0
- package/dist/reader.css +2 -5
- package/dist/reader.js +161 -3
- package/dist/reader.js.map +7 -1
- package/dist/reader.map.css +21 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/{model → types/model}/Link.d.ts +1 -1
- package/dist/{model → types/model}/Locator.d.ts +3 -18
- package/dist/{model → types/model}/Publication.d.ts +17 -13
- package/dist/{model → types/model}/user-settings/ReadiumCSS.d.ts +0 -0
- package/dist/{model → types/model}/user-settings/UserProperties.d.ts +3 -2
- package/dist/{model → types/model}/user-settings/UserSettings.d.ts +6 -6
- package/dist/{modules → types/modules}/AnnotationModule.d.ts +30 -18
- package/dist/types/modules/BookmarkModule.d.ts +57 -0
- package/dist/types/modules/ReaderModule.d.ts +2 -0
- package/dist/types/modules/TTS/TTSModule.d.ts +33 -0
- package/dist/types/modules/TTS/TTSModule2.d.ts +73 -0
- package/dist/{modules → types/modules}/TTS/TTSSettings.d.ts +41 -17
- package/dist/{modules → types/modules}/highlight/HtmlElementSelector.d.ts +0 -0
- package/dist/types/modules/highlight/LayerSettings.d.ts +19 -0
- package/dist/{modules → types/modules}/highlight/TextHighlighter.d.ts +57 -57
- package/dist/{modules → types/modules}/highlight/common/document.d.ts +0 -0
- package/dist/{modules → types/modules}/highlight/common/events.d.ts +0 -0
- package/dist/types/modules/highlight/common/highlight.d.ts +71 -0
- package/dist/{modules → types/modules}/highlight/common/rect-utils.d.ts +1 -1
- package/dist/{modules → types/modules}/highlight/common/selection.d.ts +8 -3
- package/dist/{modules → types/modules}/highlight/renderer/common/cssselector.d.ts +0 -0
- package/dist/{modules → types/modules}/highlight/renderer/common/cssselector2.d.ts +0 -0
- package/dist/{modules → types/modules}/highlight/renderer/iframe/selection.d.ts +2 -2
- package/dist/{modules → types/modules}/highlight/renderer/iframe/state.d.ts +0 -3
- package/dist/types/modules/linefocus/LineFocusModule.d.ts +45 -0
- package/dist/{modules → types/modules}/mediaoverlays/MediaOverlayModule.d.ts +19 -14
- package/dist/{modules → types/modules}/mediaoverlays/MediaOverlaySettings.d.ts +20 -16
- package/dist/types/modules/pagebreak/PageBreakModule.d.ts +30 -0
- package/dist/{modules → types/modules}/positions/TimelineModule.d.ts +4 -4
- package/dist/{modules → types/modules}/protection/ContentProtectionModule.d.ts +11 -7
- package/dist/types/modules/sampleread/SampleReadEventHandler.d.ts +8 -0
- package/dist/types/modules/search/DefinitionsModule.d.ts +52 -0
- package/dist/types/modules/search/Popup.d.ts +8 -0
- package/dist/{modules → types/modules}/search/SearchModule.d.ts +17 -13
- package/dist/{modules → types/modules}/search/searchWithDomSeek.d.ts +1 -1
- package/dist/{navigator → types/navigator}/IFrameNavigator.d.ts +88 -57
- package/dist/{navigator → types/navigator}/Navigator.d.ts +0 -0
- package/dist/types/reader.d.ts +200 -0
- package/dist/types/store/Annotator.d.ts +25 -0
- package/dist/types/store/LocalAnnotator.d.ts +31 -0
- package/dist/{store → types/store}/LocalStorageStore.d.ts +3 -3
- package/dist/{store → types/store}/MemoryStore.d.ts +3 -3
- package/dist/types/store/Store.d.ts +6 -0
- package/dist/{utils → types/utils}/BrowserUtilities.d.ts +0 -7
- package/dist/{utils → types/utils}/EventHandler.d.ts +12 -0
- package/dist/{utils → types/utils}/HTMLTemplates.d.ts +0 -0
- package/dist/{utils → types/utils}/HTMLUtilities.d.ts +3 -3
- package/dist/{utils → types/utils}/IconLib.d.ts +1 -0
- package/dist/{utils → types/utils}/JsonUtil.d.ts +0 -0
- package/dist/types/utils/KeyboardEventHandler.d.ts +9 -0
- package/dist/{utils → types/utils}/TouchEventHandler.d.ts +1 -1
- package/dist/types/utils/index.d.ts +6 -0
- package/dist/{views → types/views}/BookView.d.ts +9 -7
- package/dist/{views → types/views}/FixedBookView.d.ts +7 -4
- package/dist/{views → types/views}/ReflowableBookView.d.ts +6 -4
- package/package.json +35 -19
- package/CHANGELOG.md +0 -6
- package/NOTICE +0 -20
- package/dist/index.d.ts +0 -140
- package/dist/injectables/click/click.d.ts +0 -1
- package/dist/injectables/footnotes/footnotes.d.ts +0 -1
- package/dist/injectables/footnotes/footnotes.js +0 -2
- package/dist/injectables/footnotes/footnotes.js.map +0 -1
- package/dist/injectables/glossary/glossary.d.ts +0 -5
- package/dist/injectables/glossary/glossary.js +0 -3
- package/dist/injectables/glossary/glossary.js.LICENSE.txt +0 -6
- package/dist/injectables/glossary/glossary.js.map +0 -1
- package/dist/modules/BookmarkModule.d.ts +0 -46
- package/dist/modules/ReaderModule.d.ts +0 -3
- package/dist/modules/TTS/TTSModule.d.ts +0 -58
- package/dist/modules/highlight/common/highlight.d.ts +0 -19
- package/dist/modules/highlight/common/styles.d.ts +0 -35
- package/dist/reader.css.map +0 -21
- package/dist/reader.js.LICENSE.txt +0 -68
- package/dist/store/Annotator.d.ts +0 -25
- package/dist/store/LocalAnnotator.d.ts +0 -31
- package/dist/store/Store.d.ts +0 -6
- package/dist/utils/KeyboardEventHandler.d.ts +0 -7
- package/dist/utils/index.d.ts +0 -1
|
@@ -0,0 +1,250 @@
|
|
|
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
|
+
|
|
34
|
+
.R2_CLASS_HIGHLIGHT_AREA[data-marker="0"] {
|
|
35
|
+
background-color: var(--RS__highlightColor) !important;
|
|
36
|
+
mix-blend-mode: var(--RS__highlightMixBlendMode) !important;
|
|
37
|
+
z-index: 1;
|
|
38
|
+
}
|
|
39
|
+
.R2_CLASS_HIGHLIGHT_AREA[data-marker="0"]:hover,
|
|
40
|
+
.R2_CLASS_HIGHLIGHT_AREA[data-marker="0"].hover {
|
|
41
|
+
background-color: var(--RS__highlightHoverColor) !important;
|
|
42
|
+
}
|
|
43
|
+
.R2_CLASS_HIGHLIGHT_AREA[data-marker="1"] {
|
|
44
|
+
border-bottom: 2px solid var(--RS__underlineBorderColor);
|
|
45
|
+
mix-blend-mode: var(--RS__highlightMixBlendMode) !important;
|
|
46
|
+
z-index: 1;
|
|
47
|
+
}
|
|
48
|
+
.R2_CLASS_HIGHLIGHT_AREA[data-marker="1"]:hover,
|
|
49
|
+
.R2_CLASS_HIGHLIGHT_AREA[data-marker="1"].hover {
|
|
50
|
+
background-color: var(--RS__underlineHoverColor) !important;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
#R2_ID_DEFINITIONS_CONTAINER .R2_CLASS_HIGHLIGHT_AREA[data-marker="0"] {
|
|
54
|
+
background-color: var(--RS__definitionsColor) !important;
|
|
55
|
+
mix-blend-mode: var(--RS__definitionsMixBlendMode) !important;
|
|
56
|
+
z-index: 1;
|
|
57
|
+
}
|
|
58
|
+
#R2_ID_DEFINITIONS_CONTAINER .R2_CLASS_HIGHLIGHT_AREA[data-marker="0"]:hover,
|
|
59
|
+
#R2_ID_DEFINITIONS_CONTAINER .R2_CLASS_HIGHLIGHT_AREA[data-marker="0"].hover {
|
|
60
|
+
background-color: var(--RS__definitionsHoverColor) !important;
|
|
61
|
+
}
|
|
62
|
+
#R2_ID_DEFINITIONS_CONTAINER .R2_CLASS_HIGHLIGHT_AREA[data-marker="1"] {
|
|
63
|
+
border-bottom: 2px solid var(--RS__definitionsUnderlineBorderColor);
|
|
64
|
+
mix-blend-mode: var(--RS__definitionsMixBlendMode) !important;
|
|
65
|
+
z-index: 1;
|
|
66
|
+
}
|
|
67
|
+
#R2_ID_DEFINITIONS_CONTAINER .R2_CLASS_HIGHLIGHT_AREA[data-marker="1"]:hover,
|
|
68
|
+
#R2_ID_DEFINITIONS_CONTAINER .R2_CLASS_HIGHLIGHT_AREA[data-marker="1"].hover {
|
|
69
|
+
background-color: var(--RS__definitionsUnderlineHoverColor) !important;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:root[style] .r2-mo-active,
|
|
73
|
+
:root .r2-mo-active {
|
|
74
|
+
background-color: yellow !important;
|
|
75
|
+
color: black !important;
|
|
76
|
+
}
|
|
77
|
+
:root[style*="readium-night-on"] .r2-mo-active {
|
|
78
|
+
background-color: #333333 !important;
|
|
79
|
+
color: white !important;
|
|
80
|
+
}
|
|
81
|
+
:root[style*="readium-sepia-on"] .r2-mo-active {
|
|
82
|
+
background-color: silver !important;
|
|
83
|
+
color: black !important;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.orange {
|
|
87
|
+
background: rgba(255, 165, 0, 0.5) !important;
|
|
88
|
+
border-bottom: solid 2px rgb(255, 165, 0) !important;
|
|
89
|
+
z-index: 2;
|
|
90
|
+
position: relative;
|
|
91
|
+
}
|
|
92
|
+
.red {
|
|
93
|
+
background: rgba(255,0,0,0.5) !important;
|
|
94
|
+
border-bottom: solid 2px rgb(255,0,0) !important;
|
|
95
|
+
z-index: 2;
|
|
96
|
+
position: relative;
|
|
97
|
+
}
|
|
98
|
+
.blue {
|
|
99
|
+
background: rgba(0,0,255,0.5) !important;
|
|
100
|
+
border-bottom: solid 2px rgb(0,0,255) !important;
|
|
101
|
+
z-index: 2;
|
|
102
|
+
position: relative;
|
|
103
|
+
}
|
|
104
|
+
.purple {
|
|
105
|
+
background: rgba(102,0,153,0.5) !important;
|
|
106
|
+
border-bottom: solid 2px rgb(102,0,153) !important;
|
|
107
|
+
z-index: 2;
|
|
108
|
+
position: relative;
|
|
109
|
+
}
|
|
110
|
+
.green {
|
|
111
|
+
background: rgba(0,102,0,0.5) !important;
|
|
112
|
+
border-bottom: solid 2px rgb(0,102,0) !important;
|
|
113
|
+
z-index: 2;
|
|
114
|
+
position: relative;
|
|
115
|
+
}
|
|
116
|
+
.gray {
|
|
117
|
+
background: rgba(85,85,85,0.5) !important;
|
|
118
|
+
border-bottom: solid 2px rgb(85,85,85) !important;
|
|
119
|
+
z-index: 2;
|
|
120
|
+
position: relative;
|
|
121
|
+
}
|
|
122
|
+
.orangetext {
|
|
123
|
+
color: rgb(255, 165, 0) !important;
|
|
124
|
+
}
|
|
125
|
+
.redtext {
|
|
126
|
+
color: rgb(255,0,0) !important;
|
|
127
|
+
}
|
|
128
|
+
.bluetext {
|
|
129
|
+
color: rgb(0,0,255) !important;
|
|
130
|
+
}
|
|
131
|
+
.purpletext {
|
|
132
|
+
color: rgb(102,0,153) !important;
|
|
133
|
+
}
|
|
134
|
+
.greentext {
|
|
135
|
+
color: rgb(0,102,0) !important;
|
|
136
|
+
}
|
|
137
|
+
.graytext {
|
|
138
|
+
color: rgb(85,85,85) !important;
|
|
139
|
+
}
|
|
140
|
+
[data-tts-current-word="true"][data-tts-color="orange"] {
|
|
141
|
+
background: rgba(255, 165, 0, 0.5) !important;
|
|
142
|
+
border-bottom: solid 2px rgb(255, 165, 0) !important;
|
|
143
|
+
z-index: 2;
|
|
144
|
+
position: relative;
|
|
145
|
+
}
|
|
146
|
+
[data-tts-current-line="true"][data-tts-color="orange"] {
|
|
147
|
+
background: rgba(255, 165, 0, 0.5) !important;
|
|
148
|
+
z-index: 2;
|
|
149
|
+
position: relative;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
[data-tts-current-word="true"][data-tts-color="red"] {
|
|
154
|
+
background: rgba(255,0,0,0.5) !important;
|
|
155
|
+
border-bottom: solid 2px rgba(255,0,0) !important;
|
|
156
|
+
z-index: 2;
|
|
157
|
+
position: relative;
|
|
158
|
+
}
|
|
159
|
+
[data-tts-current-line="true"][data-tts-color="red"] {
|
|
160
|
+
background: rgba(255,0,0,0.5) !important;
|
|
161
|
+
z-index: 2;
|
|
162
|
+
position: relative;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
[data-tts-current-word="true"][data-tts-color="blue"] {
|
|
166
|
+
background: rgba(0,0,255,0.5) !important;
|
|
167
|
+
border-bottom: solid 2px rgba(0,0,255) !important;
|
|
168
|
+
z-index: 2;
|
|
169
|
+
position: relative;
|
|
170
|
+
}
|
|
171
|
+
[data-tts-current-line="true"][data-tts-color="blue"] {
|
|
172
|
+
background: rgba(0,0,255,0.5) !important;
|
|
173
|
+
z-index: 2;
|
|
174
|
+
position: relative;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
[data-tts-current-word="true"][data-tts-color="purple"] {
|
|
178
|
+
background: rgba(102,0,153,0.5) !important;
|
|
179
|
+
border-bottom: solid 2px rgba(102,0,153) !important;
|
|
180
|
+
z-index: 2;
|
|
181
|
+
position: relative;
|
|
182
|
+
}
|
|
183
|
+
[data-tts-current-line="true"][data-tts-color="purple"] {
|
|
184
|
+
background: rgba(102,0,153,0.5) !important;
|
|
185
|
+
z-index: 2;
|
|
186
|
+
position: relative;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
[data-tts-current-word="true"][data-tts-color="green"] {
|
|
190
|
+
background: rgba(0,102,0,0.5) !important;
|
|
191
|
+
border-bottom: solid 2px rgba(0,102,0) !important;
|
|
192
|
+
z-index: 2;
|
|
193
|
+
position: relative;
|
|
194
|
+
}
|
|
195
|
+
[data-tts-current-line="true"][data-tts-color="green"] {
|
|
196
|
+
background: rgba(0,102,0,0.5) !important;
|
|
197
|
+
z-index: 2;
|
|
198
|
+
position: relative;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
[data-tts-current-word="true"][data-tts-color="gray"] {
|
|
202
|
+
background: rgba(85,85,85,0.5) !important;
|
|
203
|
+
border-bottom: solid 2px rgba(85,85,85) !important;
|
|
204
|
+
z-index: 2;
|
|
205
|
+
position: relative;
|
|
206
|
+
}
|
|
207
|
+
[data-tts-current-line="true"][data-tts-color="gray"] {
|
|
208
|
+
background: rgba(85,85,85,0.5) !important;
|
|
209
|
+
z-index: 2;
|
|
210
|
+
position: relative;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.icon:hover .icon-tooltip {
|
|
214
|
+
display: block;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.icon-tooltip {
|
|
218
|
+
display: none;
|
|
219
|
+
position: absolute;
|
|
220
|
+
left: 50%;
|
|
221
|
+
/*top: 50%;*/
|
|
222
|
+
transform: translate(-50%, -105%);
|
|
223
|
+
background: #DADADA;
|
|
224
|
+
padding: 0.25rem 0.5rem;
|
|
225
|
+
text-overflow: ellipsis;
|
|
226
|
+
max-width: 22rem;
|
|
227
|
+
min-width: 100px;
|
|
228
|
+
font-size: small;
|
|
229
|
+
z-index: 1000;
|
|
230
|
+
border: 1px dotted #5b5852;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.icon-tooltip:before, .icon-tooltip:after {
|
|
234
|
+
content: '';
|
|
235
|
+
display: block;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.icon-tooltip:before {
|
|
239
|
+
content: " ";
|
|
240
|
+
display: block;
|
|
241
|
+
position: absolute;
|
|
242
|
+
top: 100%;
|
|
243
|
+
left: 50%;
|
|
244
|
+
width: 0;
|
|
245
|
+
height: 0;
|
|
246
|
+
border-left: 10px solid transparent;
|
|
247
|
+
border-right: 10px solid transparent;
|
|
248
|
+
border-top: 5px solid #5b5852;
|
|
249
|
+
margin-left: -10px;
|
|
250
|
+
}
|
|
File without changes
|
package/dist/reader.css
CHANGED
|
@@ -144,7 +144,7 @@ a {
|
|
|
144
144
|
|
|
145
145
|
#iframe-wrapper iframe {
|
|
146
146
|
border: none;
|
|
147
|
-
overflow:
|
|
147
|
+
overflow: auto;
|
|
148
148
|
opacity: 0; }
|
|
149
149
|
|
|
150
150
|
[data-viewer-theme="day"] {
|
|
@@ -847,9 +847,6 @@ a {
|
|
|
847
847
|
.highlight-toolbox > div > button {
|
|
848
848
|
display: inline-block; }
|
|
849
849
|
|
|
850
|
-
.color-option {
|
|
851
|
-
background-color: gainsboro; }
|
|
852
|
-
|
|
853
850
|
.color-option span {
|
|
854
851
|
display: inline-block;
|
|
855
852
|
border-radius: 50%;
|
|
@@ -1085,7 +1082,7 @@ input::-moz-focus-outer {
|
|
|
1085
1082
|
* Licensed to: Bibliotheca LLC, Bokbasen AS and CAST under one or more contributor license agreements.
|
|
1086
1083
|
*/
|
|
1087
1084
|
@media only screen and (max-width: 600px) {
|
|
1088
|
-
.timeline, .scrubber > input
|
|
1085
|
+
.timeline, .scrubber > input {
|
|
1089
1086
|
display: none; } }
|
|
1090
1087
|
|
|
1091
1088
|
.scrubber {
|