@patterkit/model 0.8.0 → 0.9.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/README.md +35 -0
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# @patterkit/model
|
|
2
|
+
|
|
3
|
+
The TypeScript types that describe Patter's data: the shape every other `@patterkit` package agrees on.
|
|
4
|
+
Types only, with no behaviour.
|
|
5
|
+
|
|
6
|
+
Most people won't need to install this directly. To play Patter dialogue in a game or web page, use
|
|
7
|
+
[`@patterkit/runtime`](https://www.npmjs.com/package/@patterkit/runtime); to work with Patter projects from
|
|
8
|
+
a terminal or a build script, use [`@patterkit/cli`](https://www.npmjs.com/package/@patterkit/cli).
|
|
9
|
+
|
|
10
|
+
## What's in it
|
|
11
|
+
|
|
12
|
+
- **The source format**: scenes and their flow tree (blocks, groups, snippets, beats, and jumps), the
|
|
13
|
+
project file, locale files, and the authoring file that holds comments, suggestions, and writing status.
|
|
14
|
+
- **The compiled bundle**: the `.patterc` a game loads, as written by the compiler and read by every runtime.
|
|
15
|
+
- **Shared helpers for addressing**: the game-facing ids (`gameIdify`, `isValidGameId`, `effectiveGameId`).
|
|
16
|
+
|
|
17
|
+
Conditions and effects are kept as source strings here; the expression language itself is
|
|
18
|
+
[`@wildwinter/expr`](https://www.npmjs.com/package/@wildwinter/expr). The format is described in
|
|
19
|
+
[the specification](https://patterkit.dev/specification/).
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
npm install @patterkit/model
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Part of Patter
|
|
26
|
+
|
|
27
|
+
[Patter](https://patterkit.dev/) is a branching dialogue format with its own editor (Patterpad), command line
|
|
28
|
+
tool (`patter`), and runtimes for JavaScript, Unity, Unreal, and Godot. This package is one layer of the
|
|
29
|
+
JavaScript tooling, and the other `@patterkit` packages build on it. [How it fits
|
|
30
|
+
together](https://patterkit.dev/architecture/) shows where each piece sits, and the source is in the
|
|
31
|
+
[patter repository](https://github.com/patterkit/patter).
|
|
32
|
+
|
|
33
|
+
## Licence
|
|
34
|
+
|
|
35
|
+
MIT
|
package/dist/index.d.cts
CHANGED
|
@@ -1017,6 +1017,12 @@ interface FlowCursor {
|
|
|
1017
1017
|
/** The chosen option owning a prompt still to be replayed (a save taken between choose + advance).
|
|
1018
1018
|
* Optional / null in older saves -> no pending prompt. */
|
|
1019
1019
|
pendingPromptOwnerId?: string | null;
|
|
1020
|
+
/** The prompt still to be replayed, exactly as the choice SHOWED it (text and speaker fields, the same
|
|
1021
|
+
* shape as a saved option's `prompt`), so the replay after a load says what the player saw. Written only
|
|
1022
|
+
* alongside a `pendingPromptOwnerId` (the choose -> advance window, with `replayPromptOnChoose`), and
|
|
1023
|
+
* absent otherwise. A save without it (written before Patterplay 0.18.0) resolves the owner's prompt beat
|
|
1024
|
+
* when it is delivered, as before. */
|
|
1025
|
+
pendingPrompt?: SavedChoicePrompt;
|
|
1020
1026
|
/** This flow's (non-shared) selector cursors, keyed by group id. */
|
|
1021
1027
|
selectors: Record<string, SelectorSnapshot>;
|
|
1022
1028
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1017,6 +1017,12 @@ interface FlowCursor {
|
|
|
1017
1017
|
/** The chosen option owning a prompt still to be replayed (a save taken between choose + advance).
|
|
1018
1018
|
* Optional / null in older saves -> no pending prompt. */
|
|
1019
1019
|
pendingPromptOwnerId?: string | null;
|
|
1020
|
+
/** The prompt still to be replayed, exactly as the choice SHOWED it (text and speaker fields, the same
|
|
1021
|
+
* shape as a saved option's `prompt`), so the replay after a load says what the player saw. Written only
|
|
1022
|
+
* alongside a `pendingPromptOwnerId` (the choose -> advance window, with `replayPromptOnChoose`), and
|
|
1023
|
+
* absent otherwise. A save without it (written before Patterplay 0.18.0) resolves the owner's prompt beat
|
|
1024
|
+
* when it is delivered, as before. */
|
|
1025
|
+
pendingPrompt?: SavedChoicePrompt;
|
|
1020
1026
|
/** This flow's (non-shared) selector cursors, keyed by group id. */
|
|
1021
1027
|
selectors: Record<string, SelectorSnapshot>;
|
|
1022
1028
|
}
|
package/package.json
CHANGED