feat(sparkling-web-shell): full-page web host with native-style MPA transitions [stack 3/6] - #10
Open
Huxpro wants to merge 1 commit into
Open
Conversation
…ransitions A browser host that renders Sparkling apps and simulates the native container stack, so multi-page navigation runs on the web (dev harness + embeddable preview). Router-framework-agnostic — works for any Sparkling app. - stacks a <lynx-view> per container (each its own Worker heap); router.open pushes, router.close / browser back pops, mirrored into browser history so back/forward/reload reconcile the stack - provides the spkPipe method bridge (onNativeModulesCall + nativeModulesMap) and injects globalProps (containerID + queryItems) mirroring the native SDK; sends viewAppeared/viewDisappeared lifecycle events - installs its behavior via sparkling-navigation's pluggable RouterWebHost - loads bundles from a runtime ?base=<url> (one static build serves any example) and builds with a relative assetPrefix so it can be embedded - native-style transitions: push slides the new container in from the right (iOS-like ease-out), close/back slides it out, replace cross-fades; honors prefers-reduced-motion Extends the web RouterWebHost with replace + animated options (threaded from router.open/close, mirroring the native OpenOptions/CloseOptions). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ARyWgB3243gQx1exWK61Qb
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds
sparkling-web-shell, a browser host that simulates the native container stack so multi-page navigation runs on the web (dev harness + embeddable preview).Related issues
Enables in-browser preview/testing of MPA navigation without native simulators.
Changes
<lynx-view>per container (own Worker heap);router.openpushes,router.close/browser-back pops, mirrored into browser history.spkPipebridge (onNativeModulesCall+nativeModulesMap) and injectsglobalProps(containerID + queryItems) mirroring the native SDK; sendsviewAppeared/viewDisappeared.sparkling-navigation's pluggableRouterWebHost; loads bundles from a runtime?base=<url>and builds with a relative assetPrefix so it can be embedded.prefers-reduced-motion.RouterWebHostwithreplace+animatedoptions (threaded fromrouter.open/router.close).How to test
Checklist
CONTRIBUTING.md.🤖 Generated with Claude Code
https://claude.ai/code/session_01ARyWgB3243gQx1exWK61Qb
Generated by Claude Code