@vnejs/docs 0.2.69 → 0.2.71

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.
@@ -1,5 +1,4 @@
1
1
  # 0.2.68
2
2
 
3
3
  - `plugins/controls/gamepad` — joypad.js is gone. The plugin polls `navigator.getGamepads()` every frame, including a pad already connected at launch. API: `GAMEPAD.BUTTON_PRESS`, `GAMEPAD.BUTTON_RELEASE`, `GAMEPAD.AXIS`, `GAMEPAD.CONNECT`, `GAMEPAD.DISCONNECT`. One pad still sets `CONTROLS.DEVICE_SET` at once.
4
- - `cli/desktop` — Electron is `41.10.7` (`games/coraline`, `games/checkers`, and `games/vn.skeleton` pin the same). On Windows the host disables `Windows.Gaming.Input` (`disable-features=EnableWindowsGamingInputDataFetcher`) so `navigator.getGamepads()` reads XInput.
5
4
  - `compatibility/controls.gamepad/controls.cursor` — stick input comes from `GAMEPAD.AXIS`. Left stick is `CURSOR.SHIFT`, right stick is `CURSOR.SCROLL`.
@@ -0,0 +1,11 @@
1
+ # 0.2.71
2
+
3
+ - `contracts/text/text`, `plugins/text/text` — removed `EVENTS.TEXT.EMIT_BEFORE` and `TextEmitBeforePayload`. Early hooks subscribe to `EVENTS.TEXT.EMIT`. Priorities live in `CONST.TEXT.EMIT_PRIORITY`: `BEFORE` is `-100`, `MAIN` is `0`. `text.speaker` uses `BEFORE + 1`. `MAIN` is the default priority, so handlers do not pass it.
4
+ - `plugins/text/wall` — `text.wall.emit.before` subscribes to `EVENTS.TEXT.EMIT` with `CONST.TEXT.EMIT_PRIORITY.BEFORE`.
5
+ - `compatibility/views.scenario.interface/text` — `INTERFACE.SHOW` runs on `EVENTS.TEXT.EMIT` with `CONST.TEXT.EMIT_PRIORITY.BEFORE`.
6
+ - `compatibility/text/audio.voice` — voice stop runs on `EVENTS.TEXT.EMIT` with `CONST.TEXT.EMIT_PRIORITY.BEFORE`. Play stays at the default priority.
7
+ - `core/system` — removed `EVENTS.SYSTEM.CLOSE_BEFORE`. Prep before close or reload is a handler of `EVENTS.SYSTEM.CLOSE` or `EVENTS.SYSTEM.RELOAD` with `CONST.SYSTEM.PRIORITIES.BEFORE` (`-100`). `closeWindow` and `reloadWindow` stay at priority `0`. API: removed `EVENTS.SYSTEM.CLOSE_BEFORE`; added `CONST.SYSTEM.PRIORITIES.BEFORE`.
8
+ - `platform/electron` — `saveStorage` listens to `EVENTS.SYSTEM.CLOSE` and `EVENTS.SYSTEM.RELOAD` at `CONST.SYSTEM.PRIORITIES.BEFORE`.
9
+ - `contracts/scenario/choose`, `plugins/scenario/choose` — removed `EVENTS.CHOOSE.OPTION_BEFORE` and `ChooseOptionBeforePayload`. Early hooks subscribe to `EVENTS.CHOOSE.OPTION`. Priorities live in `CONST.CHOOSE.OPTION_PRIORITY`: `BEFORE` is `-100`, `MAIN` is `0`. `MAIN` is the default priority, so `choose.option` does not pass it.
10
+ - `compatibility/scenario.choose/scenario.fastforward` — `FASTFORWARD.CHECK` runs on `EVENTS.CHOOSE.OPTION` with `CONST.CHOOSE.OPTION_PRIORITY.BEFORE`.
11
+ - `compatibility/scenario.choose/scenario.history` — `HISTORY.ADD` with `{ locKey: "choice" }` runs on `EVENTS.CHOOSE.OPTION` with `CONST.CHOOSE.OPTION_PRIORITY.BEFORE`.
@@ -2,6 +2,7 @@
2
2
 
3
3
  Engine and public API changes. One file per `@vnejs/docs` release. Newest first.
4
4
 
5
+ - [0.2.71](./0.2.71.md)
5
6
  - [0.2.68](./0.2.68.md)
6
7
  - [0.2.66](./0.2.66.md)
7
8
  - [0.2.65](./0.2.65.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vnejs/docs",
3
- "version": "0.2.69",
3
+ "version": "0.2.71",
4
4
  "description": "VNEJS documentation for engine consumers and coding agents",
5
5
  "files": [
6
6
  "*.md",
@@ -59,8 +59,6 @@ So the plugin:
59
59
 
60
60
  `controls.gamepad.poll` reads `navigator.getGamepads()` on init and on every animation frame. A pad that was already connected at launch is in that list, so it does not depend on the browser `gamepadconnected` event.
61
61
 
62
- Windows Electron disables `Windows.Gaming.Input` so that list comes from XInput. Proton on Steam Deck fills XInput.
63
-
64
62
  `controls.gamepad.device` reads the same list on init and on `CONNECT`. One pad sets `CONTROLS.DEVICE_SET` at once (`DEVICES.XBOX` or `DEVICES.PLAYSTATION` by `gamepad.id`). Several pads still wait for the first real press or stick.
65
63
 
66
64
  Profile priority: `steam-deck` → `playstation` → `nintendo` → `firefox` → `standard`.
@@ -8,27 +8,27 @@ Application lifecycle, DOM anchors, files, resize, engine version.
8
8
 
9
9
  Handler payloads and results are typed through module augmentation of the contract (`VneEventPayloadMap` / `VneEventResultMap`). The types live in `@vnejs/contracts.core.system`.
10
10
 
11
- | Key | String | Meaning |
12
- | -------------- | ------------------------- | -------------------------------------------------------------- |
13
- | `RESIZE` | `vne:system:resize` | Application window size changed. |
14
- | `RELOAD` | `vne:system:reload` | Reload the page after the `CLOSE_BEFORE` phase. |
15
- | `FULLSCREEN` | `vne:system:fullscreen` | Toggle document fullscreen. |
16
- | `CLOSE` | `vne:system:close` | Close the application window after the `CLOSE_BEFORE` phase. |
17
- | `CLOSE_BEFORE` | `vne:system:close_before` | Prep phase before page close or reload. |
18
- | `FILE_LOAD` | `vne:file:load` | Download an object as a JSON file. Payload: `{ obj?, name? }`. |
19
- | `FILE_READ` | `vne:file:read` | File picker → parse JSON → return contents. |
11
+ | Key | String | Meaning |
12
+ | ------------ | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
13
+ | `RESIZE` | `vne:system:resize` | Application window size changed. |
14
+ | `RELOAD` | `vne:system:reload` | Reload the page. Handlers at `CONST.SYSTEM.PRIORITIES.BEFORE` finish first. The module reloads at priority `0`. |
15
+ | `FULLSCREEN` | `vne:system:fullscreen` | Toggle document fullscreen. |
16
+ | `CLOSE` | `vne:system:close` | Close the application window. Handlers at `CONST.SYSTEM.PRIORITIES.BEFORE` finish first. The module closes the window at priority `0`. |
17
+ | `FILE_LOAD` | `vne:file:load` | Download an object as a JSON file. Payload: `{ obj?, name? }`. |
18
+ | `FILE_READ` | `vne:file:read` | File picker → parse JSON → return contents. |
20
19
 
21
20
  ## Constants
22
21
 
23
- | Key | Meaning |
24
- | --------------------- | ---------------------------------------------- |
25
- | `HOST` | Origin or `http://localhost:{port}` from query |
26
- | `VERSION_MAJOR` | Major version of the state format (number) |
27
- | `VERSION_MINOR` | Minor version (number) |
28
- | `DOM_IDS.APP` | `"app"` — root container |
29
- | `DOM_IDS.MEDIA` | `"media"` — hidden media container |
30
- | `DOM_IDS.COMPONENTS` | `"components"` — UI container |
31
- | `LOGS_ACTIONS.RESIZE` | `"resize"` — log label on `RESIZE` |
22
+ | Key | Meaning |
23
+ | --------------------- | ---------------------------------------------------------------------------------------------------------------------- |
24
+ | `HOST` | Origin or `http://localhost:{port}` from query |
25
+ | `VERSION_MAJOR` | Major version of the state format (number) |
26
+ | `VERSION_MINOR` | Minor version (number) |
27
+ | `DOM_IDS.APP` | `"app"` — root container |
28
+ | `DOM_IDS.MEDIA` | `"media"` — hidden media container |
29
+ | `DOM_IDS.COMPONENTS` | `"components"` — UI container |
30
+ | `LOGS_ACTIONS.RESIZE` | `"resize"` — log label on `RESIZE` |
31
+ | `PRIORITIES.BEFORE` | `-100`. Handler priority on `CLOSE` and `RELOAD` that finishes before the window closes or the page reloads. |
32
32
 
33
33
  ## Parameters
34
34
 
@@ -42,7 +42,7 @@ None.
42
42
 
43
43
  | Module | Role |
44
44
  | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
45
- | `system` | Reload, close, fullscreen, `CLOSE_BEFORE`. |
45
+ | `system` | Reload, close, fullscreen. `closeWindow` and `reloadWindow` use priority `0`. |
46
46
  | `system.resize` | Reacts to window resize; emits `RESIZE`. |
47
47
  | `system.file` | `FILE_LOAD` / `FILE_READ`. |
48
48
  | `system.version` | Default state `{ major, minor }` for save migration; slice in `ModuleGlobalState["system.version"]` (`ModuleGlobalStateSystemVersion`). |
@@ -28,7 +28,7 @@ None.
28
28
 
29
29
  | Module | Role |
30
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 / CLOSE_BEFORE. |
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
32
 
33
33
  ## Related plugins
34
34
 
@@ -37,7 +37,7 @@ None.
37
37
  - [platforms.md](../core/platforms.md) — `PLATFORMS`: CONST.ELECTRON, PARAMS.CURRENT_PLATFORM
38
38
  - [scenario.md](../core/scenario.md) — `SCENARIO`: `shared.shouldAutostartScenario` (disables autostart before reload)
39
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_BEFORE, EVENTS.RELOAD, CONST.HOST
40
+ - [system.md](../core/system.md) — `SYSTEM`: EVENTS.STARTED, EVENTS.CLOSE, EVENTS.RELOAD, CONST.PRIORITIES.BEFORE, CONST.HOST
41
41
  - [vendors.md](../core/vendors.md) — `VENDORS`: EVENTS.DEBOUNCE
42
42
 
43
43
  ### Other
@@ -28,28 +28,29 @@ Example “look around → back to menu” loop:
28
28
 
29
29
  Handler payloads and results are typed through module augmentation of the contract (`VneEventPayloadMap` / `VneEventResultMap`). The types live in `@vnejs/contracts.scenario.choose`.
30
30
 
31
- | Key | String | Meaning |
32
- | -------------------- | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
33
- | `EMIT` | `vne:choose:emit` | Accept options and args; when any are visible — `STATE_UPDATE` and `SHOW`; else `SKIP`. |
34
- | `OPTION` | `vne:choose:option` | Accept UI index: run `OPTION_BEFORE`, then `HIDE`, `OPTION_REPLACE`, set `curLine`, reset state, `emit SCENARIO.NEXT`. |
35
- | `OPTION_BEFORE` | `vne:choose:option_before` | Side effects before applying choice (Observer subscriptions with `priority`). |
36
- | `OPTION_REPLACE` | `vne:choose:option_replace` | Replace the accepted option UI index (handler chain before branch jump). |
37
- | `OPTION_REPLACE_REG` | `vne:choose:option_replace_reg` | Register an `OPTION_REPLACE` handler. |
38
- | `OPTION_TEXT` | `vne:choose:option_text` | Replace option `text` before it is stored. No handlers — the scenario literal stays. |
39
- | `OPTION_TEXT_REG` | `vne:choose:option_text_reg` | Register an `OPTION_TEXT` handler. |
40
- | `SKIP` | `vne:choose:skip` | Skip block: `curLine` to first line after `% choose` indent tree, `emit SCENARIO.NEXT`. |
41
- | `SHOW` | `vne:choose:show` | Choice active (state ready). View plugin listens. |
42
- | `HIDE` | `vne:choose:hide` | Choice closed. View plugin listens. |
43
- | `EXEC_REG` | `vne:choose:exec_reg` | Register exec handler for substitution in options. |
44
- | `EXEC_GET` | `vne:choose:exec_get` | Get a value via a registered exec handler. |
45
- | `STATE_UPDATE` | `vne:choose:state_update` | Update accumulated `choose` module state. |
31
+ | Key | String | Meaning |
32
+ | -------------------- | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
33
+ | `EMIT` | `vne:choose:emit` | Accept options and args; when any are visible — `STATE_UPDATE` and `SHOW`; else `SKIP`. |
34
+ | `OPTION` | `vne:choose:option` | Accept UI index. Handlers at `OPTION_PRIORITY.BEFORE` finish first. Then `HIDE`, `OPTION_REPLACE`, set `curLine`, reset state, `emit SCENARIO.NEXT`. |
35
+ | `OPTION_REPLACE` | `vne:choose:option_replace` | Replace the accepted option UI index (handler chain before branch jump). |
36
+ | `OPTION_REPLACE_REG` | `vne:choose:option_replace_reg` | Register an `OPTION_REPLACE` handler. |
37
+ | `OPTION_TEXT` | `vne:choose:option_text` | Replace option `text` before it is stored. No handlers — the scenario literal stays. |
38
+ | `OPTION_TEXT_REG` | `vne:choose:option_text_reg` | Register an `OPTION_TEXT` handler. |
39
+ | `SKIP` | `vne:choose:skip` | Skip block: `curLine` to first line after `% choose` indent tree, `emit SCENARIO.NEXT`. |
40
+ | `SHOW` | `vne:choose:show` | Choice active (state ready). View plugin listens. |
41
+ | `HIDE` | `vne:choose:hide` | Choice closed. View plugin listens. |
42
+ | `EXEC_REG` | `vne:choose:exec_reg` | Register exec handler for substitution in options. |
43
+ | `EXEC_GET` | `vne:choose:exec_get` | Get a value via a registered exec handler. |
44
+ | `STATE_UPDATE` | `vne:choose:state_update` | Update accumulated `choose` module state. |
46
45
 
47
46
  ## Constants
48
47
 
49
- | Key | Meaning |
50
- | --------------------- | --------------------------------------------------------------- |
51
- | `EXEC_ACTIONS.REPEAT` | Literal `repeat` for `$ choose repeat`. |
52
- | `LOGS_ACTIONS` | Log labels: `EMIT`, `OPTION`, `SKIP`, `SHOW`, `HIDE`, `REPEAT`. |
48
+ | Key | Meaning |
49
+ | ------------------------ | ------------------------------------------------------------------- |
50
+ | `EXEC_ACTIONS.REPEAT` | Literal `repeat` for `$ choose repeat`. |
51
+ | `LOGS_ACTIONS` | Log labels: `EMIT`, `OPTION`, `SKIP`, `SHOW`, `HIDE`, `REPEAT`. |
52
+ | `OPTION_PRIORITY.BEFORE` | `-100`. Hooks on `OPTION` that must finish before the main handler. |
53
+ | `OPTION_PRIORITY.MAIN` | `0`. Default priority. Handlers omit it. |
53
54
 
54
55
  ## Parameters
55
56
 
@@ -89,13 +90,13 @@ None.
89
90
 
90
91
  Package: `@vnejs/compatibility.scenario.choose-with-scenario.fastforward`
91
92
 
92
- In `subscribe` listens to `OPTION_BEFORE`: on option pick emits `FASTFORWARD.CHECK` (before `HIDE` / `OPTION_REPLACE`).
93
+ In `subscribe` listens to `OPTION` at `OPTION_PRIORITY.BEFORE`: on option pick emits `FASTFORWARD.CHECK` (before `HIDE` / `OPTION_REPLACE`).
93
94
 
94
95
  ### `compatibility/scenario.choose/scenario.history/`
95
96
 
96
97
  Package: `@vnejs/compatibility.scenario.choose-with-scenario.history`
97
98
 
98
- In `subscribe` listens to `OPTION_BEFORE`: on option pick emits `HISTORY.ADD` with `{ locKey: "choice" }` (no speaker/text). Line text comes from history screen localization (`history.json`). Wired in `bundles/vn.skeleton`.
99
+ In `subscribe` listens to `OPTION` at `OPTION_PRIORITY.BEFORE`: on option pick emits `HISTORY.ADD` with `{ locKey: "choice" }` (no speaker/text). Line text comes from history screen localization (`history.json`). Wired in `bundles/vn.skeleton`.
99
100
 
100
101
  ### `compatibility/scenario.choose/scenario.qte/`
101
102
 
@@ -121,7 +122,7 @@ In `init` registers an `OPTION_TEXT` handler that returns `TEXT.REPLACE`. `text.
121
122
 
122
123
  - [text.md](../text/text.md) — `TEXT`: `OPTION_TEXT` → `REPLACE` (compatibility above)
123
124
  - [qte.md](./qte.md) — `QTE`: link via `OPTION_REPLACE` (compatibility above)
124
- - [fastforward.md](./fastforward.md) — `FASTFORWARD`: link via `OPTION_BEFORE` (compatibility above)
125
- - [history.md](./history.md) — `HISTORY`: link via `OPTION_BEFORE` → `ADD` with `locKey` (compatibility above)
125
+ - [fastforward.md](./fastforward.md) — `FASTFORWARD`: link via `OPTION` at `OPTION_PRIORITY.BEFORE` (compatibility above)
126
+ - [history.md](./history.md) — `HISTORY`: link via `OPTION` at `OPTION_PRIORITY.BEFORE` → `ADD` with `locKey` (compatibility above)
126
127
  - [views.scenario/choose.md](../views.scenario/choose.md) — `CHOOSE_VIEW`: choice UI (listens SHOW / HIDE)
127
128
  - [scenario/point_and_click.md](./point_and_click.md) — same `repeat` / `SKIP` / `SHOW` / `HIDE` / `STATE_UPDATE` pattern
@@ -71,4 +71,4 @@ Handler payloads and results are typed through module augmentation of the contra
71
71
 
72
72
  ### Other
73
73
 
74
- - [choose.md](./choose.md) — `CHOOSE`: linked via `compatibility/scenario.choose/scenario.fastforward` (`OPTION_BEFORE` → `FASTFORWARD.CHECK`)
74
+ - [choose.md](./choose.md) — `CHOOSE`: linked via `compatibility/scenario.choose/scenario.fastforward` (`OPTION` at `OPTION_PRIORITY.BEFORE` → `FASTFORWARD.CHECK`)
@@ -59,7 +59,7 @@ On `TEXT.EMIT_NEXT` emits `HISTORY.ADD` with `{ label, text, args, speaker, spea
59
59
 
60
60
  Package: `@vnejs/compatibility.scenario.choose-with-scenario.history`
61
61
 
62
- On `CHOOSE.OPTION_BEFORE` emits `HISTORY.ADD` with `{ locKey: "choice" }`. Line translation — key `choice` in the screen `history.json`. Wired in `bundles/vn.skeleton`.
62
+ On `CHOOSE.OPTION` at `CONST.CHOOSE.OPTION_PRIORITY.BEFORE` emits `HISTORY.ADD` with `{ locKey: "choice" }`. Line translation — key `choice` in the screen `history.json`. Wired in `bundles/vn.skeleton`.
63
63
 
64
64
  ## Related plugins
65
65
 
@@ -73,5 +73,5 @@ On `CHOOSE.OPTION_BEFORE` emits `HISTORY.ADD` with `{ locKey: "choice" }`. Line
73
73
  ### Other
74
74
 
75
75
  - [text.md](../text/text.md) — `TEXT`: `EMIT_NEXT` → `ADD` (compatibility above)
76
- - [choose.md](./choose.md) — `CHOOSE`: `OPTION_BEFORE` → `ADD` (compatibility above)
76
+ - [choose.md](./choose.md) — `CHOOSE`: `OPTION` at `OPTION_PRIORITY.BEFORE` → `ADD` (compatibility above)
77
77
  - [views.screens/history.md](../views.screens/history.md) — `HISTORY_VIEW`: log screen (`SHOW` / `HIDE`); reads `GET` / `KEYS` / `LOAD`
@@ -8,29 +8,30 @@ Text system core: parse scenario lines, state, tokens, and speakers.
8
8
 
9
9
  Handler payloads and results are typed through module augmentation of the contract (`VneEventPayloadMap` / `VneEventResultMap`). The types live in `@vnejs/contracts.text`.
10
10
 
11
- | Key | String | Meaning |
12
- | --------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
13
- | `EMIT` | `vne:text:emit` | Start output: prepare tokens, update state, run process. With `isKeepProcessState` after `STATE_CHANGED` goes straight to `EMIT_END`. |
14
- | `EMIT_END` | `vne:text:emit_end` | Finish the current step; with autonext go to the next. With `isKeepProcessState` does not send `PROCESS_STATE` or `EMIT_NEXT`. |
15
- | `EMIT_NEXT` | `vne:text:emit_next` | Go to the next emit step (subscriptions with `priority` on Observer). |
16
- | `EMIT_BEFORE` | `vne:text:emit_before` | Hook before main emit (subscriptions with `priority` on Observer). |
17
- | `EMIT_PROCESS` | `vne:text:emit_process` | Run step-by-step output process. |
18
- | `PREPARE_TOKENS` | `vne:text:prepare_tokens` | Prepare tokens or intermediate data. |
19
- | `PROCESS_CANCEL` | `vne:text:process_cancel` | Cancel the current process. |
20
- | `PROCESS_STATE` | `vne:text:process_state` | Change process state. |
21
- | `CHANGED` | `vne:text:changed` | Record a state change. |
22
- | `SPEAKER_CHANGED` | `vne:text:speaker_changed` | Record a change of the current speaker. |
23
- | `SPEAKER_INFO_UPDATE` | `vne:text:speaker_info_update` | Update speaker metadata (color, name, opacity). |
24
- | `STATE_UPDATE` | `vne:text:state_update` | Update accumulated module state. |
25
- | `STATE_CHANGED` | `vne:text:state_changed` | Signal that accumulated state changed. |
26
- | `RECALC` | `vne:text:recalc` | Ask handlers for data and continue the chain. |
27
- | `RECALC_DONE` | `vne:text:recalc_done` | Finish the `RECALC` operation. |
28
- | `REPLACE` | `vne:text:replace` | Replace the current value or content. |
29
- | `REPLACE_REG` | `vne:text:replace_reg` | Register a `REPLACE` handler. |
11
+ | Key | String | Meaning |
12
+ | --------------------- | ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
13
+ | `EMIT` | `vne:text:emit` | Start output: prepare tokens, update state, run process. `EMIT_PRIORITY.BEFORE` runs before `EMIT_PRIORITY.MAIN`. With `isKeepProcessState` after `STATE_CHANGED` goes straight to `EMIT_END`. |
14
+ | `EMIT_END` | `vne:text:emit_end` | Finish the current step; with autonext go to the next. With `isKeepProcessState` does not send `PROCESS_STATE` or `EMIT_NEXT`. |
15
+ | `EMIT_NEXT` | `vne:text:emit_next` | Go to the next emit step (subscriptions with `priority` on Observer). |
16
+ | `EMIT_PROCESS` | `vne:text:emit_process` | Run step-by-step output process. |
17
+ | `PREPARE_TOKENS` | `vne:text:prepare_tokens` | Prepare tokens or intermediate data. |
18
+ | `PROCESS_CANCEL` | `vne:text:process_cancel` | Cancel the current process. |
19
+ | `PROCESS_STATE` | `vne:text:process_state` | Change process state. |
20
+ | `CHANGED` | `vne:text:changed` | Record a state change. |
21
+ | `SPEAKER_CHANGED` | `vne:text:speaker_changed` | Record a change of the current speaker. |
22
+ | `SPEAKER_INFO_UPDATE` | `vne:text:speaker_info_update` | Update speaker metadata (color, name, opacity). |
23
+ | `STATE_UPDATE` | `vne:text:state_update` | Update accumulated module state. |
24
+ | `STATE_CHANGED` | `vne:text:state_changed` | Signal that accumulated state changed. |
25
+ | `RECALC` | `vne:text:recalc` | Ask handlers for data and continue the chain. |
26
+ | `RECALC_DONE` | `vne:text:recalc_done` | Finish the `RECALC` operation. |
27
+ | `REPLACE` | `vne:text:replace` | Replace the current value or content. |
28
+ | `REPLACE_REG` | `vne:text:replace_reg` | Register a `REPLACE` handler. |
30
29
 
31
30
  ## Constants
32
31
 
33
32
  - **`LINE_KEYWORDS.EXTEND`** — `"extend"`: continue previous text without a new line.
33
+ - **`EMIT_PRIORITY.BEFORE`** — `-100`. Hooks on `EMIT` that must run before the main handler.
34
+ - **`EMIT_PRIORITY.MAIN`** — `0`. Default priority. Handlers omit it. `text.speaker` uses `BEFORE + 1`.
34
35
 
35
36
  ## Parameters
36
37
 
@@ -59,7 +60,7 @@ Handler payloads and results are typed through module augmentation of the contra
59
60
  | `text.process.enabled` | Plugin `process.enabled` submodule. |
60
61
  | `text.recalc` | Recalculate derived text state. |
61
62
  | `text.replace` | `REPLACE_REG` handler registry. |
62
- | `text.speaker` | SPEAKER_INFO_UPDATE, CLEAR, SET; on `EMIT_BEFORE` (`priority` 100) — speaker. |
63
+ | `text.speaker` | SPEAKER_INFO_UPDATE, CLEAR, SET; on `EMIT` at `EMIT_PRIORITY.BEFORE + 1` — speaker. |
63
64
  | `text` | STATE_UPDATE, STATE_CHANGED, SET, CLEAR. `STATE.SET` → `TEXT.EMIT` with `isKeepProcessState`. `STATE.CLEAR` resets state and sends `TEXT.CHANGED`, no `TEXT.EMIT`. |
64
65
 
65
66
  ## Compatibility
@@ -68,7 +69,7 @@ Handler payloads and results are typed through module augmentation of the contra
68
69
 
69
70
  Package: `@vnejs/compatibility.views.scenario.interface-with-text`
70
71
 
71
- Link to [interface.md](../views.scenario/interface.md): `CHANGED` / `SPEAKER_CHANGED` / `EMIT_BEFORE` → `INTERFACE.TEXT_CHANGED` / `SPEAKER_CHANGED` / `SHOW`. In `postinject` sets `shared.interfaceTextShowAllTokensOnChange`.
72
+ Link to [interface.md](../views.scenario/interface.md): `CHANGED` / `SPEAKER_CHANGED` / `EMIT` (`EMIT_PRIORITY.BEFORE`) → `INTERFACE.TEXT_CHANGED` / `SPEAKER_CHANGED` / `SHOW`. In `postinject` sets `shared.interfaceTextShowAllTokensOnChange`.
72
73
 
73
74
  ### `compatibility/text/scenario.history/`
74
75
 
@@ -40,4 +40,4 @@ None.
40
40
 
41
41
  ### Other
42
42
 
43
- - [text.md](./text.md) — `TEXT`: EVENTS.RECALC, EVENTS.EMIT_BEFORE, EVENTS.REPLACE
43
+ - [text.md](./text.md) — `TEXT`: EVENTS.RECALC, EVENTS.EMIT (`CONST.TEXT.EMIT_PRIORITY.BEFORE`), EVENTS.REPLACE
@@ -70,7 +70,7 @@ None.
70
70
 
71
71
  Package: `@vnejs/compatibility.views.scenario.interface-with-text`
72
72
 
73
- On `TEXT.CHANGED` emits `INTERFACE.TEXT_CHANGED` (`tokensVisible` = token length when `shared.interfaceTextShowAllTokensOnChange`). On `TEXT.SPEAKER_CHANGED` — `INTERFACE.SPEAKER_CHANGED`. In `postinject` sets the flag to `true`; in `init` registers `TEXT.EMIT_BEFORE` → `INTERFACE.SHOW`. Wired in `bundles/vn.skeleton`.
73
+ On `TEXT.CHANGED` emits `INTERFACE.TEXT_CHANGED` (`tokensVisible` = token length when `shared.interfaceTextShowAllTokensOnChange`). On `TEXT.SPEAKER_CHANGED` — `INTERFACE.SPEAKER_CHANGED`. In `postinject` sets the flag to `true`; in `subscribe` registers `TEXT.EMIT` (`CONST.TEXT.EMIT_PRIORITY.BEFORE`) → `INTERFACE.SHOW`. Wired in `bundles/vn.skeleton`.
74
74
 
75
75
  ### `compatibility/views.scenario.interface/text.smooth/`
76
76
 
@@ -89,6 +89,6 @@ On `TEXT_SMOOTH.CHANGED` emits `INTERFACE.TEXT_CHANGED` with `tokens` from `glob
89
89
  ### Other
90
90
 
91
91
  - [controls.md](../controls/controls.md) — `CONTROLS`: EVENTS.POP, EVENTS.PUSH
92
- - [text.md](../text/text.md) — `TEXT`: link via compatibility above (`CHANGED`, `SPEAKER_CHANGED`, `EMIT_BEFORE`)
92
+ - [text.md](../text/text.md) — `TEXT`: link via compatibility above (`CHANGED`, `SPEAKER_CHANGED`, `EMIT`)
93
93
  - [choose.md](./choose.md) — compatibility hides interface on `CHOOSE_VIEW.SHOW` (`LIFECYCLE_PRIORITY.SHOW.BEFORE`)
94
94
  - [qte.md](./qte.md) — compatibility hides interface on `QTE_VIEW.SHOW` (`LIFECYCLE_PRIORITY.SHOW.BEFORE`)