@rydr/game-sdk 3.10.0 → 3.11.0

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 (39) hide show
  1. package/dist/conversations/index.d.ts +15 -4
  2. package/dist/conversations/index.d.ts.map +1 -1
  3. package/dist/conversations/index.js +43 -14
  4. package/dist/conversations/index.js.map +1 -1
  5. package/dist/conversations/voice-samples.d.ts +45 -0
  6. package/dist/conversations/voice-samples.d.ts.map +1 -0
  7. package/dist/conversations/voice-samples.js +63 -0
  8. package/dist/conversations/voice-samples.js.map +1 -0
  9. package/dist/conversations/voices.d.ts +33 -5
  10. package/dist/conversations/voices.d.ts.map +1 -1
  11. package/dist/conversations/voices.js +59 -31
  12. package/dist/conversations/voices.js.map +1 -1
  13. package/dist/protocol/conversations.d.ts +2 -2
  14. package/dist/protocol/conversations.d.ts.map +1 -1
  15. package/dist/protocol/version.d.ts +1 -1
  16. package/dist/protocol/version.js +1 -1
  17. package/dist/ui/README.md +2 -0
  18. package/dist/ui/index.d.ts +2 -0
  19. package/dist/ui/index.d.ts.map +1 -1
  20. package/dist/ui/index.js +2 -0
  21. package/dist/ui/index.js.map +1 -1
  22. package/dist/ui/power-race.d.ts +125 -0
  23. package/dist/ui/power-race.d.ts.map +1 -0
  24. package/dist/ui/power-race.js +726 -0
  25. package/dist/ui/power-race.js.map +1 -0
  26. package/dist/ui/showcase/index.d.ts.map +1 -1
  27. package/dist/ui/showcase/index.js +45 -1
  28. package/dist/ui/showcase/index.js.map +1 -1
  29. package/dist/ui/styles.js +13 -0
  30. package/dist/ui/styles.js.map +1 -1
  31. package/dist/ui/subtitle.d.ts +27 -0
  32. package/dist/ui/subtitle.d.ts.map +1 -0
  33. package/dist/ui/subtitle.js +77 -0
  34. package/dist/ui/subtitle.js.map +1 -0
  35. package/dist/voice-gallery/index.d.ts +31 -0
  36. package/dist/voice-gallery/index.d.ts.map +1 -0
  37. package/dist/voice-gallery/index.js +276 -0
  38. package/dist/voice-gallery/index.js.map +1 -0
  39. package/package.json +5 -1
@@ -29,8 +29,8 @@ export interface VoiceCastEntry {
29
29
  /** Default speaking-rate multiplier (see {@link DEFAULT_VOICEOVER_SPEED}). */
30
30
  speed?: number;
31
31
  }
32
- /** Voice-over language. French-only for now; kept as a field so more can be added without a reshape. */
33
- export type VoiceoverLang = "fr";
32
+ /** Voice-over language. French is the default; English is used by the voice-sample gallery. */
33
+ export type VoiceoverLang = "fr" | "en";
34
34
  /**
35
35
  * One spoken line. Authored fields: `id`/`characterId`/`text`/`style`/`lang`. Generated fields
36
36
  * (`voice`/`audioHash`/`audioUrl`/`generatedAt`) are written by the voice-over editor after synthesis;
@@ -1 +1 @@
1
- {"version":3,"file":"conversations.d.ts","sourceRoot":"","sources":["../../src/protocol/conversations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,sEAAsE;AACtE,eAAO,MAAM,wBAAwB,kBAAkB,CAAC;AAExD;;8FAE8F;AAC9F,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAElD;oFACoF;AACpF,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C;6FAC6F;AAC7F,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qFAAqF;IACrF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wGAAwG;AACxG,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC;AAEjC;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B;0FACsF;IACtF,EAAE,EAAE,MAAM,CAAC;IACX,2FAA2F;IAC3F,WAAW,EAAE,MAAM,CAAC;IACpB,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,mGAAmG;IACnG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;mGAC+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IACnC,sFAAsF;IACtF,OAAO,EAAE,MAAM,CAAC;IAChB;6EACyE;IACzE,IAAI,EAAE,MAAM,CAAC;IACb,wGAAwG;IACxG,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,8GAA8G;IAC9G,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iHAAiH;IACjH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,0EAA0E;AAC1E,wBAAgB,QAAQ,CAAC,SAAS,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAE3F;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAE7F"}
@@ -9,5 +9,5 @@
9
9
  export declare const RYDR_PROTOCOL_VERSION: 14;
10
10
  /** Semver of this SDK build. Sent in the handshake for telemetry/debugging.
11
11
  * (Bumped to 2.0.0 by `npm version major` on release — see CHANGELOG [Unreleased].) */
