@ones-editor/editor 1.1.0-beta.1 → 1.1.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.
Files changed (41) hide show
  1. package/@ones-editor/context-menu/index.d.ts +3 -0
  2. package/@ones-editor/context-menu/package.json +8 -0
  3. package/@ones-editor/context-menu/src/helper/actions.d.ts +5 -0
  4. package/@ones-editor/context-menu/src/helper/command-items.d.ts +26 -0
  5. package/@ones-editor/context-menu/src/helper/utils.d.ts +3 -0
  6. package/@ones-editor/context-menu/src/locale/en-us.d.ts +14 -0
  7. package/@ones-editor/context-menu/src/locale/ja-jp.d.ts +14 -0
  8. package/@ones-editor/context-menu/src/locale/zh-cn.d.ts +14 -0
  9. package/@ones-editor/context-menu/src/menu/index.d.ts +17 -0
  10. package/@ones-editor/core/src/core/composition/editor-input.d.ts +1 -22
  11. package/@ones-editor/core/src/core/composition/index.d.ts +1 -1
  12. package/@ones-editor/core/src/core/input-handler/actions.d.ts +1 -0
  13. package/@ones-editor/core/src/core/input-handler/input-handler.d.ts +4 -3
  14. package/@ones-editor/core/src/core/keyboard/default-shortcuts.d.ts +2 -1
  15. package/@ones-editor/core/src/core/types.d.ts +27 -1
  16. package/@ones-editor/core/src/utils/blob-to-string.d.ts +1 -0
  17. package/@ones-editor/core/src/utils/index.d.ts +1 -0
  18. package/@ones-editor/graph-embed/src/config/index.d.ts +1 -1
  19. package/@ones-editor/image-embed/src/shortcuts/index.d.ts +2 -1
  20. package/@ones-editor/tsconfig.tsbuildinfo +1 -1
  21. package/@ones-editor/ui/src/toolbar/toolbar-handler.d.ts +1 -0
  22. package/@ones-editor/ui-base/src/auto-suggest/auto-suggest-menu.d.ts +1 -0
  23. package/@ones-editor/ui-base/src/icons/index.d.ts +1 -2
  24. package/@ones-editor/ui-base/src/input/create-input.d.ts +1 -2
  25. package/@ones-editor/versions/src/version-dialog/version-list.d.ts +1 -1
  26. package/dist/index.js +201 -208
  27. package/dist/types.d.ts +2 -0
  28. package/package.json +1 -1
  29. package/@ones-editor/status/package.json +0 -7
  30. package/@ones-editor/status/src/dom/input.d.ts +0 -1
  31. package/@ones-editor/status/src/dom/status-palette.d.ts +0 -6
  32. package/@ones-editor/status/src/index.d.ts +0 -4
  33. package/@ones-editor/status/src/locale/en-us.d.ts +0 -26
  34. package/@ones-editor/status/src/locale/ja-jp.d.ts +0 -26
  35. package/@ones-editor/status/src/locale/zh-cn.d.ts +0 -26
  36. package/@ones-editor/status/src/status-box-command.d.ts +0 -7
  37. package/@ones-editor/status/src/status-box-data.d.ts +0 -5
  38. package/@ones-editor/status/src/status-box-editor.d.ts +0 -20
  39. package/@ones-editor/status/src/status-box.d.ts +0 -4
  40. package/@ones-editor/status/src/types.d.ts +0 -8
  41. /package/@ones-editor/{status → context-menu}/src/locale/index.d.ts +0 -0
