@patterkit/model 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.
package/dist/index.d.cts CHANGED
@@ -56,8 +56,13 @@ interface GameEventBeat {
56
56
  }
57
57
  type Beat = LineBeat | TextBeat | GameEventBeat;
58
58
  type Selector = "run" | "branch" | "sequence" | "choice";
59
- /** How a `sequence` walks its children. */
60
- type SelectorOrder = "sequential" | "shuffle";
59
+ /** How a `sequence` walks its children. `specificity` = **Best match**: pick the eligible
60
+ * child whose condition most specifically fits the current state (the most atomic constraints
61
+ * actively holding it true); equally-specific ties break by the seeded shuffle. A child with no
62
+ * condition scores zero, so it acts as the filler that wins only when nothing more specific is
63
+ * eligible. Composes with `exhaust`: `repeat` re-scores every visit (re-pickable, the Best-match
64
+ * default), `once` uses each pick up so the group slides down to the filler (graceful degradation). */
65
+ type SelectorOrder = "sequential" | "shuffle" | "specificity";
61
66
  /** What a `sequence` does after one full pass through its children. */
62
67
  type SelectorExhaust = "once" | "repeat" | "stick";
63
68
  /**
package/dist/index.d.ts CHANGED
@@ -56,8 +56,13 @@ interface GameEventBeat {
56
56
  }
57
57
  type Beat = LineBeat | TextBeat | GameEventBeat;
58
58
  type Selector = "run" | "branch" | "sequence" | "choice";
59
- /** How a `sequence` walks its children. */
60
- type SelectorOrder = "sequential" | "shuffle";
59
+ /** How a `sequence` walks its children. `specificity` = **Best match**: pick the eligible
60
+ * child whose condition most specifically fits the current state (the most atomic constraints
61
+ * actively holding it true); equally-specific ties break by the seeded shuffle. A child with no
62
+ * condition scores zero, so it acts as the filler that wins only when nothing more specific is
63
+ * eligible. Composes with `exhaust`: `repeat` re-scores every visit (re-pickable, the Best-match
64
+ * default), `once` uses each pick up so the group slides down to the filler (graceful degradation). */
65
+ type SelectorOrder = "sequential" | "shuffle" | "specificity";
61
66
  /** What a `sequence` does after one full pass through its children. */
62
67
  type SelectorExhaust = "once" | "repeat" | "stick";
63
68
  /**
package/package.json CHANGED
@@ -1,14 +1,20 @@
1
1
  {
2
2
  "name": "@patterkit/model",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Patter data-model types: source (scene/block/group/snippet/beat/jump), project, locale, authoring. The shape source-of-truth.",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "author": "Ian Thomas",
8
8
  "homepage": "https://patterkit.dev",
9
- "repository": { "type": "git", "url": "git+https://github.com/patterkit/patter.git", "directory": "packages/model" },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/patterkit/patter.git",
12
+ "directory": "packages/model"
13
+ },
10
14
  "bugs": "https://github.com/patterkit/patter/issues",
11
- "publishConfig": { "access": "public" },
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
12
18
  "main": "./dist/index.js",
13
19
  "module": "./dist/index.js",
14
20
  "types": "./dist/index.d.ts",
@@ -19,7 +25,10 @@
19
25
  "require": "./dist/index.cjs"
20
26
  }
21
27
  },
22
- "files": ["dist", "README.md"],
28
+ "files": [
29
+ "dist",
30
+ "README.md"
31
+ ],
23
32
  "sideEffects": false,
24
33
  "scripts": {
25
34
  "build": "tsup src/index.ts --format esm,cjs --dts --clean"