lakelib 0.1.3 → 0.1.5

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.
@@ -39,7 +39,7 @@ export declare class Editor {
39
39
  static box: BoxManager;
40
40
  static plugin: Plugin;
41
41
  private unsavedInputData;
42
- private stateData;
42
+ private state;
43
43
  root: Nodes;
44
44
  toolbar: Toolbar | undefined;
45
45
  config: Config;
@@ -66,7 +66,7 @@ export declare class Editor {
66
66
  private inputInBoxStrip;
67
67
  private bindInputEvents;
68
68
  private bindHistoryEvents;
69
- private bindFocusEvents;
69
+ get hasFocus(): boolean;
70
70
  get locale(): TranslationFunctions;
71
71
  rectifyContent(): void;
72
72
  commitUnsavedInputData(): void;
@@ -19,7 +19,7 @@ export type AppliedItem = {
19
19
  attributes: KeyValue;
20
20
  styles: KeyValue;
21
21
  };
22
- export type StateData = {
22
+ export type SelectionState = {
23
23
  appliedItems: AppliedItem[];
24
24
  disabledNameMap: Map<string, boolean>;
25
25
  selectedNameMap: Map<string, boolean>;
@@ -8,14 +8,14 @@ export type ToolbarButtonItem = {
8
8
  icon?: string;
9
9
  tooltip: string | ((locale: TranslationFunctions) => string);
10
10
  isSelected?: (appliedItems: AppliedItem[]) => boolean;
11
- isDisabled?: (AppliedItems: AppliedItem[]) => boolean;
11
+ isDisabled?: (appliedItems: AppliedItem[]) => boolean;
12
12
  onClick: (editor: Editor, value: string) => void;
13
13
  };
14
14
  export type ToolbarDropdownItem = DropdownItem & {
15
15
  name: string;
16
16
  type: 'dropdown';
17
17
  selectedValues?: (appliedItems: AppliedItem[]) => string[];
18
- isDisabled?: (AppliedItems: AppliedItem[]) => boolean;
18
+ isDisabled?: (appliedItems: AppliedItem[]) => boolean;
19
19
  onSelect: (editor: Editor, value: string) => void;
20
20
  };
21
21
  export type ToolbarUploadItem = {
@@ -1,6 +1,6 @@
1
1
  import type { Editor } from '../editor';
2
2
  import { NativeNode } from '../types/native';
3
- import { StateData } from '../types/object';
3
+ import { SelectionState } from '../types/object';
4
4
  import { ToolbarItem } from '../types/toolbar';
5
5
  import { Nodes } from '../models/nodes';
6
6
  type ToolbarConfig = {
@@ -19,7 +19,7 @@ export declare class Toolbar {
19
19
  private appendButton;
20
20
  private appendDropdown;
21
21
  private appendUpload;
22
- updateState(stateData: StateData): void;
22
+ updateState(state: SelectionState): void;
23
23
  render(editor: Editor): void;
24
24
  }
25
25
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lakelib",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Rich text editor based on the browser",
5
5
  "keywords": [
6
6
  "rich text",