oasis-editor 0.0.199 → 0.0.201
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/OasisEditorApp-RTw7Wzrq.js +1 -0
- package/dist/core/commands/builtinCommands.d.ts +1 -1
- package/dist/core/commands/clipboardMergeFormatting.d.ts +3 -0
- package/dist/core/commands/publicCommandTypes.d.ts +4 -0
- package/dist/defaultToolbar-DlMhsvGq.js +1 -0
- package/dist/i18n/locales/en.d.ts +3 -0
- package/dist/i18n/locales/pt-BR.d.ts +3 -0
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +1 -1
- package/dist/plugins/internal/essentialsCapabilities.d.ts +7 -0
- package/dist/ui/app/clipboardPaste.d.ts +20 -0
- package/dist/ui/app/clipboardWrite.d.ts +11 -0
- package/dist/ui/app/essentials/browser.d.ts +7 -1
- package/dist/ui/app/essentials/types.d.ts +2 -0
- package/dist/ui/components/Toolbar/primitives/SplitButton.d.ts +2 -0
- package/package.json +1 -1
- package/dist/OasisEditorApp-DyDxI1Kx.js +0 -1
- package/dist/defaultToolbar-BiD81UCq.js +0 -1
|
@@ -148,7 +148,14 @@ export interface EssentialsImageCapability {
|
|
|
148
148
|
setBorder: (patch: ImageBorderPatch) => void;
|
|
149
149
|
}
|
|
150
150
|
export interface EssentialsBrowserCapability {
|
|
151
|
+
cut: () => void;
|
|
152
|
+
canCut: () => boolean;
|
|
153
|
+
paste: () => void;
|
|
154
|
+
pasteAsPlainText: () => void;
|
|
155
|
+
pasteMergeFormatting: () => void;
|
|
156
|
+
canPaste: () => boolean;
|
|
151
157
|
copy: () => void;
|
|
158
|
+
hasSelection: () => boolean;
|
|
152
159
|
}
|
|
153
160
|
export interface EssentialsParagraphCapability {
|
|
154
161
|
togglePageBreakBefore: () => void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { EditorState } from '../../core/model.js';
|
|
2
|
+
export type ClipboardPasteMode = "rich" | "text" | "merge";
|
|
3
|
+
export interface ClipboardPasteDeps {
|
|
4
|
+
state: () => EditorState;
|
|
5
|
+
isReadOnly: () => boolean;
|
|
6
|
+
applyTransactionalState: (producer: (current: EditorState) => EditorState) => void;
|
|
7
|
+
applyTableAwareParagraphEdit: (state: EditorState, edit: (state: EditorState) => EditorState) => EditorState;
|
|
8
|
+
clearPreferredColumn: () => void;
|
|
9
|
+
resetTransactionGrouping: () => void;
|
|
10
|
+
focusInput: () => void;
|
|
11
|
+
onError?: (error: unknown) => void;
|
|
12
|
+
}
|
|
13
|
+
/** A permissions prompt may still deny access at runtime. */
|
|
14
|
+
export declare function canReadSystemClipboard(): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Insert clipboard content at the selection captured before the asynchronous
|
|
17
|
+
* read. Abort if the document has changed during the permission prompt instead
|
|
18
|
+
* of applying stale offsets. Native paste events still handle image-only paste.
|
|
19
|
+
*/
|
|
20
|
+
export declare function pasteFromSystemClipboard(deps: ClipboardPasteDeps, mode: ClipboardPasteMode): Promise<boolean>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EditorState } from '../../core/model.js';
|
|
2
|
+
import { ClipboardPasteDeps } from './clipboardPaste.js';
|
|
3
|
+
/** Clipboard writes must be initiated from the user's gesture. */
|
|
4
|
+
export declare function canWriteSystemClipboard(): boolean;
|
|
5
|
+
/**
|
|
6
|
+
* A rejected write always returns false. In particular, Cut must not delete
|
|
7
|
+
* text because an asynchronous Clipboard API call was merely attempted.
|
|
8
|
+
*/
|
|
9
|
+
export declare function writeEditorSelectionToClipboard(snapshot: EditorState): Promise<boolean>;
|
|
10
|
+
/** Atomic undoable deletion, only after successful clipboard write. */
|
|
11
|
+
export declare function cutEditorSelection(deps: ClipboardPasteDeps): Promise<boolean>;
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
import { EssentialsBrowserCapability } from '../../../plugins/internal/essentialsCapabilities.js';
|
|
2
|
-
|
|
2
|
+
import { CreateEditorEssentialsPluginOptions } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Copies the editor's *model selection*, not the DOM selection of the button
|
|
5
|
+
* that currently holds focus. Keyboard copy through the editor input continues
|
|
6
|
+
* to use useEditorClipboard, preserving its existing rich-clipboard behavior.
|
|
7
|
+
*/
|
|
8
|
+
export declare function buildEssentialsBrowser(options: Pick<CreateEditorEssentialsPluginOptions, "state" | "isReadOnly" | "applyTransactionalState" | "tableOps" | "clearPreferredColumn" | "resetTransactionGrouping" | "focusInput">): EssentialsBrowserCapability;
|
|
@@ -41,6 +41,8 @@ export interface CreateEditorEssentialsPluginOptions {
|
|
|
41
41
|
};
|
|
42
42
|
selectionBoxes: () => Array<unknown>;
|
|
43
43
|
focusInput: () => void;
|
|
44
|
+
clearPreferredColumn: () => void;
|
|
45
|
+
resetTransactionGrouping: () => void;
|
|
44
46
|
applyState: (nextState: EditorState) => void;
|
|
45
47
|
applyTransactionalState: (producer: (current: EditorState) => EditorState, options?: {
|
|
46
48
|
mergeKey?: MergeKey;
|
|
@@ -12,10 +12,12 @@ export interface SplitButtonProps {
|
|
|
12
12
|
mainTestId?: string;
|
|
13
13
|
mainAriaLabel?: string;
|
|
14
14
|
mainPressed?: boolean;
|
|
15
|
+
mainDisabled?: boolean;
|
|
15
16
|
onMain: () => void;
|
|
16
17
|
/** Chevron (right) button. */
|
|
17
18
|
menuTestId?: string;
|
|
18
19
|
menuAriaLabel?: string;
|
|
20
|
+
menuDisabled?: boolean;
|
|
19
21
|
/** Popover panel. */
|
|
20
22
|
panelClass?: string;
|
|
21
23
|
panelRole?: PanelRole;
|