@clepit/core 0.7.0-beta.474 → 0.7.0-beta.505
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/core/editor/action-bar/css.d.ts +1 -1
- package/dist/core/editor/action-bar/index.d.ts +1 -0
- package/dist/core/managers/block/css.d.ts +1 -1
- package/dist/core/theme/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/tools/inline/link/dialog.d.ts +8 -9
- package/dist/tools/inline/link/index.d.ts +1 -0
- package/dist/tools/inline/status/dialog.d.ts +1 -0
- package/dist/tools/inline/tooltip/dialog.d.ts +1 -0
- package/dist/types.d.ts +2 -2
- package/dist/utils/dialogs/css.d.ts +1 -1
- package/dist/utils/icons.d.ts +0 -3
- package/package.json +1 -1
|
@@ -2,7 +2,10 @@ import { DialogLabel, EditorClassNames, EditorStyles } from '../../../types';
|
|
|
2
2
|
export interface LinkDialogOptions {
|
|
3
3
|
text: string;
|
|
4
4
|
url: string;
|
|
5
|
+
isLinked: boolean;
|
|
6
|
+
anchor?: DOMRect;
|
|
5
7
|
onConfirm: (text: string, url: string) => void;
|
|
8
|
+
onRemove: () => void;
|
|
6
9
|
onCancel: () => void;
|
|
7
10
|
styles?: EditorStyles['dialogs'];
|
|
8
11
|
classNames?: EditorClassNames['dialogs'];
|
|
@@ -10,22 +13,18 @@ export interface LinkDialogOptions {
|
|
|
10
13
|
}
|
|
11
14
|
export declare class LinkDialog {
|
|
12
15
|
private static isOpen;
|
|
13
|
-
private
|
|
14
|
-
private dialog;
|
|
15
|
-
private textInput;
|
|
16
|
+
private card;
|
|
16
17
|
private urlInput;
|
|
17
18
|
private options;
|
|
18
19
|
constructor(options: LinkDialogOptions);
|
|
19
20
|
show(): void;
|
|
20
21
|
hide(): void;
|
|
21
22
|
private word;
|
|
22
|
-
private
|
|
23
|
-
private
|
|
24
|
-
private
|
|
25
|
-
private bindEvents;
|
|
26
|
-
private handleKeyDown;
|
|
23
|
+
private createCard;
|
|
24
|
+
private applyUrl;
|
|
25
|
+
private dismiss;
|
|
27
26
|
private handleInputKeyDown;
|
|
28
|
-
private
|
|
27
|
+
private handleToggle;
|
|
29
28
|
private applyStyles;
|
|
30
29
|
private applyClassNames;
|
|
31
30
|
destroy(): void;
|
|
@@ -4,6 +4,7 @@ export declare class LinkInput {
|
|
|
4
4
|
static icon: string;
|
|
5
5
|
static shortcut: string;
|
|
6
6
|
static apply(range: Range, classNames: EditorClassNames['dialogs'], styles: EditorStyles['dialogs'], labels?: Partial<Record<DialogLabel, string>>): void;
|
|
7
|
+
private static announce;
|
|
7
8
|
static remove(range: Range): void;
|
|
8
9
|
private static findLinkElement;
|
|
9
10
|
static isActive(range: Range): boolean;
|
package/dist/types.d.ts
CHANGED
|
@@ -1034,9 +1034,9 @@ export declare const BLOCK_TOOLBAR_OPERATIONS: readonly ["convert", "moveUp", "m
|
|
|
1034
1034
|
export type BlockToolbarOperation = (typeof BLOCK_TOOLBAR_OPERATIONS)[number];
|
|
1035
1035
|
export declare const BLOCK_MENU_LABELS: readonly ["addBlock", "blockActions", "searchBlocks", "searchOperations", "searchConvertOptions", "searchLanguages", "searchThemes", "sectionBasic", "sectionMedia", "noBlockTypesFound", "noOperationsFound", "noConvertOptionsFound", "deleteLastBlock", "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", "tableInsertAbove", "tableInsertBelow", "tableInsertLeft", "tableInsertRight", "tableMoveLeft", "tableMoveRight", "tableRowActions", "tableColumnActions", "diagramTitleHint", "formulaTitleHint", "imageDropTitle", "imageDropAction", "imageDropFormats", "imageUploading", "imageUploadFailed", "imageInvalidType"];
|
|
1036
1036
|
export type BlockMenuLabel = (typeof BLOCK_MENU_LABELS)[number];
|
|
1037
|
-
export declare const CONTROL_LABELS: readonly ["editView", "previewView", "jsonView", "copyJson", "downloadJson", "clearEditor"];
|
|
1037
|
+
export declare const CONTROL_LABELS: readonly ["editView", "previewView", "jsonView", "copyJson", "downloadJson", "clearEditor", "viewSwitcher"];
|
|
1038
1038
|
export type ControlLabel = (typeof CONTROL_LABELS)[number];
|
|
1039
|
-
export declare const DIALOG_LABELS: readonly ["insertLink", "insertTooltip", "inlineStatus", "textField", "urlField", "tooltipField", "statusLabelField", "statusVariantField", "urlPlaceholder", "
|
|
1039
|
+
export declare const DIALOG_LABELS: readonly ["insertLink", "insertTooltip", "inlineStatus", "textField", "urlField", "tooltipField", "statusLabelField", "statusVariantField", "urlPlaceholder", "textPlaceholder", "tooltipPlaceholder", "statusLabelPlaceholder", "cancel", "apply", "removeLink", "statusInfo", "statusSuccess", "statusWarning", "statusError", "statusPlain"];
|
|
1040
1040
|
export type DialogLabel = (typeof DIALOG_LABELS)[number];
|
|
1041
1041
|
export type BlockToolbarLabel = BlockToolbarOperation | BlockMenuLabel;
|
|
1042
1042
|
export declare const INLINE_TOOLBAR_LABELS: readonly ["formatText", "textType", "text", "more", "bold", "italic", "underline", "strikethrough", "inlineCode", "link", "highlight", "status", "tooltip"];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const stylesKey = "clepit-dialogs-styles";
|
|
2
|
-
export declare const style = "\n
|
|
2
|
+
export declare const style = "\n.clepit-dialog-overlay {\n border: none;\n padding: 0;\n background: transparent;\n max-width: none;\n max-height: none;\n}\n\n.clepit-dialog-overlay[open] {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.clepit-dialog-overlay::backdrop {\n background: rgba(0, 0, 0, 0.5);\n}\n\n.clepit-dialog-overlay:not([open]) {\n position: fixed;\n inset: 0;\n background: rgba(0, 0, 0, 0.5);\n align-items: center;\n justify-content: center;\n z-index: 10000;\n}\n\n.clepit-dialog {\n position: relative;\n box-sizing: border-box;\n width: min(440px, calc(100vw - 32px));\n max-height: 80vh;\n overflow-y: auto;\n padding: 24px;\n border: 1px solid var(--clepit-border);\n border-radius: var(--clepit-radius-lg);\n background: var(--clepit-menu-bg);\n box-shadow: var(--clepit-menu-shadow);\n color: var(--clepit-text);\n font-family: inherit;\n transform: scale(0.98);\n opacity: 0;\n transition: transform 0.15s ease-out, opacity 0.15s ease-out;\n}\n\n.clepit-dialog:not(.clepit-dialog--hidden) {\n transform: scale(1);\n opacity: 1;\n}\n\n.clepit-dialog--hidden {\n transform: scale(0.98);\n opacity: 0;\n}\n\n.clepit-dialog-title {\n margin: 0 0 16px;\n font-size: 17px;\n font-weight: 600;\n line-height: 1.4;\n color: var(--clepit-text);\n}\n\n.clepit-dialog-group {\n margin-bottom: 16px;\n}\n\n.clepit-dialog-label {\n display: block;\n margin-bottom: 6px;\n font-size: 13px;\n font-weight: 500;\n color: var(--clepit-text);\n}\n\n.clepit-dialog-input {\n display: block;\n width: 100%;\n height: 36px;\n margin-bottom: 16px;\n padding: 0 10px;\n border: 1px solid var(--clepit-border);\n border-radius: var(--clepit-radius-md);\n background: var(--clepit-bg);\n color: var(--clepit-text);\n font: inherit;\n font-size: 14px;\n box-sizing: border-box;\n}\n\n.clepit-dialog-group .clepit-dialog-input {\n margin-bottom: 0;\n}\n\n.clepit-dialog-input:focus-visible {\n outline: 2px solid var(--clepit-focus-ring);\n outline-offset: -1px;\n border-color: transparent;\n}\n\n.clepit-dialog-input::placeholder {\n color: var(--clepit-text-subtle);\n}\n\n.clepit-dialog-buttons {\n display: flex;\n gap: 8px;\n justify-content: flex-end;\n margin-top: 24px;\n}\n\n.clepit-dialog-button {\n height: 30px;\n padding: 0 14px;\n border: 0;\n border-radius: var(--clepit-radius-md);\n font: inherit;\n font-size: 13.5px;\n font-weight: 500;\n white-space: nowrap;\n cursor: pointer;\n transition: background-color 0.15s ease;\n}\n\n.clepit-dialog-button:focus-visible {\n outline: 2px solid var(--clepit-focus-ring);\n outline-offset: 1px;\n}\n\n.clepit-dialog-button--cancel {\n background: transparent;\n color: var(--clepit-text-muted);\n}\n\n.clepit-dialog-button--cancel:hover {\n background: var(--clepit-hover-bg);\n color: var(--clepit-text);\n}\n\n.clepit-dialog-button--save {\n background: var(--clepit-primary);\n color: var(--clepit-on-primary);\n}\n\n.clepit-dialog-button--save:hover {\n background: var(--clepit-primary-hover);\n}\n\n.clepit-dialog-button--save:disabled {\n background: var(--clepit-text-subtle);\n cursor: not-allowed;\n}\n\n@media (pointer: coarse) {\n .clepit-dialog-input,\n .clepit-dialog-button {\n height: 44px;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .clepit-dialog,\n .clepit-dialog-button {\n transition: none;\n }\n}\n";
|
|
3
3
|
//# sourceMappingURL=css.d.ts.map
|
package/dist/utils/icons.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
export declare const EDIT_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M12 20h9\"/><path d=\"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z\"/></svg>";
|
|
2
|
-
export declare const PREVIEW_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/></svg>";
|
|
3
|
-
export declare const JSON_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z\"/><polyline points=\"14,2 14,8 20,8\"/><line x1=\"16\" y1=\"13\" x2=\"8\" y2=\"13\"/><line x1=\"16\" y1=\"17\" x2=\"8\" y2=\"17\"/><polyline points=\"10,9 9,9 8,9\"/></svg>";
|
|
4
1
|
export declare const COPY_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\"/><path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"/></svg>";
|
|
5
2
|
export declare const DOWNLOAD_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\"/><polyline points=\"7,10 12,15 17,10\"/><line x1=\"12\" y1=\"15\" x2=\"12\" y2=\"3\"/></svg>";
|
|
6
3
|
export declare const CLEAR_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M3 6h18\"/><path d=\"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6\"/><path d=\"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2\"/><line x1=\"10\" y1=\"11\" x2=\"10\" y2=\"17\"/><line x1=\"14\" y1=\"11\" x2=\"14\" y2=\"17\"/></svg>";
|
package/package.json
CHANGED