lakelib 0.1.6 → 0.1.7

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.
@@ -1,5 +1,5 @@
1
1
  import { Nodes } from '../models/nodes';
2
- export type ButtonConfig = {
2
+ type ButtonConfig = {
3
3
  root: Nodes;
4
4
  name: string;
5
5
  icon?: string;
@@ -15,3 +15,4 @@ export declare class Button {
15
15
  constructor(config: ButtonConfig);
16
16
  render(): void;
17
17
  }
18
+ export {};
@@ -1,10 +1,11 @@
1
1
  import { TranslationFunctions } from '../i18n/types';
2
2
  import { DropdownItem, DropdownMenuItem } from '../types/dropdown';
3
3
  import { Nodes } from '../models/nodes';
4
- export type DropdownConfig = DropdownItem & {
4
+ type DropdownConfig = DropdownItem & {
5
5
  root: Nodes;
6
6
  locale?: TranslationFunctions;
7
7
  tabIndex?: number;
8
+ placement?: 'top' | 'bottom';
8
9
  onSelect: (value: string) => void;
9
10
  };
10
11
  export declare class Dropdown {
@@ -24,3 +25,4 @@ export declare class Dropdown {
24
25
  render(): void;
25
26
  unmount(): void;
26
27
  }
28
+ export {};
@@ -3,13 +3,16 @@ import { NativeNode } from '../types/native';
3
3
  import { SelectionState } from '../types/object';
4
4
  import { ToolbarItem } from '../types/toolbar';
5
5
  import { Nodes } from '../models/nodes';
6
+ type ToolbarPlacement = 'top' | 'bottom';
6
7
  type ToolbarConfig = {
7
8
  root: string | Nodes | NativeNode;
8
9
  items?: (string | ToolbarItem)[];
10
+ placement?: ToolbarPlacement;
9
11
  };
10
12
  export declare class Toolbar {
11
- private items;
12
13
  private root;
14
+ private items;
15
+ private placement;
13
16
  private allMenuMap;
14
17
  private buttonItemList;
15
18
  private dropdownItemList;
@@ -1,10 +1,10 @@
1
1
  import type { Editor } from '../editor';
2
2
  import { Box } from '../models/box';
3
- type Config = {
3
+ type UploadConfig = {
4
4
  editor: Editor;
5
5
  file: File;
6
6
  onError?: () => void;
7
7
  onSuccess?: () => void;
8
8
  };
9
- export declare function uploadImage(config: Config): Box;
9
+ export declare function uploadImage(config: UploadConfig): Box;
10
10
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lakelib",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Rich text editor based on the browser",
5
5
  "keywords": [
6
6
  "rich text",