@futdevpro/fsm-dynamo 1.20.102 → 1.20.104

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.
Files changed (26) hide show
  1. package/build/_modules/game/_models/guided-onboarding.control-model.d.ts +81 -0
  2. package/build/_modules/game/_models/guided-onboarding.control-model.d.ts.map +1 -0
  3. package/build/_modules/game/_models/guided-onboarding.control-model.js +491 -0
  4. package/build/_modules/game/_models/guided-onboarding.control-model.js.map +1 -0
  5. package/build/_modules/game/_models/guided-onboarding.interface.d.ts +102 -0
  6. package/build/_modules/game/_models/guided-onboarding.interface.d.ts.map +1 -0
  7. package/build/_modules/game/_models/guided-onboarding.interface.js +3 -0
  8. package/build/_modules/game/_models/guided-onboarding.interface.js.map +1 -0
  9. package/build/_modules/game/_models/narration-player.control-model.d.ts +53 -0
  10. package/build/_modules/game/_models/narration-player.control-model.d.ts.map +1 -0
  11. package/build/_modules/game/_models/narration-player.control-model.js +223 -0
  12. package/build/_modules/game/_models/narration-player.control-model.js.map +1 -0
  13. package/build/_modules/game/_models/narration-player.interface.d.ts +64 -0
  14. package/build/_modules/game/_models/narration-player.interface.d.ts.map +1 -0
  15. package/build/_modules/game/_models/narration-player.interface.js +3 -0
  16. package/build/_modules/game/_models/narration-player.interface.js.map +1 -0
  17. package/build/_modules/game/index.d.ts +4 -0
  18. package/build/_modules/game/index.d.ts.map +1 -1
  19. package/build/_modules/game/index.js +4 -0
  20. package/build/_modules/game/index.js.map +1 -1
  21. package/build-esm/_modules/game/_models/guided-onboarding.control-model.js +486 -0
  22. package/build-esm/_modules/game/_models/guided-onboarding.interface.js +1 -0
  23. package/build-esm/_modules/game/_models/narration-player.control-model.js +218 -0
  24. package/build-esm/_modules/game/_models/narration-player.interface.js +1 -0
  25. package/build-esm/_modules/game/index.js +4 -0
  26. package/package.json +1 -1
