mirror of
https://github.com/onlyworlds/obsidian-plugin.git
synced 2026-07-22 11:00:31 +00:00
Wake the dormant vault/element-file.ts write path and make YAML frontmatter the note format for new writes, with read-tolerance for legacy span notes. Pure logic (Obsidian-free, unit-tested under `npm test`): - vault/element-transform.ts: frontmatter<->payload, span parse, span->frontmatter, link normalization (single string / multi list, never comma-joined), extension-key passthrough (atlas_/shadow_/x_), body<->description|story mapping, read-before-PATCH diff. - test/element-transform.test.ts + tsconfig.test.json: 16 node:test cases incl. a real span-format Character fixture. Wired to `npm test` (pretest compiles to test-dist/). Wiring: - element-file.ts: readElement preserves extension fields + maps body to story for Narrative (R3/R5); frontmatter-first with legacy span fallback; writeElement round-trips extension keys and respects count-suffixed folders. - DownloadWorldCommand + CreateElementCommand: emit frontmatter via writeElement (no more Handlebars element templates). - NoteLinker: reworked onto metadataCache + SDK FIELD_SCHEMA; writes link IDs into frontmatter (new FieldSelectionModal picks the field). NameChanger syncs frontmatter name. - SaveElementCommand: read-before-PATCH (GET, diff, PATCH only changed fields) (R7). - ExportWorldCommand + CopyWorldCommand: read frontmatter via readElement, span as fallback (mixed worlds upload/copy correctly). - MigrateWorldCommand: "Migrate world notes to frontmatter" — backup-first (abort on failure), idempotent, end report modal (converted/skipped/failed). Deferred (see docs report): PasteWorld still emits span; ValidateWorld is still a span linter (diagnostic only, no writes). docs/SMOKE-CHECKLIST.md is the manual release gate. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| ApiResponseModal.ts | ||
| CreateElementFromLinkModal.ts | ||
| CreateElementModal.ts | ||
| CreateWorldModal.ts | ||
| ElementSelectionModal.ts | ||
| FieldSelectionModal.ts | ||
| NameInputModal.ts | ||
| PinInputModal.ts | ||
| TemplateSelectionModal.ts | ||
| ValidateCopyResultModal.ts | ||
| ValidateExportResultModal.ts | ||
| ValidateResultModal.ts | ||
| WorldCopyModal.ts | ||
| WorldDownloadModal.ts | ||
| WorldKeyModal.ts | ||
| WorldKeySelectionModal.ts | ||
| WorldNameModal.ts | ||
| WorldPasteModal.ts | ||
| WorldPinSelectionModal.ts | ||
| WorldRenameModal.ts | ||
| WorldSelectionModal.ts | ||