@edrlab/thorium-web 1.0.9 → 1.1.0

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 (66) hide show
  1. package/README.md +2 -0
  2. package/dist/{StatefulReader-DdQrrgZY.d.mts → StatefulReader-BjH7bkU1.d.mts} +1 -25
  3. package/dist/chunk-7CGMWOZN.mjs +20 -0
  4. package/dist/chunk-7CGMWOZN.mjs.map +1 -0
  5. package/dist/{chunk-PVGIY5SC.mjs → chunk-D24O64OP.mjs} +375 -278
  6. package/dist/chunk-D24O64OP.mjs.map +1 -0
  7. package/dist/{chunk-G2SKPGPO.mjs → chunk-FG6BJGVE.mjs} +5 -25
  8. package/dist/chunk-FG6BJGVE.mjs.map +1 -0
  9. package/dist/{chunk-SQHOOSST.mjs → chunk-HE3WFPGE.mjs} +84 -85
  10. package/dist/chunk-HE3WFPGE.mjs.map +1 -0
  11. package/dist/chunk-KKJA56IZ.mjs +27 -0
  12. package/dist/chunk-KKJA56IZ.mjs.map +1 -0
  13. package/dist/{chunk-OXZU5FTD.mjs → chunk-SPAC7T57.mjs} +32 -21
  14. package/dist/chunk-SPAC7T57.mjs.map +1 -0
  15. package/dist/components/Epub/index.css +1282 -0
  16. package/dist/components/Epub/index.css.map +1 -0
  17. package/dist/components/Epub/index.d.mts +1 -1
  18. package/dist/components/Epub/index.mjs +47 -44
  19. package/dist/components/Epub/index.mjs.map +1 -1
  20. package/dist/components/Misc/index.css +102 -0
  21. package/dist/components/Misc/index.css.map +1 -0
  22. package/dist/components/Misc/index.d.mts +28 -0
  23. package/dist/components/Misc/index.mjs +110 -0
  24. package/dist/components/Misc/index.mjs.map +1 -0
  25. package/dist/components/WebPub/index.css +1214 -0
  26. package/dist/components/WebPub/index.css.map +1 -0
  27. package/dist/components/WebPub/index.d.mts +2 -2
  28. package/dist/components/WebPub/index.mjs +28 -25
  29. package/dist/components/WebPub/index.mjs.map +1 -1
  30. package/dist/core/Components/index.mjs +0 -1
  31. package/dist/core/Helpers/index.d.mts +12 -2
  32. package/dist/core/Helpers/index.mjs +1 -2
  33. package/dist/core/Hooks/index.mjs +0 -1
  34. package/dist/i18n/index.mjs +5 -5
  35. package/dist/lib/index.mjs +2 -3
  36. package/dist/locales/et/thorium-web.json +1 -0
  37. package/dist/locales/it/thorium-web.json +1 -0
  38. package/dist/locales/pl/thorium-web.json +26 -13
  39. package/dist/locales/sv/thorium-web.json +37 -37
  40. package/dist/next-lib/index.mjs +0 -2
  41. package/dist/next-lib/index.mjs.map +1 -1
  42. package/dist/preferences/index.mjs +3 -4
  43. package/package.json +38 -34
  44. package/dist/backLink.module-QFOMD4RA.module.css +0 -36
  45. package/dist/chunk-3QS3WKRC.mjs +0 -29
  46. package/dist/chunk-3QS3WKRC.mjs.map +0 -1
  47. package/dist/chunk-G2SKPGPO.mjs.map +0 -1
  48. package/dist/chunk-OXZU5FTD.mjs.map +0 -1
  49. package/dist/chunk-PVGIY5SC.mjs.map +0 -1
  50. package/dist/chunk-SQHOOSST.mjs.map +0 -1
  51. package/dist/chunk-TTGURRX3.mjs +0 -19
  52. package/dist/chunk-TTGURRX3.mjs.map +0 -1
  53. package/dist/docking.module-TDNYZX4H.module.css +0 -40
  54. package/dist/jumpToPosition.module-4C47UYPE.module.css +0 -41
  55. package/dist/overflowMenu.module-QL32ISXF.module.css +0 -68
  56. package/dist/publicationGrid.module-T6ISNRGM.module.css +0 -70
  57. package/dist/reader-NGCQJKLX.css +0 -261
  58. package/dist/readerArrowButton.module-EFLOIADG.module.css +0 -77
  59. package/dist/readerHeader.module-RNGQFLVS.module.css +0 -35
  60. package/dist/readerLoader.module-KDBPCQZJ.module.css +0 -40
  61. package/dist/readerPagination.module-DYBZAQ7H.module.css +0 -76
  62. package/dist/readerProgression.module-7PU7L74S.module.css +0 -5
  63. package/dist/readerSharedUI.module-Y2VDWFS5.module.css +0 -98
  64. package/dist/settings.module-H5MUDFJO.module.css +0 -437
  65. package/dist/sheets.module-LJOLY4MK.module.css +0 -195
  66. package/dist/toc.module-F47C5CDS.module.css +0 -153
