@zilijonas/foliark 0.0.0-stage → 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 (276) hide show
  1. package/COMMERCIAL-LICENSING.md +33 -0
  2. package/LICENSE +235 -0
  3. package/LICENSE_FOXIT +27 -0
  4. package/LICENSING.md +55 -0
  5. package/NOTICE +14 -0
  6. package/README.md +101 -2
  7. package/SUPPORT_MATRIX.md +126 -0
  8. package/THIRD_PARTY_NOTICES.md +3603 -0
  9. package/cmaps/83pv-RKSJ-H.cmap +312 -0
  10. package/cmaps/90ms-RKSJ-H.cmap +257 -0
  11. package/cmaps/90ms-RKSJ-V.cmap +154 -0
  12. package/cmaps/90msp-RKSJ-H.cmap +255 -0
  13. package/cmaps/90msp-RKSJ-V.cmap +153 -0
  14. package/cmaps/90pv-RKSJ-H.cmap +353 -0
  15. package/cmaps/Add-RKSJ-H.cmap +736 -0
  16. package/cmaps/Add-RKSJ-V.cmap +133 -0
  17. package/cmaps/Adobe-CNS1-UCS2.cmap +18303 -0
  18. package/cmaps/Adobe-GB1-UCS2.cmap +14268 -0
  19. package/cmaps/Adobe-Japan1-UCS2.cmap +19160 -0
  20. package/cmaps/Adobe-Korea1-UCS2.cmap +9265 -0
  21. package/cmaps/B5pc-H.cmap +335 -0
  22. package/cmaps/B5pc-V.cmap +88 -0
  23. package/cmaps/CNS-EUC-H.cmap +488 -0
  24. package/cmaps/CNS-EUC-V.cmap +536 -0
  25. package/cmaps/ETen-B5-H.cmap +341 -0
  26. package/cmaps/ETen-B5-V.cmap +89 -0
  27. package/cmaps/ETenms-B5-H.cmap +77 -0
  28. package/cmaps/ETenms-B5-V.cmap +97 -0
  29. package/cmaps/EUC-H.cmap +205 -0
  30. package/cmaps/EUC-V.cmap +103 -0
  31. package/cmaps/Ext-RKSJ-H.cmap +766 -0
  32. package/cmaps/Ext-RKSJ-V.cmap +115 -0
  33. package/cmaps/GB-EUC-H.cmap +171 -0
  34. package/cmaps/GB-EUC-V.cmap +96 -0
  35. package/cmaps/GBK-EUC-H.cmap +4271 -0
  36. package/cmaps/GBK-EUC-V.cmap +95 -0
  37. package/cmaps/GBK2K-H.cmap +5517 -0
  38. package/cmaps/GBK2K-V.cmap +116 -0
  39. package/cmaps/GBKp-EUC-H.cmap +4270 -0
  40. package/cmaps/GBKp-EUC-V.cmap +95 -0
  41. package/cmaps/GBpc-EUC-H.cmap +173 -0
  42. package/cmaps/GBpc-EUC-V.cmap +96 -0
  43. package/cmaps/H.cmap +198 -0
  44. package/cmaps/HKscs-B5-H.cmap +1329 -0
  45. package/cmaps/HKscs-B5-V.cmap +88 -0
  46. package/cmaps/KSC-EUC-H.cmap +560 -0
  47. package/cmaps/KSC-EUC-V.cmap +92 -0
  48. package/cmaps/KSCms-UHC-H.cmap +774 -0
  49. package/cmaps/KSCms-UHC-HW-H.cmap +773 -0
  50. package/cmaps/KSCms-UHC-HW-V.cmap +91 -0
  51. package/cmaps/KSCms-UHC-V.cmap +92 -0
  52. package/cmaps/KSCpc-EUC-H.cmap +606 -0
  53. package/cmaps/LICENSE.txt +28 -0
  54. package/cmaps/MANIFEST.json +258 -0
  55. package/cmaps/UniCNS-UCS2-H.cmap +16990 -0
  56. package/cmaps/UniCNS-UCS2-V.cmap +88 -0
  57. package/cmaps/UniCNS-UTF16-H.cmap +19146 -0
  58. package/cmaps/UniCNS-UTF16-V.cmap +92 -0
  59. package/cmaps/UniGB-UCS2-H.cmap +14319 -0
  60. package/cmaps/UniGB-UCS2-V.cmap +99 -0
  61. package/cmaps/UniGB-UTF16-H.cmap +14567 -0
  62. package/cmaps/UniGB-UTF16-V.cmap +102 -0
  63. package/cmaps/UniJIS-UCS2-H.cmap +8868 -0
  64. package/cmaps/UniJIS-UCS2-HW-H.cmap +79 -0
  65. package/cmaps/UniJIS-UCS2-HW-V.cmap +277 -0
  66. package/cmaps/UniJIS-UCS2-V.cmap +273 -0
  67. package/cmaps/UniJIS-UTF16-H.cmap +14483 -0
  68. package/cmaps/UniJIS-UTF16-V.cmap +305 -0
  69. package/cmaps/UniKS-UCS2-H.cmap +8723 -0
  70. package/cmaps/UniKS-UCS2-V.cmap +93 -0
  71. package/cmaps/UniKS-UTF16-H.cmap +8893 -0
  72. package/cmaps/UniKS-UTF16-V.cmap +97 -0
  73. package/cmaps/V.cmap +103 -0
  74. package/dist/client.d.ts +48 -0
  75. package/dist/client.js +200 -0
  76. package/dist/document.d.ts +100 -0
  77. package/dist/document.js +108 -0
  78. package/dist/generated/AnnotationPolicy.d.ts +1 -0
  79. package/dist/generated/AnnotationPolicy.js +2 -0
  80. package/dist/generated/Capabilities.d.ts +9 -0
  81. package/dist/generated/Capabilities.js +1 -0
  82. package/dist/generated/Capability.d.ts +9 -0
  83. package/dist/generated/Capability.js +1 -0
  84. package/dist/generated/CapabilityReason.d.ts +5 -0
  85. package/dist/generated/CapabilityReason.js +1 -0
  86. package/dist/generated/CapabilityStatus.d.ts +1 -0
  87. package/dist/generated/CapabilityStatus.js +2 -0
  88. package/dist/generated/ChangeResult.d.ts +12 -0
  89. package/dist/generated/ChangeResult.js +1 -0
  90. package/dist/generated/ChangeSet.d.ts +16 -0
  91. package/dist/generated/ChangeSet.js +1 -0
  92. package/dist/generated/Cluster.d.ts +12 -0
  93. package/dist/generated/Cluster.js +1 -0
  94. package/dist/generated/Collateral.d.ts +5 -0
  95. package/dist/generated/Collateral.js +1 -0
  96. package/dist/generated/Ctl.d.ts +3 -0
  97. package/dist/generated/Ctl.js +1 -0
  98. package/dist/generated/CtlCancel.d.ts +8 -0
  99. package/dist/generated/CtlCancel.js +1 -0
  100. package/dist/generated/CtlEvent.d.ts +1 -0
  101. package/dist/generated/CtlEvent.js +2 -0
  102. package/dist/generated/CtlEventMsg.d.ts +8 -0
  103. package/dist/generated/CtlEventMsg.js +1 -0
  104. package/dist/generated/DocumentFeatures.d.ts +13 -0
  105. package/dist/generated/DocumentFeatures.js +2 -0
  106. package/dist/generated/DocumentInfo.d.ts +12 -0
  107. package/dist/generated/DocumentInfo.js +1 -0
  108. package/dist/generated/EditLayout.d.ts +11 -0
  109. package/dist/generated/EditLayout.js +1 -0
  110. package/dist/generated/EditPreview.d.ts +35 -0
  111. package/dist/generated/EditPreview.js +1 -0
  112. package/dist/generated/EditorFace.d.ts +7 -0
  113. package/dist/generated/EditorFace.js +2 -0
  114. package/dist/generated/EditsReport.d.ts +4 -0
  115. package/dist/generated/EditsReport.js +2 -0
  116. package/dist/generated/ErrorCode.d.ts +4 -0
  117. package/dist/generated/ErrorCode.js +2 -0
  118. package/dist/generated/ErrorDetails.d.ts +20 -0
  119. package/dist/generated/ErrorDetails.js +2 -0
  120. package/dist/generated/ErrorWire.d.ts +11 -0
  121. package/dist/generated/ErrorWire.js +1 -0
  122. package/dist/generated/ExportMode.d.ts +1 -0
  123. package/dist/generated/ExportMode.js +2 -0
  124. package/dist/generated/ExportPlan.d.ts +13 -0
  125. package/dist/generated/ExportPlan.js +1 -0
  126. package/dist/generated/ExportPolicy.d.ts +13 -0
  127. package/dist/generated/ExportPolicy.js +1 -0
  128. package/dist/generated/ExportReport.d.ts +20 -0
  129. package/dist/generated/ExportReport.js +1 -0
  130. package/dist/generated/ExtractOptions.d.ts +7 -0
  131. package/dist/generated/ExtractOptions.js +2 -0
  132. package/dist/generated/Flattened.d.ts +5 -0
  133. package/dist/generated/Flattened.js +2 -0
  134. package/dist/generated/FoliarkError.d.ts +10 -0
  135. package/dist/generated/FoliarkError.js +1 -0
  136. package/dist/generated/FontMatchRule.d.ts +7 -0
  137. package/dist/generated/FontMatchRule.js +2 -0
  138. package/dist/generated/FontResolution.d.ts +12 -0
  139. package/dist/generated/FontResolution.js +1 -0
  140. package/dist/generated/FontRule.d.ts +1 -0
  141. package/dist/generated/FontRule.js +2 -0
  142. package/dist/generated/FontSource.d.ts +10 -0
  143. package/dist/generated/FontSource.js +1 -0
  144. package/dist/generated/FontStyle.d.ts +1 -0
  145. package/dist/generated/FontStyle.js +2 -0
  146. package/dist/generated/GeneratedOrigin.d.ts +4 -0
  147. package/dist/generated/GeneratedOrigin.js +2 -0
  148. package/dist/generated/Hit.d.ts +7 -0
  149. package/dist/generated/Hit.js +1 -0
  150. package/dist/generated/InstancePath.d.ts +5 -0
  151. package/dist/generated/InstancePath.js +1 -0
  152. package/dist/generated/InstanceStep.d.ts +9 -0
  153. package/dist/generated/InstanceStep.js +1 -0
  154. package/dist/generated/InvisibleTextPolicy.d.ts +1 -0
  155. package/dist/generated/InvisibleTextPolicy.js +2 -0
  156. package/dist/generated/KeptReport.d.ts +4 -0
  157. package/dist/generated/KeptReport.js +2 -0
  158. package/dist/generated/LayoutRun.d.ts +6 -0
  159. package/dist/generated/LayoutRun.js +1 -0
  160. package/dist/generated/Limits.d.ts +18 -0
  161. package/dist/generated/Limits.js +2 -0
  162. package/dist/generated/Loss.d.ts +6 -0
  163. package/dist/generated/Loss.js +1 -0
  164. package/dist/generated/LossCode.d.ts +1 -0
  165. package/dist/generated/LossCode.js +2 -0
  166. package/dist/generated/Matrix.d.ts +4 -0
  167. package/dist/generated/Matrix.js +2 -0
  168. package/dist/generated/ObjectId.d.ts +10 -0
  169. package/dist/generated/ObjectId.js +2 -0
  170. package/dist/generated/OkFalse.d.ts +1 -0
  171. package/dist/generated/OkFalse.js +2 -0
  172. package/dist/generated/OkTrue.d.ts +1 -0
  173. package/dist/generated/OkTrue.js +2 -0
  174. package/dist/generated/OpName.d.ts +4 -0
  175. package/dist/generated/OpName.js +2 -0
  176. package/dist/generated/Origin.d.ts +12 -0
  177. package/dist/generated/Origin.js +1 -0
  178. package/dist/generated/PageGeometry.d.ts +24 -0
  179. package/dist/generated/PageGeometry.js +1 -0
  180. package/dist/generated/ParagraphInfo.d.ts +26 -0
  181. package/dist/generated/ParagraphInfo.js +1 -0
  182. package/dist/generated/Phase.d.ts +1 -0
  183. package/dist/generated/Phase.js +2 -0
  184. package/dist/generated/Point.d.ts +4 -0
  185. package/dist/generated/Point.js +2 -0
  186. package/dist/generated/PreviewGlyph.d.ts +13 -0
  187. package/dist/generated/PreviewGlyph.js +2 -0
  188. package/dist/generated/PreviewLine.d.ts +10 -0
  189. package/dist/generated/PreviewLine.js +2 -0
  190. package/dist/generated/Prog.d.ts +7 -0
  191. package/dist/generated/Prog.js +1 -0
  192. package/dist/generated/Progress.d.ts +6 -0
  193. package/dist/generated/Progress.js +1 -0
  194. package/dist/generated/Quad.d.ts +5 -0
  195. package/dist/generated/Quad.js +1 -0
  196. package/dist/generated/RasterPolicy.d.ts +4 -0
  197. package/dist/generated/RasterPolicy.js +2 -0
  198. package/dist/generated/Rect.d.ts +9 -0
  199. package/dist/generated/Rect.js +2 -0
  200. package/dist/generated/Redaction.d.ts +18 -0
  201. package/dist/generated/Redaction.js +1 -0
  202. package/dist/generated/RedactionReport.d.ts +16 -0
  203. package/dist/generated/RedactionReport.js +1 -0
  204. package/dist/generated/RegisteredFont.d.ts +9 -0
  205. package/dist/generated/RegisteredFont.js +1 -0
  206. package/dist/generated/RejectedChange.d.ts +7 -0
  207. package/dist/generated/RejectedChange.js +1 -0
  208. package/dist/generated/RenderWarning.d.ts +5 -0
  209. package/dist/generated/RenderWarning.js +1 -0
  210. package/dist/generated/RenderWarningCode.d.ts +1 -0
  211. package/dist/generated/RenderWarningCode.js +2 -0
  212. package/dist/generated/RenderedPageHeader.d.ts +17 -0
  213. package/dist/generated/RenderedPageHeader.js +1 -0
  214. package/dist/generated/Req.d.ts +13 -0
  215. package/dist/generated/Req.js +1 -0
  216. package/dist/generated/Res.d.ts +3 -0
  217. package/dist/generated/Res.js +1 -0
  218. package/dist/generated/ResErr.d.ts +9 -0
  219. package/dist/generated/ResErr.js +1 -0
  220. package/dist/generated/ResOk.d.ts +8 -0
  221. package/dist/generated/ResOk.js +1 -0
  222. package/dist/generated/RunSource.d.ts +1 -0
  223. package/dist/generated/RunSource.js +2 -0
  224. package/dist/generated/SanitizedItem.d.ts +1 -0
  225. package/dist/generated/SanitizedItem.js +2 -0
  226. package/dist/generated/SearchHit.d.ts +13 -0
  227. package/dist/generated/SearchHit.js +1 -0
  228. package/dist/generated/SearchOptions.d.ts +10 -0
  229. package/dist/generated/SearchOptions.js +2 -0
  230. package/dist/generated/SharedKind.d.ts +1 -0
  231. package/dist/generated/SharedKind.js +2 -0
  232. package/dist/generated/SharedSurvivor.d.ts +6 -0
  233. package/dist/generated/SharedSurvivor.js +1 -0
  234. package/dist/generated/SignedInputPolicy.d.ts +1 -0
  235. package/dist/generated/SignedInputPolicy.js +2 -0
  236. package/dist/generated/SourceLoc.d.ts +9 -0
  237. package/dist/generated/SourceLoc.js +1 -0
  238. package/dist/generated/StyleFlags.d.ts +6 -0
  239. package/dist/generated/StyleFlags.js +2 -0
  240. package/dist/generated/StyleRun.d.ts +18 -0
  241. package/dist/generated/StyleRun.js +1 -0
  242. package/dist/generated/TextEdit.d.ts +11 -0
  243. package/dist/generated/TextEdit.js +1 -0
  244. package/dist/generated/TextPage.d.ts +17 -0
  245. package/dist/generated/TextPage.js +1 -0
  246. package/dist/generated/TextRange.d.ts +11 -0
  247. package/dist/generated/TextRange.js +1 -0
  248. package/dist/generated/TextStats.d.ts +9 -0
  249. package/dist/generated/TextStats.js +2 -0
  250. package/dist/generated/V1.d.ts +1 -0
  251. package/dist/generated/V1.js +2 -0
  252. package/dist/generated/Word.d.ts +27 -0
  253. package/dist/generated/Word.js +1 -0
  254. package/dist/generated/WordSource.d.ts +1 -0
  255. package/dist/generated/WordSource.js +2 -0
  256. package/dist/index.d.ts +42 -0
  257. package/dist/index.js +3 -0
  258. package/dist/inline.d.ts +18 -0
  259. package/dist/inline.js +33 -0
  260. package/dist/layout.d.ts +5 -0
  261. package/dist/layout.js +3 -0
  262. package/dist/lifecycle.d.ts +7 -0
  263. package/dist/lifecycle.js +28 -0
  264. package/dist/protocol.d.ts +162 -0
  265. package/dist/protocol.js +302 -0
  266. package/dist/worker-core.d.ts +15 -0
  267. package/dist/worker-core.js +244 -0
  268. package/dist/worker-supervisor.d.ts +23 -0
  269. package/dist/worker-supervisor.js +41 -0
  270. package/dist/worker.d.ts +1 -0
  271. package/dist/worker.js +9 -0
  272. package/package.json +71 -3
  273. package/wasm/foliark_wasm.d.ts +120 -0
  274. package/wasm/foliark_wasm.js +1050 -0
  275. package/wasm/foliark_wasm_bg.wasm +0 -0
  276. package/wasm/foliark_wasm_bg.wasm.d.ts +32 -0
