mind-elixir 3.0.3 → 3.0.5-beta.0

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.
@@ -1,2 +1,2 @@
1
1
  var example=function(){"use strict";return{direction:2,nodeData:{id:"me-root",topic:"Mind Elixir",root:!0,tags:["Mind Map Core"],children:[{topic:"logo2",id:"56dae51a90d350a8",direction:0,expanded:!0,children:[{id:"use-image",topic:"mind-elixir",image:{url:"https://raw.githubusercontent.com/ssshooter/mind-elixir-core/master/images/logo2.png",height:90,width:90}}]},{topic:"What is Mind Elixir",id:"bd4313fbac40284b",direction:0,expanded:!0,children:[{topic:"A mind map core",id:"beeb823afd6d2114"},{topic:"Free",id:"c1f068377de9f3a0"},{topic:"Open-Source",id:"c1f06d38a09f23ca"},{topic:"Use without JavaScript framework",id:"c1f06e4cbcf16463",expanded:!0,children:[]},{topic:"Use in your own project",id:"c1f1f11a7fbf7550",children:[{topic:"import MindElixir from 'mind-elixir'",id:"c1f1e245b0a89f9b"},{topic:"new MindElixir({...}).init(data)",id:"c1f1ebc7072c8928"}]},{topic:"Easy to use",id:"c1f0723c07b408d7",expanded:!0,children:[{topic:"Use it like other mind map application",id:"c1f09612fd89920d"}]}]},{topic:"Basics",id:"bd1b66c4b56754d9",direction:0,expanded:!0,children:[{topic:"tab - Create a child node",id:"bd1b6892bcab126a"},{topic:"enter - Create a sibling node",id:"bd1b6b632a434b27"},{topic:"del - Remove a node",id:"bd1b983085187c0a"}]},{topic:"Focus mode",id:"bd1b9b94a9a7a913",direction:1,expanded:!0,children:[{topic:"Right click and select Focus Mode",id:"bd1bb2ac4bbab458"},{topic:"Right click and select Cancel Focus Mode",id:"bd1bb4b14d6697c3"}]},{topic:"Left menu",id:"bd1b9d1816ede134",direction:0,expanded:!0,children:[{topic:"Node distribution",id:"bd1ba11e620c3c1a",expanded:!0,children:[{topic:"Left",id:"bd1c1cb51e6745d3"},{topic:"Right",id:"bd1c1e12fd603ff6"},{topic:"Both l & r",id:"bd1c1f03def5c97b"}]}]},{topic:"Bottom menu",id:"bd1ba66996df4ba4",direction:1,expanded:!0,children:[{topic:"Full screen",id:"bd1ba81d9bc95a7e"},{topic:"Return to Center",id:"bd1babdd5c18a7a2"},{topic:"Zoom in",id:"bd1bae68e0ab186e"},{topic:"Zoom out",id:"bd1bb06377439977"}]},{topic:"Link",id:"bd1beff607711025",direction:0,expanded:!0,children:[{topic:"Right click and select Link",id:"bd1bf320da90046a"},{topic:"Click the target you want to link",id:"bd1bf6f94ff2e642"},{topic:"Modify link with control points",id:"bd1c0c4a487bd036"}]},{topic:"Node style",id:"bd1c217f9d0b20bd",direction:0,expanded:!0,children:[{topic:"Font Size",id:"bd1c24420cd2c2f5",style:{fontSize:"32",color:"#3298db"}},{topic:"Font Color",id:"bd1c2a59b9a2739c",style:{color:"#c0392c"}},{topic:"Background Color",id:"bd1c2de33f057eb4",style:{color:"#bdc3c7",background:"#2c3e50"}},{topic:"Add tags",id:"bd1cff58364436d0",tags:["Completed"]},{topic:"Add icons",id:"bd1d0317f7e8a61a",icons:["😂"],tags:["www"]},{topic:"Bolder",id:"bd41fd4ca32322a4",style:{fontWeight:"bold"}},{topic:"Hyper link",id:"bd41fd4ca32322a5",hyperLink:"https://github.com/ssshooter/mind-elixir-core"}]},{topic:"Draggable",id:"bd1f03fee1f63bc6",direction:1,expanded:!0,children:[{topic:`Drag a node to another node
2
- and the former one will become a child node of latter one`,id:"bd1f07c598e729dc"}]},{topic:"TODO",id:"bd1facea32a1967c",direction:1,expanded:!0,children:[{topic:"Add image",id:"bd1fb1ec53010749"},{topic:"Free node (position)",id:"bd42d3e3bee992b9"},{topic:"Style adjustment",id:"beeb7f3db6ad6496"}]},{topic:"Export data",id:"beeb7586973430db",direction:1,expanded:!0,children:[{topic:"JSON",id:"beeb784cc189375f"},{topic:"HTML",id:"beeb7a6bec2d68f5"}]},{topic:"Caution",id:"bd42dad21aaf6bae",direction:0,style:{background:"#f1c40e"},expanded:!0,children:[{topic:"Only save manually",id:"bd42e1d0163ebf04",expanded:!0,children:[{topic:"Save button in the top-right corner",id:"bd42e619051878b3",expanded:!0,children:[]},{topic:"ctrl + S",id:"bd42e97d7ac35e99"}]}]}],expanded:!0},linkData:{}}}();
2
+ and the former one will become a child node of latter one`,id:"bd1f07c598e729dc"}]},{topic:"TODO",id:"bd1facea32a1967c",direction:1,expanded:!0,children:[{topic:"Add image",id:"bd1fb1ec53010749"},{topic:"Free node (position)",id:"bd42d3e3bee992b9"},{topic:"Style adjustment",id:"beeb7f3db6ad6496"}]},{topic:"Export data",id:"beeb7586973430db",direction:1,expanded:!0,children:[{topic:"JSON",id:"beeb784cc189375f"},{topic:"HTML",id:"beeb7a6bec2d68f5"}]},{topic:"Caution",id:"bd42dad21aaf6bae",direction:0,style:{background:"#f1c40e"},expanded:!0,children:[{topic:"Only save manually",id:"bd42e1d0163ebf04",expanded:!0,children:[{topic:"Save button in the top-right corner",id:"bd42e619051878b3",expanded:!0,children:[]},{topic:"ctrl + S",id:"bd42e97d7ac35e99"}]}]}],expanded:!0},linkData:{},summaries:[{id:"a5e68e6a2ce1b648",parent:"bd42e1d0163ebf04",start:0,end:1,text:"summary"},{id:"a5e6978f1bc69f4a",parent:"bd4313fbac40284b",start:3,end:5,text:"summary"}]}}();
package/dist/example.js CHANGED
@@ -234,7 +234,23 @@ and the former one will become a child node of latter one`,
234
234
  ],
