mind-elixir 4.4.2 → 4.4.3

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.
@@ -4,7 +4,7 @@ import { LEFT, RIGHT, SIDE, DARK_THEME, THEME } from './const';
4
4
  import { findEle } from './utils/dom';
5
5
  import dragMoveHelper from './utils/dragMoveHelper';
6
6
  import type { MindElixirData, MindElixirInstance, MindElixirMethods, Options } from './types/index';
7
- declare function MindElixir(this: MindElixirInstance, { el, direction, locale, draggable, editable, contextMenu, contextMenuOption, toolBar, keypress, mouseSelectionButton, selectionContainer, before, newTopicName, allowUndo, generateMainBranch, generateSubBranch, overflowHidden, theme, }: Options): void;
7
+ declare function MindElixir(this: MindElixirInstance, { el, direction, locale, draggable, editable, contextMenu, contextMenuOption, toolBar, keypress, mouseSelectionButton, selectionContainer, before, newTopicName, allowUndo, generateMainBranch, generateSubBranch, overflowHidden, theme, alignment, }: Options): void;
8
8
  declare namespace MindElixir {
9
9
  export var prototype: {
10
10
  init(this: MindElixirInstance, data: MindElixirData): Error | undefined;
@@ -43,7 +43,8 @@ declare namespace MindElixir {
43
43
  selectNode: (this: MindElixirInstance, targetElement: import("./types/dom").Topic, isNewNode?: boolean, e?: MouseEvent) => void;
44
44
  unselectNode: (this: MindElixirInstance) => void;
45
45
  selectNodes: (this: MindElixirInstance, tpc: import("./types/dom").Topic[]) => void;
46
- unselectNodes: (this: MindElixirInstance) => void;
46
+ unselectNodes: (// record the direction before enter focus mode, must true in focus mode, reset to null after exit focus
47
+ this: MindElixirInstance) => void;
47
48
  clearSelection: (this: MindElixirInstance) => void;
48
49
  getDataString: (this: MindElixirInstance) => string;
49
50
  getData: (this: MindElixirInstance) => MindElixirData;
@@ -50,6 +50,7 @@ export type Theme = {
50
50
  '--panel-border-color': string;
51
51
  }>;
52
52
  };
53
+ export type Alignment = 'root' | 'nodes';
53
54
  /**
54
55
  * The MindElixir instance
55
56
  *
@@ -85,8 +86,6 @@ export interface MindElixirInstance extends MindElixirMethods {
85
86
  newTopicName: string;
86
87
  allowUndo: boolean;
87
88
  overflowHidden: boolean;
88
- mainBranchStyle: number;
89
- subBranchStyle: number;
90
89
  generateMainBranch: (params: MainLineParams) => PathString;
91
90
  generateSubBranch: (params: SubLineParams) => PathString;
92
91
  container: HTMLElement;
@@ -115,6 +114,7 @@ export interface MindElixirInstance extends MindElixirMethods {
115
114
  redo: () => void;
116
115
  selection: SelectionArea;
117
116
  selectionContainer?: string | HTMLElement;
117
+ alignment: Alignment;
118
118
  }
119
119
  type PathString = string;
120
120
  /**
@@ -142,6 +142,7 @@ export type Options = {
142
142
  theme?: Theme;
143
143
  nodeMenu?: boolean;
144
144
  selectionContainer?: string | HTMLElement;
145
+ alignment?: Alignment;
145
146
  };
146
147
  export type Uid = string;
147
148
  export type Left = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mind-elixir",
3
- "version": "4.4.2",
3
+ "version": "4.4.3",
4
4
  "type": "module",
5
5
  "description": "Mind elixir is a free open source mind map core.",
6
6
  "keywords": [