@embedpdf/engine-core 3.0.0-next.0 → 3.0.0-next.10
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.
- package/dist/{AbortError-CjSasIlL.js → AbortError-8-9JAX1Y.js} +2 -2
- package/dist/{AbortError-CjSasIlL.js.map → AbortError-8-9JAX1Y.js.map} +1 -1
- package/dist/{AbortError-ByBflvEl.cjs → AbortError-CRSooKsk.cjs} +2 -2
- package/dist/{AbortError-ByBflvEl.cjs.map → AbortError-CRSooKsk.cjs.map} +1 -1
- package/dist/{AnnotationListSnapshot-W0RCsyDE.d.cts → AnnotationListSnapshot-DDxHpJQU.d.cts} +538 -41
- package/dist/{AnnotationListSnapshot-W0RCsyDE.d.ts → AnnotationListSnapshot-DDxHpJQU.d.ts} +538 -41
- package/dist/{DocumentSecurityService-Df79fgpe.d.cts → DocumentSecurityService-BV4_YXkU.d.cts} +33 -2
- package/dist/{DocumentSecurityService-B-tULKNY.d.ts → DocumentSecurityService-o9aeTHwT.d.ts} +33 -2
- package/dist/{Engine-D9loFZc1.d.cts → Engine-D9je6GdU.d.cts} +50 -19
- package/dist/{Engine-B7Oe7f5i.d.ts → Engine-DOoVem7_.d.ts} +50 -19
- package/dist/{subtype-qejjVr6h.cjs → PageInsertBlankInput-CzShuSJI.cjs} +184 -1
- package/dist/PageInsertBlankInput-CzShuSJI.cjs.map +1 -0
- package/dist/{subtype-BvAzLCGC.js → PageInsertBlankInput-WKY0tr6S.js} +149 -2
- package/dist/PageInsertBlankInput-WKY0tr6S.js.map +1 -0
- package/dist/{builders-C548U47M.js → builders-B_KufGJ9.js} +547 -169
- package/dist/builders-B_KufGJ9.js.map +1 -0
- package/dist/{builders-BvikWRuO.cjs → builders-Cp_rlGob.cjs} +603 -225
- package/dist/builders-Cp_rlGob.cjs.map +1 -0
- package/dist/conformance.cjs +822 -198
- package/dist/conformance.cjs.map +1 -1
- package/dist/conformance.d.cts +124 -6
- package/dist/conformance.d.ts +124 -6
- package/dist/conformance.js +777 -157
- package/dist/conformance.js.map +1 -1
- package/dist/{fold-CB4fAOOy.js → fold-BfyxxwS6.js} +162 -3
- package/dist/fold-BfyxxwS6.js.map +1 -0
- package/dist/{fold-IaMph3CO.cjs → fold-C7I5GpBz.cjs} +235 -4
- package/dist/fold-C7I5GpBz.cjs.map +1 -0
- package/dist/index.cjs +36 -18
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -4
- package/dist/runtime.cjs +41 -23
- package/dist/runtime.cjs.map +1 -1
- package/dist/runtime.d.cts +103 -5
- package/dist/runtime.d.ts +103 -5
- package/dist/runtime.js +5 -5
- package/dist/{schemas-B_1VyFsm.cjs → schemas-D1pxEv3t.cjs} +138 -32
- package/dist/schemas-D1pxEv3t.cjs.map +1 -0
- package/dist/{schemas-9OpSSeM6.js → schemas-DAnu8tuW.js} +95 -13
- package/dist/schemas-DAnu8tuW.js.map +1 -0
- package/dist/wire.cjs +118 -3
- package/dist/wire.cjs.map +1 -1
- package/dist/wire.d.cts +139 -27
- package/dist/wire.d.ts +139 -27
- package/dist/wire.js +111 -4
- package/dist/wire.js.map +1 -1
- package/package.json +1 -1
- package/dist/builders-BvikWRuO.cjs.map +0 -1
- package/dist/builders-C548U47M.js.map +0 -1
- package/dist/fold-CB4fAOOy.js.map +0 -1
- package/dist/fold-IaMph3CO.cjs.map +0 -1
- package/dist/schemas-9OpSSeM6.js.map +0 -1
- package/dist/schemas-B_1VyFsm.cjs.map +0 -1
- package/dist/subtype-BvAzLCGC.js.map +0 -1
- package/dist/subtype-qejjVr6h.cjs.map +0 -1
package/dist/conformance.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { An as HighlightDraft,
|
|
2
|
-
import { t as Engine } from "./Engine-
|
|
1
|
+
import { An as HighlightDraft, Ss as CharMapAnchor, al as LinePoints, cl as PdfRect, n as AnnotationListSnapshotAllPages, ol as PdfPoint, rl as InkList, t as AnnotationListPageSnapshot, xl as DocumentMetadata } from "./AnnotationListSnapshot-DDxHpJQU.cjs";
|
|
2
|
+
import { t as Engine } from "./Engine-D9je6GdU.cjs";
|
|
3
3
|
//#region src/conformance/runMetadataConformance.d.ts
|
|
4
4
|
interface ConformanceTestRunner {
|
|
5
5
|
describe(name: string, fn: () => void): void;
|
|
@@ -408,9 +408,9 @@ declare function runAttachmentConformance(runner: ConformanceTestRunner, opts: C
|
|
|
408
408
|
//#endregion
|
|
409
409
|
//#region src/conformance/runPageInsertConformance.d.ts
|
|
410
410
|
/**
|
|
411
|
-
* Page insert conformance. `pages.insert
|
|
412
|
-
*
|
|
413
|
-
*
|
|
411
|
+
* Page insert conformance. `pages.insert` is a REQUIRED member — this suite
|
|
412
|
+
* runs unconditionally on every engine, so an implementation that loses the
|
|
413
|
+
* verb fails loudly instead of being skipped past.
|
|
414
414
|
*
|
|
415
415
|
* Invariants:
|
|
416
416
|
* 1. Every page of the source bytes is COPIED in at `destIndex` (omitted →
|
|
@@ -424,6 +424,26 @@ declare function runAttachmentConformance(runner: ConformanceTestRunner, opts: C
|
|
|
424
424
|
*/
|
|
425
425
|
declare function runPageInsertConformance(runner: ConformanceTestRunner, opts: ConformanceOptions): void;
|
|
426
426
|
//#endregion
|
|
427
|
+
//#region src/conformance/runPageInsertBlankConformance.d.ts
|
|
428
|
+
/**
|
|
429
|
+
* Blank-page insert conformance. `pages.insertBlank` is a REQUIRED member —
|
|
430
|
+
* the suite runs unconditionally on every engine (no fixture bytes are
|
|
431
|
+
* needed at all, which is the point of the verb), so an implementation that
|
|
432
|
+
* loses the verb fails loudly instead of being skipped past.
|
|
433
|
+
*
|
|
434
|
+
* Invariants:
|
|
435
|
+
* 1. `count` blank pages of exactly `size` appear at `destIndex` (omitted
|
|
436
|
+
* → append), rotation 0; the result lists their fresh PONs in insertion
|
|
437
|
+
* order and they agree with the returned layout.
|
|
438
|
+
* 2. Pre-existing pages keep their identity: same PONs before and after,
|
|
439
|
+
* in the expected positions (an insert never invalidates neighbours).
|
|
440
|
+
* 3. The mutation persists through save → re-open (bytes engines only).
|
|
441
|
+
* 4. Non-positive size / count outside [1, PAGE_INSERT_BLANK_MAX_COUNT] /
|
|
442
|
+
* out-of-range destIndex reject with InvalidArg, leaving the document
|
|
443
|
+
* untouched.
|
|
444
|
+
*/
|
|
445
|
+
declare function runPageInsertBlankConformance(runner: ConformanceTestRunner, opts: ConformanceOptions): void;
|
|
446
|
+
//#endregion
|
|
427
447
|
//#region src/conformance/runPieceInfoConformance.d.ts
|
|
428
448
|
/**
|
|
429
449
|
* `/PieceInfo` conformance (doc + page level). The service is OPTIONAL on
|
|
@@ -489,6 +509,102 @@ interface PageTextConformanceOptions extends Omit<ConformanceOptions, 'fixture'>
|
|
|
489
509
|
}
|
|
490
510
|
declare function runPageTextConformance(runner: ConformanceTestRunner, opts: PageTextConformanceOptions): void;
|
|
491
511
|
//#endregion
|
|
512
|
+
//#region src/conformance/runTextDivergenceConformance.d.ts
|
|
513
|
+
/**
|
|
514
|
+
* Index-space divergence conformance: the cases where a page's CHARACTER
|
|
515
|
+
* space (what geometry tiles and selection/search ranges address) and its
|
|
516
|
+
* extracted TEXT differ — and the `charMap` contract that bridges them.
|
|
517
|
+
*
|
|
518
|
+
* Fixtures pin EXACT values (text, charCount, anchors) verified against the
|
|
519
|
+
* wasm runtime, so both engines must produce byte-identical snapshots:
|
|
520
|
+
*
|
|
521
|
+
* - a non-printing character occupying a character slot with no text unit
|
|
522
|
+
* (`bug_1139.pdf` — every text offset shifts by one);
|
|
523
|
+
* - `/ActualText` replacement (`bug_384770169.pdf` — synthetic `kPiece`
|
|
524
|
+
* characters in lockstep with the text, identity map, real segments);
|
|
525
|
+
* - supplementary-plane text via a ToUnicode surrogate pair
|
|
526
|
+
* (`embedpdf_astral_tounicode.pdf` — two lockstep surrogate entries,
|
|
527
|
+
* identity map, astral content SURVIVES extraction).
|
|
528
|
+
*
|
|
529
|
+
* The search probe closes the loop: a hit's `charStart`/`charCount` must be
|
|
530
|
+
* CHARACTER-space (segments join geometry), and slicing the snapshot by the
|
|
531
|
+
* hit's range must reproduce the matched text exactly — the law that makes
|
|
532
|
+
* select-this-match and copy compose.
|
|
533
|
+
*/
|
|
534
|
+
interface TextDivergenceConformanceFixture extends ConformanceFixture {
|
|
535
|
+
/** PDF indirect object number of the probed page. */
|
|
536
|
+
pageObjectNumber: number;
|
|
537
|
+
/** The EXACT extracted text (UTF-16 faithful). */
|
|
538
|
+
exactText: string;
|
|
539
|
+
/** The character-space size (may differ from `exactText.length`). */
|
|
540
|
+
expectedCharCount: number;
|
|
541
|
+
/** Expected anchors; null asserts identity (no `charMap` on the wire). */
|
|
542
|
+
expectedCharMap: ReadonlyArray<CharMapAnchor> | null;
|
|
543
|
+
/** Char-space slice expectations (half-open). */
|
|
544
|
+
slices?: ReadonlyArray<{
|
|
545
|
+
from: number;
|
|
546
|
+
to: number;
|
|
547
|
+
text: string;
|
|
548
|
+
}>;
|
|
549
|
+
/** Literal search probe with expected CHARACTER-space hit range. */
|
|
550
|
+
search?: {
|
|
551
|
+
query: string;
|
|
552
|
+
charStart: number;
|
|
553
|
+
charCount: number;
|
|
554
|
+
matchedText: string;
|
|
555
|
+
};
|
|
556
|
+
}
|
|
557
|
+
interface TextDivergenceConformanceOptions extends Omit<ConformanceOptions, 'fixture'> {
|
|
558
|
+
fixture: TextDivergenceConformanceFixture;
|
|
559
|
+
}
|
|
560
|
+
declare function runTextDivergenceConformance(runner: ConformanceTestRunner, opts: TextDivergenceConformanceOptions): void;
|
|
561
|
+
/** One divergence case, minus the per-suite bytes/id wiring. */
|
|
562
|
+
type TextDivergenceCase = Omit<TextDivergenceConformanceFixture, 'id' | 'bytes' | 'expected'> & {
|
|
563
|
+
/** Fixture file name under the fork's `testing/resources/`. */
|
|
564
|
+
resource: string;
|
|
565
|
+
};
|
|
566
|
+
/**
|
|
567
|
+
* THE pinned divergence cases — one table, consumed by both engines' suites
|
|
568
|
+
* so expected values cannot drift. Values verified against the wasm runtime
|
|
569
|
+
* (see each case). All fixtures are single-page; the page's indirect object
|
|
570
|
+
* number is 3 in each.
|
|
571
|
+
*/
|
|
572
|
+
declare const TEXT_DIVERGENCE_CASES: Readonly<Record<string, TextDivergenceCase>>;
|
|
573
|
+
//#endregion
|
|
574
|
+
//#region src/conformance/runPageGeometryOrientationConformance.d.ts
|
|
575
|
+
/**
|
|
576
|
+
* Per-fixture expectations for the oriented-text geometry harness. One
|
|
577
|
+
* fixture per call, mirroring the other conformance suites; the fixture
|
|
578
|
+
* declares what its dominant text orientation must read back as.
|
|
579
|
+
*/
|
|
580
|
+
interface PageGeometryOrientationFixture extends ConformanceFixture {
|
|
581
|
+
/** PDF indirect object number of the page under test. */
|
|
582
|
+
pageObjectNumber: number;
|
|
583
|
+
expectation: {
|
|
584
|
+
/** Every run is the upright variant; no glyph carries oriented cells. */
|
|
585
|
+
kind: 'upright';
|
|
586
|
+
} | {
|
|
587
|
+
/** The page loads and every glyph is degenerate (zeroed + empty flag). */
|
|
588
|
+
kind: 'empty-only';
|
|
589
|
+
} | {
|
|
590
|
+
kind: 'rotated';
|
|
591
|
+
/** Baseline angles (radians, CCW, PDF y-up) rotated runs may carry. */
|
|
592
|
+
rotations: number[];
|
|
593
|
+
ascentFlip: boolean;
|
|
594
|
+
/**
|
|
595
|
+
* Assert sheared cells: with `rotations` ≈ [0], a non-zero start-edge
|
|
596
|
+
* x-offset proves the parallelogram (an AABB could not express it).
|
|
597
|
+
*/
|
|
598
|
+
sheared?: boolean;
|
|
599
|
+
/** Minimum number of rotated runs the page must produce (default 1). */
|
|
600
|
+
minRotatedRuns?: number;
|
|
601
|
+
};
|
|
602
|
+
}
|
|
603
|
+
interface PageGeometryOrientationOptions extends Omit<ConformanceOptions, 'fixture'> {
|
|
604
|
+
fixture: PageGeometryOrientationFixture;
|
|
605
|
+
}
|
|
606
|
+
declare function runPageGeometryOrientationConformance(runner: ConformanceTestRunner, opts: PageGeometryOrientationOptions): void;
|
|
607
|
+
//#endregion
|
|
492
608
|
//#region src/conformance/runSearchConformance.d.ts
|
|
493
609
|
/**
|
|
494
610
|
* Per-fixture expectations for the search harness. Suites supply a
|
|
@@ -522,9 +638,11 @@ declare function runSearchConformance(runner: ConformanceTestRunner, opts: Searc
|
|
|
522
638
|
* are disjoint. We do compare `pageObjectNumber` and `generation` (which
|
|
523
639
|
* should be 0 for fresh reads on both sides). Page order is no longer part
|
|
524
640
|
* of `PageState`; it lives in `PageLayout.index` (see `pages.list()`).
|
|
641
|
+
* `auditHead` is likewise not compared: it is a cloud-only reconciliation
|
|
642
|
+
* cursor, absent on local snapshots by design.
|
|
525
643
|
*/
|
|
526
644
|
declare function diffAnnotationListSnapshot(a: AnnotationListPageSnapshot, b: AnnotationListPageSnapshot): string[];
|
|
527
645
|
declare function diffAnnotationListSnapshotAll(a: AnnotationListSnapshotAllPages, b: AnnotationListSnapshotAllPages): string[];
|
|
528
646
|
//#endregion
|
|
529
|
-
export { type ActionsConformanceFixtures, type ActionsConformanceOptions, type AnnotationAppearanceConformanceFixture, type AnnotationAppearanceConformanceOptions, type AnnotationConformanceOptions, type AnnotationMutationConformanceFixture, type AnnotationMutationConformanceOptions, type AnnotationReadConformanceFixture, type ConformanceExpect, type ConformanceFixture, type ConformanceOptions, type ConformanceTestRunner, type FormConformanceFixtures, type FormConformanceOptions, type PageReorderConformanceFixture, type PageReorderConformanceOptions, type PageTextConformanceFixture, type PageTextConformanceOptions, type SearchConformanceFixture, type SearchConformanceOptions, diffAnnotationListSnapshot, diffAnnotationListSnapshotAll, runActionsConformance, runAnnotationAppearanceConformance, runAnnotationMutationConformance, runAnnotationReadConformance, runAttachmentConformance, runDocumentEventsConformance, runFormConformance, runMetadataConformance, runPageDeleteConformance, runPageExtractConformance, runPageFlattenConformance, runPageInsertConformance, runPageReorderConformance, runPageRotateConformance, runPageTextConformance, runPieceInfoConformance, runRedactionApplyConformance, runSearchConformance };
|
|
647
|
+
export { type ActionsConformanceFixtures, type ActionsConformanceOptions, type AnnotationAppearanceConformanceFixture, type AnnotationAppearanceConformanceOptions, type AnnotationConformanceOptions, type AnnotationMutationConformanceFixture, type AnnotationMutationConformanceOptions, type AnnotationReadConformanceFixture, type ConformanceExpect, type ConformanceFixture, type ConformanceOptions, type ConformanceTestRunner, type FormConformanceFixtures, type FormConformanceOptions, type PageGeometryOrientationFixture, type PageGeometryOrientationOptions, type PageReorderConformanceFixture, type PageReorderConformanceOptions, type PageTextConformanceFixture, type PageTextConformanceOptions, type SearchConformanceFixture, type SearchConformanceOptions, TEXT_DIVERGENCE_CASES, type TextDivergenceCase, type TextDivergenceConformanceFixture, type TextDivergenceConformanceOptions, diffAnnotationListSnapshot, diffAnnotationListSnapshotAll, runActionsConformance, runAnnotationAppearanceConformance, runAnnotationMutationConformance, runAnnotationReadConformance, runAttachmentConformance, runDocumentEventsConformance, runFormConformance, runMetadataConformance, runPageDeleteConformance, runPageExtractConformance, runPageFlattenConformance, runPageGeometryOrientationConformance, runPageInsertBlankConformance, runPageInsertConformance, runPageReorderConformance, runPageRotateConformance, runPageTextConformance, runPieceInfoConformance, runRedactionApplyConformance, runSearchConformance, runTextDivergenceConformance };
|
|
530
648
|
//# sourceMappingURL=conformance.d.cts.map
|
package/dist/conformance.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { An as HighlightDraft,
|
|
2
|
-
import { t as Engine } from "./Engine-
|
|
1
|
+
import { An as HighlightDraft, Ss as CharMapAnchor, al as LinePoints, cl as PdfRect, n as AnnotationListSnapshotAllPages, ol as PdfPoint, rl as InkList, t as AnnotationListPageSnapshot, xl as DocumentMetadata } from "./AnnotationListSnapshot-DDxHpJQU.js";
|
|
2
|
+
import { t as Engine } from "./Engine-DOoVem7_.js";
|
|
3
3
|
//#region src/conformance/runMetadataConformance.d.ts
|
|
4
4
|
interface ConformanceTestRunner {
|
|
5
5
|
describe(name: string, fn: () => void): void;
|
|
@@ -408,9 +408,9 @@ declare function runAttachmentConformance(runner: ConformanceTestRunner, opts: C
|
|
|
408
408
|
//#endregion
|
|
409
409
|
//#region src/conformance/runPageInsertConformance.d.ts
|
|
410
410
|
/**
|
|
411
|
-
* Page insert conformance. `pages.insert
|
|
412
|
-
*
|
|
413
|
-
*
|
|
411
|
+
* Page insert conformance. `pages.insert` is a REQUIRED member — this suite
|
|
412
|
+
* runs unconditionally on every engine, so an implementation that loses the
|
|
413
|
+
* verb fails loudly instead of being skipped past.
|
|
414
414
|
*
|
|
415
415
|
* Invariants:
|
|
416
416
|
* 1. Every page of the source bytes is COPIED in at `destIndex` (omitted →
|
|
@@ -424,6 +424,26 @@ declare function runAttachmentConformance(runner: ConformanceTestRunner, opts: C
|
|
|
424
424
|
*/
|
|
425
425
|
declare function runPageInsertConformance(runner: ConformanceTestRunner, opts: ConformanceOptions): void;
|
|
426
426
|
//#endregion
|
|
427
|
+
//#region src/conformance/runPageInsertBlankConformance.d.ts
|
|
428
|
+
/**
|
|
429
|
+
* Blank-page insert conformance. `pages.insertBlank` is a REQUIRED member —
|
|
430
|
+
* the suite runs unconditionally on every engine (no fixture bytes are
|
|
431
|
+
* needed at all, which is the point of the verb), so an implementation that
|
|
432
|
+
* loses the verb fails loudly instead of being skipped past.
|
|
433
|
+
*
|
|
434
|
+
* Invariants:
|
|
435
|
+
* 1. `count` blank pages of exactly `size` appear at `destIndex` (omitted
|
|
436
|
+
* → append), rotation 0; the result lists their fresh PONs in insertion
|
|
437
|
+
* order and they agree with the returned layout.
|
|
438
|
+
* 2. Pre-existing pages keep their identity: same PONs before and after,
|
|
439
|
+
* in the expected positions (an insert never invalidates neighbours).
|
|
440
|
+
* 3. The mutation persists through save → re-open (bytes engines only).
|
|
441
|
+
* 4. Non-positive size / count outside [1, PAGE_INSERT_BLANK_MAX_COUNT] /
|
|
442
|
+
* out-of-range destIndex reject with InvalidArg, leaving the document
|
|
443
|
+
* untouched.
|
|
444
|
+
*/
|
|
445
|
+
declare function runPageInsertBlankConformance(runner: ConformanceTestRunner, opts: ConformanceOptions): void;
|
|
446
|
+
//#endregion
|
|
427
447
|
//#region src/conformance/runPieceInfoConformance.d.ts
|
|
428
448
|
/**
|
|
429
449
|
* `/PieceInfo` conformance (doc + page level). The service is OPTIONAL on
|
|
@@ -489,6 +509,102 @@ interface PageTextConformanceOptions extends Omit<ConformanceOptions, 'fixture'>
|
|
|
489
509
|
}
|
|
490
510
|
declare function runPageTextConformance(runner: ConformanceTestRunner, opts: PageTextConformanceOptions): void;
|
|
491
511
|
//#endregion
|
|
512
|
+
//#region src/conformance/runTextDivergenceConformance.d.ts
|
|
513
|
+
/**
|
|
514
|
+
* Index-space divergence conformance: the cases where a page's CHARACTER
|
|
515
|
+
* space (what geometry tiles and selection/search ranges address) and its
|
|
516
|
+
* extracted TEXT differ — and the `charMap` contract that bridges them.
|
|
517
|
+
*
|
|
518
|
+
* Fixtures pin EXACT values (text, charCount, anchors) verified against the
|
|
519
|
+
* wasm runtime, so both engines must produce byte-identical snapshots:
|
|
520
|
+
*
|
|
521
|
+
* - a non-printing character occupying a character slot with no text unit
|
|
522
|
+
* (`bug_1139.pdf` — every text offset shifts by one);
|
|
523
|
+
* - `/ActualText` replacement (`bug_384770169.pdf` — synthetic `kPiece`
|
|
524
|
+
* characters in lockstep with the text, identity map, real segments);
|
|
525
|
+
* - supplementary-plane text via a ToUnicode surrogate pair
|
|
526
|
+
* (`embedpdf_astral_tounicode.pdf` — two lockstep surrogate entries,
|
|
527
|
+
* identity map, astral content SURVIVES extraction).
|
|
528
|
+
*
|
|
529
|
+
* The search probe closes the loop: a hit's `charStart`/`charCount` must be
|
|
530
|
+
* CHARACTER-space (segments join geometry), and slicing the snapshot by the
|
|
531
|
+
* hit's range must reproduce the matched text exactly — the law that makes
|
|
532
|
+
* select-this-match and copy compose.
|
|
533
|
+
*/
|
|
534
|
+
interface TextDivergenceConformanceFixture extends ConformanceFixture {
|
|
535
|
+
/** PDF indirect object number of the probed page. */
|
|
536
|
+
pageObjectNumber: number;
|
|
537
|
+
/** The EXACT extracted text (UTF-16 faithful). */
|
|
538
|
+
exactText: string;
|
|
539
|
+
/** The character-space size (may differ from `exactText.length`). */
|
|
540
|
+
expectedCharCount: number;
|
|
541
|
+
/** Expected anchors; null asserts identity (no `charMap` on the wire). */
|
|
542
|
+
expectedCharMap: ReadonlyArray<CharMapAnchor> | null;
|
|
543
|
+
/** Char-space slice expectations (half-open). */
|
|
544
|
+
slices?: ReadonlyArray<{
|
|
545
|
+
from: number;
|
|
546
|
+
to: number;
|
|
547
|
+
text: string;
|
|
548
|
+
}>;
|
|
549
|
+
/** Literal search probe with expected CHARACTER-space hit range. */
|
|
550
|
+
search?: {
|
|
551
|
+
query: string;
|
|
552
|
+
charStart: number;
|
|
553
|
+
charCount: number;
|
|
554
|
+
matchedText: string;
|
|
555
|
+
};
|
|
556
|
+
}
|
|
557
|
+
interface TextDivergenceConformanceOptions extends Omit<ConformanceOptions, 'fixture'> {
|
|
558
|
+
fixture: TextDivergenceConformanceFixture;
|
|
559
|
+
}
|
|
560
|
+
declare function runTextDivergenceConformance(runner: ConformanceTestRunner, opts: TextDivergenceConformanceOptions): void;
|
|
561
|
+
/** One divergence case, minus the per-suite bytes/id wiring. */
|
|
562
|
+
type TextDivergenceCase = Omit<TextDivergenceConformanceFixture, 'id' | 'bytes' | 'expected'> & {
|
|
563
|
+
/** Fixture file name under the fork's `testing/resources/`. */
|
|
564
|
+
resource: string;
|
|
565
|
+
};
|
|
566
|
+
/**
|
|
567
|
+
* THE pinned divergence cases — one table, consumed by both engines' suites
|
|
568
|
+
* so expected values cannot drift. Values verified against the wasm runtime
|
|
569
|
+
* (see each case). All fixtures are single-page; the page's indirect object
|
|
570
|
+
* number is 3 in each.
|
|
571
|
+
*/
|
|
572
|
+
declare const TEXT_DIVERGENCE_CASES: Readonly<Record<string, TextDivergenceCase>>;
|
|
573
|
+
//#endregion
|
|
574
|
+
//#region src/conformance/runPageGeometryOrientationConformance.d.ts
|
|
575
|
+
/**
|
|
576
|
+
* Per-fixture expectations for the oriented-text geometry harness. One
|
|
577
|
+
* fixture per call, mirroring the other conformance suites; the fixture
|
|
578
|
+
* declares what its dominant text orientation must read back as.
|
|
579
|
+
*/
|
|
580
|
+
interface PageGeometryOrientationFixture extends ConformanceFixture {
|
|
581
|
+
/** PDF indirect object number of the page under test. */
|
|
582
|
+
pageObjectNumber: number;
|
|
583
|
+
expectation: {
|
|
584
|
+
/** Every run is the upright variant; no glyph carries oriented cells. */
|
|
585
|
+
kind: 'upright';
|
|
586
|
+
} | {
|
|
587
|
+
/** The page loads and every glyph is degenerate (zeroed + empty flag). */
|
|
588
|
+
kind: 'empty-only';
|
|
589
|
+
} | {
|
|
590
|
+
kind: 'rotated';
|
|
591
|
+
/** Baseline angles (radians, CCW, PDF y-up) rotated runs may carry. */
|
|
592
|
+
rotations: number[];
|
|
593
|
+
ascentFlip: boolean;
|
|
594
|
+
/**
|
|
595
|
+
* Assert sheared cells: with `rotations` ≈ [0], a non-zero start-edge
|
|
596
|
+
* x-offset proves the parallelogram (an AABB could not express it).
|
|
597
|
+
*/
|
|
598
|
+
sheared?: boolean;
|
|
599
|
+
/** Minimum number of rotated runs the page must produce (default 1). */
|
|
600
|
+
minRotatedRuns?: number;
|
|
601
|
+
};
|
|
602
|
+
}
|
|
603
|
+
interface PageGeometryOrientationOptions extends Omit<ConformanceOptions, 'fixture'> {
|
|
604
|
+
fixture: PageGeometryOrientationFixture;
|
|
605
|
+
}
|
|
606
|
+
declare function runPageGeometryOrientationConformance(runner: ConformanceTestRunner, opts: PageGeometryOrientationOptions): void;
|
|
607
|
+
//#endregion
|
|
492
608
|
//#region src/conformance/runSearchConformance.d.ts
|
|
493
609
|
/**
|
|
494
610
|
* Per-fixture expectations for the search harness. Suites supply a
|
|
@@ -522,9 +638,11 @@ declare function runSearchConformance(runner: ConformanceTestRunner, opts: Searc
|
|
|
522
638
|
* are disjoint. We do compare `pageObjectNumber` and `generation` (which
|
|
523
639
|
* should be 0 for fresh reads on both sides). Page order is no longer part
|
|
524
640
|
* of `PageState`; it lives in `PageLayout.index` (see `pages.list()`).
|
|
641
|
+
* `auditHead` is likewise not compared: it is a cloud-only reconciliation
|
|
642
|
+
* cursor, absent on local snapshots by design.
|
|
525
643
|
*/
|
|
526
644
|
declare function diffAnnotationListSnapshot(a: AnnotationListPageSnapshot, b: AnnotationListPageSnapshot): string[];
|
|
527
645
|
declare function diffAnnotationListSnapshotAll(a: AnnotationListSnapshotAllPages, b: AnnotationListSnapshotAllPages): string[];
|
|
528
646
|
//#endregion
|
|
529
|
-
export { type ActionsConformanceFixtures, type ActionsConformanceOptions, type AnnotationAppearanceConformanceFixture, type AnnotationAppearanceConformanceOptions, type AnnotationConformanceOptions, type AnnotationMutationConformanceFixture, type AnnotationMutationConformanceOptions, type AnnotationReadConformanceFixture, type ConformanceExpect, type ConformanceFixture, type ConformanceOptions, type ConformanceTestRunner, type FormConformanceFixtures, type FormConformanceOptions, type PageReorderConformanceFixture, type PageReorderConformanceOptions, type PageTextConformanceFixture, type PageTextConformanceOptions, type SearchConformanceFixture, type SearchConformanceOptions, diffAnnotationListSnapshot, diffAnnotationListSnapshotAll, runActionsConformance, runAnnotationAppearanceConformance, runAnnotationMutationConformance, runAnnotationReadConformance, runAttachmentConformance, runDocumentEventsConformance, runFormConformance, runMetadataConformance, runPageDeleteConformance, runPageExtractConformance, runPageFlattenConformance, runPageInsertConformance, runPageReorderConformance, runPageRotateConformance, runPageTextConformance, runPieceInfoConformance, runRedactionApplyConformance, runSearchConformance };
|
|
647
|
+
export { type ActionsConformanceFixtures, type ActionsConformanceOptions, type AnnotationAppearanceConformanceFixture, type AnnotationAppearanceConformanceOptions, type AnnotationConformanceOptions, type AnnotationMutationConformanceFixture, type AnnotationMutationConformanceOptions, type AnnotationReadConformanceFixture, type ConformanceExpect, type ConformanceFixture, type ConformanceOptions, type ConformanceTestRunner, type FormConformanceFixtures, type FormConformanceOptions, type PageGeometryOrientationFixture, type PageGeometryOrientationOptions, type PageReorderConformanceFixture, type PageReorderConformanceOptions, type PageTextConformanceFixture, type PageTextConformanceOptions, type SearchConformanceFixture, type SearchConformanceOptions, TEXT_DIVERGENCE_CASES, type TextDivergenceCase, type TextDivergenceConformanceFixture, type TextDivergenceConformanceOptions, diffAnnotationListSnapshot, diffAnnotationListSnapshotAll, runActionsConformance, runAnnotationAppearanceConformance, runAnnotationMutationConformance, runAnnotationReadConformance, runAttachmentConformance, runDocumentEventsConformance, runFormConformance, runMetadataConformance, runPageDeleteConformance, runPageExtractConformance, runPageFlattenConformance, runPageGeometryOrientationConformance, runPageInsertBlankConformance, runPageInsertConformance, runPageReorderConformance, runPageRotateConformance, runPageTextConformance, runPieceInfoConformance, runRedactionApplyConformance, runSearchConformance, runTextDivergenceConformance };
|
|
530
648
|
//# sourceMappingURL=conformance.d.ts.map
|