@ramses-superapp/logic
v0.2.4
Published
This package provides the core runtime API available to mini-program developers. It is a small, lightweight library that is automatically injected into the mini-program's execution environment by `ramses-cli`. It acts as the bridge between the developer's
Downloads
2,784
Readme
Ramses Logic Package
This package provides the core runtime API available to mini-program developers. It is a small, lightweight library that is automatically injected into the mini-program's execution environment by ramses-cli. It acts as the bridge between the developer's business logic and the native rendering engine.
Core APIs
Ramses Object
The global Ramses object is the main entry point for defining your application's structure.
Ramses.registerScreen(screenName, config): Defines a screen, its UI, styles, and logic.Ramses.webViewReady(): Signals to the native engine that the JavaScript bundle has finished loading.
rs Object
The global rs object is a proxy for calling native device APIs from your JavaScript code.
rs.Navigation.navigate(screenName): Navigates to another registered screen.rs.GeoData.getCurrentPosition(): A sample implementation showing how to request the user's location from the native device.
This object is extensible on the native side, allowing the Super App to expose any desired native functionality to the mini-program.