12
- export declare const RYDR_SDK_VERSION = "3.10.0";
12
+ export declare const RYDR_SDK_VERSION = "3.11.0";
13
13
  //# sourceMappingURL=version.d.ts.map
@@ -43,5 +43,5 @@
43
43
  export const RYDR_PROTOCOL_VERSION = 14;
44
44
  /** Semver of this SDK build. Sent in the handshake for telemetry/debugging.
45
45
  * (Bumped to 2.0.0 by `npm version major` on release — see CHANGELOG [Unreleased].) */
46
- export const RYDR_SDK_VERSION = "3.10.0";
46
+ export const RYDR_SDK_VERSION = "3.11.0";
47
47
  //# sourceMappingURL=version.js.map
package/dist/ui/README.md CHANGED
@@ -44,8 +44,10 @@ feed its `{x, y, onScreen}` into `setScreenPos`/`setVisible` — don't compute p
44
44
  | `mountActionDiamond(host, opts)` | fn | The full 4-button A/B/Y/Z diamond with per-button labels/actions. |
45
45
  | `mountLabeledDiamond(host, opts)` | fn | A diamond floating over a point with labels around it (the "actions on offer" affordance). |
46
46
  | `mountDialogueCard(host, opts)` | fn | An NPC dialogue box: speaker name, typed-out line, advance cue (A). |
47
+ | `mountSubtitle(host, opts)` | fn | A boxless, self-dismissing caption (the voice-over "auto" look): big centred line + speaker name, no frame. `anchor`/`offset` place it; `showName` toggles the name. |
47
48
  | `mountChoiceCard(host, opts)` | fn | A player choice menu: prompt + highlighted option list (▲▼ move, A confirm). |
48
49
  | `mountRarityCard(host, opts)` / `buildRarityCard(opts)` | fn | A generic rarity-tinted item/creature card. |
50
+ | `createPowerRace(opts)` | fn | A timed **power-vs-deadline race** overlay — the "push NOW or lose it" beat. A charge bar (∫power dt) races a clock; first to 100% wins. `start()` then `setPower(w)`+`tick(dt)` per frame; `won`/`lost` via `onResolve`. Recolour with `theme`, relabel with `text`. |
49
51
  | `injectCss()` | fn | Force the `.rydr-ui-*` CSS into `<head>` early (components call it for you). |
50
52
 
51
53
  Types: `ButtonLetter` (`"A"\|"B"\|"Y"\|"Z"`), `DirButton`, `KeycapVariant` (`"full"\|"solo"`),
@@ -26,7 +26,9 @@ export * from "./card.js";
26
26
  export * from "./action-card.js";
27
27
  export * from "./action-diamond.js";
28
28
  export * from "./dialogue-card.js";
29
+ export * from "./subtitle.js";
29
30
  export * from "./choice-card.js";
30
31
  export * from "./labeled-diamond.js";
31
32
  export * from "./rarity-card.js";
33
+ export * from "./power-race.js";
32
34
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
package/dist/ui/index.js CHANGED
@@ -26,7 +26,9 @@ export * from "./card.js";
26
26
  export * from "./action-card.js";
27
27
  export * from "./action-diamond.js";
28
28
  export * from "./dialogue-card.js";
29
+ export * from "./subtitle.js";
29
30
  export * from "./choice-card.js";
30
31
  export * from "./labeled-diamond.js";
31
32
  export * from "./rarity-card.js";
