@lark.js/mvc 0.0.11 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -19
- package/dist/devtool.cjs +272 -321
- package/dist/devtool.js +273 -322
- package/dist/index.cjs +285 -381
- package/dist/index.d.cts +64 -31
- package/dist/index.d.ts +64 -31
- package/dist/index.js +284 -380
- package/dist/rspack.cjs +6 -2
- package/dist/rspack.js +6 -2
- package/dist/runtime.js +1 -1
- package/dist/vite.cjs +60 -4
- package/dist/vite.d.cts +16 -2
- package/dist/vite.d.ts +16 -2
- package/dist/vite.js +60 -3
- package/dist/webpack.cjs +6 -2
- package/dist/webpack.js +6 -2
- package/package.json +3 -2
- package/src/client.d.ts +8 -2
- /package/dist/{chunk-RIV4NK3K.js → chunk-66OZBBSP.js} +0 -0
package/README.md
CHANGED
|
@@ -41,7 +41,7 @@ Third, zero runtime dependencies. `@babel/parser` / `@babel/types` are used only
|
|
|
41
41
|
|
|
42
42
|
Fourth, real DOM diff. Templates compile to functions that produce HTML strings, which are parsed into temporary DOM via `document.implementation.createHTMLDocument` and then diffed against the live DOM using keyed comparison. The advantage is that context-sensitive tags like `<table>` / `<select>` / `<svg>` are handled by the native parser. The trade-off is that large templates incur parse overhead, and SSR is not supported.
|
|
43
43
|
|
|
44
|
-
Fifth, debug-friendly. `
|
|
44
|
+
Fifth, debug-friendly. `installFrameDevtoolBridge` exposes the Frame tree to Devtool via `postMessage`. A set of `window.__lark_*` global shortcuts cover Framework / State / Router / Frame / View and HMR helpers.
|
|
45
45
|
|
|
46
46
|
Not suitable for: projects requiring SSR/streaming rendering, cross-platform needs like React Native, or projects needing off-the-shelf Chrome extension panels. For those, consider the React or Vue ecosystems.
|
|
47
47
|
|
|
@@ -838,24 +838,16 @@ new ModuleFederationPlugin({
|
|
|
838
838
|
|
|
839
839
|
After `Framework.boot` completes, the following are attached to `window`:
|
|
840
840
|
|
|
841
|
-
| Global | Value
|
|
842
|
-
| ------------------------------------ |
|
|
843
|
-
| `window.__lark_Framework` | Framework object
|
|
844
|
-
| `window.__lark_State` | State object
|
|
845
|
-
| `window.__lark_Router` | Router object
|
|
846
|
-
| `window.__lark_Frame` | Frame class
|
|
847
|
-
| `window.__lark_View` | View class
|
|
848
|
-
| `window.__lark_registerViewClass` | Function
|
|
849
|
-
| `window.__lark_invalidateViewClass` | Function
|
|
850
|
-
| `window.__lark_getViewClassRegistry` | Function
|
|
851
|
-
| `window.__lark_Debug` | boolean, must be set manually | Enable Safeguard Proxy debug checks |
|
|
852
|
-
|
|
853
|
-
### Safeguard Debug Mode
|
|
854
|
-
|
|
855
|
-
Set `window.__lark_Debug = true` before boot, and the framework wraps `State.get()` / `Router.diff()` results and `Updater.get()` return values with Safeguard Proxy:
|
|
856
|
-
|
|
857
|
-
- Warns when reading data written by another page (potential cross-page pollution).
|
|
858
|
-
- Warns immediately when assigning directly to objects returned by `State.get()` (deduplicated by key); the correct approach is `State.set(patch)` + `State.digest()`.
|
|
841
|
+
| Global | Value | Purpose |
|
|
842
|
+
| ------------------------------------ | ---------------- | ------------------------------ |
|
|
843
|
+
| `window.__lark_Framework` | Framework object | Direct access |
|
|
844
|
+
| `window.__lark_State` | State object | Direct access |
|
|
845
|
+
| `window.__lark_Router` | Router object | Direct access |
|
|
846
|
+
| `window.__lark_Frame` | Frame class | Direct access |
|
|
847
|
+
| `window.__lark_View` | View class | Direct access |
|
|
848
|
+
| `window.__lark_registerViewClass` | Function | HMR: re-register View class |
|
|
849
|
+
| `window.__lark_invalidateViewClass` | Function | HMR: remove View from registry |
|
|
850
|
+
| `window.__lark_getViewClassRegistry` | Function | HMR: read registry |
|
|
859
851
|
|
|
860
852
|
### Frame Devtool Bridge
|
|
861
853
|
|