235
235
  expanded: !0
236
236
  },
237
- linkData: {}
237
+ linkData: {},
238
+ summaries: [
239
+ {
240
+ id: "a5e68e6a2ce1b648",
241
+ parent: "bd42e1d0163ebf04",
242
+ start: 0,
243
+ end: 1,
244
+ text: "summary"
245
+ },
246
+ {
247
+ id: "a5e6978f1bc69f4a",
248
+ parent: "bd4313fbac40284b",
249
+ start: 3,
250
+ end: 5,
251
+ text: "summary"
252
+ }
253
+ ]
238
254
  };
239
255
  export {
240
256
  d as default
@@ -1,32 +1,9 @@
1
+ import type { Theme } from '.';
1
2
  export declare const LEFT = 0;
2
3
  export declare const RIGHT = 1;
3
4
  export declare const SIDE = 2;
4
5
  export declare const DOWN = 3;
5
6
  export declare const GAP = 30;
6
7
  export declare const TURNPOINT_R = 8;
7
- export declare const THEME: {
8
- name: string;
9
- palette: string[];
10
- cssVar: {
11
- '--main-color': string;
12
- '--main-bgcolor': string;
13
- '--color': string;
14
- '--bgcolor': string;
15
- '--panel-color': string;
16
- '--panel-bgcolor': string;
17
- '--panel-border-color': string;
18
- };
19
- };
20
- export declare const DARK_THEME: {
21
- name: string;
22
- palette: string[];
23
- cssVar: {
24
- '--main-color': string;
25
- '--main-bgcolor': string;
26
- '--color': string;
27
- '--bgcolor': string;
28
- '--panel-color': string;
29
- '--panel-bgcolor': string;
30
- '--panel-border-color': string;
31
- };
32
- };
8
+ export declare const THEME: Theme;
9
+ export declare const DARK_THEME: Theme;
@@ -1,2 +1,15 @@
1
- declare const i18n: Record<string, object>;
1
+ type LangPack = {
2
+ addChild: string;
3
+ addParent: string;
4
+ addSibling: string;
5
+ removeNode: string;
6
+ focus: string;
7
+ cancelFocus: string;
8
+ moveUp: string;
9
+ moveDown: string;
10
+ link: string;
11
+ clickTips: string;
12
+ summary: string;
13
+ };
14
+ declare const i18n: Record<string, LangPack>;
2
15
  export default i18n;
@@ -9,6 +9,12 @@ declare function MindElixir(this: MindElixirInstance, { el, direction, locale, d
9
9
  declare namespace MindElixir {
10
10
  export var prototype: {
11
11
  init(this: MindElixirInstance, data: MindElixirData): Error | undefined;
12
+ createSummary: (this: MindElixirInstance) => void;
13
+ removeSummary: (this: MindElixirInstance, id: string) => void;
14
+ selectSummary: (this: MindElixirInstance, el: import("./summary").SummarySvgGroup) => void;
15
+ unselectSummary: (this: MindElixirInstance) => void;
16
+ renderSummary: (this: MindElixirInstance) => void;
17
+ editSummary: (this: MindElixirInstance, el: import("./summary").SummarySvgGroup) => void;
12
18
  createLink: (this: MindElixirInstance, from: import("./types/dom").Topic, to: import("./types/dom").Topic, isInitPaint?: boolean | undefined, obj?: import("./customLink").LinkItem | undefined) => void;
13
19
  removeLink: (this: MindElixirInstance, linkSvg?: import("./types/dom").CustomSvg | undefined) => void;
14
20
  selectLink: (this: MindElixirInstance, link: import("./types/dom").CustomSvg) => void;
@@ -30,6 +36,8 @@ declare namespace MindElixir {
30
36
  setNodeTopic: (this: MindElixirInstance, ...args: unknown[]) => Promise<void>;
31
37
  selectNode: (this: MindElixirInstance, targetElement: import("./types/dom").Topic, isNewNode?: boolean | undefined, e?: MouseEvent | undefined) => void;
32
38
  unselectNode: (this: MindElixirInstance) => void;
39
+ selectNodes: (this: MindElixirInstance, targetElements: import("./types/dom").Topic[]) => void;
40
+ unselectNodes: (this: MindElixirInstance) => void;
33
41
  selectNextSibling: (this: MindElixirInstance) => boolean;
34
42
  selectPrevSibling: (this: MindElixirInstance) => boolean;
35
43
  selectFirstChild: (this: MindElixirInstance) => void;
@@ -54,7 +62,7 @@ declare namespace MindElixir {
54
62
  generateNewObj: (this: MindElixirInstance) => import("./types/index").NodeObjExport;
55
63
  layout: (this: MindElixirInstance) => void;
56
64
  linkDiv: (this: MindElixirInstance, mainNode?: import("./types/dom").Wrapper | undefined) => void;
57
- createInputDiv: (this: MindElixirInstance, el: import("./types/dom").Topic) => void;
65
+ editTopic: (this: MindElixirInstance, el: import("./types/dom").Topic) => void;
58
66
  createWrapper: (this: MindElixirInstance, nodeObj: import("./types/index").NodeObj, omitChildren?: boolean | undefined) => {
59
67
  grp: import("./types/dom").Wrapper;
60
68
  top: import("./types/dom").Parent;
@@ -72,32 +80,8 @@ declare namespace MindElixir {
72
80
  export var LEFT: number;
73
81
  export var RIGHT: number;
74
82
  export var SIDE: number;
75
- export var THEME: {
76
- name: string;
77
- palette: string[];
78
- cssVar: {
79
- '--main-color': string;
80
- '--main-bgcolor': string;
81
- '--color': string;
82
- '--bgcolor': string;
83
- '--panel-color': string;
84
- '--panel-bgcolor': string;
85
- '--panel-border-color': string;
86
- };
87
- };
88
- export var DARK_THEME: {
89
- name: string;
90
- palette: string[];
91
- cssVar: {
92
- '--main-color': string;
93
- '--main-bgcolor': string;
94
- '--color': string;
95
- '--bgcolor': string;
96
- '--panel-color': string;
97
- '--panel-bgcolor': string;
98
- '--panel-border-color': string;
99
- };
100
- };
83
+ export var THEME: import("./types/index").Theme;
84
+ export var DARK_THEME: import("./types/index").Theme;
101
85
  export var version: string;
102
86
  export var E: (id: string, instance?: MindElixirInstance | undefined) => import("./types/dom").Topic;
103
87
  var _a: (topic: string) => MindElixirData;
@@ -10,6 +10,8 @@ import type { MindElixirData, MindElixirInstance } from './types/index';
10
10
  */
11
11
  export declare const selectNode: (this: MindElixirInstance, targetElement: Topic, isNewNode?: boolean, e?: MouseEvent) => void;
12
12
  export declare const unselectNode: (this: MindElixirInstance) => void;
13
+ export declare const selectNodes: (this: MindElixirInstance, targetElements: Topic[]) => void;
14
+ export declare const unselectNodes: (this: MindElixirInstance) => void;
13
15
  export declare const selectNextSibling: (this: MindElixirInstance) => boolean;
14
16
  export declare const selectPrevSibling: (this: MindElixirInstance) => boolean;
15
17
  export declare const selectFirstChild: (this: MindElixirInstance) => void;
@@ -1,5 +1,6 @@
1
1
  import type { MindElixirInstance, MindElixirData } from './index';
2
2
  import * as customLink from './customLink';
3
+ import * as summaryOperation from './summary';
3
4
  export type MindElixirMethods = typeof methods;
4
5
  /**
5
6
  * Methods that mind-elixir instance can use
@@ -8,6 +9,12 @@ export type MindElixirMethods = typeof methods;
8
9
  */
9
10
  declare const methods: {
10
11
  init(this: MindElixirInstance, data: MindElixirData): Error | undefined;
12
+ createSummary: (this: MindElixirInstance) => void;
13
+ removeSummary: (this: MindElixirInstance, id: string) => void;
14
+ selectSummary: (this: MindElixirInstance, el: summaryOperation.SummarySvgGroup) => void;
15
+ unselectSummary: (this: MindElixirInstance) => void;
16
+ renderSummary: (this: MindElixirInstance) => void;
17
+ editSummary: (this: MindElixirInstance, el: summaryOperation.SummarySvgGroup) => void;
11
18
  createLink: (this: MindElixirInstance, from: import("./index").Topic, to: import("./index").Topic, isInitPaint?: boolean | undefined, obj?: customLink.LinkItem | undefined) => void;
12
19
  removeLink: (this: MindElixirInstance, linkSvg?: import("./index").CustomSvg | undefined) => void;
13
20
  selectLink: (this: MindElixirInstance, link: import("./index").CustomSvg) => void;
@@ -29,6 +36,8 @@ declare const methods: {
29
36
  setNodeTopic: (this: MindElixirInstance, ...args: unknown[]) => Promise<void>;
30
37
  selectNode: (this: MindElixirInstance, targetElement: import("./index").Topic, isNewNode?: boolean | undefined, e?: MouseEvent | undefined) => void;
31
38
  unselectNode: (this: MindElixirInstance) => void;
39
+ selectNodes: (this: MindElixirInstance, targetElements: import("./index").Topic[]) => void;
40
+ unselectNodes: (this: MindElixirInstance) => void;
32
41
  selectNextSibling: (this: MindElixirInstance) => boolean;
33
42
  selectPrevSibling: (this: MindElixirInstance) => boolean;
34
43
  selectFirstChild: (this: MindElixirInstance) => void;
@@ -49,23 +58,23 @@ declare const methods: {
49
58
  setLocale: (this: MindElixirInstance, locale: string) => void;
50
59
  expandNode: (this: MindElixirInstance, el: import("./index").Topic, isExpand?: boolean | undefined) => void;
51
60
  refresh: (this: MindElixirInstance, data?: MindElixirData | undefined) => void;
52
- getObjById: (id: string, data: import("./index").NodeObj) => import("./index").NodeObj | null;
53
- generateNewObj: (this: MindElixirInstance) => import("./index").NodeObjExport;
61
+ getObjById: (id: string, data: import("./types").NodeObj) => import("./types").NodeObj | null;
62
+ generateNewObj: (this: MindElixirInstance) => import("./types").NodeObjExport;
54
63
  layout: (this: MindElixirInstance) => void;
55
64
  linkDiv: (this: MindElixirInstance, mainNode?: import("./index").Wrapper | undefined) => void;
56
- createInputDiv: (this: MindElixirInstance, el: import("./index").Topic) => void;
57
- createWrapper: (this: MindElixirInstance, nodeObj: import("./index").NodeObj, omitChildren?: boolean | undefined) => {
65
+ editTopic: (this: MindElixirInstance, el: import("./index").Topic) => void;
66
+ createWrapper: (this: MindElixirInstance, nodeObj: import("./types").NodeObj, omitChildren?: boolean | undefined) => {
58
67
  grp: import("./index").Wrapper;
59
68
  top: import("./index").Parent;
60
69
  tpc: import("./index").Topic;
61
70
  };
62
- createParent: (this: MindElixirInstance, nodeObj: import("./index").NodeObj) => {
71
+ createParent: (this: MindElixirInstance, nodeObj: import("./types").NodeObj) => {
63
72
  p: import("./index").Parent;
64
73
  tpc: import("./index").Topic;
65
74
  };
66
75
  createChildren: (this: MindElixirInstance, wrappers: import("./index").Wrapper[]) => import("./index").Children;
67
- createTopic: (this: MindElixirInstance, nodeObj: import("./index").NodeObj) => import("./index").Topic;
76
+ createTopic: (this: MindElixirInstance, nodeObj: import("./types").NodeObj) => import("./index").Topic;
68
77
  findEle: (id: string, instance?: MindElixirInstance | undefined) => import("./index").Topic;
69
- changeTheme: (this: MindElixirInstance, theme: import("./index").Theme, shouldRefresh?: boolean) => void;
78
+ changeTheme: (this: MindElixirInstance, theme: import("./types").Theme, shouldRefresh?: boolean) => void;
70
79
  };
71
80
  export default methods;
@@ -0,0 +1,2 @@
1
+ import type { MindElixirInstance } from '..';
2
+ export default function (mei: MindElixirInstance): void;
@@ -0,0 +1,18 @@
1
+ import type { MindElixirInstance } from '.';
2
+ export type Summary = {
3
+ id: string;
4
+ text: string;
5
+ parent: string;
6
+ start: number;
7
+ end: number;
8
+ };
9
+ export type SummarySvgGroup = SVGGElement & {
10
+ children: [SVGPathElement, SVGTextElement];
11
+ summaryObj: Summary;
12
+ };
13
+ export declare const createSummary: (this: MindElixirInstance) => void;
14
+ export declare const removeSummary: (this: MindElixirInstance, id: string) => void;
15
+ export declare const selectSummary: (this: MindElixirInstance, el: SummarySvgGroup) => void;
16
+ export declare const unselectSummary: (this: MindElixirInstance) => void;
17
+ export declare const renderSummary: (this: MindElixirInstance) => void;
18
+ export declare const editSummary: (this: MindElixirInstance, el: SummarySvgGroup) => void;
@@ -4,17 +4,27 @@ import type { EventMap, Operation } from '../utils/pubsub';
4
4
  import type { MindElixirMethods } from '../methods';
5
5
  import type { LinkDragMoveHelperInstance } from '../utils/LinkDragMoveHelper';
6
6
  import type { LinkItem } from '../customLink';
7
+ import type { Summary, SummarySvgGroup } from '../summary';
7
8
  export * from '../methods';
8
9
  type Before = Record<string, (...args: any[]) => Promise<boolean> | boolean>;
9
10
  export interface Theme {
10
11
  name: string;
11
12
  palette: string[];
12
- cssVar: {
13
+ cssVar: Partial<{
13
14
  '--main-color': string;
14
15
  '--main-bgcolor': string;
15
16
  '--color': string;
16
17
  '--bgcolor': string;
17
- };
18
+ '--selected': string;
19
+ '--panel-color': string;
20
+ '--panel-bgcolor': string;
21
+ '--root-color': string;
22
+ '--root-bgcolor': string;
23
+ '--root-radius': string;
24
+ '--main-radius': string;
25
+ '--topic-padding': string;
26
+ '--panel-border-color': string;
27
+ }>;
18
28
  }
19
29
  /**
20
30
  * The MindElixir instance
@@ -27,7 +37,10 @@ export interface MindElixirInstance extends MindElixirMethods {
27
37
  mindElixirBox: HTMLElement;
28
38
  nodeData: NodeObj;
29
39
  linkData: LinkObj;
40
+ summaries: Summary[];
30
41
  currentNode: Topic | null;
42
+ currentNodes: Topic[] | null;
43
+ currentSummary: SummarySvgGroup | null;
31
44
  waitCopy: Topic | null;
32
45
  currentLink: CustomSvg | null;
33
46
  inputDiv: HTMLElement | null;
@@ -55,6 +68,7 @@ export interface MindElixirInstance extends MindElixirMethods {
55
68
  root: HTMLElement;
56
69
  nodes: HTMLElement;
57
70
  lines: SVGElement;
71
+ summarySvg: SVGElement;
58
72
  linkController: SVGElement;
59
73
  P2: HTMLElement;
60
74
  P3: HTMLElement;
@@ -139,6 +153,7 @@ export type LinkObj = Record<string, LinkItem>;
139
153
  export interface MindElixirData {
140
154
  nodeData: NodeObj;
141
155
  linkData?: LinkObj;
156
+ summaries?: Summary[];
142
157
  direction?: number;
143
158
  theme?: Theme;
144
159
  }
@@ -14,5 +14,5 @@ export declare const createParent: (this: MindElixirInstance, nodeObj: NodeObj)
14
14
  export declare const createChildren: (this: MindElixirInstance, wrappers: Wrapper[]) => Children;
15
15
  export declare const createTopic: (this: MindElixirInstance, nodeObj: NodeObj) => Topic;
16
16
  export declare function selectText(div: HTMLElement): void;
17
- export declare const createInputDiv: (this: MindElixirInstance, el: Topic) => void;
17
+ export declare const editTopic: (this: MindElixirInstance, el: Topic) => void;
18
18
  export declare const createExpander: (expanded: boolean | undefined) => Expander;
@@ -1,5 +1,5 @@
1
1
  declare const _default: {
2
- afterMoving: boolean;
2
+ moved: boolean;
3
3
  mousedown: boolean;
4
4
  lastX: number;
5
5
  lastY: number;
@@ -36,3 +36,10 @@ export declare function moveNodeObj(from: NodeObj, to: NodeObj): void;
36
36
  export declare function moveNodeBeforeObj(from: NodeObj, to: NodeObj): void;
37
37
  export declare function moveNodeAfterObj(from: NodeObj, to: NodeObj): void;
38
38
  export declare function deepClone(obj: NodeObj): any;
39
+ export declare const getOffsetLT: (parent: HTMLElement, child: HTMLElement) => {
40
+ offsetLeft: number;
41
+ offsetTop: number;
42
+ };
43
+ export declare const setAttributes: (el: HTMLElement | SVGElement, attrs: {
44
+ [key: string]: string;
45
+ }) => void;
@@ -26,7 +26,9 @@ export type EventMap = {
26
26
  operation: (info: Operation) => void;
27
27
  selectNode: (nodeObj: NodeObj, e?: MouseEvent) => void;
28
28
  selectNewNode: (nodeObj: NodeObj) => void;
29
+ selectNodes: (nodeObj: NodeObj[]) => void;
29
30
  unselectNode: () => void;
31
+ unselectNodes: () => void;
30
32
  expandNode: (nodeObj: NodeObj) => void;
31
33
  };
32
34
  declare const Bus: {
package/package.json CHANGED
@@ -1,85 +1,86 @@
1
- {
2
- "name": "mind-elixir",
3
- "version": "3.0.3",
4
- "type": "module",
5
- "description": "Mind elixir is a free open source mind map core.",
6
- "keywords": [
7
- "mind-elixir",
8
- "mindmap",
9
- "dom",
10
- "visualization"
11
- ],
12
- "scripts": {
13
- "prepare": "husky install",
14
- "lint": "eslint --cache --max-warnings 0 \"src/**/*.{js,json,ts}\" --fix",
15
- "dev": "vite",
16
- "build": "node build.js && tsc",
17
- "preview": "vite preview",
18
- "test": "jest --runInBand",
19
- "doc": "tsc && api-extractor run --local --verbose",
20
- "beta": "npm run build && npm publish --tag beta"
21
- },
22
- "exports": {
23
- ".": {
24
- "types": "./dist/types/index.d.ts",
25
- "import": "./dist/MindElixir.js",
26
- "require": "./dist/MindElixir.js"
27
- },
28
- "./lite": {
29
- "import": "./dist/MindElixirLite.iife.js"
30
- },
31
- "./example": {
32
- "types": "./dist/types/exampleData/1.d.ts",
33
- "import": "./dist/example.js",
34
- "require": "./dist/example.js"
35
- },
36
- "./readme.md": "./readme.md",
37
- "./package.json": "./package.json"
38
- },
39
- "typesVersions": {
40
- "*": {
41
- "example": [
42
- "./dist/types/exampleData/1.d.ts"
43
- ]
44
- }
45
- },
46
- "main": "dist/MindElixir.js",
47
- "types": "dist/types/index.d.ts",
48
- "lint-staged": {
49
- "src/**/*.{ts,js}": [
50
- "eslint --cache --fix"
51
- ],
52
- "src/**/*.{json,less}": [
53
- "prettier --write"
54
- ]
55
- },
56
- "files": [
57
- "package.json",
58
- "dist"
59
- ],
60
- "repository": {
61
- "type": "git",
62
- "url": "https://github.com/ssshooter/mind-elixir-core"
63
- },
64
- "homepage": "https://mind-elixir.com/",
65
- "author": "ssshooter",
66
- "license": "MIT",
67
- "devDependencies": {
68
- "@commitlint/cli": "^17.6.7",
69
- "@commitlint/config-conventional": "^17.6.7",
70
- "@microsoft/api-extractor": "^7.36.4",
71
- "@typescript-eslint/eslint-plugin": "^5.62.0",
72
- "@typescript-eslint/parser": "^5.62.0",
73
- "eslint": "^8.46.0",
74
- "eslint-config-prettier": "^8.10.0",
75
- "eslint-plugin-prettier": "^4.2.1",
76
- "husky": "^8.0.3",
77
- "less": "^4.1.3",
78
- "less-loader": "^10.2.0",
79
- "lint-staged": "^13.2.3",
80
- "prettier": "2.8.4",
81
- "typescript": "^5.1.6",
82
- "vite": "^4.4.8",
83
- "vite-plugin-css-injected-by-js": "^3.2.1"
84
- }
1
+ {
2
+ "name": "mind-elixir",
3
+ "version": "3.0.5-beta.0",
4
+ "type": "module",
5
+ "description": "Mind elixir is a free open source mind map core.",
6
+ "keywords": [
7
+ "mind-elixir",
8
+ "mindmap",
9
+ "dom",
10
+ "visualization"
11
+ ],
12
+ "scripts": {
13
+ "prepare": "husky install",
14
+ "lint": "eslint --cache --max-warnings 0 \"src/**/*.{js,json,ts}\" --fix",
15
+ "dev": "vite",
16
+ "build": "node build.js && tsc",
17
+ "preview": "vite preview",
18
+ "test": "jest --runInBand",
19
+ "doc": "tsc && api-extractor run --local --verbose",
20
+ "beta": "npm run build && npm publish --tag beta"
21
+ },
22
+ "exports": {
23
+ ".": {
24
+ "types": "./dist/types/index.d.ts",
25
+ "import": "./dist/MindElixir.js",
26
+ "require": "./dist/MindElixir.js"
27
+ },
28
+ "./lite": {
29
+ "import": "./dist/MindElixirLite.iife.js"
30
+ },
31
+ "./example": {
32
+ "types": "./dist/types/exampleData/1.d.ts",
33
+ "import": "./dist/example.js",
34
+ "require": "./dist/example.js"
35
+ },
36
+ "./readme.md": "./readme.md",
37
+ "./package.json": "./package.json"
38
+ },
39
+ "typesVersions": {
40
+ "*": {
41
+ "example": [
42
+ "./dist/types/exampleData/1.d.ts"
43
+ ]
44
+ }
45
+ },
46
+ "main": "dist/MindElixir.js",
47
+ "types": "dist/types/index.d.ts",
48
+ "lint-staged": {
49
+ "src/**/*.{ts,js}": [
50
+ "eslint --cache --fix"
51
+ ],
52
+ "src/**/*.{json,less}": [
53
+ "prettier --write"
54
+ ]
55
+ },
56
+ "files": [
57
+ "package.json",
58
+ "dist"
59
+ ],
60
+ "repository": {
61
+ "type": "git",
62
+ "url": "https://github.com/ssshooter/mind-elixir-core"
63
+ },
64
+ "homepage": "https://mind-elixir.com/",
65
+ "author": "ssshooter",
66
+ "license": "MIT",
67
+ "devDependencies": {
68
+ "@commitlint/cli": "^17.6.7",
69
+ "@commitlint/config-conventional": "^17.6.7",
70
+ "@microsoft/api-extractor": "^7.36.4",
71
+ "@typescript-eslint/eslint-plugin": "^5.62.0",
72
+ "@typescript-eslint/parser": "^5.62.0",
73
+ "@viselect/vanilla": "^3.3.1",
74
+ "eslint": "^8.46.0",
75
+ "eslint-config-prettier": "^8.10.0",
76
+ "eslint-plugin-prettier": "^4.2.1",
77
+ "husky": "^8.0.3",
78
+ "less": "^4.1.3",
79
+ "less-loader": "^10.2.0",
80
+ "lint-staged": "^13.2.3",
81
+ "prettier": "2.8.4",
82
+ "typescript": "^5.1.6",
83
+ "vite": "^4.4.8",
84
+ "vite-plugin-css-injected-by-js": "^3.2.1"
85
+ }
85
86
  }