Skip to content

Add support r-teleport on detached content.#76

Merged
koculu merged 2 commits intomainfrom
r-teleport-on-detached-content
Mar 5, 2026
Merged

Add support r-teleport on detached content.#76
koculu merged 2 commits intomainfrom
r-teleport-on-detached-content

Conversation

@koculu
Copy link
Owner

@koculu koculu commented Mar 5, 2026

Summary

This PR improves r-teleport robustness and adds focused coverage around component fallthrough + nested component usage.

What changed

  • Simplified teleport target resolution in Binder.ts:
    • Use document.querySelector(...) when available.
    • If document lookup is unavailable at bind time, walk the element parent chain to the root and resolve target there.
  • Added integration tests in createComponent.spec.ts:
    • :r-teleport fallthrough from component host to component root.
    • Nested component teleport when parent host binds :r-teleport.
    • Nested component teleport when parent binds :r-teleport on <ChildComp ...>.
  • Added edge test in binder-edge.spec.ts:
    • Verifies detached teleport path falls back to parent-chain root when document lookup is unavailable.
  • Version bump in package.json: 1.3.9 -> 1.4.0.

@koculu koculu merged commit 6a2b293 into main Mar 5, 2026
1 check passed
@koculu koculu deleted the r-teleport-on-detached-content branch March 5, 2026 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant