voiptime-components 1.21.81 → 1.21.83
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/components/editor/VEditor.d.ts +1 -1
- package/dist/components/editor/VEditor.d.ts.map +1 -1
- package/dist/components/editor/constants.d.ts +2 -3
- package/dist/components/editor/constants.d.ts.map +1 -1
- package/dist/components/editor/helpers.d.ts +9 -2
- package/dist/components/editor/helpers.d.ts.map +1 -1
- package/dist/components/editor/useEditorCommands.d.ts +11 -0
- package/dist/components/editor/useEditorCommands.d.ts.map +1 -0
- package/dist/components/editor/useEditorDialogs.d.ts +31 -0
- package/dist/components/editor/useEditorDialogs.d.ts.map +1 -0
- package/dist/components/editor/useEditorSelection.d.ts +7 -0
- package/dist/components/editor/useEditorSelection.d.ts.map +1 -0
- package/dist/components/editor/useEditorToolbar.d.ts +36 -0
- package/dist/components/editor/useEditorToolbar.d.ts.map +1 -0
- package/dist/icons/editor/{TextUndelineIcon.d.ts → TextUnderlineIcon.d.ts} +1 -1
- package/dist/icons/editor/TextUnderlineIcon.d.ts.map +1 -0
- package/dist/icons/index.d.ts +1 -1
- package/dist/index.cjs.js +2 -2
- package/dist/index.css +1 -1
- package/dist/index.es.js +5302 -5089
- package/dist/index.umd.js +2 -2
- package/dist/locales/translations.d.ts.map +1 -1
- package/dist/locales/types.d.ts +2 -0
- package/dist/locales/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/assets/_page.scss +5 -0
- package/dist/icons/editor/TextUndelineIcon.d.ts.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VtEditorProps,
|
|
1
|
+
import { VtEditorProps, VtEditorValidationResult, VtEditorToolbarGroup } from './types';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
3
|
declare const _default: DefineComponent<VtEditorProps, {
|
|
4
4
|
focus(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VEditor.vue.d.ts","sourceRoot":"","sources":["../../../src/components/editor/VEditor.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"VEditor.vue.d.ts","sourceRoot":"","sources":["../../../src/components/editor/VEditor.vue"],"names":[],"mappings":";AAugBE,OAAO,KAAK,EAAkC,aAAa,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA43BzG,wBASG"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const TOOLBAR_ICONS: Record<string, string>;
|
|
1
|
+
import { IconName } from '../../icons';
|
|
2
|
+
export declare const TOOLBAR_ICONS: Record<string, IconName>;
|
|
4
3
|
export declare const HEADING_GROUPS: {
|
|
5
4
|
value: string;
|
|
6
5
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/editor/constants.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/editor/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAuBlD,CAAC;AAEF,eAAO,MAAM,cAAc;;;GAM1B,CAAC;AAEF,eAAO,MAAM,WAAW;;;GAMvB,CAAC"}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Очищає HTML від
|
|
2
|
+
* Очищає HTML від XSS-загроз зберігаючи весь валідний редакторський розмітки.
|
|
3
|
+
*
|
|
4
|
+
* Захищає від:
|
|
5
|
+
* - script/iframe/object ін'єкцій
|
|
6
|
+
* - on* обробників подій
|
|
7
|
+
* - javascript: / vbscript: в href та src
|
|
8
|
+
* - CSS expression() та -moz-binding
|
|
9
|
+
* - HTML-коментарів з вбудованим кодом
|
|
3
10
|
*/
|
|
4
11
|
export declare function customSanitizeHtml(html: string): string;
|
|
5
12
|
/**
|
|
6
|
-
* Видаляє
|
|
13
|
+
* Видаляє всі HTML теги, повертає чистий текст.
|
|
7
14
|
*/
|
|
8
15
|
export declare function stripHtml(html: string): string;
|
|
9
16
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/components/editor/helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/components/editor/helpers.ts"],"names":[],"mappings":"AA6MA;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAcvD;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAI9C"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
export declare function useEditorCommands(editorRef: Ref<HTMLDivElement | null>, onSync: (html?: string) => void): {
|
|
3
|
+
exec: (command: string, value?: string) => void;
|
|
4
|
+
isActive: (command: string) => boolean;
|
|
5
|
+
applyBlock: (tag: string) => void;
|
|
6
|
+
applyFont: (fontName: string) => void;
|
|
7
|
+
applyForeColor: (color: string) => void;
|
|
8
|
+
applyBackColor: (color: string) => void;
|
|
9
|
+
handleIndent: (type: "indent" | "outdent") => void;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=useEditorCommands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEditorCommands.d.ts","sourceRoot":"","sources":["../../../src/components/editor/useEditorCommands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAE/B,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,GAAG,CAAC,cAAc,GAAG,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI;oBAC/E,MAAM,UAAU,MAAM,KAAG,IAAI;wBAOzB,MAAM,KAAG,OAAO;sBAQlB,MAAM,KAAG,IAAI;0BAOT,MAAM,KAAG,IAAI;4BAOX,MAAM,KAAG,IAAI;4BAOb,MAAM,KAAG,IAAI;yBAOhB,QAAQ,GAAG,SAAS,KAAG,IAAI;EAoBxD"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { VtEditorLinkState, VtEditorImageState } from './types';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
export declare function useEditorDialogs(execInsertHtml: (html: string) => void, onSync: () => void): {
|
|
4
|
+
linkState: Ref<{
|
|
5
|
+
visible: boolean;
|
|
6
|
+
url: string;
|
|
7
|
+
text: string;
|
|
8
|
+
openInNewTab: boolean;
|
|
9
|
+
}, VtEditorLinkState | {
|
|
10
|
+
visible: boolean;
|
|
11
|
+
url: string;
|
|
12
|
+
text: string;
|
|
13
|
+
openInNewTab: boolean;
|
|
14
|
+
}>;
|
|
15
|
+
openLinkDialog: () => void;
|
|
16
|
+
confirmLink: () => void;
|
|
17
|
+
cancelLink: () => void;
|
|
18
|
+
imageState: Ref<{
|
|
19
|
+
visible: boolean;
|
|
20
|
+
url: string;
|
|
21
|
+
alt: string;
|
|
22
|
+
}, VtEditorImageState | {
|
|
23
|
+
visible: boolean;
|
|
24
|
+
url: string;
|
|
25
|
+
alt: string;
|
|
26
|
+
}>;
|
|
27
|
+
openImageDialog: () => void;
|
|
28
|
+
confirmImage: () => void;
|
|
29
|
+
cancelImage: () => void;
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=useEditorDialogs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEditorDialogs.d.ts","sourceRoot":"","sources":["../../../src/components/editor/useEditorDialogs.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAGrE,wBAAgB,gBAAgB,CAAC,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,EAAE,MAAM,EAAE,MAAM,IAAI;;;;;;;;;;;;0BAY9D,IAAI;uBAaP,IAAI;sBA0BL,IAAI;;;;;;;;;;2BAaC,IAAI;wBAKP,IAAI;uBAWL,IAAI;EAe7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEditorSelection.d.ts","sourceRoot":"","sources":["../../../src/components/editor/useEditorSelection.ts"],"names":[],"mappings":"AAAA,wBAAgB,kBAAkB;yBAGN,IAAI;4BAOD,IAAI;2BAQL,IAAI;yBAIN,KAAK,GAAG,IAAI;EAKvC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { VtEditorToolbarGroup } from './types';
|
|
2
|
+
import { IconName } from '../../icons';
|
|
3
|
+
import { ComputedRef, Ref } from 'vue';
|
|
4
|
+
export interface ToolbarItem {
|
|
5
|
+
type: 'button' | 'select' | 'separator';
|
|
6
|
+
id?: string;
|
|
7
|
+
tooltip?: string;
|
|
8
|
+
iconName?: IconName;
|
|
9
|
+
action?: () => void;
|
|
10
|
+
activeCheck?: () => boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function useEditorToolbar(groups: () => VtEditorToolbarGroup[], commands: {
|
|
13
|
+
exec: (command: string, value?: string) => void;
|
|
14
|
+
isActive: (command: string) => boolean;
|
|
15
|
+
applyBlock: (tag: string) => void;
|
|
16
|
+
applyFont: (fontName: string) => void;
|
|
17
|
+
handleIndent: (type: 'indent' | 'outdent') => void;
|
|
18
|
+
openLinkDialog: () => void;
|
|
19
|
+
openImageDialog: () => void;
|
|
20
|
+
toggleHtmlMode: () => void;
|
|
21
|
+
isHtmlMode: () => boolean;
|
|
22
|
+
}): {
|
|
23
|
+
toolbarItems: ComputedRef<(ToolbarItem | null)[]>;
|
|
24
|
+
selectionTick: Ref<number, number>;
|
|
25
|
+
onSelectionChange: () => void;
|
|
26
|
+
getItemActive: (item: ToolbarItem) => boolean;
|
|
27
|
+
HEADING_GROUPS: {
|
|
28
|
+
value: string;
|
|
29
|
+
label: string;
|
|
30
|
+
}[];
|
|
31
|
+
FONT_GROUPS: {
|
|
32
|
+
value: string;
|
|
33
|
+
label: string;
|
|
34
|
+
}[];
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=useEditorToolbar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEditorToolbar.d.ts","sourceRoot":"","sources":["../../../src/components/editor/useEditorToolbar.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAIpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,WAAW,CAAC;IACxC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC;CAC7B;AAED,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,oBAAoB,EAAE,EACpC,QAAQ,EAAE;IACR,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IACvC,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,YAAY,EAAE,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,KAAK,IAAI,CAAC;IACnD,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,OAAO,CAAC;CAC3B;;;6BAK6B,IAAI;0BAIL,WAAW,KAAG,OAAO;;;;;;;;;EAwOnD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
2
|
declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
3
3
|
export default _default;
|
|
4
|
-
//# sourceMappingURL=
|
|
4
|
+
//# sourceMappingURL=TextUnderlineIcon.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextUnderlineIcon.vue.d.ts","sourceRoot":"","sources":["../../../src/icons/editor/TextUnderlineIcon.vue"],"names":[],"mappings":";AAWA;;AAsDA,wBAKG"}
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -146,7 +146,7 @@ export declare const icons: {
|
|
|
146
146
|
readonly textBold: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
147
147
|
readonly textItalic: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
148
148
|
readonly textStrikethrough: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
149
|
-
readonly
|
|
149
|
+
readonly textUnderline: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
150
150
|
readonly undo: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
151
151
|
readonly unorderedList: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
152
152
|
readonly ellipseGreen: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|