chore: initial project commit
This commit is contained in:
109
typings/global.d.ts
vendored
Normal file
109
typings/global.d.ts
vendored
Normal file
@@ -0,0 +1,109 @@
|
||||
declare const __env__: "development" | "production";
|
||||
|
||||
declare namespace Zotero {
|
||||
let OrgExportAnnotations: import("../src/addon").OrgExportAnnotationsAddon & {
|
||||
hooks: import("../src/hooks").Hooks;
|
||||
};
|
||||
|
||||
const BetterNotes:
|
||||
| {
|
||||
api: {
|
||||
convert: {
|
||||
note2md(note: Zotero.Item, outputDir: string): Promise<string>;
|
||||
};
|
||||
};
|
||||
}
|
||||
| undefined;
|
||||
}
|
||||
|
||||
interface Window {
|
||||
OrgExportAnnotationsPrefs?: {
|
||||
init(): void;
|
||||
browseNotesPath(): Promise<void>;
|
||||
browsePandocPath(): Promise<void>;
|
||||
testPandoc(): Promise<void>;
|
||||
exportAllNow(): Promise<void>;
|
||||
forceExportAllNow(): Promise<void>;
|
||||
};
|
||||
}
|
||||
|
||||
interface MenuManagerMenu {
|
||||
menuType: "menuitem" | "separator" | "submenu";
|
||||
l10nID?: string;
|
||||
label?: string;
|
||||
icon?: string;
|
||||
onCommand?: (event: Event, context: MenuManagerContext) => void;
|
||||
onShowing?: (event: Event, context: MenuManagerContext) => void;
|
||||
menus?: MenuManagerMenu[];
|
||||
}
|
||||
|
||||
interface MenuManagerContext {
|
||||
collectionTreeRow?: unknown;
|
||||
items?: Zotero.Item[];
|
||||
tabType?: string;
|
||||
tabSubType?: string;
|
||||
tabID?: string;
|
||||
menuElem?: Element;
|
||||
setL10nArgs?(l10nArgs: string): void;
|
||||
setEnabled?(enabled: boolean): void;
|
||||
setVisible?(visible: boolean): void;
|
||||
setIcon?(icon: string, darkIcon?: string): void;
|
||||
}
|
||||
|
||||
interface MenuManagerRegistration {
|
||||
menuID: string;
|
||||
pluginID: string;
|
||||
target: string;
|
||||
menus: MenuManagerMenu[];
|
||||
}
|
||||
|
||||
declare namespace Zotero {
|
||||
const MenuManager:
|
||||
| {
|
||||
registerMenu(options: MenuManagerRegistration): void;
|
||||
unregisterMenu(menuID: string): void;
|
||||
updateMenuPopup(
|
||||
menu: Element,
|
||||
target: string,
|
||||
options: { getContext: () => MenuManagerContext }
|
||||
): void;
|
||||
}
|
||||
| undefined;
|
||||
}
|
||||
|
||||
declare namespace IOUtils {
|
||||
function remove(path: string): Promise<void>;
|
||||
function exists(path: string): Promise<boolean>;
|
||||
function makeDirectory(path: string, options?: { ignoreExisting?: boolean }): Promise<void>;
|
||||
}
|
||||
|
||||
declare namespace PathUtils {
|
||||
function normalize(path: string): string;
|
||||
function join(...parts: string[]): string;
|
||||
function filename(path: string): string;
|
||||
const profileDir: string;
|
||||
}
|
||||
|
||||
// Gecko/XPCOM globals available in Zotero 7 runtime
|
||||
declare const Services: {
|
||||
dirsvc: {
|
||||
get(prop: string, iface: unknown): { path: string };
|
||||
};
|
||||
io: {
|
||||
newURI(spec: string): unknown;
|
||||
};
|
||||
scriptloader: {
|
||||
loadSubScript(url: string): void;
|
||||
};
|
||||
};
|
||||
|
||||
declare const Ci: {
|
||||
nsIFile: unknown;
|
||||
amIAddonManagerStartup: unknown;
|
||||
};
|
||||
|
||||
declare const Cc: {
|
||||
[contractID: string]: {
|
||||
getService(iface: unknown): unknown;
|
||||
};
|
||||
};
|
||||
36
typings/i10n.d.ts
vendored
Normal file
36
typings/i10n.d.ts
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
// Generated by zotero-plugin-scaffold
|
||||
/* prettier-ignore */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
export type FluentMessageId =
|
||||
| 'description'
|
||||
| 'error-better-notes-required'
|
||||
| 'error-notes-path-invalid'
|
||||
| 'error-notes-path-not-set'
|
||||
| 'error-pandoc-not-found'
|
||||
| 'menu-export-all'
|
||||
| 'menu-export-selected'
|
||||
| 'menu-preferences'
|
||||
| 'name'
|
||||
| 'notification-config-required'
|
||||
| 'notification-export-complete'
|
||||
| 'notification-export-error'
|
||||
| 'notification-no-items'
|
||||
| 'prefs-attach-org'
|
||||
| 'prefs-attach-org-description'
|
||||
| 'prefs-auto-export-sync'
|
||||
| 'prefs-browse'
|
||||
| 'prefs-debug'
|
||||
| 'prefs-export-now'
|
||||
| 'prefs-export-tab-close'
|
||||
| 'prefs-force-export'
|
||||
| 'prefs-notes-path'
|
||||
| 'prefs-notes-path-description'
|
||||
| 'prefs-pandoc-path'
|
||||
| 'prefs-pandoc-path-description'
|
||||
| 'prefs-section-advanced'
|
||||
| 'prefs-section-behavior'
|
||||
| 'prefs-section-paths'
|
||||
| 'prefs-show-notification'
|
||||
| 'prefs-test-pandoc'
|
||||
| 'prefs-title';
|
||||
19
typings/prefs.d.ts
vendored
Normal file
19
typings/prefs.d.ts
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
// Generated by zotero-plugin-scaffold
|
||||
/* prettier-ignore */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
// prettier-ignore
|
||||
declare namespace _ZoteroTypes {
|
||||
interface Prefs {
|
||||
PluginPrefsMap: {
|
||||
"notesPath": string;
|
||||
"pandocPath": string;
|
||||
"attachOrgFile": boolean;
|
||||
"autoExportOnSync": boolean;
|
||||
"exportOnTabClose": boolean;
|
||||
"showNotification": boolean;
|
||||
"debug": boolean;
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user