Refactor module imports and exports #5
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request focuses on refactoring imports across the codebase to consistently use relative paths instead of alias-based imports (such as
@/). It also improves the structure and clarity of module exports, particularly in thecomponents,renderer, andruntimemodules. Additionally, some type exports are reorganized to streamline the public API and reduce unnecessary exposure of internal types.Key changes include:
Import Path Refactoring
@/view/types/elements) with relative paths throughout the codebase for consistency and better compatibility with tooling. This affects files incomponents,layout,renderer, andruntimemodules. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]Module Export Improvements
src/components/index.tsto export only selected functions and types, rather than using wildcard exports, improving tree-shaking and clarity of the public API.src/renderer/index.tsto use named exports for each renderer utility, replacing wildcard exports and consolidating type exports for better control over the public interface.src/runtime/index.tsto use explicit named exports for main runtime utilities, instead of wildcard exports.Type and API Surface Adjustments
LayoutEngine,LayoutContainerSize, andLayoutOptionsfromsrc/layout/index.tsto a dedicatedsrc/layout/types.tsfile, cleaning up the layout module's API surface. [1] [2] [3]src/reactivity/index.tsto reduce unnecessary exposure of internal types. [1] [2]Entry Point and Barrel File Updates
src/index.tsto re-export from the new module entry points and to use the updated, more focused exports fromcomponentsandruntime. [1] [2]These changes collectively improve code maintainability, module encapsulation, and compatibility with various build tools.