mind-elixir 5.1.0 → 5.2.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/dist/MindElixir.iife.js +9 -10
- package/dist/MindElixir.js +839 -829
- package/dist/MindElixirLite.iife.js +14 -15
- package/dist/MindElixirLite.js +690 -680
- package/dist/example.iife.js +7 -2
- package/dist/example.js +78 -19
- package/dist/style.css +1 -1
- package/dist/types/{arrow.d.ts → src/arrow.d.ts} +1 -1
- package/dist/types/src/dev.d.ts +1 -0
- package/dist/types/src/exampleData/1.d.ts +3 -0
- package/dist/types/{index.d.ts → src/index.d.ts} +13 -14
- package/dist/types/{methods.d.ts → src/methods.d.ts} +10 -10
- package/dist/types/{nodeOperation.d.ts → src/nodeOperation.d.ts} +1 -1
- package/dist/types/{plugin → src/plugin}/keypress.d.ts +1 -1
- package/dist/types/{summary.d.ts → src/summary.d.ts} +3 -2
- package/dist/types/{types → src/types}/dom.d.ts +2 -1
- package/dist/types/{types → src/types}/index.d.ts +4 -2
- package/dist/types/src/utils/index.d.ts +440 -0
- package/dist/types/{utils → src/utils}/pubsub.d.ts +2 -2
- package/dist/types/{utils → src/utils}/svg.d.ts +15 -5
- package/package.json +107 -105
- package/readme.md +432 -432
- package/dist/types/dev.d.ts +0 -1
- package/dist/types/exampleData/1.d.ts +0 -3
- package/dist/types/exampleData/markdown.d.ts +0 -8
- package/dist/types/utils/index.d.ts +0 -40
- package/dist/types/utils/markdown.d.ts +0 -25
- /package/dist/types/{const.d.ts → src/const.d.ts} +0 -0
- /package/dist/types/{docs.d.ts → src/docs.d.ts} +0 -0
- /package/dist/types/{exampleData → src/exampleData}/1.cn.d.ts +0 -0
- /package/dist/types/{exampleData → src/exampleData}/2.d.ts +0 -0
- /package/dist/types/{exampleData → src/exampleData}/3.d.ts +0 -0
- /package/dist/types/{exampleData → src/exampleData}/htmlText.d.ts +0 -0
- /package/dist/types/{i18n.d.ts → src/i18n.d.ts} +0 -0
- /package/dist/types/{interact.d.ts → src/interact.d.ts} +0 -0
- /package/dist/types/{linkDiv.d.ts → src/linkDiv.d.ts} +0 -0
- /package/dist/types/{mouse.d.ts → src/mouse.d.ts} +0 -0
- /package/dist/types/{plugin → src/plugin}/contextMenu.d.ts +0 -0
- /package/dist/types/{plugin → src/plugin}/exportImage.d.ts +0 -0
- /package/dist/types/{plugin → src/plugin}/nodeDraggable.d.ts +0 -0
- /package/dist/types/{plugin → src/plugin}/operationHistory.d.ts +0 -0
- /package/dist/types/{plugin → src/plugin}/selection.d.ts +0 -0
- /package/dist/types/{plugin → src/plugin}/toolBar.d.ts +0 -0
- /package/dist/types/{types → src/types}/global.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/LinkDragMoveHelper.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/dom.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/domManipulation.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/dragMoveHelper.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/generateBranch.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/layout-ssr.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/layout.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/objectManipulation.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/theme.d.ts +0 -0
package/dist/types/dev.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { MindElixirData } from '../index';
|
|
2
|
-
/**
|
|
3
|
-
* Markdown test example data
|
|
4
|
-
* This example demonstrates various markdown syntax features
|
|
5
|
-
* that can be rendered in Mind Elixir nodes
|
|
6
|
-
*/
|
|
7
|
-
declare const markdownExample: MindElixirData;
|
|
8
|
-
export default markdownExample;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { Topic } from '../types/dom';
|
|
2
|
-
import type { NodeObj, MindElixirInstance, NodeObjExport } from '../types/index';
|
|
3
|
-
export declare function encodeHTML(s: string): string;
|
|
4
|
-
export declare const isMobile: () => boolean;
|
|
5
|
-
export declare const getObjById: (id: string, data: NodeObj) => NodeObj | null;
|
|
6
|
-
/**
|
|
7
|
-
* Add parent property to every node
|
|
8
|
-
*/
|
|
9
|
-
export declare const fillParent: (data: NodeObj, parent?: NodeObj) => void;
|
|
10
|
-
export declare const setExpand: (node: NodeObj, isExpand: boolean, level?: number) => void;
|
|
11
|
-
export declare function refreshIds(data: NodeObj): void;
|
|
12
|
-
export declare const throttle: <T extends (...args: never[]) => void>(fn: T, wait: number) => (...args: Parameters<T>) => void;
|
|
13
|
-
export declare function getArrowPoints(p3x: number, p3y: number, p4x: number, p4y: number): {
|
|
14
|
-
x1: number;
|
|
15
|
-
y1: number;
|
|
16
|
-
x2: number;
|
|
17
|
-
y2: number;
|
|
18
|
-
} | undefined;
|
|
19
|
-
export declare function generateUUID(): string;
|
|
20
|
-
export declare const generateNewObj: (this: MindElixirInstance) => NodeObjExport;
|
|
21
|
-
export declare function checkMoveValid(from: NodeObj, to: NodeObj): boolean;
|
|
22
|
-
export declare function deepClone(obj: NodeObj): any;
|
|
23
|
-
export declare const getOffsetLT: (parent: HTMLElement, child: HTMLElement) => {
|
|
24
|
-
offsetLeft: number;
|
|
25
|
-
offsetTop: number;
|
|
26
|
-
};
|
|
27
|
-
export declare const setAttributes: (el: HTMLElement | SVGElement, attrs: {
|
|
28
|
-
[key: string]: string;
|
|
29
|
-
}) => void;
|
|
30
|
-
export declare const isTopic: (target?: HTMLElement) => target is Topic;
|
|
31
|
-
export declare const unionTopics: (nodes: Topic[]) => Topic[];
|
|
32
|
-
export declare const getTranslate: (styleText: string) => {
|
|
33
|
-
x: number;
|
|
34
|
-
y: number;
|
|
35
|
-
};
|
|
36
|
-
export declare const on: (list: { [K in keyof GlobalEventHandlersEventMap]: {
|
|
37
|
-
dom: EventTarget;
|
|
38
|
-
evt: K;
|
|
39
|
-
func: (this: EventTarget, ev: GlobalEventHandlersEventMap[K]) => void;
|
|
40
|
-
}; }[keyof GlobalEventHandlersEventMap][]) => () => void;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Render markdown content to HTML for display using a custom parser
|
|
3
|
-
* @param content - The content to render (could be markdown or plain text)
|
|
4
|
-
* @param parser - Custom markdown parser function
|
|
5
|
-
* @returns Rendered HTML string
|
|
6
|
-
*/
|
|
7
|
-
export declare function renderMarkdown(content: string, parser: (markdown: string) => string): string;
|
|
8
|
-
/**
|
|
9
|
-
* Check if text contains markdown syntax
|
|
10
|
-
* @param text - Text to check
|
|
11
|
-
* @returns True if markdown syntax is detected
|
|
12
|
-
*/
|
|
13
|
-
export declare function hasMarkdownSyntax(text: string): boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Strip HTML tags from text
|
|
16
|
-
* @param html - HTML string
|
|
17
|
-
* @returns Plain text
|
|
18
|
-
*/
|
|
19
|
-
export declare function stripHtml(html: string): string;
|
|
20
|
-
/**
|
|
21
|
-
* Check if content is likely HTML
|
|
22
|
-
* @param content - Content to check
|
|
23
|
-
* @returns True if content appears to be HTML
|
|
24
|
-
*/
|
|
25
|
-
export declare function isHtml(content: string): boolean;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|