@openeditor/ui 0.0.34 → 0.0.35
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/index.css +56 -48
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +30 -1
- package/dist/index.js +306 -193
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
+
import { RefObject, CSSProperties, ReactNode } from 'react';
|
|
2
3
|
import { OpenEditorController, OpenEditorReactProps, OpenEditorTheme, OpenEditorSlashMenuItem } from '@openeditor/react';
|
|
3
4
|
export { OpenEditorBlockAction, OpenEditorBlockRef, OpenEditorContent, OpenEditorController, OpenEditorReactProps, OpenEditorSlashMenuIcon, OpenEditorSlashMenuIconProps, OpenEditorSlashMenuItem, OpenEditorTheme, OpenEditorThemeProvider, OpenEditorThemeStyle, OpenEditorThemeToken, createOpenEditorThemeStyle, openEditorThemeTokenNames, useOpenEditorController } from '@openeditor/react';
|
|
4
5
|
export { OpenEditorEmojiPicker, OpenEditorEmojiPickerProps } from '@openeditor/emoji';
|
|
@@ -6,6 +7,7 @@ import { Button } from '@base-ui/react/button';
|
|
|
6
7
|
import { Input } from '@base-ui/react/input';
|
|
7
8
|
import { Toggle } from '@base-ui/react/toggle';
|
|
8
9
|
import { ToggleGroup } from '@base-ui/react/toggle-group';
|
|
10
|
+
import { OpenEditorIcon } from '@openeditor/icons';
|
|
9
11
|
|
|
10
12
|
type OpenEditorTableMenuProps = {
|
|
11
13
|
controller: OpenEditorController;
|
|
@@ -46,7 +48,34 @@ declare const OpenEditorToggleGroup: <Value extends string = string>({ className
|
|
|
46
48
|
declare const OpenEditorInput: ({ className, ...props }: OpenEditorInputProps) => react.JSX.Element;
|
|
47
49
|
declare const OpenEditorSelectionBubble: ({ controller, className, container, }: OpenEditorSelectionBubbleProps) => react.JSX.Element | null;
|
|
48
50
|
declare const OpenEditorSlashMenu: ({ controller, className, items, container, }: OpenEditorSlashMenuProps) => react.JSX.Element | null;
|
|
51
|
+
type OpenEditorBlockMenuAction = {
|
|
52
|
+
id: string;
|
|
53
|
+
label: string;
|
|
54
|
+
group?: string;
|
|
55
|
+
icon?: OpenEditorIcon;
|
|
56
|
+
disabled?: boolean;
|
|
57
|
+
run: () => void | Promise<void>;
|
|
58
|
+
};
|
|
59
|
+
type OpenEditorBuiltInBlockMenuHandlers = {
|
|
60
|
+
canMove: (direction: -1 | 1) => boolean;
|
|
61
|
+
move: (direction: -1 | 1) => void;
|
|
62
|
+
copy: () => void | Promise<void>;
|
|
63
|
+
duplicate: () => void;
|
|
64
|
+
delete: () => void;
|
|
65
|
+
};
|
|
66
|
+
declare const createOpenEditorBuiltInBlockMenuActions: (handlers: OpenEditorBuiltInBlockMenuHandlers) => OpenEditorBlockMenuAction[];
|
|
67
|
+
type OpenEditorBlockMenuPopupProps = {
|
|
68
|
+
actions: readonly OpenEditorBlockMenuAction[];
|
|
69
|
+
anchor: HTMLElement | RefObject<HTMLElement | null> | null;
|
|
70
|
+
ariaLabel: string;
|
|
71
|
+
container?: HTMLElement | null;
|
|
72
|
+
onOpenChange: (open: boolean) => void;
|
|
73
|
+
open: boolean;
|
|
74
|
+
style?: CSSProperties;
|
|
75
|
+
trigger?: ReactNode;
|
|
76
|
+
};
|
|
77
|
+
declare const OpenEditorBlockMenuPopup: ({ actions, anchor, ariaLabel, container, onOpenChange, open, style, trigger, }: OpenEditorBlockMenuPopupProps) => react.JSX.Element;
|
|
49
78
|
declare const OpenEditorBlockMenu: ({ controller, className, container, }: OpenEditorBlockMenuProps) => react.JSX.Element | null;
|
|
50
79
|
declare const OpenEditor: ({ className, contentClassName, overlayContainer, theme, ...props }: OpenEditorProps) => react.JSX.Element;
|
|
51
80
|
|
|
52
|
-
export { OpenEditor, OpenEditorBlockMenu, type OpenEditorBlockMenuProps, OpenEditorButton, type OpenEditorButtonProps, OpenEditorInput, type OpenEditorInputProps, type OpenEditorProps, OpenEditorSelectionBubble, type OpenEditorSelectionBubbleProps, OpenEditorSlashMenu, type OpenEditorSlashMenuProps, OpenEditorTableMenu, type OpenEditorTableMenuProps, OpenEditorToggle, OpenEditorToggleGroup, type OpenEditorToggleGroupProps, type OpenEditorToggleProps };
|
|
81
|
+
export { OpenEditor, OpenEditorBlockMenu, type OpenEditorBlockMenuAction, OpenEditorBlockMenuPopup, type OpenEditorBlockMenuPopupProps, type OpenEditorBlockMenuProps, type OpenEditorBuiltInBlockMenuHandlers, OpenEditorButton, type OpenEditorButtonProps, OpenEditorInput, type OpenEditorInputProps, type OpenEditorProps, OpenEditorSelectionBubble, type OpenEditorSelectionBubbleProps, OpenEditorSlashMenu, type OpenEditorSlashMenuProps, OpenEditorTableMenu, type OpenEditorTableMenuProps, OpenEditorToggle, OpenEditorToggleGroup, type OpenEditorToggleGroupProps, type OpenEditorToggleProps, createOpenEditorBuiltInBlockMenuActions };
|