omni-viewer-core 0.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 (387) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +80 -0
  3. package/THIRD_PARTY_NOTICES.md +49 -0
  4. package/dist/assets/audio-engine/audio_engine.mjs +2 -0
  5. package/dist/assets/audio-engine/audio_engine.wasm +0 -0
  6. package/dist/assets/pdfjs/pdf.worker.min.mjs +21 -0
  7. package/dist/host/index.d.ts +133 -0
  8. package/dist/host/index.js +10 -0
  9. package/dist/i18n/catalog.en.d.ts +1 -0
  10. package/dist/i18n/catalog.en.js +411 -0
  11. package/dist/i18n/catalog.ko.d.ts +1 -0
  12. package/dist/i18n/catalog.ko.js +68 -0
  13. package/dist/i18n/index.d.ts +18 -0
  14. package/dist/i18n/index.js +41 -0
  15. package/dist/licenses/emscripten.txt +101 -0
  16. package/dist/licenses/kissfft.txt +28 -0
  17. package/dist/licenses/pdfjs-dist.txt +177 -0
  18. package/dist/parsers/a2l/index.d.ts +1 -0
  19. package/dist/parsers/a2l/index.js +1 -0
  20. package/dist/parsers/archive/index.d.ts +22 -0
  21. package/dist/parsers/archive/index.js +46 -0
  22. package/dist/parsers/archive/model.d.ts +29 -0
  23. package/dist/parsers/archive/model.js +1 -0
  24. package/dist/parsers/archive/worker.d.ts +21 -0
  25. package/dist/parsers/archive/worker.js +1 -0
  26. package/dist/parsers/arxml/index.d.ts +1 -0
  27. package/dist/parsers/arxml/index.js +1 -0
  28. package/dist/parsers/asc/index.d.ts +1 -0
  29. package/dist/parsers/asc/index.js +1 -0
  30. package/dist/parsers/audio/index.d.ts +9 -0
  31. package/dist/parsers/audio/index.js +46 -0
  32. package/dist/parsers/automotive/index.d.ts +33 -0
  33. package/dist/parsers/automotive/index.js +973 -0
  34. package/dist/parsers/blf/index.d.ts +1 -0
  35. package/dist/parsers/blf/index.js +1 -0
  36. package/dist/parsers/csv/delimiter.d.ts +31 -0
  37. package/dist/parsers/csv/delimiter.js +151 -0
  38. package/dist/parsers/csv/index.d.ts +30 -0
  39. package/dist/parsers/csv/index.js +108 -0
  40. package/dist/parsers/csv/parseText.d.ts +20 -0
  41. package/dist/parsers/csv/parseText.js +108 -0
  42. package/dist/parsers/csv/sort.d.ts +26 -0
  43. package/dist/parsers/csv/sort.js +224 -0
  44. package/dist/parsers/csv/statistics.d.ts +49 -0
  45. package/dist/parsers/csv/statistics.js +150 -0
  46. package/dist/parsers/dbc/index.d.ts +56 -0
  47. package/dist/parsers/dbc/index.js +94 -0
  48. package/dist/parsers/doc-binary/index.d.ts +35 -0
  49. package/dist/parsers/doc-binary/index.js +267 -0
  50. package/dist/parsers/doc-binary/vscode-parser.d.ts +142 -0
  51. package/dist/parsers/doc-binary/vscode-parser.js +3747 -0
  52. package/dist/parsers/excel/index.d.ts +17 -0
  53. package/dist/parsers/excel/index.js +406 -0
  54. package/dist/parsers/excel/model.d.ts +80 -0
  55. package/dist/parsers/excel/model.js +48 -0
  56. package/dist/parsers/excel/serialize.d.ts +3 -0
  57. package/dist/parsers/excel/serialize.js +78 -0
  58. package/dist/parsers/hdf5/index.d.ts +75 -0
  59. package/dist/parsers/hdf5/index.js +658 -0
  60. package/dist/parsers/hdf5/node.d.ts +21 -0
  61. package/dist/parsers/hdf5/node.js +95 -0
  62. package/dist/parsers/json/index.d.ts +15 -0
  63. package/dist/parsers/json/index.js +102 -0
  64. package/dist/parsers/json/model.d.ts +42 -0
  65. package/dist/parsers/json/model.js +140 -0
  66. package/dist/parsers/json/parse.d.ts +22 -0
  67. package/dist/parsers/json/parse.js +279 -0
  68. package/dist/parsers/json/tokenizer.d.ts +17 -0
  69. package/dist/parsers/json/tokenizer.js +175 -0
  70. package/dist/parsers/jsonl/index.d.ts +14 -0
  71. package/dist/parsers/jsonl/index.js +18 -0
  72. package/dist/parsers/jsonl/model.d.ts +23 -0
  73. package/dist/parsers/jsonl/model.js +1 -0
  74. package/dist/parsers/jsonl/parse.d.ts +7 -0
  75. package/dist/parsers/jsonl/parse.js +34 -0
  76. package/dist/parsers/markdown/index.d.ts +37 -0
  77. package/dist/parsers/markdown/index.js +59 -0
  78. package/dist/parsers/mat/index.d.ts +31 -0
  79. package/dist/parsers/mat/index.js +426 -0
  80. package/dist/parsers/mermaid/index.d.ts +5 -0
  81. package/dist/parsers/mermaid/index.js +3 -0
  82. package/dist/parsers/mf4/index.d.ts +1 -0
  83. package/dist/parsers/mf4/index.js +1 -0
  84. package/dist/parsers/parquet/index.d.ts +21 -0
  85. package/dist/parsers/parquet/index.js +68 -0
  86. package/dist/parsers/pcap/index.d.ts +1 -0
  87. package/dist/parsers/pcap/index.js +1 -0
  88. package/dist/parsers/pcapng/index.d.ts +1 -0
  89. package/dist/parsers/pcapng/index.js +1 -0
  90. package/dist/parsers/plantuml/index.d.ts +5 -0
  91. package/dist/parsers/plantuml/index.js +4 -0
  92. package/dist/parsers/ppt-binary/index.d.ts +5 -0
  93. package/dist/parsers/ppt-binary/index.js +62 -0
  94. package/dist/parsers/ppt-binary/pptBinaryBuildContext.d.ts +12 -0
  95. package/dist/parsers/ppt-binary/pptBinaryBuildContext.js +40 -0
  96. package/dist/parsers/ppt-binary/pptBinaryContainer.d.ts +4 -0
  97. package/dist/parsers/ppt-binary/pptBinaryContainer.js +174 -0
  98. package/dist/parsers/ppt-binary/pptBinaryTypes.d.ts +125 -0
  99. package/dist/parsers/ppt-binary/pptBinaryTypes.js +1 -0
  100. package/dist/parsers/ppt-binary/pptSlideLayouts.d.ts +9 -0
  101. package/dist/parsers/ppt-binary/pptSlideLayouts.js +510 -0
  102. package/dist/parsers/ppt-binary/vscode-parser.d.ts +116 -0
  103. package/dist/parsers/ppt-binary/vscode-parser.js +2853 -0
  104. package/dist/parsers/ppt-binary/vscode.d.ts +4 -0
  105. package/dist/parsers/ppt-binary/vscode.js +12 -0
  106. package/dist/parsers/pptx/index.d.ts +15 -0
  107. package/dist/parsers/pptx/index.js +88 -0
  108. package/dist/parsers/pptx/vscode-parser.d.ts +167 -0
  109. package/dist/parsers/pptx/vscode-parser.js +1503 -0
  110. package/dist/parsers/pptx/vscode.d.ts +4 -0
  111. package/dist/parsers/pptx/vscode.js +18 -0
  112. package/dist/parsers/pptx/zip-reader.d.ts +3 -0
  113. package/dist/parsers/pptx/zip-reader.js +20 -0
  114. package/dist/parsers/proto/index.d.ts +90 -0
  115. package/dist/parsers/proto/index.js +197 -0
  116. package/dist/parsers/psd/index.d.ts +16 -0
  117. package/dist/parsers/psd/index.js +10 -0
  118. package/dist/parsers/shapefile/dbf.d.ts +23 -0
  119. package/dist/parsers/shapefile/dbf.js +112 -0
  120. package/dist/parsers/shapefile/index.d.ts +44 -0
  121. package/dist/parsers/shapefile/index.js +119 -0
  122. package/dist/parsers/shapefile/reproject.d.ts +10 -0
  123. package/dist/parsers/shapefile/reproject.js +41 -0
  124. package/dist/parsers/slide-model.d.ts +106 -0
  125. package/dist/parsers/slide-model.js +1 -0
  126. package/dist/parsers/toml/index.d.ts +15 -0
  127. package/dist/parsers/toml/index.js +18 -0
  128. package/dist/parsers/toml/model.d.ts +15 -0
  129. package/dist/parsers/toml/model.js +1 -0
  130. package/dist/parsers/toml/parse.d.ts +16 -0
  131. package/dist/parsers/toml/parse.js +266 -0
  132. package/dist/parsers/types.d.ts +103 -0
  133. package/dist/parsers/types.js +106 -0
  134. package/dist/parsers/video/index.d.ts +6 -0
  135. package/dist/parsers/video/index.js +2 -0
  136. package/dist/parsers/yaml/index.d.ts +16 -0
  137. package/dist/parsers/yaml/index.js +58 -0
  138. package/dist/parsers/yaml/model.d.ts +22 -0
  139. package/dist/parsers/yaml/model.js +1 -0
  140. package/dist/parsers/yaml/self-loading.d.ts +3 -0
  141. package/dist/parsers/yaml/self-loading.js +19 -0
  142. package/dist/parsers/zip-scan.d.ts +8 -0
  143. package/dist/parsers/zip-scan.js +80 -0
  144. package/dist/registry/container.d.ts +17 -0
  145. package/dist/registry/container.js +49 -0
  146. package/dist/registry/index.d.ts +133 -0
  147. package/dist/registry/index.js +348 -0
  148. package/dist/registry/probe.d.ts +3 -0
  149. package/dist/registry/probe.js +177 -0
  150. package/dist/registry/sniff.d.ts +17 -0
  151. package/dist/registry/sniff.js +57 -0
  152. package/dist/styles/archive.css +10 -0
  153. package/dist/styles/audio.css +66 -0
  154. package/dist/styles/automotive.css +1 -0
  155. package/dist/styles/csv.css +262 -0
  156. package/dist/styles/excel.css +212 -0
  157. package/dist/styles/fallback.css +48 -0
  158. package/dist/styles/hdf5.css +3 -0
  159. package/dist/styles/hwp.css +12 -0
  160. package/dist/styles/image.css +115 -0
  161. package/dist/styles/json.css +342 -0
  162. package/dist/styles/jsonl.css +1 -0
  163. package/dist/styles/markdown.css +10 -0
  164. package/dist/styles/mat.css +2 -0
  165. package/dist/styles/mermaid.css +1 -0
  166. package/dist/styles/parquet.css +2 -0
  167. package/dist/styles/pdf.css +551 -0
  168. package/dist/styles/plantuml.css +1 -0
  169. package/dist/styles/ppt.css +1 -0
  170. package/dist/styles/proto.css +2 -0
  171. package/dist/styles/psd.css +1 -0
  172. package/dist/styles/shapefile.css +25 -0
  173. package/dist/styles/toml.css +1 -0
  174. package/dist/styles/video.css +74 -0
  175. package/dist/styles/word.css +685 -0
  176. package/dist/styles/yaml.css +1 -0
  177. package/dist/viewers/a2l/index.d.ts +15 -0
  178. package/dist/viewers/a2l/index.js +5 -0
  179. package/dist/viewers/archive/archive-preview-decoder.d.ts +4 -0
  180. package/dist/viewers/archive/archive-preview-decoder.js +223 -0
  181. package/dist/viewers/archive/controller.d.ts +24 -0
  182. package/dist/viewers/archive/controller.js +18 -0
  183. package/dist/viewers/archive/index.d.ts +25 -0
  184. package/dist/viewers/archive/index.js +230 -0
  185. package/dist/viewers/archive/preview.d.ts +2 -0
  186. package/dist/viewers/archive/preview.js +2 -0
  187. package/dist/viewers/archive/styles.d.ts +1 -0
  188. package/dist/viewers/archive/styles.js +11 -0
  189. package/dist/viewers/arxml/index.d.ts +15 -0
  190. package/dist/viewers/arxml/index.js +5 -0
  191. package/dist/viewers/asc/index.d.ts +15 -0
  192. package/dist/viewers/asc/index.js +5 -0
  193. package/dist/viewers/audio/controller.d.ts +33 -0
  194. package/dist/viewers/audio/controller.js +49 -0
  195. package/dist/viewers/audio/engine.d.ts +44 -0
  196. package/dist/viewers/audio/engine.js +108 -0
  197. package/dist/viewers/audio/index.d.ts +92 -0
  198. package/dist/viewers/audio/index.js +448 -0
  199. package/dist/viewers/audio/self-loading.d.ts +7 -0
  200. package/dist/viewers/audio/self-loading.js +42 -0
  201. package/dist/viewers/audio/styles.d.ts +1 -0
  202. package/dist/viewers/audio/styles.js +73 -0
  203. package/dist/viewers/automotive/index.d.ts +8 -0
  204. package/dist/viewers/automotive/index.js +152 -0
  205. package/dist/viewers/automotive/styles.d.ts +1 -0
  206. package/dist/viewers/automotive/styles.js +1 -0
  207. package/dist/viewers/avro/index.d.ts +15 -0
  208. package/dist/viewers/avro/index.js +5 -0
  209. package/dist/viewers/bag/index.d.ts +15 -0
  210. package/dist/viewers/bag/index.js +5 -0
  211. package/dist/viewers/blf/index.d.ts +15 -0
  212. package/dist/viewers/blf/index.js +5 -0
  213. package/dist/viewers/csv/controller.d.ts +126 -0
  214. package/dist/viewers/csv/controller.js +598 -0
  215. package/dist/viewers/csv/index.d.ts +48 -0
  216. package/dist/viewers/csv/index.js +846 -0
  217. package/dist/viewers/csv/styles.d.ts +1 -0
  218. package/dist/viewers/csv/styles.js +267 -0
  219. package/dist/viewers/db3/index.d.ts +15 -0
  220. package/dist/viewers/db3/index.js +5 -0
  221. package/dist/viewers/dbc/index.d.ts +15 -0
  222. package/dist/viewers/dbc/index.js +5 -0
  223. package/dist/viewers/diagram.d.ts +14 -0
  224. package/dist/viewers/diagram.js +95 -0
  225. package/dist/viewers/excel/controller.d.ts +108 -0
  226. package/dist/viewers/excel/controller.js +548 -0
  227. package/dist/viewers/excel/grid.d.ts +28 -0
  228. package/dist/viewers/excel/grid.js +99 -0
  229. package/dist/viewers/excel/index.d.ts +37 -0
  230. package/dist/viewers/excel/index.js +620 -0
  231. package/dist/viewers/excel/self-loading.d.ts +6 -0
  232. package/dist/viewers/excel/self-loading.js +13 -0
  233. package/dist/viewers/excel/styles.d.ts +1 -0
  234. package/dist/viewers/excel/styles.js +216 -0
  235. package/dist/viewers/fallback/index.d.ts +17 -0
  236. package/dist/viewers/fallback/index.js +130 -0
  237. package/dist/viewers/fallback/styles.d.ts +1 -0
  238. package/dist/viewers/fallback/styles.js +49 -0
  239. package/dist/viewers/hdf5/index.d.ts +19 -0
  240. package/dist/viewers/hdf5/index.js +170 -0
  241. package/dist/viewers/hdf5/styles.d.ts +1 -0
  242. package/dist/viewers/hdf5/styles.js +4 -0
  243. package/dist/viewers/hwp/controller.d.ts +19 -0
  244. package/dist/viewers/hwp/controller.js +22 -0
  245. package/dist/viewers/hwp/index.d.ts +39 -0
  246. package/dist/viewers/hwp/index.js +271 -0
  247. package/dist/viewers/hwp/self-loading.d.ts +2 -0
  248. package/dist/viewers/hwp/self-loading.js +6 -0
  249. package/dist/viewers/hwp/styles.d.ts +1 -0
  250. package/dist/viewers/hwp/styles.js +13 -0
  251. package/dist/viewers/image/controller.d.ts +210 -0
  252. package/dist/viewers/image/controller.js +336 -0
  253. package/dist/viewers/image/decode.d.ts +54 -0
  254. package/dist/viewers/image/decode.js +150 -0
  255. package/dist/viewers/image/index.d.ts +38 -0
  256. package/dist/viewers/image/index.js +749 -0
  257. package/dist/viewers/image/limits.d.ts +18 -0
  258. package/dist/viewers/image/limits.js +20 -0
  259. package/dist/viewers/image/styles.d.ts +1 -0
  260. package/dist/viewers/image/styles.js +119 -0
  261. package/dist/viewers/json/controller.d.ts +89 -0
  262. package/dist/viewers/json/controller.js +411 -0
  263. package/dist/viewers/json/index.d.ts +25 -0
  264. package/dist/viewers/json/index.js +503 -0
  265. package/dist/viewers/json/styles.d.ts +1 -0
  266. package/dist/viewers/json/styles.js +346 -0
  267. package/dist/viewers/json/transforms.d.ts +27 -0
  268. package/dist/viewers/json/transforms.js +253 -0
  269. package/dist/viewers/jsonl/controller.d.ts +48 -0
  270. package/dist/viewers/jsonl/controller.js +136 -0
  271. package/dist/viewers/jsonl/index.d.ts +22 -0
  272. package/dist/viewers/jsonl/index.js +184 -0
  273. package/dist/viewers/jsonl/styles.d.ts +1 -0
  274. package/dist/viewers/jsonl/styles.js +1 -0
  275. package/dist/viewers/markdown/controller.d.ts +50 -0
  276. package/dist/viewers/markdown/controller.js +62 -0
  277. package/dist/viewers/markdown/index.d.ts +64 -0
  278. package/dist/viewers/markdown/index.js +425 -0
  279. package/dist/viewers/markdown/math.d.ts +21 -0
  280. package/dist/viewers/markdown/math.js +100 -0
  281. package/dist/viewers/markdown/self-loading.d.ts +5 -0
  282. package/dist/viewers/markdown/self-loading.js +48 -0
  283. package/dist/viewers/markdown/styles.d.ts +1 -0
  284. package/dist/viewers/markdown/styles.js +11 -0
  285. package/dist/viewers/mat/index.d.ts +19 -0
  286. package/dist/viewers/mat/index.js +113 -0
  287. package/dist/viewers/mat/styles.d.ts +1 -0
  288. package/dist/viewers/mat/styles.js +3 -0
  289. package/dist/viewers/media.d.ts +9 -0
  290. package/dist/viewers/media.js +77 -0
  291. package/dist/viewers/mermaid/index.d.ts +17 -0
  292. package/dist/viewers/mermaid/index.js +6 -0
  293. package/dist/viewers/mermaid/self-loading.d.ts +2 -0
  294. package/dist/viewers/mermaid/self-loading.js +2 -0
  295. package/dist/viewers/mf4/index.d.ts +15 -0
  296. package/dist/viewers/mf4/index.js +5 -0
  297. package/dist/viewers/parquet/controller.d.ts +37 -0
  298. package/dist/viewers/parquet/controller.js +26 -0
  299. package/dist/viewers/parquet/index.d.ts +23 -0
  300. package/dist/viewers/parquet/index.js +134 -0
  301. package/dist/viewers/parquet/styles.d.ts +1 -0
  302. package/dist/viewers/parquet/styles.js +3 -0
  303. package/dist/viewers/pcap/index.d.ts +15 -0
  304. package/dist/viewers/pcap/index.js +5 -0
  305. package/dist/viewers/pcapng/index.d.ts +15 -0
  306. package/dist/viewers/pcapng/index.js +5 -0
  307. package/dist/viewers/pdf/controller.d.ts +120 -0
  308. package/dist/viewers/pdf/controller.js +191 -0
  309. package/dist/viewers/pdf/editing.d.ts +26 -0
  310. package/dist/viewers/pdf/editing.js +265 -0
  311. package/dist/viewers/pdf/index.d.ts +88 -0
  312. package/dist/viewers/pdf/index.js +1400 -0
  313. package/dist/viewers/pdf/self-loading.d.ts +6 -0
  314. package/dist/viewers/pdf/self-loading.js +14 -0
  315. package/dist/viewers/pdf/styles.d.ts +1 -0
  316. package/dist/viewers/pdf/styles.js +555 -0
  317. package/dist/viewers/plantuml/index.d.ts +17 -0
  318. package/dist/viewers/plantuml/index.js +6 -0
  319. package/dist/viewers/plantuml/self-loading.d.ts +2 -0
  320. package/dist/viewers/plantuml/self-loading.js +2 -0
  321. package/dist/viewers/ppt/chart.d.ts +8 -0
  322. package/dist/viewers/ppt/chart.js +83 -0
  323. package/dist/viewers/ppt/controller.d.ts +34 -0
  324. package/dist/viewers/ppt/controller.js +27 -0
  325. package/dist/viewers/ppt/index.d.ts +33 -0
  326. package/dist/viewers/ppt/index.js +101 -0
  327. package/dist/viewers/ppt/render.d.ts +5 -0
  328. package/dist/viewers/ppt/render.js +144 -0
  329. package/dist/viewers/ppt/self-loading.d.ts +9 -0
  330. package/dist/viewers/ppt/self-loading.js +4 -0
  331. package/dist/viewers/ppt/styles.d.ts +1 -0
  332. package/dist/viewers/ppt/styles.js +1 -0
  333. package/dist/viewers/proto/index.d.ts +17 -0
  334. package/dist/viewers/proto/index.js +170 -0
  335. package/dist/viewers/proto/styles.d.ts +1 -0
  336. package/dist/viewers/proto/styles.js +2 -0
  337. package/dist/viewers/psd/index.d.ts +27 -0
  338. package/dist/viewers/psd/index.js +39 -0
  339. package/dist/viewers/psd/self-loading.d.ts +10 -0
  340. package/dist/viewers/psd/self-loading.js +20 -0
  341. package/dist/viewers/psd/styles.d.ts +1 -0
  342. package/dist/viewers/psd/styles.js +1 -0
  343. package/dist/viewers/reqif/index.d.ts +15 -0
  344. package/dist/viewers/reqif/index.js +5 -0
  345. package/dist/viewers/shapefile/index.d.ts +35 -0
  346. package/dist/viewers/shapefile/index.js +336 -0
  347. package/dist/viewers/shapefile/self-loading.d.ts +7 -0
  348. package/dist/viewers/shapefile/self-loading.js +32 -0
  349. package/dist/viewers/shapefile/styles.d.ts +1 -0
  350. package/dist/viewers/shapefile/styles.js +28 -0
  351. package/dist/viewers/stp/index.d.ts +15 -0
  352. package/dist/viewers/stp/index.js +5 -0
  353. package/dist/viewers/structured-styles.d.ts +1 -0
  354. package/dist/viewers/structured-styles.js +1 -0
  355. package/dist/viewers/structured.d.ts +36 -0
  356. package/dist/viewers/structured.js +138 -0
  357. package/dist/viewers/toml/controller.d.ts +38 -0
  358. package/dist/viewers/toml/controller.js +61 -0
  359. package/dist/viewers/toml/index.d.ts +18 -0
  360. package/dist/viewers/toml/index.js +34 -0
  361. package/dist/viewers/types.d.ts +36 -0
  362. package/dist/viewers/types.js +9 -0
  363. package/dist/viewers/video/controller.d.ts +29 -0
  364. package/dist/viewers/video/controller.js +54 -0
  365. package/dist/viewers/video/index.d.ts +18 -0
  366. package/dist/viewers/video/index.js +305 -0
  367. package/dist/viewers/video/styles.d.ts +1 -0
  368. package/dist/viewers/video/styles.js +79 -0
  369. package/dist/viewers/word/controller.d.ts +19 -0
  370. package/dist/viewers/word/controller.js +22 -0
  371. package/dist/viewers/word/docx-preprocess.d.ts +63 -0
  372. package/dist/viewers/word/docx-preprocess.js +136 -0
  373. package/dist/viewers/word/index.d.ts +32 -0
  374. package/dist/viewers/word/index.js +187 -0
  375. package/dist/viewers/word/normalize-docx.d.ts +2 -0
  376. package/dist/viewers/word/normalize-docx.js +50 -0
  377. package/dist/viewers/word/paginate.d.ts +1 -0
  378. package/dist/viewers/word/paginate.js +1035 -0
  379. package/dist/viewers/word/self-loading.d.ts +2 -0
  380. package/dist/viewers/word/self-loading.js +7 -0
  381. package/dist/viewers/word/styles.d.ts +1 -0
  382. package/dist/viewers/word/styles.js +686 -0
  383. package/dist/viewers/yaml/controller.d.ts +42 -0
  384. package/dist/viewers/yaml/controller.js +41 -0
  385. package/dist/viewers/yaml/index.d.ts +21 -0
  386. package/dist/viewers/yaml/index.js +20 -0
  387. package/package.json +375 -0
