@vnejs/docs 0.2.71 → 0.2.72
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.
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# 0.2.72
|
|
2
|
+
|
|
3
|
+
- `cli/desktop` — `runTauri` opens the game in a Tauri window. Loading `runTauri` does not load Electron. `cargo` is taken from `~/.cargo/bin` when it is not on `PATH`. The shell uses `tauri` 2.12 and `tauri-build` 2.7. API: `runTauri({ rootDir, file, port, isProd, onBeforeQuit })`.
|
|
4
|
+
- `core/platforms`, `platform/desktop` — `PLATFORMS.DESKTOP` (`"desktop"`) replaces `PLATFORMS.ELECTRON` (`"electron"`). The host plugin is `@vnejs/plugins.platform.desktop`. API: `PLATFORMS.DESKTOP`, `EVENTS.DESKTOP.CONFIG` (`vne:desktop:config`), `SETTINGS.DESKTOP.CONFIG_APPLIED` (`vne:desktop:config_applied`).
|
package/changelog/README.md
CHANGED
package/package.json
CHANGED
|
@@ -12,16 +12,16 @@ None.
|
|
|
12
12
|
|
|
13
13
|
Platform identifiers (strings):
|
|
14
14
|
|
|
15
|
-
| Key
|
|
16
|
-
|
|
|
17
|
-
| `WEB`
|
|
18
|
-
| `MOBILE`
|
|
19
|
-
| `IOS`
|
|
20
|
-
| `ANDROID`
|
|
21
|
-
| `
|
|
22
|
-
| `MACOS`
|
|
23
|
-
| `LINUX`
|
|
24
|
-
| `WINDOWS`
|
|
15
|
+
| Key | Value |
|
|
16
|
+
| --------- | ----------- |
|
|
17
|
+
| `WEB` | `"web"` |
|
|
18
|
+
| `MOBILE` | `"mobile"` |
|
|
19
|
+
| `IOS` | `"ios"` |
|
|
20
|
+
| `ANDROID` | `"android"` |
|
|
21
|
+
| `DESKTOP` | `"desktop"` |
|
|
22
|
+
| `MACOS` | `"macos"` |
|
|
23
|
+
| `LINUX` | `"linux"` |
|
|
24
|
+
| `WINDOWS` | `"windows"` |
|
|
25
25
|
|
|
26
26
|
## Parameters
|
|
27
27
|
|
package/plugins/core/scenario.md
CHANGED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# plugins/platform/desktop/
|
|
2
|
+
|
|
3
|
+
Package: `@vnejs/plugins.platform.desktop` · namespace: `DESKTOP`
|
|
4
|
+
|
|
5
|
+
Syncs storage with the desktop host and reloads the game when state changes. The host lays out state: `{module}.json` when group is `_`, else `{module}/{group}.json`.
|
|
6
|
+
|
|
7
|
+
## Events
|
|
8
|
+
|
|
9
|
+
Handler payloads and results are typed through module augmentation of the contract (`VneEventPayloadMap` / `VneEventResultMap`). The types live in `@vnejs/contracts.platform.desktop`.
|
|
10
|
+
|
|
11
|
+
| Key | String | Meaning |
|
|
12
|
+
| -------- | -------------------- | ------------------------------------------- |
|
|
13
|
+
| `CONFIG` | `vne:desktop:config` | Desktop host config (for example language). |
|
|
14
|
+
|
|
15
|
+
## Constants
|
|
16
|
+
|
|
17
|
+
None.
|
|
18
|
+
|
|
19
|
+
## Parameters
|
|
20
|
+
|
|
21
|
+
None.
|
|
22
|
+
|
|
23
|
+
## Settings
|
|
24
|
+
|
|
25
|
+
None.
|
|
26
|
+
|
|
27
|
+
## Modules
|
|
28
|
+
|
|
29
|
+
| Module | Role |
|
|
30
|
+
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
31
|
+
| `desktop` | Syncs remote storage; on change and cooldown ≥ 10 s (mark in `sessionStorage`) sets `shouldReload` + `shared.shouldAutostartScenario = false`; on `STARTED` emits `RELOAD`; handles CHANGED. On `CLOSE` and `RELOAD` saves storage at `CONST.SYSTEM.PRIORITIES.BEFORE`. |
|
|
32
|
+
|
|
33
|
+
## Related plugins
|
|
34
|
+
|
|
35
|
+
### plugins/core/
|
|
36
|
+
|
|
37
|
+
- [platforms.md](../core/platforms.md) — `PLATFORMS`: CONST.DESKTOP, PARAMS.CURRENT_PLATFORM
|
|
38
|
+
- [scenario.md](../core/scenario.md) — `SCENARIO`: `shared.shouldAutostartScenario` (disables autostart before reload)
|
|
39
|
+
- [storage.md](../core/storage.md) — `STORAGE`: EVENTS.CHANGED, EVENTS.SET_ALL, EVENTS.GET_ALL
|
|
40
|
+
- [system.md](../core/system.md) — `SYSTEM`: EVENTS.STARTED, EVENTS.CLOSE, EVENTS.RELOAD, CONST.PRIORITIES.BEFORE, CONST.HOST
|
|
41
|
+
- [vendors.md](../core/vendors.md) — `VENDORS`: EVENTS.DEBOUNCE
|
|
42
|
+
|
|
43
|
+
### Other
|
|
44
|
+
|
|
45
|
+
— None
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# plugins/platform/electron/
|
|
2
|
-
|
|
3
|
-
Package: `@vnejs/plugins.platform.electron` · namespace: `ELECTRON`
|
|
4
|
-
|
|
5
|
-
Syncs storage with the Electron host and reloads the game when state changes. The host lays out state: `{module}.json` when group is `_`, else `{module}/{group}.json`.
|
|
6
|
-
|
|
7
|
-
## Events
|
|
8
|
-
|
|
9
|
-
Handler payloads and results are typed through module augmentation of the contract (`VneEventPayloadMap` / `VneEventResultMap`). The types live in `@vnejs/contracts.platform.electron`.
|
|
10
|
-
|
|
11
|
-
| Key | String | Meaning |
|
|
12
|
-
| -------- | --------------------- | -------------------------------------------- |
|
|
13
|
-
| `CONFIG` | `vne:electron:config` | Electron host config (for example language). |
|
|
14
|
-
|
|
15
|
-
## Constants
|
|
16
|
-
|
|
17
|
-
None.
|
|
18
|
-
|
|
19
|
-
## Parameters
|
|
20
|
-
|
|
21
|
-
None.
|
|
22
|
-
|
|
23
|
-
## Settings
|
|
24
|
-
|
|
25
|
-
None.
|
|
26
|
-
|
|
27
|
-
## Modules
|
|
28
|
-
|
|
29
|
-
| Module | Role |
|
|
30
|
-
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
31
|
-
| `electron` | Syncs remote storage; on change and cooldown ≥ 10 s (mark in `sessionStorage`) sets `shouldReload` + `shared.shouldAutostartScenario = false`; on `STARTED` emits `RELOAD`; handles CHANGED. On `CLOSE` and `RELOAD` saves storage at `CONST.SYSTEM.PRIORITIES.BEFORE`. |
|
|
32
|
-
|
|
33
|
-
## Related plugins
|
|
34
|
-
|
|
35
|
-
### plugins/core/
|
|
36
|
-
|
|
37
|
-
- [platforms.md](../core/platforms.md) — `PLATFORMS`: CONST.ELECTRON, PARAMS.CURRENT_PLATFORM
|
|
38
|
-
- [scenario.md](../core/scenario.md) — `SCENARIO`: `shared.shouldAutostartScenario` (disables autostart before reload)
|
|
39
|
-
- [storage.md](../core/storage.md) — `STORAGE`: EVENTS.CHANGED, EVENTS.SET_ALL, EVENTS.GET_ALL
|
|
40
|
-
- [system.md](../core/system.md) — `SYSTEM`: EVENTS.STARTED, EVENTS.CLOSE, EVENTS.RELOAD, CONST.PRIORITIES.BEFORE, CONST.HOST
|
|
41
|
-
- [vendors.md](../core/vendors.md) — `VENDORS`: EVENTS.DEBOUNCE
|
|
42
|
-
|
|
43
|
-
### Other
|
|
44
|
-
|
|
45
|
-
— None
|