@@ -0,0 +1,102 @@
1
+ /**
2
+ * BFR-WARFACTORY-014 — a DECLARATIVE reference to a game-supplied command or predicate. It is plain data (a name and
3
+ * one JSON argument), so a catalog can cross a package boundary — a closure over the game's services cannot.
4
+ */
5
+ export interface DyFM_OnboardingRef {
6
+ name: string;
7
+ args?: unknown;
8
+ }
9
+ /** One onboarding step. `stepId` is stable and unique across the WHOLE catalog (saves point at it, not at an index). */
10
+ export interface DyFM_OnboardingStep_Definition {
11
+ stepId: string;
12
+ /** Run once when the step is entered (e.g. open a panel, pre-select a building). */
13
+ command?: DyFM_OnboardingRef;
14
+ /** The step is done when this predicate holds. Without it the step is MANUAL — the player acknowledges it (`next`). */
15
+ completion?: DyFM_OnboardingRef;
16
+ /** Must keep holding while the step is active; when it breaks, the runtime regresses to a `fallbackStepIds` step. */
17
+ stateValidator?: DyFM_OnboardingRef;
18
+ /** Recovery steps in priority order; the first one whose own `stateValidator` holds is entered. */
19
+ fallbackStepIds?: string[];
20
+ /** Bounded recovery: after this long without completion the step is recorded as timed out and left. */
21
+ timeoutMs?: number;
22
+ /** Highlight target for the UI layer (the runtime never touches the DOM); alternates are tried in order. */
23
+ highlight?: {
24
+ targetId: string;
25
+ alternateTargetIds?: string[];
26
+ anchorId?: string;
27
+ };
28
+ /** Opaque, content-side data (text key, narration asset id, world position …) — carried, never interpreted. */
29
+ payload?: unknown;
30
+ }
31
+ export interface DyFM_OnboardingChapter_Definition {
32
+ chapterId: string;
33
+ steps: DyFM_OnboardingStep_Definition[];
34
+ payload?: unknown;
35
+ }
36
+ export interface DyFM_OnboardingCatalog {
37
+ /** Bump it when steps change — a save made with another version is migrated on import. */
38
+ catalogVersion: string | number;
39
+ chapters: DyFM_OnboardingChapter_Definition[];
40
+ /** Removed / renamed step id → its replacement (chains are followed; cycles are a catalog error). */
41
+ migrations?: Record<string, string>;
42
+ }
43
+ /** The game's capability surface the declarative refs resolve against. */
44
+ export interface DyFM_OnboardingCapabilities<TContext> {
45
+ commands?: Record<string, (context: TContext, args: unknown) => void | Promise<void>>;
46
+ predicates?: Record<string, (context: TContext, args: unknown) => boolean>;
47
+ }
48
+ /** Lifecycle of an onboarding run. */
49
+ export type DyFM_OnboardingStatus_Type = 'not-started' | 'active' | 'completed' | 'skipped';
50
+ /** The serialisable progress — `dyfm-onboarding/1`. */
51
+ export interface DyFM_OnboardingState {
52
+ schema: 'dyfm-onboarding/1';
53
+ catalogVersion: string | number;
54
+ status: DyFM_OnboardingStatus_Type;
55
+ /** The active step (only while `active`). */
56
+ stepId?: string;
57
+ completedStepIds: string[];
58
+ skippedStepIds: string[];
59
+ }
60
+ /** What `importState` did to fit an older save onto the current catalog. */
61
+ export interface DyFM_OnboardingMigrationReport {
62
+ migrated: boolean;
63
+ /** Old id → new id, for every id a migration rule rewrote. */
64
+ renamed: Record<string, string>;
65
+ /** Ids that no longer exist and had no migration rule (dropped from the progress). */
66
+ dropped: string[];
67
+ /** The active step could not be kept: where the player continues instead. */
68
+ resumedAt?: string;
69
+ }
70
+ /** What one `evaluate()` did. */
71
+ export type DyFM_OnboardingEvaluation_Type = 'inactive' | 'waiting' | 'advanced' | 'regressed' | 'timed-out';
72
+ export interface DyFM_OnboardingEvent {
73
+ type: 'step-entered' | 'step-completed' | 'step-skipped' | 'step-timed-out' | 'regressed' | 'chapter-completed' | 'completed' | 'skipped' | 'restarted' | 'command-failed';
74
+ stepId?: string;
75
+ chapterId?: string;
76
+ /** `regressed`: the step that lost its state. */
77
+ fromStepId?: string;
78
+ /** `step-entered` after `importState` + `resume`. */
79
+ resumed?: boolean;
80
+ /** `command-failed`. */
81
+ error?: unknown;
82
+ }
83
+ /** Where the player is — everything a UI needs to render "Chapter 2 · step 3 of 5". */
84
+ export interface DyFM_OnboardingPosition {
85
+ chapterId: string;
86
+ chapterIndex: number;
87
+ chapterCount: number;
88
+ step: DyFM_OnboardingStep_Definition;
89
+ stepIndexInChapter: number;
90
+ chapterStepCount: number;
91
+ /** Completed + skipped steps over all steps of the catalog. */
92
+ doneCount: number;
93
+ totalCount: number;
94
+ /** True when the step has no completion predicate — the UI shows a "Next" button. */
95
+ manual: boolean;
96
+ }
97
+ export interface DyFM_OnboardingFinding {
98
+ code: string;
99
+ path: string;
100
+ message: string;
101
+ }
102
+ //# sourceMappingURL=guided-onboarding.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guided-onboarding.interface.d.ts","sourceRoot":"","sources":["../../../../src/_modules/game/_models/guided-onboarding.interface.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,wHAAwH;AACxH,MAAM,WAAW,8BAA8B;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,oFAAoF;IACpF,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,uHAAuH;IACvH,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC,qHAAqH;IACrH,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC,mGAAmG;IACnG,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,uGAAuG;IACvG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4GAA4G;IAC5G,SAAS,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACnF,+GAA+G;IAC/G,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,iCAAiC;IAChD,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,8BAA8B,EAAE,CAAC;IACxC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,sBAAsB;IACrC,0FAA0F;IAC1F,cAAc,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,QAAQ,EAAE,iCAAiC,EAAE,CAAC;IAC9C,qGAAqG;IACrG,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,C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G,SAAS,GAAG,WAAW,GAAG,gBAAgB,CAAC;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wBAAwB;IACxB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,uFAAuF;AACvF,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,8BAA8B,CAAC;IACrC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,+DAA+D;IAC/D,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,qFAAqF;IACrF,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=guided-onboarding.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guided-onboarding.interface.js","sourceRoot":"","sources":["../../../../src/_modules/game/_models/guided-onboarding.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,53 @@
1
+ import { DyFM_NarrationLine, DyFM_NarrationPlayer_Options, DyFM_NarrationState } from './narration-player.interface';
2
+ /**
3
+ * BFR-WARFACTORY-014 — the narration adapter canon (war-factory `Tutorial_Narration_Service` + portalhold voice lines):
4
+ *
5
+ * - **asset-id core**, catalog as an optional layer (`playLine` / `playCatalog`);
6
+ * - `Promise<boolean>` — a refusal is REPORTED, with its reason in `lastRefusal` (disabled · muted · no-gesture ·
7
+ * autoplay-blocked · error · unknown-line) — a narration that silently does not play is undiagnosable;
8
+ * - optional **gesture gate with exposed state** (`sessionActivated`);
9
+ * - **exactly one active line** — every play stops the previous one;
10
+ * - a **staleness guard** (revision counter): a late `ended` / `error` / `play()` rejection of a replaced line never
11
+ * touches the current one;
12
+ * - **`blocked` ≠ `failed`**: a `NotAllowedError` (browser autoplay block) is the case the player must be told about;
13
+ * - `replay()`; optional settings persistence; the subtitle stays available while blocked / failed (text fallback).
14
+ *
15
+ * Framework-agnostic: the audio comes from a factory (`(src) => new Audio(src)` in a browser); a UI layer mirrors
16
+ * `getState()` via `onChange`.
17
+ */
18
+ export declare class DyFM_NarrationPlayer_ControlModel {
19
+ private readonly options;
20
+ private readonly listeners;
21
+ private audio;
22
+ private revision;
23
+ private lastLine;
24
+ private state;
25
+ constructor(options: DyFM_NarrationPlayer_Options);
26
+ /** A copy of the current state. */
27
+ getState(): DyFM_NarrationState;
28
+ /** Subscribe to state changes; returns the unsubscribe. A throwing listener is logged and isolated. */
29
+ onChange(listener: (state: DyFM_NarrationState) => void): () => void;
30
+ /** Marks a user gesture — from now on automatic narration may play. */
31
+ activate(): void;
32
+ /** Plays a line (automatic path: respects the gesture gate). */
33
+ playLine(line: DyFM_NarrationLine): Promise<boolean>;
34
+ /** Plays a catalog entry; an unknown key refuses with `unknown-line`. */
35
+ playCatalog(key: string): Promise<boolean>;
36
+ /** From a user gesture: activates the session, then plays. */
37
+ activateAndPlay(line: DyFM_NarrationLine): Promise<boolean>;
38
+ /** Replays the last requested line (a replay button is a gesture). */
39
+ replay(): Promise<boolean>;
40
+ /** Stops the active line (or clears a blocked / failed one). */
41
+ stop(): void;
42
+ setEnabled(enabled: boolean): void;
43
+ setVolume(volume: number): void;
44
+ /** Re-applies the effective volume (call it when the game's master volume / mute changes); 0 stops the line. */
45
+ applyVolume(): void;
46
+ private play;
47
+ private detach;
48
+ private effectiveVolume;
49
+ private set;
50
+ private loadSettings;
51
+ private saveSettings;
52
+ }
53
+ //# sourceMappingURL=narration-player.control-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"narration-player.control-model.d.ts","sourceRoot":"","sources":["../../../../src/_modules/game/_models/narration-player.control-model.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,kBAAkB,EAClB,4BAA4B,EAE5B,mBAAmB,EACpB,MAAM,8BAA8B,CAAC;AAEtC;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,iCAAiC;IAC5C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA+B;IACvD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAgD;IAC1E,OAAO,CAAC,KAAK,CAA8C;IAC3D,OAAO,CAAC,QAAQ,CAAa;IAC7B,OAAO,CAAC,QAAQ,CAAmC;IACnD,OAAO,CAAC,KAAK,CAGX;gBAEU,OAAO,EAAE,4BAA4B;IAKjD,mCAAmC;IACnC,QAAQ,IAAI,mBAAmB;IAI/B,uGAAuG;IACvG,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,GAAG,MAAM,IAAI;IAYpE,uEAAuE;IACvE,QAAQ,IAAI,IAAI;IAMhB,gEAAgE;IAC1D,QAAQ,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC;IAI1D,yEAAyE;IACnE,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAYhD,8DAA8D;IACxD,eAAe,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC;IAMjE,sEAAsE;IAChE,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC;IAShC,gEAAgE;IAChE,IAAI,IAAI,IAAI;IAMZ,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAQlC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAM/B,gHAAgH;IAChH,WAAW,IAAI,IAAI;YAWL,IAAI;IA4DlB,OAAO,CAAC,MAAM;IAgBd,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,GAAG;IAcX,OAAO,CAAC,YAAY;IAsBpB,OAAO,CAAC,YAAY;CAYrB"}
@@ -0,0 +1,223 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DyFM_NarrationPlayer_ControlModel = void 0;
4
+ const log_util_1 = require("../../../_collections/utils/log.util");
5
+ /**
6
+ * BFR-WARFACTORY-014 — the narration adapter canon (war-factory `Tutorial_Narration_Service` + portalhold voice lines):
7
+ *
8
+ * - **asset-id core**, catalog as an optional layer (`playLine` / `playCatalog`);
9
+ * - `Promise<boolean>` — a refusal is REPORTED, with its reason in `lastRefusal` (disabled · muted · no-gesture ·
10
+ * autoplay-blocked · error · unknown-line) — a narration that silently does not play is undiagnosable;
11
+ * - optional **gesture gate with exposed state** (`sessionActivated`);
12
+ * - **exactly one active line** — every play stops the previous one;
13
+ * - a **staleness guard** (revision counter): a late `ended` / `error` / `play()` rejection of a replaced line never
14
+ * touches the current one;
15
+ * - **`blocked` ≠ `failed`**: a `NotAllowedError` (browser autoplay block) is the case the player must be told about;
16
+ * - `replay()`; optional settings persistence; the subtitle stays available while blocked / failed (text fallback).
17
+ *
18
+ * Framework-agnostic: the audio comes from a factory (`(src) => new Audio(src)` in a browser); a UI layer mirrors
19
+ * `getState()` via `onChange`.
20
+ */
21
+ class DyFM_NarrationPlayer_ControlModel {
22
+ options;
23
+ listeners = [];
24
+ audio = null;
25
+ revision = 0;
26
+ lastLine = null;
27
+ state = {
28
+ playback: 'idle', activeLineId: null, subtitle: null, enabled: true, volume: 0.85, sessionActivated: false,
29
+ lastRefusal: null,
30
+ };
31
+ constructor(options) {
32
+ this.options = options;
33
+ this.loadSettings();
34
+ }
35
+ /** A copy of the current state. */
36
+ getState() {
37
+ return { ...this.state };
38
+ }
39
+ /** Subscribe to state changes; returns the unsubscribe. A throwing listener is logged and isolated. */
40
+ onChange(listener) {
41
+ this.listeners.push(listener);
42
+ return () => {
43
+ const index = this.listeners.indexOf(listener);
44
+ if (index >= 0) {
45
+ this.listeners.splice(index, 1);
46
+ }
47
+ };
48
+ }
49
+ /** Marks a user gesture — from now on automatic narration may play. */
50
+ activate() {
51
+ if (!this.state.sessionActivated) {
52
+ this.set({ sessionActivated: true });
53
+ }
54
+ }
55
+ /** Plays a line (automatic path: respects the gesture gate). */
56
+ async playLine(line) {
57
+ return this.play(line);
58
+ }
59
+ /** Plays a catalog entry; an unknown key refuses with `unknown-line`. */
60
+ async playCatalog(key) {
61
+ const line = this.options.catalog?.[key];
62
+ if (!line) {
63
+ this.set({ lastRefusal: 'unknown-line' });
64
+ return false;
65
+ }
66
+ return this.play(line);
67
+ }
68
+ /** From a user gesture: activates the session, then plays. */
69
+ async activateAndPlay(line) {
70
+ this.activate();
71
+ return this.play(line);
72
+ }
73
+ /** Replays the last requested line (a replay button is a gesture). */
74
+ async replay() {
75
+ if (!this.lastLine) {
76
+ return false;
77
+ }
78
+ this.activate();
79
+ return this.play(this.lastLine);
80
+ }
81
+ /** Stops the active line (or clears a blocked / failed one). */
82
+ stop() {
83
+ this.revision++;
84
+ this.detach();
85
+ this.set({ playback: 'idle', activeLineId: null, subtitle: null });
86
+ }
87
+ setEnabled(enabled) {
88
+ this.set({ enabled: enabled });
89
+ this.saveSettings();
90
+ if (!enabled && this.audio) {
91
+ this.stop();
92
+ }
93
+ }
94
+ setVolume(volume) {
95
+ this.set({ volume: Math.min(1, Math.max(0, Number.isFinite(volume) ? volume : 0)) });
96
+ this.saveSettings();
97
+ this.applyVolume();
98
+ }
99
+ /** Re-applies the effective volume (call it when the game's master volume / mute changes); 0 stops the line. */
100
+ applyVolume() {
101
+ const effective = this.effectiveVolume();
102
+ if (this.audio) {
103
+ this.audio.volume = effective;
104
+ if (effective <= 0) {
105
+ this.stop();
106
+ }
107
+ }
108
+ }
109
+ async play(line) {
110
+ this.lastLine = line;
111
+ const refusal = !this.state.enabled
112
+ ? 'disabled'
113
+ : this.effectiveVolume() <= 0
114
+ ? 'muted'
115
+ : this.options.requireGesture && !this.state.sessionActivated ? 'no-gesture' : null;
116
+ if (refusal) {
117
+ this.set({ lastRefusal: refusal });
118
+ return false;
119
+ }
120
+ // exactly one active line: the previous one is stopped and its late callbacks become stale
121
+ const revision = ++this.revision;
122
+ this.detach();
123
+ let audio;
124
+ try {
125
+ audio = this.options.audioFactory(line.src);
126
+ audio.volume = this.effectiveVolume();
127
+ audio.onended = () => {
128
+ if (revision === this.revision) {
129
+ this.audio = null;
130
+ this.set({ playback: 'idle', activeLineId: null, subtitle: null });
131
+ }
132
+ };
133
+ audio.onerror = () => {
134
+ if (revision === this.revision) {
135
+ this.audio = null;
136
+ this.set({ playback: 'failed', lastRefusal: 'error' });
137
+ }
138
+ };
139
+ this.audio = audio;
140
+ this.set({ activeLineId: line.lineId, subtitle: line.subtitle ?? null, lastRefusal: null });
141
+ await audio.play();
142
+ }
143
+ catch (error) {
144
+ if (revision !== this.revision) {
145
+ return false; // a newer line replaced this one while play() was pending
146
+ }
147
+ this.audio = null;
148
+ const blocked = error?.name === 'NotAllowedError';
149
+ this.set({ playback: blocked ? 'blocked' : 'failed', lastRefusal: blocked ? 'autoplay-blocked' : 'error' });
150
+ return false;
151
+ }
152
+ if (revision !== this.revision) {
153
+ return false;
154
+ }
155
+ this.set({ playback: 'playing' });
156
+ return true;
157
+ }
158
+ detach() {
159
+ if (this.audio) {
160
+ const audio = this.audio;
161
+ this.audio = null;
162
+ audio.onended = null;
163
+ audio.onerror = null;
164
+ try {
165
+ audio.pause();
166
+ audio.currentTime = 0;
167
+ }
168
+ catch (error) {
169
+ log_util_1.DyFM_Log.error('DyFM_NarrationPlayer: stopping the previous line failed', error);
170
+ }
171
+ }
172
+ }
173
+ effectiveVolume() {
174
+ const master = this.options.masterVolume ? this.options.masterVolume() : 1;
175
+ return Math.min(1, Math.max(0, this.state.volume * (Number.isFinite(master) ? master : 0)));
176
+ }
177
+ set(patch) {
178
+ this.state = { ...this.state, ...patch };
179
+ const snapshot = this.getState();
180
+ for (const listener of [...this.listeners]) {
181
+ try {
182
+ listener(snapshot);
183
+ }
184
+ catch (error) {
185
+ log_util_1.DyFM_Log.error('DyFM_NarrationPlayer: an onChange listener threw', error);
186
+ }
187
+ }
188
+ }
189
+ loadSettings() {
190
+ const settings = this.options.settings;
191
+ if (!settings) {
192
+ return;
193
+ }
194
+ try {
195
+ const stored = settings.store.getItem(settings.key);
196
+ const parsed = stored ? JSON.parse(stored) : {};
197
+ if (typeof parsed.enabled === 'boolean') {
198
+ this.state.enabled = parsed.enabled;
199
+ }
200
+ if (typeof parsed.volume === 'number' && Number.isFinite(parsed.volume)) {
201
+ this.state.volume = Math.min(1, Math.max(0, parsed.volume));
202
+ }
203
+ }
204
+ catch (error) {
205
+ // a broken stored value falls back to the defaults (the session still works)
206
+ log_util_1.DyFM_Log.error(`DyFM_NarrationPlayer: unreadable settings under '${settings.key}' — defaults used`, error);
207
+ }
208
+ }
209
+ saveSettings() {
210
+ const settings = this.options.settings;
211
+ if (!settings) {
212
+ return;
213
+ }
214
+ try {
215
+ settings.store.setItem(settings.key, JSON.stringify({ enabled: this.state.enabled, volume: this.state.volume }));
216
+ }
217
+ catch (error) {
218
+ log_util_1.DyFM_Log.error(`DyFM_NarrationPlayer: settings could not be saved under '${settings.key}'`, error);
219
+ }
220
+ }
221
+ }
222
+ exports.DyFM_NarrationPlayer_ControlModel = DyFM_NarrationPlayer_ControlModel;
223
+ //# sourceMappingURL=narration-player.control-model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"narration-player.control-model.js","sourceRoot":"","sources":["../../../../src/_modules/game/_models/narration-player.control-model.ts"],"names":[],"mappings":";;;AAAA,mEAAgE;AAShE;;;;;;;;;;;;;;;GAeG;AACH,MAAa,iCAAiC;IAC3B,OAAO,CAA+B;IACtC,SAAS,GAA6C,EAAE,CAAC;IAClE,KAAK,GAAyC,IAAI,CAAC;IACnD,QAAQ,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AC,CAAC,CAAC;YAC9D,CAAC;QACH,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,6EAA6E;YAC7E,mBAAQ,CAAC,KAAK,CAAC,oDAAoD,QAAQ,CAAC,GAAG,mBAAmB,EAAE,KAAK,CAAC,CAAC;QAC7G,CAAC;IACH,CAAC;IAEO,YAAY;QAClB,MAAM,QAAQ,GAA6C,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;QAEjF,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,OAAO;QACT,CAAC;QACD,IAAI,CAAC;YACH,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QACnH,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,mBAAQ,CAAC,KAAK,CAAC,4DAA4D,QAAQ,CAAC,GAAG,GAAG,EAAE,KAAK,CAAC,CAAC;QACrG,CAAC;IACH,CAAC;CACF;AA/OD,8EA+OC"}
@@ -0,0 +1,64 @@
1
+ /** BFR-WARFACTORY-014 — one narration line: the asset is the core address, the subtitle the always-available fallback. */
2
+ export interface DyFM_NarrationLine {
3
+ /** Stable id (a catalog key or an asset id). */
4
+ lineId: string;
5
+ /** The audio source (URL / path) — resolved by the audio factory. */
6
+ src: string;
7
+ /** Shown while it plays AND when it cannot play (blocked / failed): the text is never lost. */
8
+ subtitle?: string;
9
+ }
10
+ /**
11
+ * The audio element surface the player uses — structural, so an `HTMLAudioElement` fits it and specs can use a fake.
12
+ * `play()` rejects with a `NotAllowedError`-named error when the browser blocks autoplay.
13
+ */
14
+ export interface DyFM_NarrationAudio_Interface {
15
+ volume: number;
16
+ currentTime: number;
17
+ onended: (() => void) | null;
18
+ onerror: (() => void) | null;
19
+ play(): Promise<void>;
20
+ pause(): void;
21
+ }
22
+ /** A persisted-settings store (e.g. `localStorage`); optional. */
23
+ export interface DyFM_NarrationSettingsStore_Interface {
24
+ getItem(key: string): string | null;
25
+ setItem(key: string, value: string): void;
26
+ }
27
+ export interface DyFM_NarrationPlayer_Options {
28
+ /** Creates the audio for a source — in a browser: `(src) => new Audio(src)`. */
29
+ audioFactory: (src: string) => DyFM_NarrationAudio_Interface;
30
+ /**
31
+ * When true, `play()` only plays after `activate()` (a user gesture) — automatic narration then refuses with
32
+ * `no-gesture` instead of hitting the browser's autoplay block. `activateAndPlay()` / `replay()` count as a gesture.
33
+ */
34
+ requireGesture?: boolean;
35
+ /** The game's master volume 0..1 (and mute as 0) — multiplied into the narration volume. Default: 1. */
36
+ masterVolume?: () => number;
37
+ /** Optional catalog: `playCatalog(key)` resolves through it (an asset-id layer on top of the core). */
38
+ catalog?: Record<string, DyFM_NarrationLine>;
39
+ /** Optional settings persistence (enabled + volume). */
40
+ settings?: {
41
+ store: DyFM_NarrationSettingsStore_Interface;
42
+ key: string;
43
+ };
44
+ }
45
+ export type DyFM_NarrationPlayback_Type = 'idle' | 'playing' | 'blocked' | 'failed';
46
+ /**
47
+ * Why the last `play` did not play — the diagnosis a silent narration otherwise lacks.
48
+ * `autoplay-blocked` is the one the UI must tell the player about ("click to enable sound").
49
+ */
50
+ export type DyFM_NarrationRefusal_Type = 'disabled' | 'muted' | 'no-gesture' | 'autoplay-blocked' | 'error' | 'unknown-line';
51
+ /** Everything a UI needs (the five WF signals + the subtitle + the refusal reason). */
52
+ export interface DyFM_NarrationState {
53
+ playback: DyFM_NarrationPlayback_Type;
54
+ /** The line playing, or the one that could not play (blocked / failed) — null when idle. */
55
+ activeLineId: string | null;
56
+ /** The active line's subtitle (also while blocked / failed — the text fallback). */
57
+ subtitle: string | null;
58
+ enabled: boolean;
59
+ /** The narration's own volume 0..1 (before the master volume). */
60
+ volume: number;
61
+ sessionActivated: boolean;
62
+ lastRefusal: DyFM_NarrationRefusal_Type | null;
63
+ }
64
+ //# sourceMappingURL=narration-player.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"narration-player.interface.d.ts","sourceRoot":"","sources":["../../../../src/_modules/game/_models/narration-player.interface.ts"],"names":[],"mappings":"AAAA,0HAA0H;AAC1H,MAAM,WAAW,kBAAkB;IACjC,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,GAAG,EAAE,MAAM,CAAC;IACZ,+FAA+F;IAC/F,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC;IAC7B,OAAO,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC;IAC7B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACtB,KAAK,IAAI,IAAI,CAAC;CACf;AAED,kEAAkE;AAClE,MAAM,WAAW,qCAAqC;IACpD,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACpC,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3C;AAED,MAAM,WAAW,4BAA4B;IAC3C,gFAAgF;IAChF,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,6BAA6B,CAAC;IAC7D;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wGAAwG;IACxG,YAAY,CAAC,EAAE,MAAM,MAAM,CAAC;IAC5B,uGAAuG;IACvG,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IAC7C,wDAAwD;IACxD,QAAQ,CAAC,EAAE;QAAE,KAAK,EAAE,qCAAqC,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;CAC1E;AAED,MAAM,MAAM,2BAA2B,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEpF;;;GAGG;AACH,MAAM,MAAM,0BAA0B,GAAG,UAAU,GAAG,OAAO,GAAG,YAAY,GAAG,kBAAkB,GAAG,OAAO,GAAG,cAAc,CAAC;AAE7H,uFAAuF;AACvF,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,2BAA2B,CAAC;IACtC,4FAA4F;IAC5F,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,oFAAoF;IACpF,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,kEAAkE;IAClE,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,OAAO,CAAC;IAC1B,WAAW,EAAE,0BAA0B,GAAG,IAAI,CAAC;CAChD"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=narration-player.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"narration-player.interface.js","sourceRoot":"","sources":["../../../../src/_modules/game/_models/narration-player.interface.ts"],"names":[],"mappings":""}
@@ -20,6 +20,10 @@ export * from './_models/viewport.interface';
20
20
  export * from './_models/viewport.control-model';
