@build-qube/papyra 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +12 -1
  2. package/dist/attachments.d.ts +6 -1
  3. package/dist/attachments.d.ts.map +1 -1
  4. package/dist/attachments.js +6 -1
  5. package/dist/attachments.js.map +1 -1
  6. package/dist/cache.d.ts +5 -0
  7. package/dist/cache.d.ts.map +1 -1
  8. package/dist/cache.js +8 -0
  9. package/dist/cache.js.map +1 -1
  10. package/dist/canvas.d.ts +2 -2
  11. package/dist/canvas.d.ts.map +1 -1
  12. package/dist/canvas.js +20 -7
  13. package/dist/canvas.js.map +1 -1
  14. package/dist/core.d.ts +53 -0
  15. package/dist/core.d.ts.map +1 -0
  16. package/dist/core.js +38 -0
  17. package/dist/core.js.map +1 -0
  18. package/dist/document.d.ts +28 -20
  19. package/dist/document.d.ts.map +1 -1
  20. package/dist/document.js +79 -360
  21. package/dist/document.js.map +1 -1
  22. package/dist/engine.d.ts +327 -0
  23. package/dist/engine.d.ts.map +1 -0
  24. package/dist/engine.js +485 -0
  25. package/dist/engine.js.map +1 -0
  26. package/dist/errors.d.ts +2 -1
  27. package/dist/errors.d.ts.map +1 -1
  28. package/dist/errors.js +2 -1
  29. package/dist/errors.js.map +1 -1
  30. package/dist/fingerprint.d.ts +2 -1
  31. package/dist/fingerprint.d.ts.map +1 -1
  32. package/dist/fingerprint.js +2 -1
  33. package/dist/fingerprint.js.map +1 -1
  34. package/dist/index.d.ts +4 -27
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +3 -12
  37. package/dist/index.js.map +1 -1
  38. package/dist/links.d.ts +6 -1
  39. package/dist/links.d.ts.map +1 -1
  40. package/dist/links.js +6 -1
  41. package/dist/links.js.map +1 -1
  42. package/dist/office.d.ts +85 -0
  43. package/dist/office.d.ts.map +1 -0
  44. package/dist/office.js +135 -0
  45. package/dist/office.js.map +1 -0
  46. package/dist/papyra-engine.d.ts +68 -0
  47. package/dist/papyra-engine.d.ts.map +1 -0
  48. package/dist/papyra-engine.js +173 -0
  49. package/dist/papyra-engine.js.map +1 -0
  50. package/dist/runtime.d.ts +7 -0
  51. package/dist/runtime.d.ts.map +1 -1
  52. package/dist/runtime.js +11 -0
  53. package/dist/runtime.js.map +1 -1
  54. package/dist/scheduler.d.ts +10 -2
  55. package/dist/scheduler.d.ts.map +1 -1
  56. package/dist/scheduler.js +26 -7
  57. package/dist/scheduler.js.map +1 -1
  58. package/dist/source.d.ts +1 -1
  59. package/dist/source.js +1 -1
  60. package/dist/text.d.ts +6 -1
  61. package/dist/text.d.ts.map +1 -1
  62. package/dist/text.js +6 -1
  63. package/dist/text.js.map +1 -1
  64. package/dist/types.d.ts +22 -2
  65. package/dist/types.d.ts.map +1 -1
  66. package/package.json +24 -3