@@ -1,261 +0,0 @@
1
- :root {
2
- --theme-text: ;
3
- --theme-background: ;
4
- --theme-link: ;
5
- --theme-visited: ;
6
- --theme-subdue: ;
7
- --theme-disable: ;
8
- --theme-hover: ;
9
- --theme-onHover: ;
10
- --theme-select: ;
11
- --theme-onSelect: ;
12
- --theme-focus: ;
13
- --theme-elevate: ;
14
- --theme-immerse: ;
15
-
16
- --layout-radius: ;
17
- --layout-spacing: ;
18
- }
19
-
20
- /* Reset */
21
-
22
- button {
23
- -webkit-appearance: none;
24
- appearance: none;
25
- border-radius: 0;
26
- text-align: inherit;
27
- background: none;
28
- box-shadow: none;
29
- padding: 0;
30
- cursor: pointer;
31
- border: none;
32
- color: inherit;
33
- font: inherit;
34
-
35
- /* Focus no outline */
36
- outline: none;
37
- /* No tap highlight on mobile */
38
- -webkit-tap-highlight-color: transparent;
39
- }
40
-
41
- input {
42
- font-size: 1rem;
43
- border-radius: 0;
44
- text-align: inherit;
45
- background: none;
46
- box-shadow: none;
47
- padding: 0;
48
- cursor: text;
49
- border: none;
50
- color: inherit;
51
- font: inherit;
52
- /* Focus no outline */
53
- outline: none;
54
- }
55
-
56
- ::selection {
57
- background-color: var(--theme-select);
58
- color: var(--theme-onSelect);
59
- }
60
-
61
- /* Layout */
62
-
63
- html,
64
- body {
65
- min-height: 100%;
66
- margin: 0;
67
- overflow: hidden;
68
- touch-action: pan-x pan-y;
69
- overscroll-behavior-x: none;
70
- overscroll-behavior-y: none;
71
- background-color: var(--theme-background);
72
- color: var(--theme-text);
73
- position: relative;
74
- }
75
-
76
- #wrapper {
77
- height: 100%;
78
- width: 100%;
79
- margin: 0;
80
- }
81
-
82
- #reader-main {
83
- width: 100%;
84
- height: 100%;
85
- margin: 0;
86
- }
87
-
88
- #reader-shell {
89
- width: 100%;
90
- height: 100%;
91
- margin: 0;
92
- }
93
-
94
- .left-dock {
95
- height: 100vh;
96
- height: 100dvh;
97
- }
98
-
99
- .right-dock {
100
- height: 100vh;
101
- height: 100dvh;
102
- }
103
-
104
- /* Top and bottom bars */
105
-
106
- #bottom-bar,
107
- #top-bar {
108
- box-sizing: border-box;
109
- gap: 2px;
110
- touch-action: manipulation;
111
- background-color: var(--theme-background);
112
- }
113
-
114
- #bottom-bar {
115
- display: flex;
116
- justify-content: center;
117
- align-items: center;
118
- }
119
-
120
- /* Stacked UI */
121
-
122
- .stacked-ui {
123
- position: relative;
124
- display: flex;
125
- flex-direction: column;
126
- flex: 1 1 0;
127
- height: 100vh;
128
- height: 100dvh;
129
- background-color: var(--theme-background);
130
- }
131
-
132
- .stacked-ui #top-bar,
133
- .stacked-ui #bottom-bar {
134
- /* Need both. Otherwise it will shrink/grow when switching from stacked/layered */
135
- flex: 0 0 calc(var(--icon-size, 24px) * 2.5);
136
- height: calc(var(--icon-size, 24px) * 2.5);
137
- }
138
-
139
- .stacked-ui.isImmersive:not(.isHovering) #top-bar,
140
- .stacked-ui.isImmersive:not(.isHovering) #bottom-bar {
141
- opacity: var(--theme-immerse);
142
- }
143
-
144
- /* Layered UI */
145
-
146
- .layered-ui {
147
- position: relative;
148
- top: 0;
149
- bottom: 0;
150
- left: 0;
151
- right: 0;
152
- height: 100vh;
153
- height: 100dvh;
154
- background-color: var(--theme-background);
155
- }
156
-
157
- .layered-ui #top-bar,
158
- .layered-ui #bottom-bar {
159
- position: absolute;
160
- left: 0;
161
- right: 0;
162
- height: calc(var(--icon-size, 24px) * 2.5);
163
- z-index: 2;
164
- box-shadow: var(--theme-elevate);
165
- overflow: hidden;
166
- transition-property: transform, box-shadow;
167
- transition-duration: 200ms;
168
- transition-timing-function: ease-in-out;
169
- transform: translateY(0);
170
- }
171
-
172
- .layered-ui #top-bar {
173
- top: 0;
174
- }
175
-
176
- .layered-ui #bottom-bar {
177
- bottom: 0;
178
- }
179
-
180
- .layered-ui.isImmersive:not(.isHovering) #top-bar {
181
- transform: translateY(calc(var(--icon-size, 24px) * -2.5));
182
- box-shadow: none;
183
- /* For overflow button to be visible due to transforms being applied */
184
- overflow: unset;
185
- }
186
-
187
- .layered-ui.isImmersive:not(.isHovering) #bottom-bar {
188
- transform: translateY(calc(var(--icon-size, 24px) * 2.5));
189
- box-shadow: none;
190
- }
191
-
192
- .layered-ui .bar-overlay {
193
- position: absolute;
194
- left: 0;
195
- right: 0;
196
- height: calc(var(--icon-size, 24px) * 2.5);
197
- pointer-events: auto;
198
- opacity: 0;
199
- z-index: 1000;
200
- }
201
-
202
- .layered-ui #reader-header-overlay {
203
- top: 0;
204
- }
205
-
206
- .layered-ui #reader-footer-overlay {
207
- bottom: 0;
208
- }
209
-
210
- /* iFrame + its container */
211
-
212
- #container {
213
- contain: content;
214
- width: 100%;
215
- height: 100%;
216
- margin: 0 auto;
217
- }
218
-
219
- .readium-navigator-iframe {
220
- width: 100%;
221
- height: 100%;
222
- border-width: 0;
223
- }
224
-
225
- /* FXL: Loading spinner for resources */
226
-
227
- @keyframes loading {
228
- 0% {
229
- transform: rotate(0deg);
230
- }
231
- 100% {
232
- transform: rotate(360deg);
233
- }
234
- }
235
-
236
- div:has(> .readium-navigator-iframe.blank)::after {
237
- content: "";
238
- position: absolute;
239
- top: 50%;
240
- left: 50%;
241
- margin-top: -30px;
242
- margin-left: -30px;
243
- width: 50px;
244
- height: 50px;
245
- border-radius: 50px;
246
- border: 5px solid grey;
247
- border-top-color: black;
248
- animation: loading 2s linear infinite;
249
- }
250
-
251
- /* Utils */
252
-
253
- .sr-only {
254
- clip: rect(0 0 0 0);
255
- clip-path: inset(50%);
256
- height: 1px;
257
- overflow: hidden;
258
- position: absolute;
259
- white-space: nowrap;
260
- width: 1px;
261
- }
@@ -1,77 +0,0 @@
1
- .container {
2
- position: absolute;
3
- z-index: 2;
4
- }
5
-
6
- #left {
7
- top: 50vh;
8
- top: 50dvh;
9
- transform: translateY(-50%);
10
- left: 0;
11
- }
12
-
13
- #left button {
14
- margin-left: var(--arrow-offset, 0);
15
- }
16
-
17
- #right {
18
- top: 50vh;
19
- top: 50dvh;
20
- transform: translateY(-50%);
21
- right: 0;
22
- }
23
-
24
- #right button {
25
- margin-right: var(--arrow-offset, 0);
26
- }
27
-
28
- .container button {
29
- width: var(--arrow-size, 40px);
30
- /* height: var(--arrow-size, 40px); */
31
- height: 40vh;
32
- height: 40dvh;
33
- border-radius: var(--layout-radius);
34
- pointer-events: auto;
35
- box-sizing: border-box;
36
- padding: 5px;
37
-
38
- background-color: var(--theme-background);
39
- border: 1px solid var(--theme-text);
40
- }
41
-
42
- .container .viewportLarge {
43
- background-color: transparent;
44
- border: none;
45
- }
46
-
47
- .container button:disabled {
48
- pointer-events: none;
49
- }
50
-
51
- .container .visuallyHidden {
52
- opacity: 0;
53
- }
54
-
55
- .container button[data-focused] {
56
- outline: 2px solid var(--theme-focus);
57
- opacity: 1;
58
- }
59
-
60
- .container button[data-disabled] {
61
- opacity: 0;
62
- }
63
-
64
- /* Exclude taps as they will eventually apply hover state */
65
- @media (hover: hover) and (pointer: fine) {
66
- .container button:not(:disabled):hover {
67
- opacity: 1;
68
- transition: all 200ms;
69
- }
70
- }
71
-
72
- .container button svg {
73
- fill: var(--theme-text);
74
- stroke: var(--theme-text);
75
- width: 100%;
76
- height: 100%;
77
- }
@@ -1,35 +0,0 @@
1
- .header {
2
- box-sizing: border-box;
3
- display: grid;
4
- grid-template-areas: "header-start header-center header-end";
5
- grid-template-columns: 1fr 3fr 1fr;
6
- padding: 0.25rem 0.5rem 0;
7
- }
8
-
9
- .backLinkWrapper {
10
- grid-area: header-start;
11
- justify-self: start;
12
- align-self: center;
13
- }
14
-
15
- .header h1 {
16
- font-size: 1rem;
17
- color: var(--theme-text);
18
- font-weight: normal;
19
- grid-area: header-center;
20
- justify-self: center;
21
- align-self: center;
22
- max-width: 100%;
23
- white-space: nowrap;
24
- overflow: hidden;
25
- text-overflow: ellipsis;
26
- transition: opacity 200ms ease-in-out;
27
- }
28
-
29
- .actionsWrapper {
30
- grid-area: header-end;
31
- justify-self: end;
32
- display: flex;
33
- align-items: center;
34
- gap: 2px;
35
- }
@@ -1,40 +0,0 @@
1
- .readerLoaderWrapper {
2
- width: 100%;
3
- height: 100%;
4
- }
5
-
6
- .readerLoader {
7
- display: flex;
8
- justify-content: center;
9
- align-items: center;
10
- width: 100%;
11
- height: 100%;
12
- color: var(--theme-text);
13
- background-color: var(--theme-background);
14
- font-weight: bold;
15
- }
16
-
17
- .readerLoader::after {
18
- content: "...";
19
- overflow: hidden;
20
- display: inline-block;
21
- vertical-align: bottom;
22
- animation: ellipsis-dot 1s infinite 300ms;
23
- animation-fill-mode: forwards;
24
- width: 3ch;
25
- }
26
-
27
- @keyframes ellipsis-dot {
28
- 25% {
29
- content: "";
30
- }
31
- 50% {
32
- content: ".";
33
- }
34
- 75% {
35
- content: "..";
36
- }
37
- 100% {
38
- content: "...";
39
- }
40
- }
@@ -1,76 +0,0 @@
1
- .pagination {
2
- box-sizing: border-box;
3
- display: grid;
4
- gap: calc(var(--layout-spacing) / 2);
5
- grid-template-areas: "pagination-start pagination-center pagination-end";
6
- grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
7
- background-color: var(--theme-background);
8
- color: var(--theme-text);
9
- align-items: center;
10
- width: 100%;
11
- max-width: var(--constraints-pagination, 100%);
12
- }
13
-
14
- .paginationListItem {
15
- box-sizing: border-box;
16
- list-style: none;
17
- }
18
-
19
- .paginationListItem:has(.previousButton) {
20
- grid-area: pagination-start;
21
- justify-self: start;
22
- }
23
-
24
- .paginationListItem:has(.progression) {
25
- grid-area: pagination-center;
26
- justify-self: center;
27
- }
28
-
29
- .paginationListItem:has(.nextButton) {
30
- grid-area: pagination-end;
31
- justify-self: end;
32
- }
33
-
34
- .paginationListItem button {
35
- box-sizing: border-box;
36
- padding: calc(var(--icon-size, 24px) * (1/4)) calc(var(--layout-spacing) / 2);
37
- gap: calc(var(--layout-spacing) / 2);
38
- max-height: calc(var(--icon-size, 24px) * 2);
39
- max-width: 100%;
40
- border-radius: var(--layout-radius);
41
- display: flex;
42
- align-items: center;
43
- }
44
-
45
- .nextButton {
46
- margin-inline-start: auto;
47
- text-align: end;
48
- }
49
-
50
- .paginationListItem button[data-hovered] {
51
- background-color: var(--theme-hover);
52
- }
53
-
54
- .paginationListItem button[data-focus-visible] {
55
- outline: 2px solid var(--theme-focus);
56
- }
57
-
58
- .paginationListItem button[data-disabled] {
59
- color: var(--theme-disable);
60
- }
61
-
62
- .paginationListItem button .paginationLabel {
63
- display: -webkit-box;
64
- -webkit-box-orient: vertical;
65
- overflow: hidden;
66
- white-space: normal;
67
- -webkit-line-clamp: 1;
68
- line-clamp: 1;
69
- }
70
-
71
- .paginationListItem button svg {
72
- flex: none;
73
- width: var(--icon-size, 24px);
74
- height: var(--icon-size, 24px);
75
- fill: var(--theme-text);
76
- }
@@ -1,5 +0,0 @@
1
- #current {
2
- color: var(--theme-text);
3
- font-variant-numeric: lining-nums tabular-nums;
4
- text-align: center;
5
- }
@@ -1,98 +0,0 @@
1
- .icon,
2
- .dockerButton,
3
- .closeButton,
4
- .backButton {
5
- box-sizing: border-box;
6
- padding: calc(var(--icon-size, 24px) * (1/4));
7
- text-align: center;
8
- border-radius: var(--layout-radius);
9
- }
10
-
11
- .backButton {
12
- box-sizing: content-box;
13
- height: var(--icon-size, 24px);
14
- border: 2px solid transparent;
15
- display: flex;
16
- align-items: center;
17
- }
18
-
19
- .closeButton,
20
- .backButton {
21
- margin-inline-start: auto;
22
- }
23
-
24
- .icon svg,
25
- .dockerButton svg,
26
- .closeButton svg,
27
- .backButton svg {
28
- fill: var(--theme-text);
29
- width: var(--icon-size, 24px);
30
- height: var(--icon-size, 24px);
31
- }
32
-
33
- .icon[data-hovered],
34
- .dockerButton[data-hovered],
35
- .closeButton[data-hovered],
36
- .backButton[data-hovered] {
37
- background-color: var(--theme-hover);
38
- }
39
-
40
- .icon[data-focus-visible],
41
- .dockerButton[data-focus-visible],
42
- .closeButton[data-focus-visible],
43
- .backButton[data-focus-visible] {
44
- outline: 2px solid var(--theme-focus);
45
- }
46
-
47
- .backButton[data-disabled] {
48
- color: var(--theme-disable)
49
- }
50
-
51
- .icon[data-disabled] svg,
52
- .dockerButton[data-disabled] svg,
53
- .closeButton[data-disabled] svg,
54
- .backButton[data-disabled] svg {
55
- fill: var(--theme-disable);
56
- }
57
-
58
- .tooltip {
59
- background-color: var(--theme-text);
60
- color: var(--theme-background);
61
- padding: 5px;
62
- border-radius: var(--layout-radius);
63
- }
64
-
65
- /* Visibility + Immersive */
66
-
67
- .alwaysVisible {
68
- opacity: 1;
69
- }
70
-
71
- :global(.stacked-ui.isImmersive:not(.isHovering)) .partiallyVisible {
72
- opacity: 0;
73
- }
74
-
75
- /* Utils to improve icons’ consistency */
76
-
77
- .iconCompSm {
78
- padding: calc(var(--icon-size, 24px) * (1/3));
79
- }
80
-
81
- .iconCompSm svg {
82
- width: calc(var(--icon-size, 24px) * (3/4));
83
- height: calc(var(--icon-size, 24px) * (3/4));
84
- stroke: var(--theme-text);
85
- }
86
-
87
- .iconCompLg {
88
- padding: calc(var(--icon-size, 24px) * (1/6));
89
- }
90
-
91
- .iconCompLg svg {
92
- width: calc(var(--icon-size, 24px) * (4/3));
93
- height: calc(var(--icon-size, 24px) * (4/3));
94
- }
95
-
96
- .iconApplyStroke svg {
97
- stroke: var(--theme-text);
98
- }