@rhwp/core 0.7.7 → 0.7.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rhwp/core",
3
- "version": "0.7.7",
3
+ "version": "0.7.8",
4
4
  "description": "HWP/HWPX file parser and renderer — Rust + WebAssembly",
5
5
  "type": "module",
6
6
  "main": "rhwp.js",
package/rhwp.d.ts CHANGED
@@ -570,6 +570,10 @@ export class HwpDocument {
570
570
  * 페이지 정보를 JSON 문자열로 반환한다.
571
571
  */
572
572
  getPageInfo(page_num: number): string;
573
+ /**
574
+ * 페이지 레이어 트리를 JSON 문자열로 반환한다.
575
+ */
576
+ getPageLayerTree(page_num: number): string;
573
577
  /**
574
578
  * 위치에 해당하는 글로벌 쪽 번호 반환
575
579
  */
@@ -1318,6 +1322,8 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
1318
1322
 
1319
1323
  export interface InitOutput {
1320
1324
  readonly memory: WebAssembly.Memory;
1325
+ readonly version: () => [number, number];
1326
+ readonly init_panic_hook: () => void;
1321
1327
  readonly __wbg_hwpdocument_free: (a: number, b: number) => void;
1322
1328
  readonly __wbg_hwpviewer_free: (a: number, b: number) => void;
1323
1329
  readonly extractThumbnail: (a: number, b: number) => any;
@@ -1430,6 +1436,7 @@ export interface InitOutput {
1430
1436
  readonly hwpdocument_getPageFootnoteInfo: (a: number, b: number, c: number) => [number, number, number, number];
1431
1437
  readonly hwpdocument_getPageHide: (a: number, b: number, c: number) => [number, number, number, number];
1432
1438
  readonly hwpdocument_getPageInfo: (a: number, b: number) => [number, number, number, number];
1439
+ readonly hwpdocument_getPageLayerTree: (a: number, b: number) => [number, number, number, number];
1433
1440
  readonly hwpdocument_getPageOfPosition: (a: number, b: number, c: number) => [number, number, number, number];
1434
1441
  readonly hwpdocument_getPageRenderTree: (a: number, b: number) => [number, number, number, number];
1435
1442
  readonly hwpdocument_getPageTextLayout: (a: number, b: number) => [number, number, number, number];
@@ -1568,8 +1575,6 @@ export interface InitOutput {
1568
1575
  readonly hwpviewer_updateViewport: (a: number, b: number, c: number, d: number, e: number) => void;
1569
1576
  readonly hwpviewer_visiblePages: (a: number) => [number, number];
1570
1577
  readonly hwpviewer_pageCount: (a: number) => number;
1571
- readonly version: () => [number, number];
1572
- readonly init_panic_hook: () => void;
1573
1578
  readonly __wbindgen_exn_store: (a: number) => void;
1574
1579
  readonly __externref_table_alloc: () => number;
1575
1580
  readonly __wbindgen_externrefs: WebAssembly.Table;
package/rhwp.js CHANGED
@@ -8,7 +8,6 @@
8
8
  */
9
9
  export class HwpDocument {
10
10
  static __wrap(ptr) {
11
- ptr = ptr >>> 0;
12
11
  const obj = Object.create(HwpDocument.prototype);
13
12
  obj.__wbg_ptr = ptr;
14
13
  HwpDocumentFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -2538,6 +2537,29 @@ export class HwpDocument {
2538
2537
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
2539
2538
  }
2540
2539
  }
2540
+ /**
2541
+ * 페이지 레이어 트리를 JSON 문자열로 반환한다.
2542
+ * @param {number} page_num
2543
+ * @returns {string}
2544
+ */
2545
+ getPageLayerTree(page_num) {
2546
+ let deferred2_0;
2547
+ let deferred2_1;
2548
+ try {
2549
+ const ret = wasm.hwpdocument_getPageLayerTree(this.__wbg_ptr, page_num);
2550
+ var ptr1 = ret[0];
2551
+ var len1 = ret[1];
2552
+ if (ret[3]) {
2553
+ ptr1 = 0; len1 = 0;
2554
+ throw takeFromExternrefTable0(ret[2]);
2555
+ }
2556
+ deferred2_0 = ptr1;
2557
+ deferred2_1 = len1;
2558
+ return getStringFromWasm0(ptr1, len1);
2559
+ } finally {
2560
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
2561
+ }
2562
+ }
2541
2563
  /**
2542
2564
  * 위치에 해당하는 글로벌 쪽 번호 반환
2543
2565
  * @param {number} section_idx
@@ -2986,7 +3008,7 @@ export class HwpDocument {
2986
3008
  let deferred2_0;
2987
3009
  let deferred2_1;
2988
3010
  try {
2989
- const ret = wasm.hwpdocument_getTableCellBboxes(this.__wbg_ptr, section_idx, parent_para_idx, control_idx, isLikeNone(page_hint) ? 0x100000001 : (page_hint) >>> 0);
3011
+ const ret = wasm.hwpdocument_getTableCellBboxes(this.__wbg_ptr, section_idx, parent_para_idx, control_idx, isLikeNone(page_hint) ? Number.MAX_SAFE_INTEGER : (page_hint) >>> 0);
2990
3012
  var ptr1 = ret[0];
2991
3013
  var len1 = ret[1];
2992
3014
  if (ret[3]) {
@@ -4206,7 +4228,7 @@ export class HwpDocument {
4206
4228
  if (ret[2]) {
4207
4229
  throw takeFromExternrefTable0(ret[1]);
4208
4230
  }
4209
- this.__wbg_ptr = ret[0] >>> 0;
4231
+ this.__wbg_ptr = ret[0];
4210
4232
  HwpDocumentFinalization.register(this, this.__wbg_ptr, this);
4211
4233
  return this;
4212
4234
  }
@@ -5671,7 +5693,7 @@ export class HwpViewer {
5671
5693
  _assertClass(document, HwpDocument);
5672
5694
  var ptr0 = document.__destroy_into_raw();
5673
5695
  const ret = wasm.hwpviewer_new(ptr0);
5674
- this.__wbg_ptr = ret >>> 0;
5696
+ this.__wbg_ptr = ret;
5675
5697
  HwpViewerFinalization.register(this, this.__wbg_ptr, this);
5676
5698
  return this;
5677
5699
  }
@@ -5807,65 +5829,65 @@ export function version() {
5807
5829
  function __wbg_get_imports() {
5808
5830
  const import0 = {
5809
5831
  __proto__: null,
5810
- __wbg___wbindgen_is_undefined_29a43b4d42920abd: function(arg0) {
5832
+ __wbg___wbindgen_is_undefined_244a92c34d3b6ec0: function(arg0) {
5811
5833
  const ret = arg0 === undefined;
5812
5834
  return ret;
5813
5835
  },
5814
- __wbg___wbindgen_throw_6b64449b9b9ed33c: function(arg0, arg1) {
5836
+ __wbg___wbindgen_throw_9c75d47bf9e7731e: function(arg0, arg1) {
5815
5837
  throw new Error(getStringFromWasm0(arg0, arg1));
5816
5838
  },
5817
- __wbg_addColorStop_e4af4b30913e9aa4: function() { return handleError(function (arg0, arg1, arg2, arg3) {
5839
+ __wbg_addColorStop_ba4aad6fba5ad929: function() { return handleError(function (arg0, arg1, arg2, arg3) {
5818
5840
  arg0.addColorStop(arg1, getStringFromWasm0(arg2, arg3));
5819
5841
  }, arguments); },
5820
- __wbg_arcTo_941456c2ac39464e: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
5842
+ __wbg_arcTo_922ffffa034176d1: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
5821
5843
  arg0.arcTo(arg1, arg2, arg3, arg4, arg5);
5822
5844
  }, arguments); },
5823
- __wbg_arc_817de096f286078c: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
5845
+ __wbg_arc_ebc74f7abf32eace: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
5824
5846
  arg0.arc(arg1, arg2, arg3, arg4, arg5);
5825
5847
  }, arguments); },
5826
- __wbg_beginPath_6d95cc267dd3e88f: function(arg0) {
5848
+ __wbg_beginPath_d31f98e44cba3be0: function(arg0) {
5827
5849
  arg0.beginPath();
5828
5850
  },
5829
- __wbg_bezierCurveTo_ee45420e339643c8: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
5851
+ __wbg_bezierCurveTo_9899778d70409511: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
5830
5852
  arg0.bezierCurveTo(arg1, arg2, arg3, arg4, arg5, arg6);
5831
5853
  },
5832
- __wbg_clip_650afbf402c47658: function(arg0) {
5854
+ __wbg_clip_0b877dc5fbf86a1a: function(arg0) {
5833
5855
  arg0.clip();
5834
5856
  },
5835
- __wbg_closePath_d9cf40637e9c89c2: function(arg0) {
5857
+ __wbg_closePath_b438c379d0897f55: function(arg0) {
5836
5858
  arg0.closePath();
5837
5859
  },
5838
- __wbg_complete_7d890334bda9075e: function(arg0) {
5860
+ __wbg_complete_70c393bf234fdee5: function(arg0) {
5839
5861
  const ret = arg0.complete;
5840
5862
  return ret;
5841
5863
  },
5842
- __wbg_createElement_bbd4c90086fe6f7b: function() { return handleError(function (arg0, arg1, arg2) {
5864
+ __wbg_createElement_679cad83bb50288c: function() { return handleError(function (arg0, arg1, arg2) {
5843
5865
  const ret = arg0.createElement(getStringFromWasm0(arg1, arg2));
5844
5866
  return ret;
5845
5867
  }, arguments); },
5846
- __wbg_createLinearGradient_1ecf06dc64e02f68: function(arg0, arg1, arg2, arg3, arg4) {
5868
+ __wbg_createLinearGradient_03b776cc085406fa: function(arg0, arg1, arg2, arg3, arg4) {
5847
5869
  const ret = arg0.createLinearGradient(arg1, arg2, arg3, arg4);
5848
5870
  return ret;
5849
5871
  },
5850
- __wbg_createPattern_665dd581add98e15: function() { return handleError(function (arg0, arg1, arg2, arg3) {
5872
+ __wbg_createPattern_0a31066e2bf5293e: function() { return handleError(function (arg0, arg1, arg2, arg3) {
5851
5873
  const ret = arg0.createPattern(arg1, getStringFromWasm0(arg2, arg3));
5852
5874
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5853
5875
  }, arguments); },
5854
- __wbg_createRadialGradient_9c24ef9b8a6ce72f: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
5876
+ __wbg_createRadialGradient_370efd7ef3903eef: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
5855
5877
  const ret = arg0.createRadialGradient(arg1, arg2, arg3, arg4, arg5, arg6);
5856
5878
  return ret;
5857
5879
  }, arguments); },
5858
- __wbg_document_7a41071f2f439323: function(arg0) {
5880
+ __wbg_document_69bb6a2f7927d532: function(arg0) {
5859
5881
  const ret = arg0.document;
5860
5882
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5861
5883
  },
5862
- __wbg_drawImage_556ab1ffc4c5c68d: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
5863
- arg0.drawImage(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
5864
- }, arguments); },
5865
- __wbg_drawImage_96e533f015039596: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
5884
+ __wbg_drawImage_352c69a811a795b1: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
5866
5885
  arg0.drawImage(arg1, arg2, arg3, arg4, arg5);
5867
5886
  }, arguments); },
5868
- __wbg_ellipse_0303410b3d05bb97: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
5887
+ __wbg_drawImage_ee7295b6ac6759c9: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
5888
+ arg0.drawImage(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
5889
+ }, arguments); },
5890
+ __wbg_ellipse_c9ca4db6a1187c2f: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
5869
5891
  arg0.ellipse(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
5870
5892
  }, arguments); },
5871
5893
  __wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
@@ -5879,24 +5901,24 @@ function __wbg_get_imports() {
5879
5901
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
5880
5902
  }
5881
5903
  },
5882
- __wbg_fillRect_992c5a4646ea7a7f: function(arg0, arg1, arg2, arg3, arg4) {
5904
+ __wbg_fillRect_9219f775d7e8e73e: function(arg0, arg1, arg2, arg3, arg4) {
5883
5905
  arg0.fillRect(arg1, arg2, arg3, arg4);
5884
5906
  },
5885
- __wbg_fillText_dabb33ea287042e2: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
5907
+ __wbg_fillText_9fbea3af94326c74: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
5886
5908
  arg0.fillText(getStringFromWasm0(arg1, arg2), arg3, arg4);
5887
5909
  }, arguments); },
5888
- __wbg_fill_ec5da5f3916cf924: function(arg0) {
5910
+ __wbg_fill_eb2f573270ef9b6d: function(arg0) {
5889
5911
  arg0.fill();
5890
5912
  },
5891
- __wbg_getContext_fc146f8ec021d074: function() { return handleError(function (arg0, arg1, arg2) {
5913
+ __wbg_getContext_f17252002286474d: function() { return handleError(function (arg0, arg1, arg2) {
5892
5914
  const ret = arg0.getContext(getStringFromWasm0(arg1, arg2));
5893
5915
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5894
5916
  }, arguments); },
5895
- __wbg_height_528848d067cc2221: function(arg0) {
5917
+ __wbg_height_f036cb27636625f6: function(arg0) {
5896
5918
  const ret = arg0.height;
5897
5919
  return ret;
5898
5920
  },
5899
- __wbg_instanceof_CanvasRenderingContext2d_24a3fe06e62b98d7: function(arg0) {
5921
+ __wbg_instanceof_CanvasRenderingContext2d_b433938013de3a1e: function(arg0) {
5900
5922
  let result;
5901
5923
  try {
5902
5924
  result = arg0 instanceof CanvasRenderingContext2D;
@@ -5906,7 +5928,7 @@ function __wbg_get_imports() {
5906
5928
  const ret = result;
5907
5929
  return ret;
5908
5930
  },
5909
- __wbg_instanceof_HtmlCanvasElement_ea4dfc3bb77c734b: function(arg0) {
5931
+ __wbg_instanceof_HtmlCanvasElement_0ac74d5643067956: function(arg0) {
5910
5932
  let result;
5911
5933
  try {
5912
5934
  result = arg0 instanceof HTMLCanvasElement;
@@ -5916,7 +5938,7 @@ function __wbg_get_imports() {
5916
5938
  const ret = result;
5917
5939
  return ret;
5918
5940
  },
5919
- __wbg_instanceof_Window_cc64c86c8ef9e02b: function(arg0) {
5941
+ __wbg_instanceof_Window_4153c1818a1c0c0b: function(arg0) {
5920
5942
  let result;
5921
5943
  try {
5922
5944
  result = arg0 instanceof Window;
@@ -5926,17 +5948,17 @@ function __wbg_get_imports() {
5926
5948
  const ret = result;
5927
5949
  return ret;
5928
5950
  },
5929
- __wbg_lineTo_c9f1e0dd4824ae31: function(arg0, arg1, arg2) {
5951
+ __wbg_lineTo_fe5522fbbf79a59d: function(arg0, arg1, arg2) {
5930
5952
  arg0.lineTo(arg1, arg2);
5931
5953
  },
5932
- __wbg_measureTextWidth_570c480655e94d3b: function(arg0, arg1, arg2, arg3) {
5954
+ __wbg_measureTextWidth_3cd91d175f951e1d: function(arg0, arg1, arg2, arg3) {
5933
5955
  const ret = globalThis.measureTextWidth(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
5934
5956
  return ret;
5935
5957
  },
5936
- __wbg_moveTo_d3deaceb55dc2d80: function(arg0, arg1, arg2) {
5958
+ __wbg_moveTo_89e84c82679f8ac9: function(arg0, arg1, arg2) {
5937
5959
  arg0.moveTo(arg1, arg2);
5938
5960
  },
5939
- __wbg_naturalWidth_901815552da8b0fc: function(arg0) {
5961
+ __wbg_naturalWidth_104d59e95b1d37c1: function(arg0) {
5940
5962
  const ret = arg0.naturalWidth;
5941
5963
  return ret;
5942
5964
  },
@@ -5944,88 +5966,88 @@ function __wbg_get_imports() {
5944
5966
  const ret = new Error();
5945
5967
  return ret;
5946
5968
  },
5947
- __wbg_new_682678e2f47e32bc: function() {
5948
- const ret = new Array();
5949
- return ret;
5950
- },
5951
- __wbg_new_ca878e5fdbbbf099: function() { return handleError(function () {
5969
+ __wbg_new_23949f1619fea73e: function() { return handleError(function () {
5952
5970
  const ret = new Image();
5953
5971
  return ret;
5954
5972
  }, arguments); },
5955
- __wbg_push_471a5b068a5295f6: function(arg0, arg1) {
5973
+ __wbg_new_3baa8d9866155c79: function() {
5974
+ const ret = new Array();
5975
+ return ret;
5976
+ },
5977
+ __wbg_push_60a5366c0bb22a7d: function(arg0, arg1) {
5956
5978
  const ret = arg0.push(arg1);
5957
5979
  return ret;
5958
5980
  },
5959
- __wbg_quadraticCurveTo_37ac65747b2aa9f4: function(arg0, arg1, arg2, arg3, arg4) {
5981
+ __wbg_quadraticCurveTo_2b659feec3707cec: function(arg0, arg1, arg2, arg3, arg4) {
5960
5982
  arg0.quadraticCurveTo(arg1, arg2, arg3, arg4);
5961
5983
  },
5962
- __wbg_rect_a7f5a58f447e85c2: function(arg0, arg1, arg2, arg3, arg4) {
5984
+ __wbg_rect_ffcb9addb3e2b81f: function(arg0, arg1, arg2, arg3, arg4) {
5963
5985
  arg0.rect(arg1, arg2, arg3, arg4);
5964
5986
  },
5965
- __wbg_restore_f103803ad0dc390b: function(arg0) {
5987
+ __wbg_restore_5bff5e1cc672e792: function(arg0) {
5966
5988
  arg0.restore();
5967
5989
  },
5968
- __wbg_rotate_fb8a7a0e39ad85a6: function() { return handleError(function (arg0, arg1) {
5990
+ __wbg_rotate_17c7e1bc53bb4e51: function() { return handleError(function (arg0, arg1) {
5969
5991
  arg0.rotate(arg1);
5970
5992
  }, arguments); },
5971
- __wbg_save_5b07d6d1028c3e4d: function(arg0) {
5993
+ __wbg_save_512a4b0787b6682e: function(arg0) {
5972
5994
  arg0.save();
5973
5995
  },
5974
- __wbg_scale_c41a145cbdf9e3c0: function() { return handleError(function (arg0, arg1, arg2) {
5996
+ __wbg_scale_cb5a2c96d71a5c3b: function() { return handleError(function (arg0, arg1, arg2) {
5975
5997
  arg0.scale(arg1, arg2);
5976
5998
  }, arguments); },
5977
- __wbg_setLineDash_c273ecd8ca7d242d: function() { return handleError(function (arg0, arg1) {
5999
+ __wbg_setLineDash_c85ef805c77cc796: function() { return handleError(function (arg0, arg1) {
5978
6000
  arg0.setLineDash(arg1);
5979
6001
  }, arguments); },
5980
- __wbg_set_fillStyle_88f4ccfb74d7de05: function(arg0, arg1) {
6002
+ __wbg_set_fillStyle_6564a82b72a38a9c: function(arg0, arg1) {
5981
6003
  arg0.fillStyle = arg1;
5982
6004
  },
5983
- __wbg_set_fillStyle_a6dc6303c382ed50: function(arg0, arg1) {
5984
- arg0.fillStyle = arg1;
5985
- },
5986
- __wbg_set_fillStyle_e51447e54357dc46: function(arg0, arg1, arg2) {
6005
+ __wbg_set_fillStyle_a3656c7c5d4ad803: function(arg0, arg1, arg2) {
5987
6006
  arg0.fillStyle = getStringFromWasm0(arg1, arg2);
5988
6007
  },
5989
- __wbg_set_font_295aa505e45244aa: function(arg0, arg1, arg2) {
6008
+ __wbg_set_fillStyle_a37bbe1a6cf22936: function(arg0, arg1) {
6009
+ arg0.fillStyle = arg1;
6010
+ },
6011
+ __wbg_set_font_5b1b8c76449f5864: function(arg0, arg1, arg2) {
5990
6012
  arg0.font = getStringFromWasm0(arg1, arg2);
5991
6013
  },
5992
- __wbg_set_globalAlpha_1660b0603161d11b: function(arg0, arg1) {
6014
+ __wbg_set_globalAlpha_58134ccb891b6e21: function(arg0, arg1) {
5993
6015
  arg0.globalAlpha = arg1;
5994
6016
  },
5995
- __wbg_set_height_be9b2b920bd68401: function(arg0, arg1) {
6017
+ __wbg_set_height_89a4ecd0f9cc3dfa: function(arg0, arg1) {
5996
6018
  arg0.height = arg1 >>> 0;
5997
6019
  },
5998
- __wbg_set_lineCap_63624e83cb57fb8b: function(arg0, arg1, arg2) {
6020
+ __wbg_set_lineCap_c6d038d4ea8817be: function(arg0, arg1, arg2) {
5999
6021
  arg0.lineCap = getStringFromWasm0(arg1, arg2);
6000
6022
  },
6001
- __wbg_set_lineWidth_2fae105117e1a89f: function(arg0, arg1) {
6023
+ __wbg_set_lineWidth_da5d8942373f2ea0: function(arg0, arg1) {
6002
6024
  arg0.lineWidth = arg1;
6003
6025
  },
6004
- __wbg_set_shadowBlur_f9653d1a9e1573ef: function(arg0, arg1) {
6026
+ __wbg_set_shadowBlur_91e8b0b4ca658eb7: function(arg0, arg1) {
6005
6027
  arg0.shadowBlur = arg1;
6006
6028
  },
6007
- __wbg_set_shadowColor_5882e8ce2ded629b: function(arg0, arg1, arg2) {
6029
+ __wbg_set_shadowColor_6d60d3f505c71c42: function(arg0, arg1, arg2) {
6008
6030
  arg0.shadowColor = getStringFromWasm0(arg1, arg2);
6009
6031
  },
6010
- __wbg_set_shadowOffsetX_1392477384fa4640: function(arg0, arg1) {
6032
+ __wbg_set_shadowOffsetX_7a56a0410cdc1eb2: function(arg0, arg1) {
6011
6033
  arg0.shadowOffsetX = arg1;
6012
6034
  },
6013
- __wbg_set_shadowOffsetY_34fbe4164fc72313: function(arg0, arg1) {
6035
+ __wbg_set_shadowOffsetY_492ca90da11f0348: function(arg0, arg1) {
6014
6036
  arg0.shadowOffsetY = arg1;
6015
6037
  },
6016
- __wbg_set_src_59f1be1c833b4918: function(arg0, arg1, arg2) {
6038
+ __wbg_set_src_437acc9e665412cd: function(arg0, arg1, arg2) {
6017
6039
  arg0.src = getStringFromWasm0(arg1, arg2);
6018
6040
  },
6019
- __wbg_set_strokeStyle_0429d48dae657e53: function(arg0, arg1, arg2) {
6041
+ __wbg_set_strokeStyle_cee0bcfd92da6363: function(arg0, arg1, arg2) {
6020
6042
  arg0.strokeStyle = getStringFromWasm0(arg1, arg2);
6021
6043
  },
6022
- __wbg_set_textAlign_e1a83482b00339b8: function(arg0, arg1, arg2) {
6044
+ __wbg_set_textAlign_2293f6bbd3877cb0: function(arg0, arg1, arg2) {
6023
6045
  arg0.textAlign = getStringFromWasm0(arg1, arg2);
6024
6046
  },
6025
- __wbg_set_textBaseline_8662e97190d0164a: function(arg0, arg1, arg2) {
6047
+ __wbg_set_textBaseline_68cf9979f06f859b: function(arg0, arg1, arg2) {
6026
6048
  arg0.textBaseline = getStringFromWasm0(arg1, arg2);
6027
6049
  },
6028
- __wbg_set_width_5cda41d4d06a14dd: function(arg0, arg1) {
6050
+ __wbg_set_width_d2ec5d6689655fa9: function(arg0, arg1) {
6029
6051
  arg0.width = arg1 >>> 0;
6030
6052
  },
6031
6053
  __wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
@@ -6035,35 +6057,35 @@ function __wbg_get_imports() {
6035
6057
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
6036
6058
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
6037
6059
  },
6038
- __wbg_static_accessor_GLOBAL_8cfadc87a297ca02: function() {
6039
- const ret = typeof global === 'undefined' ? null : global;
6060
+ __wbg_static_accessor_GLOBAL_THIS_1c7f1bd6c6941fdb: function() {
6061
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
6040
6062
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
6041
6063
  },
6042
- __wbg_static_accessor_GLOBAL_THIS_602256ae5c8f42cf: function() {
6043
- const ret = typeof globalThis === 'undefined' ? null : globalThis;
6064
+ __wbg_static_accessor_GLOBAL_e039bc914f83e74e: function() {
6065
+ const ret = typeof global === 'undefined' ? null : global;
6044
6066
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
6045
6067
  },
6046
- __wbg_static_accessor_SELF_e445c1c7484aecc3: function() {
6068
+ __wbg_static_accessor_SELF_8bf8c48c28420ad5: function() {
6047
6069
  const ret = typeof self === 'undefined' ? null : self;
6048
6070
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
6049
6071
  },
6050
- __wbg_static_accessor_WINDOW_f20e8576ef1e0f17: function() {
6072
+ __wbg_static_accessor_WINDOW_6aeee9b51652ee0f: function() {
6051
6073
  const ret = typeof window === 'undefined' ? null : window;
6052
6074
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
6053
6075
  },
6054
- __wbg_strokeRect_502699d92aeb85f1: function(arg0, arg1, arg2, arg3, arg4) {
6076
+ __wbg_strokeRect_4cb59de6fd9e905f: function(arg0, arg1, arg2, arg3, arg4) {
6055
6077
  arg0.strokeRect(arg1, arg2, arg3, arg4);
6056
6078
  },
6057
- __wbg_strokeText_fd5393a1c9f02f23: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
6079
+ __wbg_strokeText_056a55d8ef6be556: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
6058
6080
  arg0.strokeText(getStringFromWasm0(arg1, arg2), arg3, arg4);
6059
6081
  }, arguments); },
6060
- __wbg_stroke_42f07013960cf81b: function(arg0) {
6082
+ __wbg_stroke_38f034c148fd63eb: function(arg0) {
6061
6083
  arg0.stroke();
6062
6084
  },
6063
- __wbg_translate_34989493d69eaecd: function() { return handleError(function (arg0, arg1, arg2) {
6085
+ __wbg_translate_49770be14b6ad0c5: function() { return handleError(function (arg0, arg1, arg2) {
6064
6086
  arg0.translate(arg1, arg2);
6065
6087
  }, arguments); },
6066
- __wbg_width_5adcb07d04d08bdf: function(arg0) {
6088
+ __wbg_width_73079be53f70e8ba: function(arg0) {
6067
6089
  const ret = arg0.width;
6068
6090
  return ret;
6069
6091
  },
@@ -6095,10 +6117,10 @@ function __wbg_get_imports() {
6095
6117
 
6096
6118
  const HwpDocumentFinalization = (typeof FinalizationRegistry === 'undefined')
6097
6119
  ? { register: () => {}, unregister: () => {} }
6098
- : new FinalizationRegistry(ptr => wasm.__wbg_hwpdocument_free(ptr >>> 0, 1));
6120
+ : new FinalizationRegistry(ptr => wasm.__wbg_hwpdocument_free(ptr, 1));
6099
6121
  const HwpViewerFinalization = (typeof FinalizationRegistry === 'undefined')
6100
6122
  ? { register: () => {}, unregister: () => {} }
6101
- : new FinalizationRegistry(ptr => wasm.__wbg_hwpviewer_free(ptr >>> 0, 1));
6123
+ : new FinalizationRegistry(ptr => wasm.__wbg_hwpviewer_free(ptr, 1));
6102
6124
 
6103
6125
  function addToExternrefTable0(obj) {
6104
6126
  const idx = wasm.__externref_table_alloc();
@@ -6131,8 +6153,7 @@ function getDataViewMemory0() {
6131
6153
  }
6132
6154
 
6133
6155
  function getStringFromWasm0(ptr, len) {
6134
- ptr = ptr >>> 0;
6135
- return decodeText(ptr, len);
6156
+ return decodeText(ptr >>> 0, len);
6136
6157
  }
6137
6158
 
6138
6159
  let cachedUint32ArrayMemory0 = null;
@@ -6243,8 +6264,9 @@ if (!('encodeInto' in cachedTextEncoder)) {
6243
6264
 
6244
6265
  let WASM_VECTOR_LEN = 0;
6245
6266
 
6246
- let wasmModule, wasm;
6267
+ let wasmModule, wasmInstance, wasm;
6247
6268
  function __wbg_finalize_init(instance, module) {
6269
+ wasmInstance = instance;
6248
6270
  wasm = instance.exports;
6249
6271
  wasmModule = module;
6250
6272
  cachedDataViewMemory0 = null;
package/rhwp_bg.wasm CHANGED
Binary file
package/rhwp_bg.wasm.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
+ export const version: () => [number, number];
5
+ export const init_panic_hook: () => void;
4
6
  export const __wbg_hwpdocument_free: (a: number, b: number) => void;
5
7
  export const __wbg_hwpviewer_free: (a: number, b: number) => void;
6
8
  export const extractThumbnail: (a: number, b: number) => any;
@@ -113,6 +115,7 @@ export const hwpdocument_getPageDef: (a: number, b: number) => [number, number,
113
115
  export const hwpdocument_getPageFootnoteInfo: (a: number, b: number, c: number) => [number, number, number, number];
114
116
  export const hwpdocument_getPageHide: (a: number, b: number, c: number) => [number, number, number, number];
115
117
  export const hwpdocument_getPageInfo: (a: number, b: number) => [number, number, number, number];
118
+ export const hwpdocument_getPageLayerTree: (a: number, b: number) => [number, number, number, number];
116
119
  export const hwpdocument_getPageOfPosition: (a: number, b: number, c: number) => [number, number, number, number];
117
120
  export const hwpdocument_getPageRenderTree: (a: number, b: number) => [number, number, number, number];
118
121
  export const hwpdocument_getPageTextLayout: (a: number, b: number) => [number, number, number, number];
@@ -251,8 +254,6 @@ export const hwpviewer_setZoom: (a: number, b: number) => void;
251
254
  export const hwpviewer_updateViewport: (a: number, b: number, c: number, d: number, e: number) => void;
252
255
  export const hwpviewer_visiblePages: (a: number) => [number, number];
253
256
  export const hwpviewer_pageCount: (a: number) => number;
254
- export const version: () => [number, number];
255
- export const init_panic_hook: () => void;
256
257
  export const __wbindgen_exn_store: (a: number) => void;
257
258
  export const __externref_table_alloc: () => number;
258
259
  export const __wbindgen_externrefs: WebAssembly.Table;