@doodle-engine/core 0.0.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.
@@ -0,0 +1,256 @@
1
+ /**
2
+ * Effect type definitions for the Doodle Engine.
3
+ * Effects are mutations to game state that run in order.
4
+ * All effects use a discriminated union pattern for extensibility.
5
+ */
6
+ /**
7
+ * Set a flag to true.
8
+ * Example: SET flag metBartender
9
+ */
10
+ export interface SetFlagEffect {
11
+ type: 'setFlag';
12
+ /** Flag key to set */
13
+ flag: string;
14
+ }
15
+ /**
16
+ * Set a flag to false.
17
+ * Example: CLEAR flag doorLocked
18
+ */
19
+ export interface ClearFlagEffect {
20
+ type: 'clearFlag';
21
+ /** Flag key to clear */
22
+ flag: string;
23
+ }
24
+ /**
25
+ * Set a variable to a specific value.
26
+ * Example: SET variable gold 100
27
+ */
28
+ export interface SetVariableEffect {
29
+ type: 'setVariable';
30
+ /** Variable key to set */
31
+ variable: string;
32
+ /** Value to set */
33
+ value: number | string;
34
+ }
35
+ /**
36
+ * Add to (or subtract from) a variable.
37
+ * Example: ADD variable gold -50
38
+ */
39
+ export interface AddVariableEffect {
40
+ type: 'addVariable';
41
+ /** Variable key to modify */
42
+ variable: string;
43
+ /** Amount to add (can be negative) */
44
+ value: number;
45
+ }
46
+ /**
47
+ * Add an item to player's inventory.
48
+ * Example: ADD item rusty_key
49
+ */
50
+ export interface AddItemEffect {
51
+ type: 'addItem';
52
+ /** Item ID to add */
53
+ itemId: string;
54
+ }
55
+ /**
56
+ * Remove an item from player's inventory.
57
+ * Example: REMOVE item rusty_key
58
+ */
59
+ export interface RemoveItemEffect {
60
+ type: 'removeItem';
61
+ /** Item ID to remove */
62
+ itemId: string;
63
+ }
64
+ /**
65
+ * Move an item to a specific location.
66
+ * Example: MOVE item rusty_key cellar
67
+ */
68
+ export interface MoveItemEffect {
69
+ type: 'moveItem';
70
+ /** Item ID to move */
71
+ itemId: string;
72
+ /** Destination location ID */
73
+ locationId: string;
74
+ }
75
+ /**
76
+ * Change player's current location.
77
+ * Example: GOTO location tavern
78
+ */
79
+ export interface GoToLocationEffect {
80
+ type: 'goToLocation';
81
+ /** Destination location ID */
82
+ locationId: string;
83
+ }
84
+ /**
85
+ * Advance game time by a number of hours.
86
+ * Example: ADVANCE time 2
87
+ */
88
+ export interface AdvanceTimeEffect {
89
+ type: 'advanceTime';
90
+ /** Hours to advance */
91
+ hours: number;
92
+ }
93
+ /**
94
+ * Set a quest to a specific stage.
95
+ * Example: SET questStage odd_jobs started
96
+ */
97
+ export interface SetQuestStageEffect {
98
+ type: 'setQuestStage';
99
+ /** Quest ID */
100
+ questId: string;
101
+ /** Stage ID to set */
102
+ stageId: string;
103
+ }
104
+ /**
105
+ * Unlock a journal entry for the player.
106
+ * Example: ADD journalEntry tavern_discovery
107
+ */
108
+ export interface AddJournalEntryEffect {
109
+ type: 'addJournalEntry';
110
+ /** Journal entry ID to unlock */
111
+ entryId: string;
112
+ }
113
+ /**
114
+ * Start a dialogue.
115
+ * Example: START dialogue merchant_intro
116
+ */
117
+ export interface StartDialogueEffect {
118
+ type: 'startDialogue';
119
+ /** Dialogue ID to start */
120
+ dialogueId: string;
121
+ }
122
+ /**
123
+ * End the current dialogue.
124
+ * Example: END dialogue
125
+ */
126
+ export interface EndDialogueEffect {
127
+ type: 'endDialogue';
128
+ }
129
+ /**
130
+ * Move a character to a specific location.
131
+ * Example: SET characterLocation merchant tavern
132
+ */
133
+ export interface SetCharacterLocationEffect {
134
+ type: 'setCharacterLocation';
135
+ /** Character ID */
136
+ characterId: string;
137
+ /** Destination location ID */
138
+ locationId: string;
139
+ }
140
+ /**
141
+ * Add a character to the player's party.
142
+ * Example: ADD toParty jaheira
143
+ */
144
+ export interface AddToPartyEffect {
145
+ type: 'addToParty';
146
+ /** Character ID to add */
147
+ characterId: string;
148
+ }
149
+ /**
150
+ * Remove a character from the player's party.
151
+ * Example: REMOVE fromParty jaheira
152
+ */
153
+ export interface RemoveFromPartyEffect {
154
+ type: 'removeFromParty';
155
+ /** Character ID to remove */
156
+ characterId: string;
157
+ }
158
+ /**
159
+ * Set relationship value with a character.
160
+ * Example: SET relationship bartender 5
161
+ */
162
+ export interface SetRelationshipEffect {
163
+ type: 'setRelationship';
164
+ /** Character ID */
165
+ characterId: string;
166
+ /** Relationship value to set */
167
+ value: number;
168
+ }
169
+ /**
170
+ * Add to (or subtract from) relationship with a character.
171
+ * Example: ADD relationship bartender 1
172
+ */
173
+ export interface AddRelationshipEffect {
174
+ type: 'addRelationship';
175
+ /** Character ID */
176
+ characterId: string;
177
+ /** Amount to add (can be negative) */
178
+ value: number;
179
+ }
180
+ /**
181
+ * Set a stat value on a character.
182
+ * Example: SET characterStat jaheira level 5
183
+ */
184
+ export interface SetCharacterStatEffect {
185
+ type: 'setCharacterStat';
186
+ /** Character ID */
187
+ characterId: string;
188
+ /** Stat key to set */
189
+ stat: string;
190
+ /** Value to set */
191
+ value: unknown;
192
+ }
193
+ /**
194
+ * Add to (or subtract from) a character stat.
195
+ * Example: ADD characterStat jaheira health -10
196
+ */
197
+ export interface AddCharacterStatEffect {
198
+ type: 'addCharacterStat';
199
+ /** Character ID */
200
+ characterId: string;
201
+ /** Stat key to modify */
202
+ stat: string;
203
+ /** Amount to add (can be negative) */
204
+ value: number;
205
+ }
206
+ /**
207
+ * Enable or disable the map.
208
+ * Example: SET mapEnabled false
209
+ */
210
+ export interface SetMapEnabledEffect {
211
+ type: 'setMapEnabled';
212
+ /** Whether map should be enabled */
213
+ enabled: boolean;
214
+ }
215
+ /**
216
+ * Play a music track (emitted to renderer).
217
+ * Example: MUSIC tension_theme.ogg
218
+ */
219
+ export interface PlayMusicEffect {
220
+ type: 'playMusic';
221
+ /** Music track filename */
222
+ track: string;
223
+ }
224
+ /**
225
+ * Play a sound effect (emitted to renderer).
226
+ * Example: SOUND door_slam.ogg
227
+ */
228
+ export interface PlaySoundEffect {
229
+ type: 'playSound';
230
+ /** Sound effect filename */
231
+ sound: string;
232
+ }
233
+ /**
234
+ * Add a notification for the player.
235
+ * Example: NOTIFY @quest.odd_jobs.started
236
+ */
237
+ export interface NotifyEffect {
238
+ type: 'notify';
239
+ /** Notification message (supports @localization keys) */
240
+ message: string;
241
+ }
242
+ /**
243
+ * Play a video/cutscene (emitted to renderer).
244
+ * Example: VIDEO intro.mp4
245
+ */
246
+ export interface PlayVideoEffect {
247
+ type: 'playVideo';
248
+ /** Video filename */
249
+ file: string;
250
+ }
251
+ /**
252
+ * Union of all effect types.
253
+ * This discriminated union allows authors to extend with custom effects.
254
+ */
255
+ export type Effect = SetFlagEffect | ClearFlagEffect | SetVariableEffect | AddVariableEffect | AddItemEffect | RemoveItemEffect | MoveItemEffect | GoToLocationEffect | AdvanceTimeEffect | SetQuestStageEffect | AddJournalEntryEffect | StartDialogueEffect | EndDialogueEffect | SetCharacterLocationEffect | AddToPartyEffect | RemoveFromPartyEffect | SetRelationshipEffect | AddRelationshipEffect | SetCharacterStatEffect | AddCharacterStatEffect | SetMapEnabledEffect | PlayMusicEffect | PlaySoundEffect | NotifyEffect | PlayVideoEffect;
256
+ //# sourceMappingURL=effects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"effects.d.ts","sourceRoot":"","sources":["../../src/types/effects.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,SAAS,CAAA;IACf,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,WAAW,CAAA;IACjB,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,aAAa,CAAA;IACnB,0BAA0B;IAC1B,QAAQ,EAAE,MAAM,CAAA;IAChB,mBAAmB;IACnB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CACvB;AAED;;;GAGG;A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C,IAAI,EAAE,eAAe,CAAA;IACrB,oCAAoC;IACpC,OAAO,EAAE,OAAO,CAAA;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,WAAW,CAAA;IACjB,2BAA2B;IAC3B,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,WAAW,CAAA;IACjB,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,QAAQ,CAAA;IACd,yDAAyD;IACzD,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,WAAW,CAAA;IACjB,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;;GAGG;AACH,MAAM,MAAM,MAAM,GACd,aAAa,GACb,eAAe,GACf,iBAAiB,GACjB,iBAAiB,GACjB,aAAa,GACb,gBAAgB,GAChB,cAAc,GACd,kBAAkB,GAClB,iBAAiB,GACjB,mBAAmB,GACnB,qBAAqB,GACrB,mBAAmB,GACnB,iBAAiB,GACjB,0BAA0B,GAC1B,gBAAgB,GAChB,qBAAqB,GACrB,qBAAqB,GACrB,qBAAqB,GACrB,sBAAsB,GACtB,sBAAsB,GACtB,mBAAmB,GACnB,eAAe,GACf,eAAe,GACf,YAAY,GACZ,eAAe,CAAA"}
@@ -0,0 +1,196 @@
1
+ /**
2
+ * Content entity type definitions for the Doodle Engine.
3
+ * These represent static content defined by authors in YAML and DSL files.
4
+ */
5
+ import type { Condition } from './conditions';
6
+ import type { Effect } from './effects';
7
+ /**
8
+ * A location in the game world where the player can be.
9
+ */
10
+ export interface Location {
11
+ /** Unique identifier for this location */
12
+ id: string;
13
+ /** Display name (supports @localization keys) */
14
+ name: string;
15
+ /** Text shown when player is at this location */
16
+ description: string;
17
+ /** Image shown when player is at this location */
18
+ banner: string;
19
+ /** Background music track */
20
+ music: string;
21
+ /** Ambient sound loop */
22
+ ambient: string;
23
+ }
24
+ /**
25
+ * A character in the game world.
26
+ */
27
+ export interface Character {
28
+ /** Unique identifier for this character */
29
+ id: string;
30
+ /** Display name (supports @localization keys) */
31
+ name: string;
32
+ /** Character background text */
33
+ biography: string;
34
+ /** Character portrait image */
35
+ portrait: string;
36
+ /** Starting location ID */
37
+ location: string;
38
+ /** Dialogue ID when player talks to this character */
39
+ dialogue: string;
40
+ /** Extensible stats object - engine stores but doesn't interpret */
41
+ stats: Record<string, unknown>;
42
+ }
43
+ /**
44
+ * An item that can be picked up, carried, or interacted with.
45
+ */
46
+ export interface Item {
47
+ /** Unique identifier for this item */
48
+ id: string;
49
+ /** Display name (supports @localization keys) */
50
+ name: string;
51
+ /** Item description text */
52
+ description: string;
53
+ /** Small image for inventory display */
54
+ icon: string;
55
+ /** Large image for detailed view */
56
+ image: string;
57
+ /** Starting location (location ID, "inventory", or character ID) */
58
+ location: string;
59
+ /** Extensible stats object - engine stores but doesn't interpret */
60
+ stats: Record<string, unknown>;
61
+ }
62
+ /**
63
+ * A location marker on a map with coordinates.
64
+ */
65
+ export interface MapLocation {
66
+ /** Location ID */
67
+ id: string;
68
+ /** X coordinate on map image */
69
+ x: number;
70
+ /** Y coordinate on map image */
71
+ y: number;
72
+ }
73
+ /**
74
+ * A map showing multiple locations the player can travel between.
75
+ */
76
+ export interface Map {
77
+ /** Unique identifier for this map */
78
+ id: string;
79
+ /** Display name (supports @localization keys) */
80
+ name: string;
81
+ /** Map background image */
82
+ image: string;
83
+ /** Units to travel time conversion factor */
84
+ scale: number;
85
+ /** Locations shown on this map with their coordinates */
86
+ locations: MapLocation[];
87
+ }
88
+ /**
89
+ * A dialogue tree containing conversation nodes.
90
+ */
91
+ export interface Dialogue {
92
+ /** Unique identifier for this dialogue */
93
+ id: string;
94
+ /** Location ID where this auto-triggers on enter (optional) */
95
+ triggerLocation?: string;
96
+ /** Conditions that must pass for auto-trigger (optional) */
97
+ conditions?: Condition[];
98
+ /** ID of the node that begins the conversation */
99
+ startNode: string;
100
+ /** All dialogue nodes in this conversation */
101
+ nodes: DialogueNode[];
102
+ }
103
+ /**
104
+ * A single node in a dialogue tree.
105
+ */
106
+ export interface DialogueNode {
107
+ /** Unique identifier for this node */
108
+ id: string;
109
+ /** Character ID speaking, or null for narration */
110
+ speaker: string | null;
111
+ /** What's said (supports @localization keys) */
112
+ text: string;
113
+ /** Optional audio file for this line */
114
+ voice?: string;
115
+ /** Optional portrait override (expression variant) */
116
+ portrait?: string;
117
+ /** Conditions that must be true to show this node */
118
+ conditions?: Condition[];
119
+ /** Player choices (if empty, auto-advance to next) */
120
+ choices: Choice[];
121
+ /** Effects that run when this node is reached */
122
+ effects?: Effect[];
123
+ /** Default next node if no choices (auto-advance) */
124
+ next?: string;
125
+ }
126
+ /**
127
+ * A player choice in a dialogue node.
128
+ */
129
+ export interface Choice {
130
+ /** Unique identifier for this choice */
131
+ id: string;
132
+ /** What the player sees (supports @localization keys) */
133
+ text: string;
134
+ /** Conditions that must be true to show this choice */
135
+ conditions?: Condition[];
136
+ /** Effects that run when this choice is selected */
137
+ effects?: Effect[];
138
+ /** Which node to go to when picked */
139
+ next: string;
140
+ }
141
+ /**
142
+ * A quest with multiple stages.
143
+ */
144
+ export interface Quest {
145
+ /** Unique identifier for this quest */
146
+ id: string;
147
+ /** Display name (supports @localization keys) */
148
+ name: string;
149
+ /** Quest description text */
150
+ description: string;
151
+ /** Quest stages (including started, complete, failed, etc.) */
152
+ stages: QuestStage[];
153
+ }
154
+ /**
155
+ * A single stage in a quest progression.
156
+ */
157
+ export interface QuestStage {
158
+ /** Unique identifier for this stage */
159
+ id: string;
160
+ /** Text shown in journal for this stage */
161
+ description: string;
162
+ }
163
+ /**
164
+ * A journal entry for lore, people, or places.
165
+ */
166
+ export interface JournalEntry {
167
+ /** Unique identifier for this entry */
168
+ id: string;
169
+ /** Display title (supports @localization keys) */
170
+ title: string;
171
+ /** Entry content text */
172
+ text: string;
173
+ /** Category for grouping (e.g., "lore", "people", "places") */
174
+ category: string;
175
+ }
176
+ /**
177
+ * Game configuration that defines starting conditions.
178
+ */
179
+ export interface GameConfig {
180
+ /** Starting location ID */
181
+ startLocation: string;
182
+ /** Starting time */
183
+ startTime: {
184
+ /** Starting day */
185
+ day: number;
186
+ /** Starting hour (0-23) */
187
+ hour: number;
188
+ };
189
+ /** Starting flags */
190
+ startFlags: Record<string, boolean>;
191
+ /** Starting variables */
192
+ startVariables: Record<string, number | string>;
193
+ /** Starting inventory (array of item IDs) */
194
+ startInventory: string[];
195
+ }
196
+ //# sourceMappingURL=entities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../src/types/entities.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAEvC;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,0CAA0C;IAC1C,EAAE,EAAE,MAAM,CAAA;IACV,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAA;IACZ,iDAAiD;IACjD,WAAW,EAAE,MAAM,CAAA;IACnB,kDAAkD;IAClD,MAAM,EAAE,MAAM,CAAA;IACd,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,yBAAyB;IACzB,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,2CAA2C;IAC3C,EAAE,EAAE,MAAM,CAAA;IACV,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAA;IACZ,gCAAgC;IAChC,SAAS,EAAE,MAAM,CAAA;IACjB,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAA;IAChB,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,sDAAsD;IACtD,QAA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AK,EAAE,MAAM,CAAA;IACb,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,+DAA+D;IAC/D,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,2BAA2B;IAC3B,aAAa,EAAE,MAAM,CAAA;IACrB,oBAAoB;IACpB,SAAS,EAAE;QACT,mBAAmB;QACnB,GAAG,EAAE,MAAM,CAAA;QACX,2BAA2B;QAC3B,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;IACD,qBAAqB;IACrB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACnC,yBAAyB;IACzB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAA;IAC/C,6CAA6C;IAC7C,cAAc,EAAE,MAAM,EAAE,CAAA;CACzB"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Content registry type definitions for the Doodle Engine.
3
+ *
4
+ * The content registry is a read-only store of all game content
5
+ * loaded from YAML and DSL files. It's populated at startup and
6
+ * never modified during gameplay.
7
+ */
8
+ import type { Location, Character, Item, Map, Dialogue, Quest, JournalEntry } from './entities';
9
+ /**
10
+ * Localization dictionary mapping keys to translated strings.
11
+ *
12
+ * Example:
13
+ * ```ts
14
+ * {
15
+ * "location.tavern.name": "The Salty Dog",
16
+ * "bartender.greeting.welcome": "Welcome to the Salty Dog, stranger."
17
+ * }
18
+ * ```
19
+ */
20
+ export interface LocaleData {
21
+ [key: string]: string;
22
+ }
23
+ /**
24
+ * Content registry containing all game content.
25
+ * All lookups are by ID using Record<id, entity> for O(1) access.
26
+ */
27
+ export interface ContentRegistry {
28
+ /** All locations indexed by ID */
29
+ locations: Record<string, Location>;
30
+ /** All characters indexed by ID */
31
+ characters: Record<string, Character>;
32
+ /** All items indexed by ID */
33
+ items: Record<string, Item>;
34
+ /** All maps indexed by ID */
35
+ maps: Record<string, Map>;
36
+ /** All dialogues indexed by ID */
37
+ dialogues: Record<string, Dialogue>;
38
+ /** All quests indexed by ID */
39
+ quests: Record<string, Quest>;
40
+ /** All journal entries indexed by ID */
41
+ journalEntries: Record<string, JournalEntry>;
42
+ /** All locales indexed by language code (e.g., "en", "es") */
43
+ locales: Record<string, LocaleData>;
44
+ }
45
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/types/registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,GAAG,EACH,QAAQ,EACR,KAAK,EACL,YAAY,EACb,MAAM,YAAY,CAAA;AAEnB;;;;;;;;;;GAUG;AACH,MAAM,WAAW,UAAU;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,kCAAkC;IAClC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IAEnC,mCAAmC;IACnC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IAErC,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IAE3B,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAEzB,kCAAkC;IAClC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IAEnC,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;IAE7B,wCAAwC;IACxC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;IAE5C,8DAA8D;IAC9D,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;CACpC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Save data type definitions for the Doodle Engine.
3
+ * Save files contain game state plus metadata.
4
+ */
5
+ import type { GameState } from './state';
6
+ /**
7
+ * Save file data structure.
8
+ * Contains versioning for migration and a timestamp for display.
9
+ */
10
+ export interface SaveData {
11
+ /** Save file format version (for migration handling) */
12
+ version: string;
13
+ /** ISO 8601 timestamp of when this save was created */
14
+ timestamp: string;
15
+ /** The complete game state */
16
+ state: GameState;
17
+ }
18
+ //# sourceMappingURL=save.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"save.d.ts","sourceRoot":"","sources":["../../src/types/save.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExC;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,wDAAwD;IACxD,OAAO,EAAE,MAAM,CAAA;IAEf,uDAAuD;IACvD,SAAS,EAAE,MAAM,CAAA;IAEjB,8BAA8B;IAC9B,KAAK,EAAE,SAAS,CAAA;CACjB"}