docx-wasm 0.0.274-image-test8 → 0.0.276-rc0
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/node/json/paragraph.d.ts +1 -0
- package/dist/node/pkg/docx_wasm.d.ts +58 -58
- package/dist/node/pkg/docx_wasm.js +29 -29
- package/dist/node/pkg/docx_wasm_bg.wasm +0 -0
- package/dist/node/pkg/docx_wasm_bg.wasm.d.ts +16 -16
- package/dist/web/json/paragraph.d.ts +1 -0
- package/dist/web/pkg/docx_wasm.d.ts +58 -58
- package/dist/web/pkg/docx_wasm_bg.js +29 -29
- package/dist/web/pkg/docx_wasm_bg.wasm +0 -0
- package/dist/web/pkg/docx_wasm_bg.wasm.d.ts +16 -16
- package/js/json/paragraph.ts +1 -0
- package/package.json +2 -2
|
@@ -21,17 +21,16 @@ export function readDocx(buf: Uint8Array): string;
|
|
|
21
21
|
*/
|
|
22
22
|
export function createRunFonts(): RunFonts;
|
|
23
23
|
/**
|
|
24
|
+
* @returns {LineSpacing}
|
|
25
|
+
*/
|
|
26
|
+
export function createLineSpacing(): LineSpacing;
|
|
27
|
+
/**
|
|
24
28
|
* @param {string} style_id
|
|
25
29
|
* @param {number} style_type
|
|
26
30
|
* @returns {Style}
|
|
27
31
|
*/
|
|
28
32
|
export function createStyle(style_id: string, style_type: number): Style;
|
|
29
33
|
/**
|
|
30
|
-
* @param {number} position
|
|
31
|
-
* @returns {TableCellBorder}
|
|
32
|
-
*/
|
|
33
|
-
export function createTableCellBorder(position: number): TableCellBorder;
|
|
34
|
-
/**
|
|
35
34
|
* @returns {TableRow}
|
|
36
35
|
*/
|
|
37
36
|
export function createTableRow(): TableRow;
|
|
@@ -54,9 +53,10 @@ export function createHeader(): Header;
|
|
|
54
53
|
*/
|
|
55
54
|
export function createInsert(run: Run): Insert;
|
|
56
55
|
/**
|
|
57
|
-
* @
|
|
56
|
+
* @param {number} position
|
|
57
|
+
* @returns {TableCellBorder}
|
|
58
58
|
*/
|
|
59
|
-
export function
|
|
59
|
+
export function createTableCellBorder(position: number): TableCellBorder;
|
|
60
60
|
/**
|
|
61
61
|
* @param {number} id
|
|
62
62
|
* @param {number} start
|
|
@@ -153,6 +153,12 @@ export enum HeightRule {
|
|
|
153
153
|
}
|
|
154
154
|
/**
|
|
155
155
|
*/
|
|
156
|
+
export enum HyperlinkType {
|
|
157
|
+
Anchor,
|
|
158
|
+
External,
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
*/
|
|
156
162
|
export enum LevelSuffixType {
|
|
157
163
|
Nothing,
|
|
158
164
|
Space,
|
|
@@ -160,16 +166,6 @@ export enum LevelSuffixType {
|
|
|
160
166
|
}
|
|
161
167
|
/**
|
|
162
168
|
*/
|
|
163
|
-
export enum TabLeaderType {
|
|
164
|
-
Dot,
|
|
165
|
-
Heavy,
|
|
166
|
-
Hyphen,
|
|
167
|
-
MiddleDot,
|
|
168
|
-
None,
|
|
169
|
-
Underscore,
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
*/
|
|
173
169
|
export enum DrawingPositionType {
|
|
174
170
|
Anchor,
|
|
175
171
|
Inline,
|
|
@@ -184,9 +180,13 @@ export enum PicAlign {
|
|
|
184
180
|
}
|
|
185
181
|
/**
|
|
186
182
|
*/
|
|
187
|
-
export enum
|
|
188
|
-
|
|
189
|
-
|
|
183
|
+
export enum TabLeaderType {
|
|
184
|
+
Dot,
|
|
185
|
+
Heavy,
|
|
186
|
+
Hyphen,
|
|
187
|
+
MiddleDot,
|
|
188
|
+
None,
|
|
189
|
+
Underscore,
|
|
190
190
|
}
|
|
191
191
|
/**
|
|
192
192
|
*/
|
|
@@ -197,29 +197,6 @@ export enum VMergeType {
|
|
|
197
197
|
}
|
|
198
198
|
/**
|
|
199
199
|
*/
|
|
200
|
-
export enum BreakType {
|
|
201
|
-
Page,
|
|
202
|
-
Column,
|
|
203
|
-
TextWrapping,
|
|
204
|
-
Unsupported,
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
*/
|
|
208
|
-
export enum FieldCharType {
|
|
209
|
-
Begin,
|
|
210
|
-
Separate,
|
|
211
|
-
End,
|
|
212
|
-
Unsupported,
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
*/
|
|
216
|
-
export enum LineSpacingType {
|
|
217
|
-
Auto,
|
|
218
|
-
AtLeast,
|
|
219
|
-
Exact,
|
|
220
|
-
}
|
|
221
|
-
/**
|
|
222
|
-
*/
|
|
223
200
|
export enum ShdType {
|
|
224
201
|
Nil,
|
|
225
202
|
Clear,
|
|
@@ -276,6 +253,21 @@ export enum TextDirectionType {
|
|
|
276
253
|
}
|
|
277
254
|
/**
|
|
278
255
|
*/
|
|
256
|
+
export enum BreakType {
|
|
257
|
+
Page,
|
|
258
|
+
Column,
|
|
259
|
+
TextWrapping,
|
|
260
|
+
Unsupported,
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
*/
|
|
264
|
+
export enum LineSpacingType {
|
|
265
|
+
Auto,
|
|
266
|
+
AtLeast,
|
|
267
|
+
Exact,
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
*/
|
|
279
271
|
export enum VertAlignType {
|
|
280
272
|
Baseline,
|
|
281
273
|
SuperScript,
|
|
@@ -384,21 +376,6 @@ export enum TableCellBorderPosition {
|
|
|
384
376
|
}
|
|
385
377
|
/**
|
|
386
378
|
*/
|
|
387
|
-
export enum StyleType {
|
|
388
|
-
Paragraph,
|
|
389
|
-
Character,
|
|
390
|
-
Numbering,
|
|
391
|
-
Table,
|
|
392
|
-
Unsupported,
|
|
393
|
-
}
|
|
394
|
-
/**
|
|
395
|
-
*/
|
|
396
|
-
export enum TableLayoutType {
|
|
397
|
-
Fixed,
|
|
398
|
-
Autofit,
|
|
399
|
-
}
|
|
400
|
-
/**
|
|
401
|
-
*/
|
|
402
379
|
export enum WidthType {
|
|
403
380
|
Dxa,
|
|
404
381
|
Auto,
|
|
@@ -416,6 +393,14 @@ export enum DocGridType {
|
|
|
416
393
|
}
|
|
417
394
|
/**
|
|
418
395
|
*/
|
|
396
|
+
export enum FieldCharType {
|
|
397
|
+
Begin,
|
|
398
|
+
Separate,
|
|
399
|
+
End,
|
|
400
|
+
Unsupported,
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
*/
|
|
419
404
|
export enum RelativeFromHType {
|
|
420
405
|
/**
|
|
421
406
|
* Specifies that the horizontal positioning shall be
|
|
@@ -476,6 +461,15 @@ export enum RelativeFromVType {
|
|
|
476
461
|
}
|
|
477
462
|
/**
|
|
478
463
|
*/
|
|
464
|
+
export enum StyleType {
|
|
465
|
+
Paragraph,
|
|
466
|
+
Character,
|
|
467
|
+
Numbering,
|
|
468
|
+
Table,
|
|
469
|
+
Unsupported,
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
*/
|
|
479
473
|
export enum TabValueType {
|
|
480
474
|
Bar,
|
|
481
475
|
Center,
|
|
@@ -489,6 +483,12 @@ export enum TabValueType {
|
|
|
489
483
|
}
|
|
490
484
|
/**
|
|
491
485
|
*/
|
|
486
|
+
export enum TableLayoutType {
|
|
487
|
+
Fixed,
|
|
488
|
+
Autofit,
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
*/
|
|
492
492
|
export class AbstractNumbering {
|
|
493
493
|
free(): void;
|
|
494
494
|
/**
|
|
@@ -172,6 +172,14 @@ module.exports.createRunFonts = function() {
|
|
|
172
172
|
return RunFonts.__wrap(ret);
|
|
173
173
|
};
|
|
174
174
|
|
|
175
|
+
/**
|
|
176
|
+
* @returns {LineSpacing}
|
|
177
|
+
*/
|
|
178
|
+
module.exports.createLineSpacing = function() {
|
|
179
|
+
var ret = wasm.createLineSpacing();
|
|
180
|
+
return LineSpacing.__wrap(ret);
|
|
181
|
+
};
|
|
182
|
+
|
|
175
183
|
/**
|
|
176
184
|
* @param {string} style_id
|
|
177
185
|
* @param {number} style_type
|
|
@@ -187,15 +195,6 @@ module.exports.createStyle = function(style_id, style_type) {
|
|
|
187
195
|
function isLikeNone(x) {
|
|
188
196
|
return x === undefined || x === null;
|
|
189
197
|
}
|
|
190
|
-
/**
|
|
191
|
-
* @param {number} position
|
|
192
|
-
* @returns {TableCellBorder}
|
|
193
|
-
*/
|
|
194
|
-
module.exports.createTableCellBorder = function(position) {
|
|
195
|
-
var ret = wasm.createTableCellBorder(position);
|
|
196
|
-
return TableCellBorder.__wrap(ret);
|
|
197
|
-
};
|
|
198
|
-
|
|
199
198
|
/**
|
|
200
199
|
* @returns {TableRow}
|
|
201
200
|
*/
|
|
@@ -245,11 +244,12 @@ module.exports.createInsert = function(run) {
|
|
|
245
244
|
};
|
|
246
245
|
|
|
247
246
|
/**
|
|
248
|
-
* @
|
|
247
|
+
* @param {number} position
|
|
248
|
+
* @returns {TableCellBorder}
|
|
249
249
|
*/
|
|
250
|
-
module.exports.
|
|
251
|
-
var ret = wasm.
|
|
252
|
-
return
|
|
250
|
+
module.exports.createTableCellBorder = function(position) {
|
|
251
|
+
var ret = wasm.createTableCellBorder(position);
|
|
252
|
+
return TableCellBorder.__wrap(ret);
|
|
253
253
|
};
|
|
254
254
|
|
|
255
255
|
/**
|
|
@@ -428,10 +428,10 @@ module.exports.AlignmentType = Object.freeze({ Both:0,"0":"Both",Center:1,"1":"C
|
|
|
428
428
|
module.exports.HeightRule = Object.freeze({ Auto:0,"0":"Auto",AtLeast:1,"1":"AtLeast",Exact:2,"2":"Exact", });
|
|
429
429
|
/**
|
|
430
430
|
*/
|
|
431
|
-
module.exports.
|
|
431
|
+
module.exports.HyperlinkType = Object.freeze({ Anchor:0,"0":"Anchor",External:1,"1":"External", });
|
|
432
432
|
/**
|
|
433
433
|
*/
|
|
434
|
-
module.exports.
|
|
434
|
+
module.exports.LevelSuffixType = Object.freeze({ Nothing:0,"0":"Nothing",Space:1,"1":"Space",Tab:2,"2":"Tab", });
|
|
435
435
|
/**
|
|
436
436
|
*/
|
|
437
437
|
module.exports.DrawingPositionType = Object.freeze({ Anchor:0,"0":"Anchor",Inline:1,"1":"Inline", });
|
|
@@ -440,25 +440,22 @@ module.exports.DrawingPositionType = Object.freeze({ Anchor:0,"0":"Anchor",Inlin
|
|
|
440
440
|
module.exports.PicAlign = Object.freeze({ Left:0,"0":"Left",Right:1,"1":"Right",Bottom:2,"2":"Bottom",Top:3,"3":"Top", });
|
|
441
441
|
/**
|
|
442
442
|
*/
|
|
443
|
-
module.exports.
|
|
443
|
+
module.exports.TabLeaderType = Object.freeze({ Dot:0,"0":"Dot",Heavy:1,"1":"Heavy",Hyphen:2,"2":"Hyphen",MiddleDot:3,"3":"MiddleDot",None:4,"4":"None",Underscore:5,"5":"Underscore", });
|
|
444
444
|
/**
|
|
445
445
|
*/
|
|
446
446
|
module.exports.VMergeType = Object.freeze({ Continue:0,"0":"Continue",Restart:1,"1":"Restart",Unsupported:2,"2":"Unsupported", });
|
|
447
447
|
/**
|
|
448
448
|
*/
|
|
449
|
-
module.exports.
|
|
450
|
-
/**
|
|
451
|
-
*/
|
|
452
|
-
module.exports.FieldCharType = Object.freeze({ Begin:0,"0":"Begin",Separate:1,"1":"Separate",End:2,"2":"End",Unsupported:3,"3":"Unsupported", });
|
|
449
|
+
module.exports.ShdType = Object.freeze({ Nil:0,"0":"Nil",Clear:1,"1":"Clear",Solid:2,"2":"Solid",HorzStripe:3,"3":"HorzStripe",VertStripe:4,"4":"VertStripe",ReverseDiagStripe:5,"5":"ReverseDiagStripe",DiagStripe:6,"6":"DiagStripe",HorzCross:7,"7":"HorzCross",DiagCross:8,"8":"DiagCross",ThinHorzStripe:9,"9":"ThinHorzStripe",ThinVertStripe:10,"10":"ThinVertStripe",ThinReverseDiagStripe:11,"11":"ThinReverseDiagStripe",ThinDiagStripe:12,"12":"ThinDiagStripe",ThinHorzCross:13,"13":"ThinHorzCross",ThinDiagCross:14,"14":"ThinDiagCross",Pct5:15,"15":"Pct5",Pct10:16,"16":"Pct10",Pct12:17,"17":"Pct12",Pct15:18,"18":"Pct15",Pct20:19,"19":"Pct20",Pct25:20,"20":"Pct25",Pct30:21,"21":"Pct30",Pct35:22,"22":"Pct35",Pct37:23,"23":"Pct37",Pct40:24,"24":"Pct40",Pct45:25,"25":"Pct45",Pct50:26,"26":"Pct50",Pct55:27,"27":"Pct55",Pct60:28,"28":"Pct60",Pct62:29,"29":"Pct62",Pct65:30,"30":"Pct65",Pct70:31,"31":"Pct70",Pct75:32,"32":"Pct75",Pct80:33,"33":"Pct80",Pct85:34,"34":"Pct85",Pct87:35,"35":"Pct87",Pct90:36,"36":"Pct90",Pct95:37,"37":"Pct95", });
|
|
453
450
|
/**
|
|
454
451
|
*/
|
|
455
|
-
module.exports.
|
|
452
|
+
module.exports.TextDirectionType = Object.freeze({ Lr:0,"0":"Lr",LrV:1,"1":"LrV",Rl:2,"2":"Rl",RlV:3,"3":"RlV",Tb:4,"4":"Tb",TbV:5,"5":"TbV",TbRlV:6,"6":"TbRlV",TbRl:7,"7":"TbRl",BtLr:8,"8":"BtLr",LrTbV:9,"9":"LrTbV", });
|
|
456
453
|
/**
|
|
457
454
|
*/
|
|
458
|
-
module.exports.
|
|
455
|
+
module.exports.BreakType = Object.freeze({ Page:0,"0":"Page",Column:1,"1":"Column",TextWrapping:2,"2":"TextWrapping",Unsupported:3,"3":"Unsupported", });
|
|
459
456
|
/**
|
|
460
457
|
*/
|
|
461
|
-
module.exports.
|
|
458
|
+
module.exports.LineSpacingType = Object.freeze({ Auto:0,"0":"Auto",AtLeast:1,"1":"AtLeast",Exact:2,"2":"Exact", });
|
|
462
459
|
/**
|
|
463
460
|
*/
|
|
464
461
|
module.exports.VertAlignType = Object.freeze({ Baseline:0,"0":"Baseline",SuperScript:1,"1":"SuperScript",SubScript:2,"2":"SubScript",Unsupported:3,"3":"Unsupported", });
|
|
@@ -491,18 +488,15 @@ module.exports.TableBorderPosition = Object.freeze({ Left:0,"0":"Left",Right:1,"
|
|
|
491
488
|
module.exports.TableCellBorderPosition = Object.freeze({ Left:0,"0":"Left",Right:1,"1":"Right",Top:2,"2":"Top",Bottom:3,"3":"Bottom",InsideH:4,"4":"InsideH",InsideV:5,"5":"InsideV",Tl2br:6,"6":"Tl2br",Tr2bl:7,"7":"Tr2bl", });
|
|
492
489
|
/**
|
|
493
490
|
*/
|
|
494
|
-
module.exports.StyleType = Object.freeze({ Paragraph:0,"0":"Paragraph",Character:1,"1":"Character",Numbering:2,"2":"Numbering",Table:3,"3":"Table",Unsupported:4,"4":"Unsupported", });
|
|
495
|
-
/**
|
|
496
|
-
*/
|
|
497
|
-
module.exports.TableLayoutType = Object.freeze({ Fixed:0,"0":"Fixed",Autofit:1,"1":"Autofit", });
|
|
498
|
-
/**
|
|
499
|
-
*/
|
|
500
491
|
module.exports.WidthType = Object.freeze({ Dxa:0,"0":"Dxa",Auto:1,"1":"Auto",Pct:2,"2":"Pct",Nil:3,"3":"Nil",Unsupported:4,"4":"Unsupported", });
|
|
501
492
|
/**
|
|
502
493
|
*/
|
|
503
494
|
module.exports.DocGridType = Object.freeze({ Default:0,"0":"Default",Lines:1,"1":"Lines",LinesAndChars:2,"2":"LinesAndChars",SnapToChars:3,"3":"SnapToChars", });
|
|
504
495
|
/**
|
|
505
496
|
*/
|
|
497
|
+
module.exports.FieldCharType = Object.freeze({ Begin:0,"0":"Begin",Separate:1,"1":"Separate",End:2,"2":"End",Unsupported:3,"3":"Unsupported", });
|
|
498
|
+
/**
|
|
499
|
+
*/
|
|
506
500
|
module.exports.RelativeFromHType = Object.freeze({
|
|
507
501
|
/**
|
|
508
502
|
* Specifies that the horizontal positioning shall be
|
|
@@ -553,9 +547,15 @@ RightMargin:7,"7":"RightMargin", });
|
|
|
553
547
|
module.exports.RelativeFromVType = Object.freeze({ BottomMargin:0,"0":"BottomMargin",InsideMargin:1,"1":"InsideMargin",Line:2,"2":"Line",Margin:3,"3":"Margin",OutsizeMargin:4,"4":"OutsizeMargin",Page:5,"5":"Page",Paragraph:6,"6":"Paragraph",TopMargin:7,"7":"TopMargin", });
|
|
554
548
|
/**
|
|
555
549
|
*/
|
|
550
|
+
module.exports.StyleType = Object.freeze({ Paragraph:0,"0":"Paragraph",Character:1,"1":"Character",Numbering:2,"2":"Numbering",Table:3,"3":"Table",Unsupported:4,"4":"Unsupported", });
|
|
551
|
+
/**
|
|
552
|
+
*/
|
|
556
553
|
module.exports.TabValueType = Object.freeze({ Bar:0,"0":"Bar",Center:1,"1":"Center",Clear:2,"2":"Clear",Decimal:3,"3":"Decimal",End:4,"4":"End",Right:5,"5":"Right",Num:6,"6":"Num",Start:7,"7":"Start",Left:8,"8":"Left", });
|
|
557
554
|
/**
|
|
558
555
|
*/
|
|
556
|
+
module.exports.TableLayoutType = Object.freeze({ Fixed:0,"0":"Fixed",Autofit:1,"1":"Autofit", });
|
|
557
|
+
/**
|
|
558
|
+
*/
|
|
559
559
|
class AbstractNumbering {
|
|
560
560
|
|
|
561
561
|
static __wrap(ptr) {
|
|
Binary file
|
|
@@ -28,6 +28,14 @@ export function runfonts_hi_ansi_theme(a: number, b: number, c: number): number;
|
|
|
28
28
|
export function runfonts_cs_theme(a: number, b: number, c: number): number;
|
|
29
29
|
export function runfonts_east_asia_theme(a: number, b: number, c: number): number;
|
|
30
30
|
export function runfonts_hint(a: number, b: number, c: number): number;
|
|
31
|
+
export function __wbg_linespacing_free(a: number): void;
|
|
32
|
+
export function createLineSpacing(): number;
|
|
33
|
+
export function linespacing_line_rule(a: number, b: number): number;
|
|
34
|
+
export function linespacing_before(a: number, b: number): number;
|
|
35
|
+
export function linespacing_after(a: number, b: number): number;
|
|
36
|
+
export function linespacing_before_lines(a: number, b: number): number;
|
|
37
|
+
export function linespacing_after_lines(a: number, b: number): number;
|
|
38
|
+
export function linespacing_line(a: number, b: number): number;
|
|
31
39
|
export function __wbg_style_free(a: number): void;
|
|
32
40
|
export function createStyle(a: number, b: number, c: number): number;
|
|
33
41
|
export function style_name(a: number, b: number, c: number): number;
|
|
@@ -44,14 +52,6 @@ export function style_indent(a: number, b: number, c: number, d: number, e: numb
|
|
|
44
52
|
export function style_outline_lvl(a: number, b: number): number;
|
|
45
53
|
export function style_table_property(a: number, b: number): number;
|
|
46
54
|
export function style_table_cell_property(a: number, b: number): number;
|
|
47
|
-
export function __wbg_tablecellborder_free(a: number): void;
|
|
48
|
-
export function createTableCellBorder(a: number): number;
|
|
49
|
-
export function tablecellborder_size(a: number, b: number): number;
|
|
50
|
-
export function tablecellborder_color(a: number, b: number, c: number): number;
|
|
51
|
-
export function tablecellborder_border_type(a: number, b: number): number;
|
|
52
|
-
export function tablecellborder_get_size(a: number): number;
|
|
53
|
-
export function tablecellborder_get_color(a: number, b: number): void;
|
|
54
|
-
export function tablecellborder_get_border_type(a: number): number;
|
|
55
55
|
export function __wbg_tablerow_free(a: number): void;
|
|
56
56
|
export function createTableRow(): number;
|
|
57
57
|
export function tablerow_add_cell(a: number, b: number): number;
|
|
@@ -73,14 +73,14 @@ export function header_add_table(a: number, b: number): number;
|
|
|
73
73
|
export function __wbg_insert_free(a: number): void;
|
|
74
74
|
export function createInsert(a: number): number;
|
|
75
75
|
export function insert_date(a: number, b: number, c: number): number;
|
|
76
|
-
export function
|
|
77
|
-
export function
|
|
78
|
-
export function
|
|
79
|
-
export function
|
|
80
|
-
export function
|
|
81
|
-
export function
|
|
82
|
-
export function
|
|
83
|
-
export function
|
|
76
|
+
export function __wbg_tablecellborder_free(a: number): void;
|
|
77
|
+
export function createTableCellBorder(a: number): number;
|
|
78
|
+
export function tablecellborder_size(a: number, b: number): number;
|
|
79
|
+
export function tablecellborder_color(a: number, b: number, c: number): number;
|
|
80
|
+
export function tablecellborder_border_type(a: number, b: number): number;
|
|
81
|
+
export function tablecellborder_get_size(a: number): number;
|
|
82
|
+
export function tablecellborder_get_color(a: number, b: number): void;
|
|
83
|
+
export function tablecellborder_get_border_type(a: number): number;
|
|
84
84
|
export function __wbg_header_free(a: number): void;
|
|
85
85
|
export function insert_author(a: number, b: number, c: number): number;
|
|
86
86
|
export function __wbg_level_free(a: number): void;
|
|
@@ -21,17 +21,16 @@ export function readDocx(buf: Uint8Array): string;
|
|
|
21
21
|
*/
|
|
22
22
|
export function createRunFonts(): RunFonts;
|
|
23
23
|
/**
|
|
24
|
+
* @returns {LineSpacing}
|
|
25
|
+
*/
|
|
26
|
+
export function createLineSpacing(): LineSpacing;
|
|
27
|
+
/**
|
|
24
28
|
* @param {string} style_id
|
|
25
29
|
* @param {number} style_type
|
|
26
30
|
* @returns {Style}
|
|
27
31
|
*/
|
|
28
32
|
export function createStyle(style_id: string, style_type: number): Style;
|
|
29
33
|
/**
|
|
30
|
-
* @param {number} position
|
|
31
|
-
* @returns {TableCellBorder}
|
|
32
|
-
*/
|
|
33
|
-
export function createTableCellBorder(position: number): TableCellBorder;
|
|
34
|
-
/**
|
|
35
34
|
* @returns {TableRow}
|
|
36
35
|
*/
|
|
37
36
|
export function createTableRow(): TableRow;
|
|
@@ -54,9 +53,10 @@ export function createHeader(): Header;
|
|
|
54
53
|
*/
|
|
55
54
|
export function createInsert(run: Run): Insert;
|
|
56
55
|
/**
|
|
57
|
-
* @
|
|
56
|
+
* @param {number} position
|
|
57
|
+
* @returns {TableCellBorder}
|
|
58
58
|
*/
|
|
59
|
-
export function
|
|
59
|
+
export function createTableCellBorder(position: number): TableCellBorder;
|
|
60
60
|
/**
|
|
61
61
|
* @param {number} id
|
|
62
62
|
* @param {number} start
|
|
@@ -153,6 +153,12 @@ export enum HeightRule {
|
|
|
153
153
|
}
|
|
154
154
|
/**
|
|
155
155
|
*/
|
|
156
|
+
export enum HyperlinkType {
|
|
157
|
+
Anchor,
|
|
158
|
+
External,
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
*/
|
|
156
162
|
export enum LevelSuffixType {
|
|
157
163
|
Nothing,
|
|
158
164
|
Space,
|
|
@@ -160,16 +166,6 @@ export enum LevelSuffixType {
|
|
|
160
166
|
}
|
|
161
167
|
/**
|
|
162
168
|
*/
|
|
163
|
-
export enum TabLeaderType {
|
|
164
|
-
Dot,
|
|
165
|
-
Heavy,
|
|
166
|
-
Hyphen,
|
|
167
|
-
MiddleDot,
|
|
168
|
-
None,
|
|
169
|
-
Underscore,
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
*/
|
|
173
169
|
export enum DrawingPositionType {
|
|
174
170
|
Anchor,
|
|
175
171
|
Inline,
|
|
@@ -184,9 +180,13 @@ export enum PicAlign {
|
|
|
184
180
|
}
|
|
185
181
|
/**
|
|
186
182
|
*/
|
|
187
|
-
export enum
|
|
188
|
-
|
|
189
|
-
|
|
183
|
+
export enum TabLeaderType {
|
|
184
|
+
Dot,
|
|
185
|
+
Heavy,
|
|
186
|
+
Hyphen,
|
|
187
|
+
MiddleDot,
|
|
188
|
+
None,
|
|
189
|
+
Underscore,
|
|
190
190
|
}
|
|
191
191
|
/**
|
|
192
192
|
*/
|
|
@@ -197,29 +197,6 @@ export enum VMergeType {
|
|
|
197
197
|
}
|
|
198
198
|
/**
|
|
199
199
|
*/
|
|
200
|
-
export enum BreakType {
|
|
201
|
-
Page,
|
|
202
|
-
Column,
|
|
203
|
-
TextWrapping,
|
|
204
|
-
Unsupported,
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
*/
|
|
208
|
-
export enum FieldCharType {
|
|
209
|
-
Begin,
|
|
210
|
-
Separate,
|
|
211
|
-
End,
|
|
212
|
-
Unsupported,
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
*/
|
|
216
|
-
export enum LineSpacingType {
|
|
217
|
-
Auto,
|
|
218
|
-
AtLeast,
|
|
219
|
-
Exact,
|
|
220
|
-
}
|
|
221
|
-
/**
|
|
222
|
-
*/
|
|
223
200
|
export enum ShdType {
|
|
224
201
|
Nil,
|
|
225
202
|
Clear,
|
|
@@ -276,6 +253,21 @@ export enum TextDirectionType {
|
|
|
276
253
|
}
|
|
277
254
|
/**
|
|
278
255
|
*/
|
|
256
|
+
export enum BreakType {
|
|
257
|
+
Page,
|
|
258
|
+
Column,
|
|
259
|
+
TextWrapping,
|
|
260
|
+
Unsupported,
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
*/
|
|
264
|
+
export enum LineSpacingType {
|
|
265
|
+
Auto,
|
|
266
|
+
AtLeast,
|
|
267
|
+
Exact,
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
*/
|
|
279
271
|
export enum VertAlignType {
|
|
280
272
|
Baseline,
|
|
281
273
|
SuperScript,
|
|
@@ -384,21 +376,6 @@ export enum TableCellBorderPosition {
|
|
|
384
376
|
}
|
|
385
377
|
/**
|
|
386
378
|
*/
|
|
387
|
-
export enum StyleType {
|
|
388
|
-
Paragraph,
|
|
389
|
-
Character,
|
|
390
|
-
Numbering,
|
|
391
|
-
Table,
|
|
392
|
-
Unsupported,
|
|
393
|
-
}
|
|
394
|
-
/**
|
|
395
|
-
*/
|
|
396
|
-
export enum TableLayoutType {
|
|
397
|
-
Fixed,
|
|
398
|
-
Autofit,
|
|
399
|
-
}
|
|
400
|
-
/**
|
|
401
|
-
*/
|
|
402
379
|
export enum WidthType {
|
|
403
380
|
Dxa,
|
|
404
381
|
Auto,
|
|
@@ -416,6 +393,14 @@ export enum DocGridType {
|
|
|
416
393
|
}
|
|
417
394
|
/**
|
|
418
395
|
*/
|
|
396
|
+
export enum FieldCharType {
|
|
397
|
+
Begin,
|
|
398
|
+
Separate,
|
|
399
|
+
End,
|
|
400
|
+
Unsupported,
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
*/
|
|
419
404
|
export enum RelativeFromHType {
|
|
420
405
|
/**
|
|
421
406
|
* Specifies that the horizontal positioning shall be
|
|
@@ -476,6 +461,15 @@ export enum RelativeFromVType {
|
|
|
476
461
|
}
|
|
477
462
|
/**
|
|
478
463
|
*/
|
|
464
|
+
export enum StyleType {
|
|
465
|
+
Paragraph,
|
|
466
|
+
Character,
|
|
467
|
+
Numbering,
|
|
468
|
+
Table,
|
|
469
|
+
Unsupported,
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
*/
|
|
479
473
|
export enum TabValueType {
|
|
480
474
|
Bar,
|
|
481
475
|
Center,
|
|
@@ -489,6 +483,12 @@ export enum TabValueType {
|
|
|
489
483
|
}
|
|
490
484
|
/**
|
|
491
485
|
*/
|
|
486
|
+
export enum TableLayoutType {
|
|
487
|
+
Fixed,
|
|
488
|
+
Autofit,
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
*/
|
|
492
492
|
export class AbstractNumbering {
|
|
493
493
|
free(): void;
|
|
494
494
|
/**
|
|
@@ -173,6 +173,14 @@ export function createRunFonts() {
|
|
|
173
173
|
return RunFonts.__wrap(ret);
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
+
/**
|
|
177
|
+
* @returns {LineSpacing}
|
|
178
|
+
*/
|
|
179
|
+
export function createLineSpacing() {
|
|
180
|
+
var ret = wasm.createLineSpacing();
|
|
181
|
+
return LineSpacing.__wrap(ret);
|
|
182
|
+
}
|
|
183
|
+
|
|
176
184
|
/**
|
|
177
185
|
* @param {string} style_id
|
|
178
186
|
* @param {number} style_type
|
|
@@ -188,15 +196,6 @@ export function createStyle(style_id, style_type) {
|
|
|
188
196
|
function isLikeNone(x) {
|
|
189
197
|
return x === undefined || x === null;
|
|
190
198
|
}
|
|
191
|
-
/**
|
|
192
|
-
* @param {number} position
|
|
193
|
-
* @returns {TableCellBorder}
|
|
194
|
-
*/
|
|
195
|
-
export function createTableCellBorder(position) {
|
|
196
|
-
var ret = wasm.createTableCellBorder(position);
|
|
197
|
-
return TableCellBorder.__wrap(ret);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
199
|
/**
|
|
201
200
|
* @returns {TableRow}
|
|
202
201
|
*/
|
|
@@ -246,11 +245,12 @@ export function createInsert(run) {
|
|
|
246
245
|
}
|
|
247
246
|
|
|
248
247
|
/**
|
|
249
|
-
* @
|
|
248
|
+
* @param {number} position
|
|
249
|
+
* @returns {TableCellBorder}
|
|
250
250
|
*/
|
|
251
|
-
export function
|
|
252
|
-
var ret = wasm.
|
|
253
|
-
return
|
|
251
|
+
export function createTableCellBorder(position) {
|
|
252
|
+
var ret = wasm.createTableCellBorder(position);
|
|
253
|
+
return TableCellBorder.__wrap(ret);
|
|
254
254
|
}
|
|
255
255
|
|
|
256
256
|
/**
|
|
@@ -429,10 +429,10 @@ export const AlignmentType = Object.freeze({ Both:0,"0":"Both",Center:1,"1":"Cen
|
|
|
429
429
|
export const HeightRule = Object.freeze({ Auto:0,"0":"Auto",AtLeast:1,"1":"AtLeast",Exact:2,"2":"Exact", });
|
|
430
430
|
/**
|
|
431
431
|
*/
|
|
432
|
-
export const
|
|
432
|
+
export const HyperlinkType = Object.freeze({ Anchor:0,"0":"Anchor",External:1,"1":"External", });
|
|
433
433
|
/**
|
|
434
434
|
*/
|
|
435
|
-
export const
|
|
435
|
+
export const LevelSuffixType = Object.freeze({ Nothing:0,"0":"Nothing",Space:1,"1":"Space",Tab:2,"2":"Tab", });
|
|
436
436
|
/**
|
|
437
437
|
*/
|
|
438
438
|
export const DrawingPositionType = Object.freeze({ Anchor:0,"0":"Anchor",Inline:1,"1":"Inline", });
|
|
@@ -441,25 +441,22 @@ export const DrawingPositionType = Object.freeze({ Anchor:0,"0":"Anchor",Inline:
|
|
|
441
441
|
export const PicAlign = Object.freeze({ Left:0,"0":"Left",Right:1,"1":"Right",Bottom:2,"2":"Bottom",Top:3,"3":"Top", });
|
|
442
442
|
/**
|
|
443
443
|
*/
|
|
444
|
-
export const
|
|
444
|
+
export const TabLeaderType = Object.freeze({ Dot:0,"0":"Dot",Heavy:1,"1":"Heavy",Hyphen:2,"2":"Hyphen",MiddleDot:3,"3":"MiddleDot",None:4,"4":"None",Underscore:5,"5":"Underscore", });
|
|
445
445
|
/**
|
|
446
446
|
*/
|
|
447
447
|
export const VMergeType = Object.freeze({ Continue:0,"0":"Continue",Restart:1,"1":"Restart",Unsupported:2,"2":"Unsupported", });
|
|
448
448
|
/**
|
|
449
449
|
*/
|
|
450
|
-
export const
|
|
451
|
-
/**
|
|
452
|
-
*/
|
|
453
|
-
export const FieldCharType = Object.freeze({ Begin:0,"0":"Begin",Separate:1,"1":"Separate",End:2,"2":"End",Unsupported:3,"3":"Unsupported", });
|
|
450
|
+
export const ShdType = Object.freeze({ Nil:0,"0":"Nil",Clear:1,"1":"Clear",Solid:2,"2":"Solid",HorzStripe:3,"3":"HorzStripe",VertStripe:4,"4":"VertStripe",ReverseDiagStripe:5,"5":"ReverseDiagStripe",DiagStripe:6,"6":"DiagStripe",HorzCross:7,"7":"HorzCross",DiagCross:8,"8":"DiagCross",ThinHorzStripe:9,"9":"ThinHorzStripe",ThinVertStripe:10,"10":"ThinVertStripe",ThinReverseDiagStripe:11,"11":"ThinReverseDiagStripe",ThinDiagStripe:12,"12":"ThinDiagStripe",ThinHorzCross:13,"13":"ThinHorzCross",ThinDiagCross:14,"14":"ThinDiagCross",Pct5:15,"15":"Pct5",Pct10:16,"16":"Pct10",Pct12:17,"17":"Pct12",Pct15:18,"18":"Pct15",Pct20:19,"19":"Pct20",Pct25:20,"20":"Pct25",Pct30:21,"21":"Pct30",Pct35:22,"22":"Pct35",Pct37:23,"23":"Pct37",Pct40:24,"24":"Pct40",Pct45:25,"25":"Pct45",Pct50:26,"26":"Pct50",Pct55:27,"27":"Pct55",Pct60:28,"28":"Pct60",Pct62:29,"29":"Pct62",Pct65:30,"30":"Pct65",Pct70:31,"31":"Pct70",Pct75:32,"32":"Pct75",Pct80:33,"33":"Pct80",Pct85:34,"34":"Pct85",Pct87:35,"35":"Pct87",Pct90:36,"36":"Pct90",Pct95:37,"37":"Pct95", });
|
|
454
451
|
/**
|
|
455
452
|
*/
|
|
456
|
-
export const
|
|
453
|
+
export const TextDirectionType = Object.freeze({ Lr:0,"0":"Lr",LrV:1,"1":"LrV",Rl:2,"2":"Rl",RlV:3,"3":"RlV",Tb:4,"4":"Tb",TbV:5,"5":"TbV",TbRlV:6,"6":"TbRlV",TbRl:7,"7":"TbRl",BtLr:8,"8":"BtLr",LrTbV:9,"9":"LrTbV", });
|
|
457
454
|
/**
|
|
458
455
|
*/
|
|
459
|
-
export const
|
|
456
|
+
export const BreakType = Object.freeze({ Page:0,"0":"Page",Column:1,"1":"Column",TextWrapping:2,"2":"TextWrapping",Unsupported:3,"3":"Unsupported", });
|
|
460
457
|
/**
|
|
461
458
|
*/
|
|
462
|
-
export const
|
|
459
|
+
export const LineSpacingType = Object.freeze({ Auto:0,"0":"Auto",AtLeast:1,"1":"AtLeast",Exact:2,"2":"Exact", });
|
|
463
460
|
/**
|
|
464
461
|
*/
|
|
465
462
|
export const VertAlignType = Object.freeze({ Baseline:0,"0":"Baseline",SuperScript:1,"1":"SuperScript",SubScript:2,"2":"SubScript",Unsupported:3,"3":"Unsupported", });
|
|
@@ -492,18 +489,15 @@ export const TableBorderPosition = Object.freeze({ Left:0,"0":"Left",Right:1,"1"
|
|
|
492
489
|
export const TableCellBorderPosition = Object.freeze({ Left:0,"0":"Left",Right:1,"1":"Right",Top:2,"2":"Top",Bottom:3,"3":"Bottom",InsideH:4,"4":"InsideH",InsideV:5,"5":"InsideV",Tl2br:6,"6":"Tl2br",Tr2bl:7,"7":"Tr2bl", });
|
|
493
490
|
/**
|
|
494
491
|
*/
|
|
495
|
-
export const StyleType = Object.freeze({ Paragraph:0,"0":"Paragraph",Character:1,"1":"Character",Numbering:2,"2":"Numbering",Table:3,"3":"Table",Unsupported:4,"4":"Unsupported", });
|
|
496
|
-
/**
|
|
497
|
-
*/
|
|
498
|
-
export const TableLayoutType = Object.freeze({ Fixed:0,"0":"Fixed",Autofit:1,"1":"Autofit", });
|
|
499
|
-
/**
|
|
500
|
-
*/
|
|
501
492
|
export const WidthType = Object.freeze({ Dxa:0,"0":"Dxa",Auto:1,"1":"Auto",Pct:2,"2":"Pct",Nil:3,"3":"Nil",Unsupported:4,"4":"Unsupported", });
|
|
502
493
|
/**
|
|
503
494
|
*/
|
|
504
495
|
export const DocGridType = Object.freeze({ Default:0,"0":"Default",Lines:1,"1":"Lines",LinesAndChars:2,"2":"LinesAndChars",SnapToChars:3,"3":"SnapToChars", });
|
|
505
496
|
/**
|
|
506
497
|
*/
|
|
498
|
+
export const FieldCharType = Object.freeze({ Begin:0,"0":"Begin",Separate:1,"1":"Separate",End:2,"2":"End",Unsupported:3,"3":"Unsupported", });
|
|
499
|
+
/**
|
|
500
|
+
*/
|
|
507
501
|
export const RelativeFromHType = Object.freeze({
|
|
508
502
|
/**
|
|
509
503
|
* Specifies that the horizontal positioning shall be
|
|
@@ -554,9 +548,15 @@ RightMargin:7,"7":"RightMargin", });
|
|
|
554
548
|
export const RelativeFromVType = Object.freeze({ BottomMargin:0,"0":"BottomMargin",InsideMargin:1,"1":"InsideMargin",Line:2,"2":"Line",Margin:3,"3":"Margin",OutsizeMargin:4,"4":"OutsizeMargin",Page:5,"5":"Page",Paragraph:6,"6":"Paragraph",TopMargin:7,"7":"TopMargin", });
|
|
555
549
|
/**
|
|
556
550
|
*/
|
|
551
|
+
export const StyleType = Object.freeze({ Paragraph:0,"0":"Paragraph",Character:1,"1":"Character",Numbering:2,"2":"Numbering",Table:3,"3":"Table",Unsupported:4,"4":"Unsupported", });
|
|
552
|
+
/**
|
|
553
|
+
*/
|
|
557
554
|
export const TabValueType = Object.freeze({ Bar:0,"0":"Bar",Center:1,"1":"Center",Clear:2,"2":"Clear",Decimal:3,"3":"Decimal",End:4,"4":"End",Right:5,"5":"Right",Num:6,"6":"Num",Start:7,"7":"Start",Left:8,"8":"Left", });
|
|
558
555
|
/**
|
|
559
556
|
*/
|
|
557
|
+
export const TableLayoutType = Object.freeze({ Fixed:0,"0":"Fixed",Autofit:1,"1":"Autofit", });
|
|
558
|
+
/**
|
|
559
|
+
*/
|
|
560
560
|
export class AbstractNumbering {
|
|
561
561
|
|
|
562
562
|
static __wrap(ptr) {
|
|
Binary file
|
|
@@ -28,6 +28,14 @@ export function runfonts_hi_ansi_theme(a: number, b: number, c: number): number;
|
|
|
28
28
|
export function runfonts_cs_theme(a: number, b: number, c: number): number;
|
|
29
29
|
export function runfonts_east_asia_theme(a: number, b: number, c: number): number;
|
|
30
30
|
export function runfonts_hint(a: number, b: number, c: number): number;
|
|
31
|
+
export function __wbg_linespacing_free(a: number): void;
|
|
32
|
+
export function createLineSpacing(): number;
|
|
33
|
+
export function linespacing_line_rule(a: number, b: number): number;
|
|
34
|
+
export function linespacing_before(a: number, b: number): number;
|
|
35
|
+
export function linespacing_after(a: number, b: number): number;
|
|
36
|
+
export function linespacing_before_lines(a: number, b: number): number;
|
|
37
|
+
export function linespacing_after_lines(a: number, b: number): number;
|
|
38
|
+
export function linespacing_line(a: number, b: number): number;
|
|
31
39
|
export function __wbg_style_free(a: number): void;
|
|
32
40
|
export function createStyle(a: number, b: number, c: number): number;
|
|
33
41
|
export function style_name(a: number, b: number, c: number): number;
|
|
@@ -44,14 +52,6 @@ export function style_indent(a: number, b: number, c: number, d: number, e: numb
|
|
|
44
52
|
export function style_outline_lvl(a: number, b: number): number;
|
|
45
53
|
export function style_table_property(a: number, b: number): number;
|
|
46
54
|
export function style_table_cell_property(a: number, b: number): number;
|
|
47
|
-
export function __wbg_tablecellborder_free(a: number): void;
|
|
48
|
-
export function createTableCellBorder(a: number): number;
|
|
49
|
-
export function tablecellborder_size(a: number, b: number): number;
|
|
50
|
-
export function tablecellborder_color(a: number, b: number, c: number): number;
|
|
51
|
-
export function tablecellborder_border_type(a: number, b: number): number;
|
|
52
|
-
export function tablecellborder_get_size(a: number): number;
|
|
53
|
-
export function tablecellborder_get_color(a: number, b: number): void;
|
|
54
|
-
export function tablecellborder_get_border_type(a: number): number;
|
|
55
55
|
export function __wbg_tablerow_free(a: number): void;
|
|
56
56
|
export function createTableRow(): number;
|
|
57
57
|
export function tablerow_add_cell(a: number, b: number): number;
|
|
@@ -73,14 +73,14 @@ export function header_add_table(a: number, b: number): number;
|
|
|
73
73
|
export function __wbg_insert_free(a: number): void;
|
|
74
74
|
export function createInsert(a: number): number;
|
|
75
75
|
export function insert_date(a: number, b: number, c: number): number;
|
|
76
|
-
export function
|
|
77
|
-
export function
|
|
78
|
-
export function
|
|
79
|
-
export function
|
|
80
|
-
export function
|
|
81
|
-
export function
|
|
82
|
-
export function
|
|
83
|
-
export function
|
|
76
|
+
export function __wbg_tablecellborder_free(a: number): void;
|
|
77
|
+
export function createTableCellBorder(a: number): number;
|
|
78
|
+
export function tablecellborder_size(a: number, b: number): number;
|
|
79
|
+
export function tablecellborder_color(a: number, b: number, c: number): number;
|
|
80
|
+
export function tablecellborder_border_type(a: number, b: number): number;
|
|
81
|
+
export function tablecellborder_get_size(a: number): number;
|
|
82
|
+
export function tablecellborder_get_color(a: number, b: number): void;
|
|
83
|
+
export function tablecellborder_get_border_type(a: number): number;
|
|
84
84
|
export function __wbg_header_free(a: number): void;
|
|
85
85
|
export function insert_author(a: number, b: number, c: number): number;
|
|
86
86
|
export function __wbg_level_free(a: number): void;
|
package/js/json/paragraph.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docx-wasm",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.276-rc0",
|
|
4
4
|
"main": "dist/node/index.js",
|
|
5
5
|
"browser": "dist/web/index.js",
|
|
6
6
|
"author": "bokuweb <bokuweb12@gmail.com>",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"cpy-cli": "4.1.0",
|
|
32
32
|
"file-saver": "2.0.5",
|
|
33
33
|
"html-webpack-plugin": "4.5.2",
|
|
34
|
-
"jest": "28.1.
|
|
34
|
+
"jest": "28.1.3",
|
|
35
35
|
"npm-run-all": "4.1.5",
|
|
36
36
|
"text-encoding": "0.7.0",
|
|
37
37
|
"ts-loader": "9.3.1",
|