refactor: rename XLSXCardView → CardView

Class-internal rename. The CARD_VIEW_TYPE string registered with Obsidian
is unchanged, so the rename is purely cosmetic from the API's perspective.
Sweeps 8 sites: class def + instantiation in main.ts, plus mention-only
references in test-plugin-logic.mjs, xlsx-to-csv-roundtrip.mjs,
src/mobile-templates.ts, docs/architecture.md, docs/dev-workflow.md.

Closes the follow-up flagged in handoff.md after SWITCH TO CSV AS MAIN.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
SVM0N 2026-05-24 07:31:35 +00:00
parent 3b213d0650
commit ee64788f55
3 changed files with 4 additions and 4 deletions

File diff suppressed because one or more lines are too long

View file

@ -44,7 +44,7 @@ async function loadChart(): Promise<ChartModule> {
// ─── View ────────────────────────────────────────────────────────────────────
export class XLSXCardView extends FileView {
export class CardView extends FileView {
settings: CardViewSettings;
headers: string[] = [];
rows: CSVRow[] = [];
@ -1784,7 +1784,7 @@ export default class CardViewPlugin extends Plugin {
settings: CardViewSettings = DEFAULT_SETTINGS;
async onload(): Promise<void> {
await this.loadSettings();
this.registerView(CARD_VIEW_TYPE, leaf=>new XLSXCardView(leaf, this.settings, () => this.saveSettings()));
this.registerView(CARD_VIEW_TYPE, leaf=>new CardView(leaf, this.settings, () => this.saveSettings()));
this.registerExtensions(["csv"], CARD_VIEW_TYPE);
this.addSettingTab(new CardViewSettingTab(this.app, this));

View file

@ -97,7 +97,7 @@ function parseCSV(raw) {
return { headers, rows };
}
// Simulates resolveCol from XLSXCardView
// Simulates resolveCol from CardView
function resolveCol(headers, candidates) {
for (const c of candidates) {
const found = headers.find(h => h.toLowerCase() === c.toLowerCase());