@sepveneto/free-dom 0.13.0 → 0.13.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/dist/index.css +1 -1
- package/dist/index.d.ts +26 -42
- package/dist/index.js +134 -140
- package/dist/index.mjs +134 -140
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2418,9 +2418,9 @@ var require_decode = __commonJS({
|
|
|
2418
2418
|
}
|
|
2419
2419
|
});
|
|
2420
2420
|
|
|
2421
|
-
// ../../node_modules/.pnpm/@babel+parser@7.26.
|
|
2421
|
+
// ../../node_modules/.pnpm/@babel+parser@7.26.2/node_modules/@babel/parser/lib/index.js
|
|
2422
2422
|
var require_lib = __commonJS({
|
|
2423
|
-
"../../node_modules/.pnpm/@babel+parser@7.26.
|
|
2423
|
+
"../../node_modules/.pnpm/@babel+parser@7.26.2/node_modules/@babel/parser/lib/index.js"(exports) {
|
|
2424
2424
|
"use strict";
|
|
2425
2425
|
Object.defineProperty(exports, "__esModule", {
|
|
2426
2426
|
value: true
|
|
@@ -3643,6 +3643,9 @@ var require_lib = __commonJS({
|
|
|
3643
3643
|
name: createToken("name", {
|
|
3644
3644
|
startsExpr
|
|
3645
3645
|
}),
|
|
3646
|
+
placeholder: createToken("%%", {
|
|
3647
|
+
startsExpr: true
|
|
3648
|
+
}),
|
|
3646
3649
|
string: createToken("string", {
|
|
3647
3650
|
startsExpr
|
|
3648
3651
|
}),
|
|
@@ -3669,22 +3672,19 @@ var require_lib = __commonJS({
|
|
|
3669
3672
|
jsxTagStart: createToken("jsxTagStart", {
|
|
3670
3673
|
startsExpr: true
|
|
3671
3674
|
}),
|
|
3672
|
-
jsxTagEnd: createToken("jsxTagEnd")
|
|
3673
|
-
placeholder: createToken("%%", {
|
|
3674
|
-
startsExpr: true
|
|
3675
|
-
})
|
|
3675
|
+
jsxTagEnd: createToken("jsxTagEnd")
|
|
3676
3676
|
};
|
|
3677
3677
|
function tokenIsIdentifier(token) {
|
|
3678
|
-
return token >= 93 && token <=
|
|
3678
|
+
return token >= 93 && token <= 133;
|
|
3679
3679
|
}
|
|
3680
3680
|
function tokenKeywordOrIdentifierIsKeyword(token) {
|
|
3681
3681
|
return token <= 92;
|
|
3682
3682
|
}
|
|
3683
3683
|
function tokenIsKeywordOrIdentifier(token) {
|
|
3684
|
-
return token >= 58 && token <=
|
|
3684
|
+
return token >= 58 && token <= 133;
|
|
3685
3685
|
}
|
|
3686
3686
|
function tokenIsLiteralPropertyName(token) {
|
|
3687
|
-
return token >= 58 && token <=
|
|
3687
|
+
return token >= 58 && token <= 137;
|
|
3688
3688
|
}
|
|
3689
3689
|
function tokenComesBeforeExpression(token) {
|
|
3690
3690
|
return tokenBeforeExprs[token];
|
|
@@ -3748,7 +3748,7 @@ var require_lib = __commonJS({
|
|
|
3748
3748
|
context.push(types.template);
|
|
3749
3749
|
}
|
|
3750
3750
|
};
|
|
3751
|
-
tokenTypes[
|
|
3751
|
+
tokenTypes[143].updateContext = (context) => {
|
|
3752
3752
|
context.push(types.j_expr, types.j_oTag);
|
|
3753
3753
|
};
|
|
3754
3754
|
}
|
|
@@ -4318,7 +4318,7 @@ var require_lib = __commonJS({
|
|
|
4318
4318
|
this.commentsLen = 0;
|
|
4319
4319
|
this.commentStack = [];
|
|
4320
4320
|
this.pos = 0;
|
|
4321
|
-
this.type =
|
|
4321
|
+
this.type = 140;
|
|
4322
4322
|
this.value = null;
|
|
4323
4323
|
this.start = 0;
|
|
4324
4324
|
this.end = 0;
|
|
@@ -4460,8 +4460,7 @@ var require_lib = __commonJS({
|
|
|
4460
4460
|
this.flags &= -4097;
|
|
4461
4461
|
}
|
|
4462
4462
|
curPosition() {
|
|
4463
|
-
|
|
4464
|
-
return new Position(this.curLine, index - this.lineStart, index);
|
|
4463
|
+
return new Position(this.curLine, this.pos - this.lineStart, this.pos + this.startIndex);
|
|
4465
4464
|
}
|
|
4466
4465
|
clone() {
|
|
4467
4466
|
const state2 = new State();
|
|
@@ -4784,10 +4783,11 @@ var require_lib = __commonJS({
|
|
|
4784
4783
|
var VALID_REGEX_FLAGS = /* @__PURE__ */ new Set([103, 109, 115, 105, 121, 117, 100, 118]);
|
|
4785
4784
|
var Token = class {
|
|
4786
4785
|
constructor(state2) {
|
|
4786
|
+
const startIndex = state2.startIndex || 0;
|
|
4787
4787
|
this.type = state2.type;
|
|
4788
4788
|
this.value = state2.value;
|
|
4789
|
-
this.start = state2.start;
|
|
4790
|
-
this.end = state2.end;
|
|
4789
|
+
this.start = startIndex + state2.start;
|
|
4790
|
+
this.end = startIndex + state2.end;
|
|
4791
4791
|
this.loc = new SourceLocation(state2.startLoc, state2.endLoc);
|
|
4792
4792
|
}
|
|
4793
4793
|
};
|
|
@@ -4930,7 +4930,7 @@ var require_lib = __commonJS({
|
|
|
4930
4930
|
if (!this.isLookahead)
|
|
4931
4931
|
this.state.startLoc = this.state.curPosition();
|
|
4932
4932
|
if (this.state.pos >= this.length) {
|
|
4933
|
-
this.finishToken(
|
|
4933
|
+
this.finishToken(140);
|
|
4934
4934
|
return;
|
|
4935
4935
|
}
|
|
4936
4936
|
this.getTokenFromCode(this.codePointAtPos(this.state.pos));
|
|
@@ -4955,8 +4955,8 @@ var require_lib = __commonJS({
|
|
|
4955
4955
|
const comment = {
|
|
4956
4956
|
type: "CommentBlock",
|
|
4957
4957
|
value: this.input.slice(start + 2, end),
|
|
4958
|
-
start,
|
|
4959
|
-
end: end + commentEnd.length,
|
|
4958
|
+
start: this.sourceToOffsetPos(start),
|
|
4959
|
+
end: this.sourceToOffsetPos(end + commentEnd.length),
|
|
4960
4960
|
loc: new SourceLocation(startLoc, this.state.curPosition())
|
|
4961
4961
|
};
|
|
4962
4962
|
if (this.options.tokens)
|
|
@@ -4981,8 +4981,8 @@ var require_lib = __commonJS({
|
|
|
4981
4981
|
const comment = {
|
|
4982
4982
|
type: "CommentLine",
|
|
4983
4983
|
value,
|
|
4984
|
-
start,
|
|
4985
|
-
end,
|
|
4984
|
+
start: this.sourceToOffsetPos(start),
|
|
4985
|
+
end: this.sourceToOffsetPos(end),
|
|
4986
4986
|
loc: new SourceLocation(startLoc, this.state.curPosition())
|
|
4987
4987
|
};
|
|
4988
4988
|
if (this.options.tokens)
|
|
@@ -5117,10 +5117,10 @@ var require_lib = __commonJS({
|
|
|
5117
5117
|
}
|
|
5118
5118
|
} else if (isIdentifierStart(next)) {
|
|
5119
5119
|
++this.state.pos;
|
|
5120
|
-
this.finishToken(
|
|
5120
|
+
this.finishToken(139, this.readWord1(next));
|
|
5121
5121
|
} else if (next === 92) {
|
|
5122
5122
|
++this.state.pos;
|
|
5123
|
-
this.finishToken(
|
|
5123
|
+
this.finishToken(139, this.readWord1());
|
|
5124
5124
|
} else {
|
|
5125
5125
|
this.finishOp(27, 1);
|
|
5126
5126
|
}
|
|
@@ -5533,7 +5533,7 @@ var require_lib = __commonJS({
|
|
|
5533
5533
|
mods += char;
|
|
5534
5534
|
}
|
|
5535
5535
|
this.state.pos = pos;
|
|
5536
|
-
this.finishToken(
|
|
5536
|
+
this.finishToken(138, {
|
|
5537
5537
|
pattern: content,
|
|
5538
5538
|
flags: mods
|
|
5539
5539
|
});
|
|
@@ -5569,10 +5569,10 @@ var require_lib = __commonJS({
|
|
|
5569
5569
|
}
|
|
5570
5570
|
if (isBigInt) {
|
|
5571
5571
|
const str = this.input.slice(start, this.state.pos).replace(/[_n]/g, "");
|
|
5572
|
-
this.finishToken(
|
|
5572
|
+
this.finishToken(136, str);
|
|
5573
5573
|
return;
|
|
5574
5574
|
}
|
|
5575
|
-
this.finishToken(
|
|
5575
|
+
this.finishToken(135, val);
|
|
5576
5576
|
}
|
|
5577
5577
|
readNumber(startsWithDot) {
|
|
5578
5578
|
const start = this.state.pos;
|
|
@@ -5635,15 +5635,15 @@ var require_lib = __commonJS({
|
|
|
5635
5635
|
}
|
|
5636
5636
|
const str = this.input.slice(start, this.state.pos).replace(/[_mn]/g, "");
|
|
5637
5637
|
if (isBigInt) {
|
|
5638
|
-
this.finishToken(
|
|
5638
|
+
this.finishToken(136, str);
|
|
5639
5639
|
return;
|
|
5640
5640
|
}
|
|
5641
5641
|
if (isDecimal) {
|
|
5642
|
-
this.finishToken(
|
|
5642
|
+
this.finishToken(137, str);
|
|
5643
5643
|
return;
|
|
5644
5644
|
}
|
|
5645
5645
|
const val = isOctal ? parseInt(str, 8) : parseFloat(str);
|
|
5646
|
-
this.finishToken(
|
|
5646
|
+
this.finishToken(135, val);
|
|
5647
5647
|
}
|
|
5648
5648
|
readCodePoint(throwOnInvalid) {
|
|
5649
5649
|
const {
|
|
@@ -5663,7 +5663,7 @@ var require_lib = __commonJS({
|
|
|
5663
5663
|
this.state.pos = pos + 1;
|
|
5664
5664
|
this.state.lineStart = lineStart;
|
|
5665
5665
|
this.state.curLine = curLine;
|
|
5666
|
-
this.finishToken(
|
|
5666
|
+
this.finishToken(134, str);
|
|
5667
5667
|
}
|
|
5668
5668
|
readTemplateContinuation() {
|
|
5669
5669
|
if (!this.match(8)) {
|
|
@@ -5685,7 +5685,7 @@ var require_lib = __commonJS({
|
|
|
5685
5685
|
this.state.lineStart = lineStart;
|
|
5686
5686
|
this.state.curLine = curLine;
|
|
5687
5687
|
if (firstInvalidLoc) {
|
|
5688
|
-
this.state.firstInvalidTemplateEscapePos = new Position(firstInvalidLoc.curLine, firstInvalidLoc.pos - firstInvalidLoc.lineStart, firstInvalidLoc.pos);
|
|
5688
|
+
this.state.firstInvalidTemplateEscapePos = new Position(firstInvalidLoc.curLine, firstInvalidLoc.pos - firstInvalidLoc.lineStart, this.sourceToOffsetPos(firstInvalidLoc.pos));
|
|
5689
5689
|
}
|
|
5690
5690
|
if (this.input.codePointAt(pos) === 96) {
|
|
5691
5691
|
this.finishToken(24, firstInvalidLoc ? null : opening + str + "`");
|
|
@@ -6081,7 +6081,7 @@ var require_lib = __commonJS({
|
|
|
6081
6081
|
}
|
|
6082
6082
|
}
|
|
6083
6083
|
canInsertSemicolon() {
|
|
6084
|
-
return this.match(
|
|
6084
|
+
return this.match(140) || this.match(8) || this.hasPrecedingLineBreak();
|
|
6085
6085
|
}
|
|
6086
6086
|
hasPrecedingLineBreak() {
|
|
6087
6087
|
return hasNewLine(this.input, this.offsetToSourcePos(this.state.lastTokEndLoc.index), this.state.start);
|
|
@@ -6494,7 +6494,7 @@ var require_lib = __commonJS({
|
|
|
6494
6494
|
return this.getPluginOption("flow", "all") || this.flowPragma === "flow";
|
|
6495
6495
|
}
|
|
6496
6496
|
finishToken(type, val) {
|
|
6497
|
-
if (type !==
|
|
6497
|
+
if (type !== 134 && type !== 13 && type !== 28) {
|
|
6498
6498
|
if (this.flowPragma === void 0) {
|
|
6499
6499
|
this.flowPragma = null;
|
|
6500
6500
|
}
|
|
@@ -6624,7 +6624,7 @@ var require_lib = __commonJS({
|
|
|
6624
6624
|
}
|
|
6625
6625
|
flowParseDeclareModule(node) {
|
|
6626
6626
|
this.scope.enter(0);
|
|
6627
|
-
if (this.match(
|
|
6627
|
+
if (this.match(134)) {
|
|
6628
6628
|
node.id = super.parseExprAtom();
|
|
6629
6629
|
} else {
|
|
6630
6630
|
node.id = this.parseIdentifier();
|
|
@@ -6852,7 +6852,7 @@ var require_lib = __commonJS({
|
|
|
6852
6852
|
const node = this.startNode();
|
|
6853
6853
|
node.params = [];
|
|
6854
6854
|
this.state.inType = true;
|
|
6855
|
-
if (this.match(47) || this.match(
|
|
6855
|
+
if (this.match(47) || this.match(143)) {
|
|
6856
6856
|
this.next();
|
|
6857
6857
|
} else {
|
|
6858
6858
|
this.unexpected();
|
|
@@ -6926,7 +6926,7 @@ var require_lib = __commonJS({
|
|
|
6926
6926
|
return this.finishNode(node, "InterfaceTypeAnnotation");
|
|
6927
6927
|
}
|
|
6928
6928
|
flowParseObjectPropertyKey() {
|
|
6929
|
-
return this.match(
|
|
6929
|
+
return this.match(135) || this.match(134) ? super.parseExprAtom() : this.parseIdentifier(true);
|
|
6930
6930
|
}
|
|
6931
6931
|
flowParseObjectTypeIndexer(node, isStatic, variance) {
|
|
6932
6932
|
node.static = isStatic;
|
|
@@ -7370,7 +7370,7 @@ var require_lib = __commonJS({
|
|
|
7370
7370
|
node2.typeParameters = null;
|
|
7371
7371
|
return this.finishNode(node2, "FunctionTypeAnnotation");
|
|
7372
7372
|
}
|
|
7373
|
-
case
|
|
7373
|
+
case 134:
|
|
7374
7374
|
return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation");
|
|
7375
7375
|
case 85:
|
|
7376
7376
|
case 86:
|
|
@@ -7380,19 +7380,19 @@ var require_lib = __commonJS({
|
|
|
7380
7380
|
case 53:
|
|
7381
7381
|
if (this.state.value === "-") {
|
|
7382
7382
|
this.next();
|
|
7383
|
-
if (this.match(
|
|
7383
|
+
if (this.match(135)) {
|
|
7384
7384
|
return this.parseLiteralAtNode(-this.state.value, "NumberLiteralTypeAnnotation", node);
|
|
7385
7385
|
}
|
|
7386
|
-
if (this.match(
|
|
7386
|
+
if (this.match(136)) {
|
|
7387
7387
|
return this.parseLiteralAtNode(-this.state.value, "BigIntLiteralTypeAnnotation", node);
|
|
7388
7388
|
}
|
|
7389
7389
|
throw this.raise(FlowErrors.UnexpectedSubtractionOperand, this.state.startLoc);
|
|
7390
7390
|
}
|
|
7391
7391
|
this.unexpected();
|
|
7392
7392
|
return;
|
|
7393
|
-
case 134:
|
|
7394
|
-
return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation");
|
|
7395
7393
|
case 135:
|
|
7394
|
+
return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation");
|
|
7395
|
+
case 136:
|
|
7396
7396
|
return this.parseLiteral(this.state.value, "BigIntLiteralTypeAnnotation");
|
|
7397
7397
|
case 88:
|
|
7398
7398
|
this.next();
|
|
@@ -8151,7 +8151,7 @@ var require_lib = __commonJS({
|
|
|
8151
8151
|
var _jsx;
|
|
8152
8152
|
let state2 = null;
|
|
8153
8153
|
let jsx2;
|
|
8154
|
-
if (this.hasPlugin("jsx") && (this.match(
|
|
8154
|
+
if (this.hasPlugin("jsx") && (this.match(143) || this.match(47))) {
|
|
8155
8155
|
state2 = this.state.clone();
|
|
8156
8156
|
jsx2 = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state2);
|
|
8157
8157
|
if (!jsx2.error)
|
|
@@ -8423,7 +8423,7 @@ var require_lib = __commonJS({
|
|
|
8423
8423
|
const startLoc = this.state.startLoc;
|
|
8424
8424
|
const endOfInit = () => this.match(12) || this.match(8);
|
|
8425
8425
|
switch (this.state.type) {
|
|
8426
|
-
case
|
|
8426
|
+
case 135: {
|
|
8427
8427
|
const literal = this.parseNumericLiteral(this.state.value);
|
|
8428
8428
|
if (endOfInit()) {
|
|
8429
8429
|
return {
|
|
@@ -8437,7 +8437,7 @@ var require_lib = __commonJS({
|
|
|
8437
8437
|
loc: startLoc
|
|
8438
8438
|
};
|
|
8439
8439
|
}
|
|
8440
|
-
case
|
|
8440
|
+
case 134: {
|
|
8441
8441
|
const literal = this.parseStringLiteral(this.state.value);
|
|
8442
8442
|
if (endOfInit()) {
|
|
8443
8443
|
return {
|
|
@@ -9035,14 +9035,14 @@ var require_lib = __commonJS({
|
|
|
9035
9035
|
if (this.state.pos === this.state.start) {
|
|
9036
9036
|
if (ch === 60 && this.state.canStartJSXElement) {
|
|
9037
9037
|
++this.state.pos;
|
|
9038
|
-
this.finishToken(
|
|
9038
|
+
this.finishToken(143);
|
|
9039
9039
|
} else {
|
|
9040
9040
|
super.getTokenFromCode(ch);
|
|
9041
9041
|
}
|
|
9042
9042
|
return;
|
|
9043
9043
|
}
|
|
9044
9044
|
out += this.input.slice(chunkStart, this.state.pos);
|
|
9045
|
-
this.finishToken(
|
|
9045
|
+
this.finishToken(142, out);
|
|
9046
9046
|
return;
|
|
9047
9047
|
case 38:
|
|
9048
9048
|
out += this.input.slice(chunkStart, this.state.pos);
|
|
@@ -9099,7 +9099,7 @@ var require_lib = __commonJS({
|
|
|
9099
9099
|
}
|
|
9100
9100
|
}
|
|
9101
9101
|
out += this.input.slice(chunkStart, this.state.pos++);
|
|
9102
|
-
this.finishToken(
|
|
9102
|
+
this.finishToken(134, out);
|
|
9103
9103
|
}
|
|
9104
9104
|
jsxReadEntity() {
|
|
9105
9105
|
const startPos = ++this.state.pos;
|
|
@@ -9139,11 +9139,11 @@ var require_lib = __commonJS({
|
|
|
9139
9139
|
do {
|
|
9140
9140
|
ch = this.input.charCodeAt(++this.state.pos);
|
|
9141
9141
|
} while (isIdentifierChar(ch) || ch === 45);
|
|
9142
|
-
this.finishToken(
|
|
9142
|
+
this.finishToken(141, this.input.slice(start, this.state.pos));
|
|
9143
9143
|
}
|
|
9144
9144
|
jsxParseIdentifier() {
|
|
9145
9145
|
const node = this.startNode();
|
|
9146
|
-
if (this.match(
|
|
9146
|
+
if (this.match(141)) {
|
|
9147
9147
|
node.name = this.state.value;
|
|
9148
9148
|
} else if (tokenIsKeyword(this.state.type)) {
|
|
9149
9149
|
node.name = tokenLabelName(this.state.type);
|
|
@@ -9189,8 +9189,8 @@ var require_lib = __commonJS({
|
|
|
9189
9189
|
this.raise(JsxErrors.AttributeIsEmpty, node);
|
|
9190
9190
|
}
|
|
9191
9191
|
return node;
|
|
9192
|
-
case
|
|
9193
|
-
case
|
|
9192
|
+
case 143:
|
|
9193
|
+
case 134:
|
|
9194
9194
|
return this.parseExprAtom();
|
|
9195
9195
|
default:
|
|
9196
9196
|
throw this.raise(JsxErrors.UnsupportedJsxValue, this.state.startLoc);
|
|
@@ -9238,7 +9238,7 @@ var require_lib = __commonJS({
|
|
|
9238
9238
|
}
|
|
9239
9239
|
jsxParseOpeningElementAt(startLoc) {
|
|
9240
9240
|
const node = this.startNodeAt(startLoc);
|
|
9241
|
-
if (this.eat(
|
|
9241
|
+
if (this.eat(144)) {
|
|
9242
9242
|
return this.finishNode(node, "JSXOpeningFragment");
|
|
9243
9243
|
}
|
|
9244
9244
|
node.name = this.jsxParseElementName();
|
|
@@ -9246,21 +9246,21 @@ var require_lib = __commonJS({
|
|
|
9246
9246
|
}
|
|
9247
9247
|
jsxParseOpeningElementAfterName(node) {
|
|
9248
9248
|
const attributes = [];
|
|
9249
|
-
while (!this.match(56) && !this.match(
|
|
9249
|
+
while (!this.match(56) && !this.match(144)) {
|
|
9250
9250
|
attributes.push(this.jsxParseAttribute());
|
|
9251
9251
|
}
|
|
9252
9252
|
node.attributes = attributes;
|
|
9253
9253
|
node.selfClosing = this.eat(56);
|
|
9254
|
-
this.expect(
|
|
9254
|
+
this.expect(144);
|
|
9255
9255
|
return this.finishNode(node, "JSXOpeningElement");
|
|
9256
9256
|
}
|
|
9257
9257
|
jsxParseClosingElementAt(startLoc) {
|
|
9258
9258
|
const node = this.startNodeAt(startLoc);
|
|
9259
|
-
if (this.eat(
|
|
9259
|
+
if (this.eat(144)) {
|
|
9260
9260
|
return this.finishNode(node, "JSXClosingFragment");
|
|
9261
9261
|
}
|
|
9262
9262
|
node.name = this.jsxParseElementName();
|
|
9263
|
-
this.expect(
|
|
9263
|
+
this.expect(144);
|
|
9264
9264
|
return this.finishNode(node, "JSXClosingElement");
|
|
9265
9265
|
}
|
|
9266
9266
|
jsxParseElementAt(startLoc) {
|
|
@@ -9272,7 +9272,7 @@ var require_lib = __commonJS({
|
|
|
9272
9272
|
contents:
|
|
9273
9273
|
for (; ; ) {
|
|
9274
9274
|
switch (this.state.type) {
|
|
9275
|
-
case
|
|
9275
|
+
case 143:
|
|
9276
9276
|
startLoc = this.state.startLoc;
|
|
9277
9277
|
this.next();
|
|
9278
9278
|
if (this.eat(56)) {
|
|
@@ -9281,7 +9281,7 @@ var require_lib = __commonJS({
|
|
|
9281
9281
|
}
|
|
9282
9282
|
children.push(this.jsxParseElementAt(startLoc));
|
|
9283
9283
|
break;
|
|
9284
|
-
case
|
|
9284
|
+
case 142:
|
|
9285
9285
|
children.push(this.parseLiteral(this.state.value, "JSXText"));
|
|
9286
9286
|
break;
|
|
9287
9287
|
case 5: {
|
|
@@ -9338,10 +9338,10 @@ var require_lib = __commonJS({
|
|
|
9338
9338
|
context[context.length - 1] = newContext;
|
|
9339
9339
|
}
|
|
9340
9340
|
parseExprAtom(refExpressionErrors) {
|
|
9341
|
-
if (this.match(
|
|
9341
|
+
if (this.match(143)) {
|
|
9342
9342
|
return this.jsxParseElement();
|
|
9343
9343
|
} else if (this.match(47) && this.input.charCodeAt(this.state.pos) !== 33) {
|
|
9344
|
-
this.replaceToken(
|
|
9344
|
+
this.replaceToken(143);
|
|
9345
9345
|
return this.jsxParseElement();
|
|
9346
9346
|
} else {
|
|
9347
9347
|
return super.parseExprAtom(refExpressionErrors);
|
|
@@ -9365,7 +9365,7 @@ var require_lib = __commonJS({
|
|
|
9365
9365
|
}
|
|
9366
9366
|
if (code2 === 62) {
|
|
9367
9367
|
++this.state.pos;
|
|
9368
|
-
this.finishToken(
|
|
9368
|
+
this.finishToken(144);
|
|
9369
9369
|
return;
|
|
9370
9370
|
}
|
|
9371
9371
|
if ((code2 === 34 || code2 === 39) && context === types.j_oTag) {
|
|
@@ -9375,7 +9375,7 @@ var require_lib = __commonJS({
|
|
|
9375
9375
|
}
|
|
9376
9376
|
if (code2 === 60 && this.state.canStartJSXElement && this.input.charCodeAt(this.state.pos + 1) !== 33) {
|
|
9377
9377
|
++this.state.pos;
|
|
9378
|
-
this.finishToken(
|
|
9378
|
+
this.finishToken(143);
|
|
9379
9379
|
return;
|
|
9380
9380
|
}
|
|
9381
9381
|
super.getTokenFromCode(code2);
|
|
@@ -9385,12 +9385,12 @@ var require_lib = __commonJS({
|
|
|
9385
9385
|
context,
|
|
9386
9386
|
type
|
|
9387
9387
|
} = this.state;
|
|
9388
|
-
if (type === 56 && prevType ===
|
|
9388
|
+
if (type === 56 && prevType === 143) {
|
|
9389
9389
|
context.splice(-2, 2, types.j_cTag);
|
|
9390
9390
|
this.state.canStartJSXElement = false;
|
|
9391
|
-
} else if (type === 142) {
|
|
9392
|
-
context.push(types.j_oTag);
|
|
9393
9391
|
} else if (type === 143) {
|
|
9392
|
+
context.push(types.j_oTag);
|
|
9393
|
+
} else if (type === 144) {
|
|
9394
9394
|
const out = context[context.length - 1];
|
|
9395
9395
|
if (out === types.j_oTag && prevType === 56 || out === types.j_cTag) {
|
|
9396
9396
|
context.pop();
|
|
@@ -9747,7 +9747,7 @@ var require_lib = __commonJS({
|
|
|
9747
9747
|
return this.parseBindingRestProperty(this.startNode());
|
|
9748
9748
|
}
|
|
9749
9749
|
const prop = this.startNode();
|
|
9750
|
-
if (type ===
|
|
9750
|
+
if (type === 139) {
|
|
9751
9751
|
this.expectPlugin("destructuringPrivate", startLoc);
|
|
9752
9752
|
this.classScope.usePrivateName(this.state.value, startLoc);
|
|
9753
9753
|
prop.key = this.parsePrivateName();
|
|
@@ -10075,7 +10075,7 @@ var require_lib = __commonJS({
|
|
|
10075
10075
|
return tokenIsIdentifier(this.state.type);
|
|
10076
10076
|
}
|
|
10077
10077
|
tsTokenCanFollowModifier() {
|
|
10078
|
-
return this.match(0) || this.match(5) || this.match(55) || this.match(21) || this.match(
|
|
10078
|
+
return this.match(0) || this.match(5) || this.match(55) || this.match(21) || this.match(139) || this.isLiteralPropertyName();
|
|
10079
10079
|
}
|
|
10080
10080
|
tsNextTokenOnSameLineAndCanFollowModifier() {
|
|
10081
10081
|
this.next();
|
|
@@ -10247,7 +10247,7 @@ var require_lib = __commonJS({
|
|
|
10247
10247
|
const node = this.startNode();
|
|
10248
10248
|
this.expect(83);
|
|
10249
10249
|
this.expect(10);
|
|
10250
|
-
if (!this.match(
|
|
10250
|
+
if (!this.match(134)) {
|
|
10251
10251
|
this.raise(TSErrors.UnsupportedImportTypeArgument, this.state.startLoc);
|
|
10252
10252
|
}
|
|
10253
10253
|
node.argument = super.parseExprAtom();
|
|
@@ -10325,7 +10325,7 @@ var require_lib = __commonJS({
|
|
|
10325
10325
|
}
|
|
10326
10326
|
tsParseTypeParameters(parseModifiers) {
|
|
10327
10327
|
const node = this.startNode();
|
|
10328
|
-
if (this.match(47) || this.match(
|
|
10328
|
+
if (this.match(47) || this.match(143)) {
|
|
10329
10329
|
this.next();
|
|
10330
10330
|
} else {
|
|
10331
10331
|
this.unexpected();
|
|
@@ -10654,9 +10654,9 @@ var require_lib = __commonJS({
|
|
|
10654
10654
|
tsParseLiteralTypeNode() {
|
|
10655
10655
|
const node = this.startNode();
|
|
10656
10656
|
switch (this.state.type) {
|
|
10657
|
-
case 134:
|
|
10658
10657
|
case 135:
|
|
10659
|
-
case
|
|
10658
|
+
case 136:
|
|
10659
|
+
case 134:
|
|
10660
10660
|
case 85:
|
|
10661
10661
|
case 86:
|
|
10662
10662
|
node.literal = super.parseExprAtom();
|
|
@@ -10686,9 +10686,9 @@ var require_lib = __commonJS({
|
|
|
10686
10686
|
}
|
|
10687
10687
|
tsParseNonArrayType() {
|
|
10688
10688
|
switch (this.state.type) {
|
|
10689
|
-
case 133:
|
|
10690
10689
|
case 134:
|
|
10691
10690
|
case 135:
|
|
10691
|
+
case 136:
|
|
10692
10692
|
case 85:
|
|
10693
10693
|
case 86:
|
|
10694
10694
|
return this.tsParseLiteralTypeNode();
|
|
@@ -10696,7 +10696,7 @@ var require_lib = __commonJS({
|
|
|
10696
10696
|
if (this.state.value === "-") {
|
|
10697
10697
|
const node = this.startNode();
|
|
10698
10698
|
const nextToken = this.lookahead();
|
|
10699
|
-
if (nextToken.type !==
|
|
10699
|
+
if (nextToken.type !== 135 && nextToken.type !== 136) {
|
|
10700
10700
|
this.unexpected();
|
|
10701
10701
|
}
|
|
10702
10702
|
node.literal = this.parseMaybeUnary();
|
|
@@ -11104,7 +11104,7 @@ var require_lib = __commonJS({
|
|
|
11104
11104
|
}
|
|
11105
11105
|
tsParseEnumMember() {
|
|
11106
11106
|
const node = this.startNode();
|
|
11107
|
-
node.id = this.match(
|
|
11107
|
+
node.id = this.match(134) ? super.parseStringLiteral(this.state.value) : this.parseIdentifier(true);
|
|
11108
11108
|
if (this.eat(29)) {
|
|
11109
11109
|
node.initializer = super.parseMaybeAssignAllowIn();
|
|
11110
11110
|
}
|
|
@@ -11154,7 +11154,7 @@ var require_lib = __commonJS({
|
|
|
11154
11154
|
node.kind = "global";
|
|
11155
11155
|
node.global = true;
|
|
11156
11156
|
node.id = this.parseIdentifier();
|
|
11157
|
-
} else if (this.match(
|
|
11157
|
+
} else if (this.match(134)) {
|
|
11158
11158
|
node.kind = "module";
|
|
11159
11159
|
node.id = super.parseStringLiteral(this.state.value);
|
|
11160
11160
|
} else {
|
|
@@ -11194,7 +11194,7 @@ var require_lib = __commonJS({
|
|
|
11194
11194
|
const node = this.startNode();
|
|
11195
11195
|
this.expectContextual(119);
|
|
11196
11196
|
this.expect(10);
|
|
11197
|
-
if (!this.match(
|
|
11197
|
+
if (!this.match(134)) {
|
|
11198
11198
|
this.unexpected();
|
|
11199
11199
|
}
|
|
11200
11200
|
node.expression = super.parseExprAtom();
|
|
@@ -11312,7 +11312,7 @@ var require_lib = __commonJS({
|
|
|
11312
11312
|
break;
|
|
11313
11313
|
case "module":
|
|
11314
11314
|
if (this.tsCheckLineTerminator(next)) {
|
|
11315
|
-
if (this.match(
|
|
11315
|
+
if (this.match(134)) {
|
|
11316
11316
|
return this.tsParseAmbientExternalModuleDeclaration(node);
|
|
11317
11317
|
} else if (tokenIsIdentifier(this.state.type)) {
|
|
11318
11318
|
node.kind = "module";
|
|
@@ -11617,7 +11617,7 @@ var require_lib = __commonJS({
|
|
|
11617
11617
|
}
|
|
11618
11618
|
}
|
|
11619
11619
|
parseImport(node) {
|
|
11620
|
-
if (this.match(
|
|
11620
|
+
if (this.match(134)) {
|
|
11621
11621
|
node.importKind = "value";
|
|
11622
11622
|
return super.parseImport(node);
|
|
11623
11623
|
}
|
|
@@ -11994,7 +11994,7 @@ var require_lib = __commonJS({
|
|
|
11994
11994
|
let state2;
|
|
11995
11995
|
let jsx2;
|
|
11996
11996
|
let typeCast;
|
|
11997
|
-
if (this.hasPlugin("jsx") && (this.match(
|
|
11997
|
+
if (this.hasPlugin("jsx") && (this.match(143) || this.match(47))) {
|
|
11998
11998
|
state2 = this.state.clone();
|
|
11999
11999
|
jsx2 = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state2);
|
|
12000
12000
|
if (!jsx2.error)
|
|
@@ -12514,13 +12514,13 @@ var require_lib = __commonJS({
|
|
|
12514
12514
|
});
|
|
12515
12515
|
var placeholders = (superClass) => class PlaceholdersParserMixin extends superClass {
|
|
12516
12516
|
parsePlaceholder(expectedNode) {
|
|
12517
|
-
if (this.match(
|
|
12517
|
+
if (this.match(133)) {
|
|
12518
12518
|
const node = this.startNode();
|
|
12519
12519
|
this.next();
|
|
12520
12520
|
this.assertNoSpace();
|
|
12521
12521
|
node.name = super.parseIdentifier(true);
|
|
12522
12522
|
this.assertNoSpace();
|
|
12523
|
-
this.expect(
|
|
12523
|
+
this.expect(133);
|
|
12524
12524
|
return this.finishPlaceholder(node, expectedNode);
|
|
12525
12525
|
}
|
|
12526
12526
|
}
|
|
@@ -12534,7 +12534,7 @@ var require_lib = __commonJS({
|
|
|
12534
12534
|
}
|
|
12535
12535
|
getTokenFromCode(code2) {
|
|
12536
12536
|
if (code2 === 37 && this.input.charCodeAt(this.state.pos + 1) === 37) {
|
|
12537
|
-
this.finishOp(
|
|
12537
|
+
this.finishOp(133, 2);
|
|
12538
12538
|
} else {
|
|
12539
12539
|
super.getTokenFromCode(code2);
|
|
12540
12540
|
}
|
|
@@ -12568,7 +12568,7 @@ var require_lib = __commonJS({
|
|
|
12568
12568
|
return true;
|
|
12569
12569
|
}
|
|
12570
12570
|
const nextToken = this.lookahead();
|
|
12571
|
-
if (nextToken.type ===
|
|
12571
|
+
if (nextToken.type === 133) {
|
|
12572
12572
|
return true;
|
|
12573
12573
|
}
|
|
12574
12574
|
return false;
|
|
@@ -12607,7 +12607,7 @@ var require_lib = __commonJS({
|
|
|
12607
12607
|
const oldStrict = this.state.strict;
|
|
12608
12608
|
const placeholder = this.parsePlaceholder("Identifier");
|
|
12609
12609
|
if (placeholder) {
|
|
12610
|
-
if (this.match(81) || this.match(
|
|
12610
|
+
if (this.match(81) || this.match(133) || this.match(5)) {
|
|
12611
12611
|
node.id = placeholder;
|
|
12612
12612
|
} else if (optionalId || !isStatement) {
|
|
12613
12613
|
node.id = null;
|
|
@@ -12644,7 +12644,7 @@ var require_lib = __commonJS({
|
|
|
12644
12644
|
if (this.match(65)) {
|
|
12645
12645
|
const next = this.nextTokenStart();
|
|
12646
12646
|
if (this.isUnparsedContextual(next, "from")) {
|
|
12647
|
-
if (this.input.startsWith(tokenLabelName(
|
|
12647
|
+
if (this.input.startsWith(tokenLabelName(133), this.nextTokenStartSince(next + 4))) {
|
|
12648
12648
|
return true;
|
|
12649
12649
|
}
|
|
12650
12650
|
}
|
|
@@ -12900,7 +12900,7 @@ var require_lib = __commonJS({
|
|
|
12900
12900
|
this.enterInitialScopes();
|
|
12901
12901
|
this.nextToken();
|
|
12902
12902
|
const expr = this.parseExpression();
|
|
12903
|
-
if (!this.match(
|
|
12903
|
+
if (!this.match(140)) {
|
|
12904
12904
|
this.unexpected();
|
|
12905
12905
|
}
|
|
12906
12906
|
this.finalizeRemainingComments();
|
|
@@ -13020,7 +13020,7 @@ var require_lib = __commonJS({
|
|
|
13020
13020
|
return expr;
|
|
13021
13021
|
}
|
|
13022
13022
|
parseMaybeUnaryOrPrivate(refExpressionErrors) {
|
|
13023
|
-
return this.match(
|
|
13023
|
+
return this.match(139) ? this.parsePrivateName() : this.parseMaybeUnary(refExpressionErrors);
|
|
13024
13024
|
}
|
|
13025
13025
|
parseExprOps(refExpressionErrors) {
|
|
13026
13026
|
const startLoc = this.state.startLoc;
|
|
@@ -13261,7 +13261,7 @@ var require_lib = __commonJS({
|
|
|
13261
13261
|
if (computed12) {
|
|
13262
13262
|
node.property = this.parseExpression();
|
|
13263
13263
|
this.expect(3);
|
|
13264
|
-
} else if (this.match(
|
|
13264
|
+
} else if (this.match(139)) {
|
|
13265
13265
|
if (base.type === "Super") {
|
|
13266
13266
|
this.raise(Errors.SuperPrivateField, startLoc);
|
|
13267
13267
|
}
|
|
@@ -13434,11 +13434,11 @@ var require_lib = __commonJS({
|
|
|
13434
13434
|
this.readRegexp();
|
|
13435
13435
|
return this.parseRegExpLiteral(this.state.value);
|
|
13436
13436
|
}
|
|
13437
|
-
case 134:
|
|
13438
|
-
return this.parseNumericLiteral(this.state.value);
|
|
13439
13437
|
case 135:
|
|
13438
|
+
return this.parseNumericLiteral(this.state.value);
|
|
13439
|
+
case 136:
|
|
13440
13440
|
return this.parseBigIntLiteral(this.state.value);
|
|
13441
|
-
case
|
|
13441
|
+
case 134:
|
|
13442
13442
|
return this.parseStringLiteral(this.state.value);
|
|
13443
13443
|
case 84:
|
|
13444
13444
|
return this.parseNullLiteral();
|
|
@@ -13486,7 +13486,7 @@ var require_lib = __commonJS({
|
|
|
13486
13486
|
throw this.raise(Errors.UnsupportedBind, callee);
|
|
13487
13487
|
}
|
|
13488
13488
|
}
|
|
13489
|
-
case
|
|
13489
|
+
case 139: {
|
|
13490
13490
|
this.raise(Errors.PrivateInExpectedIn, this.state.startLoc, {
|
|
13491
13491
|
identifierName: this.state.value
|
|
13492
13492
|
});
|
|
@@ -13522,7 +13522,7 @@ var require_lib = __commonJS({
|
|
|
13522
13522
|
break;
|
|
13523
13523
|
}
|
|
13524
13524
|
default:
|
|
13525
|
-
if (type ===
|
|
13525
|
+
if (type === 137) {
|
|
13526
13526
|
return this.parseDecimalLiteral(this.state.value);
|
|
13527
13527
|
}
|
|
13528
13528
|
if (tokenIsIdentifier(type)) {
|
|
@@ -14110,16 +14110,16 @@ var require_lib = __commonJS({
|
|
|
14110
14110
|
key = this.parseIdentifier(true);
|
|
14111
14111
|
} else {
|
|
14112
14112
|
switch (type) {
|
|
14113
|
-
case
|
|
14113
|
+
case 135:
|
|
14114
14114
|
key = this.parseNumericLiteral(value);
|
|
14115
14115
|
break;
|
|
14116
|
-
case
|
|
14116
|
+
case 134:
|
|
14117
14117
|
key = this.parseStringLiteral(value);
|
|
14118
14118
|
break;
|
|
14119
|
-
case
|
|
14119
|
+
case 136:
|
|
14120
14120
|
key = this.parseBigIntLiteral(value);
|
|
14121
14121
|
break;
|
|
14122
|
-
case
|
|
14122
|
+
case 139: {
|
|
14123
14123
|
const privateKeyLoc = this.state.startLoc;
|
|
14124
14124
|
if (refExpressionErrors != null) {
|
|
14125
14125
|
if (refExpressionErrors.privateKeyLoc === null) {
|
|
@@ -14132,7 +14132,7 @@ var require_lib = __commonJS({
|
|
|
14132
14132
|
break;
|
|
14133
14133
|
}
|
|
14134
14134
|
default:
|
|
14135
|
-
if (type ===
|
|
14135
|
+
if (type === 137) {
|
|
14136
14136
|
key = this.parseDecimalLiteral(value);
|
|
14137
14137
|
break;
|
|
14138
14138
|
}
|
|
@@ -14140,7 +14140,7 @@ var require_lib = __commonJS({
|
|
|
14140
14140
|
}
|
|
14141
14141
|
}
|
|
14142
14142
|
prop.key = key;
|
|
14143
|
-
if (type !==
|
|
14143
|
+
if (type !== 139) {
|
|
14144
14144
|
prop.computed = false;
|
|
14145
14145
|
}
|
|
14146
14146
|
}
|
|
@@ -14396,7 +14396,7 @@ var require_lib = __commonJS({
|
|
|
14396
14396
|
const {
|
|
14397
14397
|
type
|
|
14398
14398
|
} = this.state;
|
|
14399
|
-
return type === 53 || type === 10 || type === 0 || tokenIsTemplate(type) || type === 102 && !this.state.containsEsc || type ===
|
|
14399
|
+
return type === 53 || type === 10 || type === 0 || tokenIsTemplate(type) || type === 102 && !this.state.containsEsc || type === 138 || type === 56 || this.hasPlugin("v8intrinsic") && type === 54;
|
|
14400
14400
|
}
|
|
14401
14401
|
parseYield() {
|
|
14402
14402
|
const node = this.startNode();
|
|
@@ -14408,7 +14408,7 @@ var require_lib = __commonJS({
|
|
|
14408
14408
|
delegating = this.eat(55);
|
|
14409
14409
|
switch (this.state.type) {
|
|
14410
14410
|
case 13:
|
|
14411
|
-
case
|
|
14411
|
+
case 140:
|
|
14412
14412
|
case 8:
|
|
14413
14413
|
case 11:
|
|
14414
14414
|
case 3:
|
|
@@ -14594,7 +14594,7 @@ var require_lib = __commonJS({
|
|
|
14594
14594
|
};
|
|
14595
14595
|
var loneSurrogate = /[\uD800-\uDFFF]/u;
|
|
14596
14596
|
var keywordRelationalOperator = /in(?:stanceof)?/y;
|
|
14597
|
-
function babel7CompatTokens(tokens, input) {
|
|
14597
|
+
function babel7CompatTokens(tokens, input, startIndex) {
|
|
14598
14598
|
for (let i = 0; i < tokens.length; i++) {
|
|
14599
14599
|
const token = tokens[i];
|
|
14600
14600
|
const {
|
|
@@ -14602,7 +14602,7 @@ var require_lib = __commonJS({
|
|
|
14602
14602
|
} = token;
|
|
14603
14603
|
if (typeof type === "number") {
|
|
14604
14604
|
{
|
|
14605
|
-
if (type ===
|
|
14605
|
+
if (type === 139) {
|
|
14606
14606
|
const {
|
|
14607
14607
|
loc,
|
|
14608
14608
|
start,
|
|
@@ -14639,7 +14639,7 @@ var require_lib = __commonJS({
|
|
|
14639
14639
|
const backquoteEnd = start + 1;
|
|
14640
14640
|
const backquoteEndLoc = createPositionWithColumnOffset(loc.start, 1);
|
|
14641
14641
|
let startToken;
|
|
14642
|
-
if (input.charCodeAt(start) === 96) {
|
|
14642
|
+
if (input.charCodeAt(start - startIndex) === 96) {
|
|
14643
14643
|
startToken = new Token({
|
|
14644
14644
|
type: getExportedToken(22),
|
|
14645
14645
|
value: "`",
|
|
@@ -14706,11 +14706,11 @@ var require_lib = __commonJS({
|
|
|
14706
14706
|
file.program = this.parseProgram(program);
|
|
14707
14707
|
file.comments = this.comments;
|
|
14708
14708
|
if (this.options.tokens) {
|
|
14709
|
-
file.tokens = babel7CompatTokens(this.tokens, this.input);
|
|
14709
|
+
file.tokens = babel7CompatTokens(this.tokens, this.input, this.startIndex);
|
|
14710
14710
|
}
|
|
14711
14711
|
return this.finishNode(file, "File");
|
|
14712
14712
|
}
|
|
14713
|
-
parseProgram(program, end =
|
|
14713
|
+
parseProgram(program, end = 140, sourceType = this.options.sourceType) {
|
|
14714
14714
|
program.sourceType = sourceType;
|
|
14715
14715
|
program.interpreter = this.parseInterpreterDirective();
|
|
14716
14716
|
this.parseBlockBody(program, true, true, end);
|
|
@@ -14725,7 +14725,7 @@ var require_lib = __commonJS({
|
|
|
14725
14725
|
this.addExtra(program, "topLevelAwait", this.state.hasTopLevelAwait);
|
|
14726
14726
|
}
|
|
14727
14727
|
let finishedProgram;
|
|
14728
|
-
if (end ===
|
|
14728
|
+
if (end === 140) {
|
|
14729
14729
|
finishedProgram = this.finishNode(program, "Program");
|
|
14730
14730
|
} else {
|
|
14731
14731
|
finishedProgram = this.finishNodeAt(program, "Program", createPositionWithColumnOffset(this.state.startLoc, -1));
|
|
@@ -15045,7 +15045,7 @@ var require_lib = __commonJS({
|
|
|
15045
15045
|
while (this.eat(16)) {
|
|
15046
15046
|
const node2 = this.startNodeAt(startLoc);
|
|
15047
15047
|
node2.object = expr;
|
|
15048
|
-
if (this.match(
|
|
15048
|
+
if (this.match(139)) {
|
|
15049
15049
|
this.classScope.usePrivateName(this.state.value, this.state.startLoc);
|
|
15050
15050
|
node2.property = this.parsePrivateName();
|
|
15051
15051
|
} else {
|
|
@@ -15654,7 +15654,7 @@ var require_lib = __commonJS({
|
|
|
15654
15654
|
this.parsePropertyNamePrefixOperator(member);
|
|
15655
15655
|
if (this.eat(55)) {
|
|
15656
15656
|
method.kind = "method";
|
|
15657
|
-
const isPrivateName = this.match(
|
|
15657
|
+
const isPrivateName = this.match(139);
|
|
15658
15658
|
this.parseClassElementName(method);
|
|
15659
15659
|
if (isPrivateName) {
|
|
15660
15660
|
this.pushClassPrivateMethod(classBody, privateMethod, true, false);
|
|
@@ -15705,7 +15705,7 @@ var require_lib = __commonJS({
|
|
|
15705
15705
|
this.unexpected(maybeQuestionTokenStartLoc);
|
|
15706
15706
|
}
|
|
15707
15707
|
method.kind = "method";
|
|
15708
|
-
const isPrivate2 = this.match(
|
|
15708
|
+
const isPrivate2 = this.match(139);
|
|
15709
15709
|
this.parseClassElementName(method);
|
|
15710
15710
|
this.parsePostMemberNameModifiers(publicMember);
|
|
15711
15711
|
if (isPrivate2) {
|
|
@@ -15719,7 +15719,7 @@ var require_lib = __commonJS({
|
|
|
15719
15719
|
} else if ((maybeContextualKw === "get" || maybeContextualKw === "set") && !(this.match(55) && this.isLineTerminator())) {
|
|
15720
15720
|
this.resetPreviousNodeTrailingComments(key);
|
|
15721
15721
|
method.kind = maybeContextualKw;
|
|
15722
|
-
const isPrivate2 = this.match(
|
|
15722
|
+
const isPrivate2 = this.match(139);
|
|
15723
15723
|
this.parseClassElementName(publicMethod);
|
|
15724
15724
|
if (isPrivate2) {
|
|
15725
15725
|
this.pushClassPrivateMethod(classBody, privateMethod, false, false);
|
|
@@ -15733,7 +15733,7 @@ var require_lib = __commonJS({
|
|
|
15733
15733
|
} else if (maybeContextualKw === "accessor" && !this.isLineTerminator()) {
|
|
15734
15734
|
this.expectPlugin("decoratorAutoAccessors");
|
|
15735
15735
|
this.resetPreviousNodeTrailingComments(key);
|
|
15736
|
-
const isPrivate2 = this.match(
|
|
15736
|
+
const isPrivate2 = this.match(139);
|
|
15737
15737
|
this.parseClassElementName(publicProp);
|
|
15738
15738
|
this.pushClassAccessorProperty(classBody, accessorProp, isPrivate2);
|
|
15739
15739
|
} else if (this.isLineTerminator()) {
|
|
@@ -15751,10 +15751,10 @@ var require_lib = __commonJS({
|
|
|
15751
15751
|
type,
|
|
15752
15752
|
value
|
|
15753
15753
|
} = this.state;
|
|
15754
|
-
if ((type === 132 || type ===
|
|
15754
|
+
if ((type === 132 || type === 134) && member.static && value === "prototype") {
|
|
15755
15755
|
this.raise(Errors.StaticPrototype, this.state.startLoc);
|
|
15756
15756
|
}
|
|
15757
|
-
if (type ===
|
|
15757
|
+
if (type === 139) {
|
|
15758
15758
|
if (value === "constructor") {
|
|
15759
15759
|
this.raise(Errors.ConstructorClassPrivateField, this.state.startLoc);
|
|
15760
15760
|
}
|
|
@@ -16171,7 +16171,7 @@ var require_lib = __commonJS({
|
|
|
16171
16171
|
break;
|
|
16172
16172
|
}
|
|
16173
16173
|
const isMaybeTypeOnly = this.isContextual(130);
|
|
16174
|
-
const isString = this.match(
|
|
16174
|
+
const isString = this.match(134);
|
|
16175
16175
|
const node = this.startNode();
|
|
16176
16176
|
node.local = this.parseModuleExportName();
|
|
16177
16177
|
nodes.push(this.parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly));
|
|
@@ -16189,7 +16189,7 @@ var require_lib = __commonJS({
|
|
|
16189
16189
|
return this.finishNode(node, "ExportSpecifier");
|
|
16190
16190
|
}
|
|
16191
16191
|
parseModuleExportName() {
|
|
16192
|
-
if (this.match(
|
|
16192
|
+
if (this.match(134)) {
|
|
16193
16193
|
const result = this.parseStringLiteral(this.state.value);
|
|
16194
16194
|
const surrogate = loneSurrogate.exec(result.value);
|
|
16195
16195
|
if (surrogate) {
|
|
@@ -16309,7 +16309,7 @@ var require_lib = __commonJS({
|
|
|
16309
16309
|
return tokenIsIdentifier(type) ? type !== 98 || this.lookaheadCharCode() === 102 : type !== 12;
|
|
16310
16310
|
}
|
|
16311
16311
|
parseImport(node) {
|
|
16312
|
-
if (this.match(
|
|
16312
|
+
if (this.match(134)) {
|
|
16313
16313
|
return this.parseImportSourceAndAttributes(node);
|
|
16314
16314
|
}
|
|
16315
16315
|
return this.parseImportSpecifiersAndAfter(node, this.parseMaybeImportPhase(node, false));
|
|
@@ -16335,7 +16335,7 @@ var require_lib = __commonJS({
|
|
|
16335
16335
|
return this.finishNode(node, "ImportDeclaration");
|
|
16336
16336
|
}
|
|
16337
16337
|
parseImportSource() {
|
|
16338
|
-
if (!this.match(
|
|
16338
|
+
if (!this.match(134))
|
|
16339
16339
|
this.unexpected();
|
|
16340
16340
|
return this.parseExprAtom();
|
|
16341
16341
|
}
|
|
@@ -16365,13 +16365,13 @@ var require_lib = __commonJS({
|
|
|
16365
16365
|
});
|
|
16366
16366
|
}
|
|
16367
16367
|
attrNames.add(keyName);
|
|
16368
|
-
if (this.match(
|
|
16368
|
+
if (this.match(134)) {
|
|
16369
16369
|
node.key = this.parseStringLiteral(keyName);
|
|
16370
16370
|
} else {
|
|
16371
16371
|
node.key = this.parseIdentifier(true);
|
|
16372
16372
|
}
|
|
16373
16373
|
this.expect(14);
|
|
16374
|
-
if (!this.match(
|
|
16374
|
+
if (!this.match(134)) {
|
|
16375
16375
|
throw this.raise(Errors.ModuleAttributeInvalidValue, this.state.startLoc);
|
|
16376
16376
|
}
|
|
16377
16377
|
node.value = this.parseStringLiteral(this.state.value);
|
|
@@ -16396,7 +16396,7 @@ var require_lib = __commonJS({
|
|
|
16396
16396
|
}
|
|
16397
16397
|
attributes.add(node.key.name);
|
|
16398
16398
|
this.expect(14);
|
|
16399
|
-
if (!this.match(
|
|
16399
|
+
if (!this.match(134)) {
|
|
16400
16400
|
throw this.raise(Errors.ModuleAttributeInvalidValue, this.state.startLoc);
|
|
16401
16401
|
}
|
|
16402
16402
|
node.value = this.parseStringLiteral(this.state.value);
|
|
@@ -16477,7 +16477,7 @@ var require_lib = __commonJS({
|
|
|
16477
16477
|
break;
|
|
16478
16478
|
}
|
|
16479
16479
|
const specifier = this.startNode();
|
|
16480
|
-
const importedIsString = this.match(
|
|
16480
|
+
const importedIsString = this.match(134);
|
|
16481
16481
|
const isMaybeTypeOnly = this.isContextual(130);
|
|
16482
16482
|
specifier.imported = this.parseModuleExportName();
|
|
16483
16483
|
const importSpecifier = this.parseImportSpecifier(specifier, importedIsString, node.importKind === "type" || node.importKind === "typeof", isMaybeTypeOnly, void 0);
|
|
@@ -57938,22 +57938,6 @@ var freeDomProps = {
|
|
|
57938
57938
|
default: void 0
|
|
57939
57939
|
},
|
|
57940
57940
|
keyboard: Boolean,
|
|
57941
|
-
x: {
|
|
57942
|
-
type: Number,
|
|
57943
|
-
default: 0
|
|
57944
|
-
},
|
|
57945
|
-
y: {
|
|
57946
|
-
type: Number,
|
|
57947
|
-
default: 0
|
|
57948
|
-
},
|
|
57949
|
-
width: {
|
|
57950
|
-
type: Number,
|
|
57951
|
-
default: void 0
|
|
57952
|
-
},
|
|
57953
|
-
height: {
|
|
57954
|
-
type: Number,
|
|
57955
|
-
default: void 0
|
|
57956
|
-
},
|
|
57957
57941
|
handle: {
|
|
57958
57942
|
type: String,
|
|
57959
57943
|
default: void 0
|
|
@@ -58313,6 +58297,14 @@ var freeDomWrapProps = {
|
|
|
58313
58297
|
keyboard: Boolean,
|
|
58314
58298
|
disabledBatch: Boolean,
|
|
58315
58299
|
handle: freeDomProps.handle,
|
|
58300
|
+
width: {
|
|
58301
|
+
type: Number,
|
|
58302
|
+
default: void 0
|
|
58303
|
+
},
|
|
58304
|
+
height: {
|
|
58305
|
+
type: Number,
|
|
58306
|
+
default: void 0
|
|
58307
|
+
},
|
|
58316
58308
|
minWidth: {
|
|
58317
58309
|
type: Number,
|
|
58318
58310
|
default: void 0
|
|
@@ -58331,13 +58323,13 @@ var freeDomWrapProps = {
|
|
|
58331
58323
|
var FreeDomWrap = defineComponent6({
|
|
58332
58324
|
name: "FreeDomWrap",
|
|
58333
58325
|
props: freeDomWrapProps,
|
|
58334
|
-
emits: ["batch-select", "drop"],
|
|
58326
|
+
emits: ["batch-select", "drop", "update:width", "update:height"],
|
|
58335
58327
|
setup(props, { emit }) {
|
|
58336
58328
|
const eventBus = useEventBus();
|
|
58337
58329
|
const nodes = ref13([]);
|
|
58338
58330
|
const history = useOperateHistory(nodes);
|
|
58339
|
-
const width = ref13();
|
|
58340
|
-
const height = ref13();
|
|
58331
|
+
const width = ref13(props.width);
|
|
58332
|
+
const height = ref13(props.height);
|
|
58341
58333
|
const rectRef = shallowRef6();
|
|
58342
58334
|
const wrapRect = useElementBounding(rectRef);
|
|
58343
58335
|
const wrapStyle = computed11(() => ({
|
|
@@ -58354,6 +58346,8 @@ var FreeDomWrap = defineComponent6({
|
|
|
58354
58346
|
return;
|
|
58355
58347
|
width.value = w;
|
|
58356
58348
|
height.value = h7;
|
|
58349
|
+
emit("update:width", w);
|
|
58350
|
+
emit("update:height", h7);
|
|
58357
58351
|
runCorrect();
|
|
58358
58352
|
}, { immediate: true });
|
|
58359
58353
|
const selectedNodes = computed11(() => nodes.value.filter((node) => node.node.selected));
|