("page-composer.js",'foot.querySelector(":scope > .spacer").remove();',"detached: the composer frame is still being built and not in the page yet"),
("page-match.js",'host.querySelector(".task-toolbar").remove();',"detached: homeMatch() strips the toolbar of a host matchScreen() just built"),
("page-bubbles.js","window.setTimeout(() => view.node.remove(), BUBBLE_FADE);","the bubble already fades out through its own leaving class for BUBBLE_FADE ms"),
("page-bubbles.js","node.remove();","hidden: clearBubbles() runs after syncBubbles() hid the bubble layer"),
("page-pulses.js","}, () => ring.remove());","SVG redraw inside a chart: the pulse ring leaves at the end of its own fade to opacity 0"),
("page-pulses.js","}, () => dot.remove());","SVG redraw inside a chart: the pulse dot leaves once its flight across the orbit ends"),
("page-resources.js","entry.plot.replaceChildren();","hidden: the panel of this chart is hidden"),
("page-resources.js","entry.legend.replaceChildren();","hidden: the panel of this legend is hidden"),
("page-radiolog.js","node.remove();","keepLine() morphs a kept radio line in place: its old parts give way to the fresh twin's in the same row"),
("page-home.js","old.remove();","a tile head slot gives way to its successor in the same spot, so a fade would show both"),
("page-mic.js","frame.remove();","an orphaned mic frame whose field already moved into a fresh frame; a fade would show the field twice"),
("page-slash.js","slash.box.remove();","the slash list closes and reopens with each keystroke; a fading copy would stack under the next list"),
("page-tree.js","tree.dom.removeAll.replaceChildren();","the delete-all slot empties in the frame the list turns into the unreadable notice, so no button outlives its tree"),
)
LISTS=(
("page-match.js","dom.stack"),
("page-inbox.js","inboxDom"),
("page-tasks.js","dom.body"),
("page-queue.js","dom.jobs"),
("page-stream.js","stream.dom.list"),
("page-spawn.js","spawn.dom.list"),
)
defhelper_lines(lines:list[str])->set[int]:
"""Args:
lines: the lines of one template.
Returns:
The indexes of every line inside vanish(), fadeShut(), fadeSwap()
or fadeTransition(), from its head to its closing brace.
"""
inside:set[int]=set()
start=None
forindex,lineinenumerate(lines):
ifHELPERS.match(line):
start=index
elifstartisnotNoneandline==" }":
inside.update(range(start,index+1))
start=None
returninside
defbare(templates:Path)->list[str]:
"""Args:
templates: the folder holding the hub's templates.
Returns:
Every `.remove()` or empty `.replaceChildren()` of a template outside
the motion helpers and ALLOWED, as "file:line: code".