lakelib 0.1.12 → 0.1.14

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.
@@ -2,21 +2,20 @@ import './custom-properties.css';
2
2
  import './keyframes.css';
3
3
  import './core.css';
4
4
  import './mark.css';
5
+ import './box.css';
5
6
  import './button.css';
6
7
  import './dropdown.css';
7
8
  import './popup.css';
8
9
  import './resizer.css';
9
- import './toolbar.css';
10
- import './box-toolbar.css';
11
10
  import './format-painter.css';
12
11
  import './heading.css';
12
+ import './link.css';
13
13
  import './list.css';
14
14
  import './block-quote.css';
15
15
  import './table.css';
16
- import './box.css';
17
16
  import './hr.css';
18
17
  import './video.css';
19
18
  import './code-block.css';
20
19
  import './image.css';
21
20
  import './file.css';
22
- import './link-popup.css';
21
+ import './toolbar.css';
@@ -37,11 +37,12 @@ type EditorConfig = {
37
37
  [name: string]: any;
38
38
  };
39
39
  export declare class Editor {
40
+ private unsavedInputData;
41
+ private unsavedInputCount;
42
+ private state;
40
43
  static version: string;
41
44
  static box: BoxManager;
42
45
  static plugin: Plugin;
43
- private unsavedInputData;
44
- private state;
45
46
  root: Nodes;
46
47
  toolbar: Toolbar | undefined;
47
48
  config: Config;
@@ -61,26 +62,24 @@ export declare class Editor {
61
62
  private copyListener;
62
63
  private cutListener;
63
64
  private pasteListener;
64
- private beforeunloadListener;
65
65
  private selectionchangeListener;
66
66
  private clickListener;
67
67
  private resizeListener;
68
68
  private updateBoxSelectionStyle;
69
69
  private emitStateChangeEvent;
70
- private emitChangeEvent;
71
70
  private togglePlaceholderClass;
72
- private inputInBoxStrip;
71
+ private moveBoxStripText;
72
+ private resetUnsavedInputData;
73
73
  private bindInputEvents;
74
74
  private bindHistoryEvents;
75
75
  get hasFocus(): boolean;
76
76
  get locale(): TranslationFunctions;
77
- rectifyContent(): void;
78
- commitUnsavedInputData(): void;
79
- prepareOperation(): void;
80
- commitOperation(): void;
81
- setPluginConfig(pluginName: string, pluginConfig: {
77
+ fixContent(): boolean;
78
+ setPluginConfig(name: string, config: {
82
79
  [key: string]: any;
83
80
  }): void;
81
+ removeBoxGarbage(): void;
82
+ renderBoxes(): void;
84
83
  focus(): void;
85
84
  blur(): void;
86
85
  scrollToCaret(): void;
@@ -1,9 +1,6 @@
1
1
  import { BoxComponent } from '../types/box';
2
- import { Nodes } from '../models/nodes';
3
2
  export declare class BoxManager {
4
3
  add(component: BoxComponent): void;
5
4
  remove(name: string): void;
6
5
  getNames(): string[];
7
- rectifyInstances(container: Nodes): void;
8
- renderAll(container: Nodes): void;
9
6
  }
@@ -1,4 +1,3 @@
1
- import EventEmitter from 'eventemitter3';
2
1
  import { AppliedItem } from '../types/object';
3
2
  import { Selection } from './selection';
4
3
  type CommmandItem = {
@@ -10,7 +9,6 @@ type CommmandItem = {
10
9
  export declare class Command {
11
10
  private selection;
12
11
  private commandMap;
13
- event: EventEmitter;
14
12
  constructor(selection: Selection);
15
13
  add(name: string, commandItem: CommmandItem): void;
16
14
  delete(name: string): void;
@@ -1,11 +1,17 @@
1
1
  import EventEmitter from 'eventemitter3';
2
+ import { Nodes } from '../models/nodes';
2
3
  import { Selection } from './selection';
4
+ type SaveOptions = {
5
+ inputType?: string;
6
+ update?: boolean;
7
+ emitEvent?: boolean;
8
+ };
3
9
  export declare class History {
4
10
  private selection;
5
11
  private container;
6
- private list;
7
- private index;
8
12
  private canSave;
13
+ list: Nodes[];
14
+ index: number;
9
15
  limit: number;
10
16
  event: EventEmitter;
11
17
  constructor(selection: Selection);
@@ -14,13 +20,13 @@ export declare class History {
14
20
  private addIdToBoxes;
15
21
  private removeIdfromBoxes;
16
22
  private morphContainer;
17
- private cloneContainer;
18
- get count(): number;
19
23
  get canUndo(): boolean;
20
24
  get canRedo(): boolean;
25
+ cloneContainer(): Nodes;
21
26
  undo(): void;
22
27
  redo(): void;
23
28
  continue(): void;
24
29
  pause(): void;
25
- save(emitSaveEvent?: boolean): void;
30
+ save(options?: SaveOptions): void;
26
31
  }
32
+ export {};
@@ -37,10 +37,10 @@ export declare class Range {
37
37
  shrinkBefore(node: Nodes): void;
38
38
  shrinkAfter(node: Nodes): void;
39
39
  shrink(): void;
40
- adaptBox(): void;
41
- adaptTable(): void;
42
- adaptBlock(): void;
43
- adapt(): void;
40
+ adjustBox(): void;
41
+ adjustTable(): void;
42
+ adjustBlock(): void;
43
+ adjust(): void;
44
44
  getPrevNode(): Nodes;
45
45
  getNextNode(): Nodes;
46
46
  getBoxes(): Nodes[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lakelib",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
4
4
  "description": "Rich text editor based on the browser",
5
5
  "keywords": [
6
6
  "rich text",