mind-elixir 5.11.3 → 5.12.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/dist/example.js CHANGED
@@ -1,4 +1,5 @@
1
1
  const e = {
2
+ compact: !0,
2
3
  nodeData: {
3
4
  id: "me-root",
4
5
  topic: "Mind Elixir",
@@ -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;
@@ -50,7 +50,8 @@ declare namespace MindElixir {
50
50
  getDataString: (this: MindElixirInstance) => string;
51
51
  getData: (this: MindElixirInstance) => MindElixirData;
52
52
  enableEdit: (this: MindElixirInstance) => void;
53
- disableEdit: (this: MindElixirInstance) => void;
53
+ disableEdit: (// summary container
54
+ this: MindElixirInstance) => void;
54
55
  scale: (this: MindElixirInstance, scaleVal: number, offset?: {
55
56
  x: number;
56
57
  y: number;
@@ -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;
@@ -94,5 +94,6 @@ declare const methods: {
94
94
  createTopic: (this: MindElixirInstance, nodeObj: import("./types").NodeObj) => import("./docs").Topic;
95
95
  findEle: (this: MindElixirInstance, id: string, el?: HTMLElement) => import("./docs").Topic;
96
96
  changeTheme: (this: MindElixirInstance, theme: import("./types").Theme, shouldRefresh?: boolean) => void;
97
+ changeCompact: (this: MindElixirInstance, compact: boolean) => void;
97
98
  };
98
99
  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;
@@ -260,4 +264,5 @@ export type MindElixirData = {
260
264
  summaries?: Summary[];
261
265
  direction?: 0 | 1 | 2;
262
266
  theme?: Theme;
267
+ compact?: boolean;
263
268
  };
@@ -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.1",
4
4
  "type": "module",
5
5
  "description": "Mind elixir is a free open source mind map core.",
6
6
  "keywords": [