web-doc 0.3.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 (308) hide show
  1. package/LICENSE-APACHE +201 -0
  2. package/LICENSE-MIT +21 -0
  3. package/README.md +148 -0
  4. package/THIRD_PARTY_NOTICES.md +20 -0
  5. package/bin/copy-assets.mjs +27 -0
  6. package/dist/abort.d.ts +1 -0
  7. package/dist/abort.js +18 -0
  8. package/dist/adapters/bitmap.d.ts +9 -0
  9. package/dist/adapters/bitmap.js +63 -0
  10. package/dist/adapters/csv-parser.d.ts +7 -0
  11. package/dist/adapters/csv-parser.js +124 -0
  12. package/dist/adapters/csv.d.ts +26 -0
  13. package/dist/adapters/csv.js +231 -0
  14. package/dist/adapters/image.d.ts +41 -0
  15. package/dist/adapters/image.js +198 -0
  16. package/dist/adapters/office.d.ts +211 -0
  17. package/dist/adapters/office.js +672 -0
  18. package/dist/adapters/pdf.d.ts +32 -0
  19. package/dist/adapters/pdf.js +429 -0
  20. package/dist/adapters/svg.d.ts +17 -0
  21. package/dist/adapters/svg.js +123 -0
  22. package/dist/assets/image/index.d.ts +75 -0
  23. package/dist/assets/image/index.js +289 -0
  24. package/dist/assets/image/index_bg.wasm +0 -0
  25. package/dist/assets/image/index_bg.wasm.d.ts +12 -0
  26. package/dist/assets/legacy/index.d.ts +54 -0
  27. package/dist/assets/legacy/index.js +306 -0
  28. package/dist/assets/legacy/index_bg.wasm +0 -0
  29. package/dist/assets/legacy/index_bg.wasm.d.ts +9 -0
  30. package/dist/assets/pdfjs/cmaps/78-EUC-H.bcmap +0 -0
  31. package/dist/assets/pdfjs/cmaps/78-EUC-V.bcmap +0 -0
  32. package/dist/assets/pdfjs/cmaps/78-H.bcmap +0 -0
  33. package/dist/assets/pdfjs/cmaps/78-RKSJ-H.bcmap +0 -0
  34. package/dist/assets/pdfjs/cmaps/78-RKSJ-V.bcmap +0 -0
  35. package/dist/assets/pdfjs/cmaps/78-V.bcmap +0 -0
  36. package/dist/assets/pdfjs/cmaps/78ms-RKSJ-H.bcmap +0 -0
  37. package/dist/assets/pdfjs/cmaps/78ms-RKSJ-V.bcmap +0 -0
  38. package/dist/assets/pdfjs/cmaps/83pv-RKSJ-H.bcmap +0 -0
  39. package/dist/assets/pdfjs/cmaps/90ms-RKSJ-H.bcmap +0 -0
  40. package/dist/assets/pdfjs/cmaps/90ms-RKSJ-V.bcmap +0 -0
  41. package/dist/assets/pdfjs/cmaps/90msp-RKSJ-H.bcmap +0 -0
  42. package/dist/assets/pdfjs/cmaps/90msp-RKSJ-V.bcmap +0 -0
  43. package/dist/assets/pdfjs/cmaps/90pv-RKSJ-H.bcmap +0 -0
  44. package/dist/assets/pdfjs/cmaps/90pv-RKSJ-V.bcmap +0 -0
  45. package/dist/assets/pdfjs/cmaps/Add-H.bcmap +0 -0
  46. package/dist/assets/pdfjs/cmaps/Add-RKSJ-H.bcmap +0 -0
  47. package/dist/assets/pdfjs/cmaps/Add-RKSJ-V.bcmap +0 -0
  48. package/dist/assets/pdfjs/cmaps/Add-V.bcmap +0 -0
  49. package/dist/assets/pdfjs/cmaps/Adobe-CNS1-0.bcmap +0 -0
  50. package/dist/assets/pdfjs/cmaps/Adobe-CNS1-1.bcmap +0 -0
  51. package/dist/assets/pdfjs/cmaps/Adobe-CNS1-2.bcmap +0 -0
  52. package/dist/assets/pdfjs/cmaps/Adobe-CNS1-3.bcmap +0 -0
  53. package/dist/assets/pdfjs/cmaps/Adobe-CNS1-4.bcmap +0 -0
  54. package/dist/assets/pdfjs/cmaps/Adobe-CNS1-5.bcmap +0 -0
  55. package/dist/assets/pdfjs/cmaps/Adobe-CNS1-6.bcmap +0 -0
  56. package/dist/assets/pdfjs/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
  57. package/dist/assets/pdfjs/cmaps/Adobe-GB1-0.bcmap +0 -0
  58. package/dist/assets/pdfjs/cmaps/Adobe-GB1-1.bcmap +0 -0
  59. package/dist/assets/pdfjs/cmaps/Adobe-GB1-2.bcmap +0 -0
  60. package/dist/assets/pdfjs/cmaps/Adobe-GB1-3.bcmap +0 -0
  61. package/dist/assets/pdfjs/cmaps/Adobe-GB1-4.bcmap +0 -0
  62. package/dist/assets/pdfjs/cmaps/Adobe-GB1-5.bcmap +0 -0
  63. package/dist/assets/pdfjs/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
  64. package/dist/assets/pdfjs/cmaps/Adobe-Japan1-0.bcmap +0 -0
  65. package/dist/assets/pdfjs/cmaps/Adobe-Japan1-1.bcmap +0 -0
  66. package/dist/assets/pdfjs/cmaps/Adobe-Japan1-2.bcmap +0 -0
  67. package/dist/assets/pdfjs/cmaps/Adobe-Japan1-3.bcmap +0 -0
  68. package/dist/assets/pdfjs/cmaps/Adobe-Japan1-4.bcmap +0 -0
  69. package/dist/assets/pdfjs/cmaps/Adobe-Japan1-5.bcmap +0 -0
  70. package/dist/assets/pdfjs/cmaps/Adobe-Japan1-6.bcmap +0 -0
  71. package/dist/assets/pdfjs/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
  72. package/dist/assets/pdfjs/cmaps/Adobe-Korea1-0.bcmap +0 -0
  73. package/dist/assets/pdfjs/cmaps/Adobe-Korea1-1.bcmap +0 -0
  74. package/dist/assets/pdfjs/cmaps/Adobe-Korea1-2.bcmap +0 -0
  75. package/dist/assets/pdfjs/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
  76. package/dist/assets/pdfjs/cmaps/B5-H.bcmap +0 -0
  77. package/dist/assets/pdfjs/cmaps/B5-V.bcmap +0 -0
  78. package/dist/assets/pdfjs/cmaps/B5pc-H.bcmap +0 -0
  79. package/dist/assets/pdfjs/cmaps/B5pc-V.bcmap +0 -0
  80. package/dist/assets/pdfjs/cmaps/CNS-EUC-H.bcmap +0 -0
  81. package/dist/assets/pdfjs/cmaps/CNS-EUC-V.bcmap +0 -0
  82. package/dist/assets/pdfjs/cmaps/CNS1-H.bcmap +0 -0
  83. package/dist/assets/pdfjs/cmaps/CNS1-V.bcmap +0 -0
  84. package/dist/assets/pdfjs/cmaps/CNS2-H.bcmap +0 -0
  85. package/dist/assets/pdfjs/cmaps/CNS2-V.bcmap +3 -0
  86. package/dist/assets/pdfjs/cmaps/ETHK-B5-H.bcmap +0 -0
  87. package/dist/assets/pdfjs/cmaps/ETHK-B5-V.bcmap +0 -0
  88. package/dist/assets/pdfjs/cmaps/ETen-B5-H.bcmap +0 -0
  89. package/dist/assets/pdfjs/cmaps/ETen-B5-V.bcmap +0 -0
  90. package/dist/assets/pdfjs/cmaps/ETenms-B5-H.bcmap +3 -0
  91. package/dist/assets/pdfjs/cmaps/ETenms-B5-V.bcmap +0 -0
  92. package/dist/assets/pdfjs/cmaps/EUC-H.bcmap +0 -0
  93. package/dist/assets/pdfjs/cmaps/EUC-V.bcmap +0 -0
  94. package/dist/assets/pdfjs/cmaps/Ext-H.bcmap +0 -0
  95. package/dist/assets/pdfjs/cmaps/Ext-RKSJ-H.bcmap +0 -0
  96. package/dist/assets/pdfjs/cmaps/Ext-RKSJ-V.bcmap +0 -0
  97. package/dist/assets/pdfjs/cmaps/Ext-V.bcmap +0 -0
  98. package/dist/assets/pdfjs/cmaps/GB-EUC-H.bcmap +0 -0
  99. package/dist/assets/pdfjs/cmaps/GB-EUC-V.bcmap +0 -0
  100. package/dist/assets/pdfjs/cmaps/GB-H.bcmap +4 -0
  101. package/dist/assets/pdfjs/cmaps/GB-V.bcmap +0 -0
  102. package/dist/assets/pdfjs/cmaps/GBK-EUC-H.bcmap +0 -0
  103. package/dist/assets/pdfjs/cmaps/GBK-EUC-V.bcmap +0 -0
  104. package/dist/assets/pdfjs/cmaps/GBK2K-H.bcmap +0 -0
  105. package/dist/assets/pdfjs/cmaps/GBK2K-V.bcmap +0 -0
  106. package/dist/assets/pdfjs/cmaps/GBKp-EUC-H.bcmap +0 -0
  107. package/dist/assets/pdfjs/cmaps/GBKp-EUC-V.bcmap +0 -0
  108. package/dist/assets/pdfjs/cmaps/GBT-EUC-H.bcmap +0 -0
  109. package/dist/assets/pdfjs/cmaps/GBT-EUC-V.bcmap +0 -0
  110. package/dist/assets/pdfjs/cmaps/GBT-H.bcmap +0 -0
  111. package/dist/assets/pdfjs/cmaps/GBT-V.bcmap +0 -0
  112. package/dist/assets/pdfjs/cmaps/GBTpc-EUC-H.bcmap +0 -0
  113. package/dist/assets/pdfjs/cmaps/GBTpc-EUC-V.bcmap +0 -0
  114. package/dist/assets/pdfjs/cmaps/GBpc-EUC-H.bcmap +0 -0
  115. package/dist/assets/pdfjs/cmaps/GBpc-EUC-V.bcmap +0 -0
  116. package/dist/assets/pdfjs/cmaps/H.bcmap +0 -0
  117. package/dist/assets/pdfjs/cmaps/HKdla-B5-H.bcmap +0 -0
  118. package/dist/assets/pdfjs/cmaps/HKdla-B5-V.bcmap +0 -0
  119. package/dist/assets/pdfjs/cmaps/HKdlb-B5-H.bcmap +0 -0
  120. package/dist/assets/pdfjs/cmaps/HKdlb-B5-V.bcmap +0 -0
  121. package/dist/assets/pdfjs/cmaps/HKgccs-B5-H.bcmap +0 -0
  122. package/dist/assets/pdfjs/cmaps/HKgccs-B5-V.bcmap +0 -0
  123. package/dist/assets/pdfjs/cmaps/HKm314-B5-H.bcmap +0 -0
  124. package/dist/assets/pdfjs/cmaps/HKm314-B5-V.bcmap +0 -0
  125. package/dist/assets/pdfjs/cmaps/HKm471-B5-H.bcmap +0 -0
  126. package/dist/assets/pdfjs/cmaps/HKm471-B5-V.bcmap +0 -0
  127. package/dist/assets/pdfjs/cmaps/HKscs-B5-H.bcmap +0 -0
  128. package/dist/assets/pdfjs/cmaps/HKscs-B5-V.bcmap +0 -0
  129. package/dist/assets/pdfjs/cmaps/Hankaku.bcmap +0 -0
  130. package/dist/assets/pdfjs/cmaps/Hiragana.bcmap +0 -0
  131. package/dist/assets/pdfjs/cmaps/KSC-EUC-H.bcmap +0 -0
  132. package/dist/assets/pdfjs/cmaps/KSC-EUC-V.bcmap +0 -0
  133. package/dist/assets/pdfjs/cmaps/KSC-H.bcmap +0 -0
  134. package/dist/assets/pdfjs/cmaps/KSC-Johab-H.bcmap +0 -0
  135. package/dist/assets/pdfjs/cmaps/KSC-Johab-V.bcmap +0 -0
  136. package/dist/assets/pdfjs/cmaps/KSC-V.bcmap +0 -0
  137. package/dist/assets/pdfjs/cmaps/KSCms-UHC-H.bcmap +0 -0
  138. package/dist/assets/pdfjs/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
  139. package/dist/assets/pdfjs/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
  140. package/dist/assets/pdfjs/cmaps/KSCms-UHC-V.bcmap +0 -0
  141. package/dist/assets/pdfjs/cmaps/KSCpc-EUC-H.bcmap +0 -0
  142. package/dist/assets/pdfjs/cmaps/KSCpc-EUC-V.bcmap +0 -0
  143. package/dist/assets/pdfjs/cmaps/Katakana.bcmap +0 -0
  144. package/dist/assets/pdfjs/cmaps/LICENSE +36 -0
  145. package/dist/assets/pdfjs/cmaps/NWP-H.bcmap +0 -0
  146. package/dist/assets/pdfjs/cmaps/NWP-V.bcmap +0 -0
  147. package/dist/assets/pdfjs/cmaps/RKSJ-H.bcmap +0 -0
  148. package/dist/assets/pdfjs/cmaps/RKSJ-V.bcmap +0 -0
  149. package/dist/assets/pdfjs/cmaps/Roman.bcmap +0 -0
  150. package/dist/assets/pdfjs/cmaps/UniCNS-UCS2-H.bcmap +0 -0
  151. package/dist/assets/pdfjs/cmaps/UniCNS-UCS2-V.bcmap +0 -0
  152. package/dist/assets/pdfjs/cmaps/UniCNS-UTF16-H.bcmap +0 -0
  153. package/dist/assets/pdfjs/cmaps/UniCNS-UTF16-V.bcmap +0 -0
  154. package/dist/assets/pdfjs/cmaps/UniCNS-UTF32-H.bcmap +0 -0
  155. package/dist/assets/pdfjs/cmaps/UniCNS-UTF32-V.bcmap +0 -0
  156. package/dist/assets/pdfjs/cmaps/UniCNS-UTF8-H.bcmap +0 -0
  157. package/dist/assets/pdfjs/cmaps/UniCNS-UTF8-V.bcmap +0 -0
  158. package/dist/assets/pdfjs/cmaps/UniGB-UCS2-H.bcmap +0 -0
  159. package/dist/assets/pdfjs/cmaps/UniGB-UCS2-V.bcmap +0 -0
  160. package/dist/assets/pdfjs/cmaps/UniGB-UTF16-H.bcmap +0 -0
  161. package/dist/assets/pdfjs/cmaps/UniGB-UTF16-V.bcmap +0 -0
  162. package/dist/assets/pdfjs/cmaps/UniGB-UTF32-H.bcmap +0 -0
  163. package/dist/assets/pdfjs/cmaps/UniGB-UTF32-V.bcmap +0 -0
  164. package/dist/assets/pdfjs/cmaps/UniGB-UTF8-H.bcmap +0 -0
  165. package/dist/assets/pdfjs/cmaps/UniGB-UTF8-V.bcmap +0 -0
  166. package/dist/assets/pdfjs/cmaps/UniJIS-UCS2-H.bcmap +0 -0
  167. package/dist/assets/pdfjs/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
  168. package/dist/assets/pdfjs/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
  169. package/dist/assets/pdfjs/cmaps/UniJIS-UCS2-V.bcmap +0 -0
  170. package/dist/assets/pdfjs/cmaps/UniJIS-UTF16-H.bcmap +0 -0
  171. package/dist/assets/pdfjs/cmaps/UniJIS-UTF16-V.bcmap +0 -0
  172. package/dist/assets/pdfjs/cmaps/UniJIS-UTF32-H.bcmap +0 -0
  173. package/dist/assets/pdfjs/cmaps/UniJIS-UTF32-V.bcmap +0 -0
  174. package/dist/assets/pdfjs/cmaps/UniJIS-UTF8-H.bcmap +0 -0
  175. package/dist/assets/pdfjs/cmaps/UniJIS-UTF8-V.bcmap +0 -0
  176. package/dist/assets/pdfjs/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
  177. package/dist/assets/pdfjs/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
  178. package/dist/assets/pdfjs/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
  179. package/dist/assets/pdfjs/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
  180. package/dist/assets/pdfjs/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
  181. package/dist/assets/pdfjs/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
  182. package/dist/assets/pdfjs/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
  183. package/dist/assets/pdfjs/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
  184. package/dist/assets/pdfjs/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
  185. package/dist/assets/pdfjs/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
  186. package/dist/assets/pdfjs/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
  187. package/dist/assets/pdfjs/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
  188. package/dist/assets/pdfjs/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
  189. package/dist/assets/pdfjs/cmaps/UniKS-UCS2-H.bcmap +0 -0
  190. package/dist/assets/pdfjs/cmaps/UniKS-UCS2-V.bcmap +0 -0
  191. package/dist/assets/pdfjs/cmaps/UniKS-UTF16-H.bcmap +0 -0
  192. package/dist/assets/pdfjs/cmaps/UniKS-UTF16-V.bcmap +0 -0
  193. package/dist/assets/pdfjs/cmaps/UniKS-UTF32-H.bcmap +0 -0
  194. package/dist/assets/pdfjs/cmaps/UniKS-UTF32-V.bcmap +0 -0
  195. package/dist/assets/pdfjs/cmaps/UniKS-UTF8-H.bcmap +0 -0
  196. package/dist/assets/pdfjs/cmaps/UniKS-UTF8-V.bcmap +0 -0
  197. package/dist/assets/pdfjs/cmaps/V.bcmap +0 -0
  198. package/dist/assets/pdfjs/cmaps/WP-Symbol.bcmap +0 -0
  199. package/dist/assets/pdfjs/iccs/CGATS001Compat-v2-micro.icc +0 -0
  200. package/dist/assets/pdfjs/iccs/LICENSE +116 -0
  201. package/dist/assets/pdfjs/standard_fonts/FoxitDingbats.pfb +0 -0
  202. package/dist/assets/pdfjs/standard_fonts/FoxitFixed.pfb +0 -0
  203. package/dist/assets/pdfjs/standard_fonts/FoxitFixedBold.pfb +0 -0
  204. package/dist/assets/pdfjs/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
  205. package/dist/assets/pdfjs/standard_fonts/FoxitFixedItalic.pfb +0 -0
  206. package/dist/assets/pdfjs/standard_fonts/FoxitSerif.pfb +0 -0
  207. package/dist/assets/pdfjs/standard_fonts/FoxitSerifBold.pfb +0 -0
  208. package/dist/assets/pdfjs/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
  209. package/dist/assets/pdfjs/standard_fonts/FoxitSerifItalic.pfb +0 -0
  210. package/dist/assets/pdfjs/standard_fonts/FoxitSymbol.pfb +0 -0
  211. package/dist/assets/pdfjs/standard_fonts/LICENSE_FOXIT +27 -0
  212. package/dist/assets/pdfjs/standard_fonts/LICENSE_LIBERATION +102 -0
  213. package/dist/assets/pdfjs/standard_fonts/LiberationSans-Bold.ttf +0 -0
  214. package/dist/assets/pdfjs/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
  215. package/dist/assets/pdfjs/standard_fonts/LiberationSans-Italic.ttf +0 -0
  216. package/dist/assets/pdfjs/standard_fonts/LiberationSans-Regular.ttf +0 -0
  217. package/dist/assets/pdfjs/wasm/LICENSE_JBIG2 +196 -0
  218. package/dist/assets/pdfjs/wasm/LICENSE_OPENJPEG +39 -0
  219. package/dist/assets/pdfjs/wasm/LICENSE_PDFJS_JBIG2 +13 -0
  220. package/dist/assets/pdfjs/wasm/LICENSE_PDFJS_OPENJPEG +22 -0
  221. package/dist/assets/pdfjs/wasm/LICENSE_PDFJS_QCMS +22 -0
  222. package/dist/assets/pdfjs/wasm/LICENSE_QCMS +21 -0
  223. package/dist/assets/pdfjs/wasm/jbig2.wasm +0 -0
  224. package/dist/assets/pdfjs/wasm/jbig2_nowasm_fallback.js +15 -0
  225. package/dist/assets/pdfjs/wasm/openjpeg.wasm +0 -0
  226. package/dist/assets/pdfjs/wasm/openjpeg_nowasm_fallback.js +17 -0
  227. package/dist/assets/pdfjs/wasm/qcms_bg.wasm +0 -0
  228. package/dist/assets/pdfjs/wasm/quickjs-eval.js +16 -0
  229. package/dist/assets/pdfjs/wasm/quickjs-eval.wasm +0 -0
  230. package/dist/client.d.ts +20 -0
  231. package/dist/client.js +82 -0
  232. package/dist/contracts.d.ts +379 -0
  233. package/dist/contracts.js +22 -0
  234. package/dist/csv-worker.d.ts +1 -0
  235. package/dist/csv-worker.js +17 -0
  236. package/dist/detect.d.ts +15 -0
  237. package/dist/detect.js +290 -0
  238. package/dist/errors.d.ts +14 -0
  239. package/dist/errors.js +40 -0
  240. package/dist/font-manifest.d.ts +11 -0
  241. package/dist/font-manifest.js +31 -0
  242. package/dist/fonts/OFL-1.1.txt +88 -0
  243. package/dist/fonts/THIRD_PARTY_NOTICES.md +10 -0
  244. package/dist/fonts/manifest.json +83 -0
  245. package/dist/fonts/noto-sans-arabic.woff2 +0 -0
  246. package/dist/fonts/noto-sans-bengali.woff2 +0 -0
  247. package/dist/fonts/noto-sans-cjk.woff2 +0 -0
  248. package/dist/fonts/noto-sans-devanagari.woff2 +0 -0
  249. package/dist/fonts/noto-sans-gujarati.woff2 +0 -0
  250. package/dist/fonts/noto-sans-gurmukhi.woff2 +0 -0
  251. package/dist/fonts/noto-sans-japanese.woff2 +0 -0
  252. package/dist/fonts/noto-sans-kannada.woff2 +0 -0
  253. package/dist/fonts/noto-sans-korean.woff2 +0 -0
  254. package/dist/fonts/noto-sans-latin-cyrillic.woff2 +0 -0
  255. package/dist/fonts/noto-sans-malayalam.woff2 +0 -0
  256. package/dist/fonts/noto-sans-odia.woff2 +0 -0
  257. package/dist/fonts/noto-sans-tamil.woff2 +0 -0
  258. package/dist/fonts/noto-sans-telugu.woff2 +0 -0
  259. package/dist/fonts.d.ts +20 -0
  260. package/dist/fonts.js +238 -0
  261. package/dist/format.d.ts +1 -0
  262. package/dist/format.js +1 -0
  263. package/dist/headless.d.ts +18 -0
  264. package/dist/headless.js +18 -0
  265. package/dist/i18n.d.ts +4 -0
  266. package/dist/i18n.js +55 -0
  267. package/dist/image-worker.d.ts +1 -0
  268. package/dist/image-worker.js +41 -0
  269. package/dist/index.d.ts +27 -0
  270. package/dist/index.js +29 -0
  271. package/dist/interaction.d.ts +24 -0
  272. package/dist/interaction.js +183 -0
  273. package/dist/legacy-converter-worker.d.ts +1 -0
  274. package/dist/legacy-converter-worker.js +19 -0
  275. package/dist/limits.d.ts +4 -0
  276. package/dist/limits.js +162 -0
  277. package/dist/registry.d.ts +8 -0
  278. package/dist/registry.js +35 -0
  279. package/dist/render-scheduler.d.ts +8 -0
  280. package/dist/render-scheduler.js +63 -0
  281. package/dist/source.d.ts +14 -0
  282. package/dist/source.js +116 -0
  283. package/dist/spreadsheet-viewport.d.ts +34 -0
  284. package/dist/spreadsheet-viewport.js +1035 -0
  285. package/dist/styles.css +137 -0
  286. package/dist/ui-styles.d.ts +1 -0
  287. package/dist/ui-styles.js +139 -0
  288. package/dist/ui.d.ts +8 -0
  289. package/dist/ui.js +390 -0
  290. package/dist/viewer.d.ts +52 -0
  291. package/dist/viewer.js +901 -0
  292. package/dist/viewport.d.ts +54 -0
  293. package/dist/viewport.js +907 -0
  294. package/dist/worker-adapter.d.ts +24 -0
  295. package/dist/worker-adapter.js +97 -0
  296. package/dist/worker-client.d.ts +23 -0
  297. package/dist/worker-client.js +105 -0
  298. package/dist/worker-endpoint.d.ts +13 -0
  299. package/dist/worker-endpoint.js +57 -0
  300. package/dist/worker-protocol.d.ts +48 -0
  301. package/dist/worker-protocol.js +14 -0
  302. package/dist/worker.d.ts +4 -0
  303. package/dist/worker.js +4 -0
  304. package/dist/workers/csv-worker.js +160 -0
  305. package/dist/workers/image-worker.js +41 -0
  306. package/dist/workers/legacy-converter-worker.js +19 -0
  307. package/dist/workers/pdf.worker.min.mjs +28 -0
  308. package/package.json +74 -0
