@datamoc/mw_games 0.11.0 → 0.13.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.
- package/CHANGELOG.md +84 -0
- package/dist/audio/Playable.d.ts +2 -0
- package/dist/audio/Playable.d.ts.map +1 -1
- package/dist/audio/Playable.js.map +1 -1
- package/dist/audio/Sound.d.ts +7 -1
- package/dist/audio/Sound.d.ts.map +1 -1
- package/dist/audio/Sound.js +8 -1
- package/dist/audio/Sound.js.map +1 -1
- package/dist/core/DialogueText.d.ts +47 -0
- package/dist/core/DialogueText.d.ts.map +1 -0
- package/dist/core/DialogueText.js +43 -0
- package/dist/core/DialogueText.js.map +1 -0
- package/dist/core/Twee.d.ts +67 -0
- package/dist/core/Twee.d.ts.map +1 -0
- package/dist/core/Twee.js +140 -0
- package/dist/core/Twee.js.map +1 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +2 -0
- package/dist/core/index.js.map +1 -1
- package/dist/mw_games.global.js +116 -115
- package/dist/rpg/EventRunner.d.ts +24 -0
- package/dist/rpg/EventRunner.d.ts.map +1 -1
- package/dist/rpg/EventRunner.js +56 -15
- package/dist/rpg/EventRunner.js.map +1 -1
- package/dist/rpg/GridMover.d.ts +6 -0
- package/dist/rpg/GridMover.d.ts.map +1 -1
- package/dist/rpg/GridMover.js +17 -0
- package/dist/rpg/GridMover.js.map +1 -1
- package/dist/rpg/MoveRoute.d.ts +87 -0
- package/dist/rpg/MoveRoute.d.ts.map +1 -0
- package/dist/rpg/MoveRoute.js +110 -0
- package/dist/rpg/MoveRoute.js.map +1 -0
- package/dist/rpg/dialogue-text.d.ts +81 -0
- package/dist/rpg/dialogue-text.d.ts.map +1 -0
- package/dist/rpg/dialogue-text.js +88 -0
- package/dist/rpg/dialogue-text.js.map +1 -0
- package/dist/rpg/index.d.ts +6 -1
- package/dist/rpg/index.d.ts.map +1 -1
- package/dist/rpg/index.js +3 -0
- package/dist/rpg/index.js.map +1 -1
- package/dist/rpg/twee-events.d.ts +48 -0
- package/dist/rpg/twee-events.d.ts.map +1 -0
- package/dist/rpg/twee-events.js +35 -0
- package/dist/rpg/twee-events.js.map +1 -0
- package/dist/two-d/stage/dialogue-text.d.ts +81 -0
- package/dist/two-d/stage/dialogue-text.d.ts.map +1 -0
- package/dist/two-d/stage/dialogue-text.js +95 -0
- package/dist/two-d/stage/dialogue-text.js.map +1 -0
- package/dist/two-d/stage/index.d.ts +1 -0
- package/dist/two-d/stage/index.d.ts.map +1 -1
- package/dist/two-d/stage/index.js +1 -0
- package/dist/two-d/stage/index.js.map +1 -1
- package/dist/two-d/stage/twee.d.ts +7 -25
- package/dist/two-d/stage/twee.d.ts.map +1 -1
- package/dist/two-d/stage/twee.js +10 -162
- package/dist/two-d/stage/twee.js.map +1 -1
- package/dist/two-d/ui/EventDialogue.d.ts.map +1 -1
- package/dist/two-d/ui/EventDialogue.js +7 -1
- package/dist/two-d/ui/EventDialogue.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,90 @@ the public API may still change between minor versions.
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.13.0] - 2026-09-15
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `core.parseDialogueLines`/`DialogueLine` and `core.parseTwee`/`TweeCommand`/`TweeChoice`/
|
|
15
|
+
`TweeStory` - the two-speaker `@id`/`-` dialogue-text state machine and the Twee-notation
|
|
16
|
+
passage/link parser, each shared by a `two-d/stage` and an `rpg` wrapper (`parseDialogueText`,
|
|
17
|
+
`importTwee`) rather than copied between them, the same precedent `core.parseCSV` already
|
|
18
|
+
set for a generic text-format parser other modules build a typed result around.
|
|
19
|
+
`TweeCommand`/`TweeChoice` are structurally compatible with both `StoryScript`/`StageChoice`
|
|
20
|
+
and `EventStoryScript`/`EventChoice`, so neither wrapper needs a per-field conversion.
|
|
21
|
+
- `two-d/stage.parseDialogueText`/`extractDialogueCatalog` and `rpg.parseDialogueText`/
|
|
22
|
+
`extractDialogueCatalog` - a terse line-based dialogue format, alongside `importTwee`, for
|
|
23
|
+
straight (non-branching) scenes: `@id text` names the speaker, an unprefixed line
|
|
24
|
+
narrates, and `- text` alternates between the first two speakers a scene establishes
|
|
25
|
+
(capped at two; a third distinct speaker is refused rather than guessed at). Each is a
|
|
26
|
+
thin wrapper around `core.parseDialogueLines` naming its own command shape (`StageCommand`'s
|
|
27
|
+
`as` versus `EventCommand`'s `speaker`), so a text-only RPG needs no Pixi dependency to use
|
|
28
|
+
it and a Pixi-based visual novel needs no `rpg` dependency either. Each module's
|
|
29
|
+
`extractDialogueCatalog` builds an identity `i18n` catalog from the result (`two-d/stage`'s
|
|
30
|
+
also reads a `StoryScript`), the same shape MWL's `extractCatalog` builds from
|
|
31
|
+
`_("...")`-marked strings, so a translator has real entries to start from (item 355).
|
|
32
|
+
- `rpg.EventRunner.runStory`/`EventStoryScript`/`EventCommand`'s new `goto` variant/
|
|
33
|
+
`EventChoice.goto` - a named-passage graph for map-event scripts, the `EventCommand`
|
|
34
|
+
counterpart to `StageScript.runStory`/`StoryScript`: a `goto` command or a choice's own
|
|
35
|
+
`goto` jumps to a different passage, and a plain `run()` refuses a stray `goto` instead of
|
|
36
|
+
silently ignoring it.
|
|
37
|
+
- `rpg.importTwee`/`EventTwineStory` - imports Twee-notation Twine stories into
|
|
38
|
+
`EventStoryScript`, a thin wrapper around `core.parseTwee` (the same engine
|
|
39
|
+
`two-d/stage.importTwee` wraps for `StageCommand`/`StoryScript` instead), so a text-only
|
|
40
|
+
RPG can import a branching Twee story with no `two-d`/Pixi dependency (item 356).
|
|
41
|
+
|
|
42
|
+
## [0.12.0] - 2026-09-14
|
|
43
|
+
|
|
44
|
+
### Added
|
|
45
|
+
|
|
46
|
+
- `rpg.EventRunner`'s `DialogueRequest` (and `EventCommand`'s `say`/`ask`) gained an optional
|
|
47
|
+
`portrait` field, threaded through to `two-d/ui.messageBoxPresenter` and `MessageBox`'s own
|
|
48
|
+
pre-existing `portrait` support - a portrait-bearing line no longer has to bypass `present`
|
|
49
|
+
and build its own `MessageBox` directly (item 352).
|
|
50
|
+
- `rpg.GridMover.jumpBy` - an instant reposition with no tween and no walk animation, for a
|
|
51
|
+
"jump" move-route step over terrain `moveBy`'s glide has no way to skip.
|
|
52
|
+
- `rpg.MoveRouteRunner`/`MoveRoute`/`MoveRouteStep`/`MoveRouteOptions` - drives any `GridMover`
|
|
53
|
+
through a scripted route (fixed/random/toward/away steps, turn, jump, wait) with `repeat` and
|
|
54
|
+
`skippable` policies, built entirely on `GridMover`'s existing primitives (item 353).
|
|
55
|
+
- `audio.Sound.play(gain, pitch)` - an optional pitch parameter as `HTMLAudioElement.
|
|
56
|
+
playbackRate`. No matching `pan`: a plain `<audio>` element has none to set, the same reason
|
|
57
|
+
`Positional.audioPan` only ever reported a number rather than owning a panner node (item 354).
|
|
58
|
+
|
|
59
|
+
### Fixed
|
|
60
|
+
|
|
61
|
+
- `mobile:build` (and everything built on it: `cap:sync`, `cap:add:android`, `desktop:build`,
|
|
62
|
+
`desktop:run`) now passes `--no-compress` to `emit-page.mjs`. Item 349/350's `.gz`/`.br`
|
|
63
|
+
sidecar files, written by default into every build since those items shipped, broke the
|
|
64
|
+
Android/Capacitor asset merge (`Duplicate resources` from AAPT, which treats `game.js` and
|
|
65
|
+
`game.js.gz` as colliding) the first time the full pipeline was actually built and run
|
|
66
|
+
end to end (item 351) - those sidecars were always dead weight for a packaged native app
|
|
67
|
+
with no server to negotiate `Content-Encoding` for, so this drops them at the source rather
|
|
68
|
+
than special-casing the generated `android/` project.
|
|
69
|
+
|
|
70
|
+
### Changed
|
|
71
|
+
|
|
72
|
+
- `android/` is no longer `.gitignore`d (item 110's original choice, kept since). The
|
|
73
|
+
Capacitor-scaffolded project's own generated `.gitignore` already excludes build output,
|
|
74
|
+
`local.properties`, and the copied web assets/config that `cap sync` regenerates every
|
|
75
|
+
build - the 53 files it leaves are ordinary scaffold source (manifest, Java, gradle files,
|
|
76
|
+
launcher/splash resources), the same kind of thing worth tracking as any other native
|
|
77
|
+
wrapper customization: this session's own `ignoreAssetsPattern` fix (above) would otherwise
|
|
78
|
+
have been silently lost the next time someone ran `cap add android` fresh.
|
|
79
|
+
- `webpage/assets/0c_framework_architecture.svg` regenerated - it had gone stale since the
|
|
80
|
+
`ai` and `mwl` modules were added to `src/`, so the "generated, never hand-drawn" diagram
|
|
81
|
+
was quietly wrong about the current module list until `npm run webpage:diagrams` was
|
|
82
|
+
actually re-run (item 351's Android/Windows verification pass turned this up while
|
|
83
|
+
double-checking related documentation).
|
|
84
|
+
- `webpage/design/architecture-explorer.html`, the interactive module-graph explorer, was
|
|
85
|
+
regenerated via the archify skill for the same reason: authored once at release 0.4.3, it
|
|
86
|
+
had never been updated and was missing `ai`/`mwl` entirely despite linking to itself as
|
|
87
|
+
"generated straight from src/'s own import graph". Rebuilt with real, verified import-graph
|
|
88
|
+
data for all 15 current modules and a fourth guided view ("mwl as data-authoring backbone").
|
|
89
|
+
- `desktop/README.md` documented only the older, unwired `desktop/webview2` host and never
|
|
90
|
+
mentioned `desktop/MwgDesktopHost` - the one `desktop:build`/`desktop:run` actually build -
|
|
91
|
+
or its `SetVirtualHostNameToFolderMapping` capability. Rewritten to cover both hosts and
|
|
92
|
+
which job each is for.
|
|
93
|
+
|
|
10
94
|
## [0.11.0] - 2026-09-14
|
|
11
95
|
|
|
12
96
|
### Added
|
package/dist/audio/Playable.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export interface Playable {
|
|
|
10
10
|
currentTime: number;
|
|
11
11
|
volume: number;
|
|
12
12
|
loop: boolean;
|
|
13
|
+
/** speed and pitch together, matching `HTMLAudioElement.playbackRate`; 1 is unchanged */
|
|
14
|
+
playbackRate?: number;
|
|
13
15
|
/** Optional completion hook, matching HTMLAudioElement.onended. Backends without an
|
|
14
16
|
* end event can omit it; single-track Music remains fully usable there. */
|
|
15
17
|
onended?: ((event: Event) => unknown) | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Playable.d.ts","sourceRoot":"","sources":["../../src/audio/Playable.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACxB,IAAI,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,KAAK,IAAI,IAAI,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;IACd;+EAC2E;IAC3E,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,GAAG,IAAI,CAAC;CAC7C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,CAElD"}
|
|
1
|
+
{"version":3,"file":"Playable.d.ts","sourceRoot":"","sources":["../../src/audio/Playable.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACxB,IAAI,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,KAAK,IAAI,IAAI,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;IACd,yFAAyF;IACzF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;+EAC2E;IAC3E,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,GAAG,IAAI,CAAC;CAC7C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,CAElD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Playable.js","sourceRoot":"","sources":["../../src/audio/Playable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"Playable.js","sourceRoot":"","sources":["../../src/audio/Playable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,oBAAoB,CAAC;AAqBhD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,WAAW,CAAC,IAAY;IACvC,OAAO,IAAI,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;AAC3C,CAAC"}
|
package/dist/audio/Sound.d.ts
CHANGED
|
@@ -33,8 +33,14 @@ export declare class Sound {
|
|
|
33
33
|
*
|
|
34
34
|
* @param gain multiplied into the sound's own volume, for a distance-attenuated one-shot
|
|
35
35
|
* (`Positional.SoundSource.playFor`); 1 leaves it at `volume`.
|
|
36
|
+
* @param pitch played back at this rate, matching `HTMLAudioElement.playbackRate` (1 is
|
|
37
|
+
* unchanged, above 1 higher and faster, below 1 lower and slower) - a footstep or a hit
|
|
38
|
+
* that always sounds identical reads as a loop faster than one with a little variance.
|
|
39
|
+
* There is no matching `pan` parameter: a plain `<audio>` element has no pan of its own to
|
|
40
|
+
* set, and `Positional.audioPan` already made the deliberate call to report a number rather
|
|
41
|
+
* than own a panner node a game does not necessarily want - the same reasoning applies here.
|
|
36
42
|
*/
|
|
37
|
-
play(gain?: number): void;
|
|
43
|
+
play(gain?: number, pitch?: number): void;
|
|
38
44
|
stopAll(): void;
|
|
39
45
|
}
|
|
40
46
|
//# sourceMappingURL=Sound.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sound.d.ts","sourceRoot":"","sources":["../../src/audio/Sound.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG3D,MAAM,WAAW,YAAY;IAC5B,4FAA4F;IAC5F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,8FAA8F;IAC9F,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,QAAQ,CAAC;IAEpC,2FAA2F;IAC3F,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,KAAK;IACjB,OAAO,CAAC,IAAI,CAAa;IACzB,OAAO,CAAC,IAAI,CAAK;IACjB,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,MAAM,EAAE,MAAM,CAAC;IAEf,YAAY,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,YAAiB,EAMnD;IAED
|
|
1
|
+
{"version":3,"file":"Sound.d.ts","sourceRoot":"","sources":["../../src/audio/Sound.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG3D,MAAM,WAAW,YAAY;IAC5B,4FAA4F;IAC5F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,8FAA8F;IAC9F,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,QAAQ,CAAC;IAEpC,2FAA2F;IAC3F,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,KAAK;IACjB,OAAO,CAAC,IAAI,CAAa;IACzB,OAAO,CAAC,IAAI,CAAK;IACjB,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,MAAM,EAAE,MAAM,CAAC;IAEf,YAAY,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,YAAiB,EAMnD;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,IAAI,SAAI,EAAE,KAAK,SAAI,GAAG,IAAI,CAa9B;IAED,OAAO,IAAI,IAAI,CAKd;CACD"}
|
package/dist/audio/Sound.js
CHANGED
|
@@ -28,11 +28,18 @@ export class Sound {
|
|
|
28
28
|
*
|
|
29
29
|
* @param gain multiplied into the sound's own volume, for a distance-attenuated one-shot
|
|
30
30
|
* (`Positional.SoundSource.playFor`); 1 leaves it at `volume`.
|
|
31
|
+
* @param pitch played back at this rate, matching `HTMLAudioElement.playbackRate` (1 is
|
|
32
|
+
* unchanged, above 1 higher and faster, below 1 lower and slower) - a footstep or a hit
|
|
33
|
+
* that always sounds identical reads as a loop faster than one with a little variance.
|
|
34
|
+
* There is no matching `pan` parameter: a plain `<audio>` element has no pan of its own to
|
|
35
|
+
* set, and `Positional.audioPan` already made the deliberate call to report a number rather
|
|
36
|
+
* than own a panner node a game does not necessarily want - the same reasoning applies here.
|
|
31
37
|
*/
|
|
32
|
-
play(gain = 1) {
|
|
38
|
+
play(gain = 1, pitch = 1) {
|
|
33
39
|
const audio = this.pool[this.next];
|
|
34
40
|
this.next = (this.next + 1) % this.pool.length;
|
|
35
41
|
audio.volume = this.volume * gain;
|
|
42
|
+
audio.playbackRate = pitch;
|
|
36
43
|
audio.currentTime = 0;
|
|
37
44
|
// play() can return a Promise that rejects if this reuse interrupts its own prior,
|
|
38
45
|
// still-loading play() (a real browser, not the fakes tests supply) - swallow it the
|
package/dist/audio/Sound.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sound.js","sourceRoot":"","sources":["../../src/audio/Sound.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAiB,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAc1C;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,KAAK;IAMjB,YAAY,IAAY,EAAE,OAAO,GAAiB,EAAE;QAJ5C,SAAI,GAAG,CAAC,CAAC;QAKhB,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC;QAChD,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,WAAW,CAAC;QAC7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CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;QAE/C,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QAClC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC;QAC3B,KAAK,CAAC,WAAW,GAAG,CAAC,CAAC;QACtB,mFAAmF;QACnF,qFAAqF;QACrF,wFAAwF;QACxF,KAAK,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QAEnD,IAAI,IAAI,CAAC,OAAO;YAAE,SAAS,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED,OAAO;QACN,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YAC/B,KAAK,CAAC,KAAK,EAAE,CAAC;YACd,KAAK,CAAC,WAAW,GAAG,CAAC,CAAC;QACvB,CAAC;IACF,CAAC;CACD"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The terse `@id`/`-` dialogue-text parsing engine behind both `two-d/stage.parseDialogueText`
|
|
3
|
+
* and `rpg.parseDialogueText` - the two-speaker alternation state machine lives here once,
|
|
4
|
+
* in `core` (already the home of `parseCSV`, another generic text-format parser that other
|
|
5
|
+
* modules build their own typed result around), so a rule change or a bug fix lands in one
|
|
6
|
+
* place instead of two silently-drifting copies. Each module's own wrapper only maps
|
|
7
|
+
* `DialogueLine` onto its own command shape - `StageCommand`'s `as` versus `EventCommand`'s
|
|
8
|
+
* `speaker` is the one real difference between them.
|
|
9
|
+
*
|
|
10
|
+
* Three kinds of line:
|
|
11
|
+
*
|
|
12
|
+
* - `@id text` names who is speaking and says `text`; `@id` alone (no text) just registers
|
|
13
|
+
* the speaker, without saying anything yet.
|
|
14
|
+
* - `- text` continues the two-speaker exchange the first two `@id` lines opened,
|
|
15
|
+
* alternating speaker on every line: the first `-` after the two openers goes to
|
|
16
|
+
* whichever of them did not speak last, and so on.
|
|
17
|
+
* - any other non-blank line narrates, with no speaker.
|
|
18
|
+
*
|
|
19
|
+
* ```
|
|
20
|
+
* @alice Hello.
|
|
21
|
+
* @bob Hi!
|
|
22
|
+
* - How are you?
|
|
23
|
+
* - Fine, and you?
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* The `-` shorthand is deliberately capped at two speakers: it exists for the two-character
|
|
27
|
+
* back-and-forth, not as a guess at which of three or more people talks next. A third
|
|
28
|
+
* distinct `@id` anywhere in the source is a parse error rather than a silent guess.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* import { parseDialogueLines, type DialogueLine } from '@datamoc/mw_games/core';
|
|
33
|
+
*
|
|
34
|
+
* const lines: DialogueLine[] = parseDialogueLines(`
|
|
35
|
+
* @alice Hello.
|
|
36
|
+
* @bob Hi!
|
|
37
|
+
* - How are you?
|
|
38
|
+
* `);
|
|
39
|
+
* console.log(lines); // [{ text: 'Hello.', speaker: 'alice' }, ...]
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export interface DialogueLine {
|
|
43
|
+
text: string;
|
|
44
|
+
speaker?: string;
|
|
45
|
+
}
|
|
46
|
+
export declare function parseDialogueLines(source: string): DialogueLine[];
|
|
47
|
+
//# sourceMappingURL=DialogueText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DialogueText.d.ts","sourceRoot":"","sources":["../../src/core/DialogueText.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,EAAE,CAiDjE"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export function parseDialogueLines(source) {
|
|
2
|
+
const lines = [];
|
|
3
|
+
const established = [];
|
|
4
|
+
let lastSpeaker;
|
|
5
|
+
const register = (id) => {
|
|
6
|
+
if (established.includes(id))
|
|
7
|
+
return;
|
|
8
|
+
if (established.length >= 2) {
|
|
9
|
+
throw new Error(`dialogue text supports at most two speakers for the "-" shorthand; found a third speaker ` +
|
|
10
|
+
`"${id}" after "${established[0]}" and "${established[1]}" were already established`);
|
|
11
|
+
}
|
|
12
|
+
established.push(id);
|
|
13
|
+
};
|
|
14
|
+
for (const rawLine of source.split('\n')) {
|
|
15
|
+
const line = rawLine.trim();
|
|
16
|
+
if (line === '')
|
|
17
|
+
continue;
|
|
18
|
+
const at = /^@(\S+)(?:\s+(.*))?$/.exec(line);
|
|
19
|
+
if (at) {
|
|
20
|
+
const [, id, text] = at;
|
|
21
|
+
register(id);
|
|
22
|
+
if (text) {
|
|
23
|
+
lines.push({ text: text.trim(), speaker: id });
|
|
24
|
+
lastSpeaker = id;
|
|
25
|
+
}
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
if (line.startsWith('-')) {
|
|
29
|
+
if (established.length < 2) {
|
|
30
|
+
throw new Error('a "-" line needs two established speakers first (write two "@id text" lines before it)');
|
|
31
|
+
}
|
|
32
|
+
const text = line.slice(1).trim();
|
|
33
|
+
const speaker = established.find((id) => id !== lastSpeaker) ?? established[0];
|
|
34
|
+
lines.push({ text, speaker });
|
|
35
|
+
lastSpeaker = speaker;
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
lines.push({ text: line });
|
|
39
|
+
lastSpeaker = undefined;
|
|
40
|
+
}
|
|
41
|
+
return lines;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=DialogueText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DialogueText.js","s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AW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC5B,MAAM,IAAI,KAAK,CACd,wFAAwF,CACxF,CAAC;YACH,CAAC;YACD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;YAClC,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,WAAW,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC;YAC/E,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;YAC9B,WAAW,GAAG,OAAO,CAAC;YACtB,SAAS;QACV,CAAC;QAED,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QAC3B,WAAW,GAAG,SAAS,CAAC;IACzB,CAAC;IAED,OAAO,KAAK,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Twee-notation parsing engine behind both `two-d/stage.importTwee` and
|
|
3
|
+
* `rpg.importTwee` - the passage/link parsing lives here once, in `core` (already the home
|
|
4
|
+
* of `parseCSV`, another generic text-format parser other modules build their own typed
|
|
5
|
+
* result around), so a bug fix or a format extension lands in one place instead of two
|
|
6
|
+
* silently-drifting copies. `TweeCommand`/`TweeChoice` are structurally compatible with both
|
|
7
|
+
* `two-d/stage`'s `StoryScript`/`StageChoice` and `rpg`'s `EventStoryScript`/`EventChoice` -
|
|
8
|
+
* each module's own `importTwee` wrapper only names its own return type, with no per-field
|
|
9
|
+
* conversion needed.
|
|
10
|
+
*
|
|
11
|
+
* Only structure is imported: each passage's text lines become `say` commands and its
|
|
12
|
+
* `[[links]]` become one closing `ask` whose choices jump (`[[text]]`, `[[text->target]]`
|
|
13
|
+
* and `[[target<-text]]`) - the last text line doubles as the question, since a choice box
|
|
14
|
+
* needs a prompt and repeating it works. No story-format macro language (Harlowe, SugarCube,
|
|
15
|
+
* Chapbook) is interpreted - body text reaches the game untouched, and a link carrying a
|
|
16
|
+
* setter throws instead of silently dropping the behaviour the setter described.
|
|
17
|
+
*
|
|
18
|
+
* ```twee
|
|
19
|
+
* :: Start
|
|
20
|
+
* You stand at a crossroads.
|
|
21
|
+
*
|
|
22
|
+
* [[Take the left path->Left]]
|
|
23
|
+
* [[Take the right path->Right]]
|
|
24
|
+
*
|
|
25
|
+
* :: Left
|
|
26
|
+
* The path ends at a wall.
|
|
27
|
+
* [[Go back->Start]]
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* import { parseTwee, type TweeStory } from '@datamoc/mw_games/core';
|
|
33
|
+
*
|
|
34
|
+
* const story: TweeStory = parseTwee(`:: Start
|
|
35
|
+
* Pick a door.
|
|
36
|
+
*
|
|
37
|
+
* [[Left->A]]
|
|
38
|
+
* [[Right->B]]
|
|
39
|
+
*
|
|
40
|
+
* :: A
|
|
41
|
+
* Treasure.
|
|
42
|
+
*
|
|
43
|
+
* :: B
|
|
44
|
+
* Nothing.
|
|
45
|
+
* `);
|
|
46
|
+
* console.log(story.start); // 'Start'
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export interface TweeChoice {
|
|
50
|
+
text: string;
|
|
51
|
+
goto?: string;
|
|
52
|
+
}
|
|
53
|
+
export type TweeCommand = {
|
|
54
|
+
say: string;
|
|
55
|
+
} | {
|
|
56
|
+
ask: string;
|
|
57
|
+
choices: TweeChoice[];
|
|
58
|
+
};
|
|
59
|
+
export interface TweeStory {
|
|
60
|
+
story: Record<string, TweeCommand[]>;
|
|
61
|
+
/** `StoryData`'s start passage when the file names one, else the first passage */
|
|
62
|
+
start: string;
|
|
63
|
+
/** the `StoryTitle` passage, when the file has one */
|
|
64
|
+
title?: string;
|
|
65
|
+
}
|
|
66
|
+
export declare function parseTwee(source: string): TweeStory;
|
|
67
|
+
//# sourceMappingURL=Twee.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Twee.d.ts","sourceRoot":"","sources":["../../src/core/Twee.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,MAAM,WAAW,UAAU;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,WAAW,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,UAAU,EAAE,CAAA;CAAE,CAAC;AAEnF,MAAM,WAAW,SAAS;IACzB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;IACrC,kFAAkF;IAClF,KAAK,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CA0CnD"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
export function parseTwee(source) {
|
|
2
|
+
const passages = splitPassages(source);
|
|
3
|
+
if (passages.length === 0)
|
|
4
|
+
throw new Error('this twee source has no passages - passages start with ":: Name"');
|
|
5
|
+
const story = {};
|
|
6
|
+
let title;
|
|
7
|
+
let start;
|
|
8
|
+
for (const passage of passages) {
|
|
9
|
+
if (passage.name === 'StoryTitle') {
|
|
10
|
+
title = passage.body.trim() || undefined;
|
|
11
|
+
continue;
|
|
12
|
+
}
|
|
13
|
+
if (passage.name === 'StoryData') {
|
|
14
|
+
start = readStart(passage.body);
|
|
15
|
+
continue;
|
|
16
|
+
}
|
|
17
|
+
if (Object.prototype.hasOwnProperty.call(story, passage.name)) {
|
|
18
|
+
throw new Error(`this twee source defines "${passage.name}" twice`);
|
|
19
|
+
}
|
|
20
|
+
story[passage.name] = passageCommands(passage.name, passage.body);
|
|
21
|
+
}
|
|
22
|
+
const names = Object.keys(story);
|
|
23
|
+
if (names.length === 0)
|
|
24
|
+
throw new Error('this twee source has no story passages, only StoryTitle/StoryData');
|
|
25
|
+
if (start !== undefined && !Object.prototype.hasOwnProperty.call(story, start)) {
|
|
26
|
+
throw new Error(`StoryData starts at "${start}", which is not a passage in this file`);
|
|
27
|
+
}
|
|
28
|
+
for (const [name, commands] of Object.entries(story)) {
|
|
29
|
+
for (const command of commands) {
|
|
30
|
+
if ('ask' in command) {
|
|
31
|
+
for (const choice of command.choices) {
|
|
32
|
+
if (choice.goto !== undefined && !Object.prototype.hasOwnProperty.call(story, choice.goto)) {
|
|
33
|
+
throw new Error(`passage "${name}" links to "${choice.goto}", which is not a passage in this file`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return { story, start: start ?? names[0], title };
|
|
40
|
+
}
|
|
41
|
+
/** cuts the source at every line starting with `::`, parsing headers into names */
|
|
42
|
+
function splitPassages(source) {
|
|
43
|
+
const out = [];
|
|
44
|
+
let name = null;
|
|
45
|
+
let body = [];
|
|
46
|
+
const flush = () => {
|
|
47
|
+
if (name !== null)
|
|
48
|
+
out.push({ name, body: body.join('\n') });
|
|
49
|
+
};
|
|
50
|
+
for (const line of source.split('\n')) {
|
|
51
|
+
if (line.startsWith('::')) {
|
|
52
|
+
flush();
|
|
53
|
+
name = parseHeader(line);
|
|
54
|
+
body = [];
|
|
55
|
+
}
|
|
56
|
+
else if (name !== null) {
|
|
57
|
+
body.push(line);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
flush();
|
|
61
|
+
return out;
|
|
62
|
+
}
|
|
63
|
+
/** `:: Name [tags] {"meta": true}` - only the name survives; tags and position are editor concerns */
|
|
64
|
+
function parseHeader(line) {
|
|
65
|
+
const rest = line.slice(2).trim();
|
|
66
|
+
const tagAt = rest.search(/[[{]/);
|
|
67
|
+
const name = (tagAt === -1 ? rest : rest.slice(0, tagAt)).trim();
|
|
68
|
+
if (!name)
|
|
69
|
+
throw new Error(`a twee passage header needs a name, got "${line}"`);
|
|
70
|
+
return name;
|
|
71
|
+
}
|
|
72
|
+
/** StoryData is JSON; only `start` matters to the runner, the rest is player furniture */
|
|
73
|
+
function readStart(body) {
|
|
74
|
+
let data;
|
|
75
|
+
try {
|
|
76
|
+
data = JSON.parse(body.trim());
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
79
|
+
throw new Error('StoryData must be JSON - check the braces');
|
|
80
|
+
}
|
|
81
|
+
if (typeof data !== 'object' || data === null || Array.isArray(data)) {
|
|
82
|
+
throw new Error('StoryData must be a JSON object');
|
|
83
|
+
}
|
|
84
|
+
const start = data.start;
|
|
85
|
+
if (start !== undefined && typeof start !== 'string') {
|
|
86
|
+
throw new Error('StoryData "start" must be a passage name');
|
|
87
|
+
}
|
|
88
|
+
return start;
|
|
89
|
+
}
|
|
90
|
+
/** text lines speak in order; the last one doubles as the prompt when links follow it */
|
|
91
|
+
function passageCommands(passage, body) {
|
|
92
|
+
const lines = [];
|
|
93
|
+
const choices = [];
|
|
94
|
+
for (const line of body.split('\n')) {
|
|
95
|
+
const text = extractLinks(line, choices, passage).replace(/\s+/g, ' ').trim();
|
|
96
|
+
if (text !== '')
|
|
97
|
+
lines.push(text);
|
|
98
|
+
}
|
|
99
|
+
if (choices.length === 0)
|
|
100
|
+
return lines.map((say) => ({ say }));
|
|
101
|
+
const prompt = lines.pop() ?? '';
|
|
102
|
+
return [...lines.map((say) => ({ say })), { ask: prompt, choices }];
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Pulls `[[links]]` out of a line, leaving the surrounding text behind.
|
|
106
|
+
* Returns the line with the links removed.
|
|
107
|
+
*/
|
|
108
|
+
function extractLinks(line, choices, passage) {
|
|
109
|
+
let out = '';
|
|
110
|
+
let rest = line;
|
|
111
|
+
for (;;) {
|
|
112
|
+
const open = rest.indexOf('[[');
|
|
113
|
+
if (open === -1)
|
|
114
|
+
return out + rest;
|
|
115
|
+
const close = rest.indexOf(']]', open);
|
|
116
|
+
if (close === -1) {
|
|
117
|
+
throw new Error(`passage "${passage}" has a "[[" with no closing "]]" in "${line.trim()}"`);
|
|
118
|
+
}
|
|
119
|
+
out += rest.slice(0, open);
|
|
120
|
+
choices.push(parseLink(rest.slice(open + 2, close), passage));
|
|
121
|
+
rest = rest.slice(close + 2);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
function parseLink(inner, passage) {
|
|
125
|
+
if (inner.includes('[') || inner.includes(']')) {
|
|
126
|
+
throw new Error(`passage "${passage}" links with a setter ("${inner.trim()}") - ` +
|
|
127
|
+
'story-format macros are not imported, so the link is refused rather than half-read');
|
|
128
|
+
}
|
|
129
|
+
const forward = inner.indexOf('->');
|
|
130
|
+
if (forward !== -1) {
|
|
131
|
+
return { text: inner.slice(0, forward).trim(), goto: inner.slice(forward + 2).trim() };
|
|
132
|
+
}
|
|
133
|
+
const backward = inner.indexOf('<-');
|
|
134
|
+
if (backward !== -1) {
|
|
135
|
+
return { text: inner.slice(backward + 2).trim(), goto: inner.slice(0, backward).trim() };
|
|
136
|
+
}
|
|
137
|
+
const target = inner.trim();
|
|
138
|
+
return { text: target, goto: target };
|
|
139
|
+
}
|
|
140
|
+
//# sourceMappingURL=Twee.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Twee.js","sourceRoot":"","sources":["../../src/core/Twee.ts"],"names":[],"mappings":"AA+DA,MAAM,UAAU,SAAS,CAAC,MAAc;IACvC,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IACvC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,kEAAkE,CAAC,CAAC;IAE/G,MAAM,KAAK,GAAkC,EAAE,CAAC;IAChD,IAAI,KAAyB,CAAC;IAC9B,IAAI,KAAyB,CA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E,CAAC;IAC1F,CAAC;IACD,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AACvC,CAAC"}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -72,5 +72,9 @@ export type { PresentationQueueOptions } from './Presentation.ts';
|
|
|
72
72
|
export { SyncGuard, stateChecksum } from './SyncGuard.ts';
|
|
73
73
|
export { parseCSV } from './Csv.ts';
|
|
74
74
|
export type { CsvOptions, CsvColumnType } from './Csv.ts';
|
|
75
|
+
export { parseDialogueLines } from './DialogueText.ts';
|
|
76
|
+
export type { DialogueLine } from './DialogueText.ts';
|
|
77
|
+
export { parseTwee } from './Twee.ts';
|
|
78
|
+
export type { TweeCommand, TweeChoice, TweeStory } from './Twee.ts';
|
|
75
79
|
export { clamp } from './Math.ts';
|
|
76
80
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAA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38
|
export { PresentationQueue } from './Presentation.js';
|
|
39
39
|
export { SyncGuard, stateChecksum } from './SyncGuard.js';
|
|
40
40
|
export { parseCSV } from './Csv.js';
|
|
41
|
+
export { parseDialogueLines } from './DialogueText.js';
|
|
42
|
+
export { parseTwee } from './Twee.js';
|
|
41
43
|
export { clamp } from './Math.js';
|
|
42
44
|
//# sourceMappingURL=index.js.map
|
package/dist/core/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG1C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAExE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAQ3D,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAG/C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,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