@vnejs/docs 0.2.77 → 0.2.79

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 CHANGED
@@ -38,6 +38,7 @@ The package has two scenario entries. Compare them and pick one. Both link to `p
38
38
  | [`modules_extensions/`](./architecture/modules.md) | Module base classes |
39
39
  | [`configs/`](./architecture/configs.md) | Shared TypeScript configs |
40
40
  | [`contracts/`](./architecture/contracts.md) | Public plugin API |
41
+ | [`shared/`](./architecture/shared.md) | Plugin setup presets |
41
42
  | [`plugins/`](./architecture/plugins.md) | Behavior on the bus |
42
43
  | [`compatibility/`](./architecture/compatibility.md) | Link between plugins |
43
44
  | [`bundles/`](./architecture/bundles.md) | Plugin set for a game |
@@ -48,4 +49,4 @@ The package has two scenario entries. Compare them and pick one. Both link to `p
48
49
  | [`backends/`](./architecture/backends.md) | Workers: Steam token and label JSON |
49
50
  | [`vs_code_extensions/`](./architecture/editor.md) | `.vne` highlighting in the editor |
50
51
 
51
- A game imports one `bundles/` package and gets `VneCore`, the engine entry.
52
+ A game imports one `bundles/` package and gets `VneCore`, the engine entry. Menu factories come from `@vnejs/shared.*` in the game script.
@@ -7,6 +7,7 @@ flowchart TD
7
7
  PKG[packages/]
8
8
  ME[modules_extensions/]
9
9
  CT[contracts/]
10
+ SH[shared/]
10
11
  PL[plugins/]
11
12
  CP[compatibility/]
12
13
  BD[bundles/]
@@ -22,6 +23,7 @@ flowchart TD
22
23
  PKG --> ME --> PL
23
24
  CT --> PL
24
25
  CT --> CP
26
+ CT --> SH
25
27
  PL --> BD
26
28
  CP --> BD
27
29
  BD --> EN
@@ -31,7 +33,7 @@ flowchart TD
31
33
  ART --> PLAY[Browser / Electron]
32
34
  ```
33
35
 
34
- 1. `bundles/` регистрирует `plugins/` и `compatibility/` в `VNE`.
36
+ 1. `bundles/` регистрирует `plugins/` и `compatibility/` в `VNE`. Фабрики из `shared/` импортирует скрипт игры.
35
37
  2. `cli/` собирает сценарий в JSON и клиент в `dist/`.
36
38
  3. `new VneCore().init()` — модули, media, lifecycle до `start`.
37
39
  4. Игра живёт на событиях шины; cross-plugin связи — через `compatibility/` из `bundles/`.
@@ -4,7 +4,7 @@
4
4
 
5
5
  - Определяет **набор возможностей** для `games/`.
6
6
  - Экспортирует **`VneCore`**.
7
- - Дочерний пакет в `bundles/` импортирует родительский и **добавляет** плагины.
7
+ - Фабрики из **`@vnejs/shared.*`** бандл не импортирует и не реэкспортирует. Их импортирует скрипт игры.
8
8
 
9
9
  ```mermaid
10
10
  flowchart BT
@@ -4,13 +4,13 @@
4
4
 
5
5
  | Пакет | Назначение |
6
6
  | ------------------------------ | ------------------------------------------------------------------------------------- |
7
- | **`@vnejs/configs.ts-common`** | tsconfig для `plugins/`, `contracts/`, `packages/`, `modules_extensions/`, `helpers/` |
7
+ | **`@vnejs/configs.ts-common`** | tsconfig для `plugins/`, `contracts/`, `packages/`, `modules_extensions/`, `helpers/`, `shared/` |
8
8
  | **`@vnejs/configs.ts-uis`** | tsconfig для `uis/react/` и view-кода `games/` (JSX, React-типы) |
9
9
  | **`@vnejs/configs.vitest`** | Общий Vitest-конфиг (`create-config.js`, `setup.js`) для пакетов с тестами |
10
10
 