33
+ export * from "./power-race.js";
32
34
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,125 @@
1
+ /**
2
+ * `createPowerRace` — a timed power-race HUD: two bars race each other.
3
+ *
4
+ * · deadline bar — fills at a constant rate over `durationS` (the clock closing in).
5
+ * · charge bar — fills from accumulated effort (∫ power dt) toward
6
+ * `requiredJoules = targetFtpPct × ftp × durationS`.
7
+ *
8
+ * If the charge bar reaches 100% before the deadline bar does, the rider **wins**; otherwise the
9
+ * clock **wins** (the rider loses). Pacing is free — only total work matters. This is the canonical
10
+ * "push NOW or lose it" beat: a surge you must out-pedal before a timer runs out. It began as
11
+ * Tower-Defense's nuke-intercept mini-game and VIVAX's Vivapierre charge; both are the same widget.
12
+ *
13
+ * Pass `mode: "charge"` for the **no-rival** variant — a solo "charge this up" with no deadline bar and
14
+ * no clock that can beat you (it only resolves `won`, on fill). Same visuals, calmer framing.
15
+ *
16
+ * Self-contained DOM/CSS (no three.js), like the rest of `@rydr/game-sdk/ui`: it injects its own
17
+ * scoped `.rpr-*` stylesheet once into `<head>`. It takes **power values**, not a `session` — the
18
+ * game owns its loop and feeds watts in. FTP-relative by construction (`ftp` sets the bar to clear),
19
+ * so a 150 W and a 350 W rider face the same challenge — never hard-code a raw-watt threshold.
20
+ *
21
+ * ── Sizing contract (same as the rest of the kit) ──────────────────────────────────────────────
22
+ * Tuned for a trainer screen viewed from a few feet away while pedaling. Don't restyle the `.rpr-*`
23
+ * type sizes / dimensions or wrap it in `transform: scale()`. Recolour it with the `theme` option and
24
+ * relabel it with `text` — those are the customization surface; the layout is fixed.
25
+ * ────────────────────────────────────────────────────────────────────────────────────────────────
26
+ *
27
+ * Driving it: `start()`, then pump `setPower(w)` + `tick(dt)` every frame. The HUD self-resolves to
28
+ * `won` / `lost` when either bar crosses 100%; poll `getPhase()` or pass `onResolve`. Drive external
29
+ * VFX (a glow, a light) off `getProgress().charge`.
30
+ */
31
+ /** Layout of the two bars. All three drive the same class hooks. */
32
+ export type PowerRaceVariant = "twin-stacked" | "twin-towers" | "single-track";
33
+ /** Where the live precision % sits (or `null` to hide it). */
34
+ export type PowerRaceScoreVariant = "tip" | "impact" | "above" | "infill";
35
+ /** The internal phase machine; `won`/`lost` are the resolved outcomes. */
36
+ export type PowerRacePhase = "idle" | "priming-warning" | "priming-prompt" | "priming-bars" | "racing" | "won" | "lost";
37
+ /** The two terminal outcomes. */
38
+ export type PowerRaceOutcome = "won" | "lost";
39
+ /** Total intro duration in seconds. */
40
+ export declare const INTRO_TOTAL_S: number;
41
+ /**
42
+ * The six palette colours, driven into the component as CSS custom properties. Each bar is a
43
+ * `deep → bright` gradient; the win state recolours the charge bar green. The default is the original
44
+ * "alert" skin (red clock, cyan effort, green win); pass a `theme` (any subset) to recolour.
45
+ */
46
+ export interface PowerRaceTheme {
47
+ /** Deadline (clock) bar bright end + all its labels/glows. */
48
+ deadline: string;
49
+ /** Deadline bar gradient dark end. */
50
+ deadlineDeep: string;
51
+ /** Charge (effort) bar bright end + its label/glow. */
52
+ charge: string;
53
+ /** Charge bar gradient dark end. */
54
+ chargeDeep: string;
55
+ /** Win state bright end (the charge bar on a win + the "won" stamp). */
56
+ win: string;
57
+ /** Win state gradient dark end. */
58
+ winDeep: string;
59
+ }
60
+ /** The built-in "alert" skin — the proven Tower-Defense look. Default when no `theme` is passed. */
61
+ export declare const DEFAULT_POWER_RACE_THEME: Required<PowerRaceTheme>;
62
+ /** Every user-facing string. Defaults reproduce the original alert copy; override per game. */
63
+ export interface PowerRaceText {
64
+ heading?: string;
65
+ prompt?: string;
66
+ deadlineLabel?: string;
67
+ chargeLabel?: string;
68
+ win?: string;
69
+ lose?: string;
70
+ }
71
+ export interface PowerRaceOpts {
72
+ /** Rider FTP — sets the effort target (`requiredJoules`). Always FTP-relative; never a raw threshold. */
73
+ ftp?: number;
74
+ /** How long the deadline bar takes to fill (seconds). Default 5. */
75
+ durationS?: number;
76
+ /** Effort target as a fraction of FTP: `requiredJoules = targetFtpPct × ftp × durationS`. Default 1.1. */
77
+ targetFtpPct?: number;
78
+ /**
79
+ * `"race"` (default) — a rival **deadline** bar races you; you lose if it fills first (the "push NOW
80
+ * or lose it" beat). `"charge"` — **no rival**: you just fill the charge bar (a solo "charge this
81
+ * up"). In charge mode the deadline bar is hidden, the alarm framing is calmed (no red klaxon
82
+ * strobe), and the widget only ever resolves `won` on its own (charge → 100%). There's no built-in
83
+ * clock, so a rider can charge at their own pace; a game that wants a *failure* (e.g. the rider was
84
+ * downed, or a scene timeout) drives it with `showResolution("lost")`. `durationS` still sets how
85
+ * much work fills the bar (`requiredJoules`); it just isn't a losing clock. Relabel the alarm copy
86
+ * for a charge with `text` (e.g. `heading: "CHARGING"`, `prompt: "PUSH TO CHARGE"`).
87
+ */
88
+ mode?: "race" | "charge";
89
+ /** Bar layout. Default `twin-stacked`. */
90
+ variant?: PowerRaceVariant;
91
+ /** Live precision-% placement, or `null`/omitted to hide it. */
92
+ scoreVariant?: PowerRaceScoreVariant | null;
93
+ /** All user-facing strings (any subset). */
94
+ text?: PowerRaceText;
95
+ /** Palette override (any subset). Defaults to {@link DEFAULT_POWER_RACE_THEME}. */
96
+ theme?: Partial<PowerRaceTheme>;
97
+ /** Called once when the race resolves. Same signal as polling `getPhase()`. */
98
+ onResolve?: (outcome: PowerRaceOutcome) => void;
99
+ }
100
+ export interface PowerRaceHud {
101
+ /** The overlay root — append it to your HUD layer. */
102
+ element: HTMLElement;
103
+ /** Begin the priming intro, then the race. */
104
+ start(): void;
105
+ /** Feed the current power (watts) each frame. */
106
+ setPower(w: number): void;
107
+ /** Current phase; `won`/`lost` once resolved. */
108
+ getPhase(): PowerRacePhase;
109
+ /** Live bar fills 0..1 — drive external VFX (e.g. a glow) off `charge`. */
110
+ getProgress(): {
111
+ deadline: number;
112
+ charge: number;
113
+ };
114
+ /** Advance one frame; returns the (possibly new) phase. Self-resolves + fires `onResolve`. */
115
+ tick(dt: number): PowerRacePhase;
116
+ /** Force a resolution (e.g. an externally decided outcome), optionally auto-hiding after `durationS`. */
117
+ showResolution(outcome: PowerRaceOutcome, opts?: {
118
+ durationS?: number;
119
+ }): void;
120
+ /** Back to idle (hidden, bars cleared) for reuse. */
121
+ reset(): void;
122
+ dispose(): void;
123
+ }
124
+ export declare function createPowerRace(opts?: PowerRaceOpts): PowerRaceHud;
125
+ //# sourceMappingURL=power-race.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"power-race.d.ts","sourceRoot":"","sources":["../../src/ui/power-race.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAIH,oEAAoE;AACpE,MAAM,MAAM,gBAAgB,GAAG,cAAc,GAAG,aAAa,GAAG,cAAc,CAAC;AAC/E,8DAA8D;AAC9D,MAAM,MAAM,qBAAqB,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;AAC1E,0EAA0E;AAC1E,MAAM,MAAM,cAAc,GACtB,MAAM,GACN,iBAAiB,GACjB,gBAAgB,GAChB,cAAc,GACd,QAAQ,GACR,KAAK,GACL,MAAM,CAAC;AACX,iCAAiC;AACjC,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,MAAM,CAAC;AAkB9C,uCAAuC;AACvC,eAAO,MAAM,aAAa,QAAwD,CAAC;AAEnF;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,uDAAuD;IACvD,MAAM,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,GAAG,EAAE,MAAM,CAAC;IACZ,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,oGAAoG;AACpG,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,cAAc,CAO7D,CAAC;AAEF,+FAA+F;AAC/F,MAAM,WAAW,aAAa;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