@lamberl-lee/file-preview 0.2.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 (263) hide show
  1. package/COPYING +674 -0
  2. package/LICENSE +165 -0
  3. package/README.md +165 -0
  4. package/dist/AudioPreview.d.ts +9 -0
  5. package/dist/AudioPreview.js +29 -0
  6. package/dist/AudioPreview.js.map +1 -0
  7. package/dist/CodePreview.d.ts +10 -0
  8. package/dist/CodePreview.js +121 -0
  9. package/dist/CodePreview.js.map +1 -0
  10. package/dist/CsvPreview.d.ts +9 -0
  11. package/dist/CsvPreview.js +117 -0
  12. package/dist/CsvPreview.js.map +1 -0
  13. package/dist/DocxPreview.d.ts +11 -0
  14. package/dist/DocxPreview.js +89 -0
  15. package/dist/DocxPreview.js.map +1 -0
  16. package/dist/EpubPreview.d.ts +9 -0
  17. package/dist/EpubPreview.js +693 -0
  18. package/dist/EpubPreview.js.map +1 -0
  19. package/dist/HtmlPreview.d.ts +9 -0
  20. package/dist/HtmlPreview.js +60 -0
  21. package/dist/HtmlPreview.js.map +1 -0
  22. package/dist/ImagePreview.d.ts +9 -0
  23. package/dist/ImagePreview.js +44 -0
  24. package/dist/ImagePreview.js.map +1 -0
  25. package/dist/LargeFileGate.d.ts +12 -0
  26. package/dist/LargeFileGate.js +88 -0
  27. package/dist/LargeFileGate.js.map +1 -0
  28. package/dist/MarkdownPreview.d.ts +8 -0
  29. package/dist/MarkdownPreview.js +140 -0
  30. package/dist/MarkdownPreview.js.map +1 -0
  31. package/dist/PdfPreview.d.ts +11 -0
  32. package/dist/PdfPreview.js +206 -0
  33. package/dist/PdfPreview.js.map +1 -0
  34. package/dist/PlainTextLargePreview.d.ts +9 -0
  35. package/dist/PlainTextLargePreview.js +62 -0
  36. package/dist/PlainTextLargePreview.js.map +1 -0
  37. package/dist/PluginPreviewRenderer.d.ts +13 -0
  38. package/dist/PluginPreviewRenderer.js +89 -0
  39. package/dist/PluginPreviewRenderer.js.map +1 -0
  40. package/dist/PptxPreview.d.ts +16 -0
  41. package/dist/PptxPreview.js +376 -0
  42. package/dist/PptxPreview.js.map +1 -0
  43. package/dist/PreviewErrorBoundary.d.ts +29 -0
  44. package/dist/PreviewErrorBoundary.js +53 -0
  45. package/dist/PreviewErrorBoundary.js.map +1 -0
  46. package/dist/PreviewFallback.d.ts +18 -0
  47. package/dist/PreviewFallback.js +143 -0
  48. package/dist/PreviewFallback.js.map +1 -0
  49. package/dist/PreviewLoading.d.ts +8 -0
  50. package/dist/PreviewLoading.js +14 -0
  51. package/dist/PreviewLoading.js.map +1 -0
  52. package/dist/RtfPreview.d.ts +10 -0
  53. package/dist/RtfPreview.js +240 -0
  54. package/dist/RtfPreview.js.map +1 -0
  55. package/dist/ShikiSourceView.d.ts +11 -0
  56. package/dist/ShikiSourceView.js +112 -0
  57. package/dist/ShikiSourceView.js.map +1 -0
  58. package/dist/SvgPreview.d.ts +9 -0
  59. package/dist/SvgPreview.js +89 -0
  60. package/dist/SvgPreview.js.map +1 -0
  61. package/dist/TextPreview.d.ts +9 -0
  62. package/dist/TextPreview.js +9 -0
  63. package/dist/TextPreview.js.map +1 -0
  64. package/dist/VideoPreview.d.ts +9 -0
  65. package/dist/VideoPreview.js +18 -0
  66. package/dist/VideoPreview.js.map +1 -0
  67. package/dist/XlsxPreview.d.ts +12 -0
  68. package/dist/XlsxPreview.js +856 -0
  69. package/dist/XlsxPreview.js.map +1 -0
  70. package/dist/ZipPreview.d.ts +9 -0
  71. package/dist/ZipPreview.js +153 -0
  72. package/dist/ZipPreview.js.map +1 -0
  73. package/dist/core/binary.d.ts +10 -0
  74. package/dist/core/binary.js +27 -0
  75. package/dist/core/binary.js.map +1 -0
  76. package/dist/core/config.d.ts +17 -0
  77. package/dist/core/config.js +19 -0
  78. package/dist/core/config.js.map +1 -0
  79. package/dist/core/download.d.ts +5 -0
  80. package/dist/core/download.js +20 -0
  81. package/dist/core/download.js.map +1 -0
  82. package/dist/core/i18n.d.ts +101 -0
  83. package/dist/core/i18n.js +200 -0
  84. package/dist/core/i18n.js.map +1 -0
  85. package/dist/core/plugin.d.ts +38 -0
  86. package/dist/core/plugin.js +46 -0
  87. package/dist/core/plugin.js.map +1 -0
  88. package/dist/core/registry.d.ts +13 -0
  89. package/dist/core/registry.js +33 -0
  90. package/dist/core/registry.js.map +1 -0
  91. package/dist/core/source.d.ts +14 -0
  92. package/dist/core/source.js +131 -0
  93. package/dist/core/source.js.map +1 -0
  94. package/dist/core/types.d.ts +88 -0
  95. package/dist/core/types.js +27 -0
  96. package/dist/core/types.js.map +1 -0
  97. package/dist/hooks/useObjectUrlFromSource.d.ts +9 -0
  98. package/dist/hooks/useObjectUrlFromSource.js +50 -0
  99. package/dist/hooks/useObjectUrlFromSource.js.map +1 -0
  100. package/dist/hooks/useSourceBase64.d.ts +10 -0
  101. package/dist/hooks/useSourceBase64.js +32 -0
  102. package/dist/hooks/useSourceBase64.js.map +1 -0
  103. package/dist/hooks/useSourceText.d.ts +10 -0
  104. package/dist/hooks/useSourceText.js +32 -0
  105. package/dist/hooks/useSourceText.js.map +1 -0
  106. package/dist/icons.d.ts +44 -0
  107. package/dist/icons.js +248 -0
  108. package/dist/icons.js.map +1 -0
  109. package/dist/index.d.ts +36 -0
  110. package/dist/index.js +147 -0
  111. package/dist/index.js.map +1 -0
  112. package/dist/limits.d.ts +26 -0
  113. package/dist/limits.js +45 -0
  114. package/dist/limits.js.map +1 -0
  115. package/dist/performance-limits.d.ts +27 -0
  116. package/dist/performance-limits.js +54 -0
  117. package/dist/performance-limits.js.map +1 -0
  118. package/dist/plugins/audio-plugin.d.ts +7 -0
  119. package/dist/plugins/audio-plugin.js +11 -0
  120. package/dist/plugins/audio-plugin.js.map +1 -0
  121. package/dist/plugins/builtin-plugins.d.ts +9 -0
  122. package/dist/plugins/builtin-plugins.js +43 -0
  123. package/dist/plugins/builtin-plugins.js.map +1 -0
  124. package/dist/plugins/csv-plugin.d.ts +7 -0
  125. package/dist/plugins/csv-plugin.js +11 -0
  126. package/dist/plugins/csv-plugin.js.map +1 -0
  127. package/dist/plugins/docx-plugin.d.ts +7 -0
  128. package/dist/plugins/docx-plugin.js +15 -0
  129. package/dist/plugins/docx-plugin.js.map +1 -0
  130. package/dist/plugins/epub-plugin.d.ts +7 -0
  131. package/dist/plugins/epub-plugin.js +15 -0
  132. package/dist/plugins/epub-plugin.js.map +1 -0
  133. package/dist/plugins/html-plugin.d.ts +7 -0
  134. package/dist/plugins/html-plugin.js +11 -0
  135. package/dist/plugins/html-plugin.js.map +1 -0
  136. package/dist/plugins/image-plugin.d.ts +7 -0
  137. package/dist/plugins/image-plugin.js +11 -0
  138. package/dist/plugins/image-plugin.js.map +1 -0
  139. package/dist/plugins/markdown-plugin.d.ts +7 -0
  140. package/dist/plugins/markdown-plugin.js +11 -0
  141. package/dist/plugins/markdown-plugin.js.map +1 -0
  142. package/dist/plugins/pdf-plugin.d.ts +7 -0
  143. package/dist/plugins/pdf-plugin.js +15 -0
  144. package/dist/plugins/pdf-plugin.js.map +1 -0
  145. package/dist/plugins/pptx-plugin.d.ts +7 -0
  146. package/dist/plugins/pptx-plugin.js +15 -0
  147. package/dist/plugins/pptx-plugin.js.map +1 -0
  148. package/dist/plugins/rtf-plugin.d.ts +7 -0
  149. package/dist/plugins/rtf-plugin.js +15 -0
  150. package/dist/plugins/rtf-plugin.js.map +1 -0
  151. package/dist/plugins/source-code-plugin.d.ts +7 -0
  152. package/dist/plugins/source-code-plugin.js +11 -0
  153. package/dist/plugins/source-code-plugin.js.map +1 -0
  154. package/dist/plugins/svg-plugin.d.ts +7 -0
  155. package/dist/plugins/svg-plugin.js +11 -0
  156. package/dist/plugins/svg-plugin.js.map +1 -0
  157. package/dist/plugins/text-plugin.d.ts +7 -0
  158. package/dist/plugins/text-plugin.js +11 -0
  159. package/dist/plugins/text-plugin.js.map +1 -0
  160. package/dist/plugins/video-plugin.d.ts +7 -0
  161. package/dist/plugins/video-plugin.js +11 -0
  162. package/dist/plugins/video-plugin.js.map +1 -0
  163. package/dist/plugins/xlsx-plugin.d.ts +7 -0
  164. package/dist/plugins/xlsx-plugin.js +15 -0
  165. package/dist/plugins/xlsx-plugin.js.map +1 -0
  166. package/dist/plugins/zip-plugin.d.ts +7 -0
  167. package/dist/plugins/zip-plugin.js +15 -0
  168. package/dist/plugins/zip-plugin.js.map +1 -0
  169. package/dist/preview-adapters/AudioPreviewAdapter.d.ts +8 -0
  170. package/dist/preview-adapters/AudioPreviewAdapter.js +31 -0
  171. package/dist/preview-adapters/AudioPreviewAdapter.js.map +1 -0
  172. package/dist/preview-adapters/CsvPreviewAdapter.d.ts +8 -0
  173. package/dist/preview-adapters/CsvPreviewAdapter.js +28 -0
  174. package/dist/preview-adapters/CsvPreviewAdapter.js.map +1 -0
  175. package/dist/preview-adapters/DocxPreviewAdapter.d.ts +8 -0
  176. package/dist/preview-adapters/DocxPreviewAdapter.js +16 -0
  177. package/dist/preview-adapters/DocxPreviewAdapter.js.map +1 -0
  178. package/dist/preview-adapters/EpubPreviewAdapter.d.ts +8 -0
  179. package/dist/preview-adapters/EpubPreviewAdapter.js +28 -0
  180. package/dist/preview-adapters/EpubPreviewAdapter.js.map +1 -0
  181. package/dist/preview-adapters/HtmlPreviewAdapter.d.ts +8 -0
  182. package/dist/preview-adapters/HtmlPreviewAdapter.js +28 -0
  183. package/dist/preview-adapters/HtmlPreviewAdapter.js.map +1 -0
  184. package/dist/preview-adapters/ImagePreviewAdapter.d.ts +8 -0
  185. package/dist/preview-adapters/ImagePreviewAdapter.js +31 -0
  186. package/dist/preview-adapters/ImagePreviewAdapter.js.map +1 -0
  187. package/dist/preview-adapters/MarkdownPreviewAdapter.d.ts +8 -0
  188. package/dist/preview-adapters/MarkdownPreviewAdapter.js +28 -0
  189. package/dist/preview-adapters/MarkdownPreviewAdapter.js.map +1 -0
  190. package/dist/preview-adapters/PdfPreviewAdapter.d.ts +8 -0
  191. package/dist/preview-adapters/PdfPreviewAdapter.js +16 -0
  192. package/dist/preview-adapters/PdfPreviewAdapter.js.map +1 -0
  193. package/dist/preview-adapters/PptxPreviewAdapter.d.ts +8 -0
  194. package/dist/preview-adapters/PptxPreviewAdapter.js +16 -0
  195. package/dist/preview-adapters/PptxPreviewAdapter.js.map +1 -0
  196. package/dist/preview-adapters/RtfPreviewAdapter.d.ts +8 -0
  197. package/dist/preview-adapters/RtfPreviewAdapter.js +54 -0
  198. package/dist/preview-adapters/RtfPreviewAdapter.js.map +1 -0
  199. package/dist/preview-adapters/SourceCodePreviewAdapter.d.ts +8 -0
  200. package/dist/preview-adapters/SourceCodePreviewAdapter.js +35 -0
  201. package/dist/preview-adapters/SourceCodePreviewAdapter.js.map +1 -0
  202. package/dist/preview-adapters/SvgPreviewAdapter.d.ts +8 -0
  203. package/dist/preview-adapters/SvgPreviewAdapter.js +28 -0
  204. package/dist/preview-adapters/SvgPreviewAdapter.js.map +1 -0
  205. package/dist/preview-adapters/TextPreviewAdapter.d.ts +8 -0
  206. package/dist/preview-adapters/TextPreviewAdapter.js +28 -0
  207. package/dist/preview-adapters/TextPreviewAdapter.js.map +1 -0
  208. package/dist/preview-adapters/UnsupportedPluginPreview.d.ts +11 -0
  209. package/dist/preview-adapters/UnsupportedPluginPreview.js +34 -0
  210. package/dist/preview-adapters/UnsupportedPluginPreview.js.map +1 -0
  211. package/dist/preview-adapters/VideoPreviewAdapter.d.ts +8 -0
  212. package/dist/preview-adapters/VideoPreviewAdapter.js +31 -0
  213. package/dist/preview-adapters/VideoPreviewAdapter.js.map +1 -0
  214. package/dist/preview-adapters/XlsxPreviewAdapter.d.ts +8 -0
  215. package/dist/preview-adapters/XlsxPreviewAdapter.js +17 -0
  216. package/dist/preview-adapters/XlsxPreviewAdapter.js.map +1 -0
  217. package/dist/preview-adapters/ZipPreviewAdapter.d.ts +8 -0
  218. package/dist/preview-adapters/ZipPreviewAdapter.js +28 -0
  219. package/dist/preview-adapters/ZipPreviewAdapter.js.map +1 -0
  220. package/dist/remote-url.d.ts +20 -0
  221. package/dist/remote-url.js +478 -0
  222. package/dist/remote-url.js.map +1 -0
  223. package/dist/rtf/load-rtfjs.d.ts +42 -0
  224. package/dist/rtf/load-rtfjs.js +71 -0
  225. package/dist/rtf/load-rtfjs.js.map +1 -0
  226. package/dist/rtf/normalize-codepage.d.ts +33 -0
  227. package/dist/rtf/normalize-codepage.js +88 -0
  228. package/dist/rtf/normalize-codepage.js.map +1 -0
  229. package/dist/shiki.d.ts +35 -0
  230. package/dist/shiki.js +128 -0
  231. package/dist/shiki.js.map +1 -0
  232. package/dist/styles/AudioPreview.css +35 -0
  233. package/dist/styles/CsvPreview.css +106 -0
  234. package/dist/styles/DocxPreview.css +93 -0
  235. package/dist/styles/EpubPreview.css +509 -0
  236. package/dist/styles/HtmlPreview.css +15 -0
  237. package/dist/styles/ImagePreview.css +45 -0
  238. package/dist/styles/LargeFileGate.css +55 -0
  239. package/dist/styles/MarkdownPreview.css +291 -0
  240. package/dist/styles/PdfPreview.css +68 -0
  241. package/dist/styles/PlainTextLargePreview.css +85 -0
  242. package/dist/styles/PluginDebugBar.css +30 -0
  243. package/dist/styles/PptxPreview.css +207 -0
  244. package/dist/styles/PreviewFallback.css +88 -0
  245. package/dist/styles/PreviewLoading.css +13 -0
  246. package/dist/styles/RtfPreview.css +99 -0
  247. package/dist/styles/ShikiSourceView.css +159 -0
  248. package/dist/styles/SvgPreview.css +99 -0
  249. package/dist/styles/VideoPreview.css +19 -0
  250. package/dist/styles/ViewModeBar.css +38 -0
  251. package/dist/styles/XlsxPreview.css +361 -0
  252. package/dist/styles/ZipPreview.css +86 -0
  253. package/dist/styles/base.css +238 -0
  254. package/dist/styles/index.css +39 -0
  255. package/dist/support-status.d.ts +19 -0
  256. package/dist/support-status.js +174 -0
  257. package/dist/support-status.js.map +1 -0
  258. package/dist/utils.d.ts +17 -0
  259. package/dist/utils.js +205 -0
  260. package/dist/utils.js.map +1 -0
  261. package/package.json +125 -0
  262. package/scripts/copy-pdf-worker.mjs +31 -0
  263. package/scripts/copy-rtfjs-bundles.mjs +49 -0