21
21
  export * from './_models/input-action.interface';
22
22
  export * from './_models/input-action-registry.control-model';
23
+ export * from './_models/guided-onboarding.interface';
24
+ export * from './_models/guided-onboarding.control-model';
25
+ export * from './_models/narration-player.interface';
26
+ export * from './_models/narration-player.control-model';
23
27
  export * from './_collections/audio-mixer.util';
24
28
  export * from './_collections/audio-scale.util';
25
29
  export * from './_collections/game-save.util';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/_modules/game/index.ts"],"names":[],"mappings":"AACA,cAAc,6BAA6B,CAAC;AAG5C,cAAc,wCAAwC,CAAC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C7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,uCAAuC,CAAC;AACtD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,sCAAsC,CAAC;AACrD,cAAc,0CAA0C,CAAC;AAGzD,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC"}
@@ -25,6 +25,10 @@ tslib_1.__exportStar(require("./_models/viewport.interface"), exports);
25
25
  tslib_1.__exportStar(require("./_models/viewport.control-model"), exports);
26
26
  tslib_1.__exportStar(require("./_models/input-action.interface"), exports);
27
27
  tslib_1.__exportStar(require("./_models/input-action-registry.control-model"), exports);
28
+ tslib_1.__exportStar(require("./_models/guided-onboarding.interface"), exports);
29
+ tslib_1.__exportStar(require("./_models/guided-onboarding.control-model"), exports);
30
+ tslib_1.__exportStar(require("./_models/narration-player.interface"), exports);
31
+ tslib_1.__exportStar(require("./_models/narration-player.control-model"), exports);
28
32
  // COLLECTIONS