package/dist/detect.js ADDED
@@ -0,0 +1,290 @@
1
+ import { ViewerError } from "./errors.js";
2
+ const extensionFormats = {
3
+ docx: "docx",
4
+ docm: "docm",
5
+ xlsx: "xlsx",
6
+ xlsm: "xlsm",
7
+ pptx: "pptx",
8
+ pptm: "pptm",
9
+ ppsx: "ppsx",
10
+ doc: "doc",
11
+ xls: "xls",
12
+ ppt: "ppt",
13
+ pdf: "pdf",
14
+ csv: "csv",
15
+ tsv: "tsv",
16
+ png: "png",
17
+ jpg: "jpeg",
18
+ jpeg: "jpeg",
19
+ gif: "gif",
20
+ webp: "webp",
21
+ svg: "svg",
22
+ bmp: "bmp",
23
+ tif: "tiff",
24
+ tiff: "tiff",
25
+ };
26
+ const mimeFormats = {
27
+ "application/pdf": "pdf",
28
+ "application/msword": "doc",
29
+ "application/vnd.ms-excel": "xls",
30
+ "application/vnd.ms-powerpoint": "ppt",
31
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "docx",
32
+ "application/vnd.ms-word.document.macroenabled.12": "docm",
33
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "xlsx",
34
+ "application/vnd.ms-excel.sheet.macroenabled.12": "xlsm",
35
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation": "pptx",
36
+ "application/vnd.ms-powerpoint.presentation.macroenabled.12": "pptm",
37
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow": "ppsx",
38
+ "text/csv": "csv",
39
+ "text/tab-separated-values": "tsv",
40
+ "image/png": "png",
41
+ "image/jpeg": "jpeg",
42
+ "image/gif": "gif",
43
+ "image/webp": "webp",
44
+ "image/svg+xml": "svg",
45
+ "image/bmp": "bmp",
46
+ "image/tiff": "tiff",
47
+ };
48
+ export function detectFormat(data, hints = {}) {
49
+ if (isEncryptedOfficeContainer(data))
50
+ throw new ViewerError("encrypted-document", "Password-protected Office documents are not supported");
51
+ const hinted = hints.format ??
52
+ formatFromMime(hints.contentType) ??
53
+ formatFromFileName(hints.fileName ?? "");
54
+ const detected = detectByBytes(data, hinted);
55
+ if (!detected && hinted && ["csv", "tsv", "svg"].includes(hinted))
56
+ return { format: hinted, confidence: "hint", warnings: [] };
57
+ if (!detected)
58
+ throw new ViewerError("unsupported-format", "Unable to detect a supported document format", {
59
+ details: { fileName: hints.fileName, contentType: hints.contentType },
60
+ });
61
+ const format = preserveSubtype(detected, hinted);
62
+ const warnings = [];
63
+ if (hinted && !sameFamily(format, hinted))
64
+ warnings.push({
65
+ code: "format-hint-mismatch",
66
+ message: `Content is ${format}, but the supplied hint was ${hinted}; content wins`,
67
+ details: { detected: format, hinted },
68
+ });
69
+ return {
70
+ format,
71
+ confidence: detected === format ? "magic" : "container",
72
+ warnings,
73
+ };
74
+ }
75
+ function isEncryptedOfficeContainer(data) {
76
+ return (starts(data, [0xd0, 0xcf, 0x11, 0xe0, 0xa1, 0xb1, 0x1a, 0xe1]) &&
77
+ includesUtf16(data, "EncryptionInfo") &&
78
+ includesUtf16(data, "EncryptedPackage"));
79
+ }
80
+ export function formatFromFileName(fileName) {
81
+ const cleanName = fileName.split(/[?#]/, 1)[0] ?? fileName;
82
+ const dot = cleanName.lastIndexOf(".");
83
+ return dot < 0
84
+ ? undefined
85
+ : extensionFormats[cleanName.slice(dot + 1).toLowerCase()];
86
+ }
87
+ export function formatFromMime(contentType) {
88
+ return contentType
89
+ ? mimeFormats[contentType.split(";", 1)[0].trim().toLowerCase()]
90
+ : undefined;
91
+ }
92
+ export function sniffFormat(data) {
93
+ return detectByBytes(data);
94
+ }
95
+ function detectByBytes(data, hint) {
96
+ if (starts(data, [0x25, 0x50, 0x44, 0x46, 0x2d]))
97
+ return "pdf";
98
+ if (starts(data, [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]))
99
+ return "png";
100
+ if (starts(data, [0xff, 0xd8, 0xff]))
101
+ return "jpeg";
102
+ if (ascii(data, 0, 4) === "GIF8")
103
+ return "gif";
104
+ if (ascii(data, 0, 4) === "RIFF" && ascii(data, 8, 12) === "WEBP")
105
+ return "webp";
106
+ if (ascii(data, 0, 2) === "BM")
107
+ return "bmp";
108
+ if (starts(data, [0x49, 0x49, 0x2a, 0x00]) ||
109
+ starts(data, [0x4d, 0x4d, 0x00, 0x2a]))
110
+ return "tiff";
111
+ if (starts(data, [0xd0, 0xcf, 0x11, 0xe0, 0xa1, 0xb1, 0x1a, 0xe1]))
112
+ return detectOle(data) ?? legacyHint(hint);
113
+ if (starts(data, [0x50, 0x4b]))
114
+ return detectOoxml(data) ?? ooxmlHint(hint);
115
+ if (looksLikeSvg(data))
116
+ return "svg";
117
+ return undefined;
118
+ }
119
+ function detectOoxml(data) {
120
+ // Entry names from the central directory are the authoritative signal;
121
+ // scanning the whole buffer misreads compressed part data, where a random
122
+ // "xl/" or "word/" byte run is near-certain in a large media-heavy file.
123
+ const entryNames = readZipEntryNames(data);
124
+ if (entryNames)
125
+ return ooxmlFormatFromEntryNames(entryNames);
126
+ // No readable central directory (typically a truncated prefix passed to
127
+ // sniffFormat): keep the legacy substring scan as a best-effort fallback.
128
+ if (includesAscii(data, "word/"))
129
+ return "docx";
130
+ if (includesAscii(data, "xl/"))
131
+ return "xlsx";
132
+ if (includesAscii(data, "ppt/"))
133
+ return "pptx";
134
+ return undefined;
135
+ }
136
+ function ooxmlFormatFromEntryNames(entryNames) {
137
+ for (const name of entryNames) {
138
+ if (name === "word/document.xml")
139
+ return "docx";
140
+ if (name === "xl/workbook.xml")
141
+ return "xlsx";
142
+ if (name === "ppt/presentation.xml")
143
+ return "pptx";
144
+ }
145
+ if (entryNames.some((name) => name.startsWith("word/")))
146
+ return "docx";
147
+ if (entryNames.some((name) => name.startsWith("xl/")))
148
+ return "xlsx";
149
+ if (entryNames.some((name) => name.startsWith("ppt/")))
150
+ return "pptx";
151
+ return undefined;
152
+ }
153
+ const ZIP_EOCD_SIGNATURE = 0x06054b50;
154
+ const ZIP_CENTRAL_HEADER_SIGNATURE = 0x02014b50;
155
+ const ZIP_CENTRAL_DIGITAL_SIGNATURE = 0x05054b50;
156
+ const ZIP_EOCD_MIN_BYTES = 22;
157
+ // The end-of-central-directory record sits at most a 16-bit comment before
158
+ // the end of the archive.
159
+ const ZIP_EOCD_MAX_SCAN_BYTES = ZIP_EOCD_MIN_BYTES + 0xffff;
160
+ const ZIP_CENTRAL_HEADER_MIN_BYTES = 46;
161
+ /**
162
+ * Reads the archive's entry names from the central directory, or returns
163
+ * undefined when the directory cannot be read consistently (truncated input,
164
+ * zip64 markers, or corrupted records). Parsing is bounded by the record
165
+ * count and validated against the buffer on every step.
166
+ */
167
+ function readZipEntryNames(data) {
168
+ if (data.byteLength < ZIP_EOCD_MIN_BYTES)
169
+ return undefined;
170
+ const view = new DataView(data.buffer, data.byteOffset, data.byteLength);
171
+ const stop = Math.max(0, view.byteLength - ZIP_EOCD_MAX_SCAN_BYTES);
172
+ let eocdOffset = -1;
173
+ for (let offset = view.byteLength - ZIP_EOCD_MIN_BYTES; offset >= stop; offset -= 1) {
174
+ if (view.getUint32(offset, true) !== ZIP_EOCD_SIGNATURE)
175
+ continue;
176
+ const commentLength = view.getUint16(offset + 20, true);
177
+ if (offset + ZIP_EOCD_MIN_BYTES + commentLength !== view.byteLength)
178
+ continue;
179
+ const diskNumber = view.getUint16(offset + 4, true);
180
+ const centralDisk = view.getUint16(offset + 6, true);
181
+ const entriesOnDisk = view.getUint16(offset + 8, true);
182
+ const entryCount = view.getUint16(offset + 10, true);
183
+ const centralSize = view.getUint32(offset + 12, true);
184
+ const centralOffset = view.getUint32(offset + 16, true);
185
+ if (diskNumber !== 0 ||
186
+ centralDisk !== 0 ||
187
+ entriesOnDisk !== entryCount ||
188
+ entryCount === 0xffff ||
189
+ centralSize === 0xffffffff ||
190
+ centralOffset === 0xffffffff ||
191
+ centralOffset + centralSize !== offset)
192
+ continue;
193
+ eocdOffset = offset;
194
+ break;
195
+ }
196
+ if (eocdOffset < 0)
197
+ return undefined;
198
+ const entryCount = view.getUint16(eocdOffset + 10, true);
199
+ let offset = view.getUint32(eocdOffset + 16, true);
200
+ // A zip64 archive stores 0xffffffff here; treat it as unreadable rather
201
+ // than guessing.
202
+ if (offset === 0xffffffff)
203
+ return undefined;
204
+ const decoder = new TextDecoder();
205
+ const names = [];
206
+ for (let index = 0; index < entryCount; index += 1) {
207
+ if (offset + ZIP_CENTRAL_HEADER_MIN_BYTES > eocdOffset)
208
+ return undefined;
209
+ if (view.getUint32(offset, true) !== ZIP_CENTRAL_HEADER_SIGNATURE)
210
+ return undefined;
211
+ const nameLength = view.getUint16(offset + 28, true);
212
+ const extraLength = view.getUint16(offset + 30, true);
213
+ const commentLength = view.getUint16(offset + 32, true);
214
+ const nameStart = offset + ZIP_CENTRAL_HEADER_MIN_BYTES;
215
+ const entryEnd = nameStart + nameLength + extraLength + commentLength;
216
+ if (entryEnd > eocdOffset)
217
+ return undefined;
218
+ names.push(decoder.decode(data.subarray(nameStart, nameStart + nameLength)));
219
+ offset = entryEnd;
220
+ }
221
+ if (offset === eocdOffset)
222
+ return names;
223
+ // A central-directory digital signature may follow the file headers.
224
+ if (offset + 6 <= eocdOffset &&
225
+ view.getUint32(offset, true) === ZIP_CENTRAL_DIGITAL_SIGNATURE &&
226
+ offset + 6 + view.getUint16(offset + 4, true) === eocdOffset)
227
+ return names;
228
+ return undefined;
229
+ }
230
+ function detectOle(data) {
231
+ if (includesUtf16(data, "WordDocument"))
232
+ return "doc";
233
+ if (includesUtf16(data, "Workbook") || includesUtf16(data, "Book"))
234
+ return "xls";
235
+ if (includesUtf16(data, "PowerPoint Document"))
236
+ return "ppt";
237
+ return undefined;
238
+ }
239
+ function preserveSubtype(detected, hinted) {
240
+ return hinted && sameFamily(detected, hinted) ? hinted : detected;
241
+ }
242
+ function sameFamily(a, b) {
243
+ return family(a) === family(b);
244
+ }
245
+ function family(format) {
246
+ if (["doc", "docx", "docm"].includes(format))
247
+ return "word";
248
+ if (["xls", "xlsx", "xlsm"].includes(format))
249
+ return "sheet";
250
+ if (["ppt", "pptx", "pptm", "ppsx"].includes(format))
251
+ return "slides";
252
+ return format;
253
+ }
254
+ function legacyHint(format) {
255
+ return format && ["doc", "xls", "ppt"].includes(format) ? format : undefined;
256
+ }
257
+ function ooxmlHint(format) {
258
+ return format &&
259
+ ["docx", "docm", "xlsx", "xlsm", "pptx", "pptm", "ppsx"].includes(format)
260
+ ? format
261
+ : undefined;
262
+ }
263
+ function looksLikeSvg(data) {
264
+ const prefix = new TextDecoder().decode(data.subarray(0, Math.min(data.byteLength, 4096)));
265
+ return /<(?:svg)(?:\s|>)/i.test(prefix.replace(/^\uFEFF/, ""));
266
+ }
267
+ function starts(data, signature) {
268
+ return signature.every((byte, index) => data[index] === byte);
269
+ }
270
+ function ascii(data, start, end) {
271
+ return String.fromCharCode(...data.subarray(start, end));
272
+ }
273
+ function includesAscii(data, text) {
274
+ return indexOf(data, new TextEncoder().encode(text)) >= 0;
275
+ }
276
+ function includesUtf16(data, text) {
277
+ const bytes = new Uint8Array(text.length * 2);
278
+ for (let index = 0; index < text.length; index += 1)
279
+ bytes[index * 2] = text.charCodeAt(index);
280
+ return indexOf(data, bytes) >= 0;
281
+ }
282
+ function indexOf(haystack, needle) {
283
+ outer: for (let offset = 0; offset <= haystack.length - needle.length; offset += 1) {
284
+ for (let index = 0; index < needle.length; index += 1)
285
+ if (haystack[offset + index] !== needle[index])
286
+ continue outer;
287
+ return offset;
288
+ }
289
+ return -1;
290
+ }
@@ -0,0 +1,14 @@
1
+ import type { ViewerErrorCode, ViewerErrorData } from "./contracts.js";
2
+ export declare class ViewerError extends Error implements ViewerErrorData {
3
+ readonly name: "ViewerError";
4
+ readonly code: ViewerErrorCode;
5
+ readonly details?: Readonly<Record<string, unknown>>;
6
+ constructor(code: ViewerErrorCode, message: string, options?: {
7
+ cause?: unknown;
8
+ details?: Readonly<Record<string, unknown>>;
9
+ });
10
+ toJSON(): ViewerErrorData;
11
+ }
12
+ export declare function abortError(message?: string): ViewerError;
13
+ export declare function normalizeError(error: unknown, fallback?: ViewerErrorCode): ViewerError;
14
+ export declare function errorFromData(data: ViewerErrorData): ViewerError;
package/dist/errors.js ADDED
@@ -0,0 +1,40 @@
1
+ export class ViewerError extends Error {
2
+ name = "ViewerError";
3
+ code;
4
+ details;
5
+ constructor(code, message, options = {}) {
6
+ super(message, options.cause === undefined ? undefined : { cause: options.cause });
7
+ this.code = code;
8
+ if (options.details)
9
+ this.details = options.details;
10
+ }
11
+ toJSON() {
12
+ return {
13
+ name: this.name,
14
+ code: this.code,
15
+ message: this.message,
16
+ ...(this.details ? { details: this.details } : {}),
17
+ };
18
+ }
19
+ }
20
+ export function abortError(message = "Operation aborted") {
21
+ return new ViewerError("aborted", message);
22
+ }
23
+ export function normalizeError(error, fallback = "internal") {
24
+ if (error instanceof ViewerError)
25
+ return error;
26
+ if (isAbort(error))
27
+ return abortError();
28
+ return new ViewerError(fallback, error instanceof Error ? error.message : String(error), {
29
+ cause: error,
30
+ });
31
+ }
32
+ export function errorFromData(data) {
33
+ return new ViewerError(data.code, data.message, data.details ? { details: data.details } : {});
34
+ }
35
+ function isAbort(error) {
36
+ return ((typeof DOMException !== "undefined" &&
37
+ error instanceof DOMException &&
38
+ error.name === "AbortError") ||
39
+ (error instanceof Error && error.name === "AbortError"));
40
+ }
@@ -0,0 +1,11 @@
1
+ import type { FontScript } from "./contracts.js";
2
+ export interface FallbackFontPack {
3
+ readonly id: string;
4
+ readonly scripts: readonly FontScript[];
5
+ readonly file: string;
6
+ readonly unicodeRange: string;
7
+ readonly family: string;
8
+ readonly license: "OFL-1.1";
9
+ readonly source: string;
10
+ }
11
+ export declare const fallbackFontPacks: readonly FallbackFontPack[];
@@ -0,0 +1,31 @@
1
+ const coreSource = "https://github.com/notofonts/noto-fonts/tree/ffebf8c1ee449e544955a7e813c54f9b73848eac";
2
+ const cjkSource = "https://github.com/notofonts/noto-cjk/tree/f8d157532fbfaeda587e826d4cd5b21a49186f7c";
3
+ export const fallbackFontPacks = Object.freeze([
4
+ pack("latin-cyrillic", ["latin", "cyrillic"], "noto-sans-latin-cyrillic.woff2", "U+0000-024F,U+0300-036F,U+0400-052F,U+1E00-1EFF"),
5
+ pack("arabic", ["arabic"], "noto-sans-arabic.woff2", "U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF"),
6
+ pack("devanagari", ["devanagari"], "noto-sans-devanagari.woff2", "U+0900-097F,U+A8E0-A8FF"),
7
+ pack("bengali", ["bengali"], "noto-sans-bengali.woff2", "U+0980-09FF"),
8
+ pack("gurmukhi", ["gurmukhi"], "noto-sans-gurmukhi.woff2", "U+0A00-0A7F"),
9
+ pack("gujarati", ["gujarati"], "noto-sans-gujarati.woff2", "U+0A80-0AFF"),
10
+ pack("odia", ["odia"], "noto-sans-odia.woff2", "U+0B00-0B7F"),
11
+ pack("tamil", ["tamil"], "noto-sans-tamil.woff2", "U+0B80-0BFF"),
12
+ pack("telugu", ["telugu"], "noto-sans-telugu.woff2", "U+0C00-0C7F"),
13
+ pack("kannada", ["kannada"], "noto-sans-kannada.woff2", "U+0C80-0CFF"),
14
+ pack("malayalam", ["malayalam"], "noto-sans-malayalam.woff2", "U+0D00-0D7F"),
15
+ pack("cjk", ["cjk"], "noto-sans-cjk.woff2", "U+2E80-2FFF,U+3000-303F,U+31C0-31EF,U+3400-4DBF,U+4E00-9FFF,U+F900-FAFF"),
16
+ pack("japanese", ["japanese"], "noto-sans-japanese.woff2", "U+3040-30FF,U+31F0-31FF"),
17
+ pack("korean", ["korean"], "noto-sans-korean.woff2", "U+1100-11FF,U+3130-318F,U+AC00-D7AF"),
18
+ ]);
19
+ function pack(id, scripts, file, unicodeRange) {
20
+ return Object.freeze({
21
+ id,
22
+ scripts: Object.freeze([...scripts]),
23
+ file,
24
+ unicodeRange,
25
+ family: "Zrimo Noto",
26
+ license: "OFL-1.1",
27
+ source: id === "cjk" || id === "japanese" || id === "korean"
28
+ ? cjkSource
29
+ : coreSource,
30
+ });
31
+ }
@@ -0,0 +1,88 @@
1
+ Copyright 2018 The Noto Project Authors (github.com/googlei18n/noto-fonts)
2
+
3
+ This Font Software is licensed under the SIL Open Font License,
4
+ Version 1.1.
5
+
6
+ -----------------------------------------------------------
7
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
8
+ -----------------------------------------------------------
9
+
10
+ PREAMBLE
11
+ The goals of the Open Font License (OFL) are to stimulate worldwide
12
+ development of collaborative font projects, to support the font creation
13
+ efforts of academic and linguistic communities, and to provide a free and
14
+ open framework in which fonts may be shared and improved in partnership
15
+ with others.
16
+
17
+ The OFL allows the licensed fonts to be used, studied, modified and
18
+ redistributed freely as long as they are not sold by themselves. The fonts,
19
+ including any derivative works, can be bundled, embedded, redistributed
20
+ and/or sold with any software provided that any reserved names are not used
21
+ by derivative works. The fonts and derivatives, however, cannot be released
22
+ under any other type of license. The requirement for fonts to remain under
23
+ this license does not apply to any document created using the fonts or their
24
+ derivatives.
25
+
26
+ DEFINITIONS
27
+ "Font Software" refers to the set of files released by the Copyright
28
+ Holder(s) under this license and clearly marked as such. This may include
29
+ source files, build scripts and documentation.
30
+
31
+ "Reserved Font Name" refers to any names specified as such after the
32
+ copyright statement(s).
33
+
34
+ "Original Version" refers to the collection of Font Software components as
35
+ distributed by the Copyright Holder(s).
36
+
37
+ "Modified Version" refers to any derivative made by adding to, deleting,
38
+ or substituting -- in part or in whole -- any of the components of the
39
+ Original Version, by changing formats or by porting the Font Software to a
40
+ new environment.
41
+
42
+ "Author" refers to any designer, engineer, programmer, technical writer or
43
+ other person who contributed to the Font Software.
44
+
45
+ PERMISSION & CONDITIONS
46
+ Permission is hereby granted, free of charge, to any person obtaining a copy
47
+ of the Font Software, to use, study, copy, merge, embed, modify, redistribute,
48
+ and sell modified and unmodified copies of the Font Software, subject to the
49
+ following conditions:
50
+
51
+ 1) Neither the Font Software nor any of its individual components, in
52
+ Original or Modified Versions, may be sold by itself.
53
+
54
+ 2) Original or Modified Versions of the Font Software may be bundled,
55
+ redistributed and/or sold with any software, provided that each copy contains
56
+ the above copyright notice and this license. These can be included either as
57
+ stand-alone text files, human-readable headers or in the appropriate
58
+ machine-readable metadata fields within text or binary files as long as
59
+ those fields can be easily viewed by the user.
60
+
61
+ 3) No Modified Version of the Font Software may use the Reserved Font Name(s)
62
+ unless explicit written permission is granted by the corresponding Copyright
63
+ Holder. This restriction only applies to the primary font name as presented
64
+ to the users.
65
+
66
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
67
+ Software shall not be used to promote, endorse or advertise any Modified
68
+ Version, except to acknowledge the contribution(s) of the Copyright Holder(s)
69
+ and the Author(s) or with their explicit written permission.
70
+
71
+ 5) The Font Software, modified or unmodified, in part or in whole, must be
72
+ distributed entirely under this license, and must not be distributed under
73
+ any other license. The requirement for fonts to remain under this license
74
+ does not apply to any document created using the Font Software.
75
+
76
+ TERMINATION
77
+ This license becomes null and void if any of the above conditions are not met.
78
+
79
+ DISCLAIMER
80
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
81
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
82
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
83
+ TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE
84
+ FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL,
85
+ INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF
86
+ CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE
87
+ THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
88
+
@@ -0,0 +1,10 @@
1
+ # Packaged font notices
2
+
3
+ The WOFF2 files in this directory are modified/subset builds of Noto Sans and Noto Sans CJK. They retain shaping tables and contain only the Unicode ranges recorded in `manifest.json`.
4
+
5
+ - Noto Sans sources: `notofonts/noto-fonts` commit `ffebf8c1ee449e544955a7e813c54f9b73848eac`.
6
+ - Noto Sans CJK sources: `notofonts/noto-cjk` commit `f8d157532fbfaeda587e826d4cd5b21a49186f7c`.
7
+ - License: SIL Open Font License 1.1; see `OFL-1.1.txt`.
8
+ - Modified font family used by the viewer: `Zrimo Noto`.
9
+
10
+ No proprietary Microsoft font is included.
@@ -0,0 +1,83 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "family": "Zrimo Noto",
4
+ "generated": "2026-07-16",
5
+ "tooling": "fonttools pyftsubset with all layout features, then woff2_compress",
6
+ "license": "OFL-1.1",
7
+ "sources": {
8
+ "noto-fonts": "https://github.com/notofonts/noto-fonts/tree/ffebf8c1ee449e544955a7e813c54f9b73848eac",
9
+ "noto-cjk": "https://github.com/notofonts/noto-cjk/tree/f8d157532fbfaeda587e826d4cd5b21a49186f7c"
10
+ },
11
+ "files": [
12
+ {
13
+ "file": "noto-sans-latin-cyrillic.woff2",
14
+ "bytes": 79056,
15
+ "sha256": "505a16667b5224cb4e16d7d04e44bb55b5778d0b5a30039e780586a224cbea82"
16
+ },
17
+ {
18
+ "file": "noto-sans-arabic.woff2",
19
+ "bytes": 66380,
20
+ "sha256": "e7057aed431b120b3de7e1ebe2b8ed2131364a6e35756b5fee9a623923be1c08"
21
+ },
22
+ {
23
+ "file": "noto-sans-devanagari.woff2",
24
+ "bytes": 57128,
25
+ "sha256": "2fc2bc07b76e91770064afabe03b05247c6d69d392e9785417b0f94190f76975"
26
+ },
27
+ {
28
+ "file": "noto-sans-bengali.woff2",
29
+ "bytes": 60344,
30
+ "sha256": "d6b868dbeb063970ec0ffbb6d0158e92bdd1c9635c772d80c4bb0ab90ee9838b"
31
+ },
32
+ {
33
+ "file": "noto-sans-gurmukhi.woff2",
34
+ "bytes": 15612,
35
+ "sha256": "9fed08d6a9d79a1fdc78d52be6049ba8a0088275fc167d40fc9953b7d295b97a"
36
+ },
37
+ {
38
+ "file": "noto-sans-gujarati.woff2",
39
+ "bytes": 50560,
40
+ "sha256": "89a072974c4f04086385722eda3a29080bea10d5b5babd16c66ca36e51fa026c"
41
+ },
42
+ {
43
+ "file": "noto-sans-odia.woff2",
44
+ "bytes": 28572,
45
+ "sha256": "111f9eb26ac20096d2d733fdabe71eb7eadafe66315affec96e023211ab1c7d9"
46
+ },
47
+ {
48
+ "file": "noto-sans-tamil.woff2",
49
+ "bytes": 23100,
50
+ "sha256": "9b008f6fadf2279887f1721f03d98f9dfd0dfb4f235e1c7a815e05658384fffe"
51
+ },
52
+ {
53
+ "file": "noto-sans-telugu.woff2",
54
+ "bytes": 50908,
55
+ "sha256": "a55ff1e8040b4316d6d465abd0a0e56791ed2453adebec1db2b1d9e99f77b6c0"
56
+ },
57
+ {
58
+ "file": "noto-sans-kannada.woff2",
59
+ "bytes": 37304,
60
+ "sha256": "c0a028f65c258afcbd5d009741cb198860f0f0fbe7683f4d89f834cca565db3c"
61
+ },
62
+ {
63
+ "file": "noto-sans-malayalam.woff2",
64
+ "bytes": 34400,
65
+ "sha256": "565381e589a72ec76453edddc1f55458cfb93f7e6653f94b3651f3e2f2b5f9cc"
66
+ },
67
+ {
68
+ "file": "noto-sans-cjk.woff2",
69
+ "bytes": 9254856,
70
+ "sha256": "55cccb6ba3f0a2c06550b962edf45505dc818a09fe91af8267532bc1e9fb7097"
71
+ },
72
+ {
73
+ "file": "noto-sans-japanese.woff2",
74
+ "bytes": 89640,
75
+ "sha256": "96ff063a309fe8b598aee516ac304a1ae6cf4f4e40315b489c6a193b4fbbaed8"
76
+ },
77
+ {
78
+ "file": "noto-sans-korean.woff2",
79
+ "bytes": 1110144,
80
+ "sha256": "077e4178230f7cc0e7bd9a5ccdb5ad24f89692bb64f5d421b2095a69b4b9243a"
81
+ }
82
+ ]
83
+ }
Binary file
Binary file
Binary file
@@ -0,0 +1,20 @@
1
+ import type { FontPolicy, FontRequest, FontScript, RegisteredFont, TextRun, ViewerFetch, ViewerWarning } from "./contracts.js";
2
+ export interface FontEnvironment {
3
+ readonly FontFace?: typeof FontFace;
4
+ readonly fonts?: FontFaceSet;
5
+ }
6
+ export interface FontManagerOptions {
7
+ readonly policy?: FontPolicy;
8
+ readonly registered?: readonly RegisteredFont[];
9
+ readonly assetBaseUrl?: URL;
10
+ readonly fetch: ViewerFetch;
11
+ readonly environment?: FontEnvironment;
12
+ }
13
+ export declare class FontManager {
14
+ #private;
15
+ constructor(options: FontManagerOptions);
16
+ ensureRuns(runs: readonly TextRun[], reportWarning: (warning: ViewerWarning) => void, signal?: AbortSignal): Promise<void>;
17
+ destroy(): Promise<void>;
18
+ }
19
+ export declare function fontRequestsForRuns(runs: readonly TextRun[]): readonly FontRequest[];
20
+ export declare function scriptForCodepoint(codepoint: number): FontScript;