Files
vue3js-app-proposal-for-sdk…/static/store.js
c0dev0id 7ffa0a9d2d phases 4-6: article system, stem note fields, edit-state cleanup
Phase 4 — remove edit-state flags from domain objects:
- ast-parser.js: drop isDirty from buildInstrument, buildBar, buildStemNote
- store.js: add resetEditState()
- PaneCP.js: use resetEditState() on import; drop flags arg from patchScore
- PaneFO.js: isDirty -> _modified for linked instruments; no per-node dirty tracking
- PaneSubObjects.js: _spliceNode helper; deletion via splice; _isNew on new bars
- exporter.js: on-demand traversal; absence from model means deleted

Phase 5 — article parser and exporter:
- ast-parser.js: _buildArticleEntry replaces _mergeArticleEntry; stage.article and
  voice.article dispatch; article properties carry scope and overwritten flag
- exporter.js: _buildArticlesBlock emits -important: list for overwrites scope

Phase 6 — stem note dead fields:
- ast-parser.js: parse weight and articulatory on stem notes; flatten
  article.definite properties onto stem note model sibling to pitch/chain
2026-07-11 12:07:05 +02:00

35 lines
708 B
JavaScript

import { reactive } from 'vue';
export const store = reactive({
scoreModel: null,
rawScoreText: null,
focusPath: [],
synthesisStatus: null,
isDirty: false,
errorMessage: '',
exportLog: [],
setFocus(path) {
this.focusPath = path;
},
pushFocus(node) {
const idx = this.focusPath.indexOf(node);
if (idx !== -1) {
this.focusPath = this.focusPath.slice(0, idx + 1);
} else {
this.focusPath = [...this.focusPath, node];
}
},
markDirty() {
this.isDirty = true;
},
resetEditState() {
this.isDirty = false;
this.exportLog = [];
this.focusPath = [];
},
});