@mlightcad/mtext-parser 1.1.6 → 1.1.7
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/README.md +10 -1
- package/dist/parser.cjs.js +2 -2
- package/dist/parser.cjs.js.map +1 -1
- package/dist/parser.es.js +140 -116
- package/dist/parser.es.js.map +1 -1
- package/dist/parser.umd.js +2 -2
- package/dist/parser.umd.js.map +1 -1
- package/dist/types/parser.d.ts +44 -3
- package/package.json +1 -1
package/dist/parser.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
2
|
-
const
|
|
1
|
+
var _ = /* @__PURE__ */ ((s) => (s[s.NONE = 0] = "NONE", s[s.WORD = 1] = "WORD", s[s.STACK = 2] = "STACK", s[s.SPACE = 3] = "SPACE", s[s.NBSP = 4] = "NBSP", s[s.TABULATOR = 5] = "TABULATOR", s[s.NEW_PARAGRAPH = 6] = "NEW_PARAGRAPH", s[s.NEW_COLUMN = 7] = "NEW_COLUMN", s[s.WRAP_AT_DIMLINE = 8] = "WRAP_AT_DIMLINE", s[s.PROPERTIES_CHANGED = 9] = "PROPERTIES_CHANGED", s))(_ || {}), m = /* @__PURE__ */ ((s) => (s[s.BOTTOM = 0] = "BOTTOM", s[s.MIDDLE = 1] = "MIDDLE", s[s.TOP = 2] = "TOP", s))(m || {}), S = /* @__PURE__ */ ((s) => (s[s.DEFAULT = 0] = "DEFAULT", s[s.LEFT = 1] = "LEFT", s[s.RIGHT = 2] = "RIGHT", s[s.CENTER = 3] = "CENTER", s[s.JUSTIFIED = 4] = "JUSTIFIED", s[s.DISTRIBUTED = 5] = "DISTRIBUTED", s))(S || {}), E = /* @__PURE__ */ ((s) => (s[s.NONE = 0] = "NONE", s[s.UNDERLINE = 1] = "UNDERLINE", s[s.OVERLINE = 2] = "OVERLINE", s[s.STRIKE_THROUGH = 4] = "STRIKE_THROUGH", s))(E || {});
|
|
2
|
+
const F = {
|
|
3
3
|
c: "Ø",
|
|
4
4
|
d: "°",
|
|
5
5
|
p: "±"
|
|
6
|
-
},
|
|
6
|
+
}, R = {
|
|
7
7
|
l: 1,
|
|
8
8
|
r: 2,
|
|
9
9
|
c: 3,
|
|
@@ -11,11 +11,11 @@ const E = {
|
|
|
11
11
|
d: 5
|
|
12
12
|
/* DISTRIBUTED */
|
|
13
13
|
};
|
|
14
|
-
function
|
|
14
|
+
function O(s) {
|
|
15
15
|
const [t, e, r] = s;
|
|
16
16
|
return r << 16 | e << 8 | t;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function y(s) {
|
|
19
19
|
const t = s & 255, e = s >> 8 & 255, r = s >> 16 & 255;
|
|
20
20
|
return [t, e, r];
|
|
21
21
|
}
|
|
@@ -25,14 +25,14 @@ function N(s) {
|
|
|
25
25
|
function I(s) {
|
|
26
26
|
return s.replace(/\\P/g, "").replace(/\\~/g, "").includes("\\");
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function x(s, t = !1) {
|
|
29
29
|
const e = /* @__PURE__ */ new Set(), r = /\\[fF](.*?)[;|]/g;
|
|
30
30
|
return [...s.matchAll(r)].forEach((a) => {
|
|
31
|
-
let
|
|
32
|
-
t && (
|
|
31
|
+
let l = a[1].toLowerCase();
|
|
32
|
+
t && (l = l.replace(/\.(ttf|otf|woff|shx)$/, "")), e.add(l);
|
|
33
33
|
}), e;
|
|
34
34
|
}
|
|
35
|
-
class
|
|
35
|
+
class v {
|
|
36
36
|
/**
|
|
37
37
|
* Creates a new ContextStack with an initial context.
|
|
38
38
|
* @param initial The initial MTextContext to use as the base of the stack.
|
|
@@ -89,12 +89,12 @@ class D {
|
|
|
89
89
|
* Creates a new MTextParser instance
|
|
90
90
|
* @param content - The MText content to parse
|
|
91
91
|
* @param ctx - Optional initial MText context
|
|
92
|
-
* @param
|
|
92
|
+
* @param options - Parser options
|
|
93
93
|
*/
|
|
94
|
-
constructor(t, e, r =
|
|
94
|
+
constructor(t, e, r = {}) {
|
|
95
95
|
this.continueStroke = !1, this.inStackContext = !1, this.scanner = new g(t);
|
|
96
|
-
const a = e ?? new
|
|
97
|
-
this.ctxStack = new
|
|
96
|
+
const a = e ?? new k();
|
|
97
|
+
this.ctxStack = new v(a), this.yieldPropertyCommands = r.yieldPropertyCommands ?? !1, this.resetParagraphParameters = r.resetParagraphParameters ?? !1;
|
|
98
98
|
}
|
|
99
99
|
/**
|
|
100
100
|
* Decode multi-byte character from hex code
|
|
@@ -109,8 +109,8 @@ class D {
|
|
|
109
109
|
]), a = new TextDecoder("gbk").decode(e);
|
|
110
110
|
if (a !== "▯")
|
|
111
111
|
return a;
|
|
112
|
-
const
|
|
113
|
-
return
|
|
112
|
+
const i = new TextDecoder("big5").decode(e);
|
|
113
|
+
return i !== "▯" ? i : "▯";
|
|
114
114
|
} catch {
|
|
115
115
|
return "▯";
|
|
116
116
|
}
|
|
@@ -134,31 +134,31 @@ class D {
|
|
|
134
134
|
parseStacking() {
|
|
135
135
|
const t = new g(this.extractExpression(!0));
|
|
136
136
|
let e = "", r = "", a = "";
|
|
137
|
-
const
|
|
138
|
-
let
|
|
139
|
-
return
|
|
140
|
-
},
|
|
141
|
-
let
|
|
137
|
+
const l = () => {
|
|
138
|
+
let c = t.peek(), n = !1;
|
|
139
|
+
return c.charCodeAt(0) < 32 && (c = " "), c === "\\" && (n = !0, t.consume(1), c = t.peek()), t.consume(1), [c, n];
|
|
140
|
+
}, i = () => {
|
|
141
|
+
let c = "";
|
|
142
142
|
for (; t.hasData; ) {
|
|
143
|
-
const [
|
|
144
|
-
if (!
|
|
145
|
-
return [
|
|
146
|
-
|
|
143
|
+
const [n, p] = l();
|
|
144
|
+
if (!p && (n === "/" || n === "#" || n === "^"))
|
|
145
|
+
return [c, n];
|
|
146
|
+
c += n;
|
|
147
147
|
}
|
|
148
|
-
return [
|
|
149
|
-
}, u = (
|
|
150
|
-
let
|
|
148
|
+
return [c, ""];
|
|
149
|
+
}, u = (c) => {
|
|
150
|
+
let n = "", p = c;
|
|
151
151
|
for (; t.hasData; ) {
|
|
152
|
-
const [
|
|
153
|
-
if (!(
|
|
154
|
-
if (
|
|
152
|
+
const [h, o] = l();
|
|
153
|
+
if (!(p && h === " ")) {
|
|
154
|
+
if (p = !1, !o && h === ";")
|
|
155
155
|
break;
|
|
156
|
-
|
|
156
|
+
n += h;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
return
|
|
159
|
+
return n;
|
|
160
160
|
};
|
|
161
|
-
return [e, a] =
|
|
161
|
+
return [e, a] = i(), a && (r = u(a === "^")), e === "" && r.includes("I/") ? [2, [" ", " ", "/"]] : a === "^" ? [2, [e, r, "^"]] : [2, [e, r, a]];
|
|
162
162
|
}
|
|
163
163
|
/**
|
|
164
164
|
* Parse MText properties
|
|
@@ -392,11 +392,11 @@ class D {
|
|
|
392
392
|
extractExpression(t = !1) {
|
|
393
393
|
const e = this.scanner.find(";", t);
|
|
394
394
|
if (e < 0) {
|
|
395
|
-
const
|
|
396
|
-
return this.scanner.consume(
|
|
395
|
+
const i = this.scanner.tail;
|
|
396
|
+
return this.scanner.consume(i.length), i;
|
|
397
397
|
}
|
|
398
|
-
const a = this.scanner.peek(e - this.scanner.currentIndex - 1) === "\\",
|
|
399
|
-
return this.scanner.consume(
|
|
398
|
+
const a = this.scanner.peek(e - this.scanner.currentIndex - 1) === "\\", l = this.scanner.tail.slice(0, e - this.scanner.currentIndex + (a ? 1 : 0));
|
|
399
|
+
return this.scanner.consume(l.length + 1), l;
|
|
400
400
|
}
|
|
401
401
|
/**
|
|
402
402
|
* Parse font properties
|
|
@@ -406,13 +406,13 @@ class D {
|
|
|
406
406
|
const e = this.extractExpression().split("|");
|
|
407
407
|
if (e.length > 0 && e[0]) {
|
|
408
408
|
const r = e[0];
|
|
409
|
-
let a = "Regular",
|
|
410
|
-
for (const
|
|
411
|
-
|
|
409
|
+
let a = "Regular", l = 400;
|
|
410
|
+
for (const i of e.slice(1))
|
|
411
|
+
i.startsWith("b1") ? l = 700 : i === "i" || i.startsWith("i1") ? a = "Italic" : (i === "i0" || i.startsWith("i0")) && (a = "Regular");
|
|
412
412
|
t.fontFace = {
|
|
413
413
|
family: r,
|
|
414
414
|
style: a,
|
|
415
|
-
weight:
|
|
415
|
+
weight: l
|
|
416
416
|
};
|
|
417
417
|
}
|
|
418
418
|
}
|
|
@@ -423,46 +423,46 @@ class D {
|
|
|
423
423
|
*/
|
|
424
424
|
parseParagraphProperties(t) {
|
|
425
425
|
const e = new g(this.extractExpression());
|
|
426
|
-
let r = t.paragraph.indent, a = t.paragraph.left,
|
|
427
|
-
const
|
|
428
|
-
const
|
|
429
|
-
if (
|
|
430
|
-
const
|
|
431
|
-
for (e.consume(
|
|
426
|
+
let r = t.paragraph.indent, a = t.paragraph.left, l = t.paragraph.right, i = t.paragraph.align, u = [];
|
|
427
|
+
const c = () => {
|
|
428
|
+
const n = e.tail.match(/^[+-]?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?/);
|
|
429
|
+
if (n) {
|
|
430
|
+
const p = parseFloat(n[0]);
|
|
431
|
+
for (e.consume(n[0].length); e.peek() === ","; )
|
|
432
432
|
e.consume(1);
|
|
433
|
-
return
|
|
433
|
+
return p;
|
|
434
434
|
}
|
|
435
435
|
return 0;
|
|
436
436
|
};
|
|
437
437
|
for (; e.hasData; )
|
|
438
438
|
switch (e.get()) {
|
|
439
439
|
case "i":
|
|
440
|
-
r =
|
|
440
|
+
r = c();
|
|
441
441
|
break;
|
|
442
442
|
case "l":
|
|
443
|
-
a =
|
|
443
|
+
a = c();
|
|
444
444
|
break;
|
|
445
445
|
case "r":
|
|
446
|
-
|
|
446
|
+
l = c();
|
|
447
447
|
break;
|
|
448
448
|
case "x":
|
|
449
449
|
break;
|
|
450
450
|
case "q": {
|
|
451
|
-
const
|
|
452
|
-
for (
|
|
451
|
+
const p = e.get();
|
|
452
|
+
for (i = R[p] || 0; e.peek() === ","; )
|
|
453
453
|
e.consume(1);
|
|
454
454
|
break;
|
|
455
455
|
}
|
|
456
456
|
case "t":
|
|
457
457
|
for (u = []; e.hasData; ) {
|
|
458
|
-
const
|
|
459
|
-
if (
|
|
458
|
+
const p = e.peek();
|
|
459
|
+
if (p === "r" || p === "c") {
|
|
460
460
|
e.consume(1);
|
|
461
|
-
const
|
|
462
|
-
u.push(
|
|
461
|
+
const h = c();
|
|
462
|
+
u.push(p + h.toString());
|
|
463
463
|
} else {
|
|
464
|
-
const
|
|
465
|
-
isNaN(
|
|
464
|
+
const h = c();
|
|
465
|
+
isNaN(h) ? e.consume(1) : u.push(h);
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
468
|
break;
|
|
@@ -470,8 +470,8 @@ class D {
|
|
|
470
470
|
t.paragraph = {
|
|
471
471
|
indent: r,
|
|
472
472
|
left: a,
|
|
473
|
-
right:
|
|
474
|
-
align:
|
|
473
|
+
right: l,
|
|
474
|
+
align: i,
|
|
475
475
|
tab_stops: u
|
|
476
476
|
};
|
|
477
477
|
}
|
|
@@ -487,12 +487,24 @@ class D {
|
|
|
487
487
|
*/
|
|
488
488
|
*parse() {
|
|
489
489
|
let r = null;
|
|
490
|
-
|
|
491
|
-
|
|
490
|
+
function a(i) {
|
|
491
|
+
const u = { ...i.paragraph };
|
|
492
|
+
i.paragraph = {
|
|
493
|
+
indent: 0,
|
|
494
|
+
left: 0,
|
|
495
|
+
right: 0,
|
|
496
|
+
align: 0,
|
|
497
|
+
tab_stops: []
|
|
498
|
+
};
|
|
499
|
+
const c = {};
|
|
500
|
+
return u.indent !== 0 && (c.indent = 0), u.left !== 0 && (c.left = 0), u.right !== 0 && (c.right = 0), u.align !== 0 && (c.align = 0), JSON.stringify(u.tab_stops) !== JSON.stringify([]) && (c.tab_stops = []), c;
|
|
501
|
+
}
|
|
502
|
+
const l = () => {
|
|
503
|
+
var u;
|
|
492
504
|
let i = "";
|
|
493
505
|
for (; this.scanner.hasData; ) {
|
|
494
|
-
let
|
|
495
|
-
const
|
|
506
|
+
let c = !1, n = this.scanner.peek();
|
|
507
|
+
const p = this.scanner.currentIndex;
|
|
496
508
|
if (n.charCodeAt(0) < 32) {
|
|
497
509
|
if (this.scanner.consume(1), n === " ")
|
|
498
510
|
return [5, null];
|
|
@@ -503,13 +515,13 @@ class D {
|
|
|
503
515
|
}
|
|
504
516
|
if (n === "\\")
|
|
505
517
|
if ("\\{}".includes(this.scanner.peek(1)))
|
|
506
|
-
|
|
518
|
+
c = !0, this.scanner.consume(1), n = this.scanner.peek();
|
|
507
519
|
else {
|
|
508
520
|
if (i)
|
|
509
521
|
return [1, i];
|
|
510
522
|
this.scanner.consume(1);
|
|
511
|
-
const
|
|
512
|
-
switch (
|
|
523
|
+
const h = this.scanner.get();
|
|
524
|
+
switch (h) {
|
|
513
525
|
case "~":
|
|
514
526
|
return [4, null];
|
|
515
527
|
case "P":
|
|
@@ -520,44 +532,44 @@ class D {
|
|
|
520
532
|
return [8, null];
|
|
521
533
|
case "S": {
|
|
522
534
|
this.inStackContext = !0;
|
|
523
|
-
const
|
|
524
|
-
return this.inStackContext = !1,
|
|
535
|
+
const o = this.parseStacking();
|
|
536
|
+
return this.inStackContext = !1, o;
|
|
525
537
|
}
|
|
526
538
|
case "m":
|
|
527
539
|
case "M":
|
|
528
540
|
if (this.scanner.peek() === "+") {
|
|
529
541
|
this.scanner.consume(1);
|
|
530
|
-
const
|
|
531
|
-
if (
|
|
542
|
+
const o = (u = this.scanner.tail.match(/^[0-9A-Fa-f]{4}/)) == null ? void 0 : u[0];
|
|
543
|
+
if (o) {
|
|
532
544
|
this.scanner.consume(4);
|
|
533
|
-
const
|
|
534
|
-
return i ? [1, i] : [1,
|
|
545
|
+
const b = this.decodeMultiByteChar(o);
|
|
546
|
+
return i ? [1, i] : [1, b];
|
|
535
547
|
}
|
|
536
548
|
this.scanner.consume(-1);
|
|
537
549
|
}
|
|
538
550
|
i += "\\M";
|
|
539
551
|
continue;
|
|
540
552
|
default:
|
|
541
|
-
if (
|
|
553
|
+
if (h)
|
|
542
554
|
try {
|
|
543
|
-
const
|
|
544
|
-
if (this.yieldPropertyCommands &&
|
|
545
|
-
return [9,
|
|
555
|
+
const o = this.parseProperties(h);
|
|
556
|
+
if (this.yieldPropertyCommands && o)
|
|
557
|
+
return [9, o];
|
|
546
558
|
continue;
|
|
547
559
|
} catch {
|
|
548
|
-
const
|
|
549
|
-
|
|
560
|
+
const o = this.scanner.tail.slice(
|
|
561
|
+
p,
|
|
550
562
|
this.scanner.currentIndex
|
|
551
563
|
);
|
|
552
|
-
i +=
|
|
564
|
+
i += o;
|
|
553
565
|
}
|
|
554
566
|
}
|
|
555
567
|
continue;
|
|
556
568
|
}
|
|
557
569
|
if (n === "%" && this.scanner.peek(1) === "%") {
|
|
558
|
-
const
|
|
559
|
-
if (
|
|
560
|
-
this.scanner.consume(3), i +=
|
|
570
|
+
const h = this.scanner.peek(2).toLowerCase(), o = F[h];
|
|
571
|
+
if (o) {
|
|
572
|
+
this.scanner.consume(3), i += o;
|
|
561
573
|
continue;
|
|
562
574
|
} else {
|
|
563
575
|
this.scanner.consume(3);
|
|
@@ -566,7 +578,7 @@ class D {
|
|
|
566
578
|
}
|
|
567
579
|
if (n === " ")
|
|
568
580
|
return i ? (this.scanner.consume(1), r = 3, [1, i]) : (this.scanner.consume(1), [3, null]);
|
|
569
|
-
if (!
|
|
581
|
+
if (!c) {
|
|
570
582
|
if (n === "{") {
|
|
571
583
|
if (i)
|
|
572
584
|
return [1, i];
|
|
@@ -576,13 +588,13 @@ class D {
|
|
|
576
588
|
if (i)
|
|
577
589
|
return [1, i];
|
|
578
590
|
if (this.scanner.consume(1), this.yieldPropertyCommands) {
|
|
579
|
-
const
|
|
591
|
+
const h = this.ctxStack.current;
|
|
580
592
|
this.popCtx();
|
|
581
|
-
const
|
|
582
|
-
if (Object.keys(
|
|
593
|
+
const o = this.getPropertyChanges(h, this.ctxStack.current);
|
|
594
|
+
if (Object.keys(o).length > 0)
|
|
583
595
|
return [
|
|
584
596
|
9,
|
|
585
|
-
{ command: void 0, changes:
|
|
597
|
+
{ command: void 0, changes: o, depth: this.ctxStack.depth }
|
|
586
598
|
];
|
|
587
599
|
} else
|
|
588
600
|
this.popCtx();
|
|
@@ -590,17 +602,17 @@ class D {
|
|
|
590
602
|
}
|
|
591
603
|
}
|
|
592
604
|
if (!this.inStackContext && n === "^") {
|
|
593
|
-
const
|
|
594
|
-
if (
|
|
595
|
-
const
|
|
596
|
-
if (this.scanner.consume(2),
|
|
605
|
+
const h = this.scanner.peek(1);
|
|
606
|
+
if (h) {
|
|
607
|
+
const o = h.charCodeAt(0);
|
|
608
|
+
if (this.scanner.consume(2), o === 32)
|
|
597
609
|
i += "^";
|
|
598
610
|
else {
|
|
599
|
-
if (
|
|
611
|
+
if (o === 73)
|
|
600
612
|
return i ? [1, i] : [5, null];
|
|
601
|
-
if (
|
|
613
|
+
if (o === 74)
|
|
602
614
|
return i ? [1, i] : [6, null];
|
|
603
|
-
if (
|
|
615
|
+
if (o === 77)
|
|
604
616
|
continue;
|
|
605
617
|
i += "▯";
|
|
606
618
|
}
|
|
@@ -612,10 +624,22 @@ class D {
|
|
|
612
624
|
return i ? [1, i] : [0, null];
|
|
613
625
|
};
|
|
614
626
|
for (; ; ) {
|
|
615
|
-
const [i,
|
|
616
|
-
if (i)
|
|
617
|
-
yield new
|
|
618
|
-
|
|
627
|
+
const [i, u] = l.call(this);
|
|
628
|
+
if (i) {
|
|
629
|
+
if (yield new f(i, this.ctxStack.current.copy(), u), i === 6 && this.resetParagraphParameters) {
|
|
630
|
+
const c = this.ctxStack.current, n = a(c);
|
|
631
|
+
this.yieldPropertyCommands && Object.keys(n).length > 0 && (yield new f(
|
|
632
|
+
9,
|
|
633
|
+
c.copy(),
|
|
634
|
+
{
|
|
635
|
+
command: void 0,
|
|
636
|
+
changes: { paragraph: n },
|
|
637
|
+
depth: this.ctxStack.depth
|
|
638
|
+
}
|
|
639
|
+
));
|
|
640
|
+
}
|
|
641
|
+
r && (yield new f(r, this.ctxStack.current.copy(), null), r = null);
|
|
642
|
+
} else
|
|
619
643
|
break;
|
|
620
644
|
}
|
|
621
645
|
}
|
|
@@ -720,7 +744,7 @@ class g {
|
|
|
720
744
|
return t;
|
|
721
745
|
}
|
|
722
746
|
}
|
|
723
|
-
class
|
|
747
|
+
class d {
|
|
724
748
|
// Store as 0xRRGGBB or null
|
|
725
749
|
/**
|
|
726
750
|
* Create a new MTextColor instance.
|
|
@@ -796,7 +820,7 @@ class f {
|
|
|
796
820
|
* @returns A new MTextColor instance with the same color state.
|
|
797
821
|
*/
|
|
798
822
|
copy() {
|
|
799
|
-
const t = new
|
|
823
|
+
const t = new d();
|
|
800
824
|
return t._aci = this._aci, t._rgbValue = this._rgbValue, t;
|
|
801
825
|
}
|
|
802
826
|
/**
|
|
@@ -815,9 +839,9 @@ class f {
|
|
|
815
839
|
return this._aci === t._aci && this._rgbValue === t._rgbValue;
|
|
816
840
|
}
|
|
817
841
|
}
|
|
818
|
-
class
|
|
842
|
+
class k {
|
|
819
843
|
constructor() {
|
|
820
|
-
this._stroke = 0, this.continueStroke = !1, this.color = new
|
|
844
|
+
this._stroke = 0, this.continueStroke = !1, this.color = new d(), this.align = 0, this.fontFace = { family: "", style: "Regular", weight: 400 }, this._capHeight = { value: 1, isRelative: !1 }, this._widthFactor = { value: 1, isRelative: !1 }, this._charTrackingFactor = { value: 1, isRelative: !1 }, this.oblique = 0, this.paragraph = {
|
|
821
845
|
indent: 0,
|
|
822
846
|
left: 0,
|
|
823
847
|
right: 0,
|
|
@@ -957,11 +981,11 @@ class d {
|
|
|
957
981
|
* @returns A new context with the same properties
|
|
958
982
|
*/
|
|
959
983
|
copy() {
|
|
960
|
-
const t = new
|
|
984
|
+
const t = new k();
|
|
961
985
|
return t._stroke = this._stroke, t.continueStroke = this.continueStroke, t.color = this.color.copy(), t.align = this.align, t.fontFace = { ...this.fontFace }, t._capHeight = { ...this._capHeight }, t._widthFactor = { ...this._widthFactor }, t._charTrackingFactor = { ...this._charTrackingFactor }, t.oblique = this.oblique, t.paragraph = { ...this.paragraph }, t;
|
|
962
986
|
}
|
|
963
987
|
}
|
|
964
|
-
class
|
|
988
|
+
class f {
|
|
965
989
|
/**
|
|
966
990
|
* Create a new MText token
|
|
967
991
|
* @param type - The token type
|
|
@@ -973,19 +997,19 @@ class k {
|
|
|
973
997
|
}
|
|
974
998
|
}
|
|
975
999
|
export {
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
1000
|
+
d as MTextColor,
|
|
1001
|
+
k as MTextContext,
|
|
1002
|
+
m as MTextLineAlignment,
|
|
1003
|
+
S as MTextParagraphAlignment,
|
|
980
1004
|
D as MTextParser,
|
|
981
|
-
|
|
982
|
-
|
|
1005
|
+
E as MTextStroke,
|
|
1006
|
+
f as MTextToken,
|
|
983
1007
|
g as TextScanner,
|
|
984
|
-
|
|
1008
|
+
_ as TokenType,
|
|
985
1009
|
N as escapeDxfLineEndings,
|
|
986
|
-
|
|
1010
|
+
x as getFonts,
|
|
987
1011
|
I as hasInlineFormattingCodes,
|
|
988
|
-
|
|
989
|
-
|
|
1012
|
+
y as int2rgb,
|
|
1013
|
+
O as rgb2int
|
|
990
1014
|
};
|
|
991
1015
|
//# sourceMappingURL=parser.es.js.map
|