@@ -0,0 +1,9 @@
1
+ import type { CapabilityReason } from "./CapabilityReason";
2
+ import type { CapabilityStatus } from "./CapabilityStatus";
3
+ export type Capability = {
4
+ status: CapabilityStatus;
5
+ /**
6
+ * `unsupported` always carries the code the op would return.
7
+ */
8
+ reasons: Array<CapabilityReason>;
9
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { ErrorCode } from "./ErrorCode";
2
+ export type CapabilityReason = {
3
+ code: ErrorCode;
4
+ pages?: Array<number>;
5
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export type CapabilityStatus = "supported" | "unsupported" | "unknown";
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { EditLayout } from "./EditLayout";
2
+ import type { RejectedChange } from "./RejectedChange";
3
+ export type ChangeResult = {
4
+ accepted: boolean;
5
+ /**
6
+ * Unchanged if not accepted.
7
+ */
8
+ revision: number;
9
+ rejected: Array<RejectedChange>;
10
+ changedPages: Array<number>;
11
+ layouts: Array<EditLayout>;
12
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,16 @@
1
+ import type { Redaction } from "./Redaction";
2
+ import type { TextEdit } from "./TextEdit";
3
+ export type ChangeSet = {
4
+ /**
5
+ * Not equal to the handle's revision -> `STALE_REVISION`.
6
+ */
7
+ baseRevision: number;
8
+ /**
9
+ * Present replaces the whole edit list.
10
+ */
11
+ textEdits?: Array<TextEdit>;
12
+ /**
13
+ * Present replaces the whole redaction list.
14
+ */
15
+ redactions?: Array<Redaction>;
16
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { Quad } from "./Quad";
2
+ export type Cluster = {
3
+ start: number;
4
+ end: number;
5
+ quad: Quad;
6
+ styleIndex: number;
7
+ glyphs: number;
8
+ /**
9
+ * 1 invisible, 2 unmapped, 4 multiCodepoint, 8 ocgHidden.
10
+ */
11
+ flags: number;
12
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { Rect } from "./Rect";
2
+ export type Collateral = {
3
+ pageIndex: number;
4
+ bounds: Rect;
5
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { CtlCancel } from "./CtlCancel";
2
+ import type { CtlEventMsg } from "./CtlEventMsg";
3
+ export type Ctl = CtlCancel | CtlEventMsg;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { V1 } from "./V1";
2
+ export type CtlCancel = {
3
+ v: V1;
4
+ /**
5
+ * Request id to cancel; a queued op is dropped before it starts.
6
+ */
7
+ cancel: number;
8
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export type CtlEvent = "ready" | "fatal";
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { CtlEvent } from "./CtlEvent";
2
+ import type { V1 } from "./V1";
3
+ export type CtlEventMsg = {
4
+ v: V1;
5
+ event: CtlEvent;
6
+ gen: number;
7
+ reason?: string;
8
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ export type DocumentFeatures = {
2
+ forms: boolean;
3
+ xfa: boolean;
4
+ signatures: boolean;
5
+ optionalContent: boolean;
6
+ javascript: boolean;
7
+ embeddedFiles: boolean;
8
+ annotations: number;
9
+ structTree: boolean;
10
+ outlines: boolean;
11
+ thumbnails: boolean;
12
+ metadata: boolean;
13
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { DocumentFeatures } from "./DocumentFeatures";
2
+ export type DocumentInfo = {
3
+ pageCount: number;
4
+ pdfVersion: string;
5
+ encrypted: boolean;
6
+ repaired: boolean;
7
+ features: DocumentFeatures;
8
+ /**
9
+ * e.g. `cmap:UniJIS-UCS2-H`.
10
+ */
11
+ requiredAssets: Array<string>;
12
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import type { LayoutRun } from "./LayoutRun";
2
+ export type EditLayout = {
3
+ id: string;
4
+ lines: number;
5
+ approximate: boolean;
6
+ /**
7
+ * Hash of the layout inputs; a preview (ADR 0004) with the same inputs has the same one.
8
+ */
9
+ fingerprint: string;
10
+ runs: Array<LayoutRun>;
11
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,35 @@
1
+ import type { LayoutRun } from "./LayoutRun";
2
+ import type { PreviewGlyph } from "./PreviewGlyph";
3
+ import type { PreviewLine } from "./PreviewLine";
4
+ /**
5
+ * ADR 0004: the layout `applyChanges` would commit for one text edit, without committing.
6
+ */
7
+ export type EditPreview = {
8
+ docId: string;
9
+ /**
10
+ * The revision it was laid out on; stale once the document's revision differs.
11
+ */
12
+ revision: number;
13
+ /**
14
+ * Stale once the font registry version differs.
15
+ */
16
+ fontRegistryVersion: number;
17
+ fontSize: number;
18
+ lines: Array<PreviewLine>;
19
+ neededLines: number;
20
+ maxLines: number;
21
+ /**
22
+ * False: `applyChanges` would refuse with `EDIT_NO_FIT`.
23
+ */
24
+ fits: boolean;
25
+ approximate: boolean;
26
+ runs: Array<LayoutRun>;
27
+ /**
28
+ * Equals `ChangeResult.layouts[].fingerprint` for the same inputs.
29
+ */
30
+ fingerprint: string;
31
+ /**
32
+ * Only when asked for.
33
+ */
34
+ glyphs?: Array<PreviewGlyph>;
35
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ export type EditorFace = {
2
+ fontKey: string;
3
+ /**
4
+ * Travels as a transferred `ArrayBuffer`, never a view into wasm memory.
5
+ */
6
+ bytes: Uint8Array;
7
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ export type EditsReport = {
2
+ applied: number;
3
+ approximate: number;
4
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Every typed refusal or failure of the public API (spec §12).
3
+ */
4
+ export type ErrorCode = "INVALID_ARGUMENT" | "MALFORMED_PDF" | "REPAIRED_PDF" | "DECODE_FAILED" | "PASSWORD_REQUIRED" | "PASSWORD_INCORRECT" | "ENCRYPTION_UNSUPPORTED" | "LIMIT_EXCEEDED" | "OUT_OF_MEMORY" | "ASSET_LOAD_FAILED" | "FONT_UNSUPPORTED" | "EDIT_NO_STYLE" | "EDIT_ROTATED_TEXT" | "EDIT_NO_FONT" | "EDIT_NO_FIT" | "EDIT_UNSUPPORTED_SCRIPT" | "STALE_REVISION" | "STALE_PLAN" | "PLAN_CONSUMED" | "FORM_APPEARANCE_MISSING" | "XFA_UNSUPPORTED" | "OPTIONAL_CONTENT_UNSUPPORTED" | "SIGNED_INPUT" | "REDACT_PATTERN_UNSUPPORTED" | "REDACT_VECTOR_UNSUPPORTED" | "REDACT_VERIFY_FAILED" | "RENDER_INCOMPLETE" | "CONSENT_REQUIRED" | "CANCELLED" | "WORKER_RESET" | "DOCUMENT_GONE" | "DOCUMENT_CLOSED" | "CLIENT_DISPOSED" | "PROTOCOL_ERROR" | "INTERNAL";
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Structured error context. Only `chars` (of a refused edit) may contain document text.
3
+ */
4
+ export type ErrorDetails = {
5
+ limit?: string;
6
+ actual?: number;
7
+ max?: number;
8
+ feature?: string;
9
+ pages?: Array<number>;
10
+ fields?: Array<string>;
11
+ editId?: string;
12
+ chars?: string;
13
+ neededLines?: number;
14
+ maxLines?: number;
15
+ objRef?: string;
16
+ /**
17
+ * Ids of the refused operations (redactions) the error is about.
18
+ */
19
+ ids?: Array<string>;
20
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,11 @@
1
+ import type { ErrorCode } from "./ErrorCode";
2
+ import type { ErrorDetails } from "./ErrorDetails";
3
+ /**
4
+ * `FoliarkError` as it travels in a protocol response (spec §10.4).
5
+ */
6
+ export type ErrorWire = {
7
+ recoverable: boolean;
8
+ code: ErrorCode;
9
+ message: string;
10
+ details?: ErrorDetails;
11
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export type ExportMode = "native" | "raster";
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,13 @@
1
+ import type { ExportMode } from "./ExportMode";
2
+ import type { ExportReport } from "./ExportReport";
3
+ export type ExportPlan = {
4
+ planId: string;
5
+ docId: string;
6
+ generation: number;
7
+ revision: number;
8
+ mode: ExportMode;
9
+ policyHash: string;
10
+ fontRegistryVersion: number;
11
+ byteLength: number;
12
+ report: ExportReport;
13
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ import type { AnnotationPolicy } from "./AnnotationPolicy";
2
+ import type { InvisibleTextPolicy } from "./InvisibleTextPolicy";
3
+ import type { RasterPolicy } from "./RasterPolicy";
4
+ import type { SignedInputPolicy } from "./SignedInputPolicy";
5
+ /**
6
+ * Spec §1.6 policy. The SDK sends `Partial<ExportPolicy>`: missing fields take these defaults.
7
+ */
8
+ export type ExportPolicy = {
9
+ annotations: AnnotationPolicy;
10
+ signedInput: SignedInputPolicy;
11
+ invisibleText: InvisibleTextPolicy;
12
+ raster: RasterPolicy;
13
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,20 @@
1
+ import type { EditsReport } from "./EditsReport";
2
+ import type { ExportMode } from "./ExportMode";
3
+ import type { Flattened } from "./Flattened";
4
+ import type { KeptReport } from "./KeptReport";
5
+ import type { Loss } from "./Loss";
6
+ import type { RedactionReport } from "./RedactionReport";
7
+ import type { SanitizedItem } from "./SanitizedItem";
8
+ export type ExportReport = {
9
+ mode: ExportMode;
10
+ pages: number;
11
+ outputBytes: number;
12
+ removed: {
13
+ [key in SanitizedItem]?: number;
14
+ };
15
+ flattened: Flattened;
16
+ redaction: RedactionReport;
17
+ edits: EditsReport;
18
+ kept: KeptReport;
19
+ losses: Array<Loss>;
20
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * `extractText` options (spec §1): `chars` adds `TextPage::clusters`.
3
+ */
4
+ export type ExtractOptions = {
5
+ chars?: boolean;
6
+ includeOcgHidden?: boolean;
7
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ export type Flattened = {
2
+ annotations: number;
3
+ widgets: number;
4
+ ocgLayers: number;
5
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,10 @@
1
+ import type { ErrorCode } from "./ErrorCode";
2
+ import type { ErrorDetails } from "./ErrorDetails";
3
+ /**
4
+ * The error a Rust op returns across the wasm boundary (`PdfError` plus a message).
5
+ */
6
+ export type FoliarkError = {
7
+ code: ErrorCode;
8
+ message: string;
9
+ details?: ErrorDetails;
10
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * `pattern` is a lowercase substring of the normalized source font name.
3
+ */
4
+ export type FontMatchRule = {
5
+ pattern: string;
6
+ family: string;
7
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { FontRule } from "./FontRule";
2
+ export type FontResolution = {
3
+ "source": "embedded";
4
+ fontRef: string;
5
+ name: string;
6
+ coversAscii: boolean;
7
+ } | {
8
+ "source": "registered";
9
+ fontId: string;
10
+ family: string;
11
+ rule: FontRule;
12
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export type FontRule = "caller" | "nameMatch" | "flags";
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,10 @@
1
+ import type { FontStyle } from "./FontStyle";
2
+ /**
3
+ * One face handed to `registerFonts`. `weight` is 400 or 700.
4
+ */
5
+ export type FontSource = {
6
+ bytes: ArrayBuffer | Uint8Array;
7
+ family: string;
8
+ weight: number;
9
+ style: FontStyle;
10
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export type FontStyle = "normal" | "italic";
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Content Foliark wrote itself, so there is no input byte range. The reader never makes these.
3
+ */
4
+ export type GeneratedOrigin = "edit" | "redaction";
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { Quad } from "./Quad";
2
+ export type Hit = {
3
+ start: number;
4
+ end: number;
5
+ wordIndex: number;
6
+ quad: Quad;
7
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { InstanceStep } from "./InstanceStep";
2
+ /**
3
+ * The Form instances an item is drawn through, outermost first. Empty = drawn by the page.
4
+ */
5
+ export type InstancePath = Array<InstanceStep>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { ObjectId } from "./ObjectId";
2
+ /**
3
+ * One Form XObject (or annotation appearance, pattern, Type3 procedure) on the way down to
4
+ * an item. `occurrence` counts how often `form` was drawn before inside the same parent.
5
+ */
6
+ export type InstanceStep = {
7
+ form: ObjectId;
8
+ occurrence: number;
9
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export type InvisibleTextPolicy = "keep" | "remove" | "keepOcr";
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ export type KeptReport = {
2
+ invisibleTextClusters: number;
3
+ fontsWithGlyphInventory: Array<string>;
4
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { RunSource } from "./RunSource";
2
+ export type LayoutRun = {
3
+ source: RunSource;
4
+ font: string;
5
+ clusters: number;
6
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Resource limits. Deserializing a partial object fills the rest with the SDK defaults, so the
3
+ * facade can take `Partial<Limits>` straight from `FoliarkOptions`.
4
+ */
5
+ export type Limits = {
6
+ maxInputBytes: number;
7
+ maxPages: number;
8
+ maxObjects: number;
9
+ maxStreamDecodedBytes: number;
10
+ maxDecodeRatio: number;
11
+ maxImagePixels: number;
12
+ maxRenderPixels: number;
13
+ maxNesting: number;
14
+ maxWorkUnits: number;
15
+ maxOutputBytes: number;
16
+ maxOpenDocuments: number;
17
+ maxRegisteredFontBytes: number;
18
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { LossCode } from "./LossCode";
2
+ export type Loss = {
3
+ code: LossCode;
4
+ count: number;
5
+ pages?: Array<number>;
6
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export type LossCode = "METADATA_REMOVED" | "ATTACHMENTS_REMOVED" | "SCRIPTS_REMOVED" | "ANNOTATIONS_FLATTENED" | "ANNOTATIONS_REMOVED" | "LINKS_REMOVED" | "FORMS_FLATTENED" | "LAYERS_FLATTENED" | "ACCESSIBILITY_REMOVED" | "OUTLINES_REMOVED" | "PAGE_LABELS_REMOVED" | "PDFA_CLAIM_REMOVED" | "ENCRYPTION_REMOVED" | "SIGNATURES_INVALIDATED" | "IMAGE_REENCODED" | "VECTOR_COLLATERAL" | "VECTOR_CUT_APPROXIMATED" | "FONT_SUBSTITUTED" | "FONT_GLYPH_INVENTORY_RETAINED" | "TEXT_SEARCH_LOST" | "VECTOR_RASTERIZED";
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ /**
2
+ * `x' = a x + c y + e`, `y' = b x + d y + f`, stored `[a, b, c, d, e, f]`.
3
+ */
4
+ export type Matrix = [number, number, number, number, number, number];
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * A PDF indirect object id.
3
+ */
4
+ export type ObjectId = {
5
+ num: number;
6
+ /**
7
+ * The generation number (`gen` is reserved in Rust 2024).
8
+ */
9
+ gen: number;
10
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1 @@
1
+ export type OkFalse = false;