mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2025-12-25 15:41:30 +00:00
Improved - New Translation: `es` (Spanish) by @zeedif (Thank you so much)! - Now all of messages can be selectable and copyable, also on the iPhone, iPad, and Android devices. Now we can copy or share the messages easily. New Feature - Peer-to-Peer Synchronisation has been implemented! Fixed - No longer memory or resource leaks when the plug-in is disabled. - Now deleted chunks are correctly detected on conflict resolution, and we are guided to resurrect them. - Hanging issue during the initial synchronisation has been fixed. - Some unnecessary logs have been removed. - Now all modal dialogues are correctly closed when the plug-in is disabled. Refactor - Several interfaces have been moved to the separated library. - Translations have been moved to each language file, and during the build, they are merged into one file. - Non-mobile friendly code has been removed and replaced with the safer code. - Started writing Platform impedance-matching-layer. - Svelte has been updated to v5. - Some function have got more robust type definitions. - Terser optimisation has slightly improved. - During the build, analysis meta-file of the bundled codes will be generated.
58 lines
2.4 KiB
TypeScript
58 lines
2.4 KiB
TypeScript
import type { FilePathWithPrefix, ObsidianLiveSyncSettings } from "../lib/src/common/types";
|
|
import { eventHub } from "../lib/src/hub/hub";
|
|
import type ObsidianLiveSyncPlugin from "../main";
|
|
|
|
export const EVENT_LAYOUT_READY = "layout-ready";
|
|
export const EVENT_PLUGIN_LOADED = "plugin-loaded";
|
|
export const EVENT_PLUGIN_UNLOADED = "plugin-unloaded";
|
|
export const EVENT_SETTING_SAVED = "setting-saved";
|
|
export const EVENT_FILE_RENAMED = "file-renamed";
|
|
export const EVENT_FILE_SAVED = "file-saved";
|
|
export const EVENT_LEAF_ACTIVE_CHANGED = "leaf-active-changed";
|
|
|
|
export const EVENT_DATABASE_REBUILT = "database-rebuilt";
|
|
|
|
export const EVENT_LOG_ADDED = "log-added";
|
|
|
|
export const EVENT_REQUEST_OPEN_SETTINGS = "request-open-settings";
|
|
export const EVENT_REQUEST_OPEN_SETTING_WIZARD = "request-open-setting-wizard";
|
|
export const EVENT_REQUEST_OPEN_SETUP_URI = "request-open-setup-uri";
|
|
export const EVENT_REQUEST_COPY_SETUP_URI = "request-copy-setup-uri";
|
|
|
|
export const EVENT_REQUEST_RELOAD_SETTING_TAB = "reload-setting-tab";
|
|
|
|
export const EVENT_REQUEST_OPEN_PLUGIN_SYNC_DIALOG = "request-open-plugin-sync-dialog";
|
|
|
|
export const EVENT_REQUEST_OPEN_P2P = "request-open-p2p";
|
|
export const EVENT_REQUEST_CLOSE_P2P = "request-close-p2p";
|
|
|
|
// export const EVENT_FILE_CHANGED = "file-changed";
|
|
|
|
declare global {
|
|
interface LSEvents {
|
|
[EVENT_REQUEST_OPEN_PLUGIN_SYNC_DIALOG]: undefined;
|
|
[EVENT_FILE_SAVED]: undefined;
|
|
[EVENT_REQUEST_OPEN_SETUP_URI]: undefined;
|
|
[EVENT_REQUEST_COPY_SETUP_URI]: undefined;
|
|
[EVENT_REQUEST_RELOAD_SETTING_TAB]: undefined;
|
|
[EVENT_PLUGIN_UNLOADED]: undefined;
|
|
[EVENT_SETTING_SAVED]: ObsidianLiveSyncSettings;
|
|
[EVENT_PLUGIN_LOADED]: ObsidianLiveSyncPlugin;
|
|
[EVENT_LAYOUT_READY]: undefined;
|
|
"event-file-changed": { file: FilePathWithPrefix; automated: boolean };
|
|
"document-stub-created": {
|
|
toc: Set<string>;
|
|
stub: { [key: string]: { [key: string]: Map<string, Record<string, string>> } };
|
|
};
|
|
[EVENT_REQUEST_OPEN_SETTINGS]: undefined;
|
|
[EVENT_REQUEST_OPEN_SETTING_WIZARD]: undefined;
|
|
[EVENT_FILE_RENAMED]: { newPath: FilePathWithPrefix; old: FilePathWithPrefix };
|
|
[EVENT_LEAF_ACTIVE_CHANGED]: undefined;
|
|
[EVENT_REQUEST_OPEN_P2P]: undefined;
|
|
[EVENT_REQUEST_CLOSE_P2P]: undefined;
|
|
[EVENT_DATABASE_REBUILT]: undefined;
|
|
}
|
|
}
|
|
|
|
export { eventHub };
|