fix(manipulation): connect sibling links in cloned selections
XI
4d ago+43+43+01234567890123456789-3-3-0123456789
Cloning multiple nodes leaves their prev and next references null even though they share a synthetic document parent. For example, cloning three list items makes next() return an empty selection and :first-child match all three, while siblings() still sees the other items.
Use the existing DOM update helper when attaching clones to their document so sibling traversal and child selectors agree. Four regression cases cover HTML/XML traversal, selectors, removal of a middle clone, and text/comment links.
Fixes #5762.
Validation on Node.js 24.22.1:
- All four new regression cases fail before the fix and pass afterward.
- All 850 tests pass, including test type checking.
- Full lint, TypeScript checking, package build, website build, and website type checking pass.
- The pre-commit hook ran successfully.
AI assistance: reproduction, implementation, tests, and this description were prepared with Codex.