update: ztoolkit
This commit is contained in:
parent
b356590622
commit
08adac1c43
|
|
@ -35,7 +35,7 @@
|
|||
"unist-util-visit": "^5.0.0",
|
||||
"unist-util-visit-parents": "^6.0.1",
|
||||
"yamljs": "^0.3.0",
|
||||
"zotero-plugin-toolkit": "^3.0.3"
|
||||
"zotero-plugin-toolkit": "^4.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
||||
|
|
@ -14980,11 +14980,14 @@
|
|||
}
|
||||
},
|
||||
"node_modules/zotero-plugin-toolkit": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/zotero-plugin-toolkit/-/zotero-plugin-toolkit-3.0.3.tgz",
|
||||
"integrity": "sha512-EEor041k9/05gBPuHy3ghX1nN++0We5+5+HIb6EHj2NJaHQ06e4asj31EpLaVBOMmCa72vocbYbHlpBXbZgmGA==",
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/zotero-plugin-toolkit/-/zotero-plugin-toolkit-4.0.3.tgz",
|
||||
"integrity": "sha512-H88eFYD8uPfAMIskdEdriPaE+/Z+emquI7QMIbQu0yTzT0W6hQUberURJ5DNnd4ETtc2N1hCAxn0f7KXPbfseg==",
|
||||
"dependencies": {
|
||||
"zotero-types": "^2.0.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16"
|
||||
}
|
||||
},
|
||||
"node_modules/zotero-types": {
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
"unist-util-visit": "^5.0.0",
|
||||
"unist-util-visit-parents": "^6.0.1",
|
||||
"yamljs": "^0.3.0",
|
||||
"zotero-plugin-toolkit": "^3.0.3"
|
||||
"zotero-plugin-toolkit": "^4.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
||||
|
|
|
|||
13
src/addon.ts
13
src/addon.ts
|
|
@ -1,12 +1,7 @@
|
|||
import { Prompt } from "zotero-plugin-toolkit/dist/managers/prompt";
|
||||
import {
|
||||
ColumnOptions,
|
||||
VirtualizedTableHelper,
|
||||
} from "zotero-plugin-toolkit/dist/helpers/virtualizedTable";
|
||||
import { LargePrefHelper } from "zotero-plugin-toolkit/dist/helpers/largePref";
|
||||
import ToolkitGlobal from "zotero-plugin-toolkit/dist/managers/toolkitGlobal";
|
||||
import { Prompt, PromptManager } from "zotero-plugin-toolkit";
|
||||
import { VirtualizedTableHelper } from "zotero-plugin-toolkit";
|
||||
import { LargePrefHelper } from "zotero-plugin-toolkit";
|
||||
|
||||
import { getPref, setPref } from "./utils/prefs";
|
||||
import { SyncDataType } from "./modules/sync/managerWindow";
|
||||
import hooks from "./hooks";
|
||||
import api from "./api";
|
||||
|
|
@ -126,7 +121,7 @@ class Addon {
|
|||
relation: {},
|
||||
imageCache: {},
|
||||
get prompt() {
|
||||
return ToolkitGlobal.getInstance().prompt.instance;
|
||||
return new PromptManager().prompt;
|
||||
},
|
||||
hint: {
|
||||
silent: false,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { config } from "../../../package.json";
|
||||
import { VirtualizedTableHelper } from "zotero-plugin-toolkit/dist/helpers/virtualizedTable";
|
||||
import { VirtualizedTableHelper } from "zotero-plugin-toolkit";
|
||||
import { PluginCEBase } from "../base";
|
||||
import {
|
||||
getPref,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { config } from "../../../package.json";
|
||||
import { VirtualizedTableHelper } from "zotero-plugin-toolkit/dist/helpers/virtualizedTable";
|
||||
import { VirtualizedTableHelper } from "zotero-plugin-toolkit";
|
||||
import { PluginCEBase } from "../base";
|
||||
import TreeModel = require("tree-model");
|
||||
import { waitUtilAsync } from "../../utils/wait";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { config } from "../../../package.json";
|
||||
import { VirtualizedTableHelper } from "zotero-plugin-toolkit/dist/helpers/virtualizedTable";
|
||||
import { VirtualizedTableHelper } from "zotero-plugin-toolkit";
|
||||
import { PluginCEBase } from "../base";
|
||||
import TreeModel = require("tree-model");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { FilePickerHelper } from "zotero-plugin-toolkit/dist/helpers/filePicker";
|
||||
import { FilePickerHelper } from "zotero-plugin-toolkit";
|
||||
import { config } from "../../../package.json";
|
||||
import { formatPath } from "../../utils/str";
|
||||
import { waitUtilAsync } from "../../utils/wait";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { BasicTool } from "zotero-plugin-toolkit/dist/basic";
|
||||
import { BasicTool } from "zotero-plugin-toolkit";
|
||||
import Addon from "./addon";
|
||||
import { config } from "../package.json";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Prompt } from "zotero-plugin-toolkit/dist/managers/prompt";
|
||||
import { Prompt } from "zotero-plugin-toolkit";
|
||||
import { addLineToNote } from "../../utils/note";
|
||||
import { getString } from "../../utils/locale";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { PatchHelper } from "zotero-plugin-toolkit/dist/helpers/patch";
|
||||
import { PatchHelper } from "zotero-plugin-toolkit";
|
||||
import { getPref } from "../utils/prefs";
|
||||
|
||||
export function patchViewItems(win: Window) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { config } from "../../package.json";
|
||||
import { ProgressWindowHelper } from "zotero-plugin-toolkit/dist/helpers/progressWindow";
|
||||
import { ProgressWindowHelper } from "zotero-plugin-toolkit";
|
||||
import { PROGRESS_TITLE } from "./config";
|
||||
import { waitUtilAsync } from "./wait";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,17 @@
|
|||
import {
|
||||
BasicTool,
|
||||
UITool,
|
||||
PromptManager,
|
||||
MenuManager,
|
||||
ClipboardHelper,
|
||||
FilePickerHelper,
|
||||
ProgressWindowHelper,
|
||||
VirtualizedTableHelper,
|
||||
DialogHelper,
|
||||
LargePrefHelper,
|
||||
GuideHelper,
|
||||
unregister,
|
||||
} from "zotero-plugin-toolkit";
|
||||
import { config } from "../../package.json";
|
||||
|
||||
export { createZToolkit };
|
||||
|
|
@ -27,18 +41,6 @@ function initZToolkit(_ztoolkit: ReturnType<typeof createZToolkit>) {
|
|||
);
|
||||
}
|
||||
|
||||
import { BasicTool, unregister } from "zotero-plugin-toolkit/dist/basic";
|
||||
import { UITool } from "zotero-plugin-toolkit/dist/tools/ui";
|
||||
import { ClipboardHelper } from "zotero-plugin-toolkit/dist/helpers/clipboard";
|
||||
import { DialogHelper } from "zotero-plugin-toolkit/dist/helpers/dialog";
|
||||
import { FilePickerHelper } from "zotero-plugin-toolkit/dist/helpers/filePicker";
|
||||
import { ProgressWindowHelper } from "zotero-plugin-toolkit/dist/helpers/progressWindow";
|
||||
import { VirtualizedTableHelper } from "zotero-plugin-toolkit/dist/helpers/virtualizedTable";
|
||||
import { MenuManager } from "zotero-plugin-toolkit/dist/managers/menu";
|
||||
import { PromptManager } from "zotero-plugin-toolkit/dist/managers/prompt";
|
||||
import { LargePrefHelper } from "zotero-plugin-toolkit/dist/helpers/largePref";
|
||||
import { GuideHelper } from "zotero-plugin-toolkit/dist/helpers/guide";
|
||||
|
||||
class MyToolkit extends BasicTool {
|
||||
UI: UITool;
|
||||
Prompt: PromptManager;
|
||||
|
|
|
|||
Loading…
Reference in New Issue