@vnejs/docs 0.2.78 → 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.
@@ -10,6 +10,7 @@
10
10
  | ---------------------------------------- | --------------------------------------------------------------------------------------------------- |
11
11
  | **`@vnejs/shared.views.screens.gamemenu`** | Функции пунктов игрового меню. Каждая возвращает `GameMenuItemFactory`. `locKey` обязателен. Необязательные `cbBefore` и `cbAfter` вызываются вокруг клика. |
12
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` равен этому значению. |
13
14
 
14
15
  ```mermaid
15
16
  flowchart TD
@@ -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,7 @@
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)
5
6
  - [0.2.78](./0.2.78.md)
6
7
  - [0.2.77](./0.2.77.md)
7
8
  - [0.2.76](./0.2.76.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vnejs/docs",
3
- "version": "0.2.78",
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`.