@embedpdf/engine-services 3.0.0-next.10 → 3.0.0-next.11
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/index.cjs +432 -230
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -2
- package/dist/index.d.ts +18 -2
- package/dist/index.js +433 -231
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1396,22 +1396,38 @@ declare class SearchReader {
|
|
|
1396
1396
|
}
|
|
1397
1397
|
//#endregion
|
|
1398
1398
|
//#region src/features/actions/ActionModelReader.d.ts
|
|
1399
|
-
/** Mutable aggregate budget shared by every action model in one read job.
|
|
1399
|
+
/** Mutable aggregate budget shared by every action model in one read job.
|
|
1400
|
+
* Payload budgets are RESERVED before the backing buffer is allocated. */
|
|
1400
1401
|
declare class ActionReadBudgetTracker {
|
|
1401
1402
|
private readonly limits;
|
|
1402
1403
|
private models;
|
|
1403
1404
|
private nodes;
|
|
1404
1405
|
private scriptCodeUnits;
|
|
1406
|
+
private targetEntries;
|
|
1407
|
+
private payloadCodeUnits;
|
|
1405
1408
|
constructor(limits?: ActionReadBudget);
|
|
1406
1409
|
addModel(nodeCount: number): void;
|
|
1407
1410
|
addScript(script: string): void;
|
|
1411
|
+
/** Charge target entries BEFORE the target array is walked. */
|
|
1412
|
+
reserveTargets(count: number): void;
|
|
1413
|
+
/** Charge payload text BEFORE the scratch buffer for it is allocated. */
|
|
1414
|
+
reservePayloadBytes(length: number): void;
|
|
1408
1415
|
private assertWithinBudget;
|
|
1409
1416
|
}
|
|
1410
1417
|
/**
|
|
1411
1418
|
* Convert and close one detached native action model. This is the only
|
|
1412
1419
|
* native-model walker used by document, page, field, and annotation reads.
|
|
1420
|
+
*
|
|
1421
|
+
* `docPtr` resolves `goto` destinations (page identity + named-destination
|
|
1422
|
+
* lookup); every caller reads within an open document session.
|
|
1423
|
+
*
|
|
1424
|
+
* Payload rule: a node whose payload cannot be materialised (a goto without
|
|
1425
|
+
* a resolvable destination, a javascript node with no `/JS`, a withheld
|
|
1426
|
+
* target list) degrades to `{ type: 'unknown' }` with its original `/S` on
|
|
1427
|
+
* `subtype`, and the tree gains the `'payload-dropped'` warning — impossible
|
|
1428
|
+
* states stay unrepresentable while malformed documents stay readable.
|
|
1413
1429
|
*/
|
|
1414
|
-
declare function readActionModel(fn: PdfFunctions, mem: PdfRuntimeMemory, modelPtr: Ptr, budget: ActionReadBudgetTracker): PdfActionTree | null;
|
|
1430
|
+
declare function readActionModel(fn: PdfFunctions, mem: PdfRuntimeMemory, docPtr: Ptr, modelPtr: Ptr, budget: ActionReadBudgetTracker): PdfActionTree | null;
|
|
1415
1431
|
//#endregion
|
|
1416
1432
|
//#region src/features/actions/DocumentActionsReader.d.ts
|
|
1417
1433
|
/** Read catalog-owned actions. Extraction only; no action is executed. */
|
package/dist/index.d.ts
CHANGED
|
@@ -1396,22 +1396,38 @@ declare class SearchReader {
|
|
|
1396
1396
|
}
|
|
1397
1397
|
//#endregion
|
|
1398
1398
|
//#region src/features/actions/ActionModelReader.d.ts
|
|
1399
|
-
/** Mutable aggregate budget shared by every action model in one read job.
|
|
1399
|
+
/** Mutable aggregate budget shared by every action model in one read job.
|
|
1400
|
+
* Payload budgets are RESERVED before the backing buffer is allocated. */
|
|
1400
1401
|
declare class ActionReadBudgetTracker {
|
|
1401
1402
|
private readonly limits;
|
|
1402
1403
|
private models;
|
|
1403
1404
|
private nodes;
|
|
1404
1405
|
private scriptCodeUnits;
|
|
1406
|
+
private targetEntries;
|
|
1407
|
+
private payloadCodeUnits;
|
|
1405
1408
|
constructor(limits?: ActionReadBudget);
|
|
1406
1409
|
addModel(nodeCount: number): void;
|
|
1407
1410
|
addScript(script: string): void;
|
|
1411
|
+
/** Charge target entries BEFORE the target array is walked. */
|
|
1412
|
+
reserveTargets(count: number): void;
|
|
1413
|
+
/** Charge payload text BEFORE the scratch buffer for it is allocated. */
|
|
1414
|
+
reservePayloadBytes(length: number): void;
|
|
1408
1415
|
private assertWithinBudget;
|
|
1409
1416
|
}
|
|
1410
1417
|
/**
|
|
1411
1418
|
* Convert and close one detached native action model. This is the only
|
|
1412
1419
|
* native-model walker used by document, page, field, and annotation reads.
|
|
1420
|
+
*
|
|
1421
|
+
* `docPtr` resolves `goto` destinations (page identity + named-destination
|
|
1422
|
+
* lookup); every caller reads within an open document session.
|
|
1423
|
+
*
|
|
1424
|
+
* Payload rule: a node whose payload cannot be materialised (a goto without
|
|
1425
|
+
* a resolvable destination, a javascript node with no `/JS`, a withheld
|
|
1426
|
+
* target list) degrades to `{ type: 'unknown' }` with its original `/S` on
|
|
1427
|
+
* `subtype`, and the tree gains the `'payload-dropped'` warning — impossible
|
|
1428
|
+
* states stay unrepresentable while malformed documents stay readable.
|
|
1413
1429
|
*/
|
|
1414
|
-
declare function readActionModel(fn: PdfFunctions, mem: PdfRuntimeMemory, modelPtr: Ptr, budget: ActionReadBudgetTracker): PdfActionTree | null;
|
|
1430
|
+
declare function readActionModel(fn: PdfFunctions, mem: PdfRuntimeMemory, docPtr: Ptr, modelPtr: Ptr, budget: ActionReadBudgetTracker): PdfActionTree | null;
|
|
1415
1431
|
//#endregion
|
|
1416
1432
|
//#region src/features/actions/DocumentActionsReader.d.ts
|
|
1417
1433
|
/** Read catalog-owned actions. Extraction only; no action is executed. */
|