Do not edit this file. It is a report generated by API Extractor.
import type SelectionArea from '@viselect/vanilla';
// @public (undocumented)
export type Arrow = {
id: string;
label: string;
from: Uid;
to: Uid;
delta1: {
x: number;
y: number;
};
delta2: {
x: number;
y: number;
};
};
// @public (undocumented)
export interface Children extends HTMLElement {
// (undocumented)
children: HTMLCollection & Wrapper[];
// (undocumented)
firstChild: Wrapper;
// (undocumented)
parentElement: Wrapper;
// (undocumented)
parentNode: Wrapper;
// (undocumented)
previousSibling: Parent;
}
// @public (undocumented)
export type CustomArrow = SVGPathElement;
// @public (undocumented)
export type CustomLine = SVGPathElement;
// @public (undocumented)
export interface CustomSvg extends SVGGElement {
// (undocumented)
arrowObj: Arrow;
// (undocumented)
children: HTMLCollection & [CustomLine, CustomArrow, SVGTextElement];
}
// @public (undocumented)
export interface Expander extends HTMLElement {
// (undocumented)
expanded?: boolean;
// (undocumented)
parentElement: Parent;
// (undocumented)
parentNode: Parent;
// (undocumented)
previousSibling: Topic;
}
// @public (undocumented)
export type Locale = 'cn' | 'zh_CN' | 'zh_TW' | 'en' | 'ru' | 'ja' | 'pt' | 'it' | 'es' | 'fr' | 'ko';
// @public (undocumented)
export type MainLineParams = {
pT: number;
pL: number;
pW: number;
pH: number;
cT: number;
cL: number;
cW: number;
cH: number;
direction: 'lhs' | 'rhs';
containerHeight: number;
};
// @public
export const methods: {
init(this: MindElixirInstance, data: MindElixirData): Error | undefined;
destroy(this: Partial<MindElixirInstance>): void;
exportSvg: (this: MindElixirInstance, noForeignObject?: boolean, injectCss?: string | undefined) => Blob;
exportPng: (this: MindElixirInstance, noForeignObject?: boolean, injectCss?: string | undefined) => Promise<Blob | null>;
createSummary: (this: MindElixirInstance) => void;
removeSummary: (this: MindElixirInstance, id: string) => void;
selectSummary: (this: MindElixirInstance, el: summary.SummarySvgGroup) => void;
unselectSummary: (this: MindElixirInstance) => void;
renderSummary: (this: MindElixirInstance) => void;
editSummary: (this: MindElixirInstance, el: summary.SummarySvgGroup) => void;
renderArrow(this: MindElixirInstance): void;
editArrowLabel(this: MindElixirInstance, el: CustomSvg): void;
tidyArrow(this: MindElixirInstance): void;
createArrow: (this: MindElixirInstance, from: Topic, to: Topic) => void;
removeArrow: (this: MindElixirInstance, linkSvg?: CustomSvg | undefined) => void;
selectArrow: (this: MindElixirInstance, link: CustomSvg) => void;
unselectArrow: (this: MindElixirInstance) => void;
rmSubline: (this: MindElixirInstance, tpc: Topic) => Promise<void>;
reshapeNode: (this: MindElixirInstance, tpc: Topic, patchData: NodeObj) => Promise<void>;
insertSibling: (this: MindElixirInstance, type: "before" | "after", el?: Topic | undefined, node?: NodeObj | undefined) => Promise<void>;
insertParent: (this: MindElixirInstance, el?: Topic | undefined, node?: NodeObj | undefined) => Promise<void>;
addChild: (this: MindElixirInstance, el?: Topic | undefined, node?: NodeObj | undefined) => Promise<void>;
copyNode: (this: MindElixirInstance, node: Topic, to: Topic) => Promise<void>;
copyNodes: (this: MindElixirInstance, tpcs: Topic[], to: Topic) => Promise<void>;
moveUpNode: (this: MindElixirInstance, el?: Topic | undefined) => Promise<void>;
moveDownNode: (this: MindElixirInstance, el?: Topic | undefined) => Promise<void>;
removeNode: (this: MindElixirInstance, el?: Topic | undefined) => Promise<void>;
removeNodes: (this: MindElixirInstance, tpcs: Topic[]) => Promise<void>;
moveNodeIn: (this: MindElixirInstance, from: Topic[], to: Topic) => Promise<void>;
moveNodeBefore: (this: MindElixirInstance, from: Topic[], to: Topic) => Promise<void>;
moveNodeAfter: (this: MindElixirInstance, from: Topic[], to: Topic) => Promise<void>;
beginEdit: (this: MindElixirInstance, el?: Topic | undefined) => Promise<void>;
setNodeTopic: (this: MindElixirInstance, el: Topic, topic: string) => Promise<void>;
selectNode: (this: MindElixirInstance, targetElement: Topic, isNewNode?: boolean | undefined, e?: MouseEvent | undefined) => void;
unselectNode: (this: MindElixirInstance) => void;
selectNodes: (this: MindElixirInstance, tpc: Topic[]) => void;
unselectNodes: (this: MindElixirInstance) => void;
clearSelection: (this: MindElixirInstance) => void;
getDataString: (this: MindElixirInstance) => string;
getData: (this: MindElixirInstance) => MindElixirData;
getDataMd: (this: MindElixirInstance) => string;
enableEdit: (this: MindElixirInstance) => void;
disableEdit: (this: MindElixirInstance) => void;
scale: (this: MindElixirInstance, scaleVal: number) => void;
toCenter: (this: MindElixirInstance) => void;
install: (this: MindElixirInstance, plugin: (instance: MindElixirInstance) => void) => void;
focusNode: (this: MindElixirInstance, el: Topic) => void;
cancelFocus: (this: MindElixirInstance) => void;
initLeft: (this: MindElixirInstance) => void;
initRight: (this: MindElixirInstance) => void;
initSide: (this: MindElixirInstance) => void;
setLocale: (this: MindElixirInstance, locale: Locale) => void;
expandNode: (this: MindElixirInstance, el: Topic, isExpand?: boolean | undefined) => void;
refresh: (this: MindElixirInstance, data?: MindElixirData | undefined) => void;
getObjById: (id: string, data: NodeObj) => NodeObj | null;
generateNewObj: (this: MindElixirInstance) => NodeObjExport;
layout: (this: MindElixirInstance) => void;
linkDiv: (this: MindElixirInstance, mainNode?: Wrapper | undefined) => void;
editTopic: (this: MindElixirInstance, el: Topic) => void;
createWrapper: (this: MindElixirInstance, nodeObj: NodeObj, omitChildren?: boolean | undefined) => {
grp: Wrapper;
top: Parent;
tpc: Topic;
};
createParent: (this: MindElixirInstance, nodeObj: NodeObj) => {
p: Parent;
tpc: Topic;
};
createChildren: (this: MindElixirInstance, wrappers: Wrapper[]) => Children;
createTopic: (this: MindElixirInstance, nodeObj: NodeObj) => Topic;
findEle: (id: string, instance?: MindElixirInstance | undefined) => Topic;
changeTheme: (this: MindElixirInstance, theme: Theme, shouldRefresh?: boolean) => void;
};
// @public
export type MindElixirData = {
nodeData: NodeObj;
arrows?: Arrow[];
summaries?: Summary[];
direction?: number;
theme?: Theme;
};
// @public
export interface MindElixirInstance extends MindElixirMethods {
// (undocumented)
allowUndo: boolean;
// (undocumented)
arrows: Arrow[];
// Warning: (ae-forgotten-export) The symbol "Before" needs to be exported by the entry point docs.d.ts
//
// (undocumented)
before: Before;
// Warning: (ae-forgotten-export) The symbol "Bus" needs to be exported by the entry point docs.d.ts
// Warning: (ae-forgotten-export) The symbol "EventMap" needs to be exported by the entry point docs.d.ts
//
// (undocumented)
bus: ReturnType<typeof Bus.create<EventMap>>;
// (undocumented)
container: HTMLElement;
// (undocumented)
contextMenu: boolean;
// (undocumented)
contextMenuOption: object;
// (undocumented)
currentArrow: CustomSvg | null;
// (undocumented)
currentNode: Topic | null;
// (undocumented)
currentNodes: Topic[] | null;
// (undocumented)
currentSummary: SummarySvgGroup | null;
// (undocumented)
direction: number;
// (undocumented)
disposable: Array<() => void>;
// (undocumented)
draggable: boolean;
// (undocumented)
editable: boolean;
// Warning: (ae-forgotten-export) The symbol "PathString" needs to be exported by the entry point docs.d.ts
//
// (undocumented)
generateMainBranch: (params: MainLineParams) => PathString;
// (undocumented)
generateSubBranch: (params: SubLineParams) => PathString;
// Warning: (ae-forgotten-export) The symbol "LinkDragMoveHelperInstance" needs to be exported by the entry point docs.d.ts
//
// @internal (undocumented)
helper1?: LinkDragMoveHelperInstance;
// @internal (undocumented)
helper2?: LinkDragMoveHelperInstance;
// Warning: (ae-forgotten-export) The symbol "Operation" needs to be exported by the entry point docs.d.ts
//
// (undocumented)
history: Operation[];
// (undocumented)
isFocusMode: boolean;
// (undocumented)
keypress: boolean;
// (undocumented)
line1: SVGElement;
// (undocumented)
line2: SVGElement;
// (undocumented)
lines: SVGElement;
// (undocumented)
linkController: SVGElement;
// (undocumented)
linkSvgGroup: SVGElement;
// (undocumented)
locale: Locale;
// (undocumented)
mainBranchStyle: number;
// (undocumented)
map: HTMLElement;
// (undocumented)
mindElixirBox: HTMLElement;
// (undocumented)
mouseSelectionButton: 0 | 2;
// (undocumented)
newTopicName: string;
// (undocumented)
nodeData: NodeObj;
// (undocumented)
nodeDataBackup: NodeObj;
// (undocumented)
nodes: HTMLElement;
// (undocumented)
overflowHidden: boolean;
// (undocumented)
P2: HTMLElement;
// (undocumented)
P3: HTMLElement;
// (undocumented)
redo: () => void;
// (undocumented)
root: HTMLElement;
// (undocumented)
scaleVal: number;
// (undocumented)
selection: SelectionArea;
// (undocumented)
selectionContainer?: string | HTMLElement;
// (undocumented)
subBranchStyle: number;
// (undocumented)
summaries: Summary[];
// (undocumented)
summarySvg: SVGElement;
// (undocumented)
tempDirection: number | null;
// (undocumented)
theme: Theme;
// (undocumented)
toolBar: boolean;
// (undocumented)
undo: () => void;
// (undocumented)
userTheme?: Theme;
// (undocumented)
waitCopy: Topic[] | null;
}
// @public (undocumented)
export type MindElixirMethods = typeof methods;
// @public
export type NodeObj = {
topic: string;
id: Uid;
style?: {
fontSize?: string;
color?: string;
background?: string;
fontWeight?: string;
};
children?: NodeObj[];
tags?: string[];
icons?: string[];
hyperLink?: string;
expanded?: boolean;
direction?: number;
image?: {
url: string;
width: number;
height: number;
};
branchColor?: string;
parent?: NodeObj;
dangerouslySetInnerHTML?: string;
};
// @public (undocumented)
export type NodeObjExport = Omit<NodeObj, 'parent'>;
// @public
export type Options = {
el: string | HTMLElement;
direction?: number;
locale?: Locale;
draggable?: boolean;
editable?: boolean;
contextMenu?: boolean;
contextMenuOption?: any;
toolBar?: boolean;
keypress?: boolean;
mouseSelectionButton?: 0 | 2;
before?: Before;
newTopicName?: string;
allowUndo?: boolean;
overflowHidden?: boolean;
generateMainBranch?: (this: MindElixirInstance, params: MainLineParams) => PathString;
generateSubBranch?: (this: MindElixirInstance, params: SubLineParams) => PathString;
theme?: Theme;
nodeMenu?: boolean;
selectionContainer?: string | HTMLElement;
};
// @public (undocumented)
export interface Parent extends HTMLElement {
// (undocumented)
children: HTMLCollection & [Topic, Expander | undefined];
// (undocumented)
firstChild: Topic;
// (undocumented)
nextSibling: Children;
// (undocumented)
offsetParent: Wrapper;
// (undocumented)
parentElement: Wrapper;
// (undocumented)
parentNode: Wrapper;
}
// @public (undocumented)
export type SubLineParams = {
pT: number;
pL: number;
pW: number;
pH: number;
cT: number;
cL: number;
cW: number;
cH: number;
direction: 'lhs' | 'rhs';
isFirst: boolean | undefined;
};
// @public (undocumented)
export type Summary = {
id: string;
text: string;
parent: string;
start: number;
end: number;
};
// @public (undocumented)
export type SummarySvgGroup = SVGGElement & {
children: [SVGPathElement, SVGTextElement];
summaryObj: Summary;
};
// @public
export type Theme = {
name: string;
type?: 'light' | 'dark';
palette: string[];
cssVar: Partial<{
'--gap': string;
'--main-color': string;
'--main-bgcolor': string;
'--color': string;
'--bgcolor': string;
'--selected': string;
'--root-color': string;
'--root-bgcolor': string;
'--root-border-color': string;
'--root-radius': string;
'--main-radius': string;
'--topic-padding': string;
'--panel-color': string;
'--panel-bgcolor': string;
'--panel-border-color': string;
}>;
};
// @public (undocumented)
export interface Topic extends HTMLElement {
// (undocumented)
expander?: Expander;
// (undocumented)
icons?: HTMLSpanElement;
// (undocumented)
image?: HTMLImageElement;
// (undocumented)
linkContainer?: HTMLElement;
// (undocumented)
nodeObj: NodeObj;
// (undocumented)
offsetParent: Parent;
// (undocumented)
parentElement: Parent;
// (undocumented)
parentNode: Parent;
// (undocumented)
tags?: HTMLDivElement;
// (undocumented)
text: HTMLSpanElement;
}
// @public (undocumented)
export interface Wrapper extends HTMLElement {
// (undocumented)
children: HTMLCollection & [Parent, Children];
// (undocumented)
firstChild: Parent;
// (undocumented)
nextSibling: Wrapper | null;
// (undocumented)
offsetParent: Wrapper;
// (undocumented)
parentElement: Children;
// (undocumented)
parentNode: Children;
// (undocumented)
previousSibling: Wrapper | null;
}
// Warnings were encountered during analysis:
//
// dist/types/arrow.d.ts:6:5 - (ae-forgotten-export) The symbol "Uid" needs to be exported by the entry point docs.d.ts
// dist/types/methods.d.ts:19:5 - (ae-forgotten-export) The symbol "summary" needs to be exported by the entry point docs.d.ts
// (No @packageDocumentation comment for this package)