shadow
shadow copied to clipboard
Refactor ShadowRoot Component and Improve Type Safety
This pull request refactors the ShadowRoot component to improve code clarity, enhance type safety, and ensure better consistency with Vue best practices. Key changes include:
- Improved type definitions for better type safety.
- Refactoring logic for attaching the shadow root to ensure it works more reliably.
- General cleanup of redundant code and error handling improvements.
- These updates aim to make the component more maintainable and improve its usage within Vue projects.
Please format it using prettier, rules in .prettierrc.yaml
- Improved typing: Introduces
AdoptableShadowRootandShadowRootComponentfor type safety. - Renamed variables:
teleportEl,teleportTarget,exposeData, andchildPartrenamed to snake_case for consistency. - Minor cleanup: Removed unused commented-out code.
Please do not format files other than source code, as this will result in too many diffs. I suggest opening a new branch to extract modifications separately to avoid unnecessary changes.