mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-02 08:19:56 +08:00
This commit is contained in:
parent
72d1a059ac
commit
d10b25c2ca
1
.gitignore
vendored
1
.gitignore
vendored
@ -11,6 +11,7 @@
|
|||||||
app/node_modules
|
app/node_modules
|
||||||
app/stage/build
|
app/stage/build
|
||||||
app/build
|
app/build
|
||||||
|
app/src/types/dist
|
||||||
app/kernel*
|
app/kernel*
|
||||||
ios
|
ios
|
||||||
pprof
|
pprof
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
build
|
build
|
||||||
dist
|
|
||||||
node_modules
|
node_modules
|
||||||
public
|
|
||||||
src/asset/pdf
|
src/asset/pdf
|
||||||
|
src/types/dist
|
||||||
stage
|
stage
|
||||||
appearance
|
appearance
|
||||||
|
@ -85,10 +85,10 @@ export const jumpToParent = (protyle: IProtyle, nodeElement: Element, type: "par
|
|||||||
openFileById({
|
openFileById({
|
||||||
app: protyle.app,
|
app: protyle.app,
|
||||||
id: targetId,
|
id: targetId,
|
||||||
action: [Constants.CB_GET_FOCUS, targetId !== protyle.block.rootID && protyle.block.showAll ? Constants.CB_GET_ALL : ""]
|
action: targetId !== protyle.block.rootID && protyle.block.showAll ? [Constants.CB_GET_ALL, Constants.CB_GET_FOCUS] : [Constants.CB_GET_FOCUS]
|
||||||
});
|
});
|
||||||
/// #else
|
/// #else
|
||||||
openMobileFileById(protyle.app, targetId, [Constants.CB_GET_FOCUS, targetId !== protyle.block.rootID && protyle.block.showAll ? Constants.CB_GET_ALL : ""]);
|
openMobileFileById(protyle.app, targetId, targetId !== protyle.block.rootID && protyle.block.showAll ? [Constants.CB_GET_ALL, Constants.CB_GET_FOCUS] : [Constants.CB_GET_FOCUS]);
|
||||||
/// #endif
|
/// #endif
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -262,10 +262,10 @@ export const globalCommand = (command: string, app: App) => {
|
|||||||
if (command === "closeTab") {
|
if (command === "closeTab") {
|
||||||
const activeTabElement = document.querySelector(".layout__tab--active");
|
const activeTabElement = document.querySelector(".layout__tab--active");
|
||||||
if (activeTabElement && activeTabElement.getBoundingClientRect().width > 0) {
|
if (activeTabElement && activeTabElement.getBoundingClientRect().width > 0) {
|
||||||
let type = "";
|
let type: TDock;
|
||||||
Array.from(activeTabElement.classList).find(item => {
|
Array.from(activeTabElement.classList).find(item => {
|
||||||
if (item.startsWith("sy__")) {
|
if (item.startsWith("sy__")) {
|
||||||
type = item.replace("sy__", "");
|
type = item.replace("sy__", "") as TDock;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -41,7 +41,7 @@ export const openFileById = async (options: {
|
|||||||
id: string,
|
id: string,
|
||||||
position?: string,
|
position?: string,
|
||||||
mode?: TEditorMode,
|
mode?: TEditorMode,
|
||||||
action?: string[]
|
action?: TProtyleAction[]
|
||||||
keepCursor?: boolean
|
keepCursor?: boolean
|
||||||
zoomIn?: boolean
|
zoomIn?: boolean
|
||||||
removeCurrentTab?: boolean
|
removeCurrentTab?: boolean
|
||||||
|
@ -85,7 +85,7 @@ export class Bookmark extends Model {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const id = element.getAttribute("data-node-id");
|
const id = element.getAttribute("data-node-id");
|
||||||
checkFold(id, (zoomIn, action: string[]) => {
|
checkFold(id, (zoomIn, action: TProtyleAction[]) => {
|
||||||
openFileById({
|
openFileById({
|
||||||
app,
|
app,
|
||||||
id,
|
id,
|
||||||
@ -111,7 +111,7 @@ export class Bookmark extends Model {
|
|||||||
},
|
},
|
||||||
altClick: (element: HTMLElement,) => {
|
altClick: (element: HTMLElement,) => {
|
||||||
const id = element.getAttribute("data-node-id");
|
const id = element.getAttribute("data-node-id");
|
||||||
checkFold(id, (zoomIn, action: string[]) => {
|
checkFold(id, (zoomIn, action: TProtyleAction[]) => {
|
||||||
openFileById({
|
openFileById({
|
||||||
app,
|
app,
|
||||||
id,
|
id,
|
||||||
@ -123,7 +123,7 @@ export class Bookmark extends Model {
|
|||||||
},
|
},
|
||||||
shiftClick: (element: HTMLElement) => {
|
shiftClick: (element: HTMLElement) => {
|
||||||
const id = element.getAttribute("data-node-id");
|
const id = element.getAttribute("data-node-id");
|
||||||
checkFold(id, (zoomIn, action: string[]) => {
|
checkFold(id, (zoomIn, action: TProtyleAction[]) => {
|
||||||
openFileById({
|
openFileById({
|
||||||
app,
|
app,
|
||||||
id,
|
id,
|
||||||
|
@ -667,7 +667,7 @@ export class Graph extends Model {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (window.siyuan.shiftIsPressed) {
|
if (window.siyuan.shiftIsPressed) {
|
||||||
checkFold(node.id, (zoomIn, action: string[]) => {
|
checkFold(node.id, (zoomIn, action: TProtyleAction[]) => {
|
||||||
openFileById({
|
openFileById({
|
||||||
app: this.app,
|
app: this.app,
|
||||||
id: node.id,
|
id: node.id,
|
||||||
@ -677,7 +677,7 @@ export class Graph extends Model {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else if (window.siyuan.altIsPressed) {
|
} else if (window.siyuan.altIsPressed) {
|
||||||
checkFold(node.id, (zoomIn, action: string[]) => {
|
checkFold(node.id, (zoomIn, action: TProtyleAction[]) => {
|
||||||
openFileById({
|
openFileById({
|
||||||
app: this.app,
|
app: this.app,
|
||||||
id: node.id,
|
id: node.id,
|
||||||
@ -695,7 +695,7 @@ export class Graph extends Model {
|
|||||||
nodeIds: [node.id],
|
nodeIds: [node.id],
|
||||||
}));
|
}));
|
||||||
} else {
|
} else {
|
||||||
checkFold(node.id, (zoomIn, action: string[]) => {
|
checkFold(node.id, (zoomIn, action: TProtyleAction[]) => {
|
||||||
openFileById({
|
openFileById({
|
||||||
app: this.app,
|
app: this.app,
|
||||||
id: node.id,
|
id: node.id,
|
||||||
|
@ -29,7 +29,7 @@ export class Dock {
|
|||||||
private app: App;
|
private app: App;
|
||||||
public resizeElement: HTMLElement;
|
public resizeElement: HTMLElement;
|
||||||
public pin = true;
|
public pin = true;
|
||||||
public data: { [key: string]: Model | boolean };
|
public data: { [key in TDock | string]?: Model | boolean };
|
||||||
private hideResizeTimeout: number;
|
private hideResizeTimeout: number;
|
||||||
|
|
||||||
constructor(options: {
|
constructor(options: {
|
||||||
@ -112,13 +112,13 @@ export class Dock {
|
|||||||
this.resizeElement.classList.add("fn__none");
|
this.resizeElement.classList.add("fn__none");
|
||||||
} else {
|
} else {
|
||||||
activeElements.forEach(item => {
|
activeElements.forEach(item => {
|
||||||
this.toggleModel(item.getAttribute("data-type"), true, false, false, false);
|
this.toggleModel(item.getAttribute("data-type") as TDock, true, false, false, false);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.element.addEventListener("click", (event) => {
|
this.element.addEventListener("click", (event) => {
|
||||||
let target = event.target as HTMLElement;
|
let target = event.target as HTMLElement;
|
||||||
while (target && !target.isEqualNode(this.element)) {
|
while (target && !target.isEqualNode(this.element)) {
|
||||||
const type = target.getAttribute("data-type");
|
const type = target.getAttribute("data-type") as TDock;
|
||||||
if (type) {
|
if (type) {
|
||||||
this.toggleModel(type, false, true);
|
this.toggleModel(type, false, true);
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
@ -359,7 +359,7 @@ export class Dock {
|
|||||||
documentSelf.onselect = null;
|
documentSelf.onselect = null;
|
||||||
this.setSize();
|
this.setSize();
|
||||||
this.element.querySelectorAll(".dock__item--active").forEach(item => {
|
this.element.querySelectorAll(".dock__item--active").forEach(item => {
|
||||||
const customModel = this.data[item.getAttribute("data-type")];
|
const customModel = this.data[item.getAttribute("data-type") as TDock];
|
||||||
if (customModel && customModel instanceof Custom && customModel.resize) {
|
if (customModel && customModel instanceof Custom && customModel.resize) {
|
||||||
customModel.resize();
|
customModel.resize();
|
||||||
}
|
}
|
||||||
@ -491,7 +491,7 @@ export class Dock {
|
|||||||
this.layout.element.querySelector(".layout__tab--active")?.classList.remove("layout__tab--active");
|
this.layout.element.querySelector(".layout__tab--active")?.classList.remove("layout__tab--active");
|
||||||
}
|
}
|
||||||
|
|
||||||
public toggleModel(type: string, show = false, close = false, hide = false, isSaveLayout = true) {
|
public toggleModel(type: TDock | string, show = false, close = false, hide = false, isSaveLayout = true) {
|
||||||
if (!type) {
|
if (!type) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -757,7 +757,7 @@ export class Dock {
|
|||||||
public add(index: number, sourceElement: Element, previousType?: string) {
|
public add(index: number, sourceElement: Element, previousType?: string) {
|
||||||
sourceElement.setAttribute("data-height", "");
|
sourceElement.setAttribute("data-height", "");
|
||||||
sourceElement.setAttribute("data-width", "");
|
sourceElement.setAttribute("data-width", "");
|
||||||
const type = sourceElement.getAttribute("data-type");
|
const type = sourceElement.getAttribute("data-type") as TDock;
|
||||||
const sourceDock = getDockByType(type);
|
const sourceDock = getDockByType(type);
|
||||||
if (sourceDock.element.querySelectorAll(".dock__item").length === 2) {
|
if (sourceDock.element.querySelectorAll(".dock__item").length === 2) {
|
||||||
sourceDock.element.classList.add("fn__none");
|
sourceDock.element.classList.add("fn__none");
|
||||||
@ -794,7 +794,7 @@ export class Dock {
|
|||||||
saveLayout();
|
saveLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
public remove(key: string) {
|
public remove(key: TDock|string) {
|
||||||
this.toggleModel(key, false, true, true);
|
this.toggleModel(key, false, true, true);
|
||||||
this.element.querySelector(`[data-type="${key}"]`).remove();
|
this.element.querySelector(`[data-type="${key}"]`).remove();
|
||||||
const custom = this.data[key] as Custom;
|
const custom = this.data[key] as Custom;
|
||||||
@ -809,12 +809,12 @@ export class Dock {
|
|||||||
activesElement.forEach((item) => {
|
activesElement.forEach((item) => {
|
||||||
if (this.position === "Left" || this.position === "Right") {
|
if (this.position === "Left" || this.position === "Right") {
|
||||||
if (item.getAttribute("data-index") === "1" && activesElement.length > 1) {
|
if (item.getAttribute("data-index") === "1" && activesElement.length > 1) {
|
||||||
item.setAttribute("data-height", (this.data[item.getAttribute("data-type")] as Model).parent.parent.element.clientHeight.toString());
|
item.setAttribute("data-height", (this.data[item.getAttribute("data-type") as TDock] as Model).parent.parent.element.clientHeight.toString());
|
||||||
}
|
}
|
||||||
item.setAttribute("data-width", this.layout.element.clientWidth.toString());
|
item.setAttribute("data-width", this.layout.element.clientWidth.toString());
|
||||||
} else {
|
} else {
|
||||||
if (item.getAttribute("data-index") === "1" && activesElement.length > 1) {
|
if (item.getAttribute("data-index") === "1" && activesElement.length > 1) {
|
||||||
item.setAttribute("data-width", (this.data[item.getAttribute("data-type")] as Model).parent.parent.element.clientWidth.toString());
|
item.setAttribute("data-width", (this.data[item.getAttribute("data-type") as TDock] as Model).parent.parent.element.clientWidth.toString());
|
||||||
}
|
}
|
||||||
item.setAttribute("data-height", this.layout.element.clientHeight.toString());
|
item.setAttribute("data-height", this.layout.element.clientHeight.toString());
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ export const switchTabByIndex = (index: number) => {
|
|||||||
indexElement = activeDockIcoElement.parentElement.firstElementChild;
|
indexElement = activeDockIcoElement.parentElement.firstElementChild;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const type = indexElement?.getAttribute("data-type");
|
const type = indexElement?.getAttribute("data-type") as TDock;
|
||||||
if (type) {
|
if (type) {
|
||||||
getDockByType(type)?.toggleModel(type, true, false);
|
getDockByType(type)?.toggleModel(type, true, false);
|
||||||
}
|
}
|
||||||
@ -142,7 +142,7 @@ export const resizeTabs = (isSaveLayout = true) => {
|
|||||||
}, 200);
|
}, 200);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getDockByType = (type: string) => {
|
export const getDockByType = (type: TDock | string) => {
|
||||||
if (!window.siyuan.layout.leftDock) {
|
if (!window.siyuan.layout.leftDock) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
@ -253,7 +253,7 @@ export const copyTab = (app: App, tab: Tab) => {
|
|||||||
callback(newTab: Tab) {
|
callback(newTab: Tab) {
|
||||||
let model: Model;
|
let model: Model;
|
||||||
if (tab.model instanceof Editor) {
|
if (tab.model instanceof Editor) {
|
||||||
const newAction: string[] = [];
|
const newAction: TProtyleAction[] = [];
|
||||||
// https://github.com/siyuan-note/siyuan/issues/12132
|
// https://github.com/siyuan-note/siyuan/issues/12132
|
||||||
tab.model.editor.protyle.block.action.forEach(item => {
|
tab.model.editor.protyle.block.action.forEach(item => {
|
||||||
if (item !== Constants.CB_GET_APPEND && item !== Constants.CB_GET_BEFORE && item !== Constants.CB_GET_HTML) {
|
if (item !== Constants.CB_GET_APPEND && item !== Constants.CB_GET_BEFORE && item !== Constants.CB_GET_HTML) {
|
||||||
|
@ -18,6 +18,7 @@ import {Protyle} from "../protyle";
|
|||||||
import {openMobileFileById} from "../mobile/editor";
|
import {openMobileFileById} from "../mobile/editor";
|
||||||
import {lockScreen, exitSiYuan} from "../dialog/processSystem";
|
import {lockScreen, exitSiYuan} from "../dialog/processSystem";
|
||||||
import {Model} from "../layout/Model";
|
import {Model} from "../layout/Model";
|
||||||
|
import {getDockByType} from "../layout/tabUtil";
|
||||||
|
|
||||||
let openTab;
|
let openTab;
|
||||||
let openWindow;
|
let openWindow;
|
||||||
@ -52,7 +53,7 @@ openTab = (options: {
|
|||||||
app: App,
|
app: App,
|
||||||
doc?: {
|
doc?: {
|
||||||
id: string, // 块 id
|
id: string, // 块 id
|
||||||
action?: string [] // cb-get-all:获取所有内容;cb-get-focus:打开后光标定位在 id 所在的块;cb-get-hl: 打开后 id 块高亮
|
action?: TProtyleAction [] // cb-get-all:获取所有内容;cb-get-focus:打开后光标定位在 id 所在的块;cb-get-hl: 打开后 id 块高亮
|
||||||
zoomIn?: boolean // 是否缩放
|
zoomIn?: boolean // 是否缩放
|
||||||
},
|
},
|
||||||
pdf?: {
|
pdf?: {
|
||||||
@ -166,23 +167,24 @@ openTab = (options: {
|
|||||||
/// #endif
|
/// #endif
|
||||||
|
|
||||||
export const API = {
|
export const API = {
|
||||||
confirm: confirmDialog,
|
|
||||||
showMessage,
|
|
||||||
adaptHotkey: updateHotkeyTip,
|
adaptHotkey: updateHotkeyTip,
|
||||||
|
confirm: confirmDialog,
|
||||||
|
Constants,
|
||||||
|
showMessage,
|
||||||
fetchPost,
|
fetchPost,
|
||||||
fetchSyncPost,
|
fetchSyncPost,
|
||||||
fetchGet,
|
fetchGet,
|
||||||
getFrontend,
|
getFrontend,
|
||||||
getBackend,
|
getBackend,
|
||||||
lockScreen,
|
getDockByType,
|
||||||
exitSiYuan,
|
|
||||||
openMobileFileById,
|
|
||||||
openTab,
|
openTab,
|
||||||
openWindow,
|
openWindow,
|
||||||
|
openMobileFileById,
|
||||||
|
lockScreen,
|
||||||
|
exitSiYuan,
|
||||||
Protyle,
|
Protyle,
|
||||||
Plugin,
|
Plugin,
|
||||||
Dialog,
|
Dialog,
|
||||||
Menu,
|
Menu,
|
||||||
Setting,
|
Setting,
|
||||||
Constants,
|
|
||||||
};
|
};
|
||||||
|
@ -8,9 +8,6 @@ export class EventBus<DetailType = any> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
on(type: TEventBus, listener: (event: CustomEvent<DetailType>) => void) {
|
on(type: TEventBus, listener: (event: CustomEvent<DetailType>) => void) {
|
||||||
if (type ==="loaded-protyle") {
|
|
||||||
console.warn("0.8.8 将移除 loaded-protyle, 请使用 loaded-protyle-static 进行替代");
|
|
||||||
}
|
|
||||||
this.eventTarget.addEventListener(type, listener);
|
this.eventTarget.addEventListener(type, listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ export const getDocByScroll = (options: {
|
|||||||
focus?: boolean,
|
focus?: boolean,
|
||||||
updateReadonly?: boolean
|
updateReadonly?: boolean
|
||||||
}) => {
|
}) => {
|
||||||
let actions: string[] = [];
|
let actions: TProtyleAction[] = [];
|
||||||
if (options.mergedOptions) {
|
if (options.mergedOptions) {
|
||||||
actions = options.mergedOptions.action;
|
actions = options.mergedOptions.action;
|
||||||
} else {
|
} else {
|
||||||
|
@ -24,7 +24,7 @@ import {getContenteditableElement} from "../wysiwyg/getBlock";
|
|||||||
export const onGet = (options: {
|
export const onGet = (options: {
|
||||||
data: IWebSocketData,
|
data: IWebSocketData,
|
||||||
protyle: IProtyle,
|
protyle: IProtyle,
|
||||||
action?: string[],
|
action?: TProtyleAction[],
|
||||||
scrollAttr?: IScrollAttr
|
scrollAttr?: IScrollAttr
|
||||||
updateReadonly?: boolean
|
updateReadonly?: boolean
|
||||||
afterCB?: () => void
|
afterCB?: () => void
|
||||||
@ -290,7 +290,6 @@ const setHTML = (options: {
|
|||||||
|
|
||||||
}
|
}
|
||||||
protyle.app.plugins.forEach(item => {
|
protyle.app.plugins.forEach(item => {
|
||||||
item.eventBus.emit("loaded-protyle", protyle); // 准备废弃
|
|
||||||
item.eventBus.emit("loaded-protyle-static", {protyle});
|
item.eventBus.emit("loaded-protyle-static", {protyle});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
2
app/src/types/config.d.ts
vendored
2
app/src/types/config.d.ts
vendored
@ -1646,7 +1646,7 @@ declare namespace Config {
|
|||||||
/**
|
/**
|
||||||
* Tab type
|
* Tab type
|
||||||
*/
|
*/
|
||||||
type: string;
|
type: TDock | string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
7
app/src/types/index.d.ts
vendored
7
app/src/types/index.d.ts
vendored
@ -1,6 +1,7 @@
|
|||||||
type TPluginDockPosition = "LeftTop" | "LeftBottom" | "RightTop" | "RightBottom" | "BottomLeft" | "BottomRight"
|
type TPluginDockPosition = "LeftTop" | "LeftBottom" | "RightTop" | "RightBottom" | "BottomLeft" | "BottomRight"
|
||||||
type TDockPosition = "Left" | "Right" | "Bottom"
|
type TDockPosition = "Left" | "Right" | "Bottom"
|
||||||
type TWS = "main" | "filetree" | "protyle"
|
type TWS = "main" | "filetree" | "protyle"
|
||||||
|
type TDock = "file" | "outline" | "inbox" | "bookmark" | "tag" | "graph" | "globalGraph" | "backlink"
|
||||||
type TOperation =
|
type TOperation =
|
||||||
"insert"
|
"insert"
|
||||||
| "update"
|
| "update"
|
||||||
@ -63,7 +64,7 @@ type TEventBus = "ws-main" | "sync-start" | "sync-end" | "sync-fail" |
|
|||||||
"closed-notebook" |
|
"closed-notebook" |
|
||||||
"paste" |
|
"paste" |
|
||||||
"input-search" |
|
"input-search" |
|
||||||
"loaded-protyle" | "loaded-protyle-dynamic" | "loaded-protyle-static" |
|
"loaded-protyle-dynamic" | "loaded-protyle-static" |
|
||||||
"switch-protyle" |
|
"switch-protyle" |
|
||||||
"destroy-protyle" |
|
"destroy-protyle" |
|
||||||
"lock-screen" |
|
"lock-screen" |
|
||||||
@ -316,7 +317,7 @@ interface IBackStack {
|
|||||||
notebookId: string
|
notebookId: string
|
||||||
},
|
},
|
||||||
scrollTop?: number,
|
scrollTop?: number,
|
||||||
callback?: string[],
|
callback?: TProtyleAction[],
|
||||||
position?: {
|
position?: {
|
||||||
start: number,
|
start: number,
|
||||||
end: number
|
end: number
|
||||||
@ -543,7 +544,7 @@ interface IOpenFileOptions {
|
|||||||
position?: string, // file 或者 asset,打开位置
|
position?: string, // file 或者 asset,打开位置
|
||||||
page?: number | string, // asset
|
page?: number | string, // asset
|
||||||
mode?: TEditorMode // file
|
mode?: TEditorMode // file
|
||||||
action?: string[]
|
action?: TProtyleAction[]
|
||||||
keepCursor?: boolean // file,是否跳转到新 tab 上
|
keepCursor?: boolean // file,是否跳转到新 tab 上
|
||||||
zoomIn?: boolean // 是否缩放
|
zoomIn?: boolean // 是否缩放
|
||||||
removeCurrentTab?: boolean // 在当前页签打开时需移除原有页签
|
removeCurrentTab?: boolean // 在当前页签打开时需移除原有页签
|
||||||
|
2
app/src/types/protyle.d.ts
vendored
2
app/src/types/protyle.d.ts
vendored
@ -498,7 +498,7 @@ interface IProtyle {
|
|||||||
showAll?: boolean
|
showAll?: boolean
|
||||||
mode?: number
|
mode?: number
|
||||||
blockCount?: number
|
blockCount?: number
|
||||||
action?: string[]
|
action?: TProtyleAction[]
|
||||||
},
|
},
|
||||||
disabled: boolean,
|
disabled: boolean,
|
||||||
selectElement?: HTMLElement,
|
selectElement?: HTMLElement,
|
||||||
|
@ -35,7 +35,7 @@ export const getWorkspaceName = () => {
|
|||||||
return pathPosix().basename(window.siyuan.config.system.workspaceDir.replace(/\\/g, "/"));
|
return pathPosix().basename(window.siyuan.config.system.workspaceDir.replace(/\\/g, "/"));
|
||||||
};
|
};
|
||||||
|
|
||||||
export const checkFold = (id: string, cb: (zoomIn: boolean, action: string[], isRoot: boolean) => void) => {
|
export const checkFold = (id: string, cb: (zoomIn: boolean, action: TProtyleAction[], isRoot: boolean) => void) => {
|
||||||
if (!id) {
|
if (!id) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "./dist/",
|
"outDir": "./src/types/dist",
|
||||||
"noImplicitAny": true,
|
"noImplicitAny": true,
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"target": "es6",
|
"target": "es6",
|
||||||
|
Loading…
Reference in New Issue
Block a user