Integrate CCN 2025-2026 files

This commit is contained in:
2025-11-13 21:25:52 +01:00
parent 7a0d89735a
commit e1bfb17b3c
26 changed files with 3791 additions and 1071 deletions

View File

@ -1,37 +1,37 @@
import { getContext, setContext } from 'svelte';
import { ProjectManager } from '../project-system/project-manager';
import { ProjectDatabase } from '../project-system/db';
import { FileManager } from '../project-system/file-manager';
import { FileDatabase } from '../project-system/db';
import { createCsoundStore } from '../csound/store';
import { ExecutionContext } from '../csound/execution-context';
import { createEditorSettingsStore } from '../stores/editorSettings';
import { ProjectEditor } from '../stores/projectEditor.svelte';
import { EditorState } from '../stores/editorState.svelte';
import { UIState } from '../stores/uiState.svelte';
import type { CsoundStore } from '../csound/store';
import type { EditorSettingsStore } from '../stores/editorSettings';
export interface AppContext {
projectManager: ProjectManager;
fileManager: FileManager;
csound: CsoundStore;
executionContext: ExecutionContext;
editorSettings: EditorSettingsStore;
projectEditor: ProjectEditor;
editorState: EditorState;
uiState: UIState;
}
const APP_CONTEXT_KEY = Symbol('app-context');
export function createAppContext(): AppContext {
const db = new ProjectDatabase();
const projectManager = new ProjectManager(db);
const db = new FileDatabase();
const fileManager = new FileManager(db);
const csound = createCsoundStore();
const executionContext = new ExecutionContext(csound, 'composition');
const executionContext = new ExecutionContext(csound);
return {
projectManager,
fileManager,
csound,
executionContext,
editorSettings: createEditorSettingsStore(),
projectEditor: new ProjectEditor(projectManager),
editorState: new EditorState(fileManager),
uiState: new UIState()
};
}