package/dist/types.d.ts CHANGED
@@ -49,6 +49,7 @@ export interface CreateOnesEditorOptions {
49
49
  token: string;
50
50
  disableLogout?: boolean;
51
51
  enableComments?: boolean;
52
+ enableContextMenu?: boolean;
52
53
  scrollContainer?: HTMLElement;
53
54
  lang?: i18n.LANGS;
54
55
  logLevel?: LogLevel;
@@ -84,6 +85,7 @@ export interface CreateLocalEditorOptions {
84
85
  };
85
86
  serverUrl?: string;
86
87
  enableComments?: boolean;
88
+ enableContextMenu?: boolean;
87
89
  events?: EditorEvents;
88
90
  componentsOptions?: EditorComponentOptions;
89
91
  hideTitle?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "1.1.0-beta.1",
3
+ "version": "1.1.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,7 +0,0 @@
1
- {
2
- "name": "@ones-editor/status",
3
- "version": "1.0.0",
4
- "main": "./src/index.js",
5
- "license": "MIT",
6
- "types": "src/index.d.ts"
7
- }
@@ -1 +0,0 @@
1
- export declare function createStatusInput(parent: HTMLElement, defaultValue: string, onChange: ((e: Event) => void), onKeyDown: (e: KeyboardEvent) => void): void;
@@ -1,6 +0,0 @@
1
- import { StatusColor } from '../types';
2
- export declare function createPalette(): HTMLDivElement;
3
- export declare class StatusPalette {
4
- root: HTMLElement;
5
- changeColor: (color: StatusColor) => void;
6
- }
@@ -1,4 +0,0 @@
1
- import StatusBox from './status-box';
2
- import { StatusBoxCommand } from './status-box-command';
3
- import './locale';
4
- export { StatusBox, StatusBoxCommand, };
@@ -1,26 +0,0 @@
1
- declare const _default: {
2
- status: {
3
- defaultTitle: string;
4
- empty: string;
5
- command: {
6
- name: string;
7
- };
8
- color: {
9
- red: string;
10
- yellow: string;
11
- green: string;
12
- blue: string;
13
- purple: string;
14
- grey: string;
15
- };
16
- colorDefaultTitle: {
17
- red: string;
18
- yellow: string;
19
- green: string;
20
- blue: string;
21
- purple: string;
22
- grey: string;
23
- };
24
- };
25
- };
26
- export default _default;
@@ -1,26 +0,0 @@
1
- declare const _default: {
2
- status: {
3
- defaultTitle: string;
4
- empty: string;
5
- command: {
6
- name: string;
7
- };
8
- color: {
9
- red: string;
10
- yellow: string;
11
- green: string;
12
- blue: string;
13
- purple: string;
14
- gray: string;
15
- };
16
- colorDefaultTitle: {
17
- red: string;
18
- yellow: string;
19
- green: string;
20
- blue: string;
21
- purple: string;
22
- gray: string;
23
- };
24
- };
25
- };
26
- export default _default;
@@ -1,26 +0,0 @@
1
- declare const _default: {
2
- status: {
3
- defaultTitle: string;
4
- empty: string;
5
- command: {
6
- name: string;
7
- };
8
- color: {
9
- red: string;
10
- yellow: string;
11
- green: string;
12
- blue: string;
13
- purple: string;
14
- gray: string;
15
- };
16
- colorDefaultTitle: {
17
- red: string;
18
- yellow: string;
19
- green: string;
20
- blue: string;
21
- purple: string;
22
- gray: string;
23
- };
24
- };
25
- };
26
- export default _default;
@@ -1,7 +0,0 @@
1
- import { CommandItem, OnesEditor } from '../../../@ones-editor/core';
2
- export declare class StatusBoxCommand {
3
- static id: string;
4
- static get commands(): CommandItem[];
5
- static insertStatus(editor: OnesEditor, containerId: string, blockIndex: number): void;
6
- static insertEmptyBlockStatus(editor: OnesEditor, containerId: string, blockIndex: number): import("@ones-editor/core").BlockElement;
7
- }
@@ -1,5 +0,0 @@
1
- import { DocBlockTextOp, OnesEditor } from '../../../@ones-editor/core';
2
- import { StatusBoxData, StatusColor } from './types';
3
- export declare function createEmptyStatusBox(editor: OnesEditor): DocBlockTextOp;
4
- export declare function recordLastStatusBoxData(editor: OnesEditor, box: StatusBoxData): void;
5
- export declare function getLastStatusBoxTitle(editor: OnesEditor, color: StatusColor): string;
@@ -1,20 +0,0 @@
1
- import { BoxElement, OnesEditor } from '../../../@ones-editor/core';
2
- import { Popup } from '../../../@ones-editor/ui-base';
3
- import { StatusColor } from './types';
4
- import { StatusPalette } from './dom/status-palette';
5
- export declare class StatusBoxEditor {
6
- private editor;
7
- linkPopup: Popup | null;
8
- boxElement?: BoxElement;
9
- statusPalette: StatusPalette;
10
- constructor(editor: OnesEditor);
11
- editorStatus: (boxElement: BoxElement) => void;
12
- focus(): void;
13
- handleShow: () => void;
14
- handClose: () => void;
15
- handleKeyDown: (e: KeyboardEvent) => void;
16
- createPopupContent(title: string, color: StatusColor, subtle: boolean): HTMLDivElement;
17
- changeColor: (e: Event) => void;
18
- changeTitle: (e: Event) => void;
19
- destroy(): void;
20
- }
@@ -1,4 +0,0 @@
1
- import { Box } from '../../../@ones-editor/core';
2
- import './status-box.scss';
3
- declare const StatusBox: Box;
4
- export default StatusBox;
@@ -1,8 +0,0 @@
1
- import { DocBox } from '../../../@ones-editor/core';
2
- export declare const STATUS_COLORS: readonly ["Blue", "Grey", "Yellow", "Red", "Green", "Purple"];
3
- export type StatusColor = typeof STATUS_COLORS[number];
4
- export interface StatusBoxData extends DocBox {
5
- title: string;
6
- subtle: boolean;
7
- color: StatusColor;
8
- }