-
Notifications
You must be signed in to change notification settings - Fork 122
feat: make @lynx-js/web-core-wasm implementation to be a only implementation #2322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 31 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
2170ece
- clean
PupilTong ef62fba
+ build ok
PupilTong bc61c42
web-core-wasm -> web-core
PupilTong 5039e14
+ initial test clean
PupilTong ad819db
feat: support __QuerySelector and __InvokeUIMethod
PupilTong 5342856
fix: support legacy json template for lazy usage
PupilTong fcf5baa
feat: Make `systemInfo` instance-specific and configurable via a new …
PupilTong b16215d
fix: type selector for legacy json template
PupilTong bbd8ac2
fix: legacy root selector
PupilTong d3b1b51
fix: support @keyframe in legacy json template
PupilTong fa68712
refactor: Adjust module loading paths, promote `wasm-feature-detect` …
PupilTong f5754fc
fix: Add nonce attribute to the iframe srcdoc script for CSP compliance.
PupilTong d767345
feat: Implement and test dynamic list item removal and insertion in R…
PupilTong 9d5ac5d
fix: scoped css support for json legacy bundle
PupilTong e001c05
+ fix
PupilTong 553dbf9
+ CSR OK!
PupilTong c5928b2
+ partial fix
PupilTong 4731cbe
+ fix header
PupilTong 86c00ba
+ implement FP support
PupilTong 05c84fa
chore: Initialize `SERVER_IN_SHADOW_CSS` with a const expression.
PupilTong eb4d334
+ dedupe
PupilTong 06cf03e
fix
PupilTong bcccb2c
+ fix
PupilTong a4cacc1
+ changeset
PupilTong d1bc22c
+ dedupe
PupilTong e519ece
+ rerender for SSR from the start over
PupilTong 293c0b4
feat: Add server-side DOM manipulation APIs for element insertion, re…
PupilTong 0fc8a5d
+ fix
PupilTong 8491ed9
+ fix
PupilTong 5f6ea34
+ fix
PupilTong 24530c8
+ fix repl
PupilTong a3f8f37
+ fix changeset
PupilTong 2767588
Merge branch 'main' into p/hw/replace-web-core
Huxpro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| --- | ||
| "@lynx-js/web-core": major | ||
| --- | ||
|
|
||
| **This is a breaking change** | ||
|
|
||
| ## Architectural Upgrade: `web-core-wasm` replaces `web-core` | ||
|
|
||
| This release marks a major architectural upgrade for the web platform. The experimental, WASM-powered engine formerly known as `web-core-wasm` has been fully stabilized and merged into the main branch, completely replacing the previous pure JS/TS based `web-core` implementation. This consolidation massively improves execution performance and aligns the API boundaries of the Web platform directly with other native Lynx implementations. | ||
|
PupilTong marked this conversation as resolved.
|
||
|
|
||
| ### 🎉 Added Features | ||
|
|
||
| - **Core API Enhancements**: Successfully exposed and supported `__QuerySelector` and `__InvokeUIMethod` methods. | ||
| - **Security & CSP Compliance**: Added a `nonce` attribute to the iframe's `srcdoc` script execution, strengthening Content Security Policy (CSP) compliance. | ||
| - **`<lynx-view>` Parameter Enhancements**: | ||
| - Added the `browser-config` attribute and property to `<lynx-view>`. Development environments can now supply a `BrowserConfig` object (e.g., configuring `pixelRatio`, `pixelWidth`, `pixelHeight`) allowing the `systemInfo` payload to be dynamically configured at the instance level. | ||
|
|
||
| ### 🔄 Changed Features | ||
|
|
||
| - **Legacy JSON Backwards Compatibility**: Delivered comprehensive fixes and optimizations to deeply support legacy JSON output templates: | ||
| - Added support for lazy loading execution mode (`lazy usage`). | ||
| - Implemented the correct decoding and handling of `@keyframe` animation rules. | ||
| - Rectified rule scoping matching including scoped CSS, root selectors, and type selectors. | ||
| - **Ecosystem Migration**: Updated testing and ecosystem applications (such as `web-explorer` and `shell-project`) to migrate away from obsolete fragmented dependencies. The new WASM architecture seamlessly integrates Element APIs and CSS directly inside the core client module, requiring a much simpler initialization footprint. | ||
|
|
||
| **Before (Legacy `web-core` + `web-elements`):** | ||
| ```typescript | ||
| // Required multiple imports to assemble the environment | ||
| import '@lynx-js/web-core/client'; | ||
| import type { LynxViewElement as LynxView } from '@lynx-js/web-core'; | ||
|
|
||
| // Had to manually import separate elements and their CSS | ||
| import '@lynx-js/web-elements/index.css'; | ||
| import '@lynx-js/web-elements/all'; | ||
|
|
||
| const lynxView = document.createElement('lynx-view') as LynxView; | ||
| // ... | ||
| ``` | ||
|
|
||
| **After (New `web-core` unified architecture):** | ||
| ```typescript | ||
| // The new engine natively registers Web Components and injects fundamental CSS | ||
| import '@lynx-js/web-core/client'; | ||
| import type { LynxViewElement as LynxView } from '@lynx-js/web-core/client'; | ||
|
|
||
| const lynxView = document.createElement('lynx-view') as LynxView; | ||
| // ... | ||
| ``` | ||
| _(Applications can now drop `@lynx-js/web-elements` entirely from their `package.json` dependencies)._ | ||
| - **Dependency & Boot Sequence Improvements**: Re-architected module loading pathways. Promoted `wasm-feature-detect` directly to a core dependency, and hardened the web worker count initialization assertions. | ||
| - **Initialization Optimizations**: Converted `SERVER_IN_SHADOW_CSS` initialization bounds to use compilation-time constant expressions for better optimization. | ||
|
|
||
| ### 🗑️ Deleted Features & Structural Deprecations | ||
|
|
||
| - **`<lynx-view>` Parameter Removals**: | ||
| - Removed the `thread-strategy` property and attribute. Historically, this permitted consumers to toggle between `'multi-thread'` and `'all-on-ui'` modes depending on how they wanted the background logic to be executed. The WASM-driven architecture enforces a consolidated concurrency model, deprecating this `<lynx-view>` attribute entirely. | ||
| - Removed the `overrideLynxTagToHTMLTagMap` property/attribute. HTML tag overriding mechanism has been deprecated in the new engine. | ||
| - Removed the `customTemplateLoader` property handler from `<lynx-view>`. | ||
| - Removed the `inject-head-links` property and attribute (`injectHeadLinks`), which previously was used to automatically inject `<link rel="stylesheet">` tags from the document head into the `lynx-view` shadow root. | ||
| - **Fragmented Packages Removal**: The new cohesive WASM architecture native to `@lynx-js/web-core` handles cross-thread communication, worker boundaries, and rendering loops uniformly. Consequently, multiple obsolete packages have been completely removed from the workspace: | ||
| - `@lynx-js/web-mainthread-apis` | ||
| - `@lynx-js/web-worker-runtime` | ||
| - `@lynx-js/web-core-server` | ||
| - `@lynx-js/web-core-wasm-e2e` (transitioned into standard test suites) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.