You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updates per docs-update-procedure:
- HANDOVER.md: status line bumped (HEAD 7254273, 963 tests, engine
2.3.0); ali-mirror status now reads D.I7b.1-17 complete.
- engine.md: version 2.2.0 -> 2.3.0; init() description updated to
mention options.theme application; InitOptions example shows
the theme: 'dark' field; init.test.ts test count 7 -> 9.
- README.md: 961 -> 963 tests.
Memory file sapu-lowcode-engine-status.md + MEMORY.md index were
updated separately in the same session (see
feedback-update-memory-after-changes).
Copy file name to clipboardExpand all lines: docs/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# SapuLowcodeEngine Documentation
2
2
3
-
> **From-scratch rewrite** of `alibaba/lowcode-engine` v1.3.2 under the `@monbolc` npm scope. 14 packages, L0–L7 complete, 961 tests passing, zero `@alilc`/`@alifd`/`@supu` references in source.
3
+
> **From-scratch rewrite** of `alibaba/lowcode-engine` v1.3.2 under the `@monbolc` npm scope. 14 packages, L0–L7 complete, 963 tests passing, zero `@alilc`/`@alifd`/`@supu` references in source.
4
4
5
5
## Index
6
6
@@ -41,7 +41,7 @@ This folder is the **primary source of truth for sapu-lowcode-engine**. Memory f
41
41
-**React version**: 19.2.7 (peerDependency, optional; only L3+)
> The composition root. The ONE package a host installs to get a working visual editor. Sapu stance: **one `init()` call, not a chain of `register` calls**.
6
6
@@ -14,7 +14,7 @@ The engine package does NOT introduce new functionality — it composes what L0
14
14
15
15
| Export | Lines | Purpose |
16
16
|---|---:|---|
17
-
|`init(container, options)`|~80| Async composition root. Sets up the React runtime, builds the engine, registers the preset, mounts the project, returns the live `ISapuEngine`. |
17
+
|`init(container, options)`|~85| Async composition root. Sets up the React runtime, builds the engine, registers the preset, mounts the project, applies the host's `options.theme` on boot (D.I7b.17), returns the live `ISapuEngine`. |
18
18
|`destroy(engine)`|~10 | Tears down an engine + clears the host element. |
theme: 'dark', // D.I7b.17: applied on boot (defaults to preset.theme if omitted)
35
36
});
36
37
37
38
const project =engine.getProject();
@@ -104,7 +105,7 @@ The `locale` flows into `engine.i18n.setLocale()`; the `theme` is stored for `ge
104
105
105
106
| File | Tests | Covers |
106
107
|---|---:|---|
107
-
|`init.test.ts`|7| init returns engine, throws on missing container, throws on null container, engineReady fired, destroy tears down, detectLocale for non-English and English browsers |
108
+
|`init.test.ts`|9| init returns engine, throws on missing container, throws on null container, engineReady fired, destroy tears down, detectLocale for non-English and English browsers, init({theme:'dark'}) applies the dark theme on boot (D.I7b.17), init({}) defaults to preset theme|
0 commit comments