@@ -0,0 +1,509 @@
1
+ .fv-epub {
2
+ display: flex;
3
+ flex-direction: column;
4
+ height: 100%;
5
+ }
6
+
7
+ /* ── Loading / error / empty states ── */
8
+ .fv-epub__state {
9
+ display: flex;
10
+ flex-direction: column;
11
+ align-items: center;
12
+ justify-content: center;
13
+ height: 100%;
14
+ min-height: 300px;
15
+ gap: 0.75rem;
16
+ }
17
+ .fv-epub__state--loading {
18
+ min-height: 400px;
19
+ }
20
+ .fv-epub__state--error {
21
+ color: var(--fv-danger);
22
+ }
23
+ .fv-epub__state--empty {
24
+ color: var(--fv-muted-foreground);
25
+ }
26
+ .fv-epub__state-icon {
27
+ opacity: 0.5;
28
+ }
29
+ .fv-epub__state-title {
30
+ font-size: var(--fv-font-size-lg);
31
+ font-weight: 500;
32
+ }
33
+ .fv-epub__state-msg {
34
+ font-size: var(--fv-font-size-sm);
35
+ color: var(--fv-muted-foreground);
36
+ }
37
+
38
+ /* ── Info bar ── */
39
+ .fv-epub__info-bar {
40
+ padding: 0.5rem 1rem;
41
+ border-bottom: 1px solid var(--fv-border);
42
+ background: color-mix(in srgb, var(--fv-muted) 30%, transparent);
43
+ }
44
+ .fv-epub__info-row {
45
+ display: flex;
46
+ align-items: center;
47
+ justify-content: space-between;
48
+ gap: 0.5rem;
49
+ }
50
+ .fv-epub__info-left {
51
+ display: flex;
52
+ align-items: center;
53
+ gap: 0.5rem;
54
+ min-width: 0;
55
+ flex: 1;
56
+ }
57
+ .fv-epub__info-icon {
58
+ color: var(--fv-muted-foreground);
59
+ flex-shrink: 0;
60
+ }
61
+ .fv-epub__info-title {
62
+ font-size: var(--fv-font-size-sm);
63
+ font-weight: 500;
64
+ overflow: hidden;
65
+ text-overflow: ellipsis;
66
+ white-space: nowrap;
67
+ }
68
+ .fv-epub__info-author {
69
+ font-size: var(--fv-font-size-xs);
70
+ color: var(--fv-muted-foreground);
71
+ flex-shrink: 0;
72
+ }
73
+ .fv-epub__info-right {
74
+ display: flex;
75
+ align-items: center;
76
+ gap: 0.5rem;
77
+ flex-shrink: 0;
78
+ }
79
+
80
+ /* Search */
81
+ .fv-epub__search-wrap {
82
+ position: relative;
83
+ }
84
+ .fv-epub__search-icon {
85
+ position: absolute;
86
+ left: 0.5rem;
87
+ top: 50%;
88
+ transform: translateY(-50%);
89
+ color: var(--fv-muted-foreground);
90
+ pointer-events: none;
91
+ }
92
+ .fv-epub__search-input {
93
+ height: 1.75rem;
94
+ width: 7rem;
95
+ padding: 0 0.5rem 0 1.75rem;
96
+ font-size: var(--fv-font-size-xs);
97
+ background: var(--fv-primary-foreground, #fff);
98
+ border: 1px solid var(--fv-border);
99
+ border-radius: var(--fv-radius);
100
+ outline: none;
101
+ color: var(--fv-primary);
102
+ }
103
+ @media (min-width: 640px) {
104
+ .fv-epub__search-input {
105
+ width: 12rem;
106
+ }
107
+ }
108
+ .fv-epub__search-input:focus {
109
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--fv-primary) 20%, transparent);
110
+ }
111
+ .fv-epub__search-clear {
112
+ position: absolute;
113
+ right: 0.375rem;
114
+ top: 50%;
115
+ transform: translateY(-50%);
116
+ padding: 0;
117
+ border: none;
118
+ background: none;
119
+ color: var(--fv-muted-foreground);
120
+ cursor: pointer;
121
+ }
122
+ .fv-epub__search-clear:hover {
123
+ color: var(--fv-primary);
124
+ }
125
+
126
+ /* TOC toggle */
127
+ .fv-epub__toc-btn {
128
+ padding: 0.375rem;
129
+ border-radius: var(--fv-radius);
130
+ border: none;
131
+ background: none;
132
+ color: var(--fv-muted-foreground);
133
+ cursor: pointer;
134
+ transition: background 0.15s, color 0.15s;
135
+ }
136
+ .fv-epub__toc-btn:hover {
137
+ background: var(--fv-muted);
138
+ color: var(--fv-primary);
139
+ }
140
+ .fv-epub__toc-btn--active {
141
+ background: color-mix(in srgb, var(--fv-primary) 10%, transparent);
142
+ color: var(--fv-primary);
143
+ }
144
+
145
+ /* ── Search results ── */
146
+ .fv-epub__search-results {
147
+ padding: 0.5rem 1rem;
148
+ border-bottom: 1px solid var(--fv-border);
149
+ background: color-mix(in srgb, var(--fv-muted) 20%, transparent);
150
+ max-height: 10rem;
151
+ overflow-y: auto;
152
+ }
153
+ .fv-epub__search-results-label {
154
+ font-size: var(--fv-font-size-xs);
155
+ color: var(--fv-muted-foreground);
156
+ margin-bottom: 0.25rem;
157
+ }
158
+ .fv-epub__search-results-list {
159
+ display: flex;
160
+ flex-direction: column;
161
+ gap: 0.25rem;
162
+ }
163
+ .fv-epub__search-result-item {
164
+ display: block;
165
+ width: 100%;
166
+ text-align: left;
167
+ padding: 0.25rem 0.5rem;
168
+ font-size: var(--fv-font-size-xs);
169
+ border-radius: var(--fv-radius);
170
+ border: none;
171
+ background: none;
172
+ color: var(--fv-primary);
173
+ cursor: pointer;
174
+ transition: background 0.15s;
175
+ }
176
+ .fv-epub__search-result-item:hover {
177
+ background: var(--fv-muted);
178
+ }
179
+ .fv-epub__search-result-title {
180
+ font-weight: 500;
181
+ color: var(--fv-primary);
182
+ }
183
+ .fv-epub__search-result-snippet {
184
+ color: var(--fv-muted-foreground);
185
+ margin-left: 0.5rem;
186
+ }
187
+ .fv-epub__search-empty {
188
+ padding: 0.5rem 1rem;
189
+ border-bottom: 1px solid var(--fv-border);
190
+ background: color-mix(in srgb, var(--fv-muted) 20%, transparent);
191
+ }
192
+ .fv-epub__search-empty-text {
193
+ font-size: var(--fv-font-size-xs);
194
+ color: var(--fv-muted-foreground);
195
+ }
196
+
197
+ /* ── Main body ── */
198
+ .fv-epub__body {
199
+ display: flex;
200
+ flex: 1;
201
+ min-height: 0;
202
+ }
203
+
204
+ /* TOC sidebar */
205
+ .fv-epub__toc-sidebar {
206
+ width: 14rem;
207
+ flex-shrink: 0;
208
+ border-right: 1px solid var(--fv-border);
209
+ overflow-y: auto;
210
+ background: var(--fv-primary-foreground, #fff);
211
+ }
212
+ @media (min-width: 640px) {
213
+ .fv-epub__toc-sidebar {
214
+ width: 16rem;
215
+ }
216
+ }
217
+ .fv-epub__toc-inner {
218
+ padding: 0.75rem;
219
+ }
220
+ .fv-epub__toc-heading {
221
+ font-size: var(--fv-font-size-xs);
222
+ font-weight: 600;
223
+ color: var(--fv-muted-foreground);
224
+ text-transform: uppercase;
225
+ letter-spacing: 0.05em;
226
+ margin-bottom: 0.5rem;
227
+ }
228
+ .fv-epub__toc-list {
229
+ display: flex;
230
+ flex-direction: column;
231
+ gap: 0.125rem;
232
+ }
233
+ .fv-epub__toc-item {
234
+ display: block;
235
+ width: 100%;
236
+ text-align: left;
237
+ padding: 0.375rem 0.5rem;
238
+ font-size: var(--fv-font-size-xs);
239
+ border-radius: var(--fv-radius);
240
+ border: none;
241
+ background: none;
242
+ cursor: pointer;
243
+ transition: background 0.15s, color 0.15s;
244
+ }
245
+ .fv-epub__toc-item--active {
246
+ background: color-mix(in srgb, var(--fv-primary) 10%, transparent);
247
+ color: var(--fv-primary);
248
+ font-weight: 500;
249
+ }
250
+ .fv-epub__toc-item:not(.fv-epub__toc-item--active):not(:disabled) {
251
+ color: var(--fv-muted-foreground);
252
+ }
253
+ .fv-epub__toc-item:not(.fv-epub__toc-item--active):hover:not(:disabled) {
254
+ background: var(--fv-muted);
255
+ color: var(--fv-primary);
256
+ }
257
+ .fv-epub__toc-item:disabled {
258
+ color: color-mix(in srgb, var(--fv-muted-foreground) 50%, transparent);
259
+ cursor: default;
260
+ }
261
+ .fv-epub__toc-indent {
262
+ margin-left: 0.75rem;
263
+ border-left: 1px solid var(--fv-border);
264
+ padding-left: 0.5rem;
265
+ }
266
+
267
+ /* Main content area */
268
+ .fv-epub__main {
269
+ flex: 1;
270
+ display: flex;
271
+ flex-direction: column;
272
+ min-width: 0;
273
+ }
274
+
275
+ /* Chapter selector bar */
276
+ .fv-epub__chapter-bar {
277
+ display: flex;
278
+ align-items: center;
279
+ gap: 0.5rem;
280
+ padding: 0.375rem 1rem;
281
+ border-bottom: 1px solid var(--fv-border);
282
+ flex-shrink: 0;
283
+ }
284
+ .fv-epub__chapter-nav-btn {
285
+ padding: 0.25rem;
286
+ border: none;
287
+ background: none;
288
+ color: var(--fv-muted-foreground);
289
+ border-radius: var(--fv-radius);
290
+ cursor: pointer;
291
+ transition: background 0.15s, color 0.15s;
292
+ }
293
+ .fv-epub__chapter-nav-btn:hover:not(:disabled) {
294
+ color: var(--fv-primary);
295
+ background: var(--fv-muted);
296
+ }
297
+ .fv-epub__chapter-nav-btn:disabled {
298
+ opacity: 0.3;
299
+ cursor: not-allowed;
300
+ }
301
+
302
+ /* Chapter dropdown */
303
+ .fv-epub__dropdown-wrap {
304
+ position: relative;
305
+ flex: 1;
306
+ min-width: 0;
307
+ }
308
+ .fv-epub__dropdown-trigger {
309
+ display: flex;
310
+ align-items: center;
311
+ gap: 0.375rem;
312
+ width: 100%;
313
+ padding: 0.25rem 0.5rem;
314
+ font-size: var(--fv-font-size-xs);
315
+ border-radius: var(--fv-radius);
316
+ border: none;
317
+ background: none;
318
+ cursor: pointer;
319
+ text-align: left;
320
+ color: var(--fv-primary);
321
+ transition: background 0.15s;
322
+ }
323
+ .fv-epub__dropdown-trigger:hover {
324
+ background: var(--fv-muted);
325
+ }
326
+ .fv-epub__dropdown-index {
327
+ color: var(--fv-muted-foreground);
328
+ flex-shrink: 0;
329
+ }
330
+ .fv-epub__dropdown-title {
331
+ overflow: hidden;
332
+ text-overflow: ellipsis;
333
+ white-space: nowrap;
334
+ font-weight: 500;
335
+ }
336
+ .fv-epub__dropdown-chevron {
337
+ flex-shrink: 0;
338
+ color: var(--fv-muted-foreground);
339
+ transition: transform 0.15s;
340
+ }
341
+ .fv-epub__dropdown-chevron--open {
342
+ transform: rotate(180deg);
343
+ }
344
+ .fv-epub__dropdown-list {
345
+ position: absolute;
346
+ top: 100%;
347
+ left: 0;
348
+ right: 0;
349
+ margin-top: 0.25rem;
350
+ background: var(--fv-primary-foreground, #fff);
351
+ border: 1px solid var(--fv-border);
352
+ border-radius: var(--fv-radius);
353
+ box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
354
+ z-index: 50;
355
+ max-height: 16rem;
356
+ overflow-y: auto;
357
+ }
358
+ .fv-epub__dropdown-item {
359
+ display: block;
360
+ width: 100%;
361
+ text-align: left;
362
+ padding: 0.375rem 0.75rem;
363
+ font-size: var(--fv-font-size-xs);
364
+ border: none;
365
+ background: none;
366
+ cursor: pointer;
367
+ transition: background 0.15s, color 0.15s;
368
+ }
369
+ .fv-epub__dropdown-item--active {
370
+ background: color-mix(in srgb, var(--fv-primary) 10%, transparent);
371
+ color: var(--fv-primary);
372
+ font-weight: 500;
373
+ }
374
+ .fv-epub__dropdown-item:not(.fv-epub__dropdown-item--active) {
375
+ color: var(--fv-muted-foreground);
376
+ }
377
+ .fv-epub__dropdown-item:not(.fv-epub__dropdown-item--active):hover {
378
+ background: var(--fv-muted);
379
+ color: var(--fv-primary);
380
+ }
381
+ .fv-epub__dropdown-item-index {
382
+ color: color-mix(in srgb, var(--fv-muted-foreground) 60%, transparent);
383
+ margin-right: 0.375rem;
384
+ }
385
+
386
+ /* Chapter content */
387
+ .fv-epub__content {
388
+ flex: 1;
389
+ overflow-y: auto;
390
+ overflow-x: hidden;
391
+ }
392
+ .fv-epub__content-inner {
393
+ max-width: 48rem;
394
+ margin: 0 auto;
395
+ padding: 1rem;
396
+ }
397
+ @media (min-width: 640px) {
398
+ .fv-epub__content-inner {
399
+ padding: 2rem;
400
+ }
401
+ }
402
+ .fv-epub__chapter-title {
403
+ font-size: 1.25rem;
404
+ font-weight: 700;
405
+ margin-bottom: 1.5rem;
406
+ color: var(--fv-primary);
407
+ }
408
+
409
+ /* EPUB rendered content — prose-like styling (replaces Tailwind Typography) */
410
+ .fv-epub__article {
411
+ max-width: none;
412
+ line-height: 1.75;
413
+ color: var(--fv-primary);
414
+ }
415
+ .fv-epub__article img {
416
+ max-width: 100%;
417
+ height: auto;
418
+ border-radius: var(--fv-radius);
419
+ margin: 0.5rem 0;
420
+ }
421
+ .fv-epub__article table {
422
+ width: 100%;
423
+ border-collapse: collapse;
424
+ }
425
+ .fv-epub__article td {
426
+ border: 1px solid var(--fv-border);
427
+ padding: 0.375rem;
428
+ font-size: var(--fv-font-size-xs);
429
+ }
430
+ .fv-epub__article th {
431
+ border: 1px solid var(--fv-border);
432
+ padding: 0.375rem;
433
+ background: var(--fv-muted);
434
+ font-size: var(--fv-font-size-xs);
435
+ font-weight: 500;
436
+ }
437
+ .fv-epub__article a {
438
+ color: var(--fv-primary);
439
+ text-decoration: underline;
440
+ text-decoration-color: color-mix(in srgb, var(--fv-primary) 30%, transparent);
441
+ }
442
+ .fv-epub__article a:hover {
443
+ text-decoration-color: var(--fv-primary);
444
+ }
445
+ .fv-epub__article blockquote {
446
+ border-left: 4px solid color-mix(in srgb, var(--fv-primary) 30%, transparent);
447
+ padding-left: 1rem;
448
+ font-style: italic;
449
+ }
450
+ .fv-epub__article code {
451
+ background: var(--fv-muted);
452
+ padding: 0.125rem 0.25rem;
453
+ border-radius: 0.25rem;
454
+ font-size: var(--fv-font-size-xs);
455
+ }
456
+ .fv-epub__article pre {
457
+ background: var(--fv-muted);
458
+ padding: 0.75rem;
459
+ border-radius: var(--fv-radius);
460
+ overflow-x: auto;
461
+ }
462
+ .fv-epub__article .mbp_pagebreak {
463
+ display: none;
464
+ }
465
+ .fv-epub__article p,
466
+ .fv-epub__article span,
467
+ .fv-epub__article div {
468
+ overflow-wrap: break-word;
469
+ word-wrap: break-word;
470
+ }
471
+
472
+ /* ── Navigation footer ── */
473
+ .fv-epub__footer {
474
+ display: flex;
475
+ align-items: center;
476
+ justify-content: space-between;
477
+ padding: 0.5rem 1rem;
478
+ border-top: 1px solid var(--fv-border);
479
+ background: color-mix(in srgb, var(--fv-muted) 30%, transparent);
480
+ flex-shrink: 0;
481
+ }
482
+ .fv-epub__footer-btn {
483
+ display: flex;
484
+ align-items: center;
485
+ gap: 0.25rem;
486
+ font-size: var(--fv-font-size-sm);
487
+ color: var(--fv-muted-foreground);
488
+ border: none;
489
+ background: none;
490
+ cursor: pointer;
491
+ padding: 0.25rem;
492
+ transition: color 0.15s;
493
+ }
494
+ .fv-epub__footer-btn:hover:not(:disabled) {
495
+ color: var(--fv-primary);
496
+ }
497
+ .fv-epub__footer-btn:disabled {
498
+ opacity: 0.3;
499
+ cursor: not-allowed;
500
+ }
501
+ .fv-epub__footer-label {
502
+ font-size: var(--fv-font-size-xs);
503
+ color: var(--fv-muted-foreground);
504
+ }
505
+ @media (max-width: 639px) {
506
+ .fv-epub__footer-btn-text {
507
+ display: none;
508
+ }
509
+ }
@@ -0,0 +1,15 @@
1
+ .fv-html {
2
+ display: flex;
3
+ flex-direction: column;
4
+ height: 100%;
5
+ }
6
+ .fv-html__content {
7
+ flex: 1;
8
+ min-height: 0;
9
+ }
10
+ .fv-html__iframe {
11
+ width: 100%;
12
+ height: 100%;
13
+ border: 0;
14
+ min-height: 500px;
15
+ }
@@ -0,0 +1,45 @@
1
+ .fv-image {
2
+ display: flex;
3
+ flex-direction: column;
4
+ height: 100%;
5
+ }
6
+ .fv-image__toolbar {
7
+ display: flex;
8
+ align-items: center;
9
+ justify-content: center;
10
+ gap: 0.5rem;
11
+ padding: 0.75rem;
12
+ border-bottom: 1px solid var(--fv-border);
13
+ background: color-mix(in srgb, var(--fv-muted) 30%, transparent);
14
+ }
15
+ .fv-image__zoom-label {
16
+ font-size: var(--fv-font-size-sm);
17
+ font-family: var(--fv-font-mono);
18
+ min-width: 4rem;
19
+ text-align: center;
20
+ }
21
+ .fv-image__reset-btn {
22
+ padding: 0.25rem 0.75rem;
23
+ border-radius: var(--fv-radius);
24
+ font-size: var(--fv-font-size-xs);
25
+ background: none;
26
+ border: none;
27
+ cursor: pointer;
28
+ color: var(--fv-primary);
29
+ }
30
+ .fv-image__reset-btn:hover {
31
+ background: var(--fv-muted);
32
+ }
33
+ .fv-image__canvas {
34
+ flex: 1;
35
+ display: flex;
36
+ align-items: center;
37
+ justify-content: center;
38
+ padding: 1.5rem;
39
+ overflow: auto;
40
+ background: repeating-conic-gradient(rgba(128, 128, 128, 0.125) 0% 25%, transparent 0% 50%) 0 0 / 20px 20px;
41
+ }
42
+ .fv-image__img {
43
+ max-width: 100%;
44
+ transition: transform 0.2s;
45
+ }
@@ -0,0 +1,55 @@
1
+ .fv-gate-warning {
2
+ border-bottom: 1px solid var(--fv-border);
3
+ background: var(--fv-warning-bg, #fffbeb);
4
+ padding: 0.5rem 0.75rem;
5
+ font-size: var(--fv-font-size-xs);
6
+ color: var(--fv-warning-fg, #92400e);
7
+ }
8
+ [data-fv-theme="dark"] .fv-gate-warning {
9
+ background: rgba(180, 83, 9, 0.15);
10
+ color: #fbbf24;
11
+ }
12
+ .fv-gate-warning__inner {
13
+ display: flex;
14
+ align-items: center;
15
+ gap: 0.5rem;
16
+ }
17
+ .fv-gate-confirm {
18
+ display: flex;
19
+ flex-direction: column;
20
+ align-items: center;
21
+ justify-content: center;
22
+ height: 100%;
23
+ min-height: 320px;
24
+ gap: 1rem;
25
+ padding: 1.5rem;
26
+ text-align: center;
27
+ }
28
+ .fv-gate-confirm__icon {
29
+ color: var(--fv-warning);
30
+ }
31
+ .fv-gate-confirm__icon--block {
32
+ color: var(--fv-danger);
33
+ }
34
+ .fv-gate-confirm__body {
35
+ display: flex;
36
+ flex-direction: column;
37
+ gap: 0.5rem;
38
+ }
39
+ .fv-gate-confirm__title {
40
+ font-size: var(--fv-font-size-lg);
41
+ font-weight: 600;
42
+ }
43
+ .fv-gate-confirm__desc {
44
+ font-size: var(--fv-font-size-sm);
45
+ color: var(--fv-muted-foreground);
46
+ max-width: 28rem;
47
+ }
48
+ .fv-gate-confirm__meta {
49
+ font-size: var(--fv-font-size-xs);
50
+ color: var(--fv-muted-foreground);
51
+ }
52
+ .fv-gate-confirm__actions {
53
+ display: flex;
54
+ gap: 0.5rem;
55
+ }