11
11
  ```mermaid
12
12
  flowchart LR
13
- TC[configs.ts-common] --> PL[plugins/ / contracts/ / packages/]
13
+ TC[configs.ts-common] --> PL[plugins/ / contracts/ / packages/ / shared/]
14
14
  TU[configs.ts-uis] --> UI[uis/react/]
15
15
  TU --> GM[games/]
16
16
  TV[configs.vitest] --> TEST[пакеты с vitest]
@@ -7,6 +7,8 @@ flowchart TD
7
7
  G -.->|HTTP| BE[backends/]
8
8
  B --> P[plugins/]
9
9
  B --> C[compatibility/]
10
+ G --> SH[shared/]
11
+ SH --> CT[contracts/]
10
12
  P --> CT[contracts/]
11
13
  C --> CT
12
14
  P --> H[helpers/]
@@ -24,9 +26,10 @@ flowchart TD
24
26
 
25
27
  | От | К | Смысл |
26
28
  | ---------------- | ----------------------------------- | -------------------------------------------------------- |
27
- | `games/` | `bundles/`, `cli/` | Игра не знает про отдельные плагины; сборка через `cli/` |
29
+ | `games/` | `bundles/`, `cli/`, `shared/` | Сборка через `cli/`. Фабрики `shared/` импортирует скрипт, без записи в `package.json` |
28
30
  | `games/` | `backends/` | HTTP к воркерам токена и меток, без импорта пакетов |
29
- | `bundles/` | `plugins/`, `compatibility/` | Только импорт нужного набора |
31
+ | `bundles/` | `plugins/`, `compatibility/` | Набор плагинов. Фабрики `shared/` не реэкспортирует |
32
+ | `shared/` | `contracts/` | Фабрики настройки читают события, не реализации |
30
33
  | `plugins/` | `contracts/` | Реализация следует объявленному API |
31
34
  | `plugins/` | `modules_extensions/` → `packages/` | Модули наследуют базы, базы опираются на registry/observer |
32
35
  | `compatibility/` | `contracts/` (2+) | Связка по событиям, без импорта реализаций |
@@ -42,6 +45,7 @@ flowchart TD
42
45
  | **`modules_extensions/`** | Базовые классы модулей |
43
46
  | **`configs/`** | Общие tsconfig |
44
47
  | **`contracts/`** | API плагина: события, типы |
48
+ | **`shared/`** | Пресеты настройки плагинов |
45
49
  | **`plugins/`** | Реализация на шине |
46
50
  | **`compatibility/`** | Opt-in связка двух плагинов |
47
51
  | **`bundles/`** | Набор способностей для игры |
@@ -37,6 +37,7 @@ flowchart LR
37
37
  ```
38
38
  plugins/core/system/ → @vnejs/plugins.core.system
39
39
  contracts/text/text/ → @vnejs/contracts.text
40
+ shared/views.screens/gamemenu/ → @vnejs/shared.views.screens.gamemenu
40
41
  compatibility/text/scenario.autoread/ → @vnejs/compatibility.text-with-scenario.autoread