@@ -0,0 +1,327 @@
1
+ import type { Attachment } from './attachments.js';
2
+ import { type CacheStats, RenderCache } from './cache.js';
3
+ import type { PageLink } from './links.js';
4
+ import type { OutlineNode } from './outline.js';
5
+ import { type JobHandle, Scheduler } from './scheduler.js';
6
+ import { type SearchMatch } from './search.js';
7
+ import type { StructNode } from './structure.js';
8
+ import { type PageText } from './text.js';
9
+ import type { DocumentMetadata, OpenOptions, PageBitmap, PageSize, PdfSource, RenderHandle, RenderOptions, SearchOptions, StreamedPage, StreamOptions } from './types.js';
10
+ /**
11
+ * Where text extraction sits in the queue by default.
12
+ *
13
+ * Behind rendering: a search that stalls the page the user is looking at is worse
14
+ * than one that takes another beat to fill in.
15
+ */
16
+ export declare const DEFAULT_TEXT_PRIORITY = 3;
17
+ /**
18
+ * What an engine can do beyond rendering pages.
19
+ *
20
+ * A viewer reads these to decide what to show at all — a find bar on an engine with
21
+ * no text, or an outline tab on one that cannot read outlines, is a control that
22
+ * silently does nothing. A command an engine lacks still resolves, to an empty
23
+ * result, so code that ignores these flags degrades rather than throws.
24
+ */
25
+ export interface Capabilities {
26
+ /** Text extraction, and therefore search. */
27
+ readonly text: boolean;
28
+ /** The document outline. */
29
+ readonly outline: boolean;
30
+ /** Link regions and their targets. */
31
+ readonly links: boolean;
32
+ /** Embedded files. */
33
+ readonly attachments: boolean;
34
+ /** The structure tree of a tagged PDF. */
35
+ readonly structure: boolean;
36
+ /** Page labels. */
37
+ readonly pageLabels: boolean;
38
+ /** Whether {@link RenderOptions.annotations} is honoured. */
39
+ readonly annotationsToggle: boolean;
40
+ }
41
+ /** No capabilities at all: an engine that only renders pages. */
42
+ export declare const RENDER_ONLY: Capabilities;
43
+ /** Whether an engine can run here, and if not, what to tell the reader. */
44
+ export type Availability = {
45
+ /** It can. */
46
+ readonly ok: true;
47
+ } | {
48
+ /** It cannot. */
49
+ readonly ok: false;
50
+ /** One line, for a heading. */
51
+ readonly title: string;
52
+ /** What is wrong and how to fix it, in plain text. */
53
+ readonly reason: string;
54
+ };
55
+ /**
56
+ * An open document with pages: the facts a page view needs, and nothing that does
57
+ * work. Every operation is a method on the engine that opened it, taking this as its
58
+ * first argument — `engine.render(doc, 0)`.
59
+ *
60
+ * Only meaningful to that engine. Passing it to another throws rather than drawing
61
+ * nothing.
62
+ */
63
+ export interface PagedDoc {
64
+ /** The `id` of the engine that opened it. */
65
+ readonly engine: string;
66
+ /** How many pages there are. Page indices are 0-based throughout. */
67
+ readonly pageCount: number;
68
+ /**
69
+ * Page size in points (1/72 inch), before any view rotation.
70
+ *
71
+ * Synchronous, so a page column has its final geometry before anything
72
+ * rasterises. An engine whose sizes live across an async boundary fetches them all
73
+ * while opening.
74
+ */
75
+ pageSize(index: number): PageSize;
76
+ /** What the engine can do with this document beyond rendering it. */
77
+ readonly capabilities: Capabilities;
78
+ }
79
+ /** An open PDF. */
80
+ export interface PdfDoc extends PagedDoc {
81
+ /**
82
+ * A stable identifier for this document, for keying whatever you remember per
83
+ * document. papyra's engine hashes the bytes; another engine may use the file's
84
+ * own `/ID`. Stable per engine, not across engines.
85
+ */
86
+ readonly fingerprint: string;
87
+ /** What the document says about itself. See {@link DocumentMetadata}. */
88
+ readonly metadata: DocumentMetadata;
89
+ /** The PDF version the file declares, e.g. `'1.7'`. */
90
+ readonly pdfVersion: string | null;
91
+ }
92
+ /** How a backend is asked to render: everything sizing has already been resolved. */
93
+ export interface BackendRenderOptions {
94
+ /**
95
+ * Dots per inch. 72 is one pixel per point.
96
+ *
97
+ * Resolved from `fitWidth` or `dpi` by the engine, so a backend never sees either —
98
+ * and handed over unconverted, because a page's pixel size is floored from it and a
99
+ * round trip through another unit can move that by a pixel.
100
+ */
101
+ readonly dpi: number;
102
+ /** Draw the document's own annotations. `undefined` means the backend's default. */
103
+ readonly annotations: boolean | undefined;
104
+ }
105
+ /**
106
+ * One open document, as an engine implementation sees it. Never handed to a viewer;
107
+ * the engine wraps it in a {@link PagedDoc}.
108
+ */
109
+ export interface PagedBackend {
110
+ /** How many pages there are. */
111
+ readonly pageCount: number;
112
+ /** See {@link PagedDoc.pageSize}. */
113
+ pageSize(index: number): PageSize;
114
+ /** What this backend implements beyond {@link renderPage}. */
115
+ readonly capabilities: Capabilities;
116
+ /** Pages this backend can usefully render at once, when the caller does not say. */
117
+ readonly concurrency?: number;
118
+ /**
119
+ * Whether {@link renderPage} stops early when its signal aborts.
120
+ *
121
+ * Then a render that has started is aborted once nobody waits for it — scrolled
122
+ * past, say — instead of finishing for a cache nobody may read. Leave it unset when
123
+ * the work cannot be interrupted, as papyra's own cannot: an unaborted render that
124
+ * the reader scrolls back to is joined rather than started again.
125
+ */
126
+ readonly abortable?: boolean;
127
+ /**
128
+ * Rasterise one page.
129
+ *
130
+ * `signal` aborts when the render is no longer wanted, and only for an
131
+ * {@link abortable} backend.
132
+ */
133
+ renderPage(index: number, options: BackendRenderOptions, signal?: AbortSignal): Promise<PageBitmap>;
134
+ /**
135
+ * Release whatever the backend holds outside the JS heap. Async where that is a
136
+ * call to somewhere else — a host process — so a failure reaches the caller.
137
+ */
138
+ close?(): void | Promise<void>;
139
+ }
140
+ /**
141
+ * One open PDF, as an engine implementation sees it. The optional members match
142
+ * {@link Capabilities}: a backend that leaves one out reports `false` for it.
143
+ */
144
+ export interface PdfBackend extends PagedBackend {
145
+ /** See {@link PdfDoc.fingerprint}. */
146
+ readonly fingerprint: string;
147
+ /** See {@link PdfDoc.metadata}. Called at most once. */
148
+ metadata(): DocumentMetadata;
149
+ /** See {@link PdfDoc.pdfVersion}. */
150
+ pdfVersion(): string | null;
151
+ /** One page's text, in 72-DPI top-left page space. */
152
+ pageText?(index: number): Promise<PageText>;
153
+ /** The outline, as a tree. */
154
+ outline?(): Promise<OutlineNode[]>;
155
+ /** One page's links. */
156
+ links?(index: number): Promise<readonly PageLink[]>;
157
+ /** One label per page, or none. */
158
+ pageLabels?(): Promise<readonly string[]>;
159
+ /** The embedded files, metadata only. */
160
+ attachments?(): Promise<readonly Attachment[]>;
161
+ /** One embedded file's bytes. */
162
+ attachmentData?(index: number): Promise<Uint8Array>;
163
+ /** The structure tree, flat and pre-order. */
164
+ structTree?(): Promise<StructNode[]>;
165
+ }
166
+ /** @internal Everything an engine keeps per open document. */
167
+ export interface DocState<B extends PagedBackend = PagedBackend> {
168
+ readonly engine: PagedEngine<PagedDoc, B>;
169
+ readonly backend: B;
170
+ readonly scheduler: Scheduler;
171
+ readonly limit: number;
172
+ readonly cache: RenderCache<PageBitmap>;
173
+ readonly text: RenderCache<PageText>;
174
+ readonly links: RenderCache<readonly PageLink[]>;
175
+ /** In-flight link reads, so two callers on one page share a single task. */
176
+ readonly linksPending: Map<number, Promise<readonly PageLink[]>>;
177
+ outline?: Promise<OutlineNode[]>;
178
+ attachments?: Promise<readonly Attachment[]>;
179
+ structure?: Promise<StructNode[]>;
180
+ labels?: Promise<readonly string[]>;
181
+ /** Set by `close`. A flag rather than only a delete, so every alias sees it. */
182
+ closed?: boolean;
183
+ }
184
+ /** @internal The state behind a handle, checked against the engine asking. */
185
+ export declare function stateOf<B extends PagedBackend>(engine: PagedEngine<PagedDoc, B> | null, doc: object): DocState<B>;
186
+ /** @internal Make `alias` stand for the same open document as `doc`. */
187
+ export declare function adopt(alias: object, doc: object): void;
188
+ /** @internal Cache key of one page's extracted text. */
189
+ export declare function textKey(index: number): string;
190
+ /**
191
+ * Cache- and coalescing-key suffix for the annotation switch.
192
+ *
193
+ * Empty in the default case, so the ordinary key keeps the shape it has always had.
194
+ * The suffix has to exist at all because the scheduler coalesces on this string and
195
+ * the cache is looked up by it: without it, asking for a page with annotations off
196
+ * would be served the bitmap that still has them drawn on.
197
+ *
198
+ * @internal
199
+ */
200
+ export declare function annotationKey(options: {
201
+ annotations?: boolean | undefined;
202
+ }): string;
203
+ /**
204
+ * Wire an `AbortSignal` to a queued job. Cancelling only drops work not yet started.
205
+ *
206
+ * @internal
207
+ */
208
+ export declare function attachSignal(handle: JobHandle<unknown>, signal: AbortSignal | undefined): void;
209
+ /**
210
+ * Turn `fitWidth`/`dpi` into a concrete DPI, and refuse absurd outputs.
211
+ *
212
+ * `fitWidth` exists because page sizes vary by two orders of magnitude in area: a
213
+ * DPI that is sensible for US Letter produces a 113 MB bitmap for an ARCH-E drawing.
214
+ *
215
+ * @internal
216
+ */
217
+ export declare function resolveDpi(backend: PagedBackend, index: number, options: RenderOptions): number;
218
+ /** @internal `[start, end)` as an array. */
219
+ export declare function range(start: number, end: number): number[];
220
+ /**
221
+ * Opens documents with pages, and does everything to them.
222
+ *
223
+ * The queue, the caches and `fitWidth` live here, written once: an implementation
224
+ * supplies {@link load} and {@link handle} and gets priority scheduling,
225
+ * coalescing, a byte-bounded render cache and streaming for nothing. Constructing an
226
+ * engine loads nothing — whatever it renders with is fetched by the first `open`.
227
+ *
228
+ * @typeParam D - The handle `open` returns.
229
+ * @typeParam B - The backend `load` produces.
230
+ */
231
+ export declare abstract class PagedEngine<D extends PagedDoc = PagedDoc, B extends PagedBackend = PagedBackend> {
232
+ /** Stable name, for diagnostics and {@link PagedDoc.engine}. */
233
+ abstract readonly id: string;
234
+ /**
235
+ * Whether this engine can run here. Synchronous and side-effect free — a guard
236
+ * renders on it before anything is loaded.
237
+ */
238
+ abstract availability(): Availability;
239
+ /**
240
+ * Parse a document. Throws {@link PasswordRequiredError} or
241
+ * {@link IncorrectPasswordError} for an encrypted one.
242
+ */
243
+ protected abstract load(source: PdfSource, options: OpenOptions): Promise<B>;
244
+ /** Build the handle `open` returns for a freshly loaded backend. */
245
+ protected abstract handle(backend: B): D;
246
+ /**
247
+ * Open a document. The handle is passed to this engine's other methods; see
248
+ * {@link OpenOptions} for the queue and cache settings it is opened with.
249
+ */
250
+ open(source: PdfSource, options?: OpenOptions): Promise<D>;
251
+ /**
252
+ * Release a document: its caches, and whatever its backend holds. The handle, and
253
+ * any alias of it, is unusable from the moment this returns; the promise settles
254
+ * when the backend has let go, and rejects if it could not. Work already running
255
+ * finishes.
256
+ *
257
+ * Throws at once, not through the promise, for a document that is not open here.
258
+ */
259
+ close(doc: PagedDoc): Promise<void>;
260
+ /**
261
+ * Render a page, returning a handle you can reprioritise or drop.
262
+ *
263
+ * This is the viewer path: as the user scrolls, promote what came into view and
264
+ * demote what left, without re-submitting or duplicating work. Requests for the
265
+ * same page at the same size coalesce into one render, taking the most urgent
266
+ * priority asked for, and finished pages are served from a byte-bounded cache.
267
+ */
268
+ render(doc: PagedDoc, index: number, options?: RenderOptions): RenderHandle<PageBitmap>;
269
+ /**
270
+ * Render pages as an async iterable, yielding each as soon as it finishes.
271
+ *
272
+ * At most `concurrency` renders are in flight, so memory stays bounded. Breaking
273
+ * out of the loop stops scheduling further work and drops what is still queued.
274
+ */
275
+ stream(doc: PagedDoc, options?: StreamOptions): AsyncGenerator<StreamedPage<PageBitmap>>;
276
+ /** Rendered pages held for reuse, and how often that has paid off. */
277
+ cacheStats(doc: PagedDoc): CacheStats;
278
+ }
279
+ /**
280
+ * Opens PDFs. Adds text, search and the document's own structure — outline, links,
281
+ * labels, attachments, tags — to {@link PagedEngine}, each memoised or cached here
282
+ * so an implementation only has to read them.
283
+ *
284
+ * @typeParam B - The backend `load` produces.
285
+ */
286
+ export declare abstract class PdfEngine<B extends PdfBackend = PdfBackend> extends PagedEngine<PdfDoc, B> {
287
+ protected handle(backend: B): PdfDoc;
288
+ /**
289
+ * Extract the text of one page.
290
+ *
291
+ * Scheduled like a render, but behind one by default: a search should not stall the
292
+ * page the user is looking at. Results are cached, so searching the same document
293
+ * repeatedly extracts each page once. A page reads as empty on an engine without
294
+ * {@link Capabilities.text}.
295
+ */
296
+ pageText(doc: PdfDoc, index: number, options?: {
297
+ priority?: number;
298
+ signal?: AbortSignal;
299
+ }): Promise<PageText>;
300
+ /**
301
+ * Find `query` in the document, yielding matches as each page is searched.
302
+ *
303
+ * Streaming rather than collected, because the first hit is usually the one the
304
+ * user wants. Breaking out of the loop stops the search. `order` is the lever a
305
+ * viewer wants: searching outward from the current page finds the nearest hit first.
306
+ */
307
+ search(doc: PdfDoc, query: string, options?: SearchOptions): AsyncGenerator<SearchMatch>;
308
+ /** The outline as a tree, memoised. Empty when there is none. */
309
+ outline(doc: PdfDoc): Promise<OutlineNode[]>;
310
+ /** One label per page, memoised. Empty when the document defines none. */
311
+ pageLabels(doc: PdfDoc): Promise<readonly string[]>;
312
+ /** The structure tree, memoised. Empty for an untagged document. */
313
+ structTree(doc: PdfDoc): Promise<StructNode[]>;
314
+ /** The embedded files, metadata only, memoised. Empty when there are none. */
315
+ attachments(doc: PdfDoc): Promise<readonly Attachment[]>;
316
+ /** One embedded file's bytes, by {@link Attachment.index}. Not cached. */
317
+ attachmentData(doc: PdfDoc, index: number): Promise<Uint8Array>;
318
+ /**
319
+ * The links on one page. Not queued — an object-graph read is roughly a
320
+ * thousandth of a render, and waiting behind renders would add latency for
321
+ * nothing. Cached, and two calls for one page share one read.
322
+ */
323
+ links(doc: PdfDoc, index: number): Promise<readonly PageLink[]>;
324
+ /** Extracted page text held for reuse, and how often that has paid off. */
325
+ textCacheStats(doc: PdfDoc): CacheStats;
326
+ }
327
+ //# sourceMappingURL=engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,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