reffy 20.0.13 → 20.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +151 -151
- package/index.js +29 -29
- package/package.json +5 -5
- package/reffy.js +324 -324
- package/schemas/browserlib/extract-algorithms.json +52 -52
- package/schemas/browserlib/extract-cssdfn.json +108 -108
- package/schemas/browserlib/extract-dfns.json +90 -90
- package/schemas/browserlib/extract-elements.json +17 -17
- package/schemas/browserlib/extract-events.json +31 -31
- package/schemas/browserlib/extract-headings.json +19 -19
- package/schemas/browserlib/extract-ids.json +7 -7
- package/schemas/browserlib/extract-links.json +12 -12
- package/schemas/browserlib/extract-refs.json +12 -12
- package/schemas/common.json +876 -876
- package/schemas/files/extracts/algorithms.json +12 -12
- package/schemas/files/extracts/css.json +16 -16
- package/schemas/files/extracts/dfns.json +12 -12
- package/schemas/files/extracts/elements.json +12 -12
- package/schemas/files/extracts/events.json +12 -12
- package/schemas/files/extracts/headings.json +12 -12
- package/schemas/files/extracts/ids.json +12 -12
- package/schemas/files/extracts/links.json +12 -12
- package/schemas/files/extracts/refs.json +12 -12
- package/schemas/files/index.json +59 -59
- package/schemas/postprocessing/events.json +50 -50
- package/schemas/postprocessing/idlnames-parsed.json +27 -27
- package/schemas/postprocessing/idlnames.json +17 -17
- package/schemas/postprocessing/idlparsed.json +67 -67
- package/src/browserlib/clone-and-clean.mjs +24 -24
- package/src/browserlib/create-outline.mjs +353 -353
- package/src/browserlib/extract-algorithms.mjs +723 -723
- package/src/browserlib/extract-cddl.mjs +125 -125
- package/src/browserlib/extract-dfns.mjs +1093 -1093
- package/src/browserlib/extract-headings.mjs +76 -76
- package/src/browserlib/extract-ids.mjs +28 -28
- package/src/browserlib/extract-links.mjs +45 -45
- package/src/browserlib/extract-references.mjs +308 -308
- package/src/browserlib/extract-webidl.mjs +89 -89
- package/src/browserlib/get-absolute-url.mjs +29 -29
- package/src/browserlib/get-code-elements.mjs +20 -20
- package/src/browserlib/get-generator.mjs +26 -26
- package/src/browserlib/get-lastmodified-date.mjs +13 -13
- package/src/browserlib/get-revision.mjs +12 -12
- package/src/browserlib/get-title.mjs +14 -14
- package/src/browserlib/informative-selector.mjs +24 -24
- package/src/browserlib/map-ids-to-headings.mjs +173 -173
- package/src/browserlib/reffy.json +85 -85
- package/src/browserlib/trim-spaces.mjs +35 -35
- package/src/cli/check-missing-dfns.js +587 -587
- package/src/cli/merge-crawl-results.js +132 -132
- package/src/cli/parse-webidl.js +447 -447
- package/src/lib/css-grammar-parse-tree.schema.json +109 -109
- package/src/lib/css-grammar-parser.js +440 -440
- package/src/lib/fetch.js +51 -51
- package/src/lib/markdown-report.js +360 -360
- package/src/lib/mock-server.js +218 -218
- package/src/lib/post-processor.js +322 -322
- package/src/lib/throttled-queue.js +129 -129
- package/src/postprocessing/annotate-links.js +41 -41
- package/src/postprocessing/csscomplete.js +48 -48
- package/src/postprocessing/idlnames.js +391 -391
- package/src/postprocessing/idlparsed.js +179 -179
- package/src/postprocessing/patch-dfns.js +51 -51
- package/src/specs/missing-css-rules.json +197 -197
- package/src/specs/spec-equivalents.json +149 -149
- package/src/browserlib/extract-editors.mjs~ +0 -14
- package/src/browserlib/extract-events.mjs~ +0 -3
- package/src/browserlib/generate-es-dfn-report.sh~ +0 -4
- package/src/browserlib/get-revision.mjs~ +0 -7
- package/src/cli/csstree-grammar-check.js +0 -28
- package/src/cli/csstree-grammar-check.js~ +0 -10
- package/src/cli/csstree-grammar-parser.js +0 -11
- package/src/cli/csstree-grammar-parser.js~ +0 -1
- package/src/cli/extract-editors.js~ +0 -38
- package/src/cli/process-specs.js~ +0 -28
- package/src/postprocessing/annotate-links.js~ +0 -8
- package/src/postprocessing/events.js~ +0 -245
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/schema#",
|
|
3
|
-
"$id": "https://github.com/w3c/reffy/blob/main/schemas/postprocessing/idlparsed.json",
|
|
4
|
-
|
|
5
|
-
"type": "object",
|
|
6
|
-
"additionalProperties": false,
|
|
7
|
-
"required": ["spec", "idlparsed"],
|
|
8
|
-
"properties": {
|
|
9
|
-
"spec": { "$ref": "../common.json#/$defs/specInExtract" },
|
|
10
|
-
|
|
11
|
-
"idlparsed": {
|
|
12
|
-
"description": "Structured information about Web IDL definitions in the spec including, for each definition, an abstract syntax tree (AST) created by parsing the raw definition.",
|
|
13
|
-
"type": "object",
|
|
14
|
-
"additionalProperties": false,
|
|
15
|
-
"required": ["jsNames", "idlNames", "idlExtendedNames", "globals",
|
|
16
|
-
"exposed", "dependencies", "externalDependencies", "hasObsoleteIdl"],
|
|
17
|
-
"properties": {
|
|
18
|
-
"jsNames": {
|
|
19
|
-
"description": "List of names available to global interfaces, either as objects that can be constructed or as objects that can be returned from functions",
|
|
20
|
-
"type": "object",
|
|
21
|
-
"additionalProperties": false,
|
|
22
|
-
"required": ["constructors", "functions"],
|
|
23
|
-
"properties": {
|
|
24
|
-
"constructors": { "$ref": "../common.json#/$defs/interfacesByGlobal" },
|
|
25
|
-
"functions": { "$ref": "../common.json#/$defs/interfacesByGlobal" }
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
"idlNames": {
|
|
29
|
-
"description": "List of base IDL definitions, indexed by name",
|
|
30
|
-
"type": "object",
|
|
31
|
-
"propertyNames": { "$ref": "../common.json#/$defs/interface" },
|
|
32
|
-
"additionalProperties": { "$ref": "../common.json#/$defs/idlFragment" }
|
|
33
|
-
},
|
|
34
|
-
"idlExtendedNames": {
|
|
35
|
-
"description": "List of partial IDL definitions, indexed by name",
|
|
36
|
-
"type": "object",
|
|
37
|
-
"propertyNames": { "$ref": "../common.json#/$defs/interface" },
|
|
38
|
-
"additionalProperties": {
|
|
39
|
-
"type": "array",
|
|
40
|
-
"items": { "$ref": "../common.json#/$defs/idlFragment" }
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
"globals": {
|
|
44
|
-
"description": "List of globals defined by the IDL content indexed by global name, along with the list of underlying interface names",
|
|
45
|
-
"$ref": "../common.json#/$defs/interfacesByGlobal" },
|
|
46
|
-
"exposed": {
|
|
47
|
-
"description": "List of globals on which interfaces are defined indexed by global name, along with the names of the interfaces exposed on it. If present, the specific \"*\" entry lists interfaces exposed on all globals.",
|
|
48
|
-
"$ref": "../common.json#/$defs/interfacesByGlobal"
|
|
49
|
-
},
|
|
50
|
-
"dependencies": {
|
|
51
|
-
"description": "List of dependencies (both internal to the specification and defined in other specifications) for each interface, indexed by interface name",
|
|
52
|
-
"type": "object",
|
|
53
|
-
"propertyNames": { "$ref": "../common.json#/$defs/interface" },
|
|
54
|
-
"additionalProperties": { "$ref": "../common.json#/$defs/interfaces" }
|
|
55
|
-
},
|
|
56
|
-
"externalDependencies": {
|
|
57
|
-
"description": "List of IDL names used by the specification but defined in other specifications",
|
|
58
|
-
"$ref": "../common.json#/$defs/interfaces"
|
|
59
|
-
},
|
|
60
|
-
"hasObsoleteIdl": {
|
|
61
|
-
"description": "Whether the definitions contain obsolete Web IDL constructs",
|
|
62
|
-
"type": "boolean"
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema#",
|
|
3
|
+
"$id": "https://github.com/w3c/reffy/blob/main/schemas/postprocessing/idlparsed.json",
|
|
4
|
+
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["spec", "idlparsed"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"spec": { "$ref": "../common.json#/$defs/specInExtract" },
|
|
10
|
+
|
|
11
|
+
"idlparsed": {
|
|
12
|
+
"description": "Structured information about Web IDL definitions in the spec including, for each definition, an abstract syntax tree (AST) created by parsing the raw definition.",
|
|
13
|
+
"type": "object",
|
|
14
|
+
"additionalProperties": false,
|
|
15
|
+
"required": ["jsNames", "idlNames", "idlExtendedNames", "globals",
|
|
16
|
+
"exposed", "dependencies", "externalDependencies", "hasObsoleteIdl"],
|
|
17
|
+
"properties": {
|
|
18
|
+
"jsNames": {
|
|
19
|
+
"description": "List of names available to global interfaces, either as objects that can be constructed or as objects that can be returned from functions",
|
|
20
|
+
"type": "object",
|
|
21
|
+
"additionalProperties": false,
|
|
22
|
+
"required": ["constructors", "functions"],
|
|
23
|
+
"properties": {
|
|
24
|
+
"constructors": { "$ref": "../common.json#/$defs/interfacesByGlobal" },
|
|
25
|
+
"functions": { "$ref": "../common.json#/$defs/interfacesByGlobal" }
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"idlNames": {
|
|
29
|
+
"description": "List of base IDL definitions, indexed by name",
|
|
30
|
+
"type": "object",
|
|
31
|
+
"propertyNames": { "$ref": "../common.json#/$defs/interface" },
|
|
32
|
+
"additionalProperties": { "$ref": "../common.json#/$defs/idlFragment" }
|
|
33
|
+
},
|
|
34
|
+
"idlExtendedNames": {
|
|
35
|
+
"description": "List of partial IDL definitions, indexed by name",
|
|
36
|
+
"type": "object",
|
|
37
|
+
"propertyNames": { "$ref": "../common.json#/$defs/interface" },
|
|
38
|
+
"additionalProperties": {
|
|
39
|
+
"type": "array",
|
|
40
|
+
"items": { "$ref": "../common.json#/$defs/idlFragment" }
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"globals": {
|
|
44
|
+
"description": "List of globals defined by the IDL content indexed by global name, along with the list of underlying interface names",
|
|
45
|
+
"$ref": "../common.json#/$defs/interfacesByGlobal" },
|
|
46
|
+
"exposed": {
|
|
47
|
+
"description": "List of globals on which interfaces are defined indexed by global name, along with the names of the interfaces exposed on it. If present, the specific \"*\" entry lists interfaces exposed on all globals.",
|
|
48
|
+
"$ref": "../common.json#/$defs/interfacesByGlobal"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"description": "List of dependencies (both internal to the specification and defined in other specifications) for each interface, indexed by interface name",
|
|
52
|
+
"type": "object",
|
|
53
|
+
"propertyNames": { "$ref": "../common.json#/$defs/interface" },
|
|
54
|
+
"additionalProperties": { "$ref": "../common.json#/$defs/interfaces" }
|
|
55
|
+
},
|
|
56
|
+
"externalDependencies": {
|
|
57
|
+
"description": "List of IDL names used by the specification but defined in other specifications",
|
|
58
|
+
"$ref": "../common.json#/$defs/interfaces"
|
|
59
|
+
},
|
|
60
|
+
"hasObsoleteIdl": {
|
|
61
|
+
"description": "Whether the definitions contain obsolete Web IDL constructs",
|
|
62
|
+
"type": "boolean"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import informativeSelector from './informative-selector.mjs';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Return a copy of the given HTML element, stripped of annotations, side
|
|
5
|
-
* panels, and of HTML comments.
|
|
6
|
-
*/
|
|
7
|
-
export default function (element) {
|
|
8
|
-
// Apply modifications to a copy of the element
|
|
9
|
-
const copy = element.cloneNode(true);
|
|
10
|
-
|
|
11
|
-
// Drop asides that authoring tools add here and there
|
|
12
|
-
let el;
|
|
13
|
-
while (el = copy.querySelector(informativeSelector)) {
|
|
14
|
-
el.remove();
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// Remove HTML comments
|
|
18
|
-
const commentsIterator = document.createNodeIterator(copy, NodeFilter.SHOW_COMMENT);
|
|
19
|
-
let comment;
|
|
20
|
-
while ((comment = commentsIterator.nextNode())) {
|
|
21
|
-
comment.remove();
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
return copy;
|
|
1
|
+
import informativeSelector from './informative-selector.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Return a copy of the given HTML element, stripped of annotations, side
|
|
5
|
+
* panels, and of HTML comments.
|
|
6
|
+
*/
|
|
7
|
+
export default function (element) {
|
|
8
|
+
// Apply modifications to a copy of the element
|
|
9
|
+
const copy = element.cloneNode(true);
|
|
10
|
+
|
|
11
|
+
// Drop asides that authoring tools add here and there
|
|
12
|
+
let el;
|
|
13
|
+
while (el = copy.querySelector(informativeSelector)) {
|
|
14
|
+
el.remove();
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Remove HTML comments
|
|
18
|
+
const commentsIterator = document.createNodeIterator(copy, NodeFilter.SHOW_COMMENT);
|
|
19
|
+
let comment;
|
|
20
|
+
while ((comment = commentsIterator.nextNode())) {
|
|
21
|
+
comment.remove();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return copy;
|
|
25
25
|
}
|