@aftertext/player 0.1.0 → 0.3.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 +1 -1
- package/dist/advance-player.d.ts +1 -1
- package/dist/advance-player.js +1 -1
- package/dist/create-player.d.ts +1 -1
- package/dist/create-player.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/player-state.d.ts +1 -1
- package/dist/select-player-choice.d.ts +1 -1
- package/dist/select-player-choice.js +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
package/dist/advance-player.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { StoryDocument } from "@aftertext/compiler";
|
|
|
2
2
|
import { type AdvanceOptions } from "@aftertext/runtime";
|
|
3
3
|
import type { PlayerState } from "./player-state.js";
|
|
4
4
|
/**
|
|
5
|
-
* Advances one step (docs/
|
|
5
|
+
* Advances one step (docs/CORE_SPEC.md Section 18.5). A pure,
|
|
6
6
|
* non-mutating pass-through to runtime `advance()`: calls it with the
|
|
7
7
|
* Player's current `runtimeState`/`cursor`, and returns a new
|
|
8
8
|
* `PlayerState` built from exactly what it returns. Never reinterprets,
|
package/dist/advance-player.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { advance } from "@aftertext/runtime";
|
|
2
2
|
/**
|
|
3
|
-
* Advances one step (docs/
|
|
3
|
+
* Advances one step (docs/CORE_SPEC.md Section 18.5). A pure,
|
|
4
4
|
* non-mutating pass-through to runtime `advance()`: calls it with the
|
|
5
5
|
* Player's current `runtimeState`/`cursor`, and returns a new
|
|
6
6
|
* `PlayerState` built from exactly what it returns. Never reinterprets,
|
package/dist/create-player.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { StoryDocument } from "@aftertext/compiler";
|
|
2
2
|
import type { PlayerState } from "./player-state.js";
|
|
3
3
|
/**
|
|
4
|
-
* Creates the initial `PlayerState` for `document` (docs/
|
|
4
|
+
* Creates the initial `PlayerState` for `document` (docs/CORE_SPEC.md
|
|
5
5
|
* Section 18.4). Seeds `runtimeState` via the runtime's own
|
|
6
6
|
* `createRuntimeState`, starts `cursor` at the runtime's initial cursor,
|
|
7
7
|
* and sets `current` to `null`. Performs no narrative execution —
|
package/dist/create-player.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRuntimeState, INITIAL_CURSOR } from "@aftertext/runtime";
|
|
2
2
|
/**
|
|
3
|
-
* Creates the initial `PlayerState` for `document` (docs/
|
|
3
|
+
* Creates the initial `PlayerState` for `document` (docs/CORE_SPEC.md
|
|
4
4
|
* Section 18.4). Seeds `runtimeState` via the runtime's own
|
|
5
5
|
* `createRuntimeState`, starts `cursor` at the runtime's initial cursor,
|
|
6
6
|
* and sets `current` to `null`. Performs no narrative execution —
|
package/dist/index.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ export type { PlayerState } from "./player-state.js";
|
|
|
2
2
|
export { createPlayer } from "./create-player.js";
|
|
3
3
|
export { advancePlayer } from "./advance-player.js";
|
|
4
4
|
export { selectPlayerChoice } from "./select-player-choice.js";
|
|
5
|
-
export type { AdvanceOptions, AvailableChoiceItem, ContentResult, PresentationResult, ChoiceResult, NavigationResult, CompletedResult, ErrorResult, ExecutionResult, RuntimeExecutionErrorKind, RuntimeExecutionError } from "@aftertext/runtime";
|
|
5
|
+
export type { AdvanceOptions, AvailableChoiceItem, ContentResult, PresentationResult, DialogueResult, ChoiceResult, NavigationResult, CompletedResult, ErrorResult, ExecutionResult, RuntimeExecutionErrorKind, RuntimeExecutionError } from "@aftertext/runtime";
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAYA,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,YAAY,EACV,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,eAAe,EACf,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAYA,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,YAAY,EACV,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,eAAe,EACf,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Public API surface for the headless Player Core (docs/
|
|
1
|
+
// Public API surface for the headless Player Core (docs/CORE_SPEC.md
|
|
2
2
|
// Section 18). A thin application layer over @aftertext/runtime: it owns
|
|
3
3
|
// only `PlayerState` and the three pure transitions over it. All narrative
|
|
4
4
|
// semantics — StoryState, ReaderState, NavigationState, the execution
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,yEAAyE;AACzE,2EAA2E;AAC3E,sEAAsE;AACtE,2EAA2E;AAC3E,uEAAuE;AACvE,EAAE;AACF,2DAA2D;AAC3D,wEAAwE;AACxE,kEAAkE;AAClE,kEAAkE;AAGlE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC"}
|
package/dist/player-state.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ExecutionCursor, ExecutionResult, RuntimeState } from "@aftertext/runtime";
|
|
2
2
|
/**
|
|
3
3
|
* The minimum state a headless Player Core session needs to thread between
|
|
4
|
-
* calls (docs/
|
|
4
|
+
* calls (docs/CORE_SPEC.md Section 18.2). A thin, three-field wrapper:
|
|
5
5
|
*
|
|
6
6
|
* - `runtimeState` is the authoritative runtime state, stored once and
|
|
7
7
|
* never reinterpreted — `StoryState`/`ReaderState`/`NavigationState`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { StoryDocument } from "@aftertext/compiler";
|
|
2
2
|
import type { PlayerState } from "./player-state.js";
|
|
3
3
|
/**
|
|
4
|
-
* Resolves a Choice selection (docs/
|
|
4
|
+
* Resolves a Choice selection (docs/CORE_SPEC.md Section 18.7). When
|
|
5
5
|
* `player.current` is a Choice result, reconstructs the exact
|
|
6
6
|
* `ExecutionStep` runtime `selectChoice()` requires from Player's own
|
|
7
7
|
* three fields and delegates entirely to it — never re-evaluating
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RuntimeErrors, selectChoice } from "@aftertext/runtime";
|
|
2
2
|
/**
|
|
3
|
-
* Resolves a Choice selection (docs/
|
|
3
|
+
* Resolves a Choice selection (docs/CORE_SPEC.md Section 18.7). When
|
|
4
4
|
* `player.current` is a Choice result, reconstructs the exact
|
|
5
5
|
* `ExecutionStep` runtime `selectChoice()` requires from Player's own
|
|
6
6
|
* three fields and delegates entirely to it — never re-evaluating
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aftertext/player",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "AfterText headless Player Core: a thin, pure application layer over @aftertext/runtime for threading an active play session.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"test": "vitest run"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@aftertext/compiler": "^0.
|
|
34
|
-
"@aftertext/runtime": "^0.
|
|
33
|
+
"@aftertext/compiler": "^0.3.0",
|
|
34
|
+
"@aftertext/runtime": "^0.3.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "^22.7.5",
|