29
33
  tslib_1.__exportStar(require("./_collections/audio-mixer.util"), exports);
30
34
  tslib_1.__exportStar(require("./_collections/audio-scale.util"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/_modules/game/index.ts"],"names":[],"mappings":";;;AAAA,QAAQ;AACR,sEAA4C;AAE5C,SAAS;AACT,iFAAuD;AACvD,mFAAyD;AACzD,gFAAsD;AACtD,8EAAoD;AACpD,0EAAgD;AAChD,kFAAwD;AACxD,gFAAsD;AACtD,qFAA2D;AAC3D,yFAA+D;AAC/D,4EAAkD;AAClD,gFAAsD;AACtD,+EAAqD;AACrD,mFAAyD;AACzD,wEAA8C;AAC9C,mFAAyD;AACzD,uFAA6D;AAC7D,gFAAsD;AACtD,uEAA6C;AAC7C,2EAAiD;AACjD,2EAAiD;AACjD,wFAA8D;AAE9D,cAAc;AACd,0EAAgD;AAChD,0EAAgD;AAChD,wEAA8C;AAC9C,gFAAsD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/_modules/game/index.ts"],"names":[],"mappings":";;;AAAA,QAAQ;AACR,sEAA4C;AAE5C,SAAS;AACT,iFAAuD;AACvD,mFAAyD;AACzD,gFAAsD;AACtD,8EAAoD;AACpD,0EAAgD;AAChD,kFAAwD;AACxD,gFAAsD;AACtD,qFAA2D;AAC3D,yFAA+D;AAC/D,4EAAkD;AAClD,gFAAsD;AACtD,+EAAqD;AACrD,mFAAyD;AACzD,wEAA8C;AAC9C,mFAAyD;AACzD,uFAA6D;AAC7D,gFAAsD;AACtD,uEAA6C;AAC7C,2EAAiD;AACjD,2EAAiD;AACjD,wFAA8D;AAC9D,gFAAsD;AACtD,oFAA0D;AAC1D,+EAAqD;AACrD,mFAAyD;AAEzD,cAAc;AACd,0EAAgD;AAChD,0EAAgD;AAChD,wEAA8C;AAC9C,gFAAsD"}