mind-elixir 5.11.3 → 5.12.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.
@@ -3,7 +3,7 @@ import './markdown.css';
3
3
  import { LEFT, RIGHT, SIDE, DARK_THEME, THEME } from './const';
4
4
  import type { MindElixirData, MindElixirInstance, MindElixirMethods, Options } from './types/index';
5
5
  import type { Topic } from './docs';
6
- declare function MindElixir(this: MindElixirInstance, { el, direction, editable, contextMenu, toolBar, keypress, mouseSelectionButton, selectionContainer, before, newTopicName, allowUndo, generateMainBranch, generateSubBranch, overflowHidden, theme, alignment, scaleSensitivity, scaleMax, scaleMin, handleWheel, markdown, imageProxy, pasteHandler, mobileMultiSelect, }: Options): void;
6
+ declare function MindElixir(this: MindElixirInstance, { el, direction, editable, contextMenu, toolBar, keypress, mouseSelectionButton, selectionContainer, before, newTopicName, allowUndo, generateMainBranch, generateSubBranch, overflowHidden, compact, theme, alignment, scaleSensitivity, scaleMax, scaleMin, handleWheel, markdown, imageProxy, pasteHandler, mobileMultiSelect, }: Options): void;
7
7
  declare namespace MindElixir {
8
8
  export var prototype: {
9
9
  init(this: MindElixirInstance, data: MindElixirData): Error | undefined;
@@ -48,7 +48,8 @@ declare namespace MindElixir {
48
48
  clearSelection: (this: MindElixirInstance) => void;
49
49
  stringifyData: (data: object) => string;
50
50
  getDataString: (this: MindElixirInstance) => string;
51
- getData: (this: MindElixirInstance) => MindElixirData;
51
+ getData: (// infrastructure
52
+ this: MindElixirInstance) => MindElixirData;
52
53
  enableEdit: (this: MindElixirInstance) => void;
53
54
  disableEdit: (this: MindElixirInstance) => void;
54
55
  scale: (this: MindElixirInstance, scaleVal: number, offset?: {
@@ -85,6 +86,7 @@ declare namespace MindElixir {
85
86
  createTopic: (this: MindElixirInstance, nodeObj: import("./docs").NodeObj) => Topic;
86
87
  findEle: (this: MindElixirInstance, id: string, el?: HTMLElement) => Topic;
87
88
  changeTheme: (this: MindElixirInstance, theme: import("./docs").Theme, shouldRefresh?: boolean) => void;
89
+ changeCompact: (this: MindElixirInstance, compact: boolean) => void;
88
90
  };
89
91
  export var LEFT: number;
90
92
  export var RIGHT: number;
@@ -60,7 +60,12 @@ declare const methods: {
60
60
  getData: (this: MindElixirInstance) => MindElixirData;
61
61
  enableEdit: (this: MindElixirInstance) => void;
62
62
  disableEdit: (this: MindElixirInstance) => void;
63
- scale: (this: MindElixirInstance, scaleVal: number, offset?: {
63
+ scale: (this: MindElixirInstance,
64
+ /**
65
+ * @public
66
+ * @param {boolean} enable
67
+ */
68
+ scaleVal: number, offset?: {
64
69
  x: number;
65
70
  y: number;
66
71
  }) => void;
@@ -94,5 +99,6 @@ declare const methods: {
94
99
  createTopic: (this: MindElixirInstance, nodeObj: import("./types").NodeObj) => import("./docs").Topic;
95
100
  findEle: (this: MindElixirInstance, id: string, el?: HTMLElement) => import("./docs").Topic;
96
101
  changeTheme: (this: MindElixirInstance, theme: import("./types").Theme, shouldRefresh?: boolean) => void;
102
+ changeCompact: (this: MindElixirInstance, compact: boolean) => void;
97
103
  };
98
104
  export default methods;
@@ -148,6 +148,10 @@ export interface Options {
148
148
  newTopicName?: string;
149
149
  allowUndo?: boolean;
150
150
  overflowHidden?: boolean;
151
+ /**
152
+ * Compact mode. If true, distance fields will be controlled to a small value.
153
+ */
154
+ compact?: boolean;
151
155
  generateMainBranch?: (this: MindElixirInstance, params: MainLineParams) => PathString;
152
156
  generateSubBranch?: (this: MindElixirInstance, params: SubLineParams) => PathString;
153
157
  theme?: Theme;
@@ -1,3 +1,4 @@
1
1
  import type { MindElixirInstance } from '../types/index';
2
2
  import type { Theme } from '../types/index';
3
3
  export declare const changeTheme: (this: MindElixirInstance, theme: Theme, shouldRefresh?: boolean) => void;
4
+ export declare const changeCompact: (this: MindElixirInstance, compact: boolean) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mind-elixir",
3
- "version": "5.11.3",
3
+ "version": "5.12.0",
4
4
  "type": "module",
5
5
  "description": "Mind elixir is a free open source mind map core.",
6
6
  "keywords": [