@@ -0,0 +1,133 @@
1
+ /** Required minimal contract every viewer receives. */
2
+ export interface HostContext {
3
+ assets: AssetService;
4
+ i18n: I18nService;
5
+ logger: LoggerService;
6
+ }
7
+ export interface AssetService {
8
+ /**
9
+ * Resolve a bundled asset (wasm, worker, font) to a loadable URL.
10
+ * vscode: webview.asWebviewUri / chrome: chrome.runtime.getURL /
11
+ * obsidian: bundled bytes -> blob URL / web: static path.
12
+ * Always a Promise: a dual sync/async return type only complicates
13
+ * call sites (ADR 32).
14
+ */
15
+ resolveAssetUrl(assetPath: string): Promise<string>;
16
+ }
17
+ export interface I18nService {
18
+ /**
19
+ * Key + args lookup. The lookup mechanism may be the platform's i18n,
20
+ * but the source of truth for message text (all locales) is the core
21
+ * catalog (DESIGN.md §3-③, ADR 28). Inline English fallbacks at call
22
+ * sites are forbidden.
23
+ */
24
+ t(key: string, args?: Record<string, string | number>): string;
25
+ }
26
+ export type LogLevel = 'info' | 'warn' | 'error';
27
+ export interface LoggerService {
28
+ log(level: LogLevel, message: string): void;
29
+ }
30
+ export interface FileSaveService {
31
+ /** Creates a new file. Implementations present the platform's save
32
+ * destination picker (or browser-equivalent download prompt) so the
33
+ * user chooses the target path and may change the suggested name. */
34
+ saveFile(name: string, data: Uint8Array, mimeType: string): Promise<void>;
35
+ }
36
+ export interface ClipboardService {
37
+ writeText(text: string): Promise<void>;
38
+ }
39
+ /** Prints the viewer surface selected by the platform adapter. */
40
+ export interface PrintService {
41
+ print(): void | Promise<void>;
42
+ }
43
+ export interface FileWritebackService {
44
+ /**
45
+ * Overwrite the currently open source file. Distinct from FileSaveService
46
+ * (new files); takes no path — the adapter binds it to the open file via
47
+ * closure, ruling out arbitrary-path writes.
48
+ */
49
+ write(data: Uint8Array): Promise<void>;
50
+ }
51
+ /** Lets an editing viewer ask the host for one user-selected input file. */
52
+ export interface FilePickService {
53
+ pickFile(options: {
54
+ accept: readonly string[];
55
+ maxBytes?: number;
56
+ }): Promise<{
57
+ fileName: string;
58
+ data: Uint8Array;
59
+ mimeType?: string;
60
+ } | undefined>;
61
+ }
62
+ export interface NavigationService {
63
+ /** Open an external link. Scheme allow-list is checked by core before this call. */
64
+ openExternalUrl(url: string): Promise<void>;
65
+ }
66
+ /** Resolves a relative asset referenced by the document currently being viewed. */
67
+ export interface DocumentAssetsService {
68
+ resolve(path: string): Promise<ResolvedDocumentAsset | null>;
69
+ }
70
+ export interface ResolvedDocumentAsset {
71
+ url: string;
72
+ /** Releases a transient URL (for example a blob URL). */
73
+ dispose(): void;
74
+ }
75
+ export interface WorkerFactoryService {
76
+ /** Create a Worker for a core-defined worker entry. URL resolution and
77
+ * module/classic choice are the adapter's responsibility. The adapter
78
+ * must be able to terminate() it (hard limits, DESIGN.md §3-①). */
79
+ createWorker(entry: string): Worker;
80
+ }
81
+ /**
82
+ * Plain RGBA pixel buffer used to hand images to/from model-backed services
83
+ * (docs/viewers/image.md §2). Deliberately not an ImageBitmap: a data buffer is
84
+ * Worker-transferable, unit-testable, and keeps the image viewer's state model
85
+ * DOM-free (§3-②). `data` is row-major RGBA with `length === width * height * 4`.
86
+ */
87
+ export interface RgbaImage {
88
+ width: number;
89
+ height: number;
90
+ data: Uint8ClampedArray;
91
+ }
92
+ /**
93
+ * Background removal (currently Web's Transformers.js). Model acquisition,
94
+ * network use and WASM/Worker creation are the adapter's responsibility; core
95
+ * only consumes the result and its failure/cancel/dispose (image.md I8).
96
+ */
97
+ export interface ImageBackgroundRemovalService {
98
+ /** Returns an RGBA cutout (background alpha = 0). Rejects on abort. */
99
+ removeBackground(source: RgbaImage, options?: {
100
+ signal?: AbortSignal;
101
+ }): Promise<RgbaImage>;
102
+ /** Release any model/Worker/WASM the service holds. */
103
+ dispose?(): void;
104
+ }
105
+ /** One detected sprite contour in source pixel coordinates. Core crops and
106
+ * composes the object PNG from these — the service returns geometry only. */
107
+ export interface SpriteContour {
108
+ box: {
109
+ x: number;
110
+ y: number;
111
+ width: number;
112
+ height: number;
113
+ };
114
+ /** Overlay polygon (source px). */
115
+ polygon?: readonly {
116
+ x: number;
117
+ y: number;
118
+ }[];
119
+ }
120
+ /**
121
+ * Sprite outline detection (currently Web's OpenCV Canny/contour). Worker/WASM,
122
+ * CDN and bundled-asset choices belong to the providing adapter (image.md I8).
123
+ */
124
+ export interface ImageSpriteDetectionService {
125
+ detectSprites(source: RgbaImage, options?: {
126
+ signal?: AbortSignal;
127
+ }): Promise<readonly SpriteContour[]>;
128
+ dispose?(): void;
129
+ }
130
+ /** Identifiers for optional services, used in viewer metadata. */
131
+ export type ServiceId = 'save' | 'writeback' | 'clipboard' | 'navigation' | 'workerFactory' | 'filePick' | 'backgroundRemoval' | 'spriteDetection' | 'documentAssets' | 'print';
132
+ /** URL schemes viewers may open via NavigationService (DESIGN.md §3-③). */
133
+ export declare const ALLOWED_LINK_SCHEMES: readonly string[];
@@ -0,0 +1,10 @@
1
+ // Host service contracts (DESIGN.md §3-③).
2
+ //
3
+ // The host contract is deliberately split into small service interfaces
4
+ // instead of one large `PlatformHost`: most viewers need only the required
5
+ // trio in `HostContext`, and optional capabilities are requested per-viewer
6
+ // through the mount signature's intersection type. Behavior when an optional
7
+ // service is absent is a core contract (degraded mode), not adapter
8
+ // discretion.
9
+ /** URL schemes viewers may open via NavigationService (DESIGN.md §3-③). */
10
+ export const ALLOWED_LINK_SCHEMES = ['https:', 'http:', 'mailto:'];
@@ -0,0 +1 @@
1
+ export declare const CATALOG_EN: Record<string, string>;
@@ -0,0 +1,411 @@
1
+ // English message catalog — the single source of truth for message text
2
+ // (DESIGN.md §3-③, ADR 28). Substitution syntax is `{name}` only; platform
3
+ // message files (chrome _locales, vscode l10n bundles) are generated from
4
+ // this catalog at build time. Diagnostics (§3-① messageKey) and viewer UI
5
+ // strings share this key space.
6
+ export const CATALOG_EN = {
7
+ 'audio.title': 'Audio', 'video.title': 'Video', 'dbc.title': 'CAN database',
8
+ 'audio.play': 'Play', 'audio.pause': 'Pause', 'audio.stop': 'Stop',
9
+ 'audio.loop': 'Loop', 'audio.clearRegions': 'Clear regions', 'audio.volume': 'Volume',
10
+ 'audio.zoom': 'Zoom', 'audio.zoomIn': 'Zoom in', 'audio.zoomOut': 'Zoom out', 'audio.zoomFit': 'Fit',
11
+ 'audio.visualization': 'View', 'audio.vis.waveform': 'Waveform', 'audio.vis.spectrogram': 'Spectrogram',
12
+ 'audio.info.duration': 'Duration', 'audio.info.sampleRate': 'Sample rate', 'audio.info.channels': 'Channels',
13
+ 'audio.info.bitDepth': 'Bit depth', 'audio.info.format': 'Format', 'audio.info.fileSize': 'File size',
14
+ 'audio.loading': 'Decoding audio…',
15
+ 'audio.status.region': 'Region {start} – {end} ({duration}s)',
16
+ 'audio.status.looping': 'looping region', 'audio.status.loopTrack': 'Looping track',
17
+ 'audio.fallback': 'Waveform engine unavailable — using the basic player.',
18
+ 'audio.error.decode': 'The browser could not decode this audio codec. Try a host with the required codec or transcode the file.',
19
+ 'video.play': 'Play', 'video.pause': 'Pause', 'video.stop': 'Stop',
20
+ 'video.skipBack': '⏪ -{seconds}s', 'video.skipForward': '⏩ +{seconds}s',
21
+ 'video.speed': 'Speed', 'video.zoom': 'Zoom', 'video.zoomIn': 'Zoom in',
22
+ 'video.zoomOut': 'Zoom out', 'video.zoomFit': 'Fit',
23
+ 'video.info.duration': 'Duration', 'video.info.resolution': 'Resolution',
24
+ 'video.info.format': 'Format', 'video.info.fileSize': 'File size',
25
+ 'video.error.empty': 'The media file is empty.',
26
+ 'video.error.tooLarge': 'The file exceeds the {limit} browser preview limit.',
27
+ 'video.error.source': 'This environment cannot create a browser media source.',
28
+ 'video.error.decode': 'The browser could not decode this video codec. Try a host with the required codec or transcode the file.',
29
+ 'arxml.title': 'AUTOSAR XML', 'a2l.title': 'ASAM A2L', 'asc.title': 'Vector ASC log',
30
+ 'blf.title': 'Vector BLF log', 'mf4.title': 'ASAM MDF 4', 'pcap.title': 'PCAP capture',
31
+ 'pcapng.title': 'PCAPNG capture', 'mermaid.title': 'Mermaid diagram',
32
+ 'plantuml.title': 'PlantUML diagram', 'shapefile.title': 'ESRI Shapefile', 'psd.title': 'Photoshop document',
33
+ 'shapefile.zoomIn': 'Zoom in', 'shapefile.zoomOut': 'Zoom out', 'shapefile.reset': 'Reset view',
34
+ 'shapefile.projection': 'Projection: {name}', 'shapefile.attributes': 'Feature attributes',
35
+ 'shapefile.featureLabel': 'Feature {id}',
36
+ 'shapefile.noSelection': 'Click a feature on the map to inspect its attributes.',
37
+ 'shapefile.noAttributes': 'No attribute table (.dbf) was provided for this shapefile.',
38
+ 'shapefile.noRecord': 'This feature has no matching attribute record.',
39
+ 'shapefile.dbfFailed': 'The attribute table (.dbf) could not be read:',
40
+ 'shapefile.reprojectFailed': 'Reprojection failed — coordinates are shown in the native projection.',
41
+ 'avro.title': 'Apache Avro', 'bag.title': 'ROS bag', 'stp.title': 'STEP model',
42
+ 'db3.title': 'SQLite database', 'reqif.title': 'Requirements Interchange Format',
43
+ 'automotive.search': 'Search tables…', 'automotive.copyJson': 'Copy JSON',
44
+ 'automotive.rawPreview': 'Raw Preview', 'automotive.noData': 'No data available.',
45
+ 'automotive.rowsShown': '{shown} / {total} rows shown',
46
+ 'mat.title': 'MATLAB MAT-file', 'mat.search': 'Search variables and metadata…',
47
+ 'mat.copyJson': 'Copy JSON', 'mat.rawPreview': 'Raw preview',
48
+ 'mat.noMatches': 'No rows match the current search.', 'mat.rowsShown': '{shown} / {total} rows shown',
49
+ 'hdf5.title': 'HDF5', 'hdf5.search': 'Search tables…', 'hdf5.copyJson': 'Copy JSON',
50
+ 'hdf5.structure': 'Structure', 'hdf5.noData': 'No data available.',
51
+ 'hdf5.matchingRows': '{count} matching rows',
52
+ 'hdf5.matchingRowsLimited': '{visible} / {total} matching rows shown',
53
+ 'proto.title': 'Protocol Buffer', 'proto.summary': '{syntax} · {package} · {messages} messages · {services} services',
54
+ 'proto.noPackage': 'no package', 'proto.search': 'Search message, field, enum, RPC', 'proto.copyPanel': 'Copy panel',
55
+ 'proto.panel.tree': 'Message Tree', 'proto.panel.types': 'Types', 'proto.panel.relationships': 'Relationships',
56
+ 'proto.panel.reverse': 'Who Uses This?', 'proto.panel.json': 'JSON Example', 'proto.panel.breaking': 'Breaking Changes',
57
+ 'proto.panel.imports': 'Imports', 'proto.panel.grpc': 'gRPC', 'proto.panel.docs': 'Docs',
58
+ 'proto.kind.message': 'message', 'proto.kind.enum': 'enum', 'proto.kind.service': 'service', 'proto.kind.field': 'field',
59
+ 'proto.kind.repeated': 'repeated', 'proto.kind.oneof': 'oneof', 'proto.kind.value': 'value', 'proto.kind.rpc': 'rpc',
60
+ 'proto.kind.stream': 'stream', 'proto.kind.import': 'import',
61
+ 'proto.reverseRow': '{from} uses {to} via {name}', 'proto.noReferences': 'No references found for {name}.',
62
+ 'proto.noMessages': 'No messages found.', 'proto.noDocumentation': 'No documentation comment.',
63
+ 'proto.noDeclarations': 'No declarations found.', 'proto.breaking.placeholder': 'Paste previous .proto content here',
64
+ 'proto.breaking.compare': 'Compare', 'proto.breaking.breaking': 'breaking',
65
+ 'proto.breaking.none': 'No breaking changes detected by structural comparison.',
66
+ 'proto.breaking.messageRemoved': 'Message removed: {name}.',
67
+ 'proto.breaking.fieldRemoved': 'Field removed: {message}.{field} (number {number}).',
68
+ 'proto.breaking.fieldChanged': 'Field number {number} changed name or type in {message}.',
69
+ 'parquet.title': 'Parquet', 'parquet.search': 'Search rows…', 'parquet.raw': 'Raw', 'parquet.table': 'Table', 'parquet.copyJson': 'Copy JSON', 'parquet.exportJson': 'Export JSON', 'parquet.loadMore': 'Load Next {count} Rows', 'parquet.loading': 'Loading…', 'parquet.loadFailed': 'Could not load more rows: {message}', 'parquet.rows': 'rows', 'parquet.columns': 'columns', 'parquet.limited': 'Large file preview: {loaded} / {total} rows loaded.', 'parquet.copyCell': 'Copy cell value', 'parquet.copyRow': 'Copy row as JSON', 'parquet.copyColumn': 'Copy column values', 'parquet.autoFit': 'Auto fit column', 'parquet.resize': 'Drag to resize · double-click to auto fit', 'parquet.copyTable': 'Copy table', 'parquet.copied': 'Copied to clipboard',
70
+ 'word.title': 'Word document', 'word.zoomIn': 'Zoom in', 'word.zoomOut': 'Zoom out',
71
+ 'word.reset': 'Reset', 'word.print': 'Print', 'word.printUnavailable': 'Printing is not available on this platform.',
72
+ 'word.empty': 'This document has no readable text.',
73
+ 'diag.word.invalid-format': 'This file could not be read as a Word document.',
74
+ 'diag.word.missing-dependency': 'DOCX rendering is not installed on this platform.',
75
+ 'diag.word.limit-exceeded': 'This Word document exceeds the 50 MB limit.',
76
+ 'diag.word.decompression-limit': 'This Word document declares more uncompressed data than can be safely opened.',
77
+ 'diag.word.legacy-partial': 'Some legacy Word formatting could not be displayed.',
78
+ 'diag.word.embedded-partial': 'Some embedded Word objects could not be displayed.', 'word.image': 'Embedded image',
79
+ 'hwp.title': 'HWP document', 'hwp.zoomIn': 'Zoom in', 'hwp.zoomOut': 'Zoom out',
80
+ 'hwp.reset': 'Reset', 'hwp.pages': '{count} pages', 'hwp.pageLabel': 'Page {page}', 'hwp.empty': 'This document has no pages.', 'hwp.loadMorePages': 'Load next pages', 'hwp.loading': 'Loading HWP/HWPX with rhwp…',
81
+ 'diag.hwp.missing-dependency': 'HWP rendering is not installed on this platform.',
82
+ 'diag.hwp.invalid-format': 'This file could not be read as an HWP document.',
83
+ 'diag.hwp.corrupted': 'This HWP document is damaged or contains invalid page data.',
84
+ 'diag.hwp.limit-exceeded': 'This HWP document exceeds the 50 MB limit.',
85
+ 'diag.hwp.page-limit': 'Large document preview: rendered the first {rendered} of {total} pages.',
86
+ 'ppt.title': 'PowerPoint', 'ppt.previous': 'Previous slide', 'ppt.next': 'Next slide',
87
+ 'ppt.jump': 'Go to slide', 'ppt.mode.single': 'Single slide', 'ppt.mode.continuous': 'Continuous',
88
+ 'ppt.empty': 'This presentation contains no slides.',
89
+ 'diag.ppt.invalid-format': 'This file could not be read as a PowerPoint presentation.',
90
+ 'diag.ppt.empty': 'This presentation contains no renderable slides.',
91
+ 'diag.ppt.pdf-missing-dependency': 'PDF fallback requires PDF.js on this platform.',
92
+ 'diag.ppt.limit-exceeded': 'Only part of this presentation could be loaded.',
93
+ 'markdown.title': 'Markdown', 'markdown.preview': 'Preview', 'markdown.split': 'Split', 'markdown.source': 'Source',
94
+ 'markdown.render': 'Render', 'markdown.copyHtml': 'Copy HTML', 'markdown.copySource': 'Copy Source',
95
+ 'markdown.undo': 'Undo', 'markdown.redo': 'Redo', 'markdown.ready': 'Ready',
96
+ 'markdown.rendering': 'Rendering', 'markdown.rendered': 'Rendered', 'markdown.renderFailed': 'Render failed',
97
+ 'markdown.invalid': 'Invalid', 'markdown.modified': 'Modified', 'markdown.editable': 'Editable',
98
+ 'markdown.edited': 'Edited', 'markdown.htmlCopied': 'HTML copied', 'markdown.sourceCopied': 'Source copied',
99
+ 'markdown.summary': '{lines} lines, {words} words', 'markdown.renderedDiagrams': 'Rendered · {count} diagram(s)',
100
+ 'markdown.diagramFailed': 'Unable to render diagram.', 'markdown.toc': 'Contents',
101
+ 'markdown.copyCode': 'Copy code', 'markdown.assetUnavailable': 'Image unavailable',
102
+ 'diag.markdown.limit-exceeded': 'The Markdown document exceeds a supported limit.',
103
+ 'archive.title': 'Archive', 'archive.search': 'Search entries', 'archive.entries': '{count} entries',
104
+ 'archive.previewUnavailable': 'Preview unavailable', 'archive.mediaUnsupported': 'Media preview is unsupported.',
105
+ 'archive.encrypted': 'This archive is encrypted.', 'diag.archive.invalid-format': 'This file could not be read as an archive.',
106
+ 'diag.archive.limit-exceeded': 'The archive exceeds a supported limit.',
107
+ 'archive.preview': 'Archive Preview', 'archive.summary': 'Browsing the archive structure in read-only preview mode.',
108
+ 'archive.filter': 'Filter', 'archive.path': 'Path', 'archive.type': 'Type',
109
+ 'archive.compressedSize': 'Compressed Size', 'archive.originalSize': 'Original Size', 'archive.modified': 'Modified',
110
+ 'archive.files': 'Files', 'archive.directories': 'Directories', 'archive.visible': 'Visible',
111
+ 'archive.file': 'FILE', 'archive.directory': 'DIR', 'archive.noMatches': 'No matching entries found.',
112
+ 'archive.entryPreview': 'Entry Preview', 'archive.chooseFile': 'Choose a file', 'archive.idle': 'Idle',
113
+ 'archive.selectHint': 'Select an archive entry to inspect its content here.', 'archive.noSelection': 'No file selected.',
114
+ 'archive.loading': 'Loading', 'archive.loadingHint': 'Fetching file content from the archive for a quick preview.',
115
+ 'archive.loadingContent': 'Loading preview…', 'archive.ready': 'Ready',
116
+ 'archive.textReady': 'Rendered as plain text from the selected archive entry.',
117
+ 'archive.binaryReady': 'Rendered as a hexadecimal preview from the selected archive entry.',
118
+ 'archive.androidBinaryXmlReady': 'Decoded from Android binary XML.',
119
+ 'archive.directoryHint': 'Directory entries do not have inline file content.',
120
+ 'archive.directoryContent': 'This entry contains child items rather than file content.',
121
+ 'archive.saveEntry': 'Save entry', 'archive.savingEntry': 'Saving entry…',
122
+ 'archive.saveFailed': 'The selected entry could not be saved.',
123
+ 'diag.toml.invalid-table': 'Invalid TOML table declaration.',
124
+ 'diag.toml.invalid-assignment': 'Expected a TOML key/value assignment.',
125
+ 'diag.toml.invalid-key': 'Invalid TOML key.',
126
+ 'diag.toml.invalid-inline-table': 'Invalid TOML inline table entry.',
127
+ 'diag.toml.duplicate-key': 'Duplicate TOML key.',
128
+ 'diag.toml.max-depth': 'TOML nesting is too deep.',
129
+ 'diag.toml.node-limit': 'The TOML node limit was reached.',
130
+ 'diag.toml.table-limit': 'The TOML table limit was reached.',
131
+ 'diag.toml.array-limit': 'The TOML array limit was reached.',
132
+ 'diag.toml.duplicate-table': 'Duplicate TOML table.',
133
+ 'diag.toml.unclosed-value': 'A TOML value was not closed.',
134
+ 'diag.jsonl.invalid-line': 'Line {line} is not valid JSON.',
135
+ 'diag.jsonl.line-limit': 'Line {line} exceeds the JSONL line limit.',
136
+ 'diag.yaml.missing-dependency': 'YAML parsing is not installed on this platform.',
137
+ 'diag.yaml.invalid': 'This file could not be parsed as YAML.',
138
+ 'diag.yaml.document-limit': 'Only the first {count} YAML documents were parsed.',
139
+ 'diag.yaml.node-limit': 'The YAML node limit was reached.',
140
+ 'diag.yaml.depth-limit': 'The YAML nesting depth limit was reached.',
141
+ 'diag.yaml.alias-limit': 'The YAML alias limit was reached.',
142
+ 'structured.tree': 'Tree', 'structured.flat': 'Flat', 'structured.json': 'JSON', 'structured.raw': 'Raw', 'structured.expandAll': 'Expand all',
143
+ 'structured.collapseAll': 'Collapse all', 'structured.expand': 'Expand', 'structured.collapse': 'Collapse',
144
+ 'structured.search': 'Search', 'structured.copy': 'Copy', 'structured.copyPath': 'Path',
145
+ 'structured.copyValue': 'Value', 'structured.copyJson': 'JSON',
146
+ 'structured.source': 'Source', 'structured.sourceDescription': 'Editable original text',
147
+ 'structured.treeDescription': 'Structured preview',
148
+ 'toml.treeView': 'TOML', 'yaml.treeView': 'YAML', 'jsonl.title': 'JSON Lines',
149
+ 'jsonl.loadMore': 'Load more', 'jsonl.loadAll': 'Load all', 'jsonl.save': 'Save',
150
+ 'jsonl.editUnavailable': 'Editing requires the complete file.', 'diag.jsonl.load-failed': 'Could not load more JSON Lines data.',
151
+ 'jsonl.add': 'Add line', 'jsonl.delete': 'Delete selected', 'jsonl.edit': 'Edit', 'jsonl.apply': 'Apply',
152
+ 'jsonl.cancel': 'Cancel', 'jsonl.preview': 'Search and selection apply only to the loaded preview.',
153
+ 'jsonl.showMore': 'Show 5,000 more lines', 'jsonl.invalidSave': 'Fix invalid edited lines before saving.',
154
+ 'jsonl.rowValid': 'Line {line}, valid JSON', 'jsonl.rowInvalid': 'Line {line}, invalid JSON',
155
+ // Generic diagnostics
156
+ 'diag.limit-exceeded.rows': 'Only the first {count} rows were parsed (row limit reached).',
157
+ 'diag.limit-exceeded.input': 'The file exceeds the maximum supported size ({maxBytes} bytes).',
158
+ 'diag.limit-exceeded.decompressed': 'The archive declares more uncompressed data than the supported limit ({maxBytes} bytes).',
159
+ 'diag.aborted': 'Parsing was cancelled.',
160
+ 'diag.csv.ragged-rows': '{count} row(s) had a different number of columns and were padded or truncated.',
161
+ // JSON parser diagnostics (docs/parsers/json.md)
162
+ 'diag.limit-exceeded.nodes': 'Only the first {count} nodes were parsed (node limit reached).',
163
+ 'diag.json.invalid': 'This file could not be parsed as JSON.',
164
+ 'diag.json.invalid-token': 'Unexpected character in JSON; parsing stopped here.',
165
+ 'diag.json.unexpected-eof': 'The JSON ended unexpectedly.',
166
+ 'diag.json.unterminated-string': 'A string was not closed before the end of the input.',
167
+ 'diag.json.duplicate-key': 'Duplicate key "{key}"; both entries are kept.',
168
+ 'diag.json.trailing-content': 'Extra content after the JSON value was ignored.',
169
+ 'diag.json.max-depth': 'Nesting is too deep; parsing stopped at the depth limit.',
170
+ 'diag.json.invalid-escape': 'Invalid escape sequence in a string.',
171
+ 'diag.json.invalid-unicode-escape': 'Invalid \\u escape; four hex digits are required.',
172
+ 'diag.json.control-char': 'Unescaped control character in a string.',
173
+ // Excel parser diagnostics (docs/viewers/excel.md)
174
+ 'diag.limit-exceeded.cells': 'Only the first {count} cells were parsed (cell limit reached).',
175
+ 'diag.excel.invalid-format': 'This file could not be read as a spreadsheet.',
176
+ 'diag.excel.password-required': 'This spreadsheet is password-protected.',
177
+ 'diag.excel.empty-workbook': 'The workbook has no data.',
178
+ 'diag.excel.missing-dependency': 'The spreadsheet engine could not be loaded on this platform.',
179
+ // Common viewer chrome
180
+ 'common.rows': '{count} rows',
181
+ 'common.columns': '{count} columns',
182
+ 'common.page': 'Page {page} / {pages}',
183
+ 'common.prevPage': 'Previous page',
184
+ 'common.nextPage': 'Next page',
185
+ 'common.rowsMatched': '{matched} / {total} rows match',
186
+ 'common.copied': 'Copied to clipboard',
187
+ 'common.noClipboard': 'Copy is unavailable on this platform',
188
+ 'common.copyTooLarge': 'Too large to copy to the clipboard ({size} bytes). Use file export instead.',
189
+ 'common.noFileSave': 'Saving files is unavailable on this platform',
190
+ 'common.saved': 'Saved {name}',
191
+ 'common.savedToOriginal': 'Saved',
192
+ 'common.saveFailed': 'Save failed',
193
+ 'common.unsaved': 'Unsaved changes',
194
+ 'common.noWriteback': 'Saving to the original file is unavailable here — use Export file.',
195
+ // CSV viewer
196
+ 'csv.delimiter': 'Delimiter',
197
+ 'csv.delimiter.auto': 'Auto detect',
198
+ 'csv.delimiter.comma': 'Comma (,)',
199
+ 'csv.delimiter.semicolon': 'Semicolon (;)',
200
+ 'csv.delimiter.tab': 'Tab',
201
+ 'csv.delimiter.pipe': 'Pipe (|)',
202
+ 'csv.copyTsv': 'Copy as TSV',
203
+ 'csv.copyJson': 'Copy as JSON',
204
+ 'csv.exportFile': 'Export',
205
+ 'csv.exportFile.hint': 'Save the current search and sorted results as a new file',
206
+ 'csv.editUnavailable': 'Editing requires a fully parsed file',
207
+ 'csv.addRow': 'Add row',
208
+ 'csv.addColumn': 'Add column',
209
+ 'csv.insertRowBelow': 'Insert row below',
210
+ 'csv.deleteRow': 'Delete row',
211
+ 'csv.insertColumnLeft': 'Insert column left',
212
+ 'csv.insertColumnRight': 'Insert column right',
213
+ 'csv.deleteColumn': 'Delete column',
214
+ 'csv.undo': 'Undo',
215
+ 'csv.redo': 'Redo',
216
+ 'csv.save': 'Save',
217
+ 'csv.saveAs': 'Save as',
218
+ 'csv.statistics': 'Statistics',
219
+ 'csv.rawView': 'Raw',
220
+ 'csv.tableView': 'Table',
221
+ 'csv.sort.hint': 'Click to sort',
222
+ 'csv.header.hint': 'Click to sort · double-click to rename',
223
+ 'csv.resizeColumn': 'Drag to resize · double-click to reset',
224
+ 'csv.search': 'Search',
225
+ 'csv.noMatches': 'No matching rows in the loaded range.',
226
+ 'csv.rowNumbers': 'Row numbers',
227
+ 'csv.pageSize': 'Rows per page',
228
+ 'csv.stats.compact.count': 'n={count}',
229
+ 'csv.stats.compact.nulls': 'null {percent}',
230
+ 'csv.stats.compact.numeric': 'μ{mean} · {min}~{max}',
231
+ 'csv.stats.count': 'Count',
232
+ 'csv.stats.nulls': 'Nulls',
233
+ 'csv.stats.mean': 'Mean',
234
+ 'csv.stats.min': 'Min',
235
+ 'csv.stats.max': 'Max',
236
+ 'csv.empty': 'This file has no rows.',
237
+ // Excel viewer
238
+ 'excel.tableView': 'Spreadsheet',
239
+ 'excel.sheet': 'Sheet',
240
+ 'excel.search': 'Search in sheet…',
241
+ 'excel.viewMode': 'View',
242
+ 'excel.tableViewLabel': 'Table',
243
+ 'excel.gridView': 'Grid',
244
+ 'excel.rawView': 'Raw',
245
+ 'excel.gridTruncated': 'Large sheet — showing the first {count} rows only.',
246
+ 'excel.tableViewToggle': 'Table view',
247
+ 'excel.copyTsv': 'Copy as TSV',
248
+ 'excel.copyJson': 'Copy as JSON',
249
+ 'excel.export': 'Export XLSX',
250
+ 'excel.matchedCells': '{count} matched cells',
251
+ 'excel.sortHint': 'Click to sort · double-click to rename',
252
+ 'excel.resizeColumn': 'Drag to resize · double-click to reset',
253
+ 'excel.editHint': 'Double-click to edit',
254
+ 'excel.editUnavailable': 'Editing requires a fully parsed spreadsheet.',
255
+ 'excel.undo': 'Undo',
256
+ 'excel.redo': 'Redo',
257
+ 'excel.insertRowBelow': 'Insert row below',
258
+ 'excel.deleteRow': 'Delete row',
259
+ 'excel.empty': 'This sheet has no cells.',
260
+ // JSON viewer
261
+ 'json.treeView': 'JSON',
262
+ 'json.view.tree': 'Tree',
263
+ 'json.view.source': 'Source',
264
+ 'json.save': 'Save',
265
+ 'json.saveAs': 'Save as',
266
+ 'json.editor.title': 'Editor',
267
+ 'json.editor.description': 'Edit source text and apply actions',
268
+ 'json.preview.title': 'Preview',
269
+ 'json.preview.description': 'Syntax highlighted JSON',
270
+ 'json.form.verbatim': 'Original',
271
+ 'json.form.pretty': 'Pretty',
272
+ 'json.form.minified': 'Minified',
273
+ 'json.expandAll': 'Expand all',
274
+ 'json.collapseAll': 'Collapse all',
275
+ 'json.expandNode': 'Expand',
276
+ 'json.collapseNode': 'Collapse',
277
+ 'json.search': 'Search',
278
+ 'json.matchInfo': '{current} / {total}',
279
+ 'json.noMatches': 'No matches',
280
+ 'json.prevMatch': 'Previous match',
281
+ 'json.nextMatch': 'Next match',
282
+ 'json.copyPath': 'Path',
283
+ 'json.copyValue': 'Value',
284
+ 'json.stats': '{total} nodes · depth {depth}',
285
+ 'json.empty': 'Empty',
286
+ // Toolbox button labels
287
+ 'json.tool.format': 'Format',
288
+ 'json.tool.minify': 'Minify',
289
+ 'json.tool.sort': 'Sort keys',
290
+ 'json.tool.validate': 'Validate',
291
+ 'json.tool.escape': 'Escape',
292
+ 'json.tool.unescape': 'Unescape',
293
+ 'json.tool.base64Encode': 'Base64 →',
294
+ 'json.tool.base64Decode': 'Base64 ←',
295
+ 'json.tool.toCsv': '→ CSV',
296
+ 'json.tool.toXml': '→ XML',
297
+ 'json.tool.toYaml': '→ YAML',
298
+ // Toolbox result messages
299
+ 'json.tool.formatted': 'Formatted',
300
+ 'json.tool.minified': 'Minified',
301
+ 'json.tool.sorted': 'Keys sorted',
302
+ 'json.tool.escaped': 'Escaped',
303
+ 'json.tool.unescaped': 'Unescaped',
304
+ 'json.tool.base64Encoded': 'Base64 encoded',
305
+ 'json.tool.base64Decoded': 'Base64 decoded',
306
+ 'json.tool.valid': 'Valid JSON: {summary}',
307
+ 'json.tool.invalid': 'Invalid JSON',
308
+ 'json.tool.applied': 'Applied to editor',
309
+ 'json.tool.failed': 'Operation failed',
310
+ 'json.tool.unescapeFailed': 'Could not unescape the text',
311
+ 'json.tool.base64Failed': 'The text is not valid Base64',
312
+ 'json.tool.csvRequiresObjects': 'CSV needs an object or an array of objects',
313
+ 'json.tool.csvOutput': 'CSV output',
314
+ 'json.tool.xmlOutput': 'XML output',
315
+ 'json.tool.yamlOutput': 'YAML output',
316
+ 'json.result.copy': 'Copy',
317
+ 'json.result.replace': 'Replace editor',
318
+ 'json.result.close': 'Close',
319
+ // PDF viewer
320
+ 'pdf.title': 'PDF',
321
+ 'pdf.loading': 'Loading PDF…',
322
+ 'pdf.loadFailed': 'Unable to load this PDF.',
323
+ 'pdf.pages': 'pages',
324
+ 'pdf.goToPage': 'Go to page',
325
+ 'pdf.zoomIn': 'Zoom in',
326
+ 'pdf.zoomOut': 'Zoom out',
327
+ 'pdf.viewOptions': 'View options',
328
+ 'pdf.fitWidth': 'Fit to width',
329
+ 'pdf.fitHeight': 'Fit to height',
330
+ 'pdf.singlePage': 'Single page',
331
+ 'pdf.twoPagesOdd': 'Two pages (odd pages left)',
332
+ 'pdf.twoPagesEven': 'Two pages (even pages left)',
333
+ 'pdf.matchTheme': 'Match theme colors',
334
+ 'pdf.resetPages': 'Reset pages',
335
+ 'pdf.annotationText': 'Add text',
336
+ 'pdf.annotationSize': 'Text size',
337
+ 'pdf.annotationColor': 'Text color',
338
+ 'pdf.save': 'Save',
339
+ 'pdf.saveAs': 'Save as',
340
+ 'pdf.merge': 'Merge PDF',
341
+ 'pdf.merging': 'Merging PDF…',
342
+ 'pdf.mergeComplete': 'PDF merged. Save or Save as to keep the changes.',
343
+ 'pdf.mergeFailed': 'Unable to merge this PDF.',
344
+ 'pdf.signature': 'Signature',
345
+ 'pdf.signatureColor': 'Signature color',
346
+ 'pdf.signatureClear': 'Clear',
347
+ 'pdf.signatureUse': 'Use signature',
348
+ 'pdf.signaturePlace': 'Click a page to place the signature.',
349
+ 'pdf.highlight': 'Highlight',
350
+ 'pdf.highlightColor': 'Highlight color',
351
+ 'pdf.highlightSelect': 'Select text to highlight it.',
352
+ 'pdf.markupOptions': 'Text markup options',
353
+ 'pdf.underline': 'Underline',
354
+ 'pdf.underlineColor': 'Underline color',
355
+ 'pdf.strikeout': 'Strikethrough',
356
+ 'pdf.strikeoutColor': 'Strikethrough color',
357
+ 'pdf.cancel': 'Cancel',
358
+ 'pdf.textPlace': 'Click a page to place the text.',
359
+ 'pdf.deletePage': 'Delete page',
360
+ 'pdf.deleteAnnotation': 'Delete annotation',
361
+ 'pdf.password': 'Password',
362
+ 'pdf.passwordRequired': 'This PDF requires a password.',
363
+ 'pdf.passwordIncorrect': 'Incorrect password. Try again.',
364
+ 'pdf.passwordSubmit': 'Open',
365
+ 'pdf.editingUnavailable': 'PDF editing is unavailable on this platform',
366
+ 'pdf.noFilePick': 'Choosing a file to merge is unavailable on this platform',
367
+ // Image viewer (docs/viewers/image.md)
368
+ 'image.title': 'Image',
369
+ 'image.loading': 'Loading image…',
370
+ 'image.loadFailed': 'Unable to display this image.',
371
+ 'image.status': 'Zoom {zoom}%, rotation {rotation} degrees',
372
+ // Toolbar
373
+ 'image.zoomIn': 'Zoom in',
374
+ 'image.zoomOut': 'Zoom out',
375
+ 'image.fit': 'Fit',
376
+ 'image.rotate': 'Rotate 90°',
377
+ 'image.flipH': 'Flip horizontal',
378
+ 'image.flipV': 'Flip vertical',
379
+ 'image.grid': 'Grid',
380
+ 'image.reset': 'Reset',
381
+ 'image.filter': 'Filter',
382
+ 'image.preset.original': 'Original',
383
+ 'image.preset.bright': 'Bright',
384
+ 'image.preset.dark': 'Dark',
385
+ 'image.preset.vintage': 'Vintage',
386
+ 'image.preset.bw': 'B&W',
387
+ // Diagnostics
388
+ 'diag.image.invalid-format': 'This file could not be decoded as an image.',
389
+ 'diag.image.corrupted': 'The image data is damaged and could not be fully decoded.',
390
+ 'diag.image.animated-first-frame': 'Animated image — showing the first frame only.',
391
+ 'diag.image.svg-external-blocked': 'External references in this SVG were blocked for safety.',
392
+ 'diag.image.limit-exceeded.pixels': 'The image is too large; showing a downscaled preview.',
393
+ 'diag.image.limit-exceeded.canvas': 'The image is too large to edit or export on this platform.',
394
+ // Optional service tools (image.md I8)
395
+ 'image.tool.removeBackground': 'Remove background',
396
+ 'image.tool.removeBackground.unavailable': 'Background removal is unavailable on this platform',
397
+ 'image.bgRemoval.working': 'Removing background…',
398
+ 'image.bgRemoval.failed': 'Background removal failed.',
399
+ 'image.tool.detectSprites': 'Detect sprites',
400
+ 'image.tool.detectSprites.unavailable': 'Sprite detection is unavailable on this platform',
401
+ 'image.spriteDetection.working': 'Detecting sprites…',
402
+ 'image.spriteDetection.failed': 'Sprite detection failed.',
403
+ 'image.saveAsPng': 'Save as PNG',
404
+ 'image.saveAsPng.note': 'The edited image is saved as PNG (.png).',
405
+ // Fallback viewer
406
+ 'fallback.title.text': 'Text preview',
407
+ 'fallback.title.hex': 'Hex preview',
408
+ 'fallback.truncated': 'Preview truncated to the first {bytes} bytes.',
409
+ 'fallback.reason.missing-dependency': 'The full viewer could not be loaded on this platform.',
410
+ 'fallback.reason.unsupported': 'No viewer is available for this file type.'
411
+ };
@@ -0,0 +1 @@
1
+ export declare const CATALOG_KO: Record<string, string>;
@@ -0,0 +1,68 @@
1
+ // Korean messages owned by core. Missing keys intentionally fall back to the
2
+ // English source catalog in i18n/index.ts.
3
+ export const CATALOG_KO = {
4
+ 'audio.title': '오디오', 'video.title': '비디오', 'dbc.title': 'CAN 데이터베이스',
5
+ 'audio.play': '재생', 'audio.pause': '일시정지', 'audio.stop': '정지',
6
+ 'audio.loop': '반복', 'audio.clearRegions': '구간 지우기', 'audio.volume': '음량',
7
+ 'audio.zoom': '확대/축소', 'audio.zoomIn': '확대', 'audio.zoomOut': '축소', 'audio.zoomFit': '맞춤',
8
+ 'audio.visualization': '보기', 'audio.vis.waveform': '파형', 'audio.vis.spectrogram': '스펙트로그램',
9
+ 'audio.info.duration': '재생 시간', 'audio.info.sampleRate': '샘플레이트', 'audio.info.channels': '채널',
10
+ 'audio.info.bitDepth': '비트 깊이', 'audio.info.format': '형식', 'audio.info.fileSize': '파일 크기',
11
+ 'audio.loading': '오디오 디코딩 중…',
12
+ 'audio.status.region': '구간 {start} – {end} ({duration}초)',
13
+ 'audio.status.looping': '구간 반복 중', 'audio.status.loopTrack': '전체 반복 중',
14
+ 'audio.fallback': '파형 엔진을 사용할 수 없어 기본 플레이어로 표시합니다.',
15
+ 'audio.error.decode': '브라우저가 이 오디오 코덱을 디코딩할 수 없습니다. 코덱을 지원하는 호스트를 사용하거나 파일을 변환해 주세요.',
16
+ 'video.play': '재생', 'video.pause': '일시정지', 'video.stop': '정지',
17
+ 'video.skipBack': '⏪ -{seconds}초', 'video.skipForward': '⏩ +{seconds}초',
18
+ 'video.speed': '배속', 'video.zoom': '확대/축소', 'video.zoomIn': '확대',
19
+ 'video.zoomOut': '축소', 'video.zoomFit': '맞춤',
20
+ 'video.info.duration': '재생 시간', 'video.info.resolution': '해상도',
21
+ 'video.info.format': '형식', 'video.info.fileSize': '파일 크기',
22
+ 'video.error.empty': '미디어 파일이 비어 있습니다.',
23
+ 'video.error.tooLarge': '파일이 브라우저 미리보기 한도({limit})를 초과합니다.',
24
+ 'video.error.source': '이 환경에서는 브라우저 미디어 소스를 만들 수 없습니다.',
25
+ 'video.error.decode': '브라우저가 이 비디오 코덱을 디코딩할 수 없습니다. 코덱을 지원하는 호스트를 사용하거나 파일을 변환해 주세요.',
26
+ 'arxml.title': 'AUTOSAR XML', 'a2l.title': 'ASAM A2L', 'asc.title': 'Vector ASC 로그',
27
+ 'blf.title': 'Vector BLF 로그', 'mf4.title': 'ASAM MDF 4', 'pcap.title': 'PCAP 캡처',
28
+ 'pcapng.title': 'PCAPNG 캡처', 'mermaid.title': 'Mermaid 다이어그램',
29
+ 'plantuml.title': 'PlantUML 다이어그램', 'shapefile.title': 'ESRI Shapefile', 'psd.title': 'Photoshop 문서',
30
+ 'shapefile.zoomIn': '확대', 'shapefile.zoomOut': '축소', 'shapefile.reset': '보기 초기화',
31
+ 'shapefile.projection': '좌표계: {name}', 'shapefile.attributes': '피처 속성',
32
+ 'shapefile.featureLabel': '피처 {id}',
33
+ 'shapefile.noSelection': '지도에서 피처를 클릭하면 속성을 확인할 수 있습니다.',
34
+ 'shapefile.noAttributes': '이 shapefile에는 속성 테이블(.dbf)이 제공되지 않았습니다.',
35
+ 'shapefile.noRecord': '이 피처와 일치하는 속성 레코드가 없습니다.',
36
+ 'shapefile.dbfFailed': '속성 테이블(.dbf)을 읽을 수 없습니다:',
37
+ 'shapefile.reprojectFailed': '재투영에 실패하여 원본 좌표계로 표시합니다.',
38
+ 'avro.title': 'Apache Avro',
39
+ 'bag.title': 'ROS bag',
40
+ 'stp.title': 'STEP 모델',
41
+ 'db3.title': 'SQLite 데이터베이스',
42
+ 'reqif.title': '요구사항 교환 형식',
43
+ 'automotive.search': '표 검색…',
44
+ 'automotive.copyJson': 'JSON 복사',
45
+ 'automotive.rawPreview': '원문 미리보기',
46
+ 'automotive.noData': '표시할 데이터가 없습니다.',
47
+ 'automotive.rowsShown': '전체 {total}행 중 {shown}행 표시',
48
+ 'mat.title': 'MATLAB MAT 파일',
49
+ 'mat.search': '변수와 메타데이터 검색…',
50
+ 'mat.copyJson': 'JSON 복사',
51
+ 'mat.rawPreview': '원시 미리보기',
52
+ 'mat.noMatches': '검색 조건과 일치하는 행이 없습니다.',
53
+ 'mat.rowsShown': '전체 {total}행 중 {shown}행 표시',
54
+ 'hwp.title': '한글 문서',
55
+ 'hwp.zoomIn': '확대',
56
+ 'hwp.zoomOut': '축소',
57
+ 'hwp.reset': '초기화',
58
+ 'hwp.pages': '{count}페이지',
59
+ 'hwp.pageLabel': '{page}페이지',
60
+ 'hwp.empty': '표시할 페이지가 없습니다.',
61
+ 'hwp.loadMorePages': '다음 페이지 불러오기',
62
+ 'hwp.loading': 'rhwp로 HWP/HWPX 파일을 불러오는 중…',
63
+ 'diag.hwp.missing-dependency': '이 환경에 HWP 렌더러가 설치되어 있지 않습니다.',
64
+ 'diag.hwp.invalid-format': 'HWP 문서를 읽을 수 없습니다.',
65
+ 'diag.hwp.corrupted': 'HWP 문서가 손상되었거나 페이지 데이터가 올바르지 않습니다.',
66
+ 'diag.hwp.limit-exceeded': '50MB를 초과하는 HWP 문서는 열 수 없습니다.',
67
+ 'diag.hwp.page-limit': '전체 {total}페이지 중 {rendered}페이지를 불러왔습니다.'
68
+ };