Add a preference system that lets users configure default font, roughness, fontSize, and strokeWidth — with three scopes (session/folder/global). Skill layer (Step 1 in SKILL.md): - Reads .claude/excalidraw-preferences.json (folder) then ~/.claude/skills/excalidraw-skill/preferences.json (global) - If neither exists, prompts user interactively on first use - Session-only scope keeps preferences in-memory without saving Server layer (index.ts): - loadPreferences() reads the same files at startup - Replaces hardcoded fontFamily ?? 1 with USER_PREFS.fontFamily - Folder-level preferences override global; user values override both Also ships preferences.example.json as a template (preferences.json is gitignored). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
19 lines
419 B
JSON
19 lines
419 B
JSON
{
|
|
"_comment": "Excalidraw MCP user preferences. Copy to preferences.json to activate.",
|
|
"_fontReference": {
|
|
"1": "Excalifont (hand-drawn)",
|
|
"2": "Helvetica (sans-serif)",
|
|
"3": "Cascadia (monospace)",
|
|
"4": "Comic Shanns",
|
|
"5": "Liberation Sans",
|
|
"6": "Nunito",
|
|
"7": "Lilita One"
|
|
},
|
|
"defaults": {
|
|
"fontFamily": 1,
|
|
"fontSize": 20,
|
|
"roughness": 0,
|
|
"strokeWidth": 2
|
|
}
|
|
}
|