@twip/web 0.0.0 → 0.1.0-alpha.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/LICENSE +202 -0
- package/dist/AccessibleNode.d.ts +51 -0
- package/dist/AccessibleNode.mjs +177 -0
- package/dist/Alignment.d.ts +38 -0
- package/dist/Alignment.mjs +90 -0
- package/dist/BorderEdges.d.ts +50 -0
- package/dist/BorderEdges.mjs +114 -0
- package/dist/BorderStyle.d.ts +27 -0
- package/dist/BorderStyle.mjs +81 -0
- package/dist/Bytes.d.ts +19 -0
- package/dist/Bytes.mjs +76 -0
- package/dist/CaretPosition.d.ts +34 -0
- package/dist/CaretPosition.mjs +148 -0
- package/dist/CellAlignment.d.ts +25 -0
- package/dist/CellAlignment.mjs +75 -0
- package/dist/CellShift.d.ts +30 -0
- package/dist/CellShift.mjs +78 -0
- package/dist/Clipboard.d.ts +22 -0
- package/dist/Clipboard.mjs +90 -0
- package/dist/ColumnSide.d.ts +24 -0
- package/dist/ColumnSide.mjs +72 -0
- package/dist/ControlKind.d.ts +28 -0
- package/dist/ControlKind.mjs +84 -0
- package/dist/ControlLock.d.ts +42 -0
- package/dist/ControlLock.mjs +96 -0
- package/dist/DocumentStatus.d.ts +34 -0
- package/dist/DocumentStatus.mjs +148 -0
- package/dist/Editor.d.ts +773 -0
- package/dist/Editor.mjs +2269 -0
- package/dist/EditorMode.d.ts +34 -0
- package/dist/EditorMode.mjs +84 -0
- package/dist/Element.d.ts +57 -0
- package/dist/Element.mjs +201 -0
- package/dist/ElementKind.d.ts +28 -0
- package/dist/ElementKind.mjs +78 -0
- package/dist/ElementList.d.ts +20 -0
- package/dist/ElementList.mjs +71 -0
- package/dist/ElementText.d.ts +34 -0
- package/dist/ElementText.mjs +84 -0
- package/dist/Event.d.ts +45 -0
- package/dist/Event.mjs +159 -0
- package/dist/EventKind.d.ts +39 -0
- package/dist/EventKind.mjs +93 -0
- package/dist/EventList.d.ts +20 -0
- package/dist/EventList.mjs +71 -0
- package/dist/Fonts.d.ts +29 -0
- package/dist/Fonts.mjs +107 -0
- package/dist/Highlight.d.ts +41 -0
- package/dist/Highlight.mjs +117 -0
- package/dist/MarginPreset.d.ts +38 -0
- package/dist/MarginPreset.mjs +90 -0
- package/dist/MarkSeverity.d.ts +25 -0
- package/dist/MarkSeverity.mjs +75 -0
- package/dist/Modifiers.d.ts +34 -0
- package/dist/Modifiers.mjs +148 -0
- package/dist/OpenError.d.ts +30 -0
- package/dist/OpenError.mjs +78 -0
- package/dist/Orientation.d.ts +30 -0
- package/dist/Orientation.mjs +78 -0
- package/dist/PageNumber.d.ts +34 -0
- package/dist/PageNumber.mjs +84 -0
- package/dist/PaperSize.d.ts +50 -0
- package/dist/PaperSize.mjs +108 -0
- package/dist/ParagraphBorders.d.ts +34 -0
- package/dist/ParagraphBorders.mjs +84 -0
- package/dist/PictureWrap.d.ts +34 -0
- package/dist/PictureWrap.mjs +90 -0
- package/dist/PointerKind.d.ts +23 -0
- package/dist/PointerKind.mjs +75 -0
- package/dist/Rect.d.ts +34 -0
- package/dist/Rect.mjs +148 -0
- package/dist/Request.d.ts +55 -0
- package/dist/Request.mjs +207 -0
- package/dist/RequestKind.d.ts +45 -0
- package/dist/RequestKind.mjs +105 -0
- package/dist/RequestList.d.ts +20 -0
- package/dist/RequestList.mjs +71 -0
- package/dist/RowHeightRule.d.ts +34 -0
- package/dist/RowHeightRule.mjs +84 -0
- package/dist/RowSide.d.ts +24 -0
- package/dist/RowSide.mjs +72 -0
- package/dist/SaveError.d.ts +24 -0
- package/dist/SaveError.mjs +72 -0
- package/dist/SelectionInfo.d.ts +39 -0
- package/dist/SelectionInfo.mjs +166 -0
- package/dist/SelectionKind.d.ts +37 -0
- package/dist/SelectionKind.mjs +93 -0
- package/dist/THIRD-PARTY-NOTICES.md +4475 -0
- package/dist/TableAlignment.d.ts +25 -0
- package/dist/TableAlignment.mjs +75 -0
- package/dist/TableSelection.d.ts +38 -0
- package/dist/TableSelection.mjs +90 -0
- package/dist/TableWidthUnit.d.ts +31 -0
- package/dist/TableWidthUnit.mjs +81 -0
- package/dist/TextUnit.d.ts +25 -0
- package/dist/TextUnit.mjs +75 -0
- package/dist/diplomat-runtime.d.ts +15 -0
- package/dist/diplomat-runtime.mjs +786 -0
- package/dist/diplomat-wasm.mjs +18 -0
- package/dist/gpu.d.ts +15 -0
- package/dist/gpu.mjs +42 -0
- package/dist/index.d.ts +98 -0
- package/dist/index.mjs +101 -0
- package/dist/twip-wasm.js +2 -0
- package/dist/twip_wasm.wasm +0 -0
- package/package.json +18 -4
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// generated by diplomat-tool
|
|
2
|
+
import wasm from "./diplomat-wasm.mjs";
|
|
3
|
+
import * as diplomatRuntime from "./diplomat-runtime.mjs";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Page orientation.
|
|
9
|
+
*/
|
|
10
|
+
export class Orientation {
|
|
11
|
+
#value = undefined;
|
|
12
|
+
|
|
13
|
+
static #values = new Map([
|
|
14
|
+
["Portrait", 0],
|
|
15
|
+
["Landscape", 1]
|
|
16
|
+
]);
|
|
17
|
+
|
|
18
|
+
static getAllEntries() {
|
|
19
|
+
return Orientation.#values.entries();
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
#internalConstructor(value) {
|
|
23
|
+
if (arguments.length > 1 && arguments[0] === diplomatRuntime.internalConstructor) {
|
|
24
|
+
// We pass in two internalConstructor arguments to create *new*
|
|
25
|
+
// instances of this type, otherwise the enums are treated as singletons.
|
|
26
|
+
if (arguments[1] === diplomatRuntime.internalConstructor ) {
|
|
27
|
+
this.#value = arguments[2];
|
|
28
|
+
return this;
|
|
29
|
+
}
|
|
30
|
+
return Orientation.#objectValues[arguments[1]];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (value instanceof Orientation) {
|
|
34
|
+
return value;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
let intVal = Orientation.#values.get(value);
|
|
38
|
+
|
|
39
|
+
// Nullish check, checks for null or undefined
|
|
40
|
+
if (intVal != null) {
|
|
41
|
+
return Orientation.#objectValues[intVal];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
throw TypeError(value + " is not a Orientation and does not correspond to any of its enumerator values.");
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
static fromValue(value) {
|
|
49
|
+
return new Orientation(value);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
get value(){
|
|
53
|
+
return [...Orientation.#values.keys()][this.#value];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** @internal */
|
|
57
|
+
get ffiValue(){
|
|
58
|
+
return this.#value;
|
|
59
|
+
}
|
|
60
|
+
static #objectValues = [
|
|
61
|
+
new Orientation(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 0),
|
|
62
|
+
new Orientation(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 1),
|
|
63
|
+
];
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Taller than wide.
|
|
67
|
+
*/
|
|
68
|
+
static Portrait = Orientation.#objectValues[0];
|
|
69
|
+
/**
|
|
70
|
+
* Wider than tall.
|
|
71
|
+
*/
|
|
72
|
+
static Landscape = Orientation.#objectValues[1];
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
constructor(value) {
|
|
76
|
+
return this.#internalConstructor(...arguments)
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// generated by diplomat-tool
|
|
2
|
+
import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A page number to insert.
|
|
8
|
+
*/
|
|
9
|
+
export class PageNumber {
|
|
10
|
+
|
|
11
|
+
/** @internal */
|
|
12
|
+
static fromValue(value: PageNumber | string): PageNumber;
|
|
13
|
+
|
|
14
|
+
get value(): string;
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
get ffiValue(): number;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The current page's number.
|
|
21
|
+
*/
|
|
22
|
+
static Page : PageNumber;
|
|
23
|
+
/**
|
|
24
|
+
* The number of pages.
|
|
25
|
+
*/
|
|
26
|
+
static PageCount : PageNumber;
|
|
27
|
+
/**
|
|
28
|
+
* "Page X of Y".
|
|
29
|
+
*/
|
|
30
|
+
static PageOfCount : PageNumber;
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
constructor(value: PageNumber | string );
|
|
34
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// generated by diplomat-tool
|
|
2
|
+
import wasm from "./diplomat-wasm.mjs";
|
|
3
|
+
import * as diplomatRuntime from "./diplomat-runtime.mjs";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* A page number to insert.
|
|
9
|
+
*/
|
|
10
|
+
export class PageNumber {
|
|
11
|
+
#value = undefined;
|
|
12
|
+
|
|
13
|
+
static #values = new Map([
|
|
14
|
+
["Page", 0],
|
|
15
|
+
["PageCount", 1],
|
|
16
|
+
["PageOfCount", 2]
|
|
17
|
+
]);
|
|
18
|
+
|
|
19
|
+
static getAllEntries() {
|
|
20
|
+
return PageNumber.#values.entries();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
#internalConstructor(value) {
|
|
24
|
+
if (arguments.length > 1 && arguments[0] === diplomatRuntime.internalConstructor) {
|
|
25
|
+
// We pass in two internalConstructor arguments to create *new*
|
|
26
|
+
// instances of this type, otherwise the enums are treated as singletons.
|
|
27
|
+
if (arguments[1] === diplomatRuntime.internalConstructor ) {
|
|
28
|
+
this.#value = arguments[2];
|
|
29
|
+
return this;
|
|
30
|
+
}
|
|
31
|
+
return PageNumber.#objectValues[arguments[1]];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (value instanceof PageNumber) {
|
|
35
|
+
return value;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
let intVal = PageNumber.#values.get(value);
|
|
39
|
+
|
|
40
|
+
// Nullish check, checks for null or undefined
|
|
41
|
+
if (intVal != null) {
|
|
42
|
+
return PageNumber.#objectValues[intVal];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
throw TypeError(value + " is not a PageNumber and does not correspond to any of its enumerator values.");
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
static fromValue(value) {
|
|
50
|
+
return new PageNumber(value);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
get value(){
|
|
54
|
+
return [...PageNumber.#values.keys()][this.#value];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
get ffiValue(){
|
|
59
|
+
return this.#value;
|
|
60
|
+
}
|
|
61
|
+
static #objectValues = [
|
|
62
|
+
new PageNumber(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 0),
|
|
63
|
+
new PageNumber(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 1),
|
|
64
|
+
new PageNumber(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 2),
|
|
65
|
+
];
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The current page's number.
|
|
69
|
+
*/
|
|
70
|
+
static Page = PageNumber.#objectValues[0];
|
|
71
|
+
/**
|
|
72
|
+
* The number of pages.
|
|
73
|
+
*/
|
|
74
|
+
static PageCount = PageNumber.#objectValues[1];
|
|
75
|
+
/**
|
|
76
|
+
* "Page X of Y".
|
|
77
|
+
*/
|
|
78
|
+
static PageOfCount = PageNumber.#objectValues[2];
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
constructor(value) {
|
|
82
|
+
return this.#internalConstructor(...arguments)
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// generated by diplomat-tool
|
|
2
|
+
import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Paper sizes.
|
|
8
|
+
*/
|
|
9
|
+
export class PaperSize {
|
|
10
|
+
|
|
11
|
+
/** @internal */
|
|
12
|
+
static fromValue(value: PaperSize | string): PaperSize;
|
|
13
|
+
|
|
14
|
+
get value(): string;
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
get ffiValue(): number;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* 8.5 x 11 in.
|
|
21
|
+
*/
|
|
22
|
+
static Letter : PaperSize;
|
|
23
|
+
/**
|
|
24
|
+
* 8.5 x 14 in.
|
|
25
|
+
*/
|
|
26
|
+
static Legal : PaperSize;
|
|
27
|
+
/**
|
|
28
|
+
* 7.25 x 10.5 in.
|
|
29
|
+
*/
|
|
30
|
+
static Executive : PaperSize;
|
|
31
|
+
/**
|
|
32
|
+
* 11 x 17 in.
|
|
33
|
+
*/
|
|
34
|
+
static Tabloid : PaperSize;
|
|
35
|
+
/**
|
|
36
|
+
* 297 x 420 mm.
|
|
37
|
+
*/
|
|
38
|
+
static A3 : PaperSize;
|
|
39
|
+
/**
|
|
40
|
+
* 210 x 297 mm.
|
|
41
|
+
*/
|
|
42
|
+
static A4 : PaperSize;
|
|
43
|
+
/**
|
|
44
|
+
* 148 x 210 mm.
|
|
45
|
+
*/
|
|
46
|
+
static A5 : PaperSize;
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
constructor(value: PaperSize | string );
|
|
50
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
// generated by diplomat-tool
|
|
2
|
+
import wasm from "./diplomat-wasm.mjs";
|
|
3
|
+
import * as diplomatRuntime from "./diplomat-runtime.mjs";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Paper sizes.
|
|
9
|
+
*/
|
|
10
|
+
export class PaperSize {
|
|
11
|
+
#value = undefined;
|
|
12
|
+
|
|
13
|
+
static #values = new Map([
|
|
14
|
+
["Letter", 0],
|
|
15
|
+
["Legal", 1],
|
|
16
|
+
["Executive", 2],
|
|
17
|
+
["Tabloid", 3],
|
|
18
|
+
["A3", 4],
|
|
19
|
+
["A4", 5],
|
|
20
|
+
["A5", 6]
|
|
21
|
+
]);
|
|
22
|
+
|
|
23
|
+
static getAllEntries() {
|
|
24
|
+
return PaperSize.#values.entries();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
#internalConstructor(value) {
|
|
28
|
+
if (arguments.length > 1 && arguments[0] === diplomatRuntime.internalConstructor) {
|
|
29
|
+
// We pass in two internalConstructor arguments to create *new*
|
|
30
|
+
// instances of this type, otherwise the enums are treated as singletons.
|
|
31
|
+
if (arguments[1] === diplomatRuntime.internalConstructor ) {
|
|
32
|
+
this.#value = arguments[2];
|
|
33
|
+
return this;
|
|
34
|
+
}
|
|
35
|
+
return PaperSize.#objectValues[arguments[1]];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (value instanceof PaperSize) {
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
let intVal = PaperSize.#values.get(value);
|
|
43
|
+
|
|
44
|
+
// Nullish check, checks for null or undefined
|
|
45
|
+
if (intVal != null) {
|
|
46
|
+
return PaperSize.#objectValues[intVal];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
throw TypeError(value + " is not a PaperSize and does not correspond to any of its enumerator values.");
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
static fromValue(value) {
|
|
54
|
+
return new PaperSize(value);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
get value(){
|
|
58
|
+
return [...PaperSize.#values.keys()][this.#value];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
get ffiValue(){
|
|
63
|
+
return this.#value;
|
|
64
|
+
}
|
|
65
|
+
static #objectValues = [
|
|
66
|
+
new PaperSize(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 0),
|
|
67
|
+
new PaperSize(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 1),
|
|
68
|
+
new PaperSize(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 2),
|
|
69
|
+
new PaperSize(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 3),
|
|
70
|
+
new PaperSize(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 4),
|
|
71
|
+
new PaperSize(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 5),
|
|
72
|
+
new PaperSize(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 6),
|
|
73
|
+
];
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* 8.5 x 11 in.
|
|
77
|
+
*/
|
|
78
|
+
static Letter = PaperSize.#objectValues[0];
|
|
79
|
+
/**
|
|
80
|
+
* 8.5 x 14 in.
|
|
81
|
+
*/
|
|
82
|
+
static Legal = PaperSize.#objectValues[1];
|
|
83
|
+
/**
|
|
84
|
+
* 7.25 x 10.5 in.
|
|
85
|
+
*/
|
|
86
|
+
static Executive = PaperSize.#objectValues[2];
|
|
87
|
+
/**
|
|
88
|
+
* 11 x 17 in.
|
|
89
|
+
*/
|
|
90
|
+
static Tabloid = PaperSize.#objectValues[3];
|
|
91
|
+
/**
|
|
92
|
+
* 297 x 420 mm.
|
|
93
|
+
*/
|
|
94
|
+
static A3 = PaperSize.#objectValues[4];
|
|
95
|
+
/**
|
|
96
|
+
* 210 x 297 mm.
|
|
97
|
+
*/
|
|
98
|
+
static A4 = PaperSize.#objectValues[5];
|
|
99
|
+
/**
|
|
100
|
+
* 148 x 210 mm.
|
|
101
|
+
*/
|
|
102
|
+
static A5 = PaperSize.#objectValues[6];
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
constructor(value) {
|
|
106
|
+
return this.#internalConstructor(...arguments)
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// generated by diplomat-tool
|
|
2
|
+
import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Borders around paragraphs.
|
|
8
|
+
*/
|
|
9
|
+
export class ParagraphBorders {
|
|
10
|
+
|
|
11
|
+
/** @internal */
|
|
12
|
+
static fromValue(value: ParagraphBorders | string): ParagraphBorders;
|
|
13
|
+
|
|
14
|
+
get value(): string;
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
get ffiValue(): number;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* A box around the paragraphs.
|
|
21
|
+
*/
|
|
22
|
+
static Box : ParagraphBorders;
|
|
23
|
+
/**
|
|
24
|
+
* A line under the paragraphs.
|
|
25
|
+
*/
|
|
26
|
+
static Bottom : ParagraphBorders;
|
|
27
|
+
/**
|
|
28
|
+
* No borders.
|
|
29
|
+
*/
|
|
30
|
+
static None : ParagraphBorders;
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
constructor(value: ParagraphBorders | string );
|
|
34
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// generated by diplomat-tool
|
|
2
|
+
import wasm from "./diplomat-wasm.mjs";
|
|
3
|
+
import * as diplomatRuntime from "./diplomat-runtime.mjs";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Borders around paragraphs.
|
|
9
|
+
*/
|
|
10
|
+
export class ParagraphBorders {
|
|
11
|
+
#value = undefined;
|
|
12
|
+
|
|
13
|
+
static #values = new Map([
|
|
14
|
+
["Box", 0],
|
|
15
|
+
["Bottom", 1],
|
|
16
|
+
["None", 2]
|
|
17
|
+
]);
|
|
18
|
+
|
|
19
|
+
static getAllEntries() {
|
|
20
|
+
return ParagraphBorders.#values.entries();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
#internalConstructor(value) {
|
|
24
|
+
if (arguments.length > 1 && arguments[0] === diplomatRuntime.internalConstructor) {
|
|
25
|
+
// We pass in two internalConstructor arguments to create *new*
|
|
26
|
+
// instances of this type, otherwise the enums are treated as singletons.
|
|
27
|
+
if (arguments[1] === diplomatRuntime.internalConstructor ) {
|
|
28
|
+
this.#value = arguments[2];
|
|
29
|
+
return this;
|
|
30
|
+
}
|
|
31
|
+
return ParagraphBorders.#objectValues[arguments[1]];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (value instanceof ParagraphBorders) {
|
|
35
|
+
return value;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
let intVal = ParagraphBorders.#values.get(value);
|
|
39
|
+
|
|
40
|
+
// Nullish check, checks for null or undefined
|
|
41
|
+
if (intVal != null) {
|
|
42
|
+
return ParagraphBorders.#objectValues[intVal];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
throw TypeError(value + " is not a ParagraphBorders and does not correspond to any of its enumerator values.");
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
static fromValue(value) {
|
|
50
|
+
return new ParagraphBorders(value);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
get value(){
|
|
54
|
+
return [...ParagraphBorders.#values.keys()][this.#value];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
get ffiValue(){
|
|
59
|
+
return this.#value;
|
|
60
|
+
}
|
|
61
|
+
static #objectValues = [
|
|
62
|
+
new ParagraphBorders(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 0),
|
|
63
|
+
new ParagraphBorders(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 1),
|
|
64
|
+
new ParagraphBorders(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 2),
|
|
65
|
+
];
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* A box around the paragraphs.
|
|
69
|
+
*/
|
|
70
|
+
static Box = ParagraphBorders.#objectValues[0];
|
|
71
|
+
/**
|
|
72
|
+
* A line under the paragraphs.
|
|
73
|
+
*/
|
|
74
|
+
static Bottom = ParagraphBorders.#objectValues[1];
|
|
75
|
+
/**
|
|
76
|
+
* No borders.
|
|
77
|
+
*/
|
|
78
|
+
static None = ParagraphBorders.#objectValues[2];
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
constructor(value) {
|
|
82
|
+
return this.#internalConstructor(...arguments)
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// generated by diplomat-tool
|
|
2
|
+
import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* How text wraps around a floating picture.
|
|
8
|
+
*/
|
|
9
|
+
export class PictureWrap {
|
|
10
|
+
|
|
11
|
+
/** @internal */
|
|
12
|
+
static fromValue(value: PictureWrap | string): PictureWrap;
|
|
13
|
+
|
|
14
|
+
get value(): string;
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
get ffiValue(): number;
|
|
18
|
+
|
|
19
|
+
static Square : PictureWrap;
|
|
20
|
+
static Tight : PictureWrap;
|
|
21
|
+
static Through : PictureWrap;
|
|
22
|
+
static TopAndBottom : PictureWrap;
|
|
23
|
+
/**
|
|
24
|
+
* The picture is behind the text.
|
|
25
|
+
*/
|
|
26
|
+
static Behind : PictureWrap;
|
|
27
|
+
/**
|
|
28
|
+
* The picture is in front of the text.
|
|
29
|
+
*/
|
|
30
|
+
static InFront : PictureWrap;
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
constructor(value: PictureWrap | string );
|
|
34
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// generated by diplomat-tool
|
|
2
|
+
import wasm from "./diplomat-wasm.mjs";
|
|
3
|
+
import * as diplomatRuntime from "./diplomat-runtime.mjs";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* How text wraps around a floating picture.
|
|
9
|
+
*/
|
|
10
|
+
export class PictureWrap {
|
|
11
|
+
#value = undefined;
|
|
12
|
+
|
|
13
|
+
static #values = new Map([
|
|
14
|
+
["Square", 0],
|
|
15
|
+
["Tight", 1],
|
|
16
|
+
["Through", 2],
|
|
17
|
+
["TopAndBottom", 3],
|
|
18
|
+
["Behind", 4],
|
|
19
|
+
["InFront", 5]
|
|
20
|
+
]);
|
|
21
|
+
|
|
22
|
+
static getAllEntries() {
|
|
23
|
+
return PictureWrap.#values.entries();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
#internalConstructor(value) {
|
|
27
|
+
if (arguments.length > 1 && arguments[0] === diplomatRuntime.internalConstructor) {
|
|
28
|
+
// We pass in two internalConstructor arguments to create *new*
|
|
29
|
+
// instances of this type, otherwise the enums are treated as singletons.
|
|
30
|
+
if (arguments[1] === diplomatRuntime.internalConstructor ) {
|
|
31
|
+
this.#value = arguments[2];
|
|
32
|
+
return this;
|
|
33
|
+
}
|
|
34
|
+
return PictureWrap.#objectValues[arguments[1]];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (value instanceof PictureWrap) {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
let intVal = PictureWrap.#values.get(value);
|
|
42
|
+
|
|
43
|
+
// Nullish check, checks for null or undefined
|
|
44
|
+
if (intVal != null) {
|
|
45
|
+
return PictureWrap.#objectValues[intVal];
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
throw TypeError(value + " is not a PictureWrap and does not correspond to any of its enumerator values.");
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** @internal */
|
|
52
|
+
static fromValue(value) {
|
|
53
|
+
return new PictureWrap(value);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
get value(){
|
|
57
|
+
return [...PictureWrap.#values.keys()][this.#value];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** @internal */
|
|
61
|
+
get ffiValue(){
|
|
62
|
+
return this.#value;
|
|
63
|
+
}
|
|
64
|
+
static #objectValues = [
|
|
65
|
+
new PictureWrap(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 0),
|
|
66
|
+
new PictureWrap(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 1),
|
|
67
|
+
new PictureWrap(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 2),
|
|
68
|
+
new PictureWrap(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 3),
|
|
69
|
+
new PictureWrap(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 4),
|
|
70
|
+
new PictureWrap(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 5),
|
|
71
|
+
];
|
|
72
|
+
|
|
73
|
+
static Square = PictureWrap.#objectValues[0];
|
|
74
|
+
static Tight = PictureWrap.#objectValues[1];
|
|
75
|
+
static Through = PictureWrap.#objectValues[2];
|
|
76
|
+
static TopAndBottom = PictureWrap.#objectValues[3];
|
|
77
|
+
/**
|
|
78
|
+
* The picture is behind the text.
|
|
79
|
+
*/
|
|
80
|
+
static Behind = PictureWrap.#objectValues[4];
|
|
81
|
+
/**
|
|
82
|
+
* The picture is in front of the text.
|
|
83
|
+
*/
|
|
84
|
+
static InFront = PictureWrap.#objectValues[5];
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
constructor(value) {
|
|
88
|
+
return this.#internalConstructor(...arguments)
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// generated by diplomat-tool
|
|
2
|
+
import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export class PointerKind {
|
|
7
|
+
|
|
8
|
+
/** @internal */
|
|
9
|
+
static fromValue(value: PointerKind | string): PointerKind;
|
|
10
|
+
|
|
11
|
+
get value(): string;
|
|
12
|
+
|
|
13
|
+
/** @internal */
|
|
14
|
+
get ffiValue(): number;
|
|
15
|
+
|
|
16
|
+
static Down : PointerKind;
|
|
17
|
+
static Move : PointerKind;
|
|
18
|
+
static Up : PointerKind;
|
|
19
|
+
static Cancel : PointerKind;
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
constructor(value: PointerKind | string );
|
|
23
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// generated by diplomat-tool
|
|
2
|
+
import wasm from "./diplomat-wasm.mjs";
|
|
3
|
+
import * as diplomatRuntime from "./diplomat-runtime.mjs";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export class PointerKind {
|
|
8
|
+
#value = undefined;
|
|
9
|
+
|
|
10
|
+
static #values = new Map([
|
|
11
|
+
["Down", 0],
|
|
12
|
+
["Move", 1],
|
|
13
|
+
["Up", 2],
|
|
14
|
+
["Cancel", 3]
|
|
15
|
+
]);
|
|
16
|
+
|
|
17
|
+
static getAllEntries() {
|
|
18
|
+
return PointerKind.#values.entries();
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
#internalConstructor(value) {
|
|
22
|
+
if (arguments.length > 1 && arguments[0] === diplomatRuntime.internalConstructor) {
|
|
23
|
+
// We pass in two internalConstructor arguments to create *new*
|
|
24
|
+
// instances of this type, otherwise the enums are treated as singletons.
|
|
25
|
+
if (arguments[1] === diplomatRuntime.internalConstructor ) {
|
|
26
|
+
this.#value = arguments[2];
|
|
27
|
+
return this;
|
|
28
|
+
}
|
|
29
|
+
return PointerKind.#objectValues[arguments[1]];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (value instanceof PointerKind) {
|
|
33
|
+
return value;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
let intVal = PointerKind.#values.get(value);
|
|
37
|
+
|
|
38
|
+
// Nullish check, checks for null or undefined
|
|
39
|
+
if (intVal != null) {
|
|
40
|
+
return PointerKind.#objectValues[intVal];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
throw TypeError(value + " is not a PointerKind and does not correspond to any of its enumerator values.");
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
static fromValue(value) {
|
|
48
|
+
return new PointerKind(value);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
get value(){
|
|
52
|
+
return [...PointerKind.#values.keys()][this.#value];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** @internal */
|
|
56
|
+
get ffiValue(){
|
|
57
|
+
return this.#value;
|
|
58
|
+
}
|
|
59
|
+
static #objectValues = [
|
|
60
|
+
new PointerKind(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 0),
|
|
61
|
+
new PointerKind(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 1),
|
|
62
|
+
new PointerKind(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 2),
|
|
63
|
+
new PointerKind(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 3),
|
|
64
|
+
];
|
|
65
|
+
|
|
66
|
+
static Down = PointerKind.#objectValues[0];
|
|
67
|
+
static Move = PointerKind.#objectValues[1];
|
|
68
|
+
static Up = PointerKind.#objectValues[2];
|
|
69
|
+
static Cancel = PointerKind.#objectValues[3];
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
constructor(value) {
|
|
73
|
+
return this.#internalConstructor(...arguments)
|
|
74
|
+
}
|
|
75
|
+
}
|