which-heading-do-i-need 0.0.0 → 0.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/declarations/index.d.ts
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Determines what your heading level should be (h1 - h6).
|
|
3
|
+
*
|
|
4
|
+
* In your app, you can use any of `<section>`, `<article>`, and `<aside>` elements to denote when the [_Section Heading_][mdn-h] element should change its level.
|
|
5
|
+
Note that this demo starts with `h3`, because this docs page already has an `h1`, and _this_ section (Usage) uses an `h2`.
|
|
6
|
+
|
|
7
|
+
* [mdn-h]: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/Heading_Elements
|
|
8
|
+
*/
|
|
1
9
|
export declare function getSectionHeadingLevel(node: Text): number;
|
|
2
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA4LA;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,IAAI,UAWhD"}
|
package/dist/index.js
CHANGED
|
@@ -9,12 +9,54 @@ const TEST_BOUNDARY = 'ember-testing';
|
|
|
9
9
|
function isRoot(element) {
|
|
10
10
|
return element === document.body || element.id === TEST_BOUNDARY;
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* node is our current traversal node as we head up the DOM tree (towards the root)
|
|
15
|
+
* previous node is the immediate child within that current traversal node that we came from.
|
|
16
|
+
*
|
|
17
|
+
* The previousNode is used for an optimization so that we can iterate *from*
|
|
18
|
+
* that child within the current traversal node, rather than always starting from the
|
|
19
|
+
* first child of the current traversal node.
|
|
20
|
+
*/
|
|
21
|
+
function findHeadingIn(node, previousNode) {
|
|
13
22
|
if (!(node instanceof Element)) return;
|
|
14
23
|
if (SECTION_HEADINGS.has(node.tagName)) {
|
|
15
24
|
const level = parseInt(node.tagName.replace('h', '').replace('H', ''));
|
|
16
25
|
return level;
|
|
17
26
|
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Previous traversal does not search within the section boundaies
|
|
30
|
+
* This is because previous traversal is looking for a similar heading level, and crossing a section boundary changes the section level.
|
|
31
|
+
*/
|
|
32
|
+
if (previousNode) {
|
|
33
|
+
let previous = previousNode.previousSibling;
|
|
34
|
+
while (previous) {
|
|
35
|
+
if (!(previous instanceof Element)) {
|
|
36
|
+
previous = previous.previousSibling;
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
if (BOUNDARY_ELEMENTS.has(previous.tagName)) {
|
|
40
|
+
previous = previous.previousSibling;
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
const level = findHeadingIn(previous);
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* We subtract one, because we may have found
|
|
47
|
+
* an equal heading, due to it being a sibling
|
|
48
|
+
*/
|
|
49
|
+
if (level) return level;
|
|
50
|
+
previous = previous.previousSibling;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Fallback traversal if we still haven't found the
|
|
56
|
+
* heading level, we check all the children
|
|
57
|
+
* of the current node, because headings can be
|
|
58
|
+
* within <a> tags and such.
|
|
59
|
+
*/
|
|
18
60
|
for (const child of node.children) {
|
|
19
61
|
const level = findHeadingIn(child);
|
|
20
62
|
if (level) return level;
|
|
@@ -73,9 +115,10 @@ function levelOf(node) {
|
|
|
73
115
|
if (!stopAt) {
|
|
74
116
|
throw new Error(`[BUG]: Could not find a stopping boundary for automatic heading level detection. Checked for ${[...BOUNDARY_ELEMENTS, 'body', '#ember-testing'].map(x => x.toLowerCase()).join(', ')}`);
|
|
75
117
|
}
|
|
118
|
+
let previous = ourBoundary;
|
|
76
119
|
let current = ourBoundary.parentNode;
|
|
77
120
|
while (current) {
|
|
78
|
-
const level = findHeadingIn(current);
|
|
121
|
+
const level = findHeadingIn(current, previous);
|
|
79
122
|
if (level) {
|
|
80
123
|
return level + 1;
|
|
81
124
|
}
|
|
@@ -83,10 +126,20 @@ function levelOf(node) {
|
|
|
83
126
|
if (current instanceof ShadowRoot) {
|
|
84
127
|
current = current.host;
|
|
85
128
|
}
|
|
129
|
+
previous = current;
|
|
86
130
|
current = current.parentNode;
|
|
87
131
|
}
|
|
88
132
|
return 1;
|
|
89
133
|
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Determines what your heading level should be (h1 - h6).
|
|
137
|
+
*
|
|
138
|
+
* In your app, you can use any of `<section>`, `<article>`, and `<aside>` elements to denote when the [_Section Heading_][mdn-h] element should change its level.
|
|
139
|
+
Note that this demo starts with `h3`, because this docs page already has an `h1`, and _this_ section (Usage) uses an `h2`.
|
|
140
|
+
|
|
141
|
+
* [mdn-h]: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/Heading_Elements
|
|
142
|
+
*/
|
|
90
143
|
function getSectionHeadingLevel(node) {
|
|
91
144
|
const existing = LOOKUP.get(node);
|
|
92
145
|
if (existing) return existing;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["const LOOKUP = new WeakMap<Text, number>();\n\nconst BOUNDARY_ELEMENTS = new Set([\n 'SECTION',\n 'ARTICLE',\n 'ASIDE',\n 'HEADER',\n 'FOOTER',\n 'MAIN',\n 'NAV',\n]);\n\n/**\n * A set with both cases is more performant than calling toLowerCase\n */\nconst SECTION_HEADINGS = new Set([\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'H1',\n 'H2',\n 'H3',\n 'H4',\n 'H5',\n 'H6',\n]);\nconst TEST_BOUNDARY = 'ember-testing';\n\nfunction isRoot(element: Element) {\n return element === document.body || element.id === TEST_BOUNDARY;\n}\n\nfunction findHeadingIn(node: ParentNode): number | undefined {\n if (!(node instanceof Element)) return;\n\n if (SECTION_HEADINGS.has(node.tagName)) {\n const level = parseInt(node.tagName.replace('h', '').replace('H', ''));\n\n return level;\n }\n\n for (const child of node.children) {\n const level = findHeadingIn(child);\n\n if (level) return level;\n }\n}\n\n/**\n * The Platform native 'closest' function can't punch through shadow-boundaries\n */\nfunction nearestAncestor(\n node: Text | Element,\n matcher: (el: Element) => boolean,\n) {\n let parent: ParentNode | null = node.parentElement;\n\n if (!parent) return;\n\n while (parent) {\n if (parent instanceof Element) {\n if (matcher(parent)) return parent;\n }\n\n if (parent instanceof ShadowRoot) {\n parent = parent.host;\n }\n\n parent = parent.parentNode;\n }\n}\n\n/**\n * The algorithm:\n *\n * section <- \"our\" level-changing boundary element\n * h# <- the element we want to figure out the level of\n *\n * We start assuming we'll emit an h1.\n * We adjust this based on what we find crawling up the tree.\n *\n * While traversing up, when we go from the h# to the section,\n * and ignore it. Because this alone has no bearing on if the h# should be an h2.\n * We need to continue traversing upwards, until we hit the next boundary element.\n *\n * IF we would change the level the heading, we will find another heading between\n * these two boundary elements.\n * We'll need to check the subtrees between these elements, stopping if we\n * encounter other boundary elements.\n *\n */\nfunction levelOf(node: Text): number {\n const ourBoundary = nearestAncestor(node, (el) =>\n BOUNDARY_ELEMENTS.has(el.tagName),\n );\n\n /**\n * We are the top-level\n */\n if (!ourBoundary) {\n return 1;\n }\n\n const stopAt = nearestAncestor(ourBoundary, (el) => {\n if (BOUNDARY_ELEMENTS.has(el.tagName)) return true;\n\n return isRoot(el);\n });\n\n if (!stopAt) {\n throw new Error(\n `[BUG]: Could not find a stopping boundary for automatic heading level detection. Checked for ${[...BOUNDARY_ELEMENTS, 'body', '#ember-testing'].map((x) => x.toLowerCase()).join(', ')}`,\n );\n }\n\n let current: ParentNode | null = ourBoundary.parentNode;\n\n while (current) {\n const level = findHeadingIn(current);\n\n if (level) {\n return level + 1;\n }\n\n if (current === stopAt) break;\n\n if (current instanceof ShadowRoot) {\n current = current.host;\n }\n\n current = current.parentNode;\n }\n\n return 1;\n}\n\nexport function getSectionHeadingLevel(node: Text) {\n const existing = LOOKUP.get(node);\n\n if (existing) return existing;\n\n const parentLevel = levelOf(node);\n const myLevel = parentLevel;\n\n LOOKUP.set(node, myLevel);\n\n return myLevel;\n}\n"],"names":["LOOKUP","WeakMap","BOUNDARY_ELEMENTS","Set","SECTION_HEADINGS","TEST_BOUNDARY","isRoot","element","document","body","id","findHeadingIn","node","Element","has","tagName","level","parseInt","replace","child","children","nearestAncestor","matcher","parent","parentElement","ShadowRoot","host","parentNode","levelOf","ourBoundary","el","stopAt","Error","map","x","toLowerCase","join","current","getSectionHeadingLevel","existing","get","parentLevel","myLevel","set"],"mappings":"AAAA,MAAMA,MAAM,GAAG,IAAIC,OAAO,EAAgB;AAE1C,MAAMC,iBAAiB,GAAG,IAAIC,GAAG,CAAC,CAChC,SAAS,EACT,SAAS,EACT,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,KAAK,CACN,CAAC;;AAEF;AACA;AACA;AACA,MAAMC,gBAAgB,GAAG,IAAID,GAAG,CAAC,CAC/B,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,CACL,CAAC;AACF,MAAME,aAAa,GAAG,eAAe;AAErC,SAASC,MAAMA,CAACC,OAAgB,EAAE;EAChC,OAAOA,OAAO,KAAKC,QAAQ,CAACC,IAAI,IAAIF,OAAO,CAACG,EAAE,KAAKL,aAAa;AAClE;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["const LOOKUP = new WeakMap<Text, number>();\n\nconst BOUNDARY_ELEMENTS = new Set([\n 'SECTION',\n 'ARTICLE',\n 'ASIDE',\n 'HEADER',\n 'FOOTER',\n 'MAIN',\n 'NAV',\n]);\n\n/**\n * A set with both cases is more performant than calling toLowerCase\n */\nconst SECTION_HEADINGS = new Set([\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'H1',\n 'H2',\n 'H3',\n 'H4',\n 'H5',\n 'H6',\n]);\nconst TEST_BOUNDARY = 'ember-testing';\n\nfunction isRoot(element: Element) {\n return element === document.body || element.id === TEST_BOUNDARY;\n}\n\n/**\n * node is our current traversal node as we head up the DOM tree (towards the root)\n * previous node is the immediate child within that current traversal node that we came from.\n *\n * The previousNode is used for an optimization so that we can iterate *from*\n * that child within the current traversal node, rather than always starting from the\n * first child of the current traversal node.\n */\nfunction findHeadingIn(\n node: ParentNode | ChildNode,\n previousNode?: ParentNode,\n): number | undefined {\n if (!(node instanceof Element)) return;\n\n if (SECTION_HEADINGS.has(node.tagName)) {\n const level = parseInt(node.tagName.replace('h', '').replace('H', ''));\n\n return level;\n }\n\n /**\n * Previous traversal does not search within the section boundaies\n * This is because previous traversal is looking for a similar heading level, and crossing a section boundary changes the section level.\n */\n if (previousNode) {\n let previous = previousNode.previousSibling;\n\n while (previous) {\n if (!(previous instanceof Element)) {\n previous = previous.previousSibling;\n continue;\n }\n\n if (BOUNDARY_ELEMENTS.has(previous.tagName)) {\n previous = previous.previousSibling;\n continue;\n }\n\n const level = findHeadingIn(previous);\n\n /**\n * We subtract one, because we may have found\n * an equal heading, due to it being a sibling\n */\n if (level) return level;\n\n previous = previous.previousSibling;\n }\n }\n\n /**\n * Fallback traversal if we still haven't found the\n * heading level, we check all the children\n * of the current node, because headings can be\n * within <a> tags and such.\n */\n for (const child of node.children) {\n const level = findHeadingIn(child);\n\n if (level) return level;\n }\n}\n\n/**\n * The Platform native 'closest' function can't punch through shadow-boundaries\n */\nfunction nearestAncestor(\n node: Text | Element,\n matcher: (el: Element) => boolean,\n) {\n let parent: ParentNode | null = node.parentElement;\n\n if (!parent) return;\n\n while (parent) {\n if (parent instanceof Element) {\n if (matcher(parent)) return parent;\n }\n\n if (parent instanceof ShadowRoot) {\n parent = parent.host;\n }\n\n parent = parent.parentNode;\n }\n}\n\n/**\n * The algorithm:\n *\n * section <- \"our\" level-changing boundary element\n * h# <- the element we want to figure out the level of\n *\n * We start assuming we'll emit an h1.\n * We adjust this based on what we find crawling up the tree.\n *\n * While traversing up, when we go from the h# to the section,\n * and ignore it. Because this alone has no bearing on if the h# should be an h2.\n * We need to continue traversing upwards, until we hit the next boundary element.\n *\n * IF we would change the level the heading, we will find another heading between\n * these two boundary elements.\n * We'll need to check the subtrees between these elements, stopping if we\n * encounter other boundary elements.\n *\n */\nfunction levelOf(node: Text): number {\n const ourBoundary = nearestAncestor(node, (el) =>\n BOUNDARY_ELEMENTS.has(el.tagName),\n );\n\n /**\n * We are the top-level\n */\n if (!ourBoundary) {\n return 1;\n }\n\n const stopAt = nearestAncestor(ourBoundary, (el) => {\n if (BOUNDARY_ELEMENTS.has(el.tagName)) return true;\n\n return isRoot(el);\n });\n\n if (!stopAt) {\n throw new Error(\n `[BUG]: Could not find a stopping boundary for automatic heading level detection. Checked for ${[...BOUNDARY_ELEMENTS, 'body', '#ember-testing'].map((x) => x.toLowerCase()).join(', ')}`,\n );\n }\n\n let previous: ParentNode = ourBoundary;\n let current: ParentNode | null = ourBoundary.parentNode;\n\n while (current) {\n const level = findHeadingIn(current, previous);\n\n if (level) {\n return level + 1;\n }\n\n if (current === stopAt) break;\n\n if (current instanceof ShadowRoot) {\n current = current.host;\n }\n\n previous = current;\n current = current.parentNode;\n }\n\n return 1;\n}\n\n/**\n * Determines what your heading level should be (h1 - h6).\n *\n * In your app, you can use any of `<section>`, `<article>`, and `<aside>` elements to denote when the [_Section Heading_][mdn-h] element should change its level.\nNote that this demo starts with `h3`, because this docs page already has an `h1`, and _this_ section (Usage) uses an `h2`.\n\n * [mdn-h]: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/Heading_Elements\n */\nexport function getSectionHeadingLevel(node: Text) {\n const existing = LOOKUP.get(node);\n\n if (existing) return existing;\n\n const parentLevel = levelOf(node);\n const myLevel = parentLevel;\n\n LOOKUP.set(node, myLevel);\n\n return myLevel;\n}\n"],"names":["LOOKUP","WeakMap","BOUNDARY_ELEMENTS","Set","SECTION_HEADINGS","TEST_BOUNDARY","isRoot","element","document","body","id","findHeadingIn","node","previousNode","Element","has","tagName","level","parseInt","replace","previous","previousSibling","child","children","nearestAncestor","matcher","parent","parentElement","ShadowRoot","host","parentNode","levelOf","ourBoundary","el","stopAt","Error","map","x","toLowerCase","join","current","getSectionHeadingLevel","existing","get","parentLevel","myLevel","set"],"mappings":"AAAA,MAAMA,MAAM,GAAG,IAAIC,OAAO,EAAgB;AAE1C,MAAMC,iBAAiB,GAAG,IAAIC,GAAG,CAAC,CAChC,SAAS,EACT,SAAS,EACT,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,KAAK,CACN,CAAC;;AAEF;AACA;AACA;AACA,MAAMC,gBAAgB,GAAG,IAAID,GAAG,CAAC,CAC/B,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,CACL,CAAC;AACF,MAAME,aAAa,GAAG,eAAe;AAErC,SAASC,MAAMA,CAACC,OAAgB,EAAE;EAChC,OAAOA,OAAO,KAAKC,QAAQ,CAACC,IAAI,IAAIF,OAAO,CAACG,EAAE,KAAKL,aAAa;AAClE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASM,aAAaA,CACpBC,IAA4B,EAC5BC,YAAyB,EACL;AACpB,EAAA,IAAI,EAAED,IAAI,YAAYE,OAAO,CAAC,EAAE;EAEhC,IAAIV,gBAAgB,CAACW,GAAG,CAACH,IAAI,CAACI,OAAO,CAAC,EAAE;IACtC,MAAMC,KAAK,GAAGC,QAAQ,CAACN,IAAI,CAACI,OAAO,CAAC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,KAAKN,MAAM,EAAE;IAExB,IAAIM,OAAO,YAAYZ,UAAU,EAAE;MACjCY,OAAO,GAAGA,OAAO,CAACX,IAAI;AACxB,IAAA;AAEAT,IAAAA,QAAQ,GAAGoB,OAAO;IAClBA,OAAO,GAAGA,OAAO,CAACV,UAAU;AAC9B,EAAA;AAEA,EAAA,OAAO,CAAC;AACV;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACO,SAASW,sBAAsBA,CAAC7B,IAAU,EAAE;AACjD,EAAA,MAAM8B,QAAQ,GAAG1C,MAAM,CAAC2C,GAAG,CAAC/B,IAAI,CAAC;EAEjC,IAAI8B,QAAQ,EAAE,OAAOA,QAAQ;AAE7B,EAAA,MAAME,WAAW,GAAGb,OAAO,CAACnB,IAAI,CAAC;EACjC,MAAMiC,OAAO,GAAGD,WAAW;AAE3B5C,EAAAA,MAAM,CAAC8C,GAAG,CAAClC,IAAI,EAAEiC,OAAO,CAAC;AAEzB,EAAA,OAAOA,OAAO;AAChB;;;;"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=template-registry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"template-registry.d.ts","sourceRoot":"","sources":["../src/template-registry.ts"],"names":[],"mappings":""}
|