@angular-eslint/bundled-angular-compiler 22.0.1-alpha.9 → 22.1.0
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.js +255 -152
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -158,6 +158,7 @@ __export(index_exports, {
|
|
|
158
158
|
SplitInterpolation: () => SplitInterpolation,
|
|
159
159
|
SpreadElement: () => SpreadElement,
|
|
160
160
|
SpreadElementExpr: () => SpreadElementExpr,
|
|
161
|
+
StartTagComment: () => StartTagComment,
|
|
161
162
|
Statement: () => Statement,
|
|
162
163
|
StmtModifier: () => StmtModifier,
|
|
163
164
|
StringToken: () => StringToken,
|
|
@@ -305,7 +306,7 @@ __export(index_exports, {
|
|
|
305
306
|
});
|
|
306
307
|
module.exports = __toCommonJS(index_exports);
|
|
307
308
|
|
|
308
|
-
// ../../node_modules/.pnpm/@angular+compiler@22.0.
|
|
309
|
+
// ../../node_modules/.pnpm/@angular+compiler@22.0.5/node_modules/@angular/compiler/fesm2022/compiler.mjs
|
|
309
310
|
var _SELECTOR_REGEXP = new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`, "g");
|
|
310
311
|
var CssSelector = class _CssSelector {
|
|
311
312
|
static {
|
|
@@ -647,31 +648,61 @@ var SecurityContext;
|
|
|
647
648
|
var _SECURITY_SCHEMA;
|
|
648
649
|
var SVG_NAMESPACE$1 = "svg";
|
|
649
650
|
var MATH_ML_NAMESPACE$1 = "math";
|
|
651
|
+
var NO_NAMESPACE = "";
|
|
652
|
+
var MATCH_ALL_ELEMENTS = "*";
|
|
653
|
+
var createNullObj = /* @__PURE__ */ __name(() => /* @__PURE__ */ Object.create(null), "createNullObj");
|
|
650
654
|
function SECURITY_SCHEMA() {
|
|
651
|
-
if (
|
|
652
|
-
_SECURITY_SCHEMA
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
655
|
+
if (_SECURITY_SCHEMA) {
|
|
656
|
+
return _SECURITY_SCHEMA;
|
|
657
|
+
}
|
|
658
|
+
_SECURITY_SCHEMA = createNullObj();
|
|
659
|
+
registerContext(SecurityContext.HTML, void 0, [["iframe", ["srcdoc"]], ["*", ["innerHTML", "outerHTML"]]]);
|
|
660
|
+
registerContext(SecurityContext.STYLE, void 0, [["*", ["style"]]]);
|
|
661
|
+
registerContext(SecurityContext.URL, void 0, [["*", ["formAction"]], ["area", ["href"]], ["a", ["href", "xlink:href"]], ["form", ["action"]], ["img", ["src"]], ["video", ["src"]]]);
|
|
662
|
+
registerContext(SecurityContext.URL, MATH_ML_NAMESPACE$1, [["*", ["href", "xlink:href"]]]);
|
|
663
|
+
registerContext(SecurityContext.RESOURCE_URL, void 0, [["base", ["href"]], ["embed", ["src"]], ["frame", ["src"]], ["iframe", ["src"]], ["link", ["href"]], ["object", ["codebase", "data"]]]);
|
|
664
|
+
registerContext(SecurityContext.URL, SVG_NAMESPACE$1, [["a", ["href", "xlink:href"]]]);
|
|
665
|
+
registerContext(SecurityContext.ATTRIBUTE_NO_BINDING, SVG_NAMESPACE$1, [["animate", ["attributeName", "values", "to", "from"]], ["set", ["to", "attributeName"]], ["animateMotion", ["attributeName"]], ["animateTransform", ["attributeName"]]]);
|
|
666
|
+
registerContext(SecurityContext.ATTRIBUTE_NO_BINDING, void 0, [["unknown", ["attributeName", "values", "to", "from", "sandbox", "allow", "allowFullscreen", "referrerPolicy", "csp", "fetchPriority", "credentialless"]], ["iframe", ["sandbox", "allow", "allowFullscreen", "referrerPolicy", "csp", "fetchPriority", "credentialless"]]]);
|
|
662
667
|
return _SECURITY_SCHEMA;
|
|
663
668
|
}
|
|
664
669
|
__name(SECURITY_SCHEMA, "SECURITY_SCHEMA");
|
|
665
670
|
function registerContext(ctx, namespace, specs) {
|
|
671
|
+
const nsKey = namespace ?? NO_NAMESPACE;
|
|
666
672
|
for (const [element2, attributeNames] of specs) {
|
|
667
|
-
|
|
668
|
-
tagName = tagName.toLowerCase();
|
|
673
|
+
const tagName = element2.toLowerCase();
|
|
669
674
|
for (const attr of attributeNames) {
|
|
670
|
-
|
|
675
|
+
const attrLower = attr.toLowerCase();
|
|
676
|
+
const attrSchema = _SECURITY_SCHEMA[attrLower] ??= createNullObj();
|
|
677
|
+
const nsSchema = attrSchema[nsKey] ??= createNullObj();
|
|
678
|
+
nsSchema[tagName] = ctx;
|
|
671
679
|
}
|
|
672
680
|
}
|
|
673
681
|
}
|
|
674
682
|
__name(registerContext, "registerContext");
|
|
683
|
+
function checkSecurityContext(tagName, propName, namespace) {
|
|
684
|
+
const securitySchema = SECURITY_SCHEMA();
|
|
685
|
+
const attrSchema = securitySchema[propName.toLowerCase()];
|
|
686
|
+
if (!attrSchema) {
|
|
687
|
+
return SecurityContext.NONE;
|
|
688
|
+
}
|
|
689
|
+
const tagLower = tagName.toLowerCase();
|
|
690
|
+
let context;
|
|
691
|
+
if (namespace) {
|
|
692
|
+
const nsSchema = attrSchema[namespace];
|
|
693
|
+
if (nsSchema) {
|
|
694
|
+
context = nsSchema[tagLower] ?? nsSchema[MATCH_ALL_ELEMENTS];
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
if (context === void 0) {
|
|
698
|
+
const defaultSchema = attrSchema[NO_NAMESPACE];
|
|
699
|
+
if (defaultSchema) {
|
|
700
|
+
context = defaultSchema[tagLower] ?? defaultSchema[MATCH_ALL_ELEMENTS];
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
return context ?? SecurityContext.NONE;
|
|
704
|
+
}
|
|
705
|
+
__name(checkSecurityContext, "checkSecurityContext");
|
|
675
706
|
var emitDistinctChangesOnlyDefaultValue = true;
|
|
676
707
|
var ViewEncapsulation$1;
|
|
677
708
|
(function(ViewEncapsulation2) {
|
|
@@ -4441,26 +4472,12 @@ var AbstractEmitterVisitor = class {
|
|
|
4441
4472
|
this.visitAllObjects((expr) => expr.visitExpression(this, ctx), expressions, ctx, separator);
|
|
4442
4473
|
}
|
|
4443
4474
|
visitAllObjects(handler, expressions, ctx, separator) {
|
|
4444
|
-
let incrementedIndent = false;
|
|
4445
4475
|
for (let i = 0; i < expressions.length; i++) {
|
|
4446
4476
|
if (i > 0) {
|
|
4447
|
-
|
|
4448
|
-
ctx.print(null, separator, true);
|
|
4449
|
-
if (!incrementedIndent) {
|
|
4450
|
-
ctx.incIndent();
|
|
4451
|
-
ctx.incIndent();
|
|
4452
|
-
incrementedIndent = true;
|
|
4453
|
-
}
|
|
4454
|
-
} else {
|
|
4455
|
-
ctx.print(null, separator, false);
|
|
4456
|
-
}
|
|
4477
|
+
ctx.print(null, separator, false);
|
|
4457
4478
|
}
|
|
4458
4479
|
handler(expressions[i]);
|
|
4459
4480
|
}
|
|
4460
|
-
if (incrementedIndent) {
|
|
4461
|
-
ctx.decIndent();
|
|
4462
|
-
ctx.decIndent();
|
|
4463
|
-
}
|
|
4464
4481
|
}
|
|
4465
4482
|
visitAllStatements(statements, ctx) {
|
|
4466
4483
|
statements.forEach((stmt) => stmt.visitStatement(this, ctx));
|
|
@@ -12675,6 +12692,22 @@ var Attribute = class extends NodeWithI18n {
|
|
|
12675
12692
|
return visitor.visitAttribute(this, context);
|
|
12676
12693
|
}
|
|
12677
12694
|
};
|
|
12695
|
+
var StartTagComment = class {
|
|
12696
|
+
static {
|
|
12697
|
+
__name(this, "StartTagComment");
|
|
12698
|
+
}
|
|
12699
|
+
value;
|
|
12700
|
+
type;
|
|
12701
|
+
sourceSpan;
|
|
12702
|
+
constructor(value, type, sourceSpan) {
|
|
12703
|
+
this.value = value;
|
|
12704
|
+
this.type = type;
|
|
12705
|
+
this.sourceSpan = sourceSpan;
|
|
12706
|
+
}
|
|
12707
|
+
visit(visitor, context) {
|
|
12708
|
+
return visitor.visitStartTagComment ? visitor.visitStartTagComment(this, context) : void 0;
|
|
12709
|
+
}
|
|
12710
|
+
};
|
|
12678
12711
|
var Element2 = class extends NodeWithI18n {
|
|
12679
12712
|
static {
|
|
12680
12713
|
__name(this, "Element");
|
|
@@ -12687,7 +12720,8 @@ var Element2 = class extends NodeWithI18n {
|
|
|
12687
12720
|
startSourceSpan;
|
|
12688
12721
|
endSourceSpan;
|
|
12689
12722
|
isVoid;
|
|
12690
|
-
|
|
12723
|
+
comments;
|
|
12724
|
+
constructor(name, attrs, directives, children, isSelfClosing, sourceSpan, startSourceSpan, endSourceSpan = null, isVoid, i18n2, comments = []) {
|
|
12691
12725
|
super(sourceSpan, i18n2);
|
|
12692
12726
|
this.name = name;
|
|
12693
12727
|
this.attrs = attrs;
|
|
@@ -12697,6 +12731,7 @@ var Element2 = class extends NodeWithI18n {
|
|
|
12697
12731
|
this.startSourceSpan = startSourceSpan;
|
|
12698
12732
|
this.endSourceSpan = endSourceSpan;
|
|
12699
12733
|
this.isVoid = isVoid;
|
|
12734
|
+
this.comments = comments;
|
|
12700
12735
|
}
|
|
12701
12736
|
visit(visitor, context) {
|
|
12702
12737
|
return visitor.visitElement(this, context);
|
|
@@ -12752,7 +12787,8 @@ var Component2 = class extends NodeWithI18n {
|
|
|
12752
12787
|
isSelfClosing;
|
|
12753
12788
|
startSourceSpan;
|
|
12754
12789
|
endSourceSpan;
|
|
12755
|
-
|
|
12790
|
+
comments;
|
|
12791
|
+
constructor(componentName, tagName, fullName, attrs, directives, children, isSelfClosing, sourceSpan, startSourceSpan, endSourceSpan = null, i18n2, comments = []) {
|
|
12756
12792
|
super(sourceSpan, i18n2);
|
|
12757
12793
|
this.componentName = componentName;
|
|
12758
12794
|
this.tagName = tagName;
|
|
@@ -12763,6 +12799,7 @@ var Component2 = class extends NodeWithI18n {
|
|
|
12763
12799
|
this.isSelfClosing = isSelfClosing;
|
|
12764
12800
|
this.startSourceSpan = startSourceSpan;
|
|
12765
12801
|
this.endSourceSpan = endSourceSpan;
|
|
12802
|
+
this.comments = comments;
|
|
12766
12803
|
}
|
|
12767
12804
|
visit(visitor, context) {
|
|
12768
12805
|
return visitor.visitComponent(this, context);
|
|
@@ -12844,11 +12881,14 @@ var RecursiveVisitor2 = class {
|
|
|
12844
12881
|
this.visitChildren(context, (visit) => {
|
|
12845
12882
|
visit(ast.attrs);
|
|
12846
12883
|
visit(ast.directives);
|
|
12884
|
+
visit(ast.comments);
|
|
12847
12885
|
visit(ast.children);
|
|
12848
12886
|
});
|
|
12849
12887
|
}
|
|
12850
12888
|
visitAttribute(ast, context) {
|
|
12851
12889
|
}
|
|
12890
|
+
visitStartTagComment(ast, context) {
|
|
12891
|
+
}
|
|
12852
12892
|
visitText(ast, context) {
|
|
12853
12893
|
}
|
|
12854
12894
|
visitComment(ast, context) {
|
|
@@ -12873,6 +12913,7 @@ var RecursiveVisitor2 = class {
|
|
|
12873
12913
|
visitComponent(component, context) {
|
|
12874
12914
|
this.visitChildren(context, (visit) => {
|
|
12875
12915
|
visit(component.attrs);
|
|
12916
|
+
visit(component.comments);
|
|
12876
12917
|
visit(component.children);
|
|
12877
12918
|
});
|
|
12878
12919
|
}
|
|
@@ -15144,7 +15185,7 @@ var _Tokenizer = class {
|
|
|
15144
15185
|
this.handleError(e);
|
|
15145
15186
|
}
|
|
15146
15187
|
}
|
|
15147
|
-
this._beginToken(
|
|
15188
|
+
this._beginToken(42);
|
|
15148
15189
|
this._endToken([]);
|
|
15149
15190
|
}
|
|
15150
15191
|
_getBlockName() {
|
|
@@ -15164,7 +15205,7 @@ var _Tokenizer = class {
|
|
|
15164
15205
|
}
|
|
15165
15206
|
_consumeBlockStart(start) {
|
|
15166
15207
|
this._requireCharCode($AT);
|
|
15167
|
-
this._beginToken(
|
|
15208
|
+
this._beginToken(25, start);
|
|
15168
15209
|
const startToken = this._endToken([this._getBlockName()]);
|
|
15169
15210
|
if (this._cursor.peek() === $LPAREN) {
|
|
15170
15211
|
this._cursor.advance();
|
|
@@ -15173,37 +15214,37 @@ var _Tokenizer = class {
|
|
|
15173
15214
|
if (this._attemptCharCode($RPAREN)) {
|
|
15174
15215
|
this._attemptCharCodeUntilFn(isNotWhitespace);
|
|
15175
15216
|
} else {
|
|
15176
|
-
startToken.type =
|
|
15217
|
+
startToken.type = 29;
|
|
15177
15218
|
return;
|
|
15178
15219
|
}
|
|
15179
15220
|
}
|
|
15180
15221
|
if (startToken.parts[0] === "default never" && this._attemptCharCode($SEMICOLON)) {
|
|
15181
|
-
this._beginToken(25);
|
|
15182
|
-
this._endToken([]);
|
|
15183
15222
|
this._beginToken(26);
|
|
15184
15223
|
this._endToken([]);
|
|
15224
|
+
this._beginToken(27);
|
|
15225
|
+
this._endToken([]);
|
|
15185
15226
|
return;
|
|
15186
15227
|
}
|
|
15187
15228
|
if (this._attemptCharCode($LBRACE)) {
|
|
15188
|
-
this._beginToken(
|
|
15229
|
+
this._beginToken(26);
|
|
15189
15230
|
this._endToken([]);
|
|
15190
15231
|
} else if (this._isBlockStart() && (startToken.parts[0] === "case" || startToken.parts[0] === "default")) {
|
|
15191
|
-
this._beginToken(25);
|
|
15192
|
-
this._endToken([]);
|
|
15193
15232
|
this._beginToken(26);
|
|
15194
15233
|
this._endToken([]);
|
|
15234
|
+
this._beginToken(27);
|
|
15235
|
+
this._endToken([]);
|
|
15195
15236
|
} else {
|
|
15196
|
-
startToken.type =
|
|
15237
|
+
startToken.type = 29;
|
|
15197
15238
|
}
|
|
15198
15239
|
}
|
|
15199
15240
|
_consumeBlockEnd(start) {
|
|
15200
|
-
this._beginToken(
|
|
15241
|
+
this._beginToken(27, start);
|
|
15201
15242
|
this._endToken([]);
|
|
15202
15243
|
}
|
|
15203
15244
|
_consumeBlockParameters() {
|
|
15204
15245
|
this._attemptCharCodeUntilFn(isBlockParameterChar);
|
|
15205
15246
|
while (this._cursor.peek() !== $RPAREN && this._cursor.peek() !== $EOF) {
|
|
15206
|
-
this._beginToken(
|
|
15247
|
+
this._beginToken(28);
|
|
15207
15248
|
const start = this._cursor.clone();
|
|
15208
15249
|
let inQuote = null;
|
|
15209
15250
|
let openParens = 0;
|
|
@@ -15232,29 +15273,29 @@ var _Tokenizer = class {
|
|
|
15232
15273
|
}
|
|
15233
15274
|
_consumeLetDeclaration(start) {
|
|
15234
15275
|
this._requireStr("@let");
|
|
15235
|
-
this._beginToken(
|
|
15276
|
+
this._beginToken(30, start);
|
|
15236
15277
|
if (isWhitespace(this._cursor.peek())) {
|
|
15237
15278
|
this._attemptCharCodeUntilFn(isNotWhitespace);
|
|
15238
15279
|
} else {
|
|
15239
15280
|
const token = this._endToken([this._cursor.getChars(start)]);
|
|
15240
|
-
token.type =
|
|
15281
|
+
token.type = 33;
|
|
15241
15282
|
return;
|
|
15242
15283
|
}
|
|
15243
15284
|
const startToken = this._endToken([this._getLetDeclarationName()]);
|
|
15244
15285
|
this._attemptCharCodeUntilFn(isNotWhitespace);
|
|
15245
15286
|
if (!this._attemptCharCode($EQ)) {
|
|
15246
|
-
startToken.type =
|
|
15287
|
+
startToken.type = 33;
|
|
15247
15288
|
return;
|
|
15248
15289
|
}
|
|
15249
15290
|
this._attemptCharCodeUntilFn((code) => isNotWhitespace(code) && !isNewLine(code));
|
|
15250
15291
|
this._consumeLetDeclarationValue();
|
|
15251
15292
|
const endChar = this._cursor.peek();
|
|
15252
15293
|
if (endChar === $SEMICOLON) {
|
|
15253
|
-
this._beginToken(
|
|
15294
|
+
this._beginToken(32);
|
|
15254
15295
|
this._cursor.advance();
|
|
15255
15296
|
this._endToken([]);
|
|
15256
15297
|
} else {
|
|
15257
|
-
startToken.type =
|
|
15298
|
+
startToken.type = 33;
|
|
15258
15299
|
startToken.sourceSpan = this._cursor.getSpan(start);
|
|
15259
15300
|
}
|
|
15260
15301
|
}
|
|
@@ -15272,7 +15313,7 @@ var _Tokenizer = class {
|
|
|
15272
15313
|
}
|
|
15273
15314
|
_consumeLetDeclarationValue() {
|
|
15274
15315
|
const start = this._cursor.clone();
|
|
15275
|
-
this._beginToken(
|
|
15316
|
+
this._beginToken(31, start);
|
|
15276
15317
|
while (this._cursor.peek() !== $EOF) {
|
|
15277
15318
|
const char = this._cursor.peek();
|
|
15278
15319
|
if (char === $SEMICOLON) {
|
|
@@ -15513,16 +15554,16 @@ var _Tokenizer = class {
|
|
|
15513
15554
|
this._endToken([]);
|
|
15514
15555
|
}
|
|
15515
15556
|
_consumeCdata(start) {
|
|
15516
|
-
this._beginToken(
|
|
15557
|
+
this._beginToken(13, start);
|
|
15517
15558
|
this._requireStr("CDATA[");
|
|
15518
15559
|
this._endToken([]);
|
|
15519
15560
|
this._consumeRawText(false, () => this._attemptStr("]]>"));
|
|
15520
|
-
this._beginToken(
|
|
15561
|
+
this._beginToken(14);
|
|
15521
15562
|
this._requireStr("]]>");
|
|
15522
15563
|
this._endToken([]);
|
|
15523
15564
|
}
|
|
15524
15565
|
_consumeDocType(start) {
|
|
15525
|
-
this._beginToken(
|
|
15566
|
+
this._beginToken(19, start);
|
|
15526
15567
|
const contentStart = this._cursor.clone();
|
|
15527
15568
|
this._attemptUntilChar($GT);
|
|
15528
15569
|
const content = this._cursor.getChars(contentStart);
|
|
@@ -15547,11 +15588,17 @@ var _Tokenizer = class {
|
|
|
15547
15588
|
const name = this._cursor.getChars(nameStart);
|
|
15548
15589
|
return [prefix, name];
|
|
15549
15590
|
}
|
|
15550
|
-
_consumeSingleLineComment() {
|
|
15591
|
+
_consumeSingleLineComment(start) {
|
|
15592
|
+
const contentStart = this._cursor.clone();
|
|
15551
15593
|
this._attemptCharCodeUntilFn((code) => isNewLine(code) || code === $EOF);
|
|
15594
|
+
const spanEnd = this._cursor.clone();
|
|
15595
|
+
const content = spanEnd.getChars(contentStart);
|
|
15596
|
+
this._beginToken(12, start);
|
|
15597
|
+
this._endToken([content, "single"], spanEnd);
|
|
15552
15598
|
this._attemptCharCodeUntilFn(isNotWhitespace);
|
|
15553
15599
|
}
|
|
15554
|
-
_consumeMultiLineComment() {
|
|
15600
|
+
_consumeMultiLineComment(start) {
|
|
15601
|
+
const contentStart = this._cursor.clone();
|
|
15555
15602
|
this._attemptCharCodeUntilFn((code) => {
|
|
15556
15603
|
if (code === $EOF) {
|
|
15557
15604
|
return true;
|
|
@@ -15563,9 +15610,15 @@ var _Tokenizer = class {
|
|
|
15563
15610
|
}
|
|
15564
15611
|
return false;
|
|
15565
15612
|
});
|
|
15613
|
+
const contentEnd = this._cursor.clone();
|
|
15614
|
+
const content = contentEnd.getChars(contentStart);
|
|
15615
|
+
let spanEnd = contentEnd;
|
|
15566
15616
|
if (this._attemptStr("*/")) {
|
|
15617
|
+
spanEnd = this._cursor.clone();
|
|
15567
15618
|
this._attemptCharCodeUntilFn(isNotWhitespace);
|
|
15568
15619
|
}
|
|
15620
|
+
this._beginToken(12, start);
|
|
15621
|
+
this._endToken([content, "multi"], spanEnd);
|
|
15569
15622
|
}
|
|
15570
15623
|
_consumeTagOpen(start) {
|
|
15571
15624
|
let tagName;
|
|
@@ -15593,12 +15646,13 @@ var _Tokenizer = class {
|
|
|
15593
15646
|
this._attemptCharCodeUntilFn(isNotWhitespace);
|
|
15594
15647
|
}
|
|
15595
15648
|
while (true) {
|
|
15649
|
+
const commentStart = this._cursor.clone();
|
|
15596
15650
|
if (this._attemptStr("//")) {
|
|
15597
|
-
this._consumeSingleLineComment();
|
|
15651
|
+
this._consumeSingleLineComment(commentStart);
|
|
15598
15652
|
continue;
|
|
15599
15653
|
}
|
|
15600
15654
|
if (this._attemptStr("/*")) {
|
|
15601
|
-
this._consumeMultiLineComment();
|
|
15655
|
+
this._consumeMultiLineComment(commentStart);
|
|
15602
15656
|
continue;
|
|
15603
15657
|
}
|
|
15604
15658
|
if (isAttributeTerminator(this._cursor.peek())) {
|
|
@@ -15615,7 +15669,7 @@ var _Tokenizer = class {
|
|
|
15615
15669
|
this._consumeAttribute();
|
|
15616
15670
|
}
|
|
15617
15671
|
}
|
|
15618
|
-
if (openToken.type ===
|
|
15672
|
+
if (openToken.type === 34) {
|
|
15619
15673
|
this._consumeComponentOpenEnd();
|
|
15620
15674
|
} else {
|
|
15621
15675
|
this._consumeTagOpenEnd();
|
|
@@ -15623,7 +15677,7 @@ var _Tokenizer = class {
|
|
|
15623
15677
|
} catch (e) {
|
|
15624
15678
|
if (e instanceof ParseError) {
|
|
15625
15679
|
if (openToken) {
|
|
15626
|
-
openToken.type = openToken.type ===
|
|
15680
|
+
openToken.type = openToken.type === 34 ? 38 : 4;
|
|
15627
15681
|
} else {
|
|
15628
15682
|
this._beginToken(5, start);
|
|
15629
15683
|
this._endToken(["<"]);
|
|
@@ -15648,7 +15702,7 @@ var _Tokenizer = class {
|
|
|
15648
15702
|
this._attemptCharCodeUntilFn(isNotWhitespace);
|
|
15649
15703
|
return this._attemptCharCode($GT);
|
|
15650
15704
|
});
|
|
15651
|
-
this._beginToken(openToken.type ===
|
|
15705
|
+
this._beginToken(openToken.type === 34 ? 37 : 3);
|
|
15652
15706
|
this._requireCharCodeUntilFn((code) => code === $GT, 3);
|
|
15653
15707
|
this._cursor.advance();
|
|
15654
15708
|
this._endToken(openToken.parts);
|
|
@@ -15659,7 +15713,7 @@ var _Tokenizer = class {
|
|
|
15659
15713
|
return this._endToken(parts);
|
|
15660
15714
|
}
|
|
15661
15715
|
_consumeComponentOpenStart(start) {
|
|
15662
|
-
this._beginToken(
|
|
15716
|
+
this._beginToken(34, start);
|
|
15663
15717
|
const parts = this._consumeComponentName();
|
|
15664
15718
|
return this._endToken(parts);
|
|
15665
15719
|
}
|
|
@@ -15691,7 +15745,7 @@ var _Tokenizer = class {
|
|
|
15691
15745
|
if (attrNameStart === $SQ || attrNameStart === $DQ) {
|
|
15692
15746
|
throw this._createError(_unexpectedCharacterErrorMsg(attrNameStart), this._cursor.getSpan());
|
|
15693
15747
|
}
|
|
15694
|
-
this._beginToken(
|
|
15748
|
+
this._beginToken(15);
|
|
15695
15749
|
let nameEndPredicate;
|
|
15696
15750
|
if (this._openDirectiveCount > 0) {
|
|
15697
15751
|
let openParens = 0;
|
|
@@ -15729,15 +15783,15 @@ var _Tokenizer = class {
|
|
|
15729
15783
|
const quoteChar = this._cursor.peek();
|
|
15730
15784
|
this._consumeQuote(quoteChar);
|
|
15731
15785
|
const endPredicate = /* @__PURE__ */ __name(() => this._cursor.peek() === quoteChar, "endPredicate");
|
|
15732
|
-
this._consumeWithInterpolation(
|
|
15786
|
+
this._consumeWithInterpolation(17, 18, endPredicate, endPredicate);
|
|
15733
15787
|
this._consumeQuote(quoteChar);
|
|
15734
15788
|
} else {
|
|
15735
15789
|
const endPredicate = /* @__PURE__ */ __name(() => isNameEnd(this._cursor.peek()), "endPredicate");
|
|
15736
|
-
this._consumeWithInterpolation(
|
|
15790
|
+
this._consumeWithInterpolation(17, 18, endPredicate, endPredicate);
|
|
15737
15791
|
}
|
|
15738
15792
|
}
|
|
15739
15793
|
_consumeQuote(quoteChar) {
|
|
15740
|
-
this._beginToken(
|
|
15794
|
+
this._beginToken(16);
|
|
15741
15795
|
this._requireCharCode(quoteChar);
|
|
15742
15796
|
this._endToken([String.fromCodePoint(quoteChar)]);
|
|
15743
15797
|
}
|
|
@@ -15748,7 +15802,7 @@ var _Tokenizer = class {
|
|
|
15748
15802
|
this._endToken([]);
|
|
15749
15803
|
}
|
|
15750
15804
|
_consumeComponentOpenEnd() {
|
|
15751
|
-
const tokenType = this._attemptCharCode($SLASH) ?
|
|
15805
|
+
const tokenType = this._attemptCharCode($SLASH) ? 36 : 35;
|
|
15752
15806
|
this._beginToken(tokenType);
|
|
15753
15807
|
this._requireCharCode($GT);
|
|
15754
15808
|
this._endToken([]);
|
|
@@ -15760,7 +15814,7 @@ var _Tokenizer = class {
|
|
|
15760
15814
|
clone.advance();
|
|
15761
15815
|
}
|
|
15762
15816
|
if (isSelectorlessNameStart(clone.peek())) {
|
|
15763
|
-
this._beginToken(
|
|
15817
|
+
this._beginToken(37, start);
|
|
15764
15818
|
const parts = this._consumeComponentName();
|
|
15765
15819
|
this._attemptCharCodeUntilFn(isNotWhitespace);
|
|
15766
15820
|
this._requireCharCode($GT);
|
|
@@ -15776,10 +15830,10 @@ var _Tokenizer = class {
|
|
|
15776
15830
|
this._endToken(prefixAndName);
|
|
15777
15831
|
}
|
|
15778
15832
|
_consumeExpansionFormStart() {
|
|
15779
|
-
this._beginToken(
|
|
15833
|
+
this._beginToken(20);
|
|
15780
15834
|
this._requireCharCode($LBRACE);
|
|
15781
15835
|
this._endToken([]);
|
|
15782
|
-
this._expansionCaseStack.push(
|
|
15836
|
+
this._expansionCaseStack.push(20);
|
|
15783
15837
|
this._beginToken(7);
|
|
15784
15838
|
const condition = this._readUntil($COMMA);
|
|
15785
15839
|
const normalizedCondition = this._processCarriageReturns(condition);
|
|
@@ -15800,25 +15854,25 @@ var _Tokenizer = class {
|
|
|
15800
15854
|
this._attemptCharCodeUntilFn(isNotWhitespace);
|
|
15801
15855
|
}
|
|
15802
15856
|
_consumeExpansionCaseStart() {
|
|
15803
|
-
this._beginToken(
|
|
15857
|
+
this._beginToken(21);
|
|
15804
15858
|
const value = this._readUntil($LBRACE).trim();
|
|
15805
15859
|
this._endToken([value]);
|
|
15806
15860
|
this._attemptCharCodeUntilFn(isNotWhitespace);
|
|
15807
|
-
this._beginToken(
|
|
15861
|
+
this._beginToken(22);
|
|
15808
15862
|
this._requireCharCode($LBRACE);
|
|
15809
15863
|
this._endToken([]);
|
|
15810
15864
|
this._attemptCharCodeUntilFn(isNotWhitespace);
|
|
15811
|
-
this._expansionCaseStack.push(
|
|
15865
|
+
this._expansionCaseStack.push(22);
|
|
15812
15866
|
}
|
|
15813
15867
|
_consumeExpansionCaseEnd() {
|
|
15814
|
-
this._beginToken(
|
|
15868
|
+
this._beginToken(23);
|
|
15815
15869
|
this._requireCharCode($RBRACE);
|
|
15816
15870
|
this._endToken([]);
|
|
15817
15871
|
this._attemptCharCodeUntilFn(isNotWhitespace);
|
|
15818
15872
|
this._expansionCaseStack.pop();
|
|
15819
15873
|
}
|
|
15820
15874
|
_consumeExpansionFormEnd() {
|
|
15821
|
-
this._beginToken(
|
|
15875
|
+
this._beginToken(24);
|
|
15822
15876
|
this._requireCharCode($RBRACE);
|
|
15823
15877
|
this._endToken([]);
|
|
15824
15878
|
this._expansionCaseStack.pop();
|
|
@@ -15889,7 +15943,7 @@ var _Tokenizer = class {
|
|
|
15889
15943
|
while (isSelectorlessNameChar(this._cursor.peek())) {
|
|
15890
15944
|
this._cursor.advance();
|
|
15891
15945
|
}
|
|
15892
|
-
this._beginToken(
|
|
15946
|
+
this._beginToken(39, start);
|
|
15893
15947
|
const name = this._cursor.getChars(nameStart);
|
|
15894
15948
|
this._endToken([name]);
|
|
15895
15949
|
this._attemptCharCodeUntilFn(isNotWhitespace);
|
|
@@ -15897,7 +15951,7 @@ var _Tokenizer = class {
|
|
|
15897
15951
|
return;
|
|
15898
15952
|
}
|
|
15899
15953
|
this._openDirectiveCount++;
|
|
15900
|
-
this._beginToken(
|
|
15954
|
+
this._beginToken(40);
|
|
15901
15955
|
this._cursor.advance();
|
|
15902
15956
|
this._endToken([]);
|
|
15903
15957
|
this._attemptCharCodeUntilFn(isNotWhitespace);
|
|
@@ -15912,7 +15966,7 @@ var _Tokenizer = class {
|
|
|
15912
15966
|
}
|
|
15913
15967
|
throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(start));
|
|
15914
15968
|
}
|
|
15915
|
-
this._beginToken(
|
|
15969
|
+
this._beginToken(41);
|
|
15916
15970
|
this._cursor.advance();
|
|
15917
15971
|
this._endToken([]);
|
|
15918
15972
|
this._attemptCharCodeUntilFn(isNotWhitespace);
|
|
@@ -15957,10 +16011,10 @@ var _Tokenizer = class {
|
|
|
15957
16011
|
return this._isInExpansionCase() || this._isInExpansionForm();
|
|
15958
16012
|
}
|
|
15959
16013
|
_isInExpansionCase() {
|
|
15960
|
-
return this._expansionCaseStack.length > 0 && this._expansionCaseStack[this._expansionCaseStack.length - 1] ===
|
|
16014
|
+
return this._expansionCaseStack.length > 0 && this._expansionCaseStack[this._expansionCaseStack.length - 1] === 22;
|
|
15961
16015
|
}
|
|
15962
16016
|
_isInExpansionForm() {
|
|
15963
|
-
return this._expansionCaseStack.length > 0 && this._expansionCaseStack[this._expansionCaseStack.length - 1] ===
|
|
16017
|
+
return this._expansionCaseStack.length > 0 && this._expansionCaseStack[this._expansionCaseStack.length - 1] === 20;
|
|
15964
16018
|
}
|
|
15965
16019
|
isExpansionFormStart() {
|
|
15966
16020
|
if (this._cursor.peek() !== $LBRACE) {
|
|
@@ -16029,7 +16083,7 @@ function mergeTextTokens(srcTokens) {
|
|
|
16029
16083
|
let lastDstToken = void 0;
|
|
16030
16084
|
for (let i = 0; i < srcTokens.length; i++) {
|
|
16031
16085
|
const token = srcTokens[i];
|
|
16032
|
-
if (lastDstToken && lastDstToken.type === 5 && token.type === 5 || lastDstToken && lastDstToken.type ===
|
|
16086
|
+
if (lastDstToken && lastDstToken.type === 5 && token.type === 5 || lastDstToken && lastDstToken.type === 17 && token.type === 17) {
|
|
16033
16087
|
lastDstToken.parts[0] += token.parts[0];
|
|
16034
16088
|
lastDstToken.sourceSpan.end = token.sourceSpan.end;
|
|
16035
16089
|
} else {
|
|
@@ -16316,12 +16370,12 @@ var _TreeBuilder = class __TreeBuilder {
|
|
|
16316
16370
|
this._advance();
|
|
16317
16371
|
}
|
|
16318
16372
|
build() {
|
|
16319
|
-
while (this._peek.type !==
|
|
16373
|
+
while (this._peek.type !== 42) {
|
|
16320
16374
|
if (this._peek.type === 0 || this._peek.type === 4) {
|
|
16321
16375
|
this._consumeElementStartTag(this._advance());
|
|
16322
16376
|
} else if (this._peek.type === 3) {
|
|
16323
16377
|
this._consumeElementEndTag(this._advance());
|
|
16324
|
-
} else if (this._peek.type ===
|
|
16378
|
+
} else if (this._peek.type === 13) {
|
|
16325
16379
|
this._closeVoidElement();
|
|
16326
16380
|
this._consumeCdata(this._advance());
|
|
16327
16381
|
} else if (this._peek.type === 10) {
|
|
@@ -16330,26 +16384,26 @@ var _TreeBuilder = class __TreeBuilder {
|
|
|
16330
16384
|
} else if (this._peek.type === 5 || this._peek.type === 7 || this._peek.type === 6) {
|
|
16331
16385
|
this._closeVoidElement();
|
|
16332
16386
|
this._consumeText(this._advance());
|
|
16333
|
-
} else if (this._peek.type ===
|
|
16387
|
+
} else if (this._peek.type === 20) {
|
|
16334
16388
|
this._consumeExpansion(this._advance());
|
|
16335
|
-
} else if (this._peek.type ===
|
|
16389
|
+
} else if (this._peek.type === 25) {
|
|
16336
16390
|
this._closeVoidElement();
|
|
16337
16391
|
this._consumeBlockOpen(this._advance());
|
|
16338
|
-
} else if (this._peek.type ===
|
|
16392
|
+
} else if (this._peek.type === 27) {
|
|
16339
16393
|
this._closeVoidElement();
|
|
16340
16394
|
this._consumeBlockClose(this._advance());
|
|
16341
|
-
} else if (this._peek.type ===
|
|
16395
|
+
} else if (this._peek.type === 29) {
|
|
16342
16396
|
this._closeVoidElement();
|
|
16343
16397
|
this._consumeIncompleteBlock(this._advance());
|
|
16344
|
-
} else if (this._peek.type ===
|
|
16398
|
+
} else if (this._peek.type === 30) {
|
|
16345
16399
|
this._closeVoidElement();
|
|
16346
16400
|
this._consumeLet(this._advance());
|
|
16347
|
-
} else if (this._peek.type ===
|
|
16401
|
+
} else if (this._peek.type === 33) {
|
|
16348
16402
|
this._closeVoidElement();
|
|
16349
16403
|
this._consumeIncompleteLet(this._advance());
|
|
16350
|
-
} else if (this._peek.type ===
|
|
16404
|
+
} else if (this._peek.type === 34 || this._peek.type === 38) {
|
|
16351
16405
|
this._consumeComponentStartTag(this._advance());
|
|
16352
|
-
} else if (this._peek.type ===
|
|
16406
|
+
} else if (this._peek.type === 37) {
|
|
16353
16407
|
this._consumeComponentEndTag(this._advance());
|
|
16354
16408
|
} else {
|
|
16355
16409
|
this._advance();
|
|
@@ -16377,7 +16431,7 @@ var _TreeBuilder = class __TreeBuilder {
|
|
|
16377
16431
|
}
|
|
16378
16432
|
_consumeCdata(_startToken) {
|
|
16379
16433
|
this._consumeText(this._advance());
|
|
16380
|
-
this._advanceIf(
|
|
16434
|
+
this._advanceIf(14);
|
|
16381
16435
|
}
|
|
16382
16436
|
_consumeComment(token) {
|
|
16383
16437
|
const text2 = this._advanceIf(7);
|
|
@@ -16390,12 +16444,12 @@ var _TreeBuilder = class __TreeBuilder {
|
|
|
16390
16444
|
const switchValue = this._advance();
|
|
16391
16445
|
const type = this._advance();
|
|
16392
16446
|
const cases = [];
|
|
16393
|
-
while (this._peek.type ===
|
|
16447
|
+
while (this._peek.type === 21) {
|
|
16394
16448
|
const expCase = this._parseExpansionCase();
|
|
16395
16449
|
if (!expCase) return;
|
|
16396
16450
|
cases.push(expCase);
|
|
16397
16451
|
}
|
|
16398
|
-
if (this._peek.type !==
|
|
16452
|
+
if (this._peek.type !== 24) {
|
|
16399
16453
|
this.errors.push(TreeError.create(null, this._peek.sourceSpan, `Invalid ICU message. Missing '}'.`));
|
|
16400
16454
|
return;
|
|
16401
16455
|
}
|
|
@@ -16405,7 +16459,7 @@ var _TreeBuilder = class __TreeBuilder {
|
|
|
16405
16459
|
}
|
|
16406
16460
|
_parseExpansionCase() {
|
|
16407
16461
|
const value = this._advance();
|
|
16408
|
-
if (this._peek.type !==
|
|
16462
|
+
if (this._peek.type !== 22) {
|
|
16409
16463
|
this.errors.push(TreeError.create(null, this._peek.sourceSpan, `Invalid ICU message. Missing '{'.`));
|
|
16410
16464
|
return null;
|
|
16411
16465
|
}
|
|
@@ -16414,7 +16468,7 @@ var _TreeBuilder = class __TreeBuilder {
|
|
|
16414
16468
|
if (!exp) return null;
|
|
16415
16469
|
const end = this._advance();
|
|
16416
16470
|
exp.push({
|
|
16417
|
-
type:
|
|
16471
|
+
type: 42,
|
|
16418
16472
|
parts: [],
|
|
16419
16473
|
sourceSpan: end.sourceSpan
|
|
16420
16474
|
});
|
|
@@ -16430,13 +16484,13 @@ var _TreeBuilder = class __TreeBuilder {
|
|
|
16430
16484
|
}
|
|
16431
16485
|
_collectExpansionExpTokens(start) {
|
|
16432
16486
|
const exp = [];
|
|
16433
|
-
const expansionFormStack = [
|
|
16487
|
+
const expansionFormStack = [22];
|
|
16434
16488
|
while (true) {
|
|
16435
|
-
if (this._peek.type ===
|
|
16489
|
+
if (this._peek.type === 20 || this._peek.type === 22) {
|
|
16436
16490
|
expansionFormStack.push(this._peek.type);
|
|
16437
16491
|
}
|
|
16438
|
-
if (this._peek.type ===
|
|
16439
|
-
if (lastOnStack(expansionFormStack,
|
|
16492
|
+
if (this._peek.type === 23) {
|
|
16493
|
+
if (lastOnStack(expansionFormStack, 22)) {
|
|
16440
16494
|
expansionFormStack.pop();
|
|
16441
16495
|
if (expansionFormStack.length === 0) return exp;
|
|
16442
16496
|
} else {
|
|
@@ -16444,15 +16498,15 @@ var _TreeBuilder = class __TreeBuilder {
|
|
|
16444
16498
|
return null;
|
|
16445
16499
|
}
|
|
16446
16500
|
}
|
|
16447
|
-
if (this._peek.type ===
|
|
16448
|
-
if (lastOnStack(expansionFormStack,
|
|
16501
|
+
if (this._peek.type === 24) {
|
|
16502
|
+
if (lastOnStack(expansionFormStack, 20)) {
|
|
16449
16503
|
expansionFormStack.pop();
|
|
16450
16504
|
} else {
|
|
16451
16505
|
this.errors.push(TreeError.create(null, start.sourceSpan, `Invalid ICU message. Missing '}'.`));
|
|
16452
16506
|
return null;
|
|
16453
16507
|
}
|
|
16454
16508
|
}
|
|
16455
|
-
if (this._peek.type ===
|
|
16509
|
+
if (this._peek.type === 42) {
|
|
16456
16510
|
this.errors.push(TreeError.create(null, start.sourceSpan, `Invalid ICU message. Missing '}'.`));
|
|
16457
16511
|
return null;
|
|
16458
16512
|
}
|
|
@@ -16499,7 +16553,8 @@ var _TreeBuilder = class __TreeBuilder {
|
|
|
16499
16553
|
_consumeElementStartTag(startTagToken) {
|
|
16500
16554
|
const attrs = [];
|
|
16501
16555
|
const directives = [];
|
|
16502
|
-
|
|
16556
|
+
const comments = [];
|
|
16557
|
+
this._consumeAttributesAndDirectives(attrs, directives, comments);
|
|
16503
16558
|
const fullName = this._getElementFullName(startTagToken, this._getClosestElementLikeParent());
|
|
16504
16559
|
const tagDef = this._getTagDefinition(fullName);
|
|
16505
16560
|
let selfClosing = false;
|
|
@@ -16516,7 +16571,7 @@ var _TreeBuilder = class __TreeBuilder {
|
|
|
16516
16571
|
const end = this._peek.sourceSpan.fullStart;
|
|
16517
16572
|
const span = new ParseSourceSpan(startTagToken.sourceSpan.start, end, startTagToken.sourceSpan.fullStart);
|
|
16518
16573
|
const startSpan = new ParseSourceSpan(startTagToken.sourceSpan.start, end, startTagToken.sourceSpan.fullStart);
|
|
16519
|
-
const el = new Element2(fullName, attrs, directives, [], selfClosing, span, startSpan, void 0, tagDef?.isVoid ?? false);
|
|
16574
|
+
const el = new Element2(fullName, attrs, directives, [], selfClosing, span, startSpan, void 0, tagDef?.isVoid ?? false, void 0, comments);
|
|
16520
16575
|
const parent = this._getContainer();
|
|
16521
16576
|
const isClosedByChild = parent !== null && !!this._getTagDefinition(parent)?.isClosedByChild(el.name);
|
|
16522
16577
|
this._pushContainer(el, isClosedByChild);
|
|
@@ -16531,32 +16586,36 @@ var _TreeBuilder = class __TreeBuilder {
|
|
|
16531
16586
|
const componentName = startToken.parts[0];
|
|
16532
16587
|
const attrs = [];
|
|
16533
16588
|
const directives = [];
|
|
16534
|
-
|
|
16589
|
+
const comments = [];
|
|
16590
|
+
this._consumeAttributesAndDirectives(attrs, directives, comments);
|
|
16535
16591
|
const closestElement = this._getClosestElementLikeParent();
|
|
16536
16592
|
const tagName = this._getComponentTagName(startToken, closestElement);
|
|
16537
16593
|
const fullName = this._getComponentFullName(startToken, closestElement);
|
|
16538
|
-
const selfClosing = this._peek.type ===
|
|
16594
|
+
const selfClosing = this._peek.type === 36;
|
|
16539
16595
|
this._advance();
|
|
16540
16596
|
const end = this._peek.sourceSpan.fullStart;
|
|
16541
16597
|
const span = new ParseSourceSpan(startToken.sourceSpan.start, end, startToken.sourceSpan.fullStart);
|
|
16542
16598
|
const startSpan = new ParseSourceSpan(startToken.sourceSpan.start, end, startToken.sourceSpan.fullStart);
|
|
16543
|
-
const node = new Component2(componentName, tagName, fullName, attrs, directives, [], selfClosing, span, startSpan, void 0);
|
|
16599
|
+
const node = new Component2(componentName, tagName, fullName, attrs, directives, [], selfClosing, span, startSpan, void 0, void 0, comments);
|
|
16544
16600
|
const parent = this._getContainer();
|
|
16545
16601
|
const isClosedByChild = parent !== null && node.tagName !== null && !!this._getTagDefinition(parent)?.isClosedByChild(node.tagName);
|
|
16546
16602
|
this._pushContainer(node, isClosedByChild);
|
|
16547
16603
|
if (selfClosing) {
|
|
16548
16604
|
this._popContainer(fullName, Component2, span);
|
|
16549
|
-
} else if (startToken.type ===
|
|
16605
|
+
} else if (startToken.type === 38) {
|
|
16550
16606
|
this._popContainer(fullName, Component2, null);
|
|
16551
16607
|
this.errors.push(TreeError.create(fullName, span, `Opening tag "${fullName}" not terminated.`));
|
|
16552
16608
|
}
|
|
16553
16609
|
}
|
|
16554
|
-
_consumeAttributesAndDirectives(attributesResult, directivesResult) {
|
|
16555
|
-
while (this._peek.type ===
|
|
16556
|
-
if (this._peek.type ===
|
|
16610
|
+
_consumeAttributesAndDirectives(attributesResult, directivesResult, commentsResult) {
|
|
16611
|
+
while (this._peek.type === 15 || this._peek.type === 39 || this._peek.type === 12) {
|
|
16612
|
+
if (this._peek.type === 39) {
|
|
16557
16613
|
directivesResult.push(this._consumeDirective(this._peek));
|
|
16558
|
-
} else {
|
|
16614
|
+
} else if (this._peek.type === 15) {
|
|
16559
16615
|
attributesResult.push(this._consumeAttr(this._advance()));
|
|
16616
|
+
} else {
|
|
16617
|
+
const commentToken = this._advance();
|
|
16618
|
+
commentsResult.push(new StartTagComment(commentToken.parts[0], commentToken.parts[1], commentToken.sourceSpan));
|
|
16560
16619
|
}
|
|
16561
16620
|
}
|
|
16562
16621
|
}
|
|
@@ -16621,7 +16680,7 @@ var _TreeBuilder = class __TreeBuilder {
|
|
|
16621
16680
|
_consumeAttr(attrName) {
|
|
16622
16681
|
const fullName = mergeNsAndName(attrName.parts[0], attrName.parts[1]);
|
|
16623
16682
|
let attrEnd = attrName.sourceSpan.end;
|
|
16624
|
-
if (this._peek.type ===
|
|
16683
|
+
if (this._peek.type === 16) {
|
|
16625
16684
|
this._advance();
|
|
16626
16685
|
}
|
|
16627
16686
|
let value = "";
|
|
@@ -16629,13 +16688,13 @@ var _TreeBuilder = class __TreeBuilder {
|
|
|
16629
16688
|
let valueStartSpan = void 0;
|
|
16630
16689
|
let valueEnd = void 0;
|
|
16631
16690
|
const nextTokenType = this._peek.type;
|
|
16632
|
-
if (nextTokenType ===
|
|
16691
|
+
if (nextTokenType === 17) {
|
|
16633
16692
|
valueStartSpan = this._peek.sourceSpan;
|
|
16634
16693
|
valueEnd = this._peek.sourceSpan.end;
|
|
16635
|
-
while (this._peek.type ===
|
|
16694
|
+
while (this._peek.type === 17 || this._peek.type === 18 || this._peek.type === 9) {
|
|
16636
16695
|
const valueToken = this._advance();
|
|
16637
16696
|
valueTokens.push(valueToken);
|
|
16638
|
-
if (valueToken.type ===
|
|
16697
|
+
if (valueToken.type === 18) {
|
|
16639
16698
|
value += valueToken.parts.join("").replace(/&([^;]+);/g, decodeEntity);
|
|
16640
16699
|
} else if (valueToken.type === 9) {
|
|
16641
16700
|
value += valueToken.parts[0];
|
|
@@ -16645,7 +16704,7 @@ var _TreeBuilder = class __TreeBuilder {
|
|
|
16645
16704
|
valueEnd = attrEnd = valueToken.sourceSpan.end;
|
|
16646
16705
|
}
|
|
16647
16706
|
}
|
|
16648
|
-
if (this._peek.type ===
|
|
16707
|
+
if (this._peek.type === 16) {
|
|
16649
16708
|
const quoteToken = this._advance();
|
|
16650
16709
|
attrEnd = quoteToken.sourceSpan.end;
|
|
16651
16710
|
}
|
|
@@ -16657,13 +16716,13 @@ var _TreeBuilder = class __TreeBuilder {
|
|
|
16657
16716
|
let startSourceSpanEnd = nameToken.sourceSpan.end;
|
|
16658
16717
|
let endSourceSpan = null;
|
|
16659
16718
|
this._advance();
|
|
16660
|
-
if (this._peek.type ===
|
|
16719
|
+
if (this._peek.type === 40) {
|
|
16661
16720
|
startSourceSpanEnd = this._peek.sourceSpan.end;
|
|
16662
16721
|
this._advance();
|
|
16663
|
-
while (this._peek.type ===
|
|
16722
|
+
while (this._peek.type === 15) {
|
|
16664
16723
|
attributes.push(this._consumeAttr(this._advance()));
|
|
16665
16724
|
}
|
|
16666
|
-
if (this._peek.type ===
|
|
16725
|
+
if (this._peek.type === 41) {
|
|
16667
16726
|
endSourceSpan = this._peek.sourceSpan;
|
|
16668
16727
|
this._advance();
|
|
16669
16728
|
} else {
|
|
@@ -16676,11 +16735,11 @@ var _TreeBuilder = class __TreeBuilder {
|
|
|
16676
16735
|
}
|
|
16677
16736
|
_consumeBlockOpen(token) {
|
|
16678
16737
|
const parameters = [];
|
|
16679
|
-
while (this._peek.type ===
|
|
16738
|
+
while (this._peek.type === 28) {
|
|
16680
16739
|
const paramToken = this._advance();
|
|
16681
16740
|
parameters.push(new BlockParameter(paramToken.parts[0], paramToken.sourceSpan));
|
|
16682
16741
|
}
|
|
16683
|
-
if (this._peek.type ===
|
|
16742
|
+
if (this._peek.type === 26) {
|
|
16684
16743
|
this._advance();
|
|
16685
16744
|
}
|
|
16686
16745
|
const end = this._peek.sourceSpan.fullStart;
|
|
@@ -16703,7 +16762,7 @@ var _TreeBuilder = class __TreeBuilder {
|
|
|
16703
16762
|
}
|
|
16704
16763
|
_consumeIncompleteBlock(token) {
|
|
16705
16764
|
const parameters = [];
|
|
16706
|
-
while (this._peek.type ===
|
|
16765
|
+
while (this._peek.type === 28) {
|
|
16707
16766
|
const paramToken = this._advance();
|
|
16708
16767
|
parameters.push(new BlockParameter(paramToken.parts[0], paramToken.sourceSpan));
|
|
16709
16768
|
}
|
|
@@ -16719,13 +16778,13 @@ var _TreeBuilder = class __TreeBuilder {
|
|
|
16719
16778
|
const name = startToken.parts[0];
|
|
16720
16779
|
let valueToken;
|
|
16721
16780
|
let endToken;
|
|
16722
|
-
if (this._peek.type !==
|
|
16781
|
+
if (this._peek.type !== 31) {
|
|
16723
16782
|
this.errors.push(TreeError.create(startToken.parts[0], startToken.sourceSpan, `Invalid @let declaration "${name}". Declaration must have a value.`));
|
|
16724
16783
|
return;
|
|
16725
16784
|
} else {
|
|
16726
16785
|
valueToken = this._advance();
|
|
16727
16786
|
}
|
|
16728
|
-
if (this._peek.type !==
|
|
16787
|
+
if (this._peek.type !== 32) {
|
|
16729
16788
|
this.errors.push(TreeError.create(startToken.parts[0], startToken.sourceSpan, `Unterminated @let declaration "${name}". Declaration must be terminated with a semicolon.`));
|
|
16730
16789
|
return;
|
|
16731
16790
|
} else {
|
|
@@ -16798,7 +16857,7 @@ var _TreeBuilder = class __TreeBuilder {
|
|
|
16798
16857
|
_getPrefix(token, parent) {
|
|
16799
16858
|
let prefix;
|
|
16800
16859
|
let tagName;
|
|
16801
|
-
if (token.type ===
|
|
16860
|
+
if (token.type === 34 || token.type === 38 || token.type === 37) {
|
|
16802
16861
|
prefix = token.parts[1];
|
|
16803
16862
|
tagName = token.parts[2];
|
|
16804
16863
|
} else {
|
|
@@ -16864,11 +16923,11 @@ var WhitespaceVisitor = class {
|
|
|
16864
16923
|
}
|
|
16865
16924
|
visitElement(element2, context) {
|
|
16866
16925
|
if (SKIP_WS_TRIM_TAGS.has(element2.name) || hasPreserveWhitespacesAttr(element2.attrs)) {
|
|
16867
|
-
const newElement2 = new Element2(element2.name, visitAllWithSiblings(this, element2.attrs), visitAllWithSiblings(this, element2.directives), element2.children, element2.isSelfClosing, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.isVoid, element2.i18n);
|
|
16926
|
+
const newElement2 = new Element2(element2.name, visitAllWithSiblings(this, element2.attrs), visitAllWithSiblings(this, element2.directives), element2.children, element2.isSelfClosing, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.isVoid, element2.i18n, element2.comments);
|
|
16868
16927
|
this.originalNodeMap?.set(newElement2, element2);
|
|
16869
16928
|
return newElement2;
|
|
16870
16929
|
}
|
|
16871
|
-
const newElement = new Element2(element2.name, element2.attrs, element2.directives, visitAllWithSiblings(this, element2.children), element2.isSelfClosing, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.isVoid, element2.i18n);
|
|
16930
|
+
const newElement = new Element2(element2.name, element2.attrs, element2.directives, visitAllWithSiblings(this, element2.children), element2.isSelfClosing, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.isVoid, element2.i18n, element2.comments);
|
|
16872
16931
|
this.originalNodeMap?.set(newElement, element2);
|
|
16873
16932
|
return newElement;
|
|
16874
16933
|
}
|
|
@@ -16928,11 +16987,11 @@ var WhitespaceVisitor = class {
|
|
|
16928
16987
|
}
|
|
16929
16988
|
visitComponent(node, context) {
|
|
16930
16989
|
if (node.tagName && SKIP_WS_TRIM_TAGS.has(node.tagName) || hasPreserveWhitespacesAttr(node.attrs)) {
|
|
16931
|
-
const newElement2 = new Component2(node.componentName, node.tagName, node.fullName, visitAllWithSiblings(this, node.attrs), visitAllWithSiblings(this, node.directives), node.children, node.isSelfClosing, node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.i18n);
|
|
16990
|
+
const newElement2 = new Component2(node.componentName, node.tagName, node.fullName, visitAllWithSiblings(this, node.attrs), visitAllWithSiblings(this, node.directives), node.children, node.isSelfClosing, node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.i18n, node.comments);
|
|
16932
16991
|
this.originalNodeMap?.set(newElement2, node);
|
|
16933
16992
|
return newElement2;
|
|
16934
16993
|
}
|
|
16935
|
-
const newElement = new Component2(node.componentName, node.tagName, node.fullName, node.attrs, node.directives, visitAllWithSiblings(this, node.children), node.isSelfClosing, node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.i18n);
|
|
16994
|
+
const newElement = new Component2(node.componentName, node.tagName, node.fullName, node.attrs, node.directives, visitAllWithSiblings(this, node.children), node.isSelfClosing, node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.i18n, node.comments);
|
|
16936
16995
|
this.originalNodeMap?.set(newElement, node);
|
|
16937
16996
|
return newElement;
|
|
16938
16997
|
}
|
|
@@ -18971,7 +19030,7 @@ function normalizeTagName(tagName) {
|
|
|
18971
19030
|
return ns === SVG_NAMESPACE || ns === MATH_ML_NAMESPACE ? `:${ns}:${name}` : name;
|
|
18972
19031
|
}
|
|
18973
19032
|
__name(normalizeTagName, "normalizeTagName");
|
|
18974
|
-
var SCHEMA = ["[Element]|textContent,%ariaActiveDescendantElement,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColIndexText,%ariaColSpan,%ariaControlsElements,%ariaCurrent,%ariaDescribedByElements,%ariaDescription,%ariaDetailsElements,%ariaDisabled,%ariaErrorMessageElements,%ariaExpanded,%ariaFlowToElements,%ariaHasPopup,%ariaHidden,%ariaInvalid,%ariaKeyShortcuts,%ariaLabel,%ariaLabelledByElements,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaOwnsElements,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowIndexText,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored", "[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,!inert,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy", "abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,search,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy", "media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,!preservesPitch,src,%srcObject,#volume", ":svg:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex", ":svg:graphics^:svg:|", ":svg:animation^:svg:|*begin,*end,*repeat", ":svg:geometry^:svg:|", ":svg:componentTransferFunction^:svg:|", ":svg:gradient^:svg:|", ":svg:textContent^:svg:graphics|", ":svg:textPositioning^:svg:textContent|", "a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,rev,search,shape,target,text,type,username", "area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,search,shape,target,username", "audio^media|", "br^[HTMLElement]|clear", "base^[HTMLElement]|href,target", "body^[HTMLElement]|aLink,background,bgColor,link,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink", "button^[HTMLElement]|!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value", "canvas^[HTMLElement]|#height,#width", "content^[HTMLElement]|select", "dl^[HTMLElement]|!compact", "data^[HTMLElement]|value", "datalist^[HTMLElement]|", "details^[HTMLElement]|!open", "dialog^[HTMLElement]|!open,returnValue", "dir^[HTMLElement]|!compact", "div^[HTMLElement]|align", "embed^[HTMLElement]|align,height,name,src,type,width", "fieldset^[HTMLElement]|!disabled,name", "font^[HTMLElement]|color,face,size", "form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target", "frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src", "frameset^[HTMLElement]|cols,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows", "geolocation^[HTMLElement]|accuracymode,!autolocate,*location,*promptaction,*promptdismiss,*validationstatuschange,!watch", "hr^[HTMLElement]|align,color,!noShade,size,width", "head^[HTMLElement]|", "h1,h2,h3,h4,h5,h6^[HTMLElement]|align", "html^[HTMLElement]|version", "iframe^[HTMLElement]|align,allow,!allowFullscreen,!allowPaymentRequest,csp,frameBorder,height,loading,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width", "img^[HTMLElement]|align,alt,border,%crossOrigin,decoding,#height,#hspace,!isMap,loading,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width", "input^[HTMLElement]|accept,align,alt,autocomplete,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width", "li^[HTMLElement]|type,#value", "label^[HTMLElement]|htmlFor", "legend^[HTMLElement]|align", "link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,imageSizes,imageSrcset,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type", "map^[HTMLElement]|name", "marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width", "menu^[HTMLElement]|!compact", "meta^[HTMLElement]|content,httpEquiv,media,name,scheme", "meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value", "ins,del^[HTMLElement]|cite,dateTime", "ol^[HTMLElement]|!compact,!reversed,#start,type", "object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width", "optgroup^[HTMLElement]|!disabled,label", "option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value", "output^[HTMLElement]|defaultValue,%htmlFor,name,value", "p^[HTMLElement]|align", "param^[HTMLElement]|name,type,value,valueType", "picture^[HTMLElement]|", "pre^[HTMLElement]|#width", "progress^[HTMLElement]|#max,#value", "q,blockquote,cite^[HTMLElement]|", "script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,!noModule,%referrerPolicy,src,text,type", "select^[HTMLElement]|autocomplete,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value", "selectedcontent^[HTMLElement]|", "slot^[HTMLElement]|name", "source^[HTMLElement]|#height,media,sizes,src,srcset,type,#width", "span^[HTMLElement]|", "style^[HTMLElement]|!disabled,media,type", "search^[HTMLELement]|", "caption^[HTMLElement]|align", "th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width", "col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width", "table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width", "tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign", "tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign", "template^[HTMLElement]|", "textarea^[HTMLElement]|autocomplete,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap", "time^[HTMLElement]|dateTime", "title^[HTMLElement]|text", "track^[HTMLElement]|!default,kind,label,src,srclang", "ul^[HTMLElement]|!compact,type", "unknown^[HTMLElement]|", "video^media|!disablePictureInPicture,#height,*enterpictureinpicture,*leavepictureinpicture,!playsInline,poster,#width", ":svg:a^:svg:graphics|", ":svg:animate^:svg:animation|", ":svg:animateMotion^:svg:animation|", ":svg:animateTransform^:svg:animation|", ":svg:circle^:svg:geometry|", ":svg:clipPath^:svg:graphics|", ":svg:defs^:svg:graphics|", ":svg:desc^:svg:|", ":svg:discard^:svg:|", ":svg:ellipse^:svg:geometry|", ":svg:feBlend^:svg:|", ":svg:feColorMatrix^:svg:|", ":svg:feComponentTransfer^:svg:|", ":svg:feComposite^:svg:|", ":svg:feConvolveMatrix^:svg:|", ":svg:feDiffuseLighting^:svg:|", ":svg:feDisplacementMap^:svg:|", ":svg:feDistantLight^:svg:|", ":svg:feDropShadow^:svg:|", ":svg:feFlood^:svg:|", ":svg:feFuncA^:svg:componentTransferFunction|", ":svg:feFuncB^:svg:componentTransferFunction|", ":svg:feFuncG^:svg:componentTransferFunction|", ":svg:feFuncR^:svg:componentTransferFunction|", ":svg:feGaussianBlur^:svg:|", ":svg:feImage^:svg:|", ":svg:feMerge^:svg:|", ":svg:feMergeNode^:svg:|", ":svg:feMorphology^:svg:|", ":svg:feOffset^:svg:|", ":svg:fePointLight^:svg:|", ":svg:feSpecularLighting^:svg:|", ":svg:feSpotLight^:svg:|", ":svg:feTile^:svg:|", ":svg:feTurbulence^:svg:|", ":svg:filter^:svg:|", ":svg:foreignObject^:svg:graphics|", ":svg:g^:svg:graphics|", ":svg:image^:svg:graphics|decoding", ":svg:line^:svg:geometry|", ":svg:linearGradient^:svg:gradient|", ":svg:mpath^:svg:|", ":svg:marker^:svg:|", ":svg:mask^:svg:|", ":svg:metadata^:svg:|", ":svg:path^:svg:geometry|", ":svg:pattern^:svg:|", ":svg:polygon^:svg:geometry|", ":svg:polyline^:svg:geometry|", ":svg:radialGradient^:svg:gradient|", ":svg:rect^:svg:geometry|", ":svg:svg^:svg:graphics|#currentScale,#zoomAndPan", ":svg:script^:svg:|type", ":svg:set^:svg:animation|", ":svg:stop^:svg:|", ":svg:style^:svg:|!disabled,media,title,type", ":svg:switch^:svg:graphics|", ":svg:symbol^:svg:|", ":svg:tspan^:svg:textPositioning|", ":svg:text^:svg:textPositioning|", ":svg:textPath^:svg:textContent|", ":svg:title^:svg:|", ":svg:use^:svg:graphics|", ":svg:view^:svg:|#zoomAndPan", "data^[HTMLElement]|value", "keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name", "menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default", "summary^[HTMLElement]|", "time^[HTMLElement]|dateTime", ":svg:cursor^:svg:|", ":math:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforeinput,*beforematch,*beforetoggle,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contentvisibilityautostatechange,*contextlost,*contextmenu,*contextrestored,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*scrollend,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex", ":math:math^:math:|", ":math:maction^:math:|", ":math:menclose^:math:|", ":math:merror^:math:|", ":math:mfenced^:math:|", ":math:mfrac^:math:|", ":math:mi^:math:|", ":math:mmultiscripts^:math:|", ":math:mn^:math:|", ":math:mo^:math:|", ":math:mover^:math:|", ":math:mpadded^:math:|", ":math:mphantom^:math:|", ":math:mroot^:math:|", ":math:mrow^:math:|", ":math:ms^:math:|", ":math:mspace^:math:|", ":math:msqrt^:math:|", ":math:mstyle^:math:|", ":math:msub^:math:|", ":math:msubsup^:math:|", ":math:msup^:math:|", ":math:mtable^:math:|", ":math:mtd^:math:|", ":math:mtext^:math:|", ":math:mtr^:math:|", ":math:munder^:math:|", ":math:munderover^:math:|", ":math:semantics^:math:|"];
|
|
19033
|
+
var SCHEMA = ["[Element]|textContent,%ariaActiveDescendantElement,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColIndexText,%ariaColSpan,%ariaControlsElements,%ariaCurrent,%ariaDescribedByElements,%ariaDescription,%ariaDetailsElements,%ariaDisabled,%ariaErrorMessageElements,%ariaExpanded,%ariaFlowToElements,%ariaHasPopup,%ariaHidden,%ariaInvalid,%ariaKeyShortcuts,%ariaLabel,%ariaLabelledByElements,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaOwnsElements,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowIndexText,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored", "[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,!inert,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy", "abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,search,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy", "media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,!preservesPitch,src,%srcObject,#volume", ":svg:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex", ":svg:graphics^:svg:|", ":svg:animation^:svg:|*begin,*end,*repeat", ":svg:geometry^:svg:|", ":svg:componentTransferFunction^:svg:|", ":svg:gradient^:svg:|", ":svg:textContent^:svg:graphics|", ":svg:textPositioning^:svg:textContent|", "a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,rev,search,shape,target,text,type,username", "area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,search,shape,target,username", "audio^media|", "br^[HTMLElement]|clear", "base^[HTMLElement]|href,target", "body^[HTMLElement]|aLink,background,bgColor,link,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink", "button^[HTMLElement]|!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value", "canvas^[HTMLElement]|#height,#width", "content^[HTMLElement]|select", "dl^[HTMLElement]|!compact", "data^[HTMLElement]|value", "datalist^[HTMLElement]|", "details^[HTMLElement]|!open", "dialog^[HTMLElement]|!open,returnValue", "dir^[HTMLElement]|!compact", "div^[HTMLElement]|align", "embed^[HTMLElement]|align,height,name,src,type,width", "fieldset^[HTMLElement]|!disabled,name", "font^[HTMLElement]|color,face,size", "form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target", "frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src", "frameset^[HTMLElement]|cols,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows", "geolocation^[HTMLElement]|accuracymode,!autolocate,*location,*promptaction,*promptdismiss,*validationstatuschange,!watch", "hr^[HTMLElement]|align,color,!noShade,size,width", "head^[HTMLElement]|", "h1,h2,h3,h4,h5,h6^[HTMLElement]|align", "html^[HTMLElement]|version", "iframe^[HTMLElement]|align,allow,!allowFullscreen,!allowPaymentRequest,csp,!credentialless,frameBorder,height,loading,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width", "img^[HTMLElement]|align,alt,border,%crossOrigin,decoding,#height,#hspace,!isMap,loading,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width", "input^[HTMLElement]|accept,align,alt,autocomplete,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width", "li^[HTMLElement]|type,#value", "label^[HTMLElement]|htmlFor", "legend^[HTMLElement]|align", "link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,imageSizes,imageSrcset,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type", "map^[HTMLElement]|name", "marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width", "menu^[HTMLElement]|!compact", "meta^[HTMLElement]|content,httpEquiv,media,name,scheme", "meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value", "ins,del^[HTMLElement]|cite,dateTime", "ol^[HTMLElement]|!compact,!reversed,#start,type", "object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width", "optgroup^[HTMLElement]|!disabled,label", "option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value", "output^[HTMLElement]|defaultValue,%htmlFor,name,value", "p^[HTMLElement]|align", "param^[HTMLElement]|name,type,value,valueType", "picture^[HTMLElement]|", "pre^[HTMLElement]|#width", "progress^[HTMLElement]|#max,#value", "q,blockquote,cite^[HTMLElement]|", "script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,!noModule,%referrerPolicy,src,text,type", "select^[HTMLElement]|autocomplete,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value", "selectedcontent^[HTMLElement]|", "slot^[HTMLElement]|name", "source^[HTMLElement]|#height,media,sizes,src,srcset,type,#width", "span^[HTMLElement]|", "style^[HTMLElement]|!disabled,media,type", "search^[HTMLELement]|", "caption^[HTMLElement]|align", "th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width", "col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width", "table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width", "tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign", "tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign", "template^[HTMLElement]|", "textarea^[HTMLElement]|autocomplete,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap", "time^[HTMLElement]|dateTime", "title^[HTMLElement]|text", "track^[HTMLElement]|!default,kind,label,src,srclang", "ul^[HTMLElement]|!compact,type", "unknown^[HTMLElement]|", "video^media|!disablePictureInPicture,#height,*enterpictureinpicture,*leavepictureinpicture,!playsInline,poster,#width", ":svg:a^:svg:graphics|", ":svg:animate^:svg:animation|", ":svg:animateMotion^:svg:animation|", ":svg:animateTransform^:svg:animation|", ":svg:circle^:svg:geometry|", ":svg:clipPath^:svg:graphics|", ":svg:defs^:svg:graphics|", ":svg:desc^:svg:|", ":svg:discard^:svg:|", ":svg:ellipse^:svg:geometry|", ":svg:feBlend^:svg:|", ":svg:feColorMatrix^:svg:|", ":svg:feComponentTransfer^:svg:|", ":svg:feComposite^:svg:|", ":svg:feConvolveMatrix^:svg:|", ":svg:feDiffuseLighting^:svg:|", ":svg:feDisplacementMap^:svg:|", ":svg:feDistantLight^:svg:|", ":svg:feDropShadow^:svg:|", ":svg:feFlood^:svg:|", ":svg:feFuncA^:svg:componentTransferFunction|", ":svg:feFuncB^:svg:componentTransferFunction|", ":svg:feFuncG^:svg:componentTransferFunction|", ":svg:feFuncR^:svg:componentTransferFunction|", ":svg:feGaussianBlur^:svg:|", ":svg:feImage^:svg:|", ":svg:feMerge^:svg:|", ":svg:feMergeNode^:svg:|", ":svg:feMorphology^:svg:|", ":svg:feOffset^:svg:|", ":svg:fePointLight^:svg:|", ":svg:feSpecularLighting^:svg:|", ":svg:feSpotLight^:svg:|", ":svg:feTile^:svg:|", ":svg:feTurbulence^:svg:|", ":svg:filter^:svg:|", ":svg:foreignObject^:svg:graphics|", ":svg:g^:svg:graphics|", ":svg:image^:svg:graphics|decoding", ":svg:line^:svg:geometry|", ":svg:linearGradient^:svg:gradient|", ":svg:mpath^:svg:|", ":svg:marker^:svg:|", ":svg:mask^:svg:|", ":svg:metadata^:svg:|", ":svg:path^:svg:geometry|", ":svg:pattern^:svg:|", ":svg:polygon^:svg:geometry|", ":svg:polyline^:svg:geometry|", ":svg:radialGradient^:svg:gradient|", ":svg:rect^:svg:geometry|", ":svg:svg^:svg:graphics|#currentScale,#zoomAndPan", ":svg:script^:svg:|type", ":svg:set^:svg:animation|", ":svg:stop^:svg:|", ":svg:style^:svg:|!disabled,media,title,type", ":svg:switch^:svg:graphics|", ":svg:symbol^:svg:|", ":svg:tspan^:svg:textPositioning|", ":svg:text^:svg:textPositioning|", ":svg:textPath^:svg:textContent|", ":svg:title^:svg:|", ":svg:use^:svg:graphics|", ":svg:view^:svg:|#zoomAndPan", "data^[HTMLElement]|value", "keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name", "menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default", "summary^[HTMLElement]|", "time^[HTMLElement]|dateTime", ":svg:cursor^:svg:|", ":math:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforeinput,*beforematch,*beforetoggle,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contentvisibilityautostatechange,*contextlost,*contextmenu,*contextrestored,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*scrollend,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex", ":math:math^:math:|", ":math:maction^:math:|", ":math:menclose^:math:|", ":math:merror^:math:|", ":math:mfenced^:math:|", ":math:mfrac^:math:|", ":math:mi^:math:|", ":math:mmultiscripts^:math:|", ":math:mn^:math:|", ":math:mo^:math:|", ":math:mover^:math:|", ":math:mpadded^:math:|", ":math:mphantom^:math:|", ":math:mroot^:math:|", ":math:mrow^:math:|", ":math:ms^:math:|", ":math:mspace^:math:|", ":math:msqrt^:math:|", ":math:mstyle^:math:|", ":math:msub^:math:|", ":math:msubsup^:math:|", ":math:msup^:math:|", ":math:mtable^:math:|", ":math:mtd^:math:|", ":math:mtext^:math:|", ":math:mtr^:math:|", ":math:munder^:math:|", ":math:munderover^:math:|", ":math:semantics^:math:|"];
|
|
18975
19034
|
var _ATTR_TO_PROP = new Map(Object.entries({
|
|
18976
19035
|
"class": "className",
|
|
18977
19036
|
"for": "htmlFor",
|
|
@@ -19116,11 +19175,8 @@ var DomElementSchemaRegistry = class extends ElementSchemaRegistry {
|
|
|
19116
19175
|
if (isAttribute) {
|
|
19117
19176
|
propName = this.getMappedPropName(propName);
|
|
19118
19177
|
}
|
|
19119
|
-
const
|
|
19120
|
-
|
|
19121
|
-
const securitySchema = SECURITY_SCHEMA();
|
|
19122
|
-
const ctx = securitySchema[normalizedTag + "|" + propName] ?? securitySchema["*|" + propName] ?? SecurityContext.NONE;
|
|
19123
|
-
return ctx;
|
|
19178
|
+
const [ns, name] = splitNsName(tagName, false);
|
|
19179
|
+
return checkSecurityContext(name, propName, ns);
|
|
19124
19180
|
}
|
|
19125
19181
|
getMappedPropName(propName) {
|
|
19126
19182
|
return _ATTR_TO_PROP.get(propName) ?? propName;
|
|
@@ -19690,7 +19746,7 @@ var _I18nVisitor = class {
|
|
|
19690
19746
|
for (const token of tokens) {
|
|
19691
19747
|
switch (token.type) {
|
|
19692
19748
|
case 8:
|
|
19693
|
-
case
|
|
19749
|
+
case 18:
|
|
19694
19750
|
hasInterpolation = true;
|
|
19695
19751
|
const [startMarker, expression, endMarker] = token.parts;
|
|
19696
19752
|
const baseName = extractPlaceholderName(expression) || "INTERPOLATION";
|
|
@@ -19908,7 +19964,7 @@ var I18nMetaVisitor = class {
|
|
|
19908
19964
|
} else {
|
|
19909
19965
|
isTrustedType = isTrustedTypesSink(node.name, name);
|
|
19910
19966
|
}
|
|
19911
|
-
if (isTrustedType) {
|
|
19967
|
+
if (isTrustedType || isPossibleEventHandler(name)) {
|
|
19912
19968
|
this._reportError(attr, `Translating attribute '${name}' is disallowed for security reasons.`);
|
|
19913
19969
|
} else {
|
|
19914
19970
|
attrsMeta[name] = attr.value;
|
|
@@ -19994,6 +20050,11 @@ function i18nMetaToJSDoc(meta) {
|
|
|
19994
20050
|
return jsDocComment(tags);
|
|
19995
20051
|
}
|
|
19996
20052
|
__name(i18nMetaToJSDoc, "i18nMetaToJSDoc");
|
|
20053
|
+
function isPossibleEventHandler(propertyName) {
|
|
20054
|
+
const name = propertyName.toLowerCase();
|
|
20055
|
+
return name.length > 2 && name !== "only" && name.startsWith("on");
|
|
20056
|
+
}
|
|
20057
|
+
__name(isPossibleEventHandler, "isPossibleEventHandler");
|
|
19997
20058
|
function createGoogleGetMsgStatements(variable$1, message, closureVar, placeholderValues) {
|
|
19998
20059
|
const messageString = serializeI18nMessageForGetMsg(message);
|
|
19999
20060
|
const args = [literal(messageString)];
|
|
@@ -21159,11 +21220,12 @@ function transformLiteralMap(expr) {
|
|
|
21159
21220
|
return new PureFunctionExpr(new LiteralMapExpr(derivedEntries), nonConstantArgs);
|
|
21160
21221
|
}
|
|
21161
21222
|
__name(transformLiteralMap, "transformLiteralMap");
|
|
21223
|
+
var SAFE_REGEX_FLAGS = /* @__PURE__ */ new Set(["d", "i", "m", "s", "u", "v"]);
|
|
21162
21224
|
function optimizeRegularExpressions(job) {
|
|
21163
21225
|
for (const view of job.units) {
|
|
21164
21226
|
for (const op of view.ops()) {
|
|
21165
21227
|
transformExpressionsInOp(op, (expr) => {
|
|
21166
|
-
if (expr instanceof RegularExpressionLiteralExpr && (expr
|
|
21228
|
+
if (expr instanceof RegularExpressionLiteralExpr && canOptimizeRegex(expr)) {
|
|
21167
21229
|
return job.pool.getSharedConstant(new RegularExpressionConstant(), expr);
|
|
21168
21230
|
}
|
|
21169
21231
|
return expr;
|
|
@@ -21172,6 +21234,18 @@ function optimizeRegularExpressions(job) {
|
|
|
21172
21234
|
}
|
|
21173
21235
|
}
|
|
21174
21236
|
__name(optimizeRegularExpressions, "optimizeRegularExpressions");
|
|
21237
|
+
function canOptimizeRegex(expr) {
|
|
21238
|
+
if (!expr.flags) {
|
|
21239
|
+
return true;
|
|
21240
|
+
}
|
|
21241
|
+
for (let i = 0; i < expr.flags.length; i++) {
|
|
21242
|
+
if (!SAFE_REGEX_FLAGS.has(expr.flags[i])) {
|
|
21243
|
+
return false;
|
|
21244
|
+
}
|
|
21245
|
+
}
|
|
21246
|
+
return true;
|
|
21247
|
+
}
|
|
21248
|
+
__name(canOptimizeRegex, "canOptimizeRegex");
|
|
21175
21249
|
var RegularExpressionConstant = class extends GenericKeyFn {
|
|
21176
21250
|
static {
|
|
21177
21251
|
__name(this, "RegularExpressionConstant");
|
|
@@ -22801,6 +22875,7 @@ function resolveSanitizers(job) {
|
|
|
22801
22875
|
case OpKind.Property:
|
|
22802
22876
|
case OpKind.Attribute:
|
|
22803
22877
|
case OpKind.DomProperty:
|
|
22878
|
+
case OpKind.TwoWayProperty:
|
|
22804
22879
|
let sanitizerFn = null;
|
|
22805
22880
|
if (Array.isArray(op.securityContext) && op.securityContext.length === 2 && op.securityContext.includes(SecurityContext.URL) && op.securityContext.includes(SecurityContext.RESOURCE_URL)) {
|
|
22806
22881
|
sanitizerFn = Identifiers.sanitizeUrlOrResourceUrl;
|
|
@@ -26498,6 +26573,11 @@ var HtmlAstToIvyAst = class {
|
|
|
26498
26573
|
}
|
|
26499
26574
|
parsedElement = new Element$1(element2.name, attributes, attrs.bound, boundEvents, directives, children, references, element2.isSelfClosing, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.isVoid, element2.i18n);
|
|
26500
26575
|
}
|
|
26576
|
+
if (this.options.collectCommentNodes) {
|
|
26577
|
+
element2.comments.forEach((comment) => {
|
|
26578
|
+
this.commentNodes.push(new Comment$1(comment.value || "", comment.sourceSpan));
|
|
26579
|
+
});
|
|
26580
|
+
}
|
|
26501
26581
|
if (elementHasInlineTemplate) {
|
|
26502
26582
|
parsedElement = this.wrapInTemplate(parsedElement, templateParsedProperties, templateVariables, i18nAttrsMeta, isTemplateElement, isI18nRootElement);
|
|
26503
26583
|
}
|
|
@@ -26543,6 +26623,12 @@ var HtmlAstToIvyAst = class {
|
|
|
26543
26623
|
}
|
|
26544
26624
|
return null;
|
|
26545
26625
|
}
|
|
26626
|
+
visitStartTagComment(comment) {
|
|
26627
|
+
if (this.options.collectCommentNodes) {
|
|
26628
|
+
this.commentNodes.push(new Comment$1(comment.value || "", comment.sourceSpan));
|
|
26629
|
+
}
|
|
26630
|
+
return null;
|
|
26631
|
+
}
|
|
26546
26632
|
visitLetDeclaration(decl, context) {
|
|
26547
26633
|
const value = this.bindingParser.parseBinding(decl.value, false, decl.valueSpan, decl.valueSpan.start.offset);
|
|
26548
26634
|
if (value.errors.length === 0 && value.ast instanceof EmptyExpr$1) {
|
|
@@ -26582,6 +26668,11 @@ var HtmlAstToIvyAst = class {
|
|
|
26582
26668
|
}
|
|
26583
26669
|
const attrs = this.categorizePropertyAttributes(component.tagName, parsedProperties, i18nAttrsMeta);
|
|
26584
26670
|
let node = new Component$1(component.componentName, component.tagName, component.fullName, attributes, attrs.bound, boundEvents, directives, children, references, component.isSelfClosing, component.sourceSpan, component.startSourceSpan, component.endSourceSpan, component.i18n);
|
|
26671
|
+
if (this.options.collectCommentNodes) {
|
|
26672
|
+
component.comments.forEach((comment) => {
|
|
26673
|
+
this.commentNodes.push(new Comment$1(comment.value || "", comment.sourceSpan));
|
|
26674
|
+
});
|
|
26675
|
+
}
|
|
26585
26676
|
if (elementHasInlineTemplate) {
|
|
26586
26677
|
node = this.wrapInTemplate(node, templateParsedProperties, templateVariables, i18nAttrsMeta, false, isI18nRootElement);
|
|
26587
26678
|
}
|
|
@@ -27592,6 +27683,7 @@ var CombinedRecursiveAstVisitor = class extends RecursiveAstVisitor2 {
|
|
|
27592
27683
|
visitSwitchBlock(block) {
|
|
27593
27684
|
this.visit(block.expression);
|
|
27594
27685
|
this.visitAllTemplateNodes(block.groups);
|
|
27686
|
+
block.exhaustiveCheck?.visit(this);
|
|
27595
27687
|
}
|
|
27596
27688
|
visitSwitchBlockCase(block) {
|
|
27597
27689
|
block.expression && this.visit(block.expression);
|
|
@@ -28994,6 +29086,9 @@ function convertDeclareComponentFacadeToMetadata(decl, typeSourceSpan, sourceMap
|
|
|
28994
29086
|
case "pipe":
|
|
28995
29087
|
declarations.push(convertPipeDeclarationToMetadata(innerDep));
|
|
28996
29088
|
break;
|
|
29089
|
+
case "ngmodule":
|
|
29090
|
+
declarations.push(convertNgModuleDeclarationToMetadata(innerDep));
|
|
29091
|
+
break;
|
|
28997
29092
|
}
|
|
28998
29093
|
}
|
|
28999
29094
|
} else if (decl.components || decl.directives || decl.pipes) {
|
|
@@ -29063,6 +29158,13 @@ function convertPipeDeclarationToMetadata(pipe2) {
|
|
|
29063
29158
|
};
|
|
29064
29159
|
}
|
|
29065
29160
|
__name(convertPipeDeclarationToMetadata, "convertPipeDeclarationToMetadata");
|
|
29161
|
+
function convertNgModuleDeclarationToMetadata(ngModule) {
|
|
29162
|
+
return {
|
|
29163
|
+
kind: R3TemplateDependencyKind.NgModule,
|
|
29164
|
+
type: new WrappedNodeExpr(ngModule.type)
|
|
29165
|
+
};
|
|
29166
|
+
}
|
|
29167
|
+
__name(convertNgModuleDeclarationToMetadata, "convertNgModuleDeclarationToMetadata");
|
|
29066
29168
|
function parseJitTemplate(template2, typeName, sourceMapUrl, preserveWhitespaces, deferBlockDependencies) {
|
|
29067
29169
|
const parsed = parseTemplate(template2, sourceMapUrl, {
|
|
29068
29170
|
preserveWhitespaces
|
|
@@ -29567,8 +29669,8 @@ var _Visitor3 = class {
|
|
|
29567
29669
|
_isPlaceholderOnlyAttributeValue(ast) {
|
|
29568
29670
|
if (!isAttrNode(ast)) return false;
|
|
29569
29671
|
const tokens = ast[0].valueTokens ?? [];
|
|
29570
|
-
const interpolations = tokens.filter((token) => token.type ===
|
|
29571
|
-
const plainText = tokens.filter((token) => token.type ===
|
|
29672
|
+
const interpolations = tokens.filter((token) => token.type === 18);
|
|
29673
|
+
const plainText = tokens.filter((token) => token.type === 17).map((token) => token.parts[0].trim()).join("");
|
|
29572
29674
|
return interpolations.length === 1 && plainText === "";
|
|
29573
29675
|
}
|
|
29574
29676
|
_isPlaceholderOnlyMessage(ast) {
|
|
@@ -30973,7 +31075,7 @@ var MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = "18.0.0";
|
|
|
30973
31075
|
function compileDeclareClassMetadata(metadata) {
|
|
30974
31076
|
const definitionMap = new DefinitionMap();
|
|
30975
31077
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$6));
|
|
30976
|
-
definitionMap.set("version", literal("22.0.
|
|
31078
|
+
definitionMap.set("version", literal("22.0.5"));
|
|
30977
31079
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30978
31080
|
definitionMap.set("type", metadata.type);
|
|
30979
31081
|
definitionMap.set("decorators", metadata.decorators);
|
|
@@ -30992,7 +31094,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
30992
31094
|
callbackReturnDefinitionMap.set("ctorParameters", metadata.ctorParameters ?? literal(null));
|
|
30993
31095
|
callbackReturnDefinitionMap.set("propDecorators", metadata.propDecorators ?? literal(null));
|
|
30994
31096
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
30995
|
-
definitionMap.set("version", literal("22.0.
|
|
31097
|
+
definitionMap.set("version", literal("22.0.5"));
|
|
30996
31098
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30997
31099
|
definitionMap.set("type", metadata.type);
|
|
30998
31100
|
definitionMap.set("resolveDeferredDeps", compileComponentMetadataAsyncResolver(dependencies));
|
|
@@ -31069,7 +31171,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
31069
31171
|
const definitionMap = new DefinitionMap();
|
|
31070
31172
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
31071
31173
|
definitionMap.set("minVersion", literal(minVersion));
|
|
31072
|
-
definitionMap.set("version", literal("22.0.
|
|
31174
|
+
definitionMap.set("version", literal("22.0.5"));
|
|
31073
31175
|
definitionMap.set("type", meta.type.value);
|
|
31074
31176
|
if (meta.isStandalone !== void 0) {
|
|
31075
31177
|
definitionMap.set("isStandalone", literal(meta.isStandalone));
|
|
@@ -31425,7 +31527,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION$5 = "12.0.0";
|
|
|
31425
31527
|
function compileDeclareFactoryFunction(meta) {
|
|
31426
31528
|
const definitionMap = new DefinitionMap();
|
|
31427
31529
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
31428
|
-
definitionMap.set("version", literal("22.0.
|
|
31530
|
+
definitionMap.set("version", literal("22.0.5"));
|
|
31429
31531
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
31430
31532
|
definitionMap.set("type", meta.type.value);
|
|
31431
31533
|
definitionMap.set("deps", compileDependencies(meta.deps));
|
|
@@ -31452,7 +31554,7 @@ __name(compileDeclareInjectableFromMetadata, "compileDeclareInjectableFromMetada
|
|
|
31452
31554
|
function createInjectableDefinitionMap(meta) {
|
|
31453
31555
|
const definitionMap = new DefinitionMap();
|
|
31454
31556
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
31455
|
-
definitionMap.set("version", literal("22.0.
|
|
31557
|
+
definitionMap.set("version", literal("22.0.5"));
|
|
31456
31558
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
31457
31559
|
definitionMap.set("type", meta.type.value);
|
|
31458
31560
|
if (meta.providedIn !== void 0) {
|
|
@@ -31494,7 +31596,7 @@ __name(compileDeclareServiceFromMetadata, "compileDeclareServiceFromMetadata");
|
|
|
31494
31596
|
function createServiceDefinitionMap(meta) {
|
|
31495
31597
|
const definitionMap = new DefinitionMap();
|
|
31496
31598
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
31497
|
-
definitionMap.set("version", literal("22.0.
|
|
31599
|
+
definitionMap.set("version", literal("22.0.5"));
|
|
31498
31600
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
31499
31601
|
definitionMap.set("type", meta.type.value);
|
|
31500
31602
|
if (meta.autoProvided === false) {
|
|
@@ -31521,7 +31623,7 @@ __name(compileDeclareInjectorFromMetadata, "compileDeclareInjectorFromMetadata")
|
|
|
31521
31623
|
function createInjectorDefinitionMap(meta) {
|
|
31522
31624
|
const definitionMap = new DefinitionMap();
|
|
31523
31625
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
31524
|
-
definitionMap.set("version", literal("22.0.
|
|
31626
|
+
definitionMap.set("version", literal("22.0.5"));
|
|
31525
31627
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
31526
31628
|
definitionMap.set("type", meta.type.value);
|
|
31527
31629
|
definitionMap.set("providers", meta.providers);
|
|
@@ -31552,7 +31654,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
31552
31654
|
throw new Error("Invalid path! Isolated compilation mode should not get into the partial compilation path");
|
|
31553
31655
|
}
|
|
31554
31656
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
31555
|
-
definitionMap.set("version", literal("22.0.
|
|
31657
|
+
definitionMap.set("version", literal("22.0.5"));
|
|
31556
31658
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
31557
31659
|
definitionMap.set("type", meta.type.value);
|
|
31558
31660
|
if (meta.bootstrap.length > 0) {
|
|
@@ -31591,7 +31693,7 @@ __name(compileDeclarePipeFromMetadata, "compileDeclarePipeFromMetadata");
|
|
|
31591
31693
|
function createPipeDefinitionMap(meta) {
|
|
31592
31694
|
const definitionMap = new DefinitionMap();
|
|
31593
31695
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
31594
|
-
definitionMap.set("version", literal("22.0.
|
|
31696
|
+
definitionMap.set("version", literal("22.0.5"));
|
|
31595
31697
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
31596
31698
|
definitionMap.set("type", meta.type.value);
|
|
31597
31699
|
if (meta.isStandalone !== void 0) {
|
|
@@ -31666,7 +31768,7 @@ function compileHmrUpdateCallback(definitions, constantStatements, meta) {
|
|
|
31666
31768
|
return new DeclareFunctionStmt(`${meta.className}_UpdateMetadata`, params, body, null, StmtModifier.Final);
|
|
31667
31769
|
}
|
|
31668
31770
|
__name(compileHmrUpdateCallback, "compileHmrUpdateCallback");
|
|
31669
|
-
var VERSION = new Version("22.0.
|
|
31771
|
+
var VERSION = new Version("22.0.5");
|
|
31670
31772
|
var HOST_BINDING_GUARD_COMMENT_TEXT = "hostBindingsBlockGuard";
|
|
31671
31773
|
function createHostElement(type, selector, nameSpan, hostObjectLiteralBindings, hostBindingDecorators, hostListenerDecorators) {
|
|
31672
31774
|
const bindings = [];
|
|
@@ -32810,7 +32912,7 @@ var TcbInvalidReferenceOp = class extends TcbOp {
|
|
|
32810
32912
|
optional = true;
|
|
32811
32913
|
execute() {
|
|
32812
32914
|
const id = new TcbExpr(this.tcb.allocateId());
|
|
32813
|
-
this.scope.addStatement(new TcbExpr(`var ${id.print()} = any`));
|
|
32915
|
+
this.scope.addStatement(new TcbExpr(`var ${id.print()} = null! as any`));
|
|
32814
32916
|
return id;
|
|
32815
32917
|
}
|
|
32816
32918
|
};
|
|
@@ -34840,6 +34942,7 @@ publishFacade(_global);
|
|
|
34840
34942
|
SplitInterpolation,
|
|
34841
34943
|
SpreadElement,
|
|
34842
34944
|
SpreadElementExpr,
|
|
34945
|
+
StartTagComment,
|
|
34843
34946
|
Statement,
|
|
34844
34947
|
StmtModifier,
|
|
34845
34948
|
StringToken,
|
|
@@ -34989,7 +35092,7 @@ publishFacade(_global);
|
|
|
34989
35092
|
|
|
34990
35093
|
@angular/compiler/fesm2022/compiler.mjs:
|
|
34991
35094
|
(**
|
|
34992
|
-
* @license Angular v22.0.
|
|
35095
|
+
* @license Angular v22.0.5
|
|
34993
35096
|
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
34994
35097
|
* License: MIT
|
|
34995
35098
|
*)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-eslint/bundled-angular-compiler",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.1.0",
|
|
4
4
|
"description": "A CJS bundled version of @angular/compiler",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"url": "https://github.com/angular-eslint/angular-eslint.git",
|
|
11
11
|
"directory": "packages/bundled-angular-compiler"
|
|
12
12
|
},
|
|
13
|
+
"bugs": "https://github.com/angular-eslint/angular-eslint/issues",
|
|
13
14
|
"files": [
|
|
14
15
|
"dist",
|
|
15
16
|
"!**/*.tsbuildinfo",
|