@clepit/core 0.6.0-beta.396 → 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/core/labels.d.ts +3 -0
- package/dist/core/managers/block/css.d.ts +1 -1
- package/dist/core/managers/block/index.d.ts +1 -0
- package/dist/core/store.d.ts +1 -0
- package/dist/core/toolbars/block/index.d.ts +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/tools/block/openapi/input.d.ts +1 -1
- package/dist/tools/block/typeset/input.d.ts +2 -2
- 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 +10 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { InputConfig, OpenApiData } from '../../../types';
|
|
|
2
2
|
export declare class OpenApiInput {
|
|
3
3
|
static placeholder: string;
|
|
4
4
|
private static dataMap;
|
|
5
|
-
static render(
|
|
5
|
+
static render(containerId: string, data?: OpenApiData, _config?: InputConfig<'openapi'>): HTMLElement;
|
|
6
6
|
static save(element: HTMLElement): OpenApiData;
|
|
7
7
|
static isEmpty(blockElement: HTMLElement): boolean;
|
|
8
8
|
static isEmptyData(data: OpenApiData): boolean;
|
|
@@ -2,7 +2,7 @@ import { InputConfig, TypesetData } from '../../../types';
|
|
|
2
2
|
export declare class LatexInput {
|
|
3
3
|
static placeholder: string;
|
|
4
4
|
static save(element: HTMLElement): TypesetData;
|
|
5
|
-
static render(
|
|
5
|
+
static render(containerId: string, data?: TypesetData, config?: InputConfig<'latex'>): HTMLElement;
|
|
6
6
|
static isEmpty(blockElement: HTMLElement): boolean;
|
|
7
7
|
static isEmptyData(data: TypesetData): boolean;
|
|
8
8
|
static destroy(_containerId: string): void;
|
|
@@ -10,7 +10,7 @@ export declare class LatexInput {
|
|
|
10
10
|
export declare class MermaidInput {
|
|
11
11
|
static placeholder: string;
|
|
12
12
|
static save(element: HTMLElement): TypesetData;
|
|
13
|
-
static render(
|
|
13
|
+
static render(containerId: string, data?: TypesetData, config?: InputConfig<'mermaid'>): HTMLElement;
|
|
14
14
|
static isEmpty(blockElement: HTMLElement): boolean;
|
|
15
15
|
static isEmptyData(data: TypesetData): boolean;
|
|
16
16
|
static destroy(_containerId: string): void;
|
|
@@ -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
|
@@ -982,6 +982,9 @@ export type EditorConfig = {
|
|
|
982
982
|
initialData?: EditorData;
|
|
983
983
|
initialView?: EditorView;
|
|
984
984
|
allowJsonViewEditing?: boolean;
|
|
985
|
+
hasViewSwitcher?: boolean;
|
|
986
|
+
hasDocumentActions?: boolean;
|
|
987
|
+
onClearRequest?: () => Promise<boolean>;
|
|
985
988
|
margins?: BlockMargins;
|
|
986
989
|
styles?: EditorStyles;
|
|
987
990
|
classNames?: EditorClassNames;
|
|
@@ -999,6 +1002,8 @@ export type EditorConfig = {
|
|
|
999
1002
|
inlineRewriteTooltip?: string;
|
|
1000
1003
|
blockToolLabels?: Partial<Record<BlockToolType, string>>;
|
|
1001
1004
|
blockToolbarLabels?: Partial<Record<BlockToolbarLabel, string>>;
|
|
1005
|
+
controlLabels?: Partial<Record<ControlLabel, string>>;
|
|
1006
|
+
dialogLabels?: Partial<Record<DialogLabel, string>>;
|
|
1002
1007
|
resolveLink?: (url: string) => Promise<Partial<EmbedData>>;
|
|
1003
1008
|
onEmbedAction?: (action: EmbedAction, blockId: string) => void;
|
|
1004
1009
|
disabledEmbedProviders?: readonly string[];
|
|
@@ -1015,8 +1020,12 @@ export type EditorConfig = {
|
|
|
1015
1020
|
};
|
|
1016
1021
|
export declare const BLOCK_TOOLBAR_OPERATIONS: readonly ["convert", "moveUp", "moveDown", "delete"];
|
|
1017
1022
|
export type BlockToolbarOperation = (typeof BLOCK_TOOLBAR_OPERATIONS)[number];
|
|
1018
|
-
export declare const BLOCK_MENU_LABELS: readonly ["searchBlocks", "searchOperations", "searchConvertOptions", "searchLanguages", "searchThemes", "noBlockTypesFound", "noOperationsFound", "noConvertOptionsFound", "alignLeft", "alignCenter", "alignRight", "codeLanguage", "codeTheme", "headingH1", "headingH2", "headingH3", "headingH4", "headingH5", "headingH6", "listUnordered", "listOrdered", "variantInfo", "variantWarning", "variantError", "variantSuccess", "variantPlain", "delimiterLine", "delimiterStars", "embedShowLive", "embedShowCard", "embedShowLink", "embedCopyLink", "embedShowChip"];
|
|
1023
|
+
export declare const BLOCK_MENU_LABELS: readonly ["searchBlocks", "searchOperations", "searchConvertOptions", "searchLanguages", "searchThemes", "noBlockTypesFound", "noOperationsFound", "noConvertOptionsFound", "alignLeft", "alignCenter", "alignRight", "codeLanguage", "codeTheme", "headingH1", "headingH2", "headingH3", "headingH4", "headingH5", "headingH6", "listUnordered", "listOrdered", "variantInfo", "variantWarning", "variantError", "variantSuccess", "variantPlain", "delimiterLine", "delimiterStars", "embedShowLive", "embedShowCard", "embedShowLink", "embedCopyLink", "embedShowChip", "alertTextHint", "checklistItemHint", "codeHint", "collapsibleTitleHint", "glanceLabelHint", "glanceValueHint", "headerHint", "listItemHint", "mediaCaptionHint", "openApiSourceHint", "quoteAuthorHint", "quoteBodyHint", "tableCaptionHint", "tableCellHint", "tableHeaderHint", "diagramTitleHint", "formulaTitleHint"];
|
|
1019
1024
|
export type BlockMenuLabel = (typeof BLOCK_MENU_LABELS)[number];
|
|
1025
|
+
export declare const CONTROL_LABELS: readonly ["editView", "previewView", "jsonView", "copyJson", "downloadJson", "clearEditor"];
|
|
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];
|
|
1020
1029
|
export type BlockToolbarLabel = BlockToolbarOperation | BlockMenuLabel;
|
|
1021
1030
|
export declare const INLINE_REWRITE_ACTIONS: readonly ["improve", "shorten", "lengthen", "simplify", "fix_grammar"];
|
|
1022
1031
|
export type InlineRewriteAction = (typeof INLINE_REWRITE_ACTIONS)[number];
|
package/package.json
CHANGED