@playdrop/playdrop-cli 0.12.42 → 0.13.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/config/client-meta.json +2 -2
- package/dist/apps/index.d.ts +2 -0
- package/dist/apps/index.js +2 -1
- package/dist/apps/loadCheck.d.ts +4 -1
- package/dist/apps/loadCheck.js +40 -10
- package/dist/apps/staticHtml.d.ts +28 -0
- package/dist/apps/staticHtml.js +343 -0
- package/dist/apps/validate.js +2 -1
- package/dist/commands/devServer.js +19 -0
- package/dist/commands/feedback.d.ts +2 -0
- package/dist/commands/feedback.js +44 -2
- package/dist/commands/upload.d.ts +24 -0
- package/dist/commands/upload.js +122 -4
- package/dist/commands/worker/instrument-evidence.js +1 -1
- package/dist/commands/worker/runtime.d.ts +14 -0
- package/dist/commands/worker/runtime.js +97 -8
- package/dist/commands/worker.d.ts +27 -2
- package/dist/commands/worker.js +688 -146
- package/dist/index.js +7 -0
- package/dist/listingPreflight.js +15 -4
- package/node_modules/@playdrop/api-client/dist/client.d.ts +5 -2
- package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts +3 -2
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.js +13 -2
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts +2 -1
- package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/me.d.ts +2 -1
- package/node_modules/@playdrop/api-client/dist/domains/me.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/me.js +11 -0
- package/node_modules/@playdrop/api-client/dist/index.d.ts +6 -3
- package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/index.js +14 -2
- package/node_modules/@playdrop/config/client-meta.json +2 -2
- package/node_modules/@playdrop/config/dist/src/constants.d.ts +1 -0
- package/node_modules/@playdrop/config/dist/src/constants.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/constants.js +1 -0
- package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@playdrop/types/dist/api.d.ts +195 -4
- package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/api.js +25 -2
- package/node_modules/entities/decode-codepoint.d.ts +19 -0
- package/node_modules/entities/decode-codepoint.d.ts.map +1 -0
- package/node_modules/entities/decode-codepoint.js +77 -0
- package/node_modules/entities/decode-codepoint.js.map +1 -0
- package/node_modules/entities/decode.d.ts +209 -0
- package/node_modules/entities/decode.d.ts.map +1 -0
- package/node_modules/entities/decode.js +511 -0
- package/node_modules/entities/decode.js.map +1 -0
- package/node_modules/entities/encode.d.ts +22 -0
- package/node_modules/entities/encode.d.ts.map +1 -0
- package/node_modules/entities/encode.js +73 -0
- package/node_modules/entities/encode.js.map +1 -0
- package/node_modules/entities/escape.d.ts +43 -0
- package/node_modules/entities/escape.d.ts.map +1 -0
- package/node_modules/entities/escape.js +121 -0
- package/node_modules/entities/escape.js.map +1 -0
- package/node_modules/entities/generated/decode-data-html.d.ts +2 -0
- package/node_modules/entities/generated/decode-data-html.d.ts.map +1 -0
- package/node_modules/entities/generated/decode-data-html.js +10 -0
- package/node_modules/entities/generated/decode-data-html.js.map +1 -0
- package/node_modules/entities/generated/decode-data-xml.d.ts +2 -0
- package/node_modules/entities/generated/decode-data-xml.d.ts.map +1 -0
- package/node_modules/entities/generated/decode-data-xml.js +10 -0
- package/node_modules/entities/generated/decode-data-xml.js.map +1 -0
- package/node_modules/entities/generated/encode-html.d.ts +8 -0
- package/node_modules/entities/generated/encode-html.d.ts.map +1 -0
- package/node_modules/entities/generated/encode-html.js +13 -0
- package/node_modules/entities/generated/encode-html.js.map +1 -0
- package/node_modules/entities/index.d.ts +96 -0
- package/node_modules/entities/index.d.ts.map +1 -0
- package/node_modules/entities/index.js +131 -0
- package/node_modules/entities/index.js.map +1 -0
- package/node_modules/entities/package.json +3 -0
- package/node_modules/parse5/common/doctype.d.ts +4 -0
- package/node_modules/parse5/common/doctype.js +118 -0
- package/node_modules/parse5/common/error-codes.d.ts +67 -0
- package/node_modules/parse5/common/error-codes.js +66 -0
- package/node_modules/parse5/common/foreign-content.d.ts +9 -0
- package/node_modules/parse5/common/foreign-content.js +237 -0
- package/node_modules/parse5/common/html.d.ts +289 -0
- package/node_modules/parse5/common/html.js +528 -0
- package/node_modules/parse5/common/token.d.ts +84 -0
- package/node_modules/parse5/common/token.js +24 -0
- package/node_modules/parse5/common/unicode.d.ts +42 -0
- package/node_modules/parse5/common/unicode.js +70 -0
- package/node_modules/parse5/index.d.ts +71 -0
- package/node_modules/parse5/index.js +54 -0
- package/node_modules/parse5/package.json +1 -0
- package/node_modules/parse5/parser/formatting-element-list.d.ts +36 -0
- package/node_modules/parse5/parser/formatting-element-list.js +114 -0
- package/node_modules/parse5/parser/index.d.ts +221 -0
- package/node_modules/parse5/parser/index.js +3240 -0
- package/node_modules/parse5/parser/open-element-stack.d.ts +53 -0
- package/node_modules/parse5/parser/open-element-stack.js +328 -0
- package/node_modules/parse5/serializer/index.d.ts +60 -0
- package/node_modules/parse5/serializer/index.js +172 -0
- package/node_modules/parse5/tokenizer/index.d.ts +247 -0
- package/node_modules/parse5/tokenizer/index.js +2714 -0
- package/node_modules/parse5/tokenizer/preprocessor.d.ts +36 -0
- package/node_modules/parse5/tokenizer/preprocessor.js +200 -0
- package/node_modules/parse5/tree-adapters/default.d.ts +84 -0
- package/node_modules/parse5/tree-adapters/default.js +176 -0
- package/node_modules/parse5/tree-adapters/interface.d.ts +255 -0
- package/node_modules/parse5/tree-adapters/interface.js +2 -0
- package/package.json +7 -1
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SVG_TAG_NAMES_ADJUSTMENT_MAP = void 0;
|
|
4
|
+
exports.causesExit = causesExit;
|
|
5
|
+
exports.adjustTokenMathMLAttrs = adjustTokenMathMLAttrs;
|
|
6
|
+
exports.adjustTokenSVGAttrs = adjustTokenSVGAttrs;
|
|
7
|
+
exports.adjustTokenXMLAttrs = adjustTokenXMLAttrs;
|
|
8
|
+
exports.adjustTokenSVGTagName = adjustTokenSVGTagName;
|
|
9
|
+
exports.isIntegrationPoint = isIntegrationPoint;
|
|
10
|
+
const html_js_1 = require("./html.js");
|
|
11
|
+
//MIME types
|
|
12
|
+
const MIME_TYPES = {
|
|
13
|
+
TEXT_HTML: 'text/html',
|
|
14
|
+
APPLICATION_XML: 'application/xhtml+xml',
|
|
15
|
+
};
|
|
16
|
+
//Attributes
|
|
17
|
+
const DEFINITION_URL_ATTR = 'definitionurl';
|
|
18
|
+
const ADJUSTED_DEFINITION_URL_ATTR = 'definitionURL';
|
|
19
|
+
const SVG_ATTRS_ADJUSTMENT_MAP = new Map([
|
|
20
|
+
'attributeName',
|
|
21
|
+
'attributeType',
|
|
22
|
+
'baseFrequency',
|
|
23
|
+
'baseProfile',
|
|
24
|
+
'calcMode',
|
|
25
|
+
'clipPathUnits',
|
|
26
|
+
'diffuseConstant',
|
|
27
|
+
'edgeMode',
|
|
28
|
+
'filterUnits',
|
|
29
|
+
'glyphRef',
|
|
30
|
+
'gradientTransform',
|
|
31
|
+
'gradientUnits',
|
|
32
|
+
'kernelMatrix',
|
|
33
|
+
'kernelUnitLength',
|
|
34
|
+
'keyPoints',
|
|
35
|
+
'keySplines',
|
|
36
|
+
'keyTimes',
|
|
37
|
+
'lengthAdjust',
|
|
38
|
+
'limitingConeAngle',
|
|
39
|
+
'markerHeight',
|
|
40
|
+
'markerUnits',
|
|
41
|
+
'markerWidth',
|
|
42
|
+
'maskContentUnits',
|
|
43
|
+
'maskUnits',
|
|
44
|
+
'numOctaves',
|
|
45
|
+
'pathLength',
|
|
46
|
+
'patternContentUnits',
|
|
47
|
+
'patternTransform',
|
|
48
|
+
'patternUnits',
|
|
49
|
+
'pointsAtX',
|
|
50
|
+
'pointsAtY',
|
|
51
|
+
'pointsAtZ',
|
|
52
|
+
'preserveAlpha',
|
|
53
|
+
'preserveAspectRatio',
|
|
54
|
+
'primitiveUnits',
|
|
55
|
+
'refX',
|
|
56
|
+
'refY',
|
|
57
|
+
'repeatCount',
|
|
58
|
+
'repeatDur',
|
|
59
|
+
'requiredExtensions',
|
|
60
|
+
'requiredFeatures',
|
|
61
|
+
'specularConstant',
|
|
62
|
+
'specularExponent',
|
|
63
|
+
'spreadMethod',
|
|
64
|
+
'startOffset',
|
|
65
|
+
'stdDeviation',
|
|
66
|
+
'stitchTiles',
|
|
67
|
+
'surfaceScale',
|
|
68
|
+
'systemLanguage',
|
|
69
|
+
'tableValues',
|
|
70
|
+
'targetX',
|
|
71
|
+
'targetY',
|
|
72
|
+
'textLength',
|
|
73
|
+
'viewBox',
|
|
74
|
+
'viewTarget',
|
|
75
|
+
'xChannelSelector',
|
|
76
|
+
'yChannelSelector',
|
|
77
|
+
'zoomAndPan',
|
|
78
|
+
].map((attr) => [attr.toLowerCase(), attr]));
|
|
79
|
+
const XML_ATTRS_ADJUSTMENT_MAP = new Map([
|
|
80
|
+
['xlink:actuate', { prefix: 'xlink', name: 'actuate', namespace: html_js_1.NS.XLINK }],
|
|
81
|
+
['xlink:arcrole', { prefix: 'xlink', name: 'arcrole', namespace: html_js_1.NS.XLINK }],
|
|
82
|
+
['xlink:href', { prefix: 'xlink', name: 'href', namespace: html_js_1.NS.XLINK }],
|
|
83
|
+
['xlink:role', { prefix: 'xlink', name: 'role', namespace: html_js_1.NS.XLINK }],
|
|
84
|
+
['xlink:show', { prefix: 'xlink', name: 'show', namespace: html_js_1.NS.XLINK }],
|
|
85
|
+
['xlink:title', { prefix: 'xlink', name: 'title', namespace: html_js_1.NS.XLINK }],
|
|
86
|
+
['xlink:type', { prefix: 'xlink', name: 'type', namespace: html_js_1.NS.XLINK }],
|
|
87
|
+
['xml:lang', { prefix: 'xml', name: 'lang', namespace: html_js_1.NS.XML }],
|
|
88
|
+
['xml:space', { prefix: 'xml', name: 'space', namespace: html_js_1.NS.XML }],
|
|
89
|
+
['xmlns', { prefix: '', name: 'xmlns', namespace: html_js_1.NS.XMLNS }],
|
|
90
|
+
['xmlns:xlink', { prefix: 'xmlns', name: 'xlink', namespace: html_js_1.NS.XMLNS }],
|
|
91
|
+
]);
|
|
92
|
+
//SVG tag names adjustment map
|
|
93
|
+
exports.SVG_TAG_NAMES_ADJUSTMENT_MAP = new Map([
|
|
94
|
+
'altGlyph',
|
|
95
|
+
'altGlyphDef',
|
|
96
|
+
'altGlyphItem',
|
|
97
|
+
'animateColor',
|
|
98
|
+
'animateMotion',
|
|
99
|
+
'animateTransform',
|
|
100
|
+
'clipPath',
|
|
101
|
+
'feBlend',
|
|
102
|
+
'feColorMatrix',
|
|
103
|
+
'feComponentTransfer',
|
|
104
|
+
'feComposite',
|
|
105
|
+
'feConvolveMatrix',
|
|
106
|
+
'feDiffuseLighting',
|
|
107
|
+
'feDisplacementMap',
|
|
108
|
+
'feDistantLight',
|
|
109
|
+
'feFlood',
|
|
110
|
+
'feFuncA',
|
|
111
|
+
'feFuncB',
|
|
112
|
+
'feFuncG',
|
|
113
|
+
'feFuncR',
|
|
114
|
+
'feGaussianBlur',
|
|
115
|
+
'feImage',
|
|
116
|
+
'feMerge',
|
|
117
|
+
'feMergeNode',
|
|
118
|
+
'feMorphology',
|
|
119
|
+
'feOffset',
|
|
120
|
+
'fePointLight',
|
|
121
|
+
'feSpecularLighting',
|
|
122
|
+
'feSpotLight',
|
|
123
|
+
'feTile',
|
|
124
|
+
'feTurbulence',
|
|
125
|
+
'foreignObject',
|
|
126
|
+
'glyphRef',
|
|
127
|
+
'linearGradient',
|
|
128
|
+
'radialGradient',
|
|
129
|
+
'textPath',
|
|
130
|
+
].map((tn) => [tn.toLowerCase(), tn]));
|
|
131
|
+
//Tags that causes exit from foreign content
|
|
132
|
+
const EXITS_FOREIGN_CONTENT = new Set([
|
|
133
|
+
html_js_1.TAG_ID.B,
|
|
134
|
+
html_js_1.TAG_ID.BIG,
|
|
135
|
+
html_js_1.TAG_ID.BLOCKQUOTE,
|
|
136
|
+
html_js_1.TAG_ID.BODY,
|
|
137
|
+
html_js_1.TAG_ID.BR,
|
|
138
|
+
html_js_1.TAG_ID.CENTER,
|
|
139
|
+
html_js_1.TAG_ID.CODE,
|
|
140
|
+
html_js_1.TAG_ID.DD,
|
|
141
|
+
html_js_1.TAG_ID.DIV,
|
|
142
|
+
html_js_1.TAG_ID.DL,
|
|
143
|
+
html_js_1.TAG_ID.DT,
|
|
144
|
+
html_js_1.TAG_ID.EM,
|
|
145
|
+
html_js_1.TAG_ID.EMBED,
|
|
146
|
+
html_js_1.TAG_ID.H1,
|
|
147
|
+
html_js_1.TAG_ID.H2,
|
|
148
|
+
html_js_1.TAG_ID.H3,
|
|
149
|
+
html_js_1.TAG_ID.H4,
|
|
150
|
+
html_js_1.TAG_ID.H5,
|
|
151
|
+
html_js_1.TAG_ID.H6,
|
|
152
|
+
html_js_1.TAG_ID.HEAD,
|
|
153
|
+
html_js_1.TAG_ID.HR,
|
|
154
|
+
html_js_1.TAG_ID.I,
|
|
155
|
+
html_js_1.TAG_ID.IMG,
|
|
156
|
+
html_js_1.TAG_ID.LI,
|
|
157
|
+
html_js_1.TAG_ID.LISTING,
|
|
158
|
+
html_js_1.TAG_ID.MENU,
|
|
159
|
+
html_js_1.TAG_ID.META,
|
|
160
|
+
html_js_1.TAG_ID.NOBR,
|
|
161
|
+
html_js_1.TAG_ID.OL,
|
|
162
|
+
html_js_1.TAG_ID.P,
|
|
163
|
+
html_js_1.TAG_ID.PRE,
|
|
164
|
+
html_js_1.TAG_ID.RUBY,
|
|
165
|
+
html_js_1.TAG_ID.S,
|
|
166
|
+
html_js_1.TAG_ID.SMALL,
|
|
167
|
+
html_js_1.TAG_ID.SPAN,
|
|
168
|
+
html_js_1.TAG_ID.STRONG,
|
|
169
|
+
html_js_1.TAG_ID.STRIKE,
|
|
170
|
+
html_js_1.TAG_ID.SUB,
|
|
171
|
+
html_js_1.TAG_ID.SUP,
|
|
172
|
+
html_js_1.TAG_ID.TABLE,
|
|
173
|
+
html_js_1.TAG_ID.TT,
|
|
174
|
+
html_js_1.TAG_ID.U,
|
|
175
|
+
html_js_1.TAG_ID.UL,
|
|
176
|
+
html_js_1.TAG_ID.VAR,
|
|
177
|
+
]);
|
|
178
|
+
//Check exit from foreign content
|
|
179
|
+
function causesExit(startTagToken) {
|
|
180
|
+
const tn = startTagToken.tagID;
|
|
181
|
+
const isFontWithAttrs = tn === html_js_1.TAG_ID.FONT &&
|
|
182
|
+
startTagToken.attrs.some(({ name }) => name === html_js_1.ATTRS.COLOR || name === html_js_1.ATTRS.SIZE || name === html_js_1.ATTRS.FACE);
|
|
183
|
+
return isFontWithAttrs || EXITS_FOREIGN_CONTENT.has(tn);
|
|
184
|
+
}
|
|
185
|
+
//Token adjustments
|
|
186
|
+
function adjustTokenMathMLAttrs(token) {
|
|
187
|
+
for (let i = 0; i < token.attrs.length; i++) {
|
|
188
|
+
if (token.attrs[i].name === DEFINITION_URL_ATTR) {
|
|
189
|
+
token.attrs[i].name = ADJUSTED_DEFINITION_URL_ATTR;
|
|
190
|
+
break;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
function adjustTokenSVGAttrs(token) {
|
|
195
|
+
for (let i = 0; i < token.attrs.length; i++) {
|
|
196
|
+
const adjustedAttrName = SVG_ATTRS_ADJUSTMENT_MAP.get(token.attrs[i].name);
|
|
197
|
+
if (adjustedAttrName != null) {
|
|
198
|
+
token.attrs[i].name = adjustedAttrName;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
function adjustTokenXMLAttrs(token) {
|
|
203
|
+
for (let i = 0; i < token.attrs.length; i++) {
|
|
204
|
+
const adjustedAttrEntry = XML_ATTRS_ADJUSTMENT_MAP.get(token.attrs[i].name);
|
|
205
|
+
if (adjustedAttrEntry) {
|
|
206
|
+
token.attrs[i].prefix = adjustedAttrEntry.prefix;
|
|
207
|
+
token.attrs[i].name = adjustedAttrEntry.name;
|
|
208
|
+
token.attrs[i].namespace = adjustedAttrEntry.namespace;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
function adjustTokenSVGTagName(token) {
|
|
213
|
+
const adjustedTagName = exports.SVG_TAG_NAMES_ADJUSTMENT_MAP.get(token.tagName);
|
|
214
|
+
if (adjustedTagName != null) {
|
|
215
|
+
token.tagName = adjustedTagName;
|
|
216
|
+
token.tagID = (0, html_js_1.getTagID)(token.tagName);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
//Integration points
|
|
220
|
+
function isMathMLTextIntegrationPoint(tn, ns) {
|
|
221
|
+
return ns === html_js_1.NS.MATHML && (tn === html_js_1.TAG_ID.MI || tn === html_js_1.TAG_ID.MO || tn === html_js_1.TAG_ID.MN || tn === html_js_1.TAG_ID.MS || tn === html_js_1.TAG_ID.MTEXT);
|
|
222
|
+
}
|
|
223
|
+
function isHtmlIntegrationPoint(tn, ns, attrs) {
|
|
224
|
+
if (ns === html_js_1.NS.MATHML && tn === html_js_1.TAG_ID.ANNOTATION_XML) {
|
|
225
|
+
for (let i = 0; i < attrs.length; i++) {
|
|
226
|
+
if (attrs[i].name === html_js_1.ATTRS.ENCODING) {
|
|
227
|
+
const value = attrs[i].value.toLowerCase();
|
|
228
|
+
return value === MIME_TYPES.TEXT_HTML || value === MIME_TYPES.APPLICATION_XML;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
return ns === html_js_1.NS.SVG && (tn === html_js_1.TAG_ID.FOREIGN_OBJECT || tn === html_js_1.TAG_ID.DESC || tn === html_js_1.TAG_ID.TITLE);
|
|
233
|
+
}
|
|
234
|
+
function isIntegrationPoint(tn, ns, attrs, foreignNS) {
|
|
235
|
+
return (((!foreignNS || foreignNS === html_js_1.NS.HTML) && isHtmlIntegrationPoint(tn, ns, attrs)) ||
|
|
236
|
+
((!foreignNS || foreignNS === html_js_1.NS.MATHML) && isMathMLTextIntegrationPoint(tn, ns)));
|
|
237
|
+
}
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
/** All valid namespaces in HTML. */
|
|
2
|
+
export declare enum NS {
|
|
3
|
+
HTML = "http://www.w3.org/1999/xhtml",
|
|
4
|
+
MATHML = "http://www.w3.org/1998/Math/MathML",
|
|
5
|
+
SVG = "http://www.w3.org/2000/svg",
|
|
6
|
+
XLINK = "http://www.w3.org/1999/xlink",
|
|
7
|
+
XML = "http://www.w3.org/XML/1998/namespace",
|
|
8
|
+
XMLNS = "http://www.w3.org/2000/xmlns/"
|
|
9
|
+
}
|
|
10
|
+
export declare enum ATTRS {
|
|
11
|
+
TYPE = "type",
|
|
12
|
+
ACTION = "action",
|
|
13
|
+
ENCODING = "encoding",
|
|
14
|
+
PROMPT = "prompt",
|
|
15
|
+
NAME = "name",
|
|
16
|
+
COLOR = "color",
|
|
17
|
+
FACE = "face",
|
|
18
|
+
SIZE = "size"
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The mode of the document.
|
|
22
|
+
*
|
|
23
|
+
* @see {@link https://dom.spec.whatwg.org/#concept-document-limited-quirks}
|
|
24
|
+
*/
|
|
25
|
+
export declare enum DOCUMENT_MODE {
|
|
26
|
+
NO_QUIRKS = "no-quirks",
|
|
27
|
+
QUIRKS = "quirks",
|
|
28
|
+
LIMITED_QUIRKS = "limited-quirks"
|
|
29
|
+
}
|
|
30
|
+
export declare enum TAG_NAMES {
|
|
31
|
+
A = "a",
|
|
32
|
+
ADDRESS = "address",
|
|
33
|
+
ANNOTATION_XML = "annotation-xml",
|
|
34
|
+
APPLET = "applet",
|
|
35
|
+
AREA = "area",
|
|
36
|
+
ARTICLE = "article",
|
|
37
|
+
ASIDE = "aside",
|
|
38
|
+
B = "b",
|
|
39
|
+
BASE = "base",
|
|
40
|
+
BASEFONT = "basefont",
|
|
41
|
+
BGSOUND = "bgsound",
|
|
42
|
+
BIG = "big",
|
|
43
|
+
BLOCKQUOTE = "blockquote",
|
|
44
|
+
BODY = "body",
|
|
45
|
+
BR = "br",
|
|
46
|
+
BUTTON = "button",
|
|
47
|
+
CAPTION = "caption",
|
|
48
|
+
CENTER = "center",
|
|
49
|
+
CODE = "code",
|
|
50
|
+
COL = "col",
|
|
51
|
+
COLGROUP = "colgroup",
|
|
52
|
+
DD = "dd",
|
|
53
|
+
DESC = "desc",
|
|
54
|
+
DETAILS = "details",
|
|
55
|
+
DIALOG = "dialog",
|
|
56
|
+
DIR = "dir",
|
|
57
|
+
DIV = "div",
|
|
58
|
+
DL = "dl",
|
|
59
|
+
DT = "dt",
|
|
60
|
+
EM = "em",
|
|
61
|
+
EMBED = "embed",
|
|
62
|
+
FIELDSET = "fieldset",
|
|
63
|
+
FIGCAPTION = "figcaption",
|
|
64
|
+
FIGURE = "figure",
|
|
65
|
+
FONT = "font",
|
|
66
|
+
FOOTER = "footer",
|
|
67
|
+
FOREIGN_OBJECT = "foreignObject",
|
|
68
|
+
FORM = "form",
|
|
69
|
+
FRAME = "frame",
|
|
70
|
+
FRAMESET = "frameset",
|
|
71
|
+
H1 = "h1",
|
|
72
|
+
H2 = "h2",
|
|
73
|
+
H3 = "h3",
|
|
74
|
+
H4 = "h4",
|
|
75
|
+
H5 = "h5",
|
|
76
|
+
H6 = "h6",
|
|
77
|
+
HEAD = "head",
|
|
78
|
+
HEADER = "header",
|
|
79
|
+
HGROUP = "hgroup",
|
|
80
|
+
HR = "hr",
|
|
81
|
+
HTML = "html",
|
|
82
|
+
I = "i",
|
|
83
|
+
IMG = "img",
|
|
84
|
+
IMAGE = "image",
|
|
85
|
+
INPUT = "input",
|
|
86
|
+
IFRAME = "iframe",
|
|
87
|
+
KEYGEN = "keygen",
|
|
88
|
+
LABEL = "label",
|
|
89
|
+
LI = "li",
|
|
90
|
+
LINK = "link",
|
|
91
|
+
LISTING = "listing",
|
|
92
|
+
MAIN = "main",
|
|
93
|
+
MALIGNMARK = "malignmark",
|
|
94
|
+
MARQUEE = "marquee",
|
|
95
|
+
MATH = "math",
|
|
96
|
+
MENU = "menu",
|
|
97
|
+
META = "meta",
|
|
98
|
+
MGLYPH = "mglyph",
|
|
99
|
+
MI = "mi",
|
|
100
|
+
MO = "mo",
|
|
101
|
+
MN = "mn",
|
|
102
|
+
MS = "ms",
|
|
103
|
+
MTEXT = "mtext",
|
|
104
|
+
NAV = "nav",
|
|
105
|
+
NOBR = "nobr",
|
|
106
|
+
NOFRAMES = "noframes",
|
|
107
|
+
NOEMBED = "noembed",
|
|
108
|
+
NOSCRIPT = "noscript",
|
|
109
|
+
OBJECT = "object",
|
|
110
|
+
OL = "ol",
|
|
111
|
+
OPTGROUP = "optgroup",
|
|
112
|
+
OPTION = "option",
|
|
113
|
+
P = "p",
|
|
114
|
+
PARAM = "param",
|
|
115
|
+
PLAINTEXT = "plaintext",
|
|
116
|
+
PRE = "pre",
|
|
117
|
+
RB = "rb",
|
|
118
|
+
RP = "rp",
|
|
119
|
+
RT = "rt",
|
|
120
|
+
RTC = "rtc",
|
|
121
|
+
RUBY = "ruby",
|
|
122
|
+
S = "s",
|
|
123
|
+
SCRIPT = "script",
|
|
124
|
+
SEARCH = "search",
|
|
125
|
+
SECTION = "section",
|
|
126
|
+
SELECT = "select",
|
|
127
|
+
SOURCE = "source",
|
|
128
|
+
SMALL = "small",
|
|
129
|
+
SPAN = "span",
|
|
130
|
+
STRIKE = "strike",
|
|
131
|
+
STRONG = "strong",
|
|
132
|
+
STYLE = "style",
|
|
133
|
+
SUB = "sub",
|
|
134
|
+
SUMMARY = "summary",
|
|
135
|
+
SUP = "sup",
|
|
136
|
+
TABLE = "table",
|
|
137
|
+
TBODY = "tbody",
|
|
138
|
+
TEMPLATE = "template",
|
|
139
|
+
TEXTAREA = "textarea",
|
|
140
|
+
TFOOT = "tfoot",
|
|
141
|
+
TD = "td",
|
|
142
|
+
TH = "th",
|
|
143
|
+
THEAD = "thead",
|
|
144
|
+
TITLE = "title",
|
|
145
|
+
TR = "tr",
|
|
146
|
+
TRACK = "track",
|
|
147
|
+
TT = "tt",
|
|
148
|
+
U = "u",
|
|
149
|
+
UL = "ul",
|
|
150
|
+
SVG = "svg",
|
|
151
|
+
VAR = "var",
|
|
152
|
+
WBR = "wbr",
|
|
153
|
+
XMP = "xmp"
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Tag IDs are numeric IDs for known tag names.
|
|
157
|
+
*
|
|
158
|
+
* We use tag IDs to improve the performance of tag name comparisons.
|
|
159
|
+
*/
|
|
160
|
+
export declare enum TAG_ID {
|
|
161
|
+
UNKNOWN = 0,
|
|
162
|
+
A = 1,
|
|
163
|
+
ADDRESS = 2,
|
|
164
|
+
ANNOTATION_XML = 3,
|
|
165
|
+
APPLET = 4,
|
|
166
|
+
AREA = 5,
|
|
167
|
+
ARTICLE = 6,
|
|
168
|
+
ASIDE = 7,
|
|
169
|
+
B = 8,
|
|
170
|
+
BASE = 9,
|
|
171
|
+
BASEFONT = 10,
|
|
172
|
+
BGSOUND = 11,
|
|
173
|
+
BIG = 12,
|
|
174
|
+
BLOCKQUOTE = 13,
|
|
175
|
+
BODY = 14,
|
|
176
|
+
BR = 15,
|
|
177
|
+
BUTTON = 16,
|
|
178
|
+
CAPTION = 17,
|
|
179
|
+
CENTER = 18,
|
|
180
|
+
CODE = 19,
|
|
181
|
+
COL = 20,
|
|
182
|
+
COLGROUP = 21,
|
|
183
|
+
DD = 22,
|
|
184
|
+
DESC = 23,
|
|
185
|
+
DETAILS = 24,
|
|
186
|
+
DIALOG = 25,
|
|
187
|
+
DIR = 26,
|
|
188
|
+
DIV = 27,
|
|
189
|
+
DL = 28,
|
|
190
|
+
DT = 29,
|
|
191
|
+
EM = 30,
|
|
192
|
+
EMBED = 31,
|
|
193
|
+
FIELDSET = 32,
|
|
194
|
+
FIGCAPTION = 33,
|
|
195
|
+
FIGURE = 34,
|
|
196
|
+
FONT = 35,
|
|
197
|
+
FOOTER = 36,
|
|
198
|
+
FOREIGN_OBJECT = 37,
|
|
199
|
+
FORM = 38,
|
|
200
|
+
FRAME = 39,
|
|
201
|
+
FRAMESET = 40,
|
|
202
|
+
H1 = 41,
|
|
203
|
+
H2 = 42,
|
|
204
|
+
H3 = 43,
|
|
205
|
+
H4 = 44,
|
|
206
|
+
H5 = 45,
|
|
207
|
+
H6 = 46,
|
|
208
|
+
HEAD = 47,
|
|
209
|
+
HEADER = 48,
|
|
210
|
+
HGROUP = 49,
|
|
211
|
+
HR = 50,
|
|
212
|
+
HTML = 51,
|
|
213
|
+
I = 52,
|
|
214
|
+
IMG = 53,
|
|
215
|
+
IMAGE = 54,
|
|
216
|
+
INPUT = 55,
|
|
217
|
+
IFRAME = 56,
|
|
218
|
+
KEYGEN = 57,
|
|
219
|
+
LABEL = 58,
|
|
220
|
+
LI = 59,
|
|
221
|
+
LINK = 60,
|
|
222
|
+
LISTING = 61,
|
|
223
|
+
MAIN = 62,
|
|
224
|
+
MALIGNMARK = 63,
|
|
225
|
+
MARQUEE = 64,
|
|
226
|
+
MATH = 65,
|
|
227
|
+
MENU = 66,
|
|
228
|
+
META = 67,
|
|
229
|
+
MGLYPH = 68,
|
|
230
|
+
MI = 69,
|
|
231
|
+
MO = 70,
|
|
232
|
+
MN = 71,
|
|
233
|
+
MS = 72,
|
|
234
|
+
MTEXT = 73,
|
|
235
|
+
NAV = 74,
|
|
236
|
+
NOBR = 75,
|
|
237
|
+
NOFRAMES = 76,
|
|
238
|
+
NOEMBED = 77,
|
|
239
|
+
NOSCRIPT = 78,
|
|
240
|
+
OBJECT = 79,
|
|
241
|
+
OL = 80,
|
|
242
|
+
OPTGROUP = 81,
|
|
243
|
+
OPTION = 82,
|
|
244
|
+
P = 83,
|
|
245
|
+
PARAM = 84,
|
|
246
|
+
PLAINTEXT = 85,
|
|
247
|
+
PRE = 86,
|
|
248
|
+
RB = 87,
|
|
249
|
+
RP = 88,
|
|
250
|
+
RT = 89,
|
|
251
|
+
RTC = 90,
|
|
252
|
+
RUBY = 91,
|
|
253
|
+
S = 92,
|
|
254
|
+
SCRIPT = 93,
|
|
255
|
+
SEARCH = 94,
|
|
256
|
+
SECTION = 95,
|
|
257
|
+
SELECT = 96,
|
|
258
|
+
SOURCE = 97,
|
|
259
|
+
SMALL = 98,
|
|
260
|
+
SPAN = 99,
|
|
261
|
+
STRIKE = 100,
|
|
262
|
+
STRONG = 101,
|
|
263
|
+
STYLE = 102,
|
|
264
|
+
SUB = 103,
|
|
265
|
+
SUMMARY = 104,
|
|
266
|
+
SUP = 105,
|
|
267
|
+
TABLE = 106,
|
|
268
|
+
TBODY = 107,
|
|
269
|
+
TEMPLATE = 108,
|
|
270
|
+
TEXTAREA = 109,
|
|
271
|
+
TFOOT = 110,
|
|
272
|
+
TD = 111,
|
|
273
|
+
TH = 112,
|
|
274
|
+
THEAD = 113,
|
|
275
|
+
TITLE = 114,
|
|
276
|
+
TR = 115,
|
|
277
|
+
TRACK = 116,
|
|
278
|
+
TT = 117,
|
|
279
|
+
U = 118,
|
|
280
|
+
UL = 119,
|
|
281
|
+
SVG = 120,
|
|
282
|
+
VAR = 121,
|
|
283
|
+
WBR = 122,
|
|
284
|
+
XMP = 123
|
|
285
|
+
}
|
|
286
|
+
export declare function getTagID(tagName: string): TAG_ID;
|
|
287
|
+
export declare const SPECIAL_ELEMENTS: Record<NS, Set<TAG_ID>>;
|
|
288
|
+
export declare const NUMBERED_HEADERS: Set<TAG_ID>;
|
|
289
|
+
export declare function hasUnescapedText(tn: string, scriptingEnabled: boolean): boolean;
|