@docmentis/udoc-viewer 0.2.0 → 0.2.1
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/package.json
CHANGED
package/dist/src/UDocClient.d.ts
CHANGED
|
@@ -140,9 +140,9 @@ export interface Pick {
|
|
|
140
140
|
doc: DocumentSource;
|
|
141
141
|
/**
|
|
142
142
|
* Page range to pick. Can be:
|
|
143
|
-
* - A string like "
|
|
144
|
-
* - A single page
|
|
145
|
-
* - An array of page
|
|
143
|
+
* - A string like "0-2,4" (0-based page indices)
|
|
144
|
+
* - A single page index
|
|
145
|
+
* - An array of page indices
|
|
146
146
|
*/
|
|
147
147
|
pages: string | number | number[];
|
|
148
148
|
/**
|
package/dist/src/wasm/udoc.d.ts
CHANGED
|
@@ -15,17 +15,17 @@ export class UDoc {
|
|
|
15
15
|
*
|
|
16
16
|
* # Arguments
|
|
17
17
|
* * `compositions` - Array of compositions. Each composition is an array of picks.
|
|
18
|
-
* Each pick is `{ doc: docIndex, pages: "
|
|
19
|
-
* in the `doc_ids` array and `pages` is a page range string (
|
|
18
|
+
* Each pick is `{ doc: docIndex, pages: "0-2,4" }` where `docIndex` is the index
|
|
19
|
+
* in the `doc_ids` array and `pages` is a page range string (0-based).
|
|
20
20
|
* * `doc_ids` - Array of document IDs to use as sources (order matters for doc indices)
|
|
21
21
|
*
|
|
22
22
|
* # Example
|
|
23
23
|
* ```js
|
|
24
|
-
* // Create two documents: first has pages
|
|
24
|
+
* // Create two documents: first has pages 0-2 from doc A, second has page 0 from A and 1 from B
|
|
25
25
|
* const newDocIds = udoc.compose_pdf(
|
|
26
26
|
* [
|
|
27
|
-
* [{ doc: 0, pages: "
|
|
28
|
-
* [{ doc: 0, pages: "
|
|
27
|
+
* [{ doc: 0, pages: "0-2" }],
|
|
28
|
+
* [{ doc: 0, pages: "0" }, { doc: 1, pages: "1" }]
|
|
29
29
|
* ],
|
|
30
30
|
* ["doc_0", "doc_1"]
|
|
31
31
|
* );
|
package/dist/src/wasm/udoc.js
CHANGED
|
@@ -263,17 +263,17 @@ export class UDoc {
|
|
|
263
263
|
*
|
|
264
264
|
* # Arguments
|
|
265
265
|
* * `compositions` - Array of compositions. Each composition is an array of picks.
|
|
266
|
-
* Each pick is `{ doc: docIndex, pages: "
|
|
267
|
-
* in the `doc_ids` array and `pages` is a page range string (
|
|
266
|
+
* Each pick is `{ doc: docIndex, pages: "0-2,4" }` where `docIndex` is the index
|
|
267
|
+
* in the `doc_ids` array and `pages` is a page range string (0-based).
|
|
268
268
|
* * `doc_ids` - Array of document IDs to use as sources (order matters for doc indices)
|
|
269
269
|
*
|
|
270
270
|
* # Example
|
|
271
271
|
* ```js
|
|
272
|
-
* // Create two documents: first has pages
|
|
272
|
+
* // Create two documents: first has pages 0-2 from doc A, second has page 0 from A and 1 from B
|
|
273
273
|
* const newDocIds = udoc.compose_pdf(
|
|
274
274
|
* [
|
|
275
|
-
* [{ doc: 0, pages: "
|
|
276
|
-
* [{ doc: 0, pages: "
|
|
275
|
+
* [{ doc: 0, pages: "0-2" }],
|
|
276
|
+
* [{ doc: 0, pages: "0" }, { doc: 1, pages: "1" }]
|
|
277
277
|
* ],
|
|
278
278
|
* ["doc_0", "doc_1"]
|
|
279
279
|
* );
|
|
Binary file
|
|
@@ -23,7 +23,7 @@ export interface LicenseResult {
|
|
|
23
23
|
export interface ComposePick {
|
|
24
24
|
/** Document index (0-based, referring to documents in docIds array) */
|
|
25
25
|
doc: number;
|
|
26
|
-
/** Page range string (e.g., "
|
|
26
|
+
/** Page range string (e.g., "0-2,4") - 0-based page indices */
|
|
27
27
|
pages: string;
|
|
28
28
|
/** Optional rotation in degrees (0, 90, 180, or 270) */
|
|
29
29
|
rotation?: 0 | 90 | 180 | 270;
|