types
This commit is contained in:
parent
2a11649f8f
commit
1a716baca4
325
simple-mind-map/types/index.d.ts
vendored
Normal file
325
simple-mind-map/types/index.d.ts
vendored
Normal file
@ -0,0 +1,325 @@
|
||||
export default MindMap;
|
||||
declare class MindMap {
|
||||
/**
|
||||
*
|
||||
* @param {defaultOpt} opt
|
||||
*/
|
||||
constructor(opt?:{
|
||||
el?:any;
|
||||
data?:any;
|
||||
viewData?:any;
|
||||
readonly?:boolean;
|
||||
layout?:string;
|
||||
fishboneDeg?:number;
|
||||
theme?:string;
|
||||
themeConfig?:{};
|
||||
scaleRatio?:number;
|
||||
translateRatio?:number;
|
||||
minZoomRatio?:number;
|
||||
maxZoomRatio?:number;
|
||||
customCheckIsTouchPad?:any;
|
||||
mouseScaleCenterUseMousePosition?:boolean;
|
||||
maxTag?:number;
|
||||
expandBtnSize?:number;
|
||||
imgTextMargin?:number;
|
||||
textContentMargin?:number;
|
||||
customNoteContentShow?:any;
|
||||
textAutoWrapWidth?:number;
|
||||
customHandleMousewheel?:any;
|
||||
mousewheelAction?:string;
|
||||
mousewheelMoveStep?:number;
|
||||
mousewheelZoomActionReverse?:boolean;
|
||||
defaultInsertSecondLevelNodeText?:string;
|
||||
defaultInsertBelowSecondLevelNodeText?:string;
|
||||
expandBtnStyle?:{
|
||||
color?:string;
|
||||
fill?:string;
|
||||
fontSize?:number;
|
||||
strokeColor?:string;
|
||||
};
|
||||
expandBtnIcon?:{
|
||||
open?:string;
|
||||
close?:string;
|
||||
};
|
||||
expandBtnNumHandler?:any;
|
||||
isShowExpandNum?:boolean;
|
||||
enableShortcutOnlyWhenMouseInSvg?:boolean;
|
||||
customCheckEnableShortcut?:any;
|
||||
initRootNodePosition?:any;
|
||||
nodeTextEditZIndex?:number;
|
||||
nodeNoteTooltipZIndex?:number;
|
||||
isEndNodeTextEditOnClickOuter?:boolean;
|
||||
maxHistoryCount?:number;
|
||||
alwaysShowExpandBtn?:boolean;
|
||||
notShowExpandBtn?:boolean;
|
||||
iconList?:any[];
|
||||
maxNodeCacheCount?:number;
|
||||
fitPadding?:number;
|
||||
enableCtrlKeyNodeSelection?:boolean;
|
||||
useLeftKeySelectionRightKeyDrag?:boolean;
|
||||
beforeTextEdit?:any;
|
||||
isUseCustomNodeContent?:boolean;
|
||||
customCreateNodeContent?:any;
|
||||
customInnerElsAppendTo?:any;
|
||||
enableAutoEnterTextEditWhenKeydown?:boolean;
|
||||
autoEmptyTextWhenKeydownEnterEdit?:boolean;
|
||||
customHandleClipboardText?:any;
|
||||
disableMouseWheelZoom?:boolean;
|
||||
errorHandler?:(code?:any, error?:any) => void;
|
||||
enableDblclickBackToRootNode?:boolean;
|
||||
hoverRectColor?:string;
|
||||
hoverRectPadding?:number;
|
||||
selectTextOnEnterEditText?:boolean;
|
||||
deleteNodeActive?:boolean;
|
||||
fit?:boolean;
|
||||
tagsColorMap?:{};
|
||||
cooperateStyle?:{
|
||||
avatarSize?:number;
|
||||
fontSize?:number;
|
||||
};
|
||||
onlyOneEnableActiveNodeOnCooperate?:boolean;
|
||||
defaultGeneralizationText?:string;
|
||||
handleIsSplitByWrapOnPasteCreateNewNode?:any;
|
||||
addHistoryTime?:number;
|
||||
isDisableDrag?:boolean;
|
||||
createNewNodeBehavior?:string;
|
||||
defaultNodeImage?:string;
|
||||
isLimitMindMapInCanvas?:boolean;
|
||||
handleNodePasteImg?:any;
|
||||
customCreateNodePath?:any;
|
||||
customCreateNodePolygon?:any;
|
||||
customTransformNodeLinePath?:any;
|
||||
beforeShortcutRun?:any;
|
||||
resetScaleOnMoveNodeToCenter?:boolean;
|
||||
createNodePrefixContent?:any;
|
||||
createNodePostfixContent?:any;
|
||||
disabledClipboard?:boolean;
|
||||
customHyperlinkJump?:any;
|
||||
openPerformance?:boolean;
|
||||
performanceConfig?:{
|
||||
time?:number;
|
||||
padding?:number;
|
||||
removeNodeWhenOutCanvas?:boolean;
|
||||
};
|
||||
emptyTextMeasureHeightText?:string;
|
||||
openRealtimeRenderOnNodeTextEdit?:boolean;
|
||||
mousedownEventPreventDefault?:boolean;
|
||||
onlyPasteTextWhenHasImgAndText?:boolean;
|
||||
enableDragModifyNodeWidth?:boolean;
|
||||
minNodeTextModifyWidth?:number;
|
||||
maxNodeTextModifyWidth?:number;
|
||||
customHandleLine?:any;
|
||||
addHistoryOnInit?:boolean;
|
||||
noteIcon?:{
|
||||
icon?:string;
|
||||
style?:{};
|
||||
};
|
||||
hyperlinkIcon?:{
|
||||
icon?:string;
|
||||
style?:{};
|
||||
};
|
||||
attachmentIcon?:{
|
||||
icon?:string;
|
||||
style?:{};
|
||||
};
|
||||
isShowCreateChildBtnIcon?:boolean;
|
||||
quickCreateChildBtnIcon?:{
|
||||
icon?:string;
|
||||
style?:{};
|
||||
};
|
||||
customQuickCreateChildBtnClick?:any;
|
||||
addCustomContentToNode?:any;
|
||||
enableInheritAncestorLineStyle?:boolean;
|
||||
selectTranslateStep?:number;
|
||||
selectTranslateLimit?:number;
|
||||
enableFreeDrag?:boolean;
|
||||
autoMoveWhenMouseInEdgeOnDrag?:boolean;
|
||||
dragMultiNodeRectConfig?:{
|
||||
width?:number;
|
||||
height?:number;
|
||||
fill?:string;
|
||||
};
|
||||
dragPlaceholderRectFill?:string;
|
||||
dragPlaceholderLineConfig?:{
|
||||
color?:string;
|
||||
width?:number;
|
||||
};
|
||||
dragOpacityConfig?:{
|
||||
cloneNodeOpacity?:number;
|
||||
beingDragNodeOpacity?:number;
|
||||
};
|
||||
handleDragCloneNode?:any;
|
||||
beforeDragEnd?:any;
|
||||
beforeDragStart?:any;
|
||||
watermarkConfig?:{
|
||||
onlyExport?:boolean;
|
||||
text?:string;
|
||||
lineSpacing?:number;
|
||||
textSpacing?:number;
|
||||
angle?:number;
|
||||
textStyle?:{
|
||||
color?:string;
|
||||
opacity?:number;
|
||||
fontSize?:number;
|
||||
};
|
||||
belowNode?:boolean;
|
||||
};
|
||||
exportPaddingX?:number;
|
||||
exportPaddingY?:number;
|
||||
resetCss?:string;
|
||||
minExportImgCanvasScale?:number;
|
||||
addContentToHeader?:any;
|
||||
addContentToFooter?:any;
|
||||
handleBeingExportSvg?:any;
|
||||
maxCanvasSize?:number;
|
||||
defaultAssociativeLineText?:string;
|
||||
associativeLineIsAlwaysAboveNode?:boolean;
|
||||
associativeLineInitPointsPosition?:{
|
||||
from?:string;
|
||||
to?:string;
|
||||
};
|
||||
enableAdjustAssociativeLinePoints?:boolean;
|
||||
beforeAssociativeLineConnection?:any;
|
||||
disableTouchZoom?:boolean;
|
||||
minTouchZoomScale?:number;
|
||||
maxTouchZoomScale?:number;
|
||||
isLimitMindMapInCanvasWhenHasScrollbar?:boolean;
|
||||
isOnlySearchCurrentRenderNodes?:boolean;
|
||||
beforeCooperateUpdate?:any;
|
||||
rainbowLinesConfig?:{
|
||||
open?:boolean;
|
||||
colorsList?:any[];
|
||||
};
|
||||
demonstrateConfig?:any;
|
||||
enableEditFormulaInRichTextEdit?:boolean;
|
||||
katexFontPath?:string;
|
||||
getKatexOutputType?:any;
|
||||
transformRichTextOnEnterEdit?:any;
|
||||
beforeHideRichTextEdit?:any;
|
||||
outerFramePaddingX?:number;
|
||||
outerFramePaddingY?:number;
|
||||
defaultOuterFrameText?:string;
|
||||
onlyPainterNodeCustomStyles?:boolean;
|
||||
beforeDeleteNodeImg?:any;
|
||||
imgResizeBtnSize?:number;
|
||||
minImgResizeWidth?:number;
|
||||
minImgResizeHeight?:number;
|
||||
maxImgResizeWidthInheritTheme?:boolean;
|
||||
maxImgResizeWidth?:number;
|
||||
maxImgResizeHeight?:number;
|
||||
customDeleteBtnInnerHTML?:string;
|
||||
customResizeBtnInnerHTML?:string;
|
||||
});
|
||||
opt?:any;
|
||||
el?:any;
|
||||
initWidth?:any;
|
||||
initHeight?:any;
|
||||
cssEl?:HTMLStyleElement;
|
||||
cssTextMap?:{};
|
||||
nodeInnerPrefixList?:any[];
|
||||
nodeInnerPostfixList?:any[];
|
||||
editNodeClassList?:any[];
|
||||
extendShapeList?:any[];
|
||||
event?:Event;
|
||||
keyCommand?:KeyCommand;
|
||||
command?:Command;
|
||||
renderer?:Render;
|
||||
view?:View;
|
||||
batchExecution?:BatchExecution;
|
||||
handleOpt(opt?:any):any;
|
||||
handleData(data?:any):any;
|
||||
initContainer():void;
|
||||
associativeLineDraw?:any;
|
||||
svg?:any;
|
||||
draw?:any;
|
||||
lineDraw?:any;
|
||||
nodeDraw?:any;
|
||||
otherDraw?:any;
|
||||
clearDraw():void;
|
||||
appendCss(key?:any, str?:any):void;
|
||||
removeAppendCss(key?:any):void;
|
||||
joinCss():string;
|
||||
addCss():void;
|
||||
removeCss():void;
|
||||
checkEditNodeClassIndex(className?:any):number;
|
||||
addEditNodeClass(className?:any):void;
|
||||
deleteEditNodeClass(className?:any):void;
|
||||
render(callback?:any, source?:string):void;
|
||||
reRender(callback?:any, source?:string):void;
|
||||
getElRectInfo():void;
|
||||
elRect?:any;
|
||||
width?:any;
|
||||
height?:any;
|
||||
resize():void;
|
||||
on(event?:any, fn?:any):void;
|
||||
emit(event?:any, ...args?:any[]):void;
|
||||
off(event?:any, fn?:any):void;
|
||||
initCache():void;
|
||||
commonCaches?:{
|
||||
measureCustomNodeContentSizeEl?:any;
|
||||
measureRichtextNodeTextSizeEl?:any;
|
||||
};
|
||||
initTheme():void;
|
||||
themeConfig?:any;
|
||||
setTheme(theme?:any, notRender?:boolean):void;
|
||||
getTheme():any;
|
||||
setThemeConfig(config?:any, notRender?:boolean):void;
|
||||
getCustomThemeConfig():any;
|
||||
getThemeConfig(prop?:any):any;
|
||||
getConfig(prop?:any):any;
|
||||
updateConfig(opt?:{}):void;
|
||||
getLayout():any;
|
||||
setLayout(layout?:any, notRender?:boolean):void;
|
||||
execCommand(...args?:any[]):void;
|
||||
updateData(data?:any):void;
|
||||
setData(data?:any):void;
|
||||
setFullData(data?:any):void;
|
||||
getData(withConfig?:any):any;
|
||||
export(...args?:any[]):Promise<any>;
|
||||
toPos(x?:any, y?:any):{
|
||||
x?:number;
|
||||
y?:number;
|
||||
};
|
||||
setMode(mode?:any):void;
|
||||
getSvgData({ paddingX, paddingY, ignoreWatermark, addContentToHeader, addContentToFooter, node }?:{
|
||||
paddingX?:number;
|
||||
paddingY?:number;
|
||||
ignoreWatermark?:boolean;
|
||||
}):{
|
||||
svg?:any;
|
||||
svgHTML?:any;
|
||||
clipData?:any;
|
||||
rect?:any;
|
||||
origWidth?:any;
|
||||
origHeight?:any;
|
||||
scaleX?:any;
|
||||
scaleY?:any;
|
||||
};
|
||||
addShape(shape?:any):void;
|
||||
removeShape(name?:any):void;
|
||||
getSvgObjects():{
|
||||
SVG?:any;
|
||||
G?:any;
|
||||
Rect?:any;
|
||||
};
|
||||
addPlugin(plugin?:any, opt?:any):void;
|
||||
removePlugin(plugin?:any):void;
|
||||
initPlugin(plugin?:any):void;
|
||||
destroy():void;
|
||||
}
|
||||
declare namespace MindMap {
|
||||
function extendNodeDataNoStylePropList(list?:any[]):void;
|
||||
function resetNodeDataNoStylePropList():void;
|
||||
let pluginList:any[];
|
||||
function usePlugin(plugin?:any, opt?:{}):typeof MindMap;
|
||||
function hasPlugin(plugin?:any):number;
|
||||
let instanceCount:number;
|
||||
function defineTheme(name?:any, config?:{}):Error;
|
||||
function removeTheme(name?:any):void;
|
||||
}
|
||||
import Event from './src/core/event/Event';
|
||||
import KeyCommand from './src/core/command/KeyCommand';
|
||||
import Command from './src/core/command/Command';
|
||||
import Render from './src/core/render/Render';
|
||||
import View from './src/core/view/View';
|
||||
import BatchExecution from './src/utils/BatchExecution';
|
||||
131
simple-mind-map/types/src/constants/constant.d.ts
vendored
Normal file
131
simple-mind-map/types/src/constants/constant.d.ts
vendored
Normal file
@ -0,0 +1,131 @@
|
||||
export namespace CONSTANTS {
|
||||
let CHANGE_THEME: string;
|
||||
let CHANGE_LAYOUT: string;
|
||||
namespace MODE {
|
||||
let READONLY: string;
|
||||
let EDIT: string;
|
||||
}
|
||||
namespace LAYOUT {
|
||||
let FORCE_DIRECTED: string;
|
||||
let LOGICAL_STRUCTURE: string;
|
||||
let LOGICAL_STRUCTURE_LEFT: string;
|
||||
let MIND_MAP: string;
|
||||
let ORGANIZATION_STRUCTURE: string;
|
||||
let CATALOG_ORGANIZATION: string;
|
||||
let TIMELINE: string;
|
||||
let TIMELINE2: string;
|
||||
let FISHBONE: string;
|
||||
let FISHBONE2: string;
|
||||
let RIGHT_FISHBONE: string;
|
||||
let RIGHT_FISHBONE2: string;
|
||||
let VERTICAL_TIMELINE: string;
|
||||
let VERTICAL_TIMELINE2: string;
|
||||
let VERTICAL_TIMELINE3: string;
|
||||
}
|
||||
namespace DIR {
|
||||
let UP: string;
|
||||
let LEFT: string;
|
||||
let DOWN: string;
|
||||
let RIGHT: string;
|
||||
}
|
||||
namespace KEY_DIR {
|
||||
let LEFT_1: string;
|
||||
export { LEFT_1 as LEFT };
|
||||
let UP_1: string;
|
||||
export { UP_1 as UP };
|
||||
let RIGHT_1: string;
|
||||
export { RIGHT_1 as RIGHT };
|
||||
let DOWN_1: string;
|
||||
export { DOWN_1 as DOWN };
|
||||
}
|
||||
namespace SHAPE {
|
||||
let RECTANGLE: string;
|
||||
let DIAMOND: string;
|
||||
let PARALLELOGRAM: string;
|
||||
let ROUNDED_RECTANGLE: string;
|
||||
let OCTAGONAL_RECTANGLE: string;
|
||||
let OUTER_TRIANGULAR_RECTANGLE: string;
|
||||
let INNER_TRIANGULAR_RECTANGLE: string;
|
||||
let ELLIPSE: string;
|
||||
let CIRCLE: string;
|
||||
}
|
||||
namespace MOUSE_WHEEL_ACTION {
|
||||
let ZOOM: string;
|
||||
let MOVE: string;
|
||||
}
|
||||
namespace INIT_ROOT_NODE_POSITION {
|
||||
let LEFT_2: string;
|
||||
export { LEFT_2 as LEFT };
|
||||
export let TOP: string;
|
||||
let RIGHT_2: string;
|
||||
export { RIGHT_2 as RIGHT };
|
||||
export let BOTTOM: string;
|
||||
export let CENTER: string;
|
||||
}
|
||||
namespace LAYOUT_GROW_DIR {
|
||||
let LEFT_3: string;
|
||||
export { LEFT_3 as LEFT };
|
||||
let TOP_1: string;
|
||||
export { TOP_1 as TOP };
|
||||
let RIGHT_3: string;
|
||||
export { RIGHT_3 as RIGHT };
|
||||
let BOTTOM_1: string;
|
||||
export { BOTTOM_1 as BOTTOM };
|
||||
}
|
||||
namespace PASTE_TYPE {
|
||||
let CLIP_BOARD: string;
|
||||
let CANVAS: string;
|
||||
}
|
||||
namespace SCROLL_BAR_DIR {
|
||||
let VERTICAL: string;
|
||||
let HORIZONTAL: string;
|
||||
}
|
||||
namespace CREATE_NEW_NODE_BEHAVIOR {
|
||||
let DEFAULT: string;
|
||||
let NOT_ACTIVE: string;
|
||||
let ACTIVE_ONLY: string;
|
||||
}
|
||||
namespace TAG_PLACEMENT {
|
||||
let RIGHT_4: string;
|
||||
export { RIGHT_4 as RIGHT };
|
||||
let BOTTOM_2: string;
|
||||
export { BOTTOM_2 as BOTTOM };
|
||||
}
|
||||
namespace IMG_PLACEMENT {
|
||||
let LEFT_4: string;
|
||||
export { LEFT_4 as LEFT };
|
||||
let TOP_2: string;
|
||||
export { TOP_2 as TOP };
|
||||
let RIGHT_5: string;
|
||||
export { RIGHT_5 as RIGHT };
|
||||
let BOTTOM_3: string;
|
||||
export { BOTTOM_3 as BOTTOM };
|
||||
}
|
||||
}
|
||||
export const initRootNodePositionMap: {
|
||||
[CONSTANTS.INIT_ROOT_NODE_POSITION.LEFT]: number;
|
||||
[CONSTANTS.INIT_ROOT_NODE_POSITION.TOP]: number;
|
||||
[CONSTANTS.INIT_ROOT_NODE_POSITION.RIGHT]: number;
|
||||
[CONSTANTS.INIT_ROOT_NODE_POSITION.BOTTOM]: number;
|
||||
[CONSTANTS.INIT_ROOT_NODE_POSITION.CENTER]: number;
|
||||
};
|
||||
export const layoutList: {
|
||||
name: string;
|
||||
value: string;
|
||||
}[];
|
||||
export const layoutValueList: string[];
|
||||
export const nodeDataNoStylePropList: string[];
|
||||
export namespace ERROR_TYPES {
|
||||
let READ_CLIPBOARD_ERROR: string;
|
||||
let PARSE_PASTE_DATA_ERROR: string;
|
||||
let CUSTOM_HANDLE_CLIPBOARD_TEXT_ERROR: string;
|
||||
let LOAD_CLIPBOARD_IMAGE_ERROR: string;
|
||||
let BEFORE_TEXT_EDIT_ERROR: string;
|
||||
let EXPORT_ERROR: string;
|
||||
let EXPORT_LOAD_IMAGE_ERROR: string;
|
||||
let DATA_CHANGE_DETAIL_EVENT_ERROR: string;
|
||||
}
|
||||
export const cssContent: "\n /* \u9F20\u6807hover\u548C\u6FC0\u6D3B\u65F6\u6E32\u67D3\u7684\u77E9\u5F62 */\n .smm-hover-node{\n display: none;\n opacity: 0.6;\n stroke-width: 1;\n }\n\n .smm-node:not(.smm-node-dragging):hover .smm-hover-node{\n display: block;\n }\n\n .smm-node.active .smm-hover-node, .smm-node-highlight .smm-hover-node{\n display: block;\n opacity: 1;\n stroke-width: 2;\n }\n\n .smm-text-node-wrap, .smm-expand-btn-text {\n user-select: none;\n }\n";
|
||||
export const selfCloseTagList: string[];
|
||||
export const noneRichTextNodeLineHeight: 1.2;
|
||||
export const richTextSupportStyleList: string[];
|
||||
219
simple-mind-map/types/src/constants/defaultOptions.d.ts
vendored
Normal file
219
simple-mind-map/types/src/constants/defaultOptions.d.ts
vendored
Normal file
@ -0,0 +1,219 @@
|
||||
export namespace defaultOpt {
|
||||
let el: any;
|
||||
let data: any;
|
||||
let viewData: any;
|
||||
let readonly: boolean;
|
||||
let layout: string;
|
||||
let fishboneDeg: number;
|
||||
let theme: string;
|
||||
let themeConfig: {};
|
||||
let scaleRatio: number;
|
||||
let translateRatio: number;
|
||||
let minZoomRatio: number;
|
||||
let maxZoomRatio: number;
|
||||
let customCheckIsTouchPad: any;
|
||||
let mouseScaleCenterUseMousePosition: boolean;
|
||||
let maxTag: number;
|
||||
let expandBtnSize: number;
|
||||
let imgTextMargin: number;
|
||||
let textContentMargin: number;
|
||||
let customNoteContentShow: any;
|
||||
let textAutoWrapWidth: number;
|
||||
let customHandleMousewheel: any;
|
||||
let mousewheelAction: string;
|
||||
let mousewheelMoveStep: number;
|
||||
let mousewheelZoomActionReverse: boolean;
|
||||
let defaultInsertSecondLevelNodeText: string;
|
||||
let defaultInsertBelowSecondLevelNodeText: string;
|
||||
namespace expandBtnStyle {
|
||||
let color: string;
|
||||
let fill: string;
|
||||
let fontSize: number;
|
||||
let strokeColor: string;
|
||||
}
|
||||
namespace expandBtnIcon {
|
||||
let open: string;
|
||||
let close: string;
|
||||
}
|
||||
let expandBtnNumHandler: any;
|
||||
let isShowExpandNum: boolean;
|
||||
let enableShortcutOnlyWhenMouseInSvg: boolean;
|
||||
let customCheckEnableShortcut: any;
|
||||
let initRootNodePosition: any;
|
||||
let nodeTextEditZIndex: number;
|
||||
let nodeNoteTooltipZIndex: number;
|
||||
let isEndNodeTextEditOnClickOuter: boolean;
|
||||
let maxHistoryCount: number;
|
||||
let alwaysShowExpandBtn: boolean;
|
||||
let notShowExpandBtn: boolean;
|
||||
let iconList: any[];
|
||||
let maxNodeCacheCount: number;
|
||||
let fitPadding: number;
|
||||
let enableCtrlKeyNodeSelection: boolean;
|
||||
let useLeftKeySelectionRightKeyDrag: boolean;
|
||||
let beforeTextEdit: any;
|
||||
let isUseCustomNodeContent: boolean;
|
||||
let customCreateNodeContent: any;
|
||||
let customInnerElsAppendTo: any;
|
||||
let enableAutoEnterTextEditWhenKeydown: boolean;
|
||||
let autoEmptyTextWhenKeydownEnterEdit: boolean;
|
||||
let customHandleClipboardText: any;
|
||||
let disableMouseWheelZoom: boolean;
|
||||
function errorHandler(code: any, error: any): void;
|
||||
let enableDblclickBackToRootNode: boolean;
|
||||
let hoverRectColor: string;
|
||||
let hoverRectPadding: number;
|
||||
let selectTextOnEnterEditText: boolean;
|
||||
let deleteNodeActive: boolean;
|
||||
let fit: boolean;
|
||||
let tagsColorMap: {};
|
||||
namespace cooperateStyle {
|
||||
export let avatarSize: number;
|
||||
let fontSize_1: number;
|
||||
export { fontSize_1 as fontSize };
|
||||
}
|
||||
let onlyOneEnableActiveNodeOnCooperate: boolean;
|
||||
let defaultGeneralizationText: string;
|
||||
let handleIsSplitByWrapOnPasteCreateNewNode: any;
|
||||
let addHistoryTime: number;
|
||||
let isDisableDrag: boolean;
|
||||
let createNewNodeBehavior: string;
|
||||
let defaultNodeImage: string;
|
||||
let isLimitMindMapInCanvas: boolean;
|
||||
let handleNodePasteImg: any;
|
||||
let customCreateNodePath: any;
|
||||
let customCreateNodePolygon: any;
|
||||
let customTransformNodeLinePath: any;
|
||||
let beforeShortcutRun: any;
|
||||
let resetScaleOnMoveNodeToCenter: boolean;
|
||||
let createNodePrefixContent: any;
|
||||
let createNodePostfixContent: any;
|
||||
let disabledClipboard: boolean;
|
||||
let customHyperlinkJump: any;
|
||||
let openPerformance: boolean;
|
||||
namespace performanceConfig {
|
||||
let time: number;
|
||||
let padding: number;
|
||||
let removeNodeWhenOutCanvas: boolean;
|
||||
}
|
||||
let emptyTextMeasureHeightText: string;
|
||||
let openRealtimeRenderOnNodeTextEdit: boolean;
|
||||
let mousedownEventPreventDefault: boolean;
|
||||
let onlyPasteTextWhenHasImgAndText: boolean;
|
||||
let enableDragModifyNodeWidth: boolean;
|
||||
let minNodeTextModifyWidth: number;
|
||||
let maxNodeTextModifyWidth: number;
|
||||
let customHandleLine: any;
|
||||
let addHistoryOnInit: boolean;
|
||||
namespace noteIcon {
|
||||
let icon: string;
|
||||
let style: {};
|
||||
}
|
||||
namespace hyperlinkIcon {
|
||||
let icon_1: string;
|
||||
export { icon_1 as icon };
|
||||
let style_1: {};
|
||||
export { style_1 as style };
|
||||
}
|
||||
namespace attachmentIcon {
|
||||
let icon_2: string;
|
||||
export { icon_2 as icon };
|
||||
let style_2: {};
|
||||
export { style_2 as style };
|
||||
}
|
||||
let isShowCreateChildBtnIcon: boolean;
|
||||
namespace quickCreateChildBtnIcon {
|
||||
let icon_3: string;
|
||||
export { icon_3 as icon };
|
||||
let style_3: {};
|
||||
export { style_3 as style };
|
||||
}
|
||||
let customQuickCreateChildBtnClick: any;
|
||||
let addCustomContentToNode: any;
|
||||
let enableInheritAncestorLineStyle: boolean;
|
||||
let selectTranslateStep: number;
|
||||
let selectTranslateLimit: number;
|
||||
let enableFreeDrag: boolean;
|
||||
let autoMoveWhenMouseInEdgeOnDrag: boolean;
|
||||
namespace dragMultiNodeRectConfig {
|
||||
export let width: number;
|
||||
export let height: number;
|
||||
let fill_1: string;
|
||||
export { fill_1 as fill };
|
||||
}
|
||||
let dragPlaceholderRectFill: string;
|
||||
namespace dragPlaceholderLineConfig {
|
||||
let color_1: string;
|
||||
export { color_1 as color };
|
||||
let width_1: number;
|
||||
export { width_1 as width };
|
||||
}
|
||||
namespace dragOpacityConfig {
|
||||
let cloneNodeOpacity: number;
|
||||
let beingDragNodeOpacity: number;
|
||||
}
|
||||
let handleDragCloneNode: any;
|
||||
let beforeDragEnd: any;
|
||||
let beforeDragStart: any;
|
||||
namespace watermarkConfig {
|
||||
let onlyExport: boolean;
|
||||
let text: string;
|
||||
let lineSpacing: number;
|
||||
let textSpacing: number;
|
||||
let angle: number;
|
||||
namespace textStyle {
|
||||
let color_2: string;
|
||||
export { color_2 as color };
|
||||
export let opacity: number;
|
||||
let fontSize_2: number;
|
||||
export { fontSize_2 as fontSize };
|
||||
}
|
||||
let belowNode: boolean;
|
||||
}
|
||||
let exportPaddingX: number;
|
||||
let exportPaddingY: number;
|
||||
let resetCss: string;
|
||||
let minExportImgCanvasScale: number;
|
||||
let addContentToHeader: any;
|
||||
let addContentToFooter: any;
|
||||
let handleBeingExportSvg: any;
|
||||
let maxCanvasSize: number;
|
||||
let defaultAssociativeLineText: string;
|
||||
let associativeLineIsAlwaysAboveNode: boolean;
|
||||
namespace associativeLineInitPointsPosition {
|
||||
let from: string;
|
||||
let to: string;
|
||||
}
|
||||
let enableAdjustAssociativeLinePoints: boolean;
|
||||
let beforeAssociativeLineConnection: any;
|
||||
let disableTouchZoom: boolean;
|
||||
let minTouchZoomScale: number;
|
||||
let maxTouchZoomScale: number;
|
||||
let isLimitMindMapInCanvasWhenHasScrollbar: boolean;
|
||||
let isOnlySearchCurrentRenderNodes: boolean;
|
||||
let beforeCooperateUpdate: any;
|
||||
namespace rainbowLinesConfig {
|
||||
let open_1: boolean;
|
||||
export { open_1 as open };
|
||||
export let colorsList: any[];
|
||||
}
|
||||
let demonstrateConfig: any;
|
||||
let enableEditFormulaInRichTextEdit: boolean;
|
||||
let katexFontPath: string;
|
||||
let getKatexOutputType: any;
|
||||
let transformRichTextOnEnterEdit: any;
|
||||
let beforeHideRichTextEdit: any;
|
||||
let outerFramePaddingX: number;
|
||||
let outerFramePaddingY: number;
|
||||
let defaultOuterFrameText: string;
|
||||
let onlyPainterNodeCustomStyles: boolean;
|
||||
let beforeDeleteNodeImg: any;
|
||||
let imgResizeBtnSize: number;
|
||||
let minImgResizeWidth: number;
|
||||
let minImgResizeHeight: number;
|
||||
let maxImgResizeWidthInheritTheme: boolean;
|
||||
let maxImgResizeWidth: number;
|
||||
let maxImgResizeHeight: number;
|
||||
let customDeleteBtnInnerHTML: string;
|
||||
let customResizeBtnInnerHTML: string;
|
||||
}
|
||||
24
simple-mind-map/types/src/core/command/Command.d.ts
vendored
Normal file
24
simple-mind-map/types/src/core/command/Command.d.ts
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
export default Command;
|
||||
declare class Command {
|
||||
constructor(opt?: {});
|
||||
opt: {};
|
||||
mindMap: any;
|
||||
commands: {};
|
||||
history: any[];
|
||||
activeHistoryIndex: number;
|
||||
originAddHistory: any;
|
||||
addHistory(): void;
|
||||
isPause: boolean;
|
||||
pause(): void;
|
||||
recovery(): void;
|
||||
clearHistory(): void;
|
||||
registerShortcutKeys(): void;
|
||||
exec(name: any, ...args: any[]): void;
|
||||
add(name: any, fn: any): void;
|
||||
remove(name: any, fn: any): void;
|
||||
back(step?: number): any;
|
||||
forward(step?: number): any;
|
||||
getCopyData(): any;
|
||||
removeDataUid(data: any): any;
|
||||
emitDataUpdatesEvent(lastDataStr: any, dataStr: any): void;
|
||||
}
|
||||
34
simple-mind-map/types/src/core/command/KeyCommand.d.ts
vendored
Normal file
34
simple-mind-map/types/src/core/command/KeyCommand.d.ts
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
export default class KeyCommand {
|
||||
constructor(opt: any);
|
||||
opt: any;
|
||||
mindMap: any;
|
||||
shortcutMap: {};
|
||||
shortcutMapCache: {};
|
||||
isPause: boolean;
|
||||
isInSvg: boolean;
|
||||
isStopCheckInSvg: boolean;
|
||||
defaultEnableCheck(e: any): boolean;
|
||||
extendKeyMap(key: any, code: any): void;
|
||||
removeKeyMap(key: any): void;
|
||||
pause(): void;
|
||||
recovery(): void;
|
||||
save(): void;
|
||||
restore(): void;
|
||||
stopCheckInSvg(): void;
|
||||
recoveryCheckInSvg(): void;
|
||||
bindEvent(): void;
|
||||
onKeydown(e: any): void;
|
||||
unBindEvent(): void;
|
||||
checkKey(e: any, key: any): boolean;
|
||||
getOriginEventCodeArr(e: any): any[];
|
||||
hasCombinationKey(e: any): any;
|
||||
getKeyCodeArr(key: any): any[];
|
||||
/**
|
||||
* Enter
|
||||
* Tab | Insert
|
||||
* Shift + a
|
||||
*/
|
||||
addShortcut(key: any, fn: any): void;
|
||||
removeShortcut(key: any, fn: any): void;
|
||||
getShortcutFn(key: any): any[];
|
||||
}
|
||||
42
simple-mind-map/types/src/core/command/keyMap.d.ts
vendored
Normal file
42
simple-mind-map/types/src/core/command/keyMap.d.ts
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
export const keyMap: {
|
||||
Backspace: number;
|
||||
Tab: number;
|
||||
Enter: number;
|
||||
Shift: number;
|
||||
Control: number;
|
||||
Alt: number;
|
||||
CapsLock: number;
|
||||
Esc: number;
|
||||
Spacebar: number;
|
||||
PageUp: number;
|
||||
PageDown: number;
|
||||
End: number;
|
||||
Home: number;
|
||||
Insert: number;
|
||||
Left: number;
|
||||
Up: number;
|
||||
Right: number;
|
||||
Down: number;
|
||||
Del: number;
|
||||
NumLock: number;
|
||||
Cmd: number;
|
||||
CmdFF: number;
|
||||
F1: number;
|
||||
F2: number;
|
||||
F3: number;
|
||||
F4: number;
|
||||
F5: number;
|
||||
F6: number;
|
||||
F7: number;
|
||||
F8: number;
|
||||
F9: number;
|
||||
F10: number;
|
||||
F11: number;
|
||||
F12: number;
|
||||
'`': number;
|
||||
'=': number;
|
||||
'-': number;
|
||||
'/': number;
|
||||
'.': number;
|
||||
};
|
||||
export function isKey(e: any, key: any): boolean;
|
||||
37
simple-mind-map/types/src/core/event/Event.d.ts
vendored
Normal file
37
simple-mind-map/types/src/core/event/Event.d.ts
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
export default Event;
|
||||
declare class Event {
|
||||
constructor(opt?: {});
|
||||
opt: {};
|
||||
mindMap: any;
|
||||
isLeftMousedown: boolean;
|
||||
isRightMousedown: boolean;
|
||||
isMiddleMousedown: boolean;
|
||||
mousedownPos: {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
mousemovePos: {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
mousemoveOffset: {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
bindFn(): void;
|
||||
onBodyMousedown(e: any): void;
|
||||
onBodyClick(e: any): void;
|
||||
onDrawClick(e: any): void;
|
||||
onMousedown(e: any): void;
|
||||
onMousemove(e: any): void;
|
||||
onMouseup(e: any): void;
|
||||
onNodeMouseup(): void;
|
||||
onMousewheel(e: any): void;
|
||||
onContextmenu(e: any): void;
|
||||
onSvgMousedown(e: any): void;
|
||||
onKeyup(e: any): void;
|
||||
onMouseenter(e: any): void;
|
||||
onMouseleave(e: any): void;
|
||||
bind(): void;
|
||||
unbind(): void;
|
||||
}
|
||||
122
simple-mind-map/types/src/core/render/Render.d.ts
vendored
Normal file
122
simple-mind-map/types/src/core/render/Render.d.ts
vendored
Normal file
@ -0,0 +1,122 @@
|
||||
export default Render;
|
||||
declare class Render {
|
||||
constructor(opt?: {});
|
||||
opt: {};
|
||||
mindMap: any;
|
||||
themeConfig: any;
|
||||
renderTree: any;
|
||||
reRender: boolean;
|
||||
isRendering: boolean;
|
||||
hasWaitRendering: boolean;
|
||||
nodeCache: {};
|
||||
lastNodeCache: {};
|
||||
renderSourceList: any[];
|
||||
renderCallbackList: any[];
|
||||
activeNodeList: any[];
|
||||
emitNodeActiveEventTimer: number;
|
||||
renderTimer: number;
|
||||
root: any;
|
||||
textEdit: TextEdit;
|
||||
beingCopyData: any;
|
||||
highlightBoxNode: any;
|
||||
highlightBoxNodeStyle: any;
|
||||
lastActiveNodeList: any[];
|
||||
setLayout(): void;
|
||||
layout: any;
|
||||
setData(data: any): void;
|
||||
bindEvent(): void;
|
||||
onNodeTextEditChange({ node, text }: {
|
||||
node: any;
|
||||
text: any;
|
||||
}): void;
|
||||
forceLoadNode(node: any): void;
|
||||
registerCommands(): void;
|
||||
selectAll(): void;
|
||||
back(step: any): void;
|
||||
forward(step: any): void;
|
||||
insertNode(openEdit?: boolean, appointNodes?: any[], appointData?: any, appointChildren?: any[]): void;
|
||||
insertMultiNode(appointNodes: any, nodeList: any): void;
|
||||
insertChildNode(openEdit?: boolean, appointNodes?: any[], appointData?: any, appointChildren?: any[]): void;
|
||||
insertMultiChildNode(appointNodes: any, childList: any): void;
|
||||
insertParentNode(openEdit: boolean, appointNodes: any, appointData: any): void;
|
||||
upNode(appointNode: any): void;
|
||||
downNode(appointNode: any): void;
|
||||
moveUpOneLevel(node: any): void;
|
||||
insertAfter(node: any, exist: any): void;
|
||||
insertBefore(node: any, exist: any): void;
|
||||
moveNodeTo(node: any, toNode: any): void;
|
||||
removeNode(appointNodes?: any[]): void;
|
||||
removeCurrentNode(appointNodes?: any[]): void;
|
||||
pasteNode(data: any): void;
|
||||
cutNode(callback: any): void;
|
||||
setNodeStyle(node: any, prop: any, value: any): void;
|
||||
setNodeStyles(node: any, style: any): void;
|
||||
setNodeActive(node: any, active: any): void;
|
||||
clearActiveNode(): void;
|
||||
setNodeExpand(node: any, expand: any): void;
|
||||
expandAllNode(uid?: string): void;
|
||||
unexpandAllNode(isSetRootNodeCenter?: boolean, uid?: string): void;
|
||||
expandToLevel(level: any): void;
|
||||
setNodeData(node: any, data: any): void;
|
||||
setNodeText(node: any, text: any, richText: any, resetRichText: any): void;
|
||||
setNodeImage(node: any, data: any): void;
|
||||
setNodeIcon(node: any, icons: any): void;
|
||||
setNodeHyperlink(node: any, link: any, title?: string): void;
|
||||
setNodeNote(node: any, note: any): void;
|
||||
setNodeAttachment(node: any, url: any, name?: string): void;
|
||||
setNodeTag(node: any, tag: any): void;
|
||||
insertFormula(formula: any, appointNodes?: any[]): void;
|
||||
addGeneralization(data: any, openEdit?: boolean): void;
|
||||
removeGeneralization(): void;
|
||||
setNodeCustomPosition(node: any, left?: any, top?: any): void;
|
||||
resetLayout(): void;
|
||||
setNodeShape(node: any, shape: any): void;
|
||||
goTargetNode(node: any, callback?: () => void): void;
|
||||
removeCustomStyles(node: any): void;
|
||||
removeAllNodeCustomStyles(appointNodes: any): void;
|
||||
registerShortcutKeys(): void;
|
||||
toggleActiveExpand(): void;
|
||||
emitNodeActiveEvent(node?: any, activeNodeList?: any[]): void;
|
||||
clearActiveNodeListOnDrawClick(e: any, eventType: any): void;
|
||||
startTextEdit(): void;
|
||||
endTextEdit(): void;
|
||||
clearCache(): void;
|
||||
addRenderParams(callback: any, source: any): void;
|
||||
checkHasRenderSource(val: any): boolean;
|
||||
onRenderEnd(): void;
|
||||
render(callback: any, source: any): void;
|
||||
_render(): void;
|
||||
renderByCustomNodeContentNode(node: any): void;
|
||||
resetUnExpandNodeStyle(): void;
|
||||
clearActiveNodeList(): void;
|
||||
addNodeToActiveList(node: any, notEmitBeforeNodeActiveEvent?: boolean): void;
|
||||
removeNodeFromActiveList(node: any): void;
|
||||
activeMultiNode(nodeList?: any[]): void;
|
||||
cancelActiveMultiNode(nodeList?: any[]): void;
|
||||
findActiveNodeIndex(node: any): any;
|
||||
backForward(type: any, step: any): void;
|
||||
getNewNodeBehavior(openEdit?: boolean, handleMultiNodes?: boolean): {
|
||||
focusNewNode: boolean;
|
||||
inserting: boolean;
|
||||
};
|
||||
_handleRemoveCustomStyles(nodeData: any): boolean;
|
||||
copy(): void;
|
||||
cut(): void;
|
||||
handlePaste(event: any): void;
|
||||
paste(): Promise<void>;
|
||||
insertTo(node: any, exist: any, dir?: string): void;
|
||||
deleteNodeGeneralization(node: any): void;
|
||||
getNextActiveNode(deleteList: any): any;
|
||||
copyNode(): any;
|
||||
toggleNodeExpand(node: any): void;
|
||||
setNodeDataRender(node: any, data: any, notRender?: boolean): void;
|
||||
reRenderNodeCheckChange(node: any, notRender: any): void;
|
||||
moveNodeToCenter(node: any, resetScale: any): void;
|
||||
setRootNodeCenter(): void;
|
||||
expandToNodeUid(uid: any, callback?: () => void): void;
|
||||
findNodeByUid(uid: any): any;
|
||||
highlightNode(node: any, range: any, style: any): void;
|
||||
closeHighlightNode(): void;
|
||||
hasRichTextPlugin(): boolean;
|
||||
}
|
||||
import TextEdit from './TextEdit';
|
||||
42
simple-mind-map/types/src/core/render/TextEdit.d.ts
vendored
Normal file
42
simple-mind-map/types/src/core/render/TextEdit.d.ts
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
export default class TextEdit {
|
||||
constructor(renderer: any);
|
||||
renderer: any;
|
||||
mindMap: any;
|
||||
currentNode: any;
|
||||
textEditNode: HTMLDivElement;
|
||||
showTextEdit: boolean;
|
||||
cacheEditingText: string;
|
||||
hasBodyMousedown: boolean;
|
||||
textNodePaddingX: number;
|
||||
textNodePaddingY: number;
|
||||
isNeedUpdateTextEditNode: boolean;
|
||||
bindEvent(): void;
|
||||
show({ node, isInserting, isFromKeyDown, isFromScale }: {
|
||||
node: any;
|
||||
isInserting?: boolean;
|
||||
isFromKeyDown?: boolean;
|
||||
isFromScale?: boolean;
|
||||
}): Promise<void>;
|
||||
onScale(): void;
|
||||
onKeydown(e: any): void;
|
||||
unBindEvent(): void;
|
||||
checkIsAutoEnterTextEditKey(e: any): boolean;
|
||||
registerTmpShortcut(): void;
|
||||
isShowTextEdit(): any;
|
||||
setIsShowTextEdit(val: any): void;
|
||||
onOpenRealtimeRenderOnNodeTextEditConfigUpdate(openRealtimeRenderOnNodeTextEdit: any): void;
|
||||
showEditTextBox({ node, rect, isInserting, isFromKeyDown, isFromScale }: {
|
||||
node: any;
|
||||
rect: any;
|
||||
isInserting: any;
|
||||
isFromKeyDown: any;
|
||||
isFromScale: any;
|
||||
}): void;
|
||||
emitTextChangeEvent(): void;
|
||||
updateTextEditNode(): void;
|
||||
getBackground(node: any): any;
|
||||
removeTextEditEl(): void;
|
||||
getEditText(): any;
|
||||
hideEditTextBox(): any;
|
||||
getCurrentEditNode(): any;
|
||||
}
|
||||
154
simple-mind-map/types/src/core/render/node/MindMapNode.d.ts
vendored
Normal file
154
simple-mind-map/types/src/core/render/node/MindMapNode.d.ts
vendored
Normal file
@ -0,0 +1,154 @@
|
||||
export default MindMapNode;
|
||||
declare class MindMapNode {
|
||||
constructor(opt?: {});
|
||||
opt: {};
|
||||
nodeData: any;
|
||||
nodeDataSnapshot: string;
|
||||
uid: any;
|
||||
mindMap: any;
|
||||
renderer: any;
|
||||
draw: any;
|
||||
nodeDraw: any;
|
||||
lineDraw: any;
|
||||
style: Style;
|
||||
effectiveStyles: {};
|
||||
shapeInstance: Shape;
|
||||
shapePadding: {
|
||||
paddingX: number;
|
||||
paddingY: number;
|
||||
};
|
||||
isRoot: any;
|
||||
isGeneralization: any;
|
||||
generalizationBelongNode: any;
|
||||
layerIndex: any;
|
||||
width: any;
|
||||
height: any;
|
||||
customTextWidth: any;
|
||||
_left: any;
|
||||
_top: any;
|
||||
customLeft: any;
|
||||
customTop: any;
|
||||
isDrag: boolean;
|
||||
parent: any;
|
||||
children: any;
|
||||
userList: any[];
|
||||
group: any;
|
||||
shapeNode: any;
|
||||
hoverNode: any;
|
||||
_customNodeContent: any;
|
||||
_imgData: any;
|
||||
_iconData: any;
|
||||
_textData: any;
|
||||
_hyperlinkData: any;
|
||||
_tagData: any;
|
||||
_noteData: any;
|
||||
noteEl: any;
|
||||
noteContentIsShow: boolean;
|
||||
_attachmentData: any;
|
||||
_prefixData: any;
|
||||
_postfixData: any;
|
||||
_expandBtn: any;
|
||||
_lastExpandBtnType: any;
|
||||
_showExpandBtn: boolean;
|
||||
_openExpandNode: any;
|
||||
_closeExpandNode: any;
|
||||
_fillExpandNode: any;
|
||||
_userListGroup: any;
|
||||
_lines: any[];
|
||||
_generalizationList: any[];
|
||||
_unVisibleRectRegionNode: any;
|
||||
_isMouseenter: boolean;
|
||||
_customContentAddToNodeAdd: any;
|
||||
_rectInfo: {
|
||||
textContentWidth: number;
|
||||
textContentHeight: number;
|
||||
textContentWidthWithoutTag: number;
|
||||
};
|
||||
_generalizationNodeWidth: number;
|
||||
_generalizationNodeHeight: number;
|
||||
expandBtnSize: any;
|
||||
isMultipleChoice: boolean;
|
||||
needLayout: boolean;
|
||||
isHide: boolean;
|
||||
set left(val: any);
|
||||
get left(): any;
|
||||
set top(val: any);
|
||||
get top(): any;
|
||||
reset(): void;
|
||||
resetWhenDelete(): void;
|
||||
handleData(data: any): any;
|
||||
createNodeData(recreateTypes: any): void;
|
||||
getSize(recreateTypes: any, opt?: {}): any;
|
||||
bindGroupEvent(): void;
|
||||
active(e: any): void;
|
||||
deactivate(): void;
|
||||
update(forceRender: any): void;
|
||||
getNodePosInClient(_left: any, _top: any): {
|
||||
left: any;
|
||||
top: any;
|
||||
};
|
||||
checkIsInClient(padding?: number): boolean;
|
||||
reRender(recreateTypes: any, opt: any): any;
|
||||
updateNodeActiveClass(): void;
|
||||
updateNodeByActive(active: any): void;
|
||||
render(callback?: () => void, forceRender?: boolean, async?: boolean): void;
|
||||
removeSelf(): void;
|
||||
remove(): void;
|
||||
destroy(): void;
|
||||
hide(): void;
|
||||
show(): void;
|
||||
setOpacity(val: any): void;
|
||||
hideChildren(): void;
|
||||
showChildren(): void;
|
||||
startDrag(): void;
|
||||
endDrag(): void;
|
||||
renderLine(deep?: boolean): void;
|
||||
getShape(): string;
|
||||
hasCustomPosition(): boolean;
|
||||
ancestorHasCustomPosition(): boolean;
|
||||
ancestorHasGeneralization(): boolean;
|
||||
addChildren(node: any): void;
|
||||
styleLine(line: any, childNode: any, enableMarker: any): void;
|
||||
getRainbowLineColor(node: any): any;
|
||||
removeLine(): void;
|
||||
isAncestor(node: any): boolean;
|
||||
isParent(node: any): boolean;
|
||||
isBrother(node: any): any;
|
||||
getIndexInBrothers(): any;
|
||||
getPaddingVale(): {
|
||||
paddingX: string;
|
||||
paddingY: string;
|
||||
};
|
||||
getStyle(prop: any, root: any): string;
|
||||
getSelfStyle(prop: any): any;
|
||||
getParentSelfStyle(prop: any): any;
|
||||
getSelfInhertStyle(prop: any): any;
|
||||
getBorderWidth(): string | 0;
|
||||
getData(key: any): any;
|
||||
getPureData(removeActiveState?: boolean, removeId?: boolean): any;
|
||||
getAncestorNodes(): any[];
|
||||
hasCustomStyle(): boolean;
|
||||
getRect(): any;
|
||||
getRectInSvg(): {
|
||||
left: any;
|
||||
right: any;
|
||||
top: any;
|
||||
bottom: any;
|
||||
width: number;
|
||||
height: number;
|
||||
};
|
||||
highlight(): void;
|
||||
closeHighlight(): void;
|
||||
fakeClone(): MindMapNode;
|
||||
createSvgTextNode(text?: string): any;
|
||||
getSvgObjects(): {
|
||||
SVG: any;
|
||||
G: any;
|
||||
Rect: any;
|
||||
};
|
||||
checkEnableDragModifyNodeWidth(): any;
|
||||
hasCustomWidth(): boolean;
|
||||
getChildrenLength(): any;
|
||||
}
|
||||
import Style from './Style';
|
||||
import Shape from './Shape';
|
||||
24
simple-mind-map/types/src/core/render/node/Shape.d.ts
vendored
Normal file
24
simple-mind-map/types/src/core/render/node/Shape.d.ts
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
export default class Shape {
|
||||
constructor(node: any);
|
||||
node: any;
|
||||
mindMap: any;
|
||||
getShapePadding(width: any, height: any, paddingX: any, paddingY: any): any;
|
||||
getShapeFromExtendList(shape: any): any;
|
||||
createShape(): any;
|
||||
getNodeSize(): {
|
||||
width: any;
|
||||
height: any;
|
||||
};
|
||||
createPath(pathStr: any): any;
|
||||
createPolygon(points: any): any;
|
||||
createRect(): any;
|
||||
createDiamond(): any;
|
||||
createParallelogram(): any;
|
||||
createRoundedRectangle(): any;
|
||||
createOctagonalRectangle(): any;
|
||||
createOuterTriangularRectangle(): any;
|
||||
createInnerTriangularRectangle(): any;
|
||||
createEllipse(): any;
|
||||
createCircle(): any;
|
||||
}
|
||||
export const shapeList: string[];
|
||||
33
simple-mind-map/types/src/core/render/node/Style.d.ts
vendored
Normal file
33
simple-mind-map/types/src/core/render/node/Style.d.ts
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
export const shapeStyleProps: string[];
|
||||
export default Style;
|
||||
declare class Style {
|
||||
static setBackgroundStyle(el: any, themeConfig: any): void;
|
||||
static removeBackgroundStyle(el: any): void;
|
||||
constructor(ctx: any);
|
||||
ctx: any;
|
||||
_markerPath: any;
|
||||
_marker: any;
|
||||
_gradient: any;
|
||||
merge(prop: any, root: any): string;
|
||||
getStyle(prop: any, root: any): string;
|
||||
getSelfStyle(prop: any): any;
|
||||
addToEffectiveStyles(styles: any): void;
|
||||
rect(node: any): void;
|
||||
shape(node: any): void;
|
||||
text(node: any): void;
|
||||
domText(node: any, fontSizeScale?: number): void;
|
||||
tagText(node: any, style: any): void;
|
||||
tagRect(node: any, style: any): void;
|
||||
iconNode(node: any, color: any): void;
|
||||
line(line: any, { width, color, dasharray }: {}, enableMarker: any, childNode: any): void;
|
||||
createMarker(): any;
|
||||
generalizationLine(node: any): void;
|
||||
iconBtn(node: any, node2: any, fillNode: any): void;
|
||||
hasCustomStyle(): boolean;
|
||||
getCustomStyle(): {};
|
||||
hoverNode(node: any): void;
|
||||
onRemove(): void;
|
||||
}
|
||||
declare namespace Style {
|
||||
let cacheStyle: any;
|
||||
}
|
||||
25
simple-mind-map/types/src/core/render/node/nodeCommandWraps.d.ts
vendored
Normal file
25
simple-mind-map/types/src/core/render/node/nodeCommandWraps.d.ts
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
declare namespace _default {
|
||||
export { setData };
|
||||
export { setText };
|
||||
export { setImage };
|
||||
export { setIcon };
|
||||
export { setHyperlink };
|
||||
export { setNote };
|
||||
export { setAttachment };
|
||||
export { setTag };
|
||||
export { setShape };
|
||||
export { setStyle };
|
||||
export { setStyles };
|
||||
}
|
||||
export default _default;
|
||||
declare function setData(data?: {}): void;
|
||||
declare function setText(text: any, richText: any, resetRichText: any): void;
|
||||
declare function setImage(imgData: any): void;
|
||||
declare function setIcon(icons: any): void;
|
||||
declare function setHyperlink(link: any, title: any): void;
|
||||
declare function setNote(note: any): void;
|
||||
declare function setAttachment(url: any, name: any): void;
|
||||
declare function setTag(tag: any): void;
|
||||
declare function setShape(shape: any): void;
|
||||
declare function setStyle(prop: any, value: any): void;
|
||||
declare function setStyles(style: any): void;
|
||||
23
simple-mind-map/types/src/core/render/node/nodeCooperate.d.ts
vendored
Normal file
23
simple-mind-map/types/src/core/render/node/nodeCooperate.d.ts
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
declare namespace _default {
|
||||
export { createUserListNode };
|
||||
export { updateUserListNode };
|
||||
export { createTextAvatar };
|
||||
export { createImageAvatar };
|
||||
export { addUser };
|
||||
export { removeUser };
|
||||
export { emptyUser };
|
||||
}
|
||||
export default _default;
|
||||
declare function createUserListNode(): void;
|
||||
declare class createUserListNode {
|
||||
_userListGroup: any;
|
||||
}
|
||||
declare function updateUserListNode(): void;
|
||||
declare function createTextAvatar(item: any): any;
|
||||
declare function createImageAvatar(item: any): any;
|
||||
declare function addUser(userInfo: any): void;
|
||||
declare function removeUser(userInfo: any): void;
|
||||
declare function emptyUser(): void;
|
||||
declare class emptyUser {
|
||||
userList: any[];
|
||||
}
|
||||
59
simple-mind-map/types/src/core/render/node/nodeCreateContents.d.ts
vendored
Normal file
59
simple-mind-map/types/src/core/render/node/nodeCreateContents.d.ts
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
declare namespace _default {
|
||||
export { createImgNode };
|
||||
export { getImgShowSize };
|
||||
export { createIconNode };
|
||||
export { createRichTextNode };
|
||||
export { createTextNode };
|
||||
export { createHyperlinkNode };
|
||||
export { createTagNode };
|
||||
export { createNoteNode };
|
||||
export { createAttachmentNode };
|
||||
export { getNoteContentPosition };
|
||||
export { getNodeIconSize };
|
||||
export { measureCustomNodeContentSize };
|
||||
export { isUseCustomNodeContent };
|
||||
}
|
||||
export default _default;
|
||||
declare function createImgNode(): {
|
||||
node: any;
|
||||
width: any;
|
||||
height: any;
|
||||
};
|
||||
declare function getImgShowSize(): any;
|
||||
declare function createIconNode(): any;
|
||||
declare function createRichTextNode(specifyText: any): {
|
||||
node: any;
|
||||
nodeContent: any;
|
||||
width: any;
|
||||
height: any;
|
||||
};
|
||||
declare function createTextNode(specifyText: any): any;
|
||||
declare function createHyperlinkNode(): {
|
||||
node: any;
|
||||
width: any;
|
||||
height: any;
|
||||
};
|
||||
declare function createTagNode(): any[];
|
||||
declare function createNoteNode(): {
|
||||
node: any;
|
||||
width: any;
|
||||
height: any;
|
||||
};
|
||||
declare class createNoteNode {
|
||||
noteEl: HTMLDivElement;
|
||||
}
|
||||
declare function createAttachmentNode(): {
|
||||
node: any;
|
||||
width: any;
|
||||
height: any;
|
||||
};
|
||||
declare function getNoteContentPosition(): {
|
||||
left: any;
|
||||
top: any;
|
||||
};
|
||||
declare function getNodeIconSize(prop: any): any;
|
||||
declare function measureCustomNodeContentSize(content: any): {
|
||||
width: any;
|
||||
height: any;
|
||||
};
|
||||
declare function isUseCustomNodeContent(): boolean;
|
||||
34
simple-mind-map/types/src/core/render/node/nodeExpandBtn.d.ts
vendored
Normal file
34
simple-mind-map/types/src/core/render/node/nodeExpandBtn.d.ts
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
declare namespace _default {
|
||||
export { createExpandNodeContent };
|
||||
export { updateExpandBtnNode };
|
||||
export { updateExpandBtnPos };
|
||||
export { renderExpandBtn };
|
||||
export { removeExpandBtn };
|
||||
export { showExpandBtn };
|
||||
export { hideExpandBtn };
|
||||
export { sumNode };
|
||||
}
|
||||
export default _default;
|
||||
declare function createExpandNodeContent(): void;
|
||||
declare class createExpandNodeContent {
|
||||
_openExpandNode: any;
|
||||
_closeExpandNode: any;
|
||||
_fillExpandNode: any;
|
||||
}
|
||||
declare function updateExpandBtnNode(): void;
|
||||
declare class updateExpandBtnNode {
|
||||
_lastExpandBtnType: boolean;
|
||||
}
|
||||
declare function updateExpandBtnPos(): void;
|
||||
declare function renderExpandBtn(): void;
|
||||
declare class renderExpandBtn {
|
||||
_expandBtn: any;
|
||||
_showExpandBtn: boolean;
|
||||
}
|
||||
declare function removeExpandBtn(): void;
|
||||
declare class removeExpandBtn {
|
||||
_showExpandBtn: boolean;
|
||||
}
|
||||
declare function showExpandBtn(): void;
|
||||
declare function hideExpandBtn(): void;
|
||||
declare function sumNode(data?: any[]): any;
|
||||
18
simple-mind-map/types/src/core/render/node/nodeExpandBtnPlaceholderRect.d.ts
vendored
Normal file
18
simple-mind-map/types/src/core/render/node/nodeExpandBtnPlaceholderRect.d.ts
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
declare namespace _default {
|
||||
export { renderExpandBtnPlaceholderRect };
|
||||
export { clearExpandBtnPlaceholderRect };
|
||||
export { updateExpandBtnPlaceholderRect };
|
||||
}
|
||||
export default _default;
|
||||
declare function renderExpandBtnPlaceholderRect(): void;
|
||||
declare class renderExpandBtnPlaceholderRect {
|
||||
_unVisibleRectRegionNode: any;
|
||||
}
|
||||
declare function clearExpandBtnPlaceholderRect(): void;
|
||||
declare class clearExpandBtnPlaceholderRect {
|
||||
_unVisibleRectRegionNode: any;
|
||||
}
|
||||
declare function updateExpandBtnPlaceholderRect(): void;
|
||||
declare class updateExpandBtnPlaceholderRect {
|
||||
needRerenderExpandBtnPlaceholderRect: boolean;
|
||||
}
|
||||
38
simple-mind-map/types/src/core/render/node/nodeGeneralization.d.ts
vendored
Normal file
38
simple-mind-map/types/src/core/render/node/nodeGeneralization.d.ts
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
declare namespace _default {
|
||||
export { formatGetGeneralization };
|
||||
export { checkHasGeneralization };
|
||||
export { checkHasSelfGeneralization };
|
||||
export { getGeneralizationNodeIndex };
|
||||
export { createGeneralizationNode };
|
||||
export { updateGeneralization };
|
||||
export { updateGeneralizationData };
|
||||
export { renderGeneralization };
|
||||
export { removeGeneralization };
|
||||
export { hideGeneralization };
|
||||
export { showGeneralization };
|
||||
export { setGeneralizationOpacity };
|
||||
export { handleGeneralizationMouseenter };
|
||||
export { handleGeneralizationMouseleave };
|
||||
}
|
||||
export default _default;
|
||||
declare function formatGetGeneralization(): any[];
|
||||
declare function checkHasGeneralization(): boolean;
|
||||
declare function checkHasSelfGeneralization(): boolean;
|
||||
declare function getGeneralizationNodeIndex(node: any): any;
|
||||
declare function createGeneralizationNode(): void;
|
||||
declare class createGeneralizationNode {
|
||||
_generalizationNodeWidth: number;
|
||||
_generalizationNodeHeight: number;
|
||||
}
|
||||
declare function updateGeneralization(): void;
|
||||
declare function updateGeneralizationData(): void;
|
||||
declare function renderGeneralization(forceRender: any): void;
|
||||
declare function removeGeneralization(): void;
|
||||
declare class removeGeneralization {
|
||||
_generalizationList: any[];
|
||||
}
|
||||
declare function hideGeneralization(): void;
|
||||
declare function showGeneralization(): void;
|
||||
declare function setGeneralizationOpacity(val: any): void;
|
||||
declare function handleGeneralizationMouseenter(): void;
|
||||
declare function handleGeneralizationMouseleave(): void;
|
||||
31
simple-mind-map/types/src/core/render/node/nodeLayout.d.ts
vendored
Normal file
31
simple-mind-map/types/src/core/render/node/nodeLayout.d.ts
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
declare namespace _default {
|
||||
export { getImgTextMarin };
|
||||
export { getTagContentSize };
|
||||
export { getNodeRect };
|
||||
export { addHoverNode };
|
||||
export { layout };
|
||||
export { customNodeContentRealtimeLayout };
|
||||
}
|
||||
export default _default;
|
||||
declare function getImgTextMarin(dir: any, imgWidth: any, textWidth: any, imgHeight: any, textHeight: any): any;
|
||||
declare function getTagContentSize(space: any): {
|
||||
width: any;
|
||||
height: number;
|
||||
};
|
||||
declare function getNodeRect(): {
|
||||
width: any;
|
||||
height: any;
|
||||
};
|
||||
declare function addHoverNode(width: any, height: any): void;
|
||||
declare class addHoverNode {
|
||||
constructor(width: any, height: any);
|
||||
hoverNode: any;
|
||||
}
|
||||
declare function layout(): void;
|
||||
declare class layout {
|
||||
shapeNode: any;
|
||||
}
|
||||
declare function customNodeContentRealtimeLayout(): void;
|
||||
declare class customNodeContentRealtimeLayout {
|
||||
shapeNode: any;
|
||||
}
|
||||
47
simple-mind-map/types/src/core/render/node/nodeModifyWidth.d.ts
vendored
Normal file
47
simple-mind-map/types/src/core/render/node/nodeModifyWidth.d.ts
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
declare namespace _default {
|
||||
export { initDragHandle };
|
||||
export { onDragMousemoveHandle };
|
||||
export { onDragMouseupHandle };
|
||||
export { createDragHandleNode };
|
||||
export { updateDragHandle };
|
||||
}
|
||||
export default _default;
|
||||
declare function initDragHandle(): void;
|
||||
declare class initDragHandle {
|
||||
_dragHandleNodes: any;
|
||||
dragHandleWidth: number;
|
||||
dragHandleMousedownX: number;
|
||||
isDragHandleMousedown: boolean;
|
||||
dragHandleIndex: number;
|
||||
dragHandleMousedownCustomTextWidth: number;
|
||||
dragHandleMousedownBodyCursor: string;
|
||||
dragHandleMousedownLeft: number;
|
||||
onDragMousemoveHandle: any;
|
||||
onDragMouseupHandle: any;
|
||||
}
|
||||
declare function onDragMousemoveHandle(e: any): void;
|
||||
declare class onDragMousemoveHandle {
|
||||
constructor(e: any);
|
||||
customTextWidth: any;
|
||||
left: any;
|
||||
}
|
||||
declare function onDragMouseupHandle(): void;
|
||||
declare class onDragMouseupHandle {
|
||||
isDragHandleMousedown: boolean;
|
||||
dragHandleMousedownX: number;
|
||||
dragHandleIndex: number;
|
||||
dragHandleMousedownCustomTextWidth: number;
|
||||
}
|
||||
declare function createDragHandleNode(): any[];
|
||||
declare class createDragHandleNode {
|
||||
dragHandleMousedownX: any;
|
||||
dragHandleIndex: number;
|
||||
dragHandleMousedownCustomTextWidth: any;
|
||||
dragHandleMousedownBodyCursor: string;
|
||||
dragHandleMousedownLeft: any;
|
||||
isDragHandleMousedown: boolean;
|
||||
}
|
||||
declare function updateDragHandle(): void;
|
||||
declare class updateDragHandle {
|
||||
_dragHandleNodes: any;
|
||||
}
|
||||
22
simple-mind-map/types/src/core/render/node/quickCreateChildBtn.d.ts
vendored
Normal file
22
simple-mind-map/types/src/core/render/node/quickCreateChildBtn.d.ts
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
declare namespace _default {
|
||||
export { initQuickCreateChildBtn };
|
||||
export { showQuickCreateChildBtn };
|
||||
export { removeQuickCreateChildBtn };
|
||||
export { hideQuickCreateChildBtn };
|
||||
}
|
||||
export default _default;
|
||||
declare function initQuickCreateChildBtn(): void;
|
||||
declare class initQuickCreateChildBtn {
|
||||
_quickCreateChildBtn: any;
|
||||
_showQuickCreateChildBtn: boolean;
|
||||
}
|
||||
declare function showQuickCreateChildBtn(): void;
|
||||
declare class showQuickCreateChildBtn {
|
||||
_quickCreateChildBtn: any;
|
||||
_showQuickCreateChildBtn: boolean;
|
||||
}
|
||||
declare function removeQuickCreateChildBtn(): void;
|
||||
declare class removeQuickCreateChildBtn {
|
||||
_showQuickCreateChildBtn: boolean;
|
||||
}
|
||||
declare function hideQuickCreateChildBtn(): void;
|
||||
46
simple-mind-map/types/src/core/view/View.d.ts
vendored
Normal file
46
simple-mind-map/types/src/core/view/View.d.ts
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
export default View;
|
||||
declare class View {
|
||||
constructor(opt?: {});
|
||||
opt: {};
|
||||
mindMap: any;
|
||||
scale: number;
|
||||
sx: number;
|
||||
sy: number;
|
||||
x: number;
|
||||
y: number;
|
||||
firstDrag: boolean;
|
||||
bind(): void;
|
||||
getTransformData(): {
|
||||
transform: any;
|
||||
state: {
|
||||
scale: number;
|
||||
x: number;
|
||||
y: number;
|
||||
sx: number;
|
||||
sy: number;
|
||||
};
|
||||
};
|
||||
setTransformData(viewData: any): void;
|
||||
translateXY(x: any, y: any): void;
|
||||
translateX(step: any): void;
|
||||
translateXTo(x: any): void;
|
||||
translateY(step: any): void;
|
||||
translateYTo(y: any): void;
|
||||
transform(): void;
|
||||
reset(): void;
|
||||
narrow(cx: any, cy: any, isTouchPad: any): void;
|
||||
enlarge(cx: any, cy: any, isTouchPad: any): void;
|
||||
scaleInCenter(scale: any, cx: any, cy: any): void;
|
||||
setScale(scale: any, cx: any, cy: any): void;
|
||||
fit(getRbox: () => void, enlarge: boolean, fitPadding: any): void;
|
||||
checkNeedMindMapInCanvas(): any;
|
||||
limitMindMapInCanvas(): void;
|
||||
getPositionLimit(): {
|
||||
scale: any;
|
||||
left: number;
|
||||
right: number;
|
||||
top: number;
|
||||
bottom: number;
|
||||
};
|
||||
emitEvent(type: any): void;
|
||||
}
|
||||
82
simple-mind-map/types/src/layouts/Base.d.ts
vendored
Normal file
82
simple-mind-map/types/src/layouts/Base.d.ts
vendored
Normal file
@ -0,0 +1,82 @@
|
||||
export default Base;
|
||||
declare class Base {
|
||||
constructor(renderer: any);
|
||||
renderer: any;
|
||||
mindMap: any;
|
||||
draw: any;
|
||||
lineDraw: any;
|
||||
root: any;
|
||||
lru: Lru;
|
||||
rootNodeCenterOffset: {
|
||||
x: number;
|
||||
y: number;
|
||||
} | {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
doLayout(): void;
|
||||
renderLine(): void;
|
||||
renderExpandBtn(): void;
|
||||
renderGeneralization(): void;
|
||||
cacheNode(uid: any, node: any): void;
|
||||
checkIsNeedResizeSources(): any;
|
||||
checkIsLayerTypeChange(oldIndex: any, newIndex: any): boolean;
|
||||
checkIsLayoutChangeRerenderExpandBtnPlaceholderRect(node: any): void;
|
||||
checkIsNodeDataChange(lastData: any, curData: any): boolean;
|
||||
checkNodeFixChange(newNode: any, nodeInnerPrefixData: any, nodeInnerPostfixData: any): boolean;
|
||||
createNode(data: any, parent: any, isRoot: any, layerIndex: any, index: any, ancestors: any): any;
|
||||
checkGetGeneralizationChange(node: any, isResizeSource: any): void;
|
||||
formatPosition(value: any, size: any, nodeSize: any): number;
|
||||
formatInitRootNodePosition(pos: any): any;
|
||||
setNodeCenter(node: any, position: any): void;
|
||||
getRootCenterOffset(width: any, height: any): {
|
||||
x: number;
|
||||
y: number;
|
||||
} | {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
updateChildren(children: any, prop: any, offset: any): void;
|
||||
updateChildrenPro(children: any, props: any): void;
|
||||
getNodeAreaWidth(node: any, withGeneralization?: boolean): number;
|
||||
quadraticCurvePath(x1: any, y1: any, x2: any, y2: any, v?: boolean): string;
|
||||
cubicBezierPath(x1: any, y1: any, x2: any, y2: any, v?: boolean): string;
|
||||
computeNewPoint(a: any, b: any, radius?: number): any[];
|
||||
createFoldLine(list: any): string;
|
||||
getMarginX(layerIndex: any): any;
|
||||
getMarginY(layerIndex: any): any;
|
||||
getNodeWidthWithGeneralization(node: any): number;
|
||||
getNodeHeightWithGeneralization(node: any): number;
|
||||
/**
|
||||
* dir:生长方向,h(水平)、v(垂直)
|
||||
* isLeft:是否向左生长
|
||||
*/
|
||||
getNodeBoundaries(node: any, dir: any): {
|
||||
left: any;
|
||||
right: any;
|
||||
top: any;
|
||||
bottom: any;
|
||||
generalizationLineMargin: any;
|
||||
generalizationNodeMargin: any;
|
||||
};
|
||||
getChildrenBoundaries(node: any, dir: any, startIndex: number, endIndex: any): {
|
||||
left: number;
|
||||
right: number;
|
||||
top: number;
|
||||
bottom: number;
|
||||
generalizationLineMargin: any;
|
||||
generalizationNodeMargin: any;
|
||||
};
|
||||
getNodeGeneralizationRenderBoundaries(item: any, dir: any): {
|
||||
left: any;
|
||||
right: any;
|
||||
top: any;
|
||||
bottom: any;
|
||||
generalizationLineMargin: any;
|
||||
generalizationNodeMargin: any;
|
||||
};
|
||||
getNodeActChildrenLength(node: any): any;
|
||||
setLineStyle(style: any, line: any, path: any, childNode: any): void;
|
||||
transformPath(path: any): any;
|
||||
}
|
||||
import Lru from '../utils/Lru';
|
||||
15
simple-mind-map/types/src/layouts/CatalogOrganization.d.ts
vendored
Normal file
15
simple-mind-map/types/src/layouts/CatalogOrganization.d.ts
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
export default CatalogOrganization;
|
||||
declare class CatalogOrganization extends Base {
|
||||
constructor(opt?: {});
|
||||
doLayout(callback: any): void;
|
||||
computedBaseValue(): void;
|
||||
computedLeftTopValue(): void;
|
||||
adjustLeftTopValue(): void;
|
||||
updateBrothersLeft(node: any, addWidth: any): void;
|
||||
updateBrothersTop(node: any, addHeight: any): void;
|
||||
renderLine(node: any, lines: any, style: any): any[];
|
||||
renderExpandBtn(node: any, btn: any): void;
|
||||
renderGeneralization(list: any): void;
|
||||
renderExpandBtnRect(rect: any, expandBtnSize: any, width: any, height: any, node: any): void;
|
||||
}
|
||||
import Base from './Base';
|
||||
38
simple-mind-map/types/src/layouts/Fishbone.d.ts
vendored
Normal file
38
simple-mind-map/types/src/layouts/Fishbone.d.ts
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
export default Fishbone;
|
||||
declare class Fishbone extends Base {
|
||||
constructor(opt: {}, layout: any);
|
||||
layout: any;
|
||||
indent: number;
|
||||
childIndent: number;
|
||||
fishTail: any;
|
||||
maxx: number;
|
||||
headRatio: number;
|
||||
tailRatio: number;
|
||||
paddingXRatio: number;
|
||||
fishHeadPathStr: string;
|
||||
fishTailPathStr: string;
|
||||
beforeChange(): void;
|
||||
nodeIsRemoveAllLines(node: any): any;
|
||||
isFishbone2(): boolean;
|
||||
bindEvent(): void;
|
||||
onCheckUpdateFishTail(name: any, node: any, data: any): void;
|
||||
unBindEvent(): void;
|
||||
extendShape(): void;
|
||||
doLayout(callback: any): void;
|
||||
addFishTail(): void;
|
||||
styleFishTail(): void;
|
||||
removeFishTail(): void;
|
||||
updateFishTailPosition(): void;
|
||||
computedBaseValue(): void;
|
||||
computedLeftTopValue(): void;
|
||||
adjustLeftTopValue(): void;
|
||||
getNodeAreaHeight(node: any): number;
|
||||
updateBrothersLeft(node: any): void;
|
||||
updateBrothersTop(node: any, addHeight: any): void;
|
||||
checkIsTop(node: any): boolean;
|
||||
renderLine(node: any, lines: any, style: any): any[];
|
||||
renderExpandBtn(node: any, btn: any): void;
|
||||
renderGeneralization(list: any): void;
|
||||
renderExpandBtnRect(rect: any, expandBtnSize: any, width: any, height: any, node: any): void;
|
||||
}
|
||||
import Base from './Base';
|
||||
187
simple-mind-map/types/src/layouts/ForceDirected.d.ts
vendored
Normal file
187
simple-mind-map/types/src/layouts/ForceDirected.d.ts
vendored
Normal file
@ -0,0 +1,187 @@
|
||||
export default ForceDirected;
|
||||
/**
|
||||
* 力导向图布局
|
||||
* 使用 D3.js 的 d3-force 模块实现高质量的力导向算法
|
||||
* 支持一次性布局和渐进式动画布局
|
||||
*/
|
||||
declare class ForceDirected extends Base {
|
||||
constructor(opt?: {});
|
||||
forceConfig: {
|
||||
idealDistance: number;
|
||||
repulsionStrength: number;
|
||||
attractionStrength: number;
|
||||
centerStrength: number;
|
||||
collideRadius: number;
|
||||
iterations: number;
|
||||
alphaDecay: number;
|
||||
velocityDecay: number;
|
||||
initialRadius: number;
|
||||
initialExpandAngle: number;
|
||||
layerDistance: number;
|
||||
siblingDistance: number;
|
||||
descendantEffect: number;
|
||||
nodeSize: number;
|
||||
textSize: number;
|
||||
linkStyle: string;
|
||||
linkCurvature: number;
|
||||
treeSpread: number;
|
||||
verticalCorrection: number;
|
||||
enableAnimation: boolean;
|
||||
animationDuration: number;
|
||||
animationSteps: number;
|
||||
adaptiveIterations: boolean;
|
||||
overlapAvoidanceIterations: number;
|
||||
stabilizationFactor: number;
|
||||
};
|
||||
simulation: any;
|
||||
d3Nodes: any[];
|
||||
d3Links: any[];
|
||||
isInitialLayout: boolean;
|
||||
isAnimating: boolean;
|
||||
animationFrameId: number;
|
||||
animationStep: number;
|
||||
animationStartPositions: Map<any, any>;
|
||||
animationTargetPositions: Map<any, any>;
|
||||
nodeIdMap: Map<any, any>;
|
||||
/**
|
||||
* 执行布局
|
||||
*/
|
||||
doLayout(callback: any): void;
|
||||
/**
|
||||
* 计算节点基础值,包括大小、初始位置等
|
||||
*/
|
||||
computedBaseValue(): void;
|
||||
/**
|
||||
* 应用力导向布局算法(一次性完成所有迭代)
|
||||
*/
|
||||
applyForceDirected(): void;
|
||||
/**
|
||||
* 计算适合当前节点数的迭代次数
|
||||
*/
|
||||
calculateIterations(): number;
|
||||
/**
|
||||
* 应用渐进式动画力导向布局
|
||||
*/
|
||||
applyAnimatedForceDirected(callback: any): void;
|
||||
/**
|
||||
* 保存动画起始位置
|
||||
*/
|
||||
saveStartPositions(): void;
|
||||
/**
|
||||
* 保存动画目标位置
|
||||
*/
|
||||
saveTargetPositions(): void;
|
||||
/**
|
||||
* 开始布局动画
|
||||
*/
|
||||
startLayoutAnimation(callback: any): void;
|
||||
/**
|
||||
* 缓动函数:先慢后快再慢
|
||||
*/
|
||||
easeInOutCubic(t: any): number;
|
||||
/**
|
||||
* 取消正在进行的动画
|
||||
*/
|
||||
cancelAnimation(): void;
|
||||
/**
|
||||
* 准备D3力导向布局需要的数据结构
|
||||
*/
|
||||
prepareD3Data(): {
|
||||
nodes: any[];
|
||||
links: any[];
|
||||
};
|
||||
/**
|
||||
* 计算节点重要度 - 影响布局决策
|
||||
*/
|
||||
calculateNodeImportance(node: any): number;
|
||||
/**
|
||||
* 计算连接强度 - 影响节点间吸引力
|
||||
*/
|
||||
calculateLinkStrength(node: any): number;
|
||||
/**
|
||||
* 计算连接的理想距离
|
||||
*/
|
||||
calculateLinkDistance(node: any): number;
|
||||
/**
|
||||
* 设置节点的初始位置 - 使用树形布局作为力导向的初始位置
|
||||
*/
|
||||
setInitialPositions(): void;
|
||||
/**
|
||||
* 添加微小随机偏移
|
||||
*/
|
||||
addRandomOffset(): void;
|
||||
/**
|
||||
* 找到节点的父节点ID
|
||||
*/
|
||||
findParentId(nodeId: any): any;
|
||||
/**
|
||||
* 运行D3力导向模拟
|
||||
*/
|
||||
runForceSimulation(iterations: any): void;
|
||||
/**
|
||||
* 计算节点斥力强度
|
||||
*/
|
||||
calculateRepulsionStrength(d: any): number;
|
||||
/**
|
||||
* 计算节点碰撞半径
|
||||
*/
|
||||
calculateCollideRadius(d: any): number;
|
||||
/**
|
||||
* 计算X轴力的强度
|
||||
*/
|
||||
calculateXForceStrength(d: any): number;
|
||||
/**
|
||||
* 计算Y轴力的强度
|
||||
*/
|
||||
calculateYForceStrength(d: any): number;
|
||||
/**
|
||||
* 计算X轴目标位置
|
||||
*/
|
||||
calculateXTarget(d: any): any;
|
||||
/**
|
||||
* 计算Y轴目标位置
|
||||
*/
|
||||
calculateYTarget(d: any): any;
|
||||
/**
|
||||
* 更新节点位置数据
|
||||
*/
|
||||
updateNodePositions(): void;
|
||||
/**
|
||||
* 布局后处理调整 - 解决重叠和优化布局
|
||||
*/
|
||||
postLayoutAdjustment(): void;
|
||||
/**
|
||||
* 解决节点重叠问题
|
||||
*/
|
||||
resolveOverlapping(): void;
|
||||
/**
|
||||
* 检查两个节点是否重叠
|
||||
*/
|
||||
checkOverlap(nodeA: any, nodeB: any): boolean;
|
||||
/**
|
||||
* 分离重叠的节点
|
||||
*/
|
||||
separateNodes(nodeA: any, nodeB: any): void;
|
||||
/**
|
||||
* 绘制连接线 - 从父节点到子节点
|
||||
*/
|
||||
renderLine(node: any, lines: any, style: any): void;
|
||||
/**
|
||||
* 绘制直线连接
|
||||
*/
|
||||
renderLineStraight(node: any, lines: any, style: any): void;
|
||||
/**
|
||||
* 绘制曲线连接
|
||||
*/
|
||||
renderLineCurve(node: any, lines: any, style: any): void;
|
||||
/**
|
||||
* 渲染展开收起按钮
|
||||
*/
|
||||
renderExpandBtn(node: any, btn: any): void;
|
||||
/**
|
||||
* 渲染展开收起按钮的隐藏占位元素
|
||||
*/
|
||||
renderExpandBtnRect(rect: any, expandBtnSize: any, width: any, height: any, node: any): void;
|
||||
renderGeneralization(list: any): void;
|
||||
}
|
||||
import Base from './Base';
|
||||
18
simple-mind-map/types/src/layouts/LogicalStructure.d.ts
vendored
Normal file
18
simple-mind-map/types/src/layouts/LogicalStructure.d.ts
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
export default LogicalStructure;
|
||||
declare class LogicalStructure extends Base {
|
||||
constructor(opt: {}, layout: any);
|
||||
isUseLeft: boolean;
|
||||
doLayout(callback: any): void;
|
||||
computedBaseValue(): void;
|
||||
computedTopValue(): void;
|
||||
adjustTopValue(): void;
|
||||
updateBrothers(node: any, addHeight: any): void;
|
||||
renderLine(node: any, lines: any, style: any, lineStyle: any): void;
|
||||
renderLineStraight(node: any, lines: any, style: any): any[];
|
||||
renderLineDirect(node: any, lines: any, style: any): any[];
|
||||
renderLineCurve(node: any, lines: any, style: any): any[];
|
||||
renderExpandBtn(node: any, btn: any): void;
|
||||
renderGeneralization(list: any): void;
|
||||
renderExpandBtnRect(rect: any, expandBtnSize: any, width: any, height: any): void;
|
||||
}
|
||||
import Base from './Base';
|
||||
17
simple-mind-map/types/src/layouts/MindMap.d.ts
vendored
Normal file
17
simple-mind-map/types/src/layouts/MindMap.d.ts
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
export default MindMap;
|
||||
declare class MindMap extends Base {
|
||||
constructor(opt?: {});
|
||||
doLayout(callback: any): void;
|
||||
computedBaseValue(): void;
|
||||
computedTopValue(): void;
|
||||
adjustTopValue(): void;
|
||||
updateBrothers(node: any, leftAddHeight: any, rightAddHeight: any): void;
|
||||
renderLine(node: any, lines: any, style: any, lineStyle: any): void;
|
||||
renderLineStraight(node: any, lines: any, style: any): any[];
|
||||
renderLineDirect(node: any, lines: any, style: any): any[];
|
||||
renderLineCurve(node: any, lines: any, style: any): any[];
|
||||
renderExpandBtn(node: any, btn: any): void;
|
||||
renderGeneralization(list: any): void;
|
||||
renderExpandBtnRect(rect: any, expandBtnSize: any, width: any, height: any, node: any): void;
|
||||
}
|
||||
import Base from './Base';
|
||||
17
simple-mind-map/types/src/layouts/OrganizationStructure.d.ts
vendored
Normal file
17
simple-mind-map/types/src/layouts/OrganizationStructure.d.ts
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
export default OrganizationStructure;
|
||||
declare class OrganizationStructure extends Base {
|
||||
constructor(opt?: {});
|
||||
doLayout(callback: any): void;
|
||||
computedBaseValue(): void;
|
||||
computedLeftValue(): void;
|
||||
adjustLeftValue(): void;
|
||||
updateBrothers(node: any, addWidth: any): void;
|
||||
renderLine(node: any, lines: any, style: any, lineStyle: any): void;
|
||||
renderLineCurve(node: any, lines: any, style: any): any[];
|
||||
renderLineDirect(node: any, lines: any, style: any): any[];
|
||||
renderLineStraight(node: any, lines: any, style: any): any[];
|
||||
renderExpandBtn(node: any, btn: any): void;
|
||||
renderGeneralization(list: any): void;
|
||||
renderExpandBtnRect(rect: any, expandBtnSize: any, width: any, height: any, node: any): void;
|
||||
}
|
||||
import Base from './Base';
|
||||
17
simple-mind-map/types/src/layouts/Timeline.d.ts
vendored
Normal file
17
simple-mind-map/types/src/layouts/Timeline.d.ts
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
export default Timeline;
|
||||
declare class Timeline extends Base {
|
||||
constructor(opt: {}, layout: any);
|
||||
layout: any;
|
||||
doLayout(callback: any): void;
|
||||
computedBaseValue(): void;
|
||||
computedLeftTopValue(): void;
|
||||
adjustLeftTopValue(): void;
|
||||
getNodeAreaHeight(node: any): number;
|
||||
updateBrothersLeft(node: any): void;
|
||||
updateBrothersTop(node: any, addHeight: any): void;
|
||||
renderLine(node: any, lines: any, style: any): any[];
|
||||
renderExpandBtn(node: any, btn: any): void;
|
||||
renderGeneralization(list: any): void;
|
||||
renderExpandBtnRect(rect: any, expandBtnSize: any, width: any, height: any, node: any): void;
|
||||
}
|
||||
import Base from './Base';
|
||||
19
simple-mind-map/types/src/layouts/VerticalTimeline.d.ts
vendored
Normal file
19
simple-mind-map/types/src/layouts/VerticalTimeline.d.ts
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
export default VerticalTimeline;
|
||||
declare class VerticalTimeline extends Base {
|
||||
constructor(opt: {}, layout: any);
|
||||
layout: any;
|
||||
doLayout(callback: any): void;
|
||||
computedBaseValue(): void;
|
||||
computedTopValue(): void;
|
||||
adjustLeftTopValue(): void;
|
||||
updateBrothers(node: any, addHeight: any): void;
|
||||
updateBrothersTop(node: any, addHeight: any): void;
|
||||
renderLine(node: any, lines: any, style: any, lineStyle: any): void;
|
||||
renderLineStraight(node: any, lines: any, style: any): any[];
|
||||
renderLineDirect(node: any, lines: any, style: any): any[];
|
||||
renderLineCurve(node: any, lines: any, style: any): any[];
|
||||
renderExpandBtn(node: any, btn: any): void;
|
||||
renderGeneralization(list: any): void;
|
||||
renderExpandBtnRect(rect: any, expandBtnSize: any, width: any, height: any, node: any): void;
|
||||
}
|
||||
import Base from './Base';
|
||||
77
simple-mind-map/types/src/layouts/fishboneUtils.d.ts
vendored
Normal file
77
simple-mind-map/types/src/layouts/fishboneUtils.d.ts
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
declare namespace _default {
|
||||
namespace top {
|
||||
function renderExpandBtn({ node, btn, expandBtnSize, translateX, translateY, width, height }: {
|
||||
node: any;
|
||||
btn: any;
|
||||
expandBtnSize: any;
|
||||
translateX: any;
|
||||
translateY: any;
|
||||
width: any;
|
||||
height: any;
|
||||
}): void;
|
||||
function renderLine({ node, line, top, x, lineLength, height, expandBtnSize, maxy, ctx }: {
|
||||
node: any;
|
||||
line: any;
|
||||
top: any;
|
||||
x: any;
|
||||
lineLength: any;
|
||||
height: any;
|
||||
expandBtnSize: any;
|
||||
maxy: any;
|
||||
ctx: any;
|
||||
}): void;
|
||||
function computedLeftTopValue({ layerIndex, node, ctx }: {
|
||||
layerIndex: any;
|
||||
node: any;
|
||||
ctx: any;
|
||||
}): void;
|
||||
function adjustLeftTopValueBefore({ node, parent, ctx, layerIndex }: {
|
||||
node: any;
|
||||
parent: any;
|
||||
ctx: any;
|
||||
layerIndex: any;
|
||||
}): void;
|
||||
function adjustLeftTopValueAfter({ parent, node, ctx }: {
|
||||
parent: any;
|
||||
node: any;
|
||||
ctx: any;
|
||||
}): void;
|
||||
}
|
||||
namespace bottom {
|
||||
function renderExpandBtn({ node, btn, expandBtnSize, translateX, translateY, width, height }: {
|
||||
node: any;
|
||||
btn: any;
|
||||
expandBtnSize: any;
|
||||
translateX: any;
|
||||
translateY: any;
|
||||
width: any;
|
||||
height: any;
|
||||
}): void;
|
||||
function renderLine({ node, line, top, x, lineLength, height, miny, ctx }: {
|
||||
node: any;
|
||||
line: any;
|
||||
top: any;
|
||||
x: any;
|
||||
lineLength: any;
|
||||
height: any;
|
||||
miny: any;
|
||||
ctx: any;
|
||||
}): void;
|
||||
function computedLeftTopValue({ layerIndex, node, ctx }: {
|
||||
layerIndex: any;
|
||||
node: any;
|
||||
ctx: any;
|
||||
}): void;
|
||||
function adjustLeftTopValueBefore({ node, ctx, layerIndex }: {
|
||||
node: any;
|
||||
ctx: any;
|
||||
layerIndex: any;
|
||||
}): void;
|
||||
function adjustLeftTopValueAfter({ parent, node, ctx }: {
|
||||
parent: any;
|
||||
node: any;
|
||||
ctx: any;
|
||||
}): void;
|
||||
}
|
||||
}
|
||||
export default _default;
|
||||
7
simple-mind-map/types/src/parse/markdown.d.ts
vendored
Normal file
7
simple-mind-map/types/src/parse/markdown.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
declare namespace _default {
|
||||
export { transformToMarkdown };
|
||||
export { transformMarkdownTo };
|
||||
}
|
||||
export default _default;
|
||||
import { transformToMarkdown } from './toMarkdown';
|
||||
import { transformMarkdownTo } from './markdownTo';
|
||||
1
simple-mind-map/types/src/parse/markdownTo.d.ts
vendored
Normal file
1
simple-mind-map/types/src/parse/markdownTo.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
export function transformMarkdownTo(md: any): any;
|
||||
1
simple-mind-map/types/src/parse/toMarkdown.d.ts
vendored
Normal file
1
simple-mind-map/types/src/parse/toMarkdown.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
export function transformToMarkdown(root: any): string;
|
||||
1
simple-mind-map/types/src/parse/toTxt.d.ts
vendored
Normal file
1
simple-mind-map/types/src/parse/toTxt.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
export function transformToTxt(root: any): string;
|
||||
11
simple-mind-map/types/src/parse/xmind.d.ts
vendored
Normal file
11
simple-mind-map/types/src/parse/xmind.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
declare namespace _default {
|
||||
export { parseXmindFile };
|
||||
export { transformXmind };
|
||||
export { transformOldXmind };
|
||||
export { transformToXmind };
|
||||
}
|
||||
export default _default;
|
||||
declare function parseXmindFile(file: any, handleMultiCanvas: any): Promise<any>;
|
||||
declare function transformXmind(content: any, files: any, handleMultiCanvas: any): Promise<{}>;
|
||||
declare function transformOldXmind(content: any): {};
|
||||
declare function transformToXmind(data: any, name: any): Promise<any>;
|
||||
104
simple-mind-map/types/src/plugins/AssociativeLine.d.ts
vendored
Normal file
104
simple-mind-map/types/src/plugins/AssociativeLine.d.ts
vendored
Normal file
@ -0,0 +1,104 @@
|
||||
export default AssociativeLine;
|
||||
declare class AssociativeLine {
|
||||
constructor(opt?: {});
|
||||
mindMap: any;
|
||||
associativeLineDraw: any;
|
||||
isNotRenderAllLines: boolean;
|
||||
lineList: any[];
|
||||
activeLine: any[];
|
||||
isCreatingLine: boolean;
|
||||
creatingStartNode: any;
|
||||
creatingLine: any;
|
||||
overlapNode: any;
|
||||
isNodeDragging: boolean;
|
||||
controlLine1: any;
|
||||
controlLine2: any;
|
||||
controlPoint1: any;
|
||||
controlPoint2: any;
|
||||
controlPointDiameter: number;
|
||||
isControlPointMousedown: boolean;
|
||||
mousedownControlPointKey: string;
|
||||
controlPointMousemoveState: {
|
||||
pos: any;
|
||||
startPoint: any;
|
||||
endPoint: any;
|
||||
targetIndex: string;
|
||||
};
|
||||
checkOverlapNode(x: any, y: any): void;
|
||||
showTextEdit: boolean;
|
||||
bindEvent(): void;
|
||||
renderAllLines(): void;
|
||||
onDrawClick(): void;
|
||||
onNodeClick(node: any): void;
|
||||
removeLine(): void;
|
||||
addLine(fromNode: any, toNode: any): void;
|
||||
onMousemove(e: any): void;
|
||||
onNodeDragging(): void;
|
||||
onNodeDragend(): void;
|
||||
onControlPointMouseup: any;
|
||||
onBeforeDestroy(): void;
|
||||
unBindEvent(): void;
|
||||
getStyleConfig(node: any, toNode: any): {};
|
||||
createMarker(callback?: () => void): any;
|
||||
updateAllLinesPos(node: any, toNode: any, associativeLinePoint: any): ({
|
||||
x: any;
|
||||
y: any;
|
||||
dir: string;
|
||||
range: number;
|
||||
} | {
|
||||
x: any;
|
||||
y: number;
|
||||
dir: "left";
|
||||
} | {
|
||||
x: any;
|
||||
y: number;
|
||||
dir: "right";
|
||||
} | {
|
||||
x: number;
|
||||
y: any;
|
||||
dir: "top";
|
||||
} | {
|
||||
x: number;
|
||||
y: any;
|
||||
dir: "bottom";
|
||||
})[];
|
||||
drawLine(startPoint: any, endPoint: any, node: any, toNode: any): void;
|
||||
updateActiveLineStyle(): void;
|
||||
setActiveLine({ path, clickPath, markerPath, text, node, toNode, startPoint, endPoint, controlPoints }: {
|
||||
path: any;
|
||||
clickPath: any;
|
||||
markerPath: any;
|
||||
text: any;
|
||||
node: any;
|
||||
toNode: any;
|
||||
startPoint: any;
|
||||
endPoint: any;
|
||||
controlPoints: any;
|
||||
}): void;
|
||||
removeAllLines(): void;
|
||||
createLineFromActiveNode(): void;
|
||||
createLine(fromNode: any): void;
|
||||
cancelCreateLine(): void;
|
||||
updateCreatingLine(e: any): void;
|
||||
getTransformedEventPos(e: any): {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
getNodePos(node: any): {
|
||||
left: any;
|
||||
top: any;
|
||||
translateLeft: any;
|
||||
translateTop: any;
|
||||
width: any;
|
||||
height: any;
|
||||
};
|
||||
completeCreateLine(node: any): void;
|
||||
clearActiveLine(): void;
|
||||
front(): void;
|
||||
back(): void;
|
||||
beforePluginRemove(): void;
|
||||
beforePluginDestroy(): void;
|
||||
}
|
||||
declare namespace AssociativeLine {
|
||||
let instanceName: string;
|
||||
}
|
||||
41
simple-mind-map/types/src/plugins/Cooperate.d.ts
vendored
Normal file
41
simple-mind-map/types/src/plugins/Cooperate.d.ts
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
export default Cooperate;
|
||||
declare class Cooperate {
|
||||
constructor(opt: any);
|
||||
opt: any;
|
||||
mindMap: any;
|
||||
ydoc: any;
|
||||
ymap: any;
|
||||
provider: any;
|
||||
awareness: any;
|
||||
currentAwarenessData: any[];
|
||||
waitNodeUidMap: {};
|
||||
currentData: any;
|
||||
userInfo: any;
|
||||
isSetData: boolean;
|
||||
initData(data: any): void;
|
||||
onObserve(event: any): void;
|
||||
getDoc(): any;
|
||||
setProvider(provider: any, webrtcProviderConfig?: {}): void;
|
||||
onAwareness(): void;
|
||||
bindEvent(): void;
|
||||
onDataChange(data: any): void;
|
||||
onNodeActive(node: any, nodeList: any): void;
|
||||
onNodeTreeRenderEnd(): void;
|
||||
onSetData(data: any): void;
|
||||
unBindEvent(): void;
|
||||
updateChanges(data: any): void;
|
||||
/**
|
||||
* {
|
||||
* id: '', // 必传,用户唯一的id
|
||||
* name: '', // 用户名称。name和avatar两个只传一个即可,如果都传了,会显示avatar
|
||||
* avatar: '', // 用户头像
|
||||
* color: '' // 如果没有传头像,那么会以一个圆形来显示名称的第一个字,文字的颜色为白色,圆的颜色可以通过该字段设置
|
||||
* }
|
||||
**/
|
||||
setUserInfo(userInfo: any): void;
|
||||
beforePluginRemove(): void;
|
||||
beforePluginDestroy(): void;
|
||||
}
|
||||
declare namespace Cooperate {
|
||||
let instanceName: string;
|
||||
}
|
||||
51
simple-mind-map/types/src/plugins/Demonstrate.d.ts
vendored
Normal file
51
simple-mind-map/types/src/plugins/Demonstrate.d.ts
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
export default Demonstrate;
|
||||
declare class Demonstrate {
|
||||
constructor(opt: any);
|
||||
mindMap: any;
|
||||
isInDemonstrate: boolean;
|
||||
stepList: any[];
|
||||
currentStepIndex: number;
|
||||
currentStepNode: any;
|
||||
currentUnderlineTextData: {
|
||||
index: number;
|
||||
list: any;
|
||||
length: any;
|
||||
};
|
||||
tmpStyleEl: HTMLStyleElement;
|
||||
highlightEl: HTMLDivElement;
|
||||
transformState: any;
|
||||
renderTree: any;
|
||||
config: any;
|
||||
needRestorePerformanceMode: boolean;
|
||||
onConfigUpdate(opt: any): void;
|
||||
enter(): void;
|
||||
_enter(): void;
|
||||
exit(): void;
|
||||
pausePerformanceMode(): void;
|
||||
restorePerformanceMode(): void;
|
||||
addTmpStyles(): void;
|
||||
removeTmpStyles(): void;
|
||||
createHighlightEl(): void;
|
||||
removeHighlightEl(): void;
|
||||
updateHighlightEl({ left, top, width, height }: {
|
||||
left: any;
|
||||
top: any;
|
||||
width: any;
|
||||
height: any;
|
||||
}): void;
|
||||
bindEvent(): void;
|
||||
onKeydown(e: any): void;
|
||||
bindFullscreenEvent(): void;
|
||||
onFullscreenChange(): void;
|
||||
unBindEvent(): void;
|
||||
prev(): void;
|
||||
next(): void;
|
||||
showNextUnderlineText(): void;
|
||||
jump(index: any): void;
|
||||
getStepList(): void;
|
||||
beforePluginRemove(): void;
|
||||
beforePluginDestroy(): void;
|
||||
}
|
||||
declare namespace Demonstrate {
|
||||
let instanceName: string;
|
||||
}
|
||||
98
simple-mind-map/types/src/plugins/Drag.d.ts
vendored
Normal file
98
simple-mind-map/types/src/plugins/Drag.d.ts
vendored
Normal file
@ -0,0 +1,98 @@
|
||||
export default Drag;
|
||||
declare class Drag extends Base {
|
||||
constructor({ mindMap }: {
|
||||
mindMap: any;
|
||||
});
|
||||
autoMove: AutoMove;
|
||||
reset(): void;
|
||||
isDragging: boolean;
|
||||
mousedownNode: any;
|
||||
beingDragNodeList: any;
|
||||
nodeList: any;
|
||||
overlapNode: any;
|
||||
prevNode: any;
|
||||
nextNode: any;
|
||||
drawTransform: any;
|
||||
clone: any;
|
||||
placeholder: any;
|
||||
placeholderWidth: number;
|
||||
placeholderHeight: number;
|
||||
placeHolderLine: any;
|
||||
placeHolderExtraLines: any[];
|
||||
offsetX: number;
|
||||
offsetY: number;
|
||||
isMousedown: boolean;
|
||||
mouseDownX: any;
|
||||
mouseDownY: any;
|
||||
mouseMoveX: any;
|
||||
mouseMoveY: any;
|
||||
checkDragOffset: number;
|
||||
minOffset: number;
|
||||
bindEvent(): void;
|
||||
onNodeMousedown(node: any, e: any): void;
|
||||
onMousemove(e: any): void;
|
||||
onMouseup(e: any): Promise<void>;
|
||||
checkOverlapNode(): void;
|
||||
unBindEvent(): void;
|
||||
removeNodeActive(node: any): void;
|
||||
onMove(x: any, y: any, e: any): void;
|
||||
handleStartMove(): Promise<void>;
|
||||
nodeTreeToList(): void;
|
||||
createCloneNode(): void;
|
||||
removeCloneNode(): void;
|
||||
removeExtraLines(): void;
|
||||
handleOverlapNode(): void;
|
||||
getNewChildNodeDir(node: any): any;
|
||||
handleVerticalCheck(node: any, checkList: any, isReverse?: boolean): void;
|
||||
handleHorizontalCheck(node: any, checkList: any): void;
|
||||
getNodeDistanceToSiblingNode(checkList: any, node: any, nodeRect: any, dir: any): {
|
||||
prevBrother: any;
|
||||
prevBrotherOffset: number;
|
||||
nextBrother: any;
|
||||
nextBrotherOffset: number;
|
||||
};
|
||||
setPlaceholderRect({ x, y, dir, rotate, notRenderLine }: {
|
||||
x: any;
|
||||
y: any;
|
||||
dir: any;
|
||||
rotate: any;
|
||||
notRenderLine: any;
|
||||
}): void;
|
||||
checkIsOverlap({ node, dir, prevBrotherOffset, nextBrotherOffset, size, pos, nodeRect }: {
|
||||
node: any;
|
||||
dir: any;
|
||||
prevBrotherOffset: any;
|
||||
nextBrotherOffset: any;
|
||||
size: any;
|
||||
pos: any;
|
||||
nodeRect: any;
|
||||
}): void;
|
||||
handleLogicalStructure(node: any): void;
|
||||
handleMindMap(node: any): void;
|
||||
handleOrganizationStructure(node: any): void;
|
||||
handleCatalogOrganization(node: any): void;
|
||||
handleTimeLine(node: any): void;
|
||||
handleTimeLine2(node: any): void;
|
||||
handleFishbone(node: any): void;
|
||||
commonGetNodeCheckList(node: any): any[];
|
||||
getNodeRect(node: any): {
|
||||
left: any;
|
||||
top: any;
|
||||
right: any;
|
||||
bottom: any;
|
||||
originWidth: any;
|
||||
originHeight: any;
|
||||
originLeft: any;
|
||||
originTop: any;
|
||||
originBottom: any;
|
||||
originRight: any;
|
||||
};
|
||||
checkIsInBeingDragNodeList(node: any): boolean;
|
||||
beforePluginRemove(): void;
|
||||
beforePluginDestroy(): void;
|
||||
}
|
||||
declare namespace Drag {
|
||||
let instanceName: string;
|
||||
}
|
||||
import Base from '../layouts/Base';
|
||||
import AutoMove from '../utils/AutoMove';
|
||||
34
simple-mind-map/types/src/plugins/Export.d.ts
vendored
Normal file
34
simple-mind-map/types/src/plugins/Export.d.ts
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
export default Export;
|
||||
declare class Export {
|
||||
constructor(opt: any);
|
||||
mindMap: any;
|
||||
export(type: any, isDownload?: boolean, name?: string, ...args: any[]): Promise<any>;
|
||||
createTransformImgTaskList(svg: any, tagName: any, propName: any, getUrlFn: any): any;
|
||||
getSvgData(node: any): Promise<{
|
||||
node: any;
|
||||
str: any;
|
||||
clipData: any;
|
||||
}>;
|
||||
svgToPng(svgSrc: any, transparent: any, clipData?: any, fitBg?: boolean, format?: string): Promise<any>;
|
||||
drawBackgroundToCanvas(ctx: any, width: any, height: any): Promise<any>;
|
||||
drawBackgroundToSvg(svg: any): Promise<any>;
|
||||
_image(format: any, name: any, transparent?: boolean, node?: any, fitBg?: boolean): Promise<any>;
|
||||
/**
|
||||
* 方法1.把svg的图片都转化成data:url格式,再转换
|
||||
* 方法2.把svg的图片提取出来再挨个绘制到canvas里,最后一起转换
|
||||
*/
|
||||
png(...args: any[]): Promise<any>;
|
||||
jpg(...args: any[]): Promise<any>;
|
||||
handleNodeExport(node: any): void;
|
||||
pdf(name: any, transparent?: boolean, fitBg?: boolean): Promise<any>;
|
||||
xmind(name: any): Promise<any>;
|
||||
svg(name: any): Promise<any>;
|
||||
fixSvgStrAndToBlob(str: any): Promise<any>;
|
||||
json(name: any, withConfig?: boolean): Promise<any>;
|
||||
smm(name: any, withConfig: any): Promise<any>;
|
||||
md(): Promise<any>;
|
||||
txt(): Promise<any>;
|
||||
}
|
||||
declare namespace Export {
|
||||
let instanceName: string;
|
||||
}
|
||||
9
simple-mind-map/types/src/plugins/ExportPDF.d.ts
vendored
Normal file
9
simple-mind-map/types/src/plugins/ExportPDF.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
export default ExportPDF;
|
||||
declare class ExportPDF {
|
||||
constructor(opt: any);
|
||||
mindMap: any;
|
||||
pdf(img: any): Promise<any>;
|
||||
}
|
||||
declare namespace ExportPDF {
|
||||
let instanceName: string;
|
||||
}
|
||||
15
simple-mind-map/types/src/plugins/ExportXMind.d.ts
vendored
Normal file
15
simple-mind-map/types/src/plugins/ExportXMind.d.ts
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
export default ExportXMind;
|
||||
declare class ExportXMind {
|
||||
constructor(opt: any);
|
||||
mindMap: any;
|
||||
xmind(data: any, name: any): Promise<any>;
|
||||
getXmind(): {
|
||||
parseXmindFile: (file: any, handleMultiCanvas: any) => Promise<any>;
|
||||
transformXmind: (content: any, files: any, handleMultiCanvas: any) => Promise<{}>;
|
||||
transformOldXmind: (content: any) => {};
|
||||
transformToXmind: (data: any, name: any) => Promise<any>;
|
||||
};
|
||||
}
|
||||
declare namespace ExportXMind {
|
||||
let instanceName: string;
|
||||
}
|
||||
32
simple-mind-map/types/src/plugins/Formula.d.ts
vendored
Normal file
32
simple-mind-map/types/src/plugins/Formula.d.ts
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
export default Formula;
|
||||
declare class Formula {
|
||||
constructor(opt: any);
|
||||
opt: any;
|
||||
mindMap: any;
|
||||
config: {
|
||||
throwOnError: boolean;
|
||||
errorColor: string;
|
||||
output: string;
|
||||
};
|
||||
cssEl: HTMLStyleElement;
|
||||
onDestroy(): void;
|
||||
init(): void;
|
||||
getKatexConfig(): {
|
||||
throwOnError: boolean;
|
||||
errorColor: string;
|
||||
output: string;
|
||||
};
|
||||
extendQuill(): void;
|
||||
getStyleText(): string;
|
||||
addStyle(): void;
|
||||
removeStyle(): void;
|
||||
insertFormulaToNode(node: any, formula: any): void;
|
||||
latexRichToText(nodeText: any): any;
|
||||
formatLatex(richText: any): void;
|
||||
checkFormulaIsLegal(str: any): boolean;
|
||||
beforePluginRemove(): void;
|
||||
beforePluginDestroy(): void;
|
||||
}
|
||||
declare namespace Formula {
|
||||
let instanceName: string;
|
||||
}
|
||||
2
simple-mind-map/types/src/plugins/FormulaStyle.d.ts
vendored
Normal file
2
simple-mind-map/types/src/plugins/FormulaStyle.d.ts
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
export function getFontStyleText(fontPath: any): string;
|
||||
export function getBaseStyleText(): string;
|
||||
53
simple-mind-map/types/src/plugins/KeyboardNavigation.d.ts
vendored
Normal file
53
simple-mind-map/types/src/plugins/KeyboardNavigation.d.ts
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
export default KeyboardNavigation;
|
||||
declare class KeyboardNavigation {
|
||||
constructor(opt: any);
|
||||
opt: any;
|
||||
mindMap: any;
|
||||
addShortcut(): void;
|
||||
onLeftKeyUp(): void;
|
||||
onUpKeyUp(): void;
|
||||
onRightKeyUp(): void;
|
||||
onDownKeyUp(): void;
|
||||
removeShortcut(): void;
|
||||
onKeyup(dir: any): void;
|
||||
focus(dir: any): void;
|
||||
getFocusNodeBySimpleAlgorithm({ currentActiveNode, currentActiveNodeRect, dir, checkNodeDis }: {
|
||||
currentActiveNode: any;
|
||||
currentActiveNodeRect: any;
|
||||
dir: any;
|
||||
checkNodeDis: any;
|
||||
}): void;
|
||||
getFocusNodeByShadowAlgorithm({ currentActiveNode, currentActiveNodeRect, dir, checkNodeDis }: {
|
||||
currentActiveNode: any;
|
||||
currentActiveNodeRect: any;
|
||||
dir: any;
|
||||
checkNodeDis: any;
|
||||
}): void;
|
||||
getFocusNodeByAreaAlgorithm({ currentActiveNode, currentActiveNodeRect, dir, checkNodeDis }: {
|
||||
currentActiveNode: any;
|
||||
currentActiveNodeRect: any;
|
||||
dir: any;
|
||||
checkNodeDis: any;
|
||||
}): void;
|
||||
getNodeRect(node: any): {
|
||||
right: any;
|
||||
bottom: any;
|
||||
left: any;
|
||||
top: any;
|
||||
};
|
||||
getDistance(node1Rect: any, node2Rect: any): number;
|
||||
getCenter({ left, right, top, bottom }: {
|
||||
left: any;
|
||||
right: any;
|
||||
top: any;
|
||||
bottom: any;
|
||||
}): {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
beforePluginRemove(): void;
|
||||
beforePluginDestroy(): void;
|
||||
}
|
||||
declare namespace KeyboardNavigation {
|
||||
let instanceName: string;
|
||||
}
|
||||
18
simple-mind-map/types/src/plugins/MindMapLayoutPro.d.ts
vendored
Normal file
18
simple-mind-map/types/src/plugins/MindMapLayoutPro.d.ts
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
export default MindMapLayoutPro;
|
||||
declare class MindMapLayoutPro {
|
||||
constructor(opt: any);
|
||||
opt: any;
|
||||
mindMap: any;
|
||||
init(): void;
|
||||
updateNodeTree(tree: any): void;
|
||||
afterExecCommand(name: any): void;
|
||||
layoutChange(layout: any): void;
|
||||
restore(): void;
|
||||
updateRenderTree(): void;
|
||||
isMindMapLayout(): boolean;
|
||||
beforePluginRemove(): void;
|
||||
beforePluginDestroy(): void;
|
||||
}
|
||||
declare namespace MindMapLayoutPro {
|
||||
let instanceName: string;
|
||||
}
|
||||
52
simple-mind-map/types/src/plugins/MiniMap.d.ts
vendored
Normal file
52
simple-mind-map/types/src/plugins/MiniMap.d.ts
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
export default MiniMap;
|
||||
declare class MiniMap {
|
||||
constructor(opt: any);
|
||||
mindMap: any;
|
||||
isMousedown: boolean;
|
||||
mousedownPos: {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
startViewPos: {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
currentState: {
|
||||
viewBoxStyle: {
|
||||
left: number;
|
||||
top: number;
|
||||
right: number;
|
||||
bottom: number;
|
||||
};
|
||||
miniMapBoxScale: number;
|
||||
miniMapBoxLeft: number;
|
||||
miniMapBoxTop: number;
|
||||
};
|
||||
/**
|
||||
* boxWidth:小地图容器的宽度
|
||||
* boxHeight:小地图容器的高度
|
||||
*/
|
||||
calculationMiniMap(boxWidth: any, boxHeight: any): {
|
||||
getImgUrl: (callback: any) => Promise<void>;
|
||||
svgHTML: any;
|
||||
viewBoxStyle: {
|
||||
left: number;
|
||||
top: number;
|
||||
right: number;
|
||||
bottom: number;
|
||||
};
|
||||
miniMapBoxScale: number;
|
||||
miniMapBoxLeft: number;
|
||||
miniMapBoxTop: number;
|
||||
};
|
||||
removeNodeContent(svg: any): void;
|
||||
onMousedown(e: any): void;
|
||||
onMousemove(e: any, sensitivityNum?: number): void;
|
||||
onMouseup(): void;
|
||||
isViewBoxMousedown: boolean;
|
||||
onViewBoxMousedown(e: any): void;
|
||||
onViewBoxMousemove(e: any): void;
|
||||
}
|
||||
declare namespace MiniMap {
|
||||
let instanceName: string;
|
||||
}
|
||||
17
simple-mind-map/types/src/plugins/NodeBase64ImageStorage.d.ts
vendored
Normal file
17
simple-mind-map/types/src/plugins/NodeBase64ImageStorage.d.ts
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
export default NodeBase64ImageStorage;
|
||||
declare class NodeBase64ImageStorage {
|
||||
constructor(opt: any);
|
||||
opt: any;
|
||||
mindMap: any;
|
||||
bindEvent(): void;
|
||||
onBeforeAddHistory(): void;
|
||||
unBindEvent(): void;
|
||||
isBase64ImgUrl(url: any): boolean;
|
||||
isImageKey(url: any): boolean;
|
||||
createImageKey(): string;
|
||||
beforePluginRemove(): void;
|
||||
beforePluginDestroy(): void;
|
||||
}
|
||||
declare namespace NodeBase64ImageStorage {
|
||||
let instanceName: string;
|
||||
}
|
||||
42
simple-mind-map/types/src/plugins/NodeImgAdjust.d.ts
vendored
Normal file
42
simple-mind-map/types/src/plugins/NodeImgAdjust.d.ts
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
export default NodeImgAdjust;
|
||||
declare class NodeImgAdjust {
|
||||
constructor({ mindMap }: {
|
||||
mindMap: any;
|
||||
});
|
||||
mindMap: any;
|
||||
handleEl: HTMLDivElement;
|
||||
isShowHandleEl: boolean;
|
||||
node: any;
|
||||
img: any;
|
||||
rect: any;
|
||||
isMousedown: boolean;
|
||||
mousedownDrawTransform: any;
|
||||
mousedownOffset: {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
currentImgWidth: number;
|
||||
currentImgHeight: number;
|
||||
isAdjusted: boolean;
|
||||
bindEvent(): void;
|
||||
onNodeImgMouseleave(): void;
|
||||
onNodeImgMousemove(node: any, img: any): void;
|
||||
onMousemove(e: any): void;
|
||||
onMouseup(): void;
|
||||
onRenderEnd(): void;
|
||||
onScale(): void;
|
||||
unBindEvent(): void;
|
||||
hideNodeImage(): void;
|
||||
showNodeImage(): void;
|
||||
showHandleEl(): void;
|
||||
hideHandleEl(): void;
|
||||
setHandleElRect(): void;
|
||||
updateHandleElSize(): void;
|
||||
createResizeBtnEl(): void;
|
||||
onMousedown(e: any): void;
|
||||
beforePluginRemove(): void;
|
||||
beforePluginDestroy(): void;
|
||||
}
|
||||
declare namespace NodeImgAdjust {
|
||||
let instanceName: string;
|
||||
}
|
||||
65
simple-mind-map/types/src/plugins/OuterFrame.d.ts
vendored
Normal file
65
simple-mind-map/types/src/plugins/OuterFrame.d.ts
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
export default OuterFrame;
|
||||
declare class OuterFrame {
|
||||
constructor(opt?: {});
|
||||
mindMap: any;
|
||||
draw: any;
|
||||
isNotRenderOuterFrames: boolean;
|
||||
textNodeList: any[];
|
||||
outerFrameElList: any[];
|
||||
activeOuterFrame: {
|
||||
el: any;
|
||||
node: any;
|
||||
range: any;
|
||||
textNode: any;
|
||||
};
|
||||
textEditNode: any;
|
||||
showTextEdit: boolean;
|
||||
createDrawContainer(): void;
|
||||
bindEvent(): void;
|
||||
renderOuterFrames(): void;
|
||||
clearActiveOuterFrame(): void;
|
||||
onBeforeDestroy(): void;
|
||||
addOuterFrame(appointNodes: any, config?: {}): void;
|
||||
removeActiveOuterFrame(): void;
|
||||
unBindEvent(): void;
|
||||
getActiveOuterFrame(): {
|
||||
el: any;
|
||||
node: any;
|
||||
range: any;
|
||||
textNode: any;
|
||||
};
|
||||
removeActiveOuterFrameText(): void;
|
||||
updateActiveOuterFrame(config?: {}): void;
|
||||
updateOuterFrameStyle(): void;
|
||||
getRangeNodeList(node: any, range: any): any;
|
||||
getNodeRangeFirstNode(node: any, range: any): any;
|
||||
setActiveOuterFrame(el: any, node: any, range: any, textNode: any): void;
|
||||
getStyle(node: any): any;
|
||||
createOuterFrameEl(x: any, y: any, width: any, height: any, styleConfig?: {}): any;
|
||||
styleOuterFrame(el: any, styleConfig: any): void;
|
||||
clearTextNodes(): void;
|
||||
clearOuterFrameElList(): void;
|
||||
beforePluginRemove(): void;
|
||||
beforePluginDestroy(): void;
|
||||
}
|
||||
declare namespace OuterFrame {
|
||||
export let instanceName: string;
|
||||
export { defaultStyle };
|
||||
}
|
||||
declare namespace defaultStyle {
|
||||
let radius: number;
|
||||
let strokeWidth: number;
|
||||
let strokeColor: string;
|
||||
let strokeDasharray: string;
|
||||
let fill: string;
|
||||
let fontSize: number;
|
||||
let fontFamily: string;
|
||||
let fontWeight: string;
|
||||
let fontStyle: string;
|
||||
let color: string;
|
||||
let lineHeight: number;
|
||||
let textFill: string;
|
||||
let textFillRadius: number;
|
||||
let textFillPadding: number[];
|
||||
let textAlign: string;
|
||||
}
|
||||
20
simple-mind-map/types/src/plugins/Painter.d.ts
vendored
Normal file
20
simple-mind-map/types/src/plugins/Painter.d.ts
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
export default Painter;
|
||||
declare class Painter {
|
||||
constructor({ mindMap }: {
|
||||
mindMap: any;
|
||||
});
|
||||
mindMap: any;
|
||||
isInPainter: boolean;
|
||||
painterNode: any;
|
||||
bindEvent(): void;
|
||||
painterOneNode(node: any): void;
|
||||
onEndPainter(): void;
|
||||
unBindEvent(): void;
|
||||
startPainter(): void;
|
||||
endPainter(): void;
|
||||
beforePluginRemove(): void;
|
||||
beforePluginDestroy(): void;
|
||||
}
|
||||
declare namespace Painter {
|
||||
let instanceName: string;
|
||||
}
|
||||
15
simple-mind-map/types/src/plugins/RainbowLines.d.ts
vendored
Normal file
15
simple-mind-map/types/src/plugins/RainbowLines.d.ts
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
export default RainbowLines;
|
||||
declare class RainbowLines {
|
||||
constructor({ mindMap }: {
|
||||
mindMap: any;
|
||||
});
|
||||
mindMap: any;
|
||||
updateRainLinesConfig(config?: {}): void;
|
||||
removeNodeLineColor(): void;
|
||||
getSecondLayerAncestor(node: any): any;
|
||||
getColorsList(): any;
|
||||
getNodeColor(node: any): any;
|
||||
}
|
||||
declare namespace RainbowLines {
|
||||
let instanceName: string;
|
||||
}
|
||||
70
simple-mind-map/types/src/plugins/RichText.d.ts
vendored
Normal file
70
simple-mind-map/types/src/plugins/RichText.d.ts
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
export default RichText;
|
||||
declare class RichText {
|
||||
constructor({ mindMap, pluginOpt }: {
|
||||
mindMap: any;
|
||||
pluginOpt: any;
|
||||
});
|
||||
mindMap: any;
|
||||
pluginOpt: any;
|
||||
textEditNode: HTMLDivElement;
|
||||
showTextEdit: boolean;
|
||||
quill: any;
|
||||
range: any;
|
||||
lastRange: any;
|
||||
pasteUseRange: any;
|
||||
node: any;
|
||||
isInserting: boolean;
|
||||
styleEl: HTMLStyleElement;
|
||||
cacheEditingText: string;
|
||||
isCompositing: boolean;
|
||||
textNodePaddingX: number;
|
||||
textNodePaddingY: number;
|
||||
bindEvent(): void;
|
||||
onCompositionStart(): void;
|
||||
onCompositionUpdate(): void;
|
||||
onCompositionEnd(): void;
|
||||
handleSetData(data: any): any;
|
||||
unbindEvent(): void;
|
||||
appendCss(): void;
|
||||
initOpt(): void;
|
||||
extendQuill(): void;
|
||||
extendFont(list?: any[], cover?: boolean): void;
|
||||
extendAlign(): void;
|
||||
showEditText({ node, rect, isInserting, isFromKeyDown, isFromScale }: {
|
||||
node: any;
|
||||
rect: any;
|
||||
isInserting: any;
|
||||
isFromKeyDown: any;
|
||||
isFromScale: any;
|
||||
}): void;
|
||||
onOpenRealtimeRenderOnNodeTextEditConfigUpdate(openRealtimeRenderOnNodeTextEdit: any): void;
|
||||
addNodeTextStyleToTextEditNode(node: any): void;
|
||||
setQuillContainerMinHeight(minHeight: any): void;
|
||||
updateTextEditNode(): void;
|
||||
removeTextEditEl(): void;
|
||||
getEditText(): any;
|
||||
hideEditText(nodes: any): void;
|
||||
initQuillEditor(): void;
|
||||
getPasteTextStyle(): any;
|
||||
formatPasteText(text: any): any;
|
||||
setIsShowTextEdit(val: any): void;
|
||||
selectAll(): void;
|
||||
focus(start: any): void;
|
||||
formatText(config?: {}, clear?: boolean): void;
|
||||
removeFormat(): void;
|
||||
formatRangeText(range: any, config?: {}): void;
|
||||
formatAllText(config?: {}): void;
|
||||
normalStyleToRichTextStyle(style: any): {};
|
||||
richTextStyleToNormalStyle(config: any): {};
|
||||
isHasRichTextStyle(obj: any): boolean;
|
||||
checkNodeHasCustomRichTextStyle(node: any): boolean;
|
||||
afterHandleData(): void;
|
||||
handleDataToRichTextOnInit(): void;
|
||||
transformAllNodesToNormalNode(): void;
|
||||
handleDataToRichText(data: any): void;
|
||||
beforePluginRemove(): void;
|
||||
beforePluginDestroy(): void;
|
||||
}
|
||||
declare namespace RichText {
|
||||
let instanceName: string;
|
||||
}
|
||||
47
simple-mind-map/types/src/plugins/Scrollbar.d.ts
vendored
Normal file
47
simple-mind-map/types/src/plugins/Scrollbar.d.ts
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
export default Scrollbar;
|
||||
declare class Scrollbar {
|
||||
constructor(opt: any);
|
||||
mindMap: any;
|
||||
scrollbarWrapSize: {
|
||||
width: number;
|
||||
height: number;
|
||||
};
|
||||
chartHeight: number;
|
||||
chartWidth: number;
|
||||
reset(): void;
|
||||
currentScrollType: any;
|
||||
isMousedown: boolean;
|
||||
mousedownPos: {
|
||||
x: number;
|
||||
y: number;
|
||||
} | {
|
||||
x: any;
|
||||
y: any;
|
||||
};
|
||||
mousedownScrollbarPos: number;
|
||||
bindEvent(): void;
|
||||
onMousemove(e: any): void;
|
||||
onMouseup(): void;
|
||||
updateScrollbar(): void;
|
||||
unBindEvent(): void;
|
||||
emitEvent(data: any): void;
|
||||
setScrollBarWrapSize(width: any, height: any): void;
|
||||
calculationScrollbar(): {
|
||||
vertical: {
|
||||
top: number;
|
||||
height: number;
|
||||
};
|
||||
horizontal: {
|
||||
left: number;
|
||||
width: number;
|
||||
};
|
||||
};
|
||||
onMousedown(e: any, type: any): void;
|
||||
updateMindMapView(type: any, offset: any): void;
|
||||
onClick(e: any, type: any): void;
|
||||
beforePluginRemove(): void;
|
||||
beforePluginDestroy(): void;
|
||||
}
|
||||
declare namespace Scrollbar {
|
||||
let instanceName: string;
|
||||
}
|
||||
35
simple-mind-map/types/src/plugins/Search.d.ts
vendored
Normal file
35
simple-mind-map/types/src/plugins/Search.d.ts
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
export default Search;
|
||||
declare class Search {
|
||||
constructor({ mindMap }: {
|
||||
mindMap: any;
|
||||
});
|
||||
mindMap: any;
|
||||
isSearching: boolean;
|
||||
searchText: string;
|
||||
matchNodeList: any[];
|
||||
currentIndex: number;
|
||||
notResetSearchText: boolean;
|
||||
isJumpNext: boolean;
|
||||
bindEvent(): void;
|
||||
onDataChange(): void;
|
||||
onModeChange(mode: any): void;
|
||||
unBindEvent(): void;
|
||||
search(text: any, callback?: () => void): void;
|
||||
updateMatchNodeList(list: any): void;
|
||||
endSearch(): void;
|
||||
doSearch(): void;
|
||||
isNodeInstance(node: any): node is MindMapNode;
|
||||
searchNext(callback: any, index: any): void;
|
||||
clearHighlightOnReadonly(): void;
|
||||
jump(index: any, callback?: () => void): void;
|
||||
replace(replaceText: any, jumpNext?: boolean): void;
|
||||
replaceAll(replaceText: any): void;
|
||||
getReplacedText(node: any, searchText: any, replaceText: any): any;
|
||||
emitEvent(): void;
|
||||
beforePluginRemove(): void;
|
||||
beforePluginDestroy(): void;
|
||||
}
|
||||
declare namespace Search {
|
||||
let instanceName: string;
|
||||
}
|
||||
import MindMapNode from '../core/render/node/MindMapNode';
|
||||
31
simple-mind-map/types/src/plugins/Select.d.ts
vendored
Normal file
31
simple-mind-map/types/src/plugins/Select.d.ts
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
export default Select;
|
||||
declare class Select {
|
||||
constructor({ mindMap }: {
|
||||
mindMap: any;
|
||||
});
|
||||
mindMap: any;
|
||||
rect: any;
|
||||
isMousedown: boolean;
|
||||
mouseDownX: number;
|
||||
mouseDownY: number;
|
||||
mouseMoveX: number;
|
||||
mouseMoveY: number;
|
||||
isSelecting: boolean;
|
||||
cacheActiveList: any[];
|
||||
autoMove: AutoMove;
|
||||
bindEvent(): void;
|
||||
onMousedown(e: any): void;
|
||||
onMousemove(e: any): void;
|
||||
onMouseup(): void;
|
||||
checkInNodes(): void;
|
||||
unBindEvent(): void;
|
||||
checkTriggerNodeActiveEvent(): void;
|
||||
createRect(x: any, y: any): void;
|
||||
hasSelectRange(): boolean;
|
||||
beforePluginRemove(): void;
|
||||
beforePluginDestroy(): void;
|
||||
}
|
||||
declare namespace Select {
|
||||
let instanceName: string;
|
||||
}
|
||||
import AutoMove from '../utils/AutoMove';
|
||||
35
simple-mind-map/types/src/plugins/TouchEvent.d.ts
vendored
Normal file
35
simple-mind-map/types/src/plugins/TouchEvent.d.ts
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
export default TouchEvent;
|
||||
declare class TouchEvent {
|
||||
constructor({ mindMap }: {
|
||||
mindMap: any;
|
||||
});
|
||||
mindMap: any;
|
||||
touchesNum: number;
|
||||
singleTouchstartEvent: any;
|
||||
clickNum: number;
|
||||
touchStartScaleView: {
|
||||
distance: number;
|
||||
scale: any;
|
||||
x: any;
|
||||
y: any;
|
||||
cx: number;
|
||||
cy: number;
|
||||
};
|
||||
lastTouchStartPosition: {
|
||||
x: any;
|
||||
y: any;
|
||||
};
|
||||
lastTouchStartDistance: number;
|
||||
bindEvent(): void;
|
||||
onTouchstart(e: any): void;
|
||||
onTouchmove(e: any): void;
|
||||
onTouchcancel(e: any): void;
|
||||
onTouchend(e: any): void;
|
||||
unBindEvent(): void;
|
||||
dispatchMouseEvent(eventName: any, target: any, e: any): void;
|
||||
beforePluginRemove(): void;
|
||||
beforePluginDestroy(): void;
|
||||
}
|
||||
declare namespace TouchEvent {
|
||||
let instanceName: string;
|
||||
}
|
||||
38
simple-mind-map/types/src/plugins/Watermark.d.ts
vendored
Normal file
38
simple-mind-map/types/src/plugins/Watermark.d.ts
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
export default Watermark;
|
||||
declare class Watermark {
|
||||
constructor(opt?: {});
|
||||
mindMap: any;
|
||||
lineSpacing: number;
|
||||
textSpacing: number;
|
||||
angle: number;
|
||||
text: string;
|
||||
textStyle: {};
|
||||
watermarkDraw: any;
|
||||
isInExport: boolean;
|
||||
maxLong: number;
|
||||
getMaxLong(): number;
|
||||
bindEvent(): void;
|
||||
onResize(): void;
|
||||
unBindEvent(): void;
|
||||
createContainer(): void;
|
||||
updateLayer(): void;
|
||||
removeContainer(): void;
|
||||
hasWatermark(): boolean;
|
||||
handleConfig({ text, lineSpacing, textSpacing, angle, textStyle }: {
|
||||
text: any;
|
||||
lineSpacing: any;
|
||||
textSpacing: any;
|
||||
angle: any;
|
||||
textStyle: any;
|
||||
}): void;
|
||||
clear(): void;
|
||||
draw(): void;
|
||||
drawText(x: any, y: any): void;
|
||||
setTextStyle(text: any): void;
|
||||
updateWatermark(config: any): void;
|
||||
beforePluginRemove(): void;
|
||||
beforePluginDestroy(): void;
|
||||
}
|
||||
declare namespace Watermark {
|
||||
let instanceName: string;
|
||||
}
|
||||
57
simple-mind-map/types/src/plugins/associativeLine/associativeLineControls.d.ts
vendored
Normal file
57
simple-mind-map/types/src/plugins/associativeLine/associativeLineControls.d.ts
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
declare namespace _default {
|
||||
export { createControlNodes };
|
||||
export { createOneControlNode };
|
||||
export { onControlPointMousedown };
|
||||
export { onControlPointMousemove };
|
||||
export { onControlPointMouseup };
|
||||
export { resetControlPoint };
|
||||
export { renderControls };
|
||||
export { removeControls };
|
||||
export { hideControls };
|
||||
export { showControls };
|
||||
export { updataAassociativeLine };
|
||||
}
|
||||
export default _default;
|
||||
declare function createControlNodes(node: any, toNode: any): void;
|
||||
declare class createControlNodes {
|
||||
constructor(node: any, toNode: any);
|
||||
controlLine1: any;
|
||||
controlLine2: any;
|
||||
controlPoint1: any;
|
||||
controlPoint2: any;
|
||||
}
|
||||
declare function createOneControlNode(pointKey: any, node: any, toNode: any): any;
|
||||
declare function onControlPointMousedown(e: any, pointKey: any): void;
|
||||
declare class onControlPointMousedown {
|
||||
constructor(e: any, pointKey: any);
|
||||
isControlPointMousedown: boolean;
|
||||
mousedownControlPointKey: any;
|
||||
}
|
||||
declare function onControlPointMousemove(e: any): void;
|
||||
declare function onControlPointMouseup(e: any): void;
|
||||
declare class onControlPointMouseup {
|
||||
constructor(e: any);
|
||||
isNotRenderAllLines: boolean;
|
||||
}
|
||||
declare function resetControlPoint(): void;
|
||||
declare class resetControlPoint {
|
||||
isControlPointMousedown: boolean;
|
||||
mousedownControlPointKey: string;
|
||||
controlPointMousemoveState: {
|
||||
pos: any;
|
||||
startPoint: any;
|
||||
endPoint: any;
|
||||
targetIndex: string;
|
||||
};
|
||||
}
|
||||
declare function renderControls(startPoint: any, endPoint: any, point1: any, point2: any, node: any, toNode: any): void;
|
||||
declare function removeControls(): void;
|
||||
declare class removeControls {
|
||||
controlLine1: any;
|
||||
controlLine2: any;
|
||||
controlPoint1: any;
|
||||
controlPoint2: any;
|
||||
}
|
||||
declare function hideControls(): void;
|
||||
declare function showControls(): void;
|
||||
declare function updataAassociativeLine(startPoint: any, endPoint: any, point1: any, point2: any, activeLine: any): void;
|
||||
33
simple-mind-map/types/src/plugins/associativeLine/associativeLineText.d.ts
vendored
Normal file
33
simple-mind-map/types/src/plugins/associativeLine/associativeLineText.d.ts
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
declare namespace _default {
|
||||
export { getText };
|
||||
export { createText };
|
||||
export { styleText };
|
||||
export { onScale };
|
||||
export { showEditTextBox };
|
||||
export { setIsShowTextEdit };
|
||||
export { removeTextEditEl };
|
||||
export { hideEditTextBox };
|
||||
export { updateTextEditBoxPos };
|
||||
export { renderText };
|
||||
export { updateTextPos };
|
||||
}
|
||||
export default _default;
|
||||
declare function getText(node: any, toNode: any): any;
|
||||
declare function createText(data: any): any;
|
||||
declare function styleText(textNode: any, node: any, toNode: any): void;
|
||||
declare function onScale(): void;
|
||||
declare function showEditTextBox(g: any): void;
|
||||
declare class showEditTextBox {
|
||||
constructor(g: any);
|
||||
textEditNode: HTMLDivElement;
|
||||
}
|
||||
declare function setIsShowTextEdit(val: any): void;
|
||||
declare class setIsShowTextEdit {
|
||||
constructor(val: any);
|
||||
showTextEdit: any;
|
||||
}
|
||||
declare function removeTextEditEl(): void;
|
||||
declare function hideEditTextBox(): void;
|
||||
declare function updateTextEditBoxPos(g: any): void;
|
||||
declare function renderText(str: any, path: any, text: any, node: any, toNode: any): void;
|
||||
declare function updateTextPos(path: any, text: any): void;
|
||||
68
simple-mind-map/types/src/plugins/associativeLine/associativeLineUtils.d.ts
vendored
Normal file
68
simple-mind-map/types/src/plugins/associativeLine/associativeLineUtils.d.ts
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
export function getAssociativeLineTargetIndex(node: any, toNode: any): any;
|
||||
export function computeCubicBezierPathPoints(x1: any, y1: any, x2: any, y2: any): {
|
||||
x: any;
|
||||
y: any;
|
||||
}[];
|
||||
export function joinCubicBezierPath(startPoint: any, endPoint: any, point1: any, point2: any): string;
|
||||
export function cubicBezierPath(x1: any, y1: any, x2: any, y2: any): string;
|
||||
export function calcPoint(node: any, e: any): {
|
||||
x: any;
|
||||
y: any;
|
||||
dir: string;
|
||||
range: number;
|
||||
};
|
||||
export function getNodePoint(node: any, dir?: string, range?: number, e?: any): {
|
||||
x: any;
|
||||
y: any;
|
||||
dir: string;
|
||||
range: number;
|
||||
} | {
|
||||
x: any;
|
||||
y: number;
|
||||
dir: "left";
|
||||
} | {
|
||||
x: any;
|
||||
y: number;
|
||||
dir: "right";
|
||||
} | {
|
||||
x: number;
|
||||
y: any;
|
||||
dir: "top";
|
||||
} | {
|
||||
x: number;
|
||||
y: any;
|
||||
dir: "bottom";
|
||||
};
|
||||
export function computeNodePoints(fromNode: any, toNode: any): ({
|
||||
x: any;
|
||||
y: any;
|
||||
dir: string;
|
||||
range: number;
|
||||
} | {
|
||||
x: any;
|
||||
y: number;
|
||||
dir: "left";
|
||||
} | {
|
||||
x: any;
|
||||
y: number;
|
||||
dir: "right";
|
||||
} | {
|
||||
x: number;
|
||||
y: any;
|
||||
dir: "top";
|
||||
} | {
|
||||
x: number;
|
||||
y: any;
|
||||
dir: "bottom";
|
||||
})[];
|
||||
export function getNodeLinePath(startPoint: any, endPoint: any, node: any, toNode: any): {
|
||||
path: string;
|
||||
controlPoints: {
|
||||
x: any;
|
||||
y: any;
|
||||
}[];
|
||||
};
|
||||
export function getDefaultControlPointOffsets(startPoint: any, endPoint: any): {
|
||||
x: number;
|
||||
y: number;
|
||||
}[];
|
||||
33
simple-mind-map/types/src/plugins/outerFrame/outerFrameText.d.ts
vendored
Normal file
33
simple-mind-map/types/src/plugins/outerFrame/outerFrameText.d.ts
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
declare namespace _default {
|
||||
export { getText };
|
||||
export { createText };
|
||||
export { styleTextShape };
|
||||
export { styleText };
|
||||
export { onScale };
|
||||
export { showEditTextBox };
|
||||
export { setIsShowTextEdit };
|
||||
export { removeTextEditEl };
|
||||
export { hideEditTextBox };
|
||||
export { updateTextEditBoxPos };
|
||||
export { renderText };
|
||||
}
|
||||
export default _default;
|
||||
declare function getText(node: any): any;
|
||||
declare function createText(el: any, cur: any, range: any): any;
|
||||
declare function styleTextShape(shape: any, style: any): void;
|
||||
declare function styleText(textNode: any, style: any): void;
|
||||
declare function onScale(): void;
|
||||
declare function showEditTextBox(g: any): void;
|
||||
declare class showEditTextBox {
|
||||
constructor(g: any);
|
||||
textEditNode: HTMLDivElement;
|
||||
}
|
||||
declare function setIsShowTextEdit(val: any): void;
|
||||
declare class setIsShowTextEdit {
|
||||
constructor(val: any);
|
||||
showTextEdit: any;
|
||||
}
|
||||
declare function removeTextEditEl(): void;
|
||||
declare function hideEditTextBox(): void;
|
||||
declare function updateTextEditBoxPos(g: any): void;
|
||||
declare function renderText(str: any, rect: any, textNode: any, node: any, range: any): void;
|
||||
2
simple-mind-map/types/src/plugins/outerFrame/outerFrameUtils.d.ts
vendored
Normal file
2
simple-mind-map/types/src/plugins/outerFrame/outerFrameUtils.d.ts
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
export function parseAddNodeList(list: any): any[];
|
||||
export function getNodeOuterFrameList(node: any): any[];
|
||||
13
simple-mind-map/types/src/svg/btns.d.ts
vendored
Normal file
13
simple-mind-map/types/src/svg/btns.d.ts
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
declare namespace _default {
|
||||
export { open };
|
||||
export { close };
|
||||
export { remove };
|
||||
export { imgAdjust };
|
||||
export { quickCreateChild };
|
||||
}
|
||||
export default _default;
|
||||
declare const open: "<svg viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"200\" height=\"200\"><path d=\"M475.136 327.168v147.968h-147.968v74.24h147.968v147.968h74.24v-147.968h147.968v-74.24h-147.968v-147.968h-74.24z m36.864-222.208c225.28 0 407.04 181.76 407.04 407.04s-181.76 407.04-407.04 407.04-407.04-181.76-407.04-407.04 181.76-407.04 407.04-407.04z m0-74.24c-265.216 0-480.768 215.552-480.768 480.768s215.552 480.768 480.768 480.768 480.768-215.552 480.768-480.768-215.552-480.768-480.768-480.768z\"></path></svg>";
|
||||
declare const close: "<svg viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"200\" height=\"200\"><path d=\"M512 105.472c225.28 0 407.04 181.76 407.04 407.04s-181.76 407.04-407.04 407.04-407.04-181.76-407.04-407.04 181.76-407.04 407.04-407.04z m0-74.24c-265.216 0-480.768 215.552-480.768 480.768s215.552 480.768 480.768 480.768 480.768-215.552 480.768-480.768-215.552-480.768-480.768-480.768z\"></path><path d=\"M252.928 474.624h518.144v74.24h-518.144z\"></path></svg>";
|
||||
declare const remove: "<svg width=\"14px\" height=\"14px\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"200\" height=\"200\"><path fill=\"#ffffff\" d=\"M512 105.472c225.28 0 407.04 181.76 407.04 407.04s-181.76 407.04-407.04 407.04-407.04-181.76-407.04-407.04 181.76-407.04 407.04-407.04z m0-74.24c-265.216 0-480.768 215.552-480.768 480.768s215.552 480.768 480.768 480.768 480.768-215.552 480.768-480.768-215.552-480.768-480.768-480.768z\"></path><path fill=\"#ffffff\" d=\"M252.928 474.624h518.144v74.24h-518.144z\"></path></svg>";
|
||||
declare const imgAdjust: "<svg width=\"12px\" height=\"12px\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"#ffffff\" d=\"M1008.128 614.4a25.6 25.6 0 0 0-27.648 5.632l-142.848 142.848L259.072 186.88 401.92 43.52A25.6 25.6 0 0 0 384 0h-358.4a25.6 25.6 0 0 0-25.6 25.6v358.4a25.6 25.6 0 0 0 43.52 17.92l143.36-142.848 578.048 578.048-142.848 142.848a25.6 25.6 0 0 0 17.92 43.52h358.4a25.6 25.6 0 0 0 25.6-25.6v-358.4a25.6 25.6 0 0 0-15.872-25.088z\" /></svg>";
|
||||
declare const quickCreateChild: "<svg viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"48\" height=\"48\"><path d=\"M514.048 62.464q93.184 0 175.616 35.328t143.872 96.768 96.768 143.872 35.328 175.616q0 94.208-35.328 176.128t-96.768 143.36-143.872 96.768-175.616 35.328q-94.208 0-176.64-35.328t-143.872-96.768-96.768-143.36-35.328-176.128q0-93.184 35.328-175.616t96.768-143.872 143.872-96.768 176.64-35.328zM772.096 576.512q26.624 0 45.056-18.944t18.432-45.568-18.432-45.056-45.056-18.432l-192.512 0 0-192.512q0-26.624-18.944-45.568t-45.568-18.944-45.056 18.944-18.432 45.568l0 192.512-192.512 0q-26.624 0-45.056 18.432t-18.432 45.056 18.432 45.568 45.056 18.944l192.512 0 0 191.488q0 26.624 18.432 45.568t45.056 18.944 45.568-18.944 18.944-45.568l0-191.488 192.512 0z\"></path></svg>";
|
||||
20
simple-mind-map/types/src/svg/icons.d.ts
vendored
Normal file
20
simple-mind-map/types/src/svg/icons.d.ts
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
export const nodeIconList: {
|
||||
name: string;
|
||||
type: string;
|
||||
list: {
|
||||
name: string;
|
||||
icon: string;
|
||||
}[];
|
||||
}[];
|
||||
declare namespace _default {
|
||||
export { hyperlink };
|
||||
export { note };
|
||||
export { attachment };
|
||||
export { nodeIconList };
|
||||
export { getNodeIconListIcon };
|
||||
}
|
||||
export default _default;
|
||||
declare const hyperlink: "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 1024 1024\" ><path d=\"M435.484444 251.733333v68.892445L295.822222 320.682667a168.504889 168.504889 0 0 0-2.844444 336.952889h142.506666v68.892444H295.822222a237.397333 237.397333 0 0 1 0-474.794667h139.662222z m248.945778 0a237.397333 237.397333 0 0 1 0 474.851556H544.654222v-69.006222l139.776 0.056889a168.504889 168.504889 0 0 0 2.844445-336.952889H544.597333V251.676444h139.776z m-25.827555 203.946667a34.474667 34.474667 0 0 1 0 68.892444H321.649778a34.474667 34.474667 0 0 1 0-68.892444h336.952889z\" ></path></svg>";
|
||||
declare const note: "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 1024 1024\" ><path d=\"M152.768 985.984 152.768 49.856l434.56 0 66.816 0 234.048 267.392 0 66.816 0 601.92L152.768 985.984 152.768 985.984zM654.144 193.088l0 124.16 108.736 0L654.144 193.088 654.144 193.088zM821.312 384.064l-167.168 0L587.328 384.064 587.328 317.312 587.328 116.736 219.584 116.736 219.584 919.04l601.728 0L821.312 384.064 821.312 384.064zM386.688 517.888 319.808 517.888 319.808 450.944l66.816 0L386.624 517.888 386.688 517.888zM386.688 651.584 319.808 651.584 319.808 584.704l66.816 0L386.624 651.584 386.688 651.584zM386.688 785.344 319.808 785.344l0-66.88 66.816 0L386.624 785.344 386.688 785.344zM721.024 517.888 453.632 517.888 453.632 450.944l267.392 0L721.024 517.888 721.024 517.888zM654.144 651.584 453.632 651.584 453.632 584.704l200.512 0L654.144 651.584 654.144 651.584zM620.672 785.344l-167.04 0 0-66.88 167.04 0L620.672 785.344 620.672 785.344z\" ></path></svg>";
|
||||
declare const attachment: "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 1024 1024\" width=\"128\" height=\"128\"><path d=\"M516.373333 375.978667l136.576-136.576a147.797333 147.797333 0 0 1 208.853334-0.021334 147.690667 147.690667 0 0 1-0.042667 208.832l-204.8 204.778667v0.021333l-153.621333 153.6c-85.973333 85.973333-225.28 85.973333-311.253334 0.021334-85.994667-85.973333-85.973333-225.216 0.149334-311.36L431.146667 256.362667a21.333333 21.333333 0 0 0-30.165334-30.165334L162.069333 465.066667c-102.805333 102.826667-102.826667 269.056-0.149333 371.733333 102.613333 102.613333 268.970667 102.613333 371.584 0l153.6-153.642667h0.021333l0.021334-0.021333 204.778666-204.778667c74.325333-74.325333 74.346667-194.858667 0.021334-269.184-74.24-74.24-194.88-74.24-269.162667 0.042667l-136.576 136.554667-187.626667 187.626666a117.845333 117.845333 0 0 0-0.106666 166.826667 118.037333 118.037333 0 0 0 166.826666-0.106667l255.850667-255.829333a21.333333 21.333333 0 0 0-30.165333-30.165333L435.136 669.973333a75.370667 75.370667 0 0 1-106.496 0.106667 75.178667 75.178667 0 0 1 0.128-106.496l187.605333-187.605333z\" ></path></svg>";
|
||||
declare function getNodeIconListIcon(name: any, extendIconList?: any[]): any;
|
||||
217
simple-mind-map/types/src/theme/default.d.ts
vendored
Normal file
217
simple-mind-map/types/src/theme/default.d.ts
vendored
Normal file
@ -0,0 +1,217 @@
|
||||
declare namespace _default {
|
||||
let paddingX: number;
|
||||
let paddingY: number;
|
||||
let imgMaxWidth: number;
|
||||
let imgMaxHeight: number;
|
||||
let iconSize: number;
|
||||
let lineWidth: number;
|
||||
let lineColor: string;
|
||||
let lineDasharray: string;
|
||||
let lineFlow: boolean;
|
||||
let lineFlowDuration: number;
|
||||
let lineFlowForward: boolean;
|
||||
let lineStyle: string;
|
||||
let rootLineKeepSameInCurve: boolean;
|
||||
let rootLineStartPositionKeepSameInCurve: boolean;
|
||||
let lineRadius: number;
|
||||
let showLineMarker: boolean;
|
||||
let generalizationLineWidth: number;
|
||||
let generalizationLineColor: string;
|
||||
let generalizationLineMargin: number;
|
||||
let generalizationNodeMargin: number;
|
||||
let associativeLineWidth: number;
|
||||
let associativeLineColor: string;
|
||||
let associativeLineActiveWidth: number;
|
||||
let associativeLineActiveColor: string;
|
||||
let associativeLineDasharray: string;
|
||||
let associativeLineTextColor: string;
|
||||
let associativeLineTextFontSize: number;
|
||||
let associativeLineTextLineHeight: number;
|
||||
let associativeLineTextFontFamily: string;
|
||||
let backgroundColor: string;
|
||||
let backgroundImage: string;
|
||||
let backgroundRepeat: string;
|
||||
let backgroundPosition: string;
|
||||
let backgroundSize: string;
|
||||
let nodeUseLineStyle: boolean;
|
||||
namespace root {
|
||||
let shape: string;
|
||||
let fillColor: string;
|
||||
let fontFamily: string;
|
||||
let color: string;
|
||||
let fontSize: number;
|
||||
let fontWeight: string;
|
||||
let fontStyle: string;
|
||||
let borderColor: string;
|
||||
let borderWidth: number;
|
||||
let borderDasharray: string;
|
||||
let borderRadius: number;
|
||||
let textDecoration: string;
|
||||
let gradientStyle: boolean;
|
||||
let startColor: string;
|
||||
let endColor: string;
|
||||
let startDir: number[];
|
||||
let endDir: number[];
|
||||
let lineMarkerDir: string;
|
||||
let hoverRectColor: string;
|
||||
let hoverRectRadius: number;
|
||||
let textAlign: string;
|
||||
let imgPlacement: string;
|
||||
let tagPlacement: string;
|
||||
}
|
||||
namespace second {
|
||||
let shape_1: string;
|
||||
export { shape_1 as shape };
|
||||
export let marginX: number;
|
||||
export let marginY: number;
|
||||
let fillColor_1: string;
|
||||
export { fillColor_1 as fillColor };
|
||||
let fontFamily_1: string;
|
||||
export { fontFamily_1 as fontFamily };
|
||||
let color_1: string;
|
||||
export { color_1 as color };
|
||||
let fontSize_1: number;
|
||||
export { fontSize_1 as fontSize };
|
||||
let fontWeight_1: string;
|
||||
export { fontWeight_1 as fontWeight };
|
||||
let fontStyle_1: string;
|
||||
export { fontStyle_1 as fontStyle };
|
||||
let borderColor_1: string;
|
||||
export { borderColor_1 as borderColor };
|
||||
let borderWidth_1: number;
|
||||
export { borderWidth_1 as borderWidth };
|
||||
let borderDasharray_1: string;
|
||||
export { borderDasharray_1 as borderDasharray };
|
||||
let borderRadius_1: number;
|
||||
export { borderRadius_1 as borderRadius };
|
||||
let textDecoration_1: string;
|
||||
export { textDecoration_1 as textDecoration };
|
||||
let gradientStyle_1: boolean;
|
||||
export { gradientStyle_1 as gradientStyle };
|
||||
let startColor_1: string;
|
||||
export { startColor_1 as startColor };
|
||||
let endColor_1: string;
|
||||
export { endColor_1 as endColor };
|
||||
let startDir_1: number[];
|
||||
export { startDir_1 as startDir };
|
||||
let endDir_1: number[];
|
||||
export { endDir_1 as endDir };
|
||||
let lineMarkerDir_1: string;
|
||||
export { lineMarkerDir_1 as lineMarkerDir };
|
||||
let hoverRectColor_1: string;
|
||||
export { hoverRectColor_1 as hoverRectColor };
|
||||
let hoverRectRadius_1: number;
|
||||
export { hoverRectRadius_1 as hoverRectRadius };
|
||||
let textAlign_1: string;
|
||||
export { textAlign_1 as textAlign };
|
||||
let imgPlacement_1: string;
|
||||
export { imgPlacement_1 as imgPlacement };
|
||||
let tagPlacement_1: string;
|
||||
export { tagPlacement_1 as tagPlacement };
|
||||
}
|
||||
namespace node {
|
||||
let shape_2: string;
|
||||
export { shape_2 as shape };
|
||||
let marginX_1: number;
|
||||
export { marginX_1 as marginX };
|
||||
let marginY_1: number;
|
||||
export { marginY_1 as marginY };
|
||||
let fillColor_2: string;
|
||||
export { fillColor_2 as fillColor };
|
||||
let fontFamily_2: string;
|
||||
export { fontFamily_2 as fontFamily };
|
||||
let color_2: string;
|
||||
export { color_2 as color };
|
||||
let fontSize_2: number;
|
||||
export { fontSize_2 as fontSize };
|
||||
let fontWeight_2: string;
|
||||
export { fontWeight_2 as fontWeight };
|
||||
let fontStyle_2: string;
|
||||
export { fontStyle_2 as fontStyle };
|
||||
let borderColor_2: string;
|
||||
export { borderColor_2 as borderColor };
|
||||
let borderWidth_2: number;
|
||||
export { borderWidth_2 as borderWidth };
|
||||
let borderRadius_2: number;
|
||||
export { borderRadius_2 as borderRadius };
|
||||
let borderDasharray_2: string;
|
||||
export { borderDasharray_2 as borderDasharray };
|
||||
let textDecoration_2: string;
|
||||
export { textDecoration_2 as textDecoration };
|
||||
let gradientStyle_2: boolean;
|
||||
export { gradientStyle_2 as gradientStyle };
|
||||
let startColor_2: string;
|
||||
export { startColor_2 as startColor };
|
||||
let endColor_2: string;
|
||||
export { endColor_2 as endColor };
|
||||
let startDir_2: number[];
|
||||
export { startDir_2 as startDir };
|
||||
let endDir_2: number[];
|
||||
export { endDir_2 as endDir };
|
||||
let lineMarkerDir_2: string;
|
||||
export { lineMarkerDir_2 as lineMarkerDir };
|
||||
let hoverRectColor_2: string;
|
||||
export { hoverRectColor_2 as hoverRectColor };
|
||||
let hoverRectRadius_2: number;
|
||||
export { hoverRectRadius_2 as hoverRectRadius };
|
||||
let textAlign_2: string;
|
||||
export { textAlign_2 as textAlign };
|
||||
let imgPlacement_2: string;
|
||||
export { imgPlacement_2 as imgPlacement };
|
||||
let tagPlacement_2: string;
|
||||
export { tagPlacement_2 as tagPlacement };
|
||||
}
|
||||
namespace generalization {
|
||||
let shape_3: string;
|
||||
export { shape_3 as shape };
|
||||
let marginX_2: number;
|
||||
export { marginX_2 as marginX };
|
||||
let marginY_2: number;
|
||||
export { marginY_2 as marginY };
|
||||
let fillColor_3: string;
|
||||
export { fillColor_3 as fillColor };
|
||||
let fontFamily_3: string;
|
||||
export { fontFamily_3 as fontFamily };
|
||||
let color_3: string;
|
||||
export { color_3 as color };
|
||||
let fontSize_3: number;
|
||||
export { fontSize_3 as fontSize };
|
||||
let fontWeight_3: string;
|
||||
export { fontWeight_3 as fontWeight };
|
||||
let fontStyle_3: string;
|
||||
export { fontStyle_3 as fontStyle };
|
||||
let borderColor_3: string;
|
||||
export { borderColor_3 as borderColor };
|
||||
let borderWidth_3: number;
|
||||
export { borderWidth_3 as borderWidth };
|
||||
let borderDasharray_3: string;
|
||||
export { borderDasharray_3 as borderDasharray };
|
||||
let borderRadius_3: number;
|
||||
export { borderRadius_3 as borderRadius };
|
||||
let textDecoration_3: string;
|
||||
export { textDecoration_3 as textDecoration };
|
||||
let gradientStyle_3: boolean;
|
||||
export { gradientStyle_3 as gradientStyle };
|
||||
let startColor_3: string;
|
||||
export { startColor_3 as startColor };
|
||||
let endColor_3: string;
|
||||
export { endColor_3 as endColor };
|
||||
let startDir_3: number[];
|
||||
export { startDir_3 as startDir };
|
||||
let endDir_3: number[];
|
||||
export { endDir_3 as endDir };
|
||||
let hoverRectColor_3: string;
|
||||
export { hoverRectColor_3 as hoverRectColor };
|
||||
let hoverRectRadius_3: number;
|
||||
export { hoverRectRadius_3 as hoverRectRadius };
|
||||
let textAlign_3: string;
|
||||
export { textAlign_3 as textAlign };
|
||||
let imgPlacement_3: string;
|
||||
export { imgPlacement_3 as imgPlacement };
|
||||
let tagPlacement_3: string;
|
||||
export { tagPlacement_3 as tagPlacement };
|
||||
}
|
||||
}
|
||||
export default _default;
|
||||
export function checkIsNodeSizeIndependenceConfig(config: any): boolean;
|
||||
export const lineStyleProps: string[];
|
||||
9
simple-mind-map/types/src/utils/AutoMove.d.ts
vendored
Normal file
9
simple-mind-map/types/src/utils/AutoMove.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
export default AutoMove;
|
||||
declare class AutoMove {
|
||||
constructor(mindMap: any);
|
||||
mindMap: any;
|
||||
autoMoveTimer: number;
|
||||
onMove(x: any, y: any, callback?: () => void, handle?: () => void): void;
|
||||
startAutoMove(x: any, y: any, callback: any, handle: any): void;
|
||||
clearAutoMoveTimer(): void;
|
||||
}
|
||||
9
simple-mind-map/types/src/utils/BatchExecution.d.ts
vendored
Normal file
9
simple-mind-map/types/src/utils/BatchExecution.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
export default BatchExecution;
|
||||
declare class BatchExecution {
|
||||
has: {};
|
||||
queue: any[];
|
||||
nextTick: any;
|
||||
push(name: any, fn: any): void;
|
||||
replaceTask(name: any, fn: any): void;
|
||||
flush(): void;
|
||||
}
|
||||
11
simple-mind-map/types/src/utils/Lru.d.ts
vendored
Normal file
11
simple-mind-map/types/src/utils/Lru.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
export default class Lru {
|
||||
constructor(max: any);
|
||||
max: any;
|
||||
size: number;
|
||||
pool: Map<any, any>;
|
||||
add(key: any, value: any): boolean;
|
||||
delete(key: any): void;
|
||||
has(key: any): boolean;
|
||||
get(key: any): any;
|
||||
clear(): void;
|
||||
}
|
||||
141
simple-mind-map/types/src/utils/index.d.ts
vendored
Normal file
141
simple-mind-map/types/src/utils/index.d.ts
vendored
Normal file
@ -0,0 +1,141 @@
|
||||
export function walk(root: any, parent: any, beforeCallback: any, afterCallback: any, isRoot: any, layerIndex?: number, index?: number, ancestors?: any[]): void;
|
||||
export function bfsWalk(root: any, callback: any): void;
|
||||
export function resizeImgSizeByOriginRatio(width: any, height: any, newWidth: any, newHeight: any): any[];
|
||||
export function resizeImgSize(width: any, height: any, maxWidth: any, maxHeight: any): any[];
|
||||
export function resizeImg(imgUrl: any, maxWidth: any, maxHeight: any): Promise<any>;
|
||||
export function getStrWithBrFromHtml(str: any): any;
|
||||
export function simpleDeepClone(data: any): any;
|
||||
export function copyRenderTree(tree: any, root: any, removeActiveState?: boolean): any;
|
||||
export function copyNodeTree(tree: any, root: any, removeActiveState?: boolean, removeId?: boolean): any;
|
||||
export function imgToDataUrl(src: any, returnBlob?: boolean): Promise<any>;
|
||||
export function parseDataUrl(data: any): any;
|
||||
export function downloadFile(file: any, fileName: any): void;
|
||||
export function throttle(fn: any, time: number, ctx: any): (...args: any[]) => void;
|
||||
export function debounce(fn: any, wait: number, ctx: any): (...args: any[]) => void;
|
||||
export function asyncRun(taskList: any, callback?: () => void): void;
|
||||
export function degToRad(deg: any): number;
|
||||
export function camelCaseToHyphen(str: any): any;
|
||||
export function measureText(text: any, { italic, bold, fontSize, fontFamily }: {
|
||||
italic: any;
|
||||
bold: any;
|
||||
fontSize: any;
|
||||
fontFamily: any;
|
||||
}): {
|
||||
width: any;
|
||||
height: any;
|
||||
};
|
||||
export function joinFontStr({ italic, bold, fontSize, fontFamily }: {
|
||||
italic: any;
|
||||
bold: any;
|
||||
fontSize: any;
|
||||
fontFamily: any;
|
||||
}): string;
|
||||
export function nextTick(fn: any, ctx: any): () => void;
|
||||
export function checkNodeOuter(mindMap: any, node: any, offsetX?: number, offsetY?: number): {
|
||||
isOuter: boolean;
|
||||
offsetLeft: number;
|
||||
offsetTop: number;
|
||||
};
|
||||
export function getTextFromHtml(html: any): any;
|
||||
export function readBlob(blob: any): Promise<any>;
|
||||
export function nodeToHTML(node: any): any;
|
||||
export function getImageSize(src: any): Promise<any>;
|
||||
export function createUid(): any;
|
||||
export function loadImage(imgFile: any): Promise<any>;
|
||||
export function removeHTMLEntities(str: any): any;
|
||||
export function getType(data: any): any;
|
||||
export function isUndef(data: any): boolean;
|
||||
export function removeHtmlStyle(html: any): any;
|
||||
export function addHtmlStyle(html: any, tag: any, style: any): any;
|
||||
export function checkIsRichText(str: any): boolean;
|
||||
export function replaceHtmlText(html: any, searchText: any, replaceText: any): any;
|
||||
export function removeHtmlNodeByClass(html: any, selector: any): any;
|
||||
export function isWhite(color: any): boolean;
|
||||
export function isTransparent(color: any): boolean;
|
||||
export function getVisibleColorFromTheme(themeConfig: any): any;
|
||||
export function removeFormulaTags(node: any): void;
|
||||
export function nodeRichTextToTextWithWrap(html: any): string;
|
||||
export function textToNodeRichTextWithWrap(html: any): string;
|
||||
export function removeRichTextStyes(html: any): any;
|
||||
export function isMobile(): boolean;
|
||||
export function getObjectChangedProps(oldObject: any, newObject: any): {};
|
||||
export function checkIsNodeStyleDataKey(key: any): boolean;
|
||||
export function isNodeNotNeedRenderData(config: any): boolean;
|
||||
export function mergerIconList(list: any): any;
|
||||
export function getTopAncestorsFomNodeList(list: any): any[];
|
||||
export function checkHasSupSubRelation(list: any): boolean;
|
||||
export function parseAddGeneralizationNodeList(list: any): any[];
|
||||
export function checkTwoRectIsOverlap(minx1: any, maxx1: any, miny1: any, maxy1: any, minx2: any, maxx2: any, miny2: any, maxy2: any): boolean;
|
||||
export function focusInput(el: any): void;
|
||||
export function selectAllInput(el: any): void;
|
||||
export function addDataToAppointNodes(appointNodes: any, data?: {}): any;
|
||||
export function createUidForAppointNodes(appointNodes: any, createNewId?: boolean, handle?: any, handleGeneralization?: boolean): any;
|
||||
export function formatDataToArray(data: any): any[];
|
||||
export function getNodeDataIndex(node: any): any;
|
||||
export function getNodeIndexInNodeList(node: any, nodeList: any): any;
|
||||
export function generateColorByContent(str: any): string;
|
||||
export function htmlEscape(str: any): any;
|
||||
export function isSameObject(a: any, b: any): boolean;
|
||||
export function checkClipboardReadEnable(): boolean;
|
||||
export function setDataToClipboard(data: any): void;
|
||||
export function getDataFromClipboard(): Promise<{
|
||||
text: string;
|
||||
img: Blob;
|
||||
}>;
|
||||
export function removeFromParentNodeData(node: any): void;
|
||||
export function handleSelfCloseTags(str: any): any;
|
||||
export function checkNodeListIsEqual(list1: any, list2: any): boolean;
|
||||
export function getChromeVersion(): number | "";
|
||||
export function createSmmFormatData(data: any): {
|
||||
simpleMindMap: boolean;
|
||||
data: any;
|
||||
};
|
||||
export function checkSmmFormatData(data: any): {
|
||||
isSmm: boolean;
|
||||
data: any;
|
||||
};
|
||||
export function handleInputPasteText(e: any, text: any): void;
|
||||
export function transformTreeDataToObject(data: any): {};
|
||||
export function transformObjectToTreeData(data: any): {
|
||||
data: any;
|
||||
children: any[];
|
||||
};
|
||||
export function getTwoPointDistance(x1: any, y1: any, x2: any, y2: any): number;
|
||||
export function getRectRelativePosition(rect1: any, rect2: any): "left" | "right" | "top" | "bottom" | "left-top" | "right-top" | "right-bottom" | "left-bottom" | "overlap";
|
||||
export function handleGetSvgDataExtraContent({ addContentToHeader, addContentToFooter }: {
|
||||
addContentToHeader: any;
|
||||
addContentToFooter: any;
|
||||
}): {
|
||||
cssTextList: any[];
|
||||
header: any;
|
||||
headerHeight: number;
|
||||
footer: any;
|
||||
footerHeight: number;
|
||||
};
|
||||
export function getNodeTreeBoundingRect(node: any, x?: number, y?: number, paddingX?: number, paddingY?: number, excludeSelf?: boolean, excludeGeneralization?: boolean): {
|
||||
left: number;
|
||||
top: number;
|
||||
width: number;
|
||||
height: number;
|
||||
};
|
||||
export function getNodeListBoundingRect(nodeList: any, x?: number, y?: number, paddingX?: number, paddingY?: number): {
|
||||
left: number;
|
||||
top: number;
|
||||
width: number;
|
||||
height: number;
|
||||
};
|
||||
export const fullscrrenEvent: "fullscreenchange" | "webkitfullscreenchange" | "mozfullscreenchange" | "msfullscreenchange";
|
||||
export function fullScreen(element: any): void;
|
||||
export function exitFullScreen(): void;
|
||||
export function createForeignObjectNode({ el, width, height }: {
|
||||
el: any;
|
||||
width: any;
|
||||
height: any;
|
||||
}): any;
|
||||
export function formatGetNodeGeneralization(data: any): any[];
|
||||
export function defenseXSS(text: string): string;
|
||||
export function addXmlns(el: any): void;
|
||||
export function sortNodeList(nodeList: any): any;
|
||||
export function mergeTheme(dest: any, source: any): any;
|
||||
export function getNodeRichTextStyles(node: any): {};
|
||||
export function compareVersion(a: any, b: any): "<" | ">" | "=";
|
||||
23
simple-mind-map/types/src/utils/mersenneTwister.d.ts
vendored
Normal file
23
simple-mind-map/types/src/utils/mersenneTwister.d.ts
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* @description 为了保证相同的内容每次生成的随机数都是一样的,我们可以使用一个伪随机数生成器(PRNG),并使用内容的哈希值作为种子。以下是一个使用Mersenne Twister算法的PRNG的实现:
|
||||
*
|
||||
* @param {*} seed
|
||||
*/
|
||||
export default function MersenneTwister(seed: any): void;
|
||||
export default class MersenneTwister {
|
||||
/**
|
||||
* @description 为了保证相同的内容每次生成的随机数都是一样的,我们可以使用一个伪随机数生成器(PRNG),并使用内容的哈希值作为种子。以下是一个使用Mersenne Twister算法的PRNG的实现:
|
||||
*
|
||||
* @param {*} seed
|
||||
*/
|
||||
constructor(seed: any);
|
||||
N: number;
|
||||
M: number;
|
||||
MATRIX_A: number;
|
||||
UPPER_MASK: number;
|
||||
LOWER_MASK: number;
|
||||
mt: any[];
|
||||
mti: number;
|
||||
init_genrand(s: any): void;
|
||||
genrand_int32(): number;
|
||||
}
|
||||
6
simple-mind-map/types/src/utils/simulateCSSBackgroundInCanvas.d.ts
vendored
Normal file
6
simple-mind-map/types/src/utils/simulateCSSBackgroundInCanvas.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
export default drawBackgroundImageToCanvas;
|
||||
declare function drawBackgroundImageToCanvas(ctx: any, width: any, height: any, img: any, { backgroundSize, backgroundPosition, backgroundRepeat }: {
|
||||
backgroundSize: any;
|
||||
backgroundPosition: any;
|
||||
backgroundRepeat: any;
|
||||
}, callback?: () => void): void;
|
||||
13
simple-mind-map/types/src/utils/xmind.d.ts
vendored
Normal file
13
simple-mind-map/types/src/utils/xmind.d.ts
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
export function getSummaryText(node: any, topicId: any): any;
|
||||
export function getSummaryText2(item: any, topicId: any): any;
|
||||
export function getRoot(list: any): any;
|
||||
export function getItemByName(arr: any, name: any): any;
|
||||
export function getElementsByType(arr: any, type: any): any;
|
||||
export function addSummaryData(selfList: any, childrenList: any, getText: any, range: any): void;
|
||||
export function handleNodeImageFromXmind(node: any, newNode: any, promiseList: any, files: any): Promise<void>;
|
||||
export function handleNodeImageToXmind(node: any, newData: any, promiseList: any, imageList: any): Promise<void>;
|
||||
export function getXmindContentXmlData(): string;
|
||||
export function parseNodeGeneralizationToXmind(node: any): {
|
||||
summary: any[];
|
||||
summaries: any[];
|
||||
};
|
||||
Loading…
x
Reference in New Issue
Block a user