yard 0.9.41 → 0.9.43
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/docs/Parser.md +17 -42
- data/lib/yard/handlers/rbs/attribute_handler.rb +44 -8
- data/lib/yard/server/commands/base.rb +1 -1
- data/lib/yard/server/templates/default/fulldoc/html/css/custom.css +168 -88
- data/lib/yard/server/templates/default/fulldoc/html/js/autocomplete.js +202 -207
- data/lib/yard/version.rb +1 -1
- data/templates/default/fulldoc/html/css/common.css +1 -1
- data/templates/default/fulldoc/html/css/full_list.css +201 -53
- data/templates/default/fulldoc/html/css/style.css +980 -412
- data/templates/default/fulldoc/html/js/app.js +800 -639
- data/templates/default/fulldoc/html/js/full_list.js +333 -371
- data/templates/default/layout/html/layout.erb +2 -1
- data/templates/guide/fulldoc/html/css/style.css +347 -97
- data/templates/guide/fulldoc/html/js/app.js +61 -64
- data/templates/guide/layout/html/layout.erb +67 -68
- metadata +2 -2
|
@@ -1,372 +1,334 @@
|
|
|
1
|
-
(
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
toggle.setAttribute("aria-expanded", "true");
|
|
335
|
-
});
|
|
336
|
-
|
|
337
|
-
current = target.parentElement;
|
|
338
|
-
while (current && current.id !== "full_list") {
|
|
339
|
-
if (current.tagName === "LI") {
|
|
340
|
-
var toggle = current.querySelector(":scope > div > a.toggle");
|
|
341
|
-
if (toggle) toggle.setAttribute("aria-expanded", "true");
|
|
342
|
-
}
|
|
343
|
-
current = current.parentElement;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
if (!isInView(target)) {
|
|
347
|
-
window.scrollTo(
|
|
348
|
-
window.scrollX,
|
|
349
|
-
target.getBoundingClientRect().top + window.scrollY - 250
|
|
350
|
-
);
|
|
351
|
-
highlight();
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
function windowEvents(event) {
|
|
356
|
-
var msg = event.data;
|
|
357
|
-
if (msg.action === "expand") {
|
|
358
|
-
expandTo(msg.path);
|
|
359
|
-
}
|
|
360
|
-
return false;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
window.addEventListener("message", windowEvents, false);
|
|
364
|
-
|
|
365
|
-
ready(function() {
|
|
366
|
-
escapeShortcut();
|
|
367
|
-
enableLinks();
|
|
368
|
-
enableToggles();
|
|
369
|
-
populateSearchCache();
|
|
370
|
-
enableSearch();
|
|
371
|
-
});
|
|
1
|
+
(() => {
|
|
2
|
+
let clicked = null;
|
|
3
|
+
let searchTimeout = null;
|
|
4
|
+
const searchCache = [];
|
|
5
|
+
let caseSensitiveMatch = false;
|
|
6
|
+
|
|
7
|
+
function query(selector, root) {
|
|
8
|
+
return (root || document).querySelector(selector);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function queryAll(selector, root) {
|
|
12
|
+
return Array.prototype.slice.call(
|
|
13
|
+
(root || document).querySelectorAll(selector),
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function isVisible(element) {
|
|
18
|
+
if (!element) return false;
|
|
19
|
+
if (window.getComputedStyle(element).display === "none") return false;
|
|
20
|
+
if (element.parentElement && element.parentElement !== document.body) {
|
|
21
|
+
return isVisible(element.parentElement);
|
|
22
|
+
}
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
RegExp.escape = (text) => text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
27
|
+
|
|
28
|
+
function ready(callback) {
|
|
29
|
+
if (document.readyState === "loading") {
|
|
30
|
+
document.addEventListener("DOMContentLoaded", callback, { once: true });
|
|
31
|
+
} else {
|
|
32
|
+
callback();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function escapeShortcut() {
|
|
37
|
+
document.addEventListener("keydown", (event) => {
|
|
38
|
+
if (event.key === "Escape") {
|
|
39
|
+
window.parent.postMessage("navEscape", "*");
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function clearSearchTimeout() {
|
|
45
|
+
clearTimeout(searchTimeout);
|
|
46
|
+
searchTimeout = null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function setClicked(item) {
|
|
50
|
+
queryAll("#full_list li.clicked").forEach((node) => {
|
|
51
|
+
node.classList.remove("clicked");
|
|
52
|
+
});
|
|
53
|
+
clicked = item;
|
|
54
|
+
if (clicked) clicked.classList.add("clicked");
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function pathForItem(item) {
|
|
58
|
+
if (!item?.id || item.id.indexOf("object_") !== 0) return null;
|
|
59
|
+
return item.id.substring("object_".length);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function enableLinks() {
|
|
63
|
+
queryAll("#full_list li").forEach((item) => {
|
|
64
|
+
const itemRow = item.querySelector(":scope > .item");
|
|
65
|
+
|
|
66
|
+
if (!itemRow) return;
|
|
67
|
+
|
|
68
|
+
itemRow.addEventListener("click", (event) => {
|
|
69
|
+
let targetLink;
|
|
70
|
+
let url;
|
|
71
|
+
|
|
72
|
+
if (
|
|
73
|
+
event.defaultPrevented ||
|
|
74
|
+
event.button !== 0 ||
|
|
75
|
+
event.metaKey ||
|
|
76
|
+
event.ctrlKey ||
|
|
77
|
+
event.shiftKey ||
|
|
78
|
+
event.altKey
|
|
79
|
+
) {
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
setClicked(item);
|
|
84
|
+
event.stopPropagation();
|
|
85
|
+
targetLink = event.target.closest("a");
|
|
86
|
+
if (!targetLink?.matches(".object_link a")) {
|
|
87
|
+
targetLink = item.querySelector(":scope > .item .object_link a");
|
|
88
|
+
}
|
|
89
|
+
if (!targetLink) return false;
|
|
90
|
+
|
|
91
|
+
event.preventDefault();
|
|
92
|
+
url = targetLink.getAttribute("href");
|
|
93
|
+
try {
|
|
94
|
+
url = new URL(url, window.location.href).href;
|
|
95
|
+
} catch (_error) {}
|
|
96
|
+
window.top.postMessage(
|
|
97
|
+
{ action: "navigate", url: url, path: pathForItem(item) },
|
|
98
|
+
"*",
|
|
99
|
+
);
|
|
100
|
+
return false;
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function toggleItem(toggle) {
|
|
106
|
+
const item = toggle.parentElement.parentElement;
|
|
107
|
+
const expanded = item.classList.contains("collapsed");
|
|
108
|
+
|
|
109
|
+
item.classList.toggle("collapsed");
|
|
110
|
+
toggle.setAttribute("aria-expanded", expanded ? "true" : "false");
|
|
111
|
+
highlight();
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function enableToggles() {
|
|
115
|
+
queryAll("#full_list a.toggle").forEach((toggle) => {
|
|
116
|
+
toggle.addEventListener("click", (event) => {
|
|
117
|
+
event.stopPropagation();
|
|
118
|
+
event.preventDefault();
|
|
119
|
+
toggleItem(toggle);
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
toggle.addEventListener("keypress", (event) => {
|
|
123
|
+
if (event.key !== "Enter") return;
|
|
124
|
+
event.stopPropagation();
|
|
125
|
+
event.preventDefault();
|
|
126
|
+
toggleItem(toggle);
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function populateSearchCache() {
|
|
132
|
+
queryAll("#full_list li .item").forEach((node) => {
|
|
133
|
+
const link = query(".object_link a", node);
|
|
134
|
+
if (!link) return;
|
|
135
|
+
|
|
136
|
+
searchCache.push({
|
|
137
|
+
node: node,
|
|
138
|
+
link: link,
|
|
139
|
+
name: link.textContent,
|
|
140
|
+
fullName: link.getAttribute("title").split(" ")[0],
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function enableSearch() {
|
|
146
|
+
const input = query("#search input");
|
|
147
|
+
const fullList = query("#full_list");
|
|
148
|
+
|
|
149
|
+
if (!input || !fullList) return;
|
|
150
|
+
|
|
151
|
+
function updateSearchResults() {
|
|
152
|
+
if (input.value === "") {
|
|
153
|
+
clearSearch();
|
|
154
|
+
} else {
|
|
155
|
+
performSearch(input.value);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
input.addEventListener("input", updateSearchResults);
|
|
160
|
+
input.addEventListener("change", updateSearchResults);
|
|
161
|
+
|
|
162
|
+
fullList.insertAdjacentHTML(
|
|
163
|
+
"afterend",
|
|
164
|
+
"<div id='noresults' role='status' style='display: none'></div>",
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
function clearSearch() {
|
|
169
|
+
clearSearchTimeout();
|
|
170
|
+
queryAll("#full_list .found").forEach((node) => {
|
|
171
|
+
node.classList.remove("found");
|
|
172
|
+
});
|
|
173
|
+
query("#full_list").classList.remove("insearch");
|
|
174
|
+
query("#content").classList.remove("insearch");
|
|
175
|
+
if (clicked) {
|
|
176
|
+
let current = clicked.parentElement;
|
|
177
|
+
while (current) {
|
|
178
|
+
if (current.tagName === "LI") current.classList.remove("collapsed");
|
|
179
|
+
if (current.id === "full_list") break;
|
|
180
|
+
current = current.parentElement;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
highlight();
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
function performSearch(searchString) {
|
|
187
|
+
clearSearchTimeout();
|
|
188
|
+
query("#full_list").classList.add("insearch");
|
|
189
|
+
query("#content").classList.add("insearch");
|
|
190
|
+
query("#noresults").textContent = "";
|
|
191
|
+
query("#noresults").style.display = "none";
|
|
192
|
+
partialSearch(searchString, 0);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function partialSearch(searchString, offset) {
|
|
196
|
+
let lastRowClass = "";
|
|
197
|
+
let i;
|
|
198
|
+
|
|
199
|
+
for (i = offset; i < Math.min(offset + 50, searchCache.length); i += 1) {
|
|
200
|
+
const item = searchCache[i];
|
|
201
|
+
const searchName =
|
|
202
|
+
searchString.indexOf("::") !== -1 ? item.fullName : item.name;
|
|
203
|
+
const matchRegexp = new RegExp(
|
|
204
|
+
buildMatchString(searchString),
|
|
205
|
+
caseSensitiveMatch ? "" : "i",
|
|
206
|
+
);
|
|
207
|
+
|
|
208
|
+
if (!searchName.match(matchRegexp)) {
|
|
209
|
+
item.node.classList.remove("found");
|
|
210
|
+
} else {
|
|
211
|
+
item.node.classList.add("found");
|
|
212
|
+
if (lastRowClass) item.node.classList.remove(lastRowClass);
|
|
213
|
+
item.node.classList.add(lastRowClass === "r1" ? "r2" : "r1");
|
|
214
|
+
lastRowClass = item.node.classList.contains("r1") ? "r1" : "r2";
|
|
215
|
+
item.link.innerHTML = item.name.replace(
|
|
216
|
+
matchRegexp,
|
|
217
|
+
"<strong>$&</strong>",
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
if (i === searchCache.length) {
|
|
223
|
+
searchDone();
|
|
224
|
+
} else {
|
|
225
|
+
searchTimeout = setTimeout(() => {
|
|
226
|
+
partialSearch(searchString, i);
|
|
227
|
+
}, 0);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
function searchDone() {
|
|
232
|
+
const found = queryAll("#full_list li").filter(isVisible).length;
|
|
233
|
+
|
|
234
|
+
searchTimeout = null;
|
|
235
|
+
highlight();
|
|
236
|
+
|
|
237
|
+
if (found === 0) {
|
|
238
|
+
query("#noresults").textContent = "No results were found.";
|
|
239
|
+
} else {
|
|
240
|
+
query("#noresults").textContent = `There are ${found} results.`;
|
|
241
|
+
}
|
|
242
|
+
query("#noresults").style.display = "block";
|
|
243
|
+
query("#content").classList.remove("insearch");
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
function buildMatchString(searchString) {
|
|
247
|
+
let regexSearchString;
|
|
248
|
+
|
|
249
|
+
caseSensitiveMatch = /[A-Z]/.test(searchString);
|
|
250
|
+
regexSearchString = RegExp.escape(searchString);
|
|
251
|
+
if (caseSensitiveMatch) {
|
|
252
|
+
regexSearchString +=
|
|
253
|
+
"|" +
|
|
254
|
+
searchString
|
|
255
|
+
.split("")
|
|
256
|
+
.map((character) => RegExp.escape(character))
|
|
257
|
+
.join(".+?");
|
|
258
|
+
}
|
|
259
|
+
return regexSearchString;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
function highlight() {
|
|
263
|
+
queryAll("#full_list li")
|
|
264
|
+
.filter(isVisible)
|
|
265
|
+
.forEach((item, index) => {
|
|
266
|
+
item.classList.remove("even");
|
|
267
|
+
item.classList.remove("odd");
|
|
268
|
+
item.classList.add(index % 2 === 0 ? "odd" : "even");
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
function isInView(element) {
|
|
273
|
+
const rect = element.getBoundingClientRect();
|
|
274
|
+
const windowHeight =
|
|
275
|
+
window.innerHeight || document.documentElement.clientHeight;
|
|
276
|
+
return rect.left >= 0 && rect.bottom <= windowHeight;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
function expandTo(path) {
|
|
280
|
+
const target = document.getElementById(`object_${path}`);
|
|
281
|
+
|
|
282
|
+
if (!target) return;
|
|
283
|
+
|
|
284
|
+
setClicked(target);
|
|
285
|
+
target.classList.remove("collapsed");
|
|
286
|
+
|
|
287
|
+
let current = target.parentElement;
|
|
288
|
+
while (current && current.id !== "full_list") {
|
|
289
|
+
if (current.tagName === "LI") current.classList.remove("collapsed");
|
|
290
|
+
current = current.parentElement;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
queryAll("a.toggle", target).forEach((toggle) => {
|
|
294
|
+
toggle.setAttribute("aria-expanded", "true");
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
current = target.parentElement;
|
|
298
|
+
while (current && current.id !== "full_list") {
|
|
299
|
+
if (current.tagName === "LI") {
|
|
300
|
+
const toggle = current.querySelector(":scope > div > a.toggle");
|
|
301
|
+
if (toggle) toggle.setAttribute("aria-expanded", "true");
|
|
302
|
+
}
|
|
303
|
+
current = current.parentElement;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
highlight();
|
|
307
|
+
|
|
308
|
+
if (!isInView(target)) {
|
|
309
|
+
window.scrollTo(
|
|
310
|
+
window.scrollX,
|
|
311
|
+
target.getBoundingClientRect().top + window.scrollY - 250,
|
|
312
|
+
);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
function windowEvents(event) {
|
|
317
|
+
const msg = event.data;
|
|
318
|
+
if (msg.action === "expand") {
|
|
319
|
+
expandTo(msg.path);
|
|
320
|
+
}
|
|
321
|
+
return false;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
window.addEventListener("message", windowEvents, false);
|
|
325
|
+
|
|
326
|
+
ready(() => {
|
|
327
|
+
escapeShortcut();
|
|
328
|
+
enableLinks();
|
|
329
|
+
enableToggles();
|
|
330
|
+
populateSearchCache();
|
|
331
|
+
enableSearch();
|
|
332
|
+
highlight();
|
|
333
|
+
});
|
|
372
334
|
})();
|