@patterkit/model 0.1.0 → 0.1.2

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
  /**
@@ -470,6 +475,12 @@ interface ProjectFile {
470
475
  /** Autosave: periodically persist the edited scene without an explicit Save. Default ON (omitted ===
471
476
  * enabled); set `false` to require manual saves. */
472
477
  autosave?: boolean;
478
+ /** Auto Rebuild: recompile the `.patterc` bundle automatically after edits (debounced), so the on-disk
479
+ * build stays current without a manual Publish Bundle. Editor-only; never reaches the bundle. Default OFF
480
+ * (omitted === off) - opt-in, since it writes the bundle on every real change (poor fit if you commit the
481
+ * bundle to a lock-based VCS). The rebuild is deduped (skipped when the compiled bundle is unchanged) and
482
+ * a mid-edit invalid project silently keeps the last good build. */
483
+ autoRebuild?: boolean;
473
484
  /** Closed captions (#214): the delimiter pair that wraps non-spoken caption cues inside DIALOGUE
474
485
  * lines (e.g. `(sigh)` in `Oh dear. (sigh) What now?`). A game can turn captions off at runtime
475
486
  * (`setClosedCaptions(false)`), and the runtime then strips every `open…close` span - delimiters and
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
  /**
@@ -470,6 +475,12 @@ interface ProjectFile {
470
475
  /** Autosave: periodically persist the edited scene without an explicit Save. Default ON (omitted ===
471
476
  * enabled); set `false` to require manual saves. */
472
477
  autosave?: boolean;
478
+ /** Auto Rebuild: recompile the `.patterc` bundle automatically after edits (debounced), so the on-disk
479
+ * build stays current without a manual Publish Bundle. Editor-only; never reaches the bundle. Default OFF
480
+ * (omitted === off) - opt-in, since it writes the bundle on every real change (poor fit if you commit the
481
+ * bundle to a lock-based VCS). The rebuild is deduped (skipped when the compiled bundle is unchanged) and
482
+ * a mid-edit invalid project silently keeps the last good build. */
483
+ autoRebuild?: boolean;
473
484
  /** Closed captions (#214): the delimiter pair that wraps non-spoken caption cues inside DIALOGUE
474
485
  * lines (e.g. `(sigh)` in `Oh dear. (sigh) What now?`). A game can turn captions off at runtime
475
486
  * (`setClosedCaptions(false)`), and the runtime then strips every `open…close` span - delimiters and
package/package.json CHANGED
@@ -1,14 +1,20 @@
1
1
  {
2
2
  "name": "@patterkit/model",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
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"