feat(app): editor engine, markdown, store and domain modules
Block editor, markdown round trip, formulas/databases/kanban/canvas models, graph simulation (time-budgeted ticks for big vaults), shortcut registry, dialog focus handling, HTML to Markdown for paste and clipping. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
313c41f867
commit
c0587cb267
29 files changed
+5274
-169
No files matched your search
@@ -0,0 +1,12 @@
|
||||
// In Electron, window.vault comes from electron/preload.cjs.
|
||||
// In a plain browser (`npm run dev:web`) an in-memory mock stands in, so the UI can be worked on without Electron.
|
||||
import { createMock } from './mock.js';
|
||||
|
||||
export const isDesktop = typeof window !== 'undefined' && !!window.vault;
|
||||
export const api = isDesktop ? window.vault : createMock();
|
||||
export const platform = isDesktop ? window.vault.platform : 'web';
|
||||
|
||||
export const errorText = (err) =>
|
||||
String((err && err.message) || err || 'Something went wrong')
|
||||
.replace(/^Error invoking remote method '[^']+': /, '')
|
||||
.replace(/^Error: /, '');
|
||||
Reference in new issue
Block a user