pdf_editor_aleon35_react_plugin
Advanced tools
Comparing version 1.0.66 to 1.0.68
{ | ||
"name": "pdf_editor_aleon35_react_plugin", | ||
"version": "1.0.66", | ||
"version": "1.0.68", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -38,2 +38,14 @@ let wasm; | ||
function dropObject(idx) { | ||
if (idx < 132) return; | ||
heap[idx] = heap_next; | ||
heap_next = idx; | ||
} | ||
function takeObject(idx) { | ||
const ret = getObject(idx); | ||
dropObject(idx); | ||
return ret; | ||
} | ||
let WASM_VECTOR_LEN = 0; | ||
@@ -102,14 +114,2 @@ | ||
} | ||
function dropObject(idx) { | ||
if (idx < 132) return; | ||
heap[idx] = heap_next; | ||
heap_next = idx; | ||
} | ||
function takeObject(idx) { | ||
const ret = getObject(idx); | ||
dropObject(idx); | ||
return ret; | ||
} | ||
/** | ||
@@ -178,2 +178,30 @@ */ | ||
* @param {Uint8Array} pdf_data | ||
* @param {Uint32Array} new_order | ||
* @returns {Uint8Array} | ||
*/ | ||
export function move_pages(pdf_data, new_order) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passArray8ToWasm0(pdf_data, wasm.__wbindgen_malloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ptr1 = passArray32ToWasm0(new_order, wasm.__wbindgen_malloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
wasm.move_pages(retptr, ptr0, len0, ptr1, len1); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var r2 = getInt32Memory0()[retptr / 4 + 2]; | ||
var r3 = getInt32Memory0()[retptr / 4 + 3]; | ||
if (r3) { | ||
throw takeObject(r2); | ||
} | ||
var v3 = getArrayU8FromWasm0(r0, r1).slice(); | ||
wasm.__wbindgen_free(r0, r1 * 1); | ||
return v3; | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
} | ||
} | ||
/** | ||
* @param {Uint8Array} pdf_data | ||
* @param {number} from_index | ||
@@ -302,2 +330,5 @@ * @param {number} to_index | ||
}; | ||
imports.wbg.__wbindgen_object_drop_ref = function(arg0) { | ||
takeObject(arg0); | ||
}; | ||
imports.wbg.__wbindgen_json_serialize = function(arg0, arg1) { | ||
@@ -333,5 +364,2 @@ const obj = getObject(arg1); | ||
}; | ||
imports.wbg.__wbindgen_object_drop_ref = function(arg0) { | ||
takeObject(arg0); | ||
}; | ||
imports.wbg.__wbindgen_throw = function(arg0, arg1) { | ||
@@ -338,0 +366,0 @@ throw new Error(getStringFromWasm0(arg0, arg1)); |
@@ -19,2 +19,3 @@ import * as React from 'react'; | ||
) => { | ||
combineFiles: () => void; | ||
pagesLoaded: string; | ||
@@ -21,0 +22,0 @@ download: () => void; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
24864932
193
149766