File size: 859 Bytes
794cf6c
 
bc7e9cd
794cf6c
 
 
bc7e9cd
794cf6c
 
 
 
 
 
 
 
 
 
bc7e9cd
db9635c
794cf6c
 
 
 
 
 
 
 
 
bc7e9cd
 
 
794cf6c
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Stores

State management using Svelte stores

## Purpose

Single source of truth for application state with reactive updates

## Layout

```
stores/
β”œβ”€β”€ context.md     # This file
β”œβ”€β”€ loading.ts     # Loading state and progress
β”œβ”€β”€ game.ts        # Game instance and running state
β”œβ”€β”€ console.ts     # Console messages with unique IDs
β”œβ”€β”€ editor.ts      # Editor content and settings
β”œβ”€β”€ chat-store.ts  # Chat messages and connection state
└── ui.ts          # UI state (view modes including about, errors)
```

## Scope

- In-scope: Application state, reactive data
- Out-of-scope: Business logic, UI components

## Entrypoints

- Components subscribe for reactive updates
- Controllers update state through store methods
- Stores expose data and update methods

## Dependencies

- svelte/store for reactive state