41
42
  ```
42
43
 
@@ -0,0 +1,37 @@
1
+ # shared/
2
+
3
+ **Пресеты настройки плагинов** — функции, из которых игра собирает параметры. Не плагин, не контракт, не реализация на шине.
4
+
5
+ Имя: `shared/views.screens/gamemenu/` → **`@vnejs/shared.views.screens.gamemenu`**. Голое **`@vnejs/shared`** не используем: так раньше назывался реестр, сейчас это **`@vnejs/registry`**.
6
+
7
+ ### Состав
8
+
9
+ | Пакет | Назначение |
10
+ | ---------------------------------------- | --------------------------------------------------------------------------------------------------- |
11
+ | **`@vnejs/shared.views.screens.gamemenu`** | Функции пунктов игрового меню. Каждая возвращает `GameMenuItemFactory`. `locKey` обязателен. Необязательные `cbBefore` и `cbAfter` вызываются вокруг клика. |
12
+ | **`@vnejs/shared.views.screens.mainmenu`** | Функции пунктов главного меню. Каждая возвращает `MainMenuItemFactory`. `locKey` обязателен. Необязательные `cbBefore` и `cbAfter` вызываются вокруг клика. |
13
+ | **`@vnejs/shared.views.settings`** | Функции экшенов и полей настроек. Экшен с подтверждением принимает `locKey`, `locKeyAccept` и `locKeyDecline`. Без подтверждения вызывается без аргументов. `createFieldToggle` принимает `locKey` и `settingKey` и возвращает поле `toggle`. `createFieldRangeX` и `createFieldRangeS` принимают `locKey`, `settingKey`, `min`, `max`, `step` и необязательный `valueMap` и возвращают поле `range` с постфиксом `x` или `s`. `createFieldVolume` принимает `locKey` и `settingKey` и возвращает поле `range` от 0 до 100 с шагом 1 и постфиксом `%`. `createFieldQuality` принимает `locKey`, флажок на каждый ключ `CONST.LAYER.QUALITIES` и необязательный `optionsWidthModifier`. `createFieldFilter` принимает `locKey`, `optionsWidthModifier` и массив значений. Первым пунктом идёт пустое значение с ключом `locKey.off`. `createFieldLang` принимает `locKey` и массив значений. Пункт получает ключ `locKey` плюс точка и значение. `createFieldActions` принимает `locKey` и массив значений. Пункт получает ключ `locKey` плюс точка и значение, а `action` равен этому значению. |
14
+
15
+ ```mermaid
16
+ flowchart TD
17
+ G[games/]
18
+ B[bundles/]
19
+ SH[shared/]
20
+ P[plugins/]
21
+ CT[contracts/]
22
+
23
+ G --> B
24
+ G --> SH
25
+ B --> P
26
+ P --> CT
27
+ SH --> CT
28
+ ```
29
+
30
+ ### Принципы
31
+
32
+ - Пакет импортирует **`@vnejs/registry`** и нужные **`contracts/`**. Реализации из **`plugins/`** не импортирует.
33
+ - Один пакет может зависеть от нескольких контрактов: клик пункта связывает события разных плагинов.
34
+ - Функция возвращает фабрику `(module) => item`. Она ничего не пишет в `VNE.PARAMS`.
35
+ - Бандл регистрирует плагин и не реэкспортирует фабрики.
36
+ - Игра импортирует `@vnejs/shared.*` в скрипте и сама собирает `PARAMS.ITEMS`. В `package.json` игры этой зависимости нет: пакет резолвится из workspace.
37
+ - **`plugins/`** пакеты **`shared/`** не импортируют.
@@ -0,0 +1,19 @@
1
+ # 0.2.78
2
+
3
+ - `shared/views.screens/gamemenu` — `createGameMenuExitItem`, `createGameMenuSettingsItem`, `createGameMenuSaveItem`, `createGameMenuLoadItem`, `createGameMenuQuickSaveItem`, `createGameMenuQuickLoadItem`, and `createGameMenuBackItem` each take `locKey` and return a `GameMenuItemFactory`. `@vnejs/bundles.vn.base` imports the package and re-exports the functions. `PARAMS.GAMEMENU.ITEMS` is unchanged.
4
+ - `shared/views.screens/mainmenu` — `createMainMenuContinueItem`, `createMainMenuNewGameItem`, `createMainMenuLoadItem`, `createMainMenuGalleryItem`, `createMainMenuSettingsItem`, `createMainMenuAuthorsItem`, and `createMainMenuExitItem` each take `locKey` and return a `MainMenuItemFactory`. `createMainMenuNewGameItem` also takes `label`. `@vnejs/bundles.vn.base` re-exports the functions. `PARAMS.MAINMENU.ITEMS` is unchanged.
5
+ - `shared/views.screens/gamemenu` — each factory also takes optional `cbBefore` and `cbAfter`. They run around the click. `requireDefined` throws when any passed `VNE` namespace is `undefined`.
6
+ - `shared/views.screens/mainmenu` — each factory also takes optional `cbBefore` and `cbAfter`. `createMainMenuNewGameItem` no longer emits `EVENTS.METRIC.GOAL` `NEW_GAME_CLICK`. Pass that call through `cbAfter`.
7
+ - `helpers/require-namespace-defined` — `requireNamespaceDefined(value, namespace)` throws when `value` is `undefined`. The message names `namespace`, for example `SAVE_QUICK`.
8
+ - `shared/views.screens/gamemenu` — factories call `requireNamespaceDefined`. `cbBefore` and `cbAfter` are not awaited.
9
+ - `shared/views.screens/mainmenu` — factories call `requireNamespaceDefined`. `cbBefore` and `cbAfter` are not awaited.
10
+ - `shared/views.screens/gamemenu` — `createGameMenuExitItem` leaves without a confirm dialog. It emits `EVENTS.SCENARIO.LABEL_GET`, `EVENTS.SAVE_CONTINUE.MAKE`, and `EVENTS.STACK.CLEAR`. The dialog is `createGameMenuExitConfirmItem`, which requires `locKeyConfirm`, `locKeyConfirmAccept`, and `locKeyConfirmDecline`. `createGameMenuQuickLoadItem` loads without `EVENTS.LOADING.EMIT`. The loading screen call is `createGameMenuQuickLoadWithLoadingItem`.
11
+ - `shared/views.screens/mainmenu` — `createMainMenuContinueItem` loads without `EVENTS.LOADING.EMIT`. The loading screen call is `createMainMenuContinueWithLoadingItem`. `createMainMenuExitConfirmItem` requires `locKeyConfirm`, `locKeyConfirmAccept`, and `locKeyConfirmDecline`. Its accept handler emits `EVENTS.SYSTEM.CLOSE`.
12
+ - `views.screens/gamemenu` — `GameMenuItem.onClick` is optional and takes no arguments, same as `MainMenuItem.onClick`. `GameMenuItemOnClickContext` is removed. `GameMenuItemFactory` still takes `module` and the item closes over it. `CLICK` calls `onClick` with no argument.
13
+ - `views.screens/gamemenu` — `CONST.GAMEMENU.SOURCE` is `gameMenu`. `createGameMenuQuickLoadWithLoadingItem` passes it to `EVENTS.LOADING.EMIT`.
14
+ - `views.screens/mainmenu` — `CONST.MAINMENU.SOURCE` is `mainMenu`. `createMainMenuContinueWithLoadingItem` passes it to `EVENTS.LOADING.EMIT`.
15
+ - `shared/views.screens/gamemenu` — `createGameMenuExitItem` and `createGameMenuExitConfirmItem` take optional `isSaveContinue`. The default is `false`. When it is `true`, the exit emits `EVENTS.SAVE_CONTINUE.MAKE`.
16
+ - `bundles/` — menu factories are not re-exported. A game script imports `@vnejs/shared.views.screens.gamemenu` and `@vnejs/shared.views.screens.mainmenu` directly. The game `package.json` does not list those packages.
17
+ - `shared/views.screens/gamemenu` — each factory takes optional `isDisabled` and `isHided` and copies them onto the item. `createGameMenuQuickLoadItem` and `createGameMenuQuickLoadWithLoadingItem` stay disabled when there is no quick save.
18
+ - `shared/views.screens/mainmenu` — each factory takes optional `isDisabled` and `isHided` and copies them onto the item. `createMainMenuContinueItem` and `createMainMenuContinueWithLoadingItem` stay disabled when there is no continue save.
19
+ - `views.screens/mainmenu` — `CLICK` skips an item when `MainMenuItem.isDisabled` or `MainMenuItem.isHided` is set.
@@ -0,0 +1,11 @@
1
+ # 0.2.79
2
+
3
+ - `shared/views/settings` — `createActionStateClear`, `createActionResetText`, `createActionResetSave`, and `createActionResetGallery` take `locKey`, `locKeyAccept`, and `locKeyDecline` and return a `SettingsAction` that emits `EVENTS.CONFIRM.EMIT`. Accept emits `EVENTS.STORAGE.CLEAR`, `EVENTS.FASTFORWARD.CLEAR`, `EVENTS.SAVE.CLEAR`, or `EVENTS.GALLERY.CLEAR`. `createActionStateExport`, `createActionStateImport`, `createActionLogsClear`, and `createActionLogsLoad` take no arguments and emit `EVENTS.STORAGE.EXPORT`, `EVENTS.STORAGE.IMPORT`, `EVENTS.LOGS.CLEAR`, and `EVENTS.LOGS.LOAD`.
4
+ - `shared/views/settings` — `createFieldToggle({ locKey, settingKey })` returns a `SettingsField`. `type` is `toggle`. `titleToggledLocKey` is `locKey` plus `.on`. `titleUntoggledLocKey` is `locKey` plus `.off`.
5
+ - `shared/views/settings` — `createFieldRangeX` and `createFieldRangeS` take `locKey`, `settingKey`, `min`, `max`, `step`, and optional `valueMap`. They return a `SettingsField` with `type` `range` and `valuePostfix` `x` or `s`.
6
+ - `shared/views/settings` — `createFieldVolume({ locKey, settingKey })` returns a `SettingsField` with `type` `range`, `min` `0`, `max` `100`, `step` `1`, and `valuePostfix` `%`.
7
+ - `shared/views/settings` — `createFieldQuality` takes `locKey`, a boolean for every key of `CONST.LAYER.QUALITIES`, and an optional `optionsWidthModifier`. It returns a `SettingsField` with `type` `selector_texts` and `settingKey` `SETTINGS.LAYER.QUALITY`. Enabled options are ordered from `nnHD` to `UHD`. The option text and value are the quality string, for example `1080p`.
8
+ - `shared/views/settings` — `createFieldFilter({ locKey, optionsWidthModifier, values })` returns a `SettingsField` with `type` `selector_texts` and `settingKey` `SETTINGS.FILTER.VALUE`. The first option is `{ locKey: locKey + ".off", value: "" }`. Each entry in `values` becomes `{ locKey: locKey + "." + value, value }`.
9
+ - `shared/views/settings` — `createFieldLang({ locKey, values })` returns a `SettingsField` with `type` `selector_texts` and `settingKey` `SETTINGS.LOCS.LANG`. Each entry in `values` becomes `{ locKey: locKey + "." + value, value }`.
10
+ - `text/locs` — `PARAMS.LOCS.LANGS` defaults to an empty list. A game fills it. `PARAMS.LOCS.DEFAULT_LANG` stays `"ru"`. Query `defaultLang` and `forceLang` are still accepted only when the value is in `PARAMS.LOCS.LANGS`.
11
+ - `shared/views/settings` — `createFieldActions({ locKey, values })` returns a `SettingsField` with `type` `actions`. Each entry in `values` becomes `{ locKey: locKey + "." + value, action: value }`.
@@ -2,6 +2,8 @@
2
2
 
3
3
  Engine and public API changes. One file per `@vnejs/docs` release. Newest first.
4
4
 
5
+ - [0.2.79](./0.2.79.md)
6
+ - [0.2.78](./0.2.78.md)
5
7
  - [0.2.77](./0.2.77.md)
6
8
  - [0.2.76](./0.2.76.md)
7
9
  - [0.2.74](./0.2.74.md)
package/manifest.json CHANGED
@@ -41,6 +41,7 @@
41
41
  "architecture/modules.md",
42
42
  "architecture/configs.md",
43
43
  "architecture/contracts.md",
44
+ "architecture/shared.md",
44
45
  "architecture/plugins.md",
45
46
  "architecture/compatibility.md",
46
47
  "architecture/bundles.md",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vnejs/docs",
3
- "version": "0.2.77",
3
+ "version": "0.2.79",
4
4
  "description": "VNEJS documentation for engine consumers and coding agents",
5
5
  "files": [
6
6
  "*.md",
@@ -28,7 +28,7 @@ None.
28
28
  | Key | Type | Meaning |
29
29
  | -------------- | ---------- | --------------------------------------------------------------------------------------- |
30
30
  | `DEFAULT_LANG` | `string` | Default: `"ru"`. |
31
- | `LANGS` | `string[]` | Query languages that are allowed. Default: `"ru"`, `"en"`. A game may replace the list. |
31
+ | `LANGS` | `string[]` | Query languages that are allowed. Default: empty. A game fills the list, for example `"ru"` and `"en"`. |
32
32
  | `GROUPS` | `object` | `VIEWS: "views"`, `LABELS: "labels"` — folders after `{lang}/`. |
33
33
 
34
34
  `LOCS.GET` / `LOCS.LOAD` require `group`. `TEXT.REPLACE` without `group` in the locs handler uses `GROUPS.LABELS`. View inject (`LOC_LABEL`) uses `GROUPS.VIEWS`.
@@ -4,6 +4,8 @@ Package: `@vnejs/plugins.views.settings` · namespace: `SETTINGS_VIEW`
4
4
 
5
5
  Settings field-list layer: render `<Settings />` and keyboard navigation across fields. Screens (`SETTINGS_SCREEN_VIEW`, `SETTINGS_DEFAULT_VIEW`) pass the active tab through `SHOW` / `TAB_SET` and hide through `HIDE`.
6
6
 
7
+ Action presets live in `@vnejs/shared.views.settings`. Each function returns a `SettingsAction`. A confirm action takes `locKey`, `locKeyAccept`, and `locKeyDecline`. An action without confirm takes no arguments. The game script imports those functions and assigns the results to `PARAMS.SETTINGS_VIEW.ACTIONS`. `createFieldToggle` takes `locKey` and `settingKey` and returns a `SettingsField` with `type` `toggle`. `titleToggledLocKey` is `locKey` plus `.on`. `titleUntoggledLocKey` is `locKey` plus `.off`. `createFieldRangeX` and `createFieldRangeS` take `locKey`, `settingKey`, `min`, `max`, and `step`, and an optional `valueMap`. They return a `SettingsField` with `type` `range` and `valuePostfix` `x` or `s`. `createFieldVolume` takes `locKey` and `settingKey` and returns a `SettingsField` with `type` `range`, `min` `0`, `max` `100`, `step` `1`, and `valuePostfix` `%`. `createFieldQuality` takes `locKey`, a boolean flag for every `CONST.LAYER.QUALITIES` key, and an optional `optionsWidthModifier`. It returns a `selector_texts` field for `SETTINGS.LAYER.QUALITY`. Enabled options run from `nnHD` to `UHD`. `createFieldFilter` takes `locKey`, `optionsWidthModifier`, and filter values such as `grayscale`. It returns a `selector_texts` field for `SETTINGS.FILTER.VALUE`. The first option is `locKey` plus `.off` with value `""`. Each value becomes an option `locKey` plus `.` plus the value. `createFieldLang` takes `locKey` and language values such as `ru`. It returns a `selector_texts` field for `SETTINGS.LOCS.LANG`. Each value becomes an option `locKey` plus `.` plus the value. `createFieldActions` takes `locKey` and action values. It returns an `actions` field. Each value becomes an option `locKey` plus `.` plus the value, and the option `action` is that value.
8
+
7
9
  ## Events
8
10
 
9
11
  Handler payloads and results are typed through module augmentation of the contract (`VneEventPayloadMap` / `VneEventResultMap`). The types live in `@vnejs/contracts.views.settings`.
@@ -4,6 +4,8 @@ Package: `@vnejs/plugins.views.screens.gamemenu` · namespace: `GAMEMENU`
4
4
 
5
5
  Pause game menu with a list of configurable items.
6
6
 
7
+ Item presets live in `@vnejs/shared.views.screens.gamemenu`. Each function returns a `GameMenuItemFactory` and requires `locKey`. Optional `cbBefore` and `cbAfter` run around the click. Optional `isDisabled` and `isHided` are copied onto the item. `createGameMenuQuickLoadItem` and `createGameMenuQuickLoadWithLoadingItem` stay disabled when there is no quick save, even if `isDisabled` is `false`. `createGameMenuExitConfirmItem` also requires `locKeyConfirm`, `locKeyConfirmAccept`, and `locKeyConfirmDecline`. Optional `isSaveContinue` defaults to `false`. When it is `true`, accept emits `EVENTS.SAVE_CONTINUE.MAKE`. `createGameMenuExitItem` leaves without that dialog and uses the same flag. `createGameMenuQuickLoadWithLoadingItem` opens the loading screen. `createGameMenuQuickLoadItem` loads without it. The game script imports those functions from this package. `PARAMS.GAMEMENU.ITEMS` is unchanged.
8
+
7
9
  ## Events
8
10
 
9
11
  Handler payloads and results are typed through module augmentation of the contract (`VneEventPayloadMap` / `VneEventResultMap`). The types live in `@vnejs/contracts.views.screens.gamemenu`.
@@ -22,7 +24,9 @@ Handler payloads and results are typed through module augmentation of the contra
22
24
 
23
25
  ## Constants
24
26
 
25
- None.
27
+ | Key | Type | Meaning |
28
+ | -------- | -------- | -------------------------------------------- |
29
+ | `SOURCE` | `string` | Loading screen source name (`gameMenu`). |
26
30
 
27
31
  ## Parameters
28
32
 
@@ -34,7 +38,7 @@ None.
34
38
  | `LOC_LABEL` | `string` | Locale label name (`gameMenu`). |
35
39
  | `VIEW_PROPS` | `ViewProps` | Screen / PositionBox / TextControls props. |
36
40
 
37
- Item (`GameMenuItem`): `locKey`, `onClick`, optional `isDisabled` / `isHided` (same as main menu).
41
+ Item (`GameMenuItem`): `locKey`, optional `onClick` / `isDisabled` / `isHided`. `onClick` takes no arguments. The factory closes over `module`, same as `MainMenuItem`.
38
42
 
39
43
  ## Settings
40
44
 
@@ -4,6 +4,8 @@ Package: `@vnejs/plugins.views.screens.mainmenu` · namespace: `MAINMENU`
4
4
 
5
5
  Main menu with items, background rotation, and scenario label preload.
6
6
 
7
+ Item presets live in `@vnejs/shared.views.screens.mainmenu`. Each function returns a `MainMenuItemFactory` and requires `locKey`. `createMainMenuNewGameItem` also requires `label`. Optional `cbBefore` and `cbAfter` run around the click. Optional `isDisabled` and `isHided` are copied onto the item. `createMainMenuContinueItem` and `createMainMenuContinueWithLoadingItem` stay disabled when there is no continue save, even if `isDisabled` is `false`. `createMainMenuExitConfirmItem` also requires `locKeyConfirm`, `locKeyConfirmAccept`, and `locKeyConfirmDecline`. `createMainMenuContinueWithLoadingItem` opens the loading screen. `createMainMenuContinueItem` loads without it. The game script imports those functions from this package. `PARAMS.MAINMENU.ITEMS` is unchanged. `CLICK` skips an item when `isDisabled` or `isHided` is set.
8
+
7
9
  `BACKGROUNDS` rotation: `mainmenu.backgrounds` on `SHOW` loads the next background at once and on `BACKGROUNDS_INTERVAL` emits `UPDATE_STATE` with `{ bgSrc }` and then `UPDATE_FAST`.
8
10
 
9
11
  ## Events
@@ -25,7 +27,9 @@ Handler payloads and results are typed through module augmentation of the contra
25
27
 
26
28
  ## Constants
27
29
 
28
- None.
30
+ | Key | Type | Meaning |
31
+ | -------- | -------- | -------------------------------------------- |
32
+ | `SOURCE` | `string` | Loading screen source name (`mainMenu`). |
29
33
 
30
34
  ## Parameters
31
35