@clepit/core 0.6.0-beta.397 → 0.6.0-beta.398
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/CHANGELOG.md +4 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/tools/inline/link/dialog.d.ts +3 -1
- package/dist/tools/inline/link/index.d.ts +2 -2
- package/dist/tools/inline/status/dialog.d.ts +3 -1
- package/dist/tools/inline/status/index.d.ts +2 -2
- package/dist/tools/inline/tooltip/dialog.d.ts +3 -1
- package/dist/tools/inline/tooltip/index.d.ts +2 -2
- package/dist/types.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EditorClassNames, EditorStyles } from '../../../types';
|
|
1
|
+
import { DialogLabel, EditorClassNames, EditorStyles } from '../../../types';
|
|
2
2
|
export interface LinkDialogOptions {
|
|
3
3
|
text: string;
|
|
4
4
|
url: string;
|
|
@@ -6,6 +6,7 @@ export interface LinkDialogOptions {
|
|
|
6
6
|
onCancel: () => void;
|
|
7
7
|
styles?: EditorStyles['dialogs'];
|
|
8
8
|
classNames?: EditorClassNames['dialogs'];
|
|
9
|
+
labels?: Partial<Record<DialogLabel, string>>;
|
|
9
10
|
}
|
|
10
11
|
export declare class LinkDialog {
|
|
11
12
|
private static isOpen;
|
|
@@ -17,6 +18,7 @@ export declare class LinkDialog {
|
|
|
17
18
|
constructor(options: LinkDialogOptions);
|
|
18
19
|
show(): void;
|
|
19
20
|
hide(): void;
|
|
21
|
+
private word;
|
|
20
22
|
private createDialog;
|
|
21
23
|
private createInputGroup;
|
|
22
24
|
private createButtonGroup;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { EditorClassNames, EditorStyles } from '../../../types';
|
|
1
|
+
import { DialogLabel, EditorClassNames, EditorStyles } from '../../../types';
|
|
2
2
|
export declare class LinkInput {
|
|
3
3
|
static label: string;
|
|
4
4
|
static icon: string;
|
|
5
5
|
static shortcut: string;
|
|
6
|
-
static apply(range: Range, classNames: EditorClassNames['dialogs'], styles: EditorStyles['dialogs']): void;
|
|
6
|
+
static apply(range: Range, classNames: EditorClassNames['dialogs'], styles: EditorStyles['dialogs'], labels?: Partial<Record<DialogLabel, string>>): void;
|
|
7
7
|
static remove(range: Range): void;
|
|
8
8
|
private static findLinkElement;
|
|
9
9
|
static isActive(range: Range): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EditorClassNames, EditorStyles } from '../../../types';
|
|
1
|
+
import { DialogLabel, EditorClassNames, EditorStyles } from '../../../types';
|
|
2
2
|
export type StatusVariant = 'info' | 'success' | 'warning' | 'error' | 'plain';
|
|
3
3
|
export declare const STATUS_VARIANTS: StatusVariant[];
|
|
4
4
|
export type StatusDialogOptions = {
|
|
@@ -8,6 +8,7 @@ export type StatusDialogOptions = {
|
|
|
8
8
|
onCancel: () => void;
|
|
9
9
|
styles?: EditorStyles['dialogs'];
|
|
10
10
|
classNames?: EditorClassNames['dialogs'];
|
|
11
|
+
labels?: Partial<Record<DialogLabel, string>>;
|
|
11
12
|
};
|
|
12
13
|
export declare class StatusDialog {
|
|
13
14
|
private static isOpen;
|
|
@@ -19,6 +20,7 @@ export declare class StatusDialog {
|
|
|
19
20
|
constructor(options: StatusDialogOptions);
|
|
20
21
|
show(): void;
|
|
21
22
|
hide(): void;
|
|
23
|
+
private word;
|
|
22
24
|
private createDialog;
|
|
23
25
|
private bindEvents;
|
|
24
26
|
private focusFirstInput;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { EditorClassNames, EditorStyles } from '../../../types';
|
|
1
|
+
import { DialogLabel, EditorClassNames, EditorStyles } from '../../../types';
|
|
2
2
|
export declare class StatusInput {
|
|
3
3
|
static label: string;
|
|
4
4
|
static icon: string;
|
|
5
|
-
static apply(range: Range, classNames: EditorClassNames['dialogs'], styles: EditorStyles['dialogs']): void;
|
|
5
|
+
static apply(range: Range, classNames: EditorClassNames['dialogs'], styles: EditorStyles['dialogs'], labels?: Partial<Record<DialogLabel, string>>): void;
|
|
6
6
|
static remove(range: Range): void;
|
|
7
7
|
static isActive(range: Range): boolean;
|
|
8
8
|
private static unwrap;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSProperties } from '../../../types';
|
|
1
|
+
import { CSSProperties, DialogLabel } from '../../../types';
|
|
2
2
|
export type TooltipDialogOptions = {
|
|
3
3
|
text: string;
|
|
4
4
|
tooltip: string;
|
|
@@ -6,6 +6,7 @@ export type TooltipDialogOptions = {
|
|
|
6
6
|
onCancel: () => void;
|
|
7
7
|
onShow?: () => void;
|
|
8
8
|
onHide?: () => void;
|
|
9
|
+
labels?: Partial<Record<DialogLabel, string>>;
|
|
9
10
|
styles?: {
|
|
10
11
|
overlay?: CSSProperties;
|
|
11
12
|
container?: CSSProperties;
|
|
@@ -38,6 +39,7 @@ export declare class TooltipDialog {
|
|
|
38
39
|
constructor(options: TooltipDialogOptions);
|
|
39
40
|
show(): void;
|
|
40
41
|
hide(): void;
|
|
42
|
+
private word;
|
|
41
43
|
private createDialog;
|
|
42
44
|
private createInputGroup;
|
|
43
45
|
private createButtonGroup;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BlockClassNames, BlockStyles, EditorClassNames, EditorStyles } from '../../../types';
|
|
1
|
+
import { BlockClassNames, BlockStyles, DialogLabel, EditorClassNames, EditorStyles } from '../../../types';
|
|
2
2
|
type EditorStylesAndClassNames = {
|
|
3
3
|
classNames: EditorClassNames['tooltips'];
|
|
4
4
|
styles: EditorStyles['tooltips'];
|
|
@@ -11,7 +11,7 @@ export declare class TooltipInput {
|
|
|
11
11
|
static label: string;
|
|
12
12
|
static icon: string;
|
|
13
13
|
static shortcut: string;
|
|
14
|
-
static apply(range: Range, editorStylesAndClassNames: EditorStylesAndClassNames, blockStylesAndClassNames: BlockStylesAndClassNames): void;
|
|
14
|
+
static apply(range: Range, editorStylesAndClassNames: EditorStylesAndClassNames, blockStylesAndClassNames: BlockStylesAndClassNames, labels?: Partial<Record<DialogLabel, string>>): void;
|
|
15
15
|
static remove(range: Range): void;
|
|
16
16
|
static isActive(range: Range): boolean;
|
|
17
17
|
static initializeElements(container: HTMLElement, blockStylesAndClassNames: BlockStylesAndClassNames): void;
|
package/dist/types.d.ts
CHANGED
|
@@ -984,6 +984,7 @@ export type EditorConfig = {
|
|
|
984
984
|
allowJsonViewEditing?: boolean;
|
|
985
985
|
hasViewSwitcher?: boolean;
|
|
986
986
|
hasDocumentActions?: boolean;
|
|
987
|
+
onClearRequest?: () => Promise<boolean>;
|
|
987
988
|
margins?: BlockMargins;
|
|
988
989
|
styles?: EditorStyles;
|
|
989
990
|
classNames?: EditorClassNames;
|
|
@@ -1002,6 +1003,7 @@ export type EditorConfig = {
|
|
|
1002
1003
|
blockToolLabels?: Partial<Record<BlockToolType, string>>;
|
|
1003
1004
|
blockToolbarLabels?: Partial<Record<BlockToolbarLabel, string>>;
|
|
1004
1005
|
controlLabels?: Partial<Record<ControlLabel, string>>;
|
|
1006
|
+
dialogLabels?: Partial<Record<DialogLabel, string>>;
|
|
1005
1007
|
resolveLink?: (url: string) => Promise<Partial<EmbedData>>;
|
|
1006
1008
|
onEmbedAction?: (action: EmbedAction, blockId: string) => void;
|
|
1007
1009
|
disabledEmbedProviders?: readonly string[];
|
|
@@ -1022,6 +1024,8 @@ export declare const BLOCK_MENU_LABELS: readonly ["searchBlocks", "searchOperati
|
|
|
1022
1024
|
export type BlockMenuLabel = (typeof BLOCK_MENU_LABELS)[number];
|
|
1023
1025
|
export declare const CONTROL_LABELS: readonly ["editView", "previewView", "jsonView", "copyJson", "downloadJson", "clearEditor"];
|
|
1024
1026
|
export type ControlLabel = (typeof CONTROL_LABELS)[number];
|
|
1027
|
+
export declare const DIALOG_LABELS: readonly ["insertLink", "insertTooltip", "inlineStatus", "textField", "urlField", "tooltipField", "statusLabelField", "statusVariantField", "urlPlaceholder", "linkTextPlaceholder", "textPlaceholder", "tooltipPlaceholder", "statusLabelPlaceholder", "cancel", "apply", "statusInfo", "statusSuccess", "statusWarning", "statusError", "statusPlain"];
|
|
1028
|
+
export type DialogLabel = (typeof DIALOG_LABELS)[number];
|
|
1025
1029
|
export type BlockToolbarLabel = BlockToolbarOperation | BlockMenuLabel;
|
|
1026
1030
|
export declare const INLINE_REWRITE_ACTIONS: readonly ["improve", "shorten", "lengthen", "simplify", "fix_grammar"];
|
|
1027
1031
|
export type InlineRewriteAction = (typeof INLINE_REWRITE_ACTIONS)[number];
|
package/package.json
CHANGED