@aftertext/player 0.1.0 → 0.1.1

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.
@@ -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/PROJECT_SPEC.md Section 18.5). A pure,
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,
@@ -1,6 +1,6 @@
1
1
  import { advance } from "@aftertext/runtime";
2
2
  /**
3
- * Advances one step (docs/PROJECT_SPEC.md Section 18.5). A pure,
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,
@@ -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/PROJECT_SPEC.md
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 —
@@ -1,6 +1,6 @@
1
1
  import { createRuntimeState, INITIAL_CURSOR } from "@aftertext/runtime";
2
2
  /**
3
- * Creates the initial `PlayerState` for `document` (docs/PROJECT_SPEC.md
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.js CHANGED
@@ -1,4 +1,4 @@
1
- // Public API surface for the headless Player Core (docs/PROJECT_SPEC.md
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,wEAAwE;AACxE,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"}
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"}
@@ -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/PROJECT_SPEC.md Section 18.2). A thin, three-field wrapper:
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/PROJECT_SPEC.md Section 18.7). When
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/PROJECT_SPEC.md Section 18.7). When
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.1.0",
3
+ "version": "0.1.1",
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.1.0",
34
- "@aftertext/runtime": "^0.1.0"
33
+ "@aftertext/compiler": "^0.1.1",
34
+ "@aftertext/runtime": "^0.1.1"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "^22.7.5",