@fastkit/vui-wysiwyg 0.0.1
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/LICENSE +21 -0
- package/README.md +1 -0
- package/dist/pm/changeset.d.ts +1 -0
- package/dist/pm/changeset.mjs +3 -0
- package/dist/pm/changeset.mjs.map +1 -0
- package/dist/pm/collab.d.ts +1 -0
- package/dist/pm/collab.mjs +3 -0
- package/dist/pm/collab.mjs.map +1 -0
- package/dist/pm/commands.d.ts +1 -0
- package/dist/pm/commands.mjs +3 -0
- package/dist/pm/commands.mjs.map +1 -0
- package/dist/pm/dropcursor.d.ts +1 -0
- package/dist/pm/dropcursor.mjs +3 -0
- package/dist/pm/dropcursor.mjs.map +1 -0
- package/dist/pm/gapcursor.d.ts +1 -0
- package/dist/pm/gapcursor.mjs +3 -0
- package/dist/pm/gapcursor.mjs.map +1 -0
- package/dist/pm/history.d.ts +1 -0
- package/dist/pm/history.mjs +3 -0
- package/dist/pm/history.mjs.map +1 -0
- package/dist/pm/inputrules.d.ts +1 -0
- package/dist/pm/inputrules.mjs +3 -0
- package/dist/pm/inputrules.mjs.map +1 -0
- package/dist/pm/keymap.d.ts +1 -0
- package/dist/pm/keymap.mjs +3 -0
- package/dist/pm/keymap.mjs.map +1 -0
- package/dist/pm/markdown.d.ts +1 -0
- package/dist/pm/markdown.mjs +3 -0
- package/dist/pm/markdown.mjs.map +1 -0
- package/dist/pm/menu.d.ts +1 -0
- package/dist/pm/menu.mjs +3 -0
- package/dist/pm/menu.mjs.map +1 -0
- package/dist/pm/model.d.ts +1 -0
- package/dist/pm/model.mjs +3 -0
- package/dist/pm/model.mjs.map +1 -0
- package/dist/pm/schema-basic.d.ts +1 -0
- package/dist/pm/schema-basic.mjs +3 -0
- package/dist/pm/schema-basic.mjs.map +1 -0
- package/dist/pm/schema-list.d.ts +1 -0
- package/dist/pm/schema-list.mjs +3 -0
- package/dist/pm/schema-list.mjs.map +1 -0
- package/dist/pm/state.d.ts +1 -0
- package/dist/pm/state.mjs +3 -0
- package/dist/pm/state.mjs.map +1 -0
- package/dist/pm/tables.d.ts +1 -0
- package/dist/pm/tables.mjs +3 -0
- package/dist/pm/tables.mjs.map +1 -0
- package/dist/pm/trailing-node.d.ts +1 -0
- package/dist/pm/trailing-node.mjs +3 -0
- package/dist/pm/trailing-node.mjs.map +1 -0
- package/dist/pm/transform.d.ts +1 -0
- package/dist/pm/transform.mjs +3 -0
- package/dist/pm/transform.mjs.map +1 -0
- package/dist/pm/view.d.ts +1 -0
- package/dist/pm/view.mjs +3 -0
- package/dist/pm/view.mjs.map +1 -0
- package/dist/tiptap/core.d.ts +1 -0
- package/dist/tiptap/core.mjs +3 -0
- package/dist/tiptap/core.mjs.map +1 -0
- package/dist/tiptap/extensions/bold.d.ts +1 -0
- package/dist/tiptap/extensions/bold.mjs +3 -0
- package/dist/tiptap/extensions/bold.mjs.map +1 -0
- package/dist/tiptap/extensions/bullet-list.d.ts +1 -0
- package/dist/tiptap/extensions/bullet-list.mjs +3 -0
- package/dist/tiptap/extensions/bullet-list.mjs.map +1 -0
- package/dist/tiptap/extensions/history.d.ts +1 -0
- package/dist/tiptap/extensions/history.mjs +3 -0
- package/dist/tiptap/extensions/history.mjs.map +1 -0
- package/dist/tiptap/extensions/italic.d.ts +1 -0
- package/dist/tiptap/extensions/italic.mjs +3 -0
- package/dist/tiptap/extensions/italic.mjs.map +1 -0
- package/dist/tiptap/extensions/link.d.ts +1 -0
- package/dist/tiptap/extensions/link.mjs +3 -0
- package/dist/tiptap/extensions/link.mjs.map +1 -0
- package/dist/tiptap/extensions/ordered-list.d.ts +1 -0
- package/dist/tiptap/extensions/ordered-list.mjs +3 -0
- package/dist/tiptap/extensions/ordered-list.mjs.map +1 -0
- package/dist/tiptap/extensions/text-style.d.ts +1 -0
- package/dist/tiptap/extensions/text-style.mjs +3 -0
- package/dist/tiptap/extensions/text-style.mjs.map +1 -0
- package/dist/tiptap/extensions/underline.d.ts +1 -0
- package/dist/tiptap/extensions/underline.mjs +3 -0
- package/dist/tiptap/extensions/underline.mjs.map +1 -0
- package/dist/vui-wysiwyg.css +271 -0
- package/dist/vui-wysiwyg.css.map +1 -0
- package/dist/vui-wysiwyg.d.ts +415 -0
- package/dist/vui-wysiwyg.mjs +924 -0
- package/dist/vui-wysiwyg.mjs.map +1 -0
- package/package.json +312 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/extensions/linter/Linter.scss","../src/tools/color.scss","../src/components/VWysiwygEditor/VWysiwygEditor.scss"],"sourcesContent":["@layer vui {\n .v-linter {\n &__problem {\n margin-bottom: -1px;\n cursor: help;\n background: var(--deep-color);\n border-bottom: 1px solid var(--main-color);\n }\n\n &__issue-icon {\n position: absolute;\n right: 2px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 1.2em;\n height: 1.2em;\n margin-top: 0.2em;\n // padding-left: 0.5px;\n font-family: times, georgia, serif;\n font-size: 15px;\n font-weight: 700;\n line-height: 1;\n color: var(--text-color);\n text-align: center;\n cursor: pointer;\n background: var(--main-color);\n border-radius: 100px;\n\n &::before {\n content: '!';\n }\n }\n\n &__issue-menu-wrapper {\n position: relative;\n display: inline-block;\n width: 0px;\n height: 1em;\n overflow: visible;\n }\n\n &__issue-menu {\n font-size: 87.5%;\n // font-size: 12px;\n line-height: 1.5;\n\n .v-dialog__body {\n padding: 0;\n font-size: inherit;\n }\n\n &__message {\n padding: 8px;\n }\n\n &__fixers {\n position: relative;\n padding: 4px 0;\n // padding: 8px;\n // border-top: solid 1px var(--divider-color);\n &::before {\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n display: block;\n height: 1px;\n content: '';\n background: currentColor;\n opacity: 0.5;\n }\n }\n\n &__fixer {\n &__button {\n position: relative;\n display: block;\n width: 100%;\n padding: 8px;\n font: inherit;\n font-size: 12px;\n // margin-top: 8px;\n // color: var(--palette-link);\n text-align: left;\n // text-decoration: underline;\n cursor: pointer;\n background: transparent;\n border: 0;\n outline: 0;\n appearance: none;\n\n &::before {\n position: absolute;\n inset: 0;\n display: block;\n content: '';\n background: currentColor;\n opacity: 0;\n transition: 0.15s;\n }\n\n &:hover,\n &:focus {\n &::before {\n opacity: 0.1;\n }\n }\n\n &__message {\n position: relative;\n }\n }\n }\n // pointer-events: none;\n // background: #fff;\n // border-radius: 4px;\n // opacity: 0;\n // transition: opacity 0.15s;\n\n // &--active {\n // pointer-events: auto;\n // opacity: 1;\n // }\n\n &__fix {\n display: inline;\n margin-top: 8px;\n color: var(--palette-link);\n text-decoration: underline;\n cursor: pointer;\n background: transparent;\n border: 0;\n outline: 0;\n appearance: none;\n }\n }\n }\n}\n",":root {\n --v-wysiwyg-color-tool: 30px;\n}\n\n@layer vui {\n .v-wysiwyg-color-tool {\n &__button {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n vertical-align: bottom;\n\n &__bar {\n position: absolute;\n right: 0;\n bottom: 0;\n left: 0;\n display: block;\n height: 2px;\n background: currentColor;\n }\n }\n\n &__menu {\n .v-dialog__content {\n min-width: 0;\n }\n\n .v-dialog__body {\n padding: 2px;\n }\n }\n\n &__items {\n --item-size: var(--v-wysiwyg-color-tool);\n\n display: inline-flex;\n flex-wrap: wrap;\n align-items: center;\n max-width: calc(var(--item-size) * 5);\n vertical-align: bottom;\n\n &--with-label {\n display: flex;\n flex-direction: column;\n // flex-wrap: nowrap;\n align-items: flex-start;\n max-width: none;\n padding: 2px;\n }\n }\n\n &__item {\n --focus-offset: calc(var(--item-size) * 0.05);\n\n position: relative;\n display: flex;\n flex-basis: var(--item-size);\n align-items: center;\n width: var(--item-size);\n height: var(--item-size);\n padding: 0;\n margin: 0;\n // margin: 2px;\n cursor: pointer;\n background: transparent;\n border: 0;\n border-radius: 0;\n outline: 0;\n appearance: none;\n\n &__color {\n position: relative;\n flex: 0 0 var(--item-size);\n width: var(--item-size);\n height: var(--item-size);\n\n &::before {\n position: absolute;\n inset: 0;\n display: block;\n content: '';\n background: currentColor;\n border: solid 1px transparent;\n transition: all 0.15s;\n }\n }\n\n &__name {\n position: relative;\n padding: 0 8px;\n font-size: 12px;\n white-space: nowrap;\n }\n\n &:hover &__color,\n &:focus &__color {\n &::before {\n inset: var(--focus-offset) var(--focus-offset) var(--focus-offset)\n var(--focus-offset);\n border-color: rgba(0, 0, 0, 0.1);\n }\n }\n }\n\n &__items--with-label &__item {\n flex-basis: auto;\n width: auto;\n width: 100%;\n\n &::before {\n position: absolute;\n inset: 0;\n display: block;\n content: '';\n background: currentColor;\n opacity: 0;\n transition: opacity 0.15s;\n }\n\n &:hover,\n &:focus {\n &::before {\n opacity: 0.1;\n }\n }\n\n & + .v-wysiwyg-color-tool__item {\n margin-top: 2px;\n }\n }\n }\n}\n","// @use '../../styles/core.scss';\n\n@layer vui {\n .v-wysiwyg-editor {\n &--sm {\n --min-height: var(--wysiwyg-min-height-sm);\n --max-height: var(--wysiwyg-max-height-sm);\n }\n\n &--md {\n --min-height: var(--wysiwyg-min-height-md);\n --max-height: var(--wysiwyg-max-height-md);\n }\n\n &--lg {\n --min-height: var(--wysiwyg-min-height-lg);\n --max-height: var(--wysiwyg-max-height-lg);\n }\n\n &__wrapper {\n position: relative;\n }\n\n .v-control-field__body {\n width: 100%;\n }\n\n &__floating-toolbar {\n position: absolute;\n right: 0;\n bottom: 100%;\n z-index: 1;\n }\n\n &__body {\n position: relative;\n width: 100%;\n max-height: var(--max-height);\n // max-height: 200px;\n overflow: auto;\n }\n\n &__input {\n cursor: text;\n\n &__element {\n width: 100%;\n min-width: 0;\n padding: 8px 0;\n margin: 0;\n }\n\n &__prose {\n width: 100%;\n min-height: var(--min-height);\n outline: none;\n }\n }\n\n &--disabled-min-heihgt &__input__prose {\n min-height: 0;\n }\n\n &--disabled-max-heihgt &__body {\n max-height: none;\n }\n }\n}\n"],"mappings":";AAAA;AAEI;AACE;AACA;AACA;AACA;;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACE;;AAIJ;AACE;AACA;AACA;AACA;AACA;;AAGF;AACE;AAEA;;AAEA;AACE;AACA;;AAGF;AACE;;AAGF;AACE;AACA;;AAGA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKF;AACE;AACA;AACA;AACA;AACA;AACA;AAGA;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA;;AACE;;AAIJ;AACE;;AAeN;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACtIR;AACE;;AAGF;AAEI;AACE;AACA;AACA;AACA;AACA;;AAEA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;;AAKF;AACE;;AAGF;AACE;;AAIJ;AACE;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACE;AACA;AAEA;AACA;AACA;;AAIJ;AACE;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACE;AACA;AACA;AACA;;AAEA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;;AAIJ;AACE;AACA;AACA;AACA;;AAKA;;AACE;AAEA;;AAKN;AACE;AACA;AACA;;AAEA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA;;AACE;;AAIJ;AACE;;;;;AC/HR;AAEI;AACE;AACA;;AAGF;AACE;AACA;;AAGF;AACE;AACA;;AAGF;AACE;;AAGF;AACE;;AAGF;AACE;AACA;AACA;AACA;;AAGF;AACE;AACA;AACA;AAEA;;AAGF;AACE;;AAEA;AACE;AACA;AACA;AACA;;AAGF;AACE;AACA;AACA;;AAIJ;AACE;;AAGF;AACE;;;","names":[]}
|
|
@@ -0,0 +1,415 @@
|
|
|
1
|
+
import * as _fastkit_vui from '@fastkit/vui';
|
|
2
|
+
import { VuiService, IconName, FormControlSlots, InputBoxSlots } from '@fastkit/vui';
|
|
3
|
+
import * as _tiptap_vue_3 from '@tiptap/vue-3';
|
|
4
|
+
import { EditorOptions, Editor, Extension, Node, Mark, AnyExtension, Extensions, FocusPosition } from '@tiptap/vue-3';
|
|
5
|
+
import * as vue from 'vue';
|
|
6
|
+
import { VNodeChild, PropType } from 'vue';
|
|
7
|
+
import { Node as Node$1 } from '@tiptap/pm/model';
|
|
8
|
+
import { EditorView } from '@tiptap/pm/view';
|
|
9
|
+
import { BulletListOptions } from '@tiptap/extension-bullet-list';
|
|
10
|
+
import { BoldOptions } from '@tiptap/extension-bold';
|
|
11
|
+
import { ItalicOptions } from '@tiptap/extension-italic';
|
|
12
|
+
import { UnderlineOptions } from '@tiptap/extension-underline';
|
|
13
|
+
import { HistoryOptions } from '@tiptap/extension-history';
|
|
14
|
+
import { LinkOptions } from '@tiptap/extension-link';
|
|
15
|
+
import { OrderedListOptions } from '@tiptap/extension-ordered-list';
|
|
16
|
+
import * as _fastkit_vue_form_control__ from '@fastkit/vue-form-control/.';
|
|
17
|
+
import * as _fastkit_vue_utils__ from '@fastkit/vue-utils/.';
|
|
18
|
+
|
|
19
|
+
declare const EDITOR_EVENTS: readonly ["beforeCreate", "create", "update", "selectionUpdate", "transaction", "focus", "blur", "destroy"];
|
|
20
|
+
type PrefixedEventName<S extends string> = `on${Capitalize<S>}`;
|
|
21
|
+
type WysiwygEditorEvent = (typeof EDITOR_EVENTS)[number];
|
|
22
|
+
type WysiwygEditorPrefixedEvent = PrefixedEventName<WysiwygEditorEvent>;
|
|
23
|
+
interface WysiwygEditorEventsOptions extends Partial<Pick<EditorOptions, WysiwygEditorPrefixedEvent>> {
|
|
24
|
+
}
|
|
25
|
+
type WysiwygEditorEventsBucket = {
|
|
26
|
+
[EV in WysiwygEditorEvent]: NonNullable<WysiwygEditorEventsOptions[PrefixedEventName<EV>]>[];
|
|
27
|
+
};
|
|
28
|
+
declare class WysiwygEditorInitializeContext {
|
|
29
|
+
readonly listeners: WysiwygEditorEventsBucket;
|
|
30
|
+
private readonly _vui;
|
|
31
|
+
get vui(): VuiService;
|
|
32
|
+
constructor(vuiGetter: () => VuiService, opts?: WysiwygEditorEventsOptions);
|
|
33
|
+
on<EV extends WysiwygEditorEvent>(ev: EV, handler: NonNullable<WysiwygEditorEventsOptions[PrefixedEventName<EV>]>): () => void;
|
|
34
|
+
off<EV extends WysiwygEditorEvent>(ev: EV, handler: NonNullable<WysiwygEditorEventsOptions[PrefixedEventName<EV>]>): void;
|
|
35
|
+
editorOptions(): WysiwygEditorEventsOptions;
|
|
36
|
+
}
|
|
37
|
+
interface WysiwygEditorContext {
|
|
38
|
+
editor: Editor;
|
|
39
|
+
vui: VuiService;
|
|
40
|
+
}
|
|
41
|
+
type WysiwygExtensionFactory<Options = any, Storage = any> = (ctx: WysiwygEditorInitializeContext) => Extension<Options, Storage> | Node<Options, Storage> | Mark<Options, Storage>;
|
|
42
|
+
interface CreatedWysiwygExtension<Options = any, Storage = any> {
|
|
43
|
+
__isCreatedWysiwygExtension: true;
|
|
44
|
+
_configs: Partial<Options>[];
|
|
45
|
+
configure(options?: Partial<Options>): CreatedWysiwygExtension<Options, Storage>;
|
|
46
|
+
raw: WysiwygExtensionSource<Options, Storage>;
|
|
47
|
+
}
|
|
48
|
+
type WysiwygExtensionSource<Options = any, Storage = any> = Extension<Options, Storage> | Node<Options, Storage> | Mark<Options, Storage> | WysiwygExtensionFactory<Options, Storage>;
|
|
49
|
+
type RawWysiwygExtension<Options = any, Storage = any> = WysiwygExtensionSource<Options, Storage> | CreatedWysiwygExtension<Options, Storage>;
|
|
50
|
+
declare function createWysiwygExtension<Options = any, Storage = any>(extension: WysiwygExtensionSource<Options, Storage>): CreatedWysiwygExtension<Options, Storage>;
|
|
51
|
+
declare function resolveRawWysiwygExtensions(raws: RawWysiwygExtension[], ctx: WysiwygEditorInitializeContext): AnyExtension[];
|
|
52
|
+
interface WysiwygEditorTool {
|
|
53
|
+
key: string;
|
|
54
|
+
icon: IconName | ((ctx: WysiwygEditorContext) => IconName | (() => VNodeChild));
|
|
55
|
+
active?: boolean | ((ctx: WysiwygEditorContext) => boolean);
|
|
56
|
+
disabled?: boolean | ((ctx: WysiwygEditorContext) => boolean);
|
|
57
|
+
onClick: (ctx: WysiwygEditorContext, ev: MouseEvent) => any;
|
|
58
|
+
floating?: boolean;
|
|
59
|
+
extensions?: Extensions;
|
|
60
|
+
}
|
|
61
|
+
type WysiwygEditorToolFactory<Options = void> = (vui: VuiService, options?: Options) => WysiwygEditorTool | WysiwygEditorTool[];
|
|
62
|
+
type RawWysiwygEditorTool = WysiwygEditorTool | WysiwygEditorToolFactory<any>;
|
|
63
|
+
interface ResolvedWysiwygEditorSettings {
|
|
64
|
+
tools: WysiwygEditorTool[];
|
|
65
|
+
extensions: Extensions;
|
|
66
|
+
}
|
|
67
|
+
declare function resolveRawWysiwygEditorTools(rawTools: RawWysiwygEditorTool[], vui: VuiService): ResolvedWysiwygEditorSettings;
|
|
68
|
+
|
|
69
|
+
declare const VUI_WYSIWYG_EDITOR_SYMBOL = "vui-wysiwyg-editor";
|
|
70
|
+
|
|
71
|
+
type WysiwygLinterFixFn = (view: EditorView, issue: WysiwygLinterResult) => any;
|
|
72
|
+
type WysiwygLinterFixMessage = string | (() => VNodeChild);
|
|
73
|
+
interface WysiwygLinterFixer {
|
|
74
|
+
message: WysiwygLinterFixMessage;
|
|
75
|
+
handler: WysiwygLinterFixFn;
|
|
76
|
+
}
|
|
77
|
+
type WysiwygLinterResultLevel = 'warning' | 'error';
|
|
78
|
+
interface WysiwygLinterResult {
|
|
79
|
+
id: string;
|
|
80
|
+
icon: boolean;
|
|
81
|
+
level: WysiwygLinterResultLevel;
|
|
82
|
+
message: WysiwygLinterFixMessage;
|
|
83
|
+
from: number;
|
|
84
|
+
to: number;
|
|
85
|
+
fix: WysiwygLinterFixer[];
|
|
86
|
+
}
|
|
87
|
+
interface RawLinterResult extends Omit<WysiwygLinterResult, 'level' | 'fix' | 'id' | 'icon'> {
|
|
88
|
+
level?: WysiwygLinterResultLevel;
|
|
89
|
+
icon?: boolean;
|
|
90
|
+
fix?: WysiwygLinterFixer | WysiwygLinterFixer[];
|
|
91
|
+
}
|
|
92
|
+
declare class WysiwygLinterPlugin {
|
|
93
|
+
protected doc: Node$1;
|
|
94
|
+
private results;
|
|
95
|
+
constructor(doc: Node$1);
|
|
96
|
+
record(result: RawLinterResult): void;
|
|
97
|
+
scan(): this;
|
|
98
|
+
getResults(): WysiwygLinterResult[];
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
interface WysiwygLinterOptions {
|
|
102
|
+
plugins: Array<typeof WysiwygLinterPlugin>;
|
|
103
|
+
}
|
|
104
|
+
interface WysiwygLinterStorage {
|
|
105
|
+
issues: WysiwygLinterResult[];
|
|
106
|
+
}
|
|
107
|
+
declare const WysiwygLinter: CreatedWysiwygExtension<WysiwygLinterOptions, WysiwygLinterStorage>;
|
|
108
|
+
|
|
109
|
+
declare function WysiwygLinterBadWords(words: string[]): typeof WysiwygLinterPlugin;
|
|
110
|
+
|
|
111
|
+
declare class WysiwygLinterHeadingLevel extends WysiwygLinterPlugin {
|
|
112
|
+
fixHeader(level: number): ({ state, dispatch }: EditorView, issue: WysiwygLinterResult) => void;
|
|
113
|
+
scan(): this;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
declare class WysiwygLinterPunctuation extends WysiwygLinterPlugin {
|
|
117
|
+
regex: RegExp;
|
|
118
|
+
fix(replacement: any): ({ state, dispatch }: EditorView, issue: WysiwygLinterResult) => void;
|
|
119
|
+
scan(): this;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
type WysiwygColorOptions = {
|
|
123
|
+
types: string[];
|
|
124
|
+
};
|
|
125
|
+
declare module '@tiptap/vue-3' {
|
|
126
|
+
interface Commands<ReturnType> {
|
|
127
|
+
color: {
|
|
128
|
+
/**
|
|
129
|
+
* Set the text color
|
|
130
|
+
*/
|
|
131
|
+
setColor: (color: string) => ReturnType;
|
|
132
|
+
/**
|
|
133
|
+
* Unset the text color
|
|
134
|
+
*/
|
|
135
|
+
unsetColor: () => ReturnType;
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
declare const WysiwygColorExtension: Extension<WysiwygColorOptions, any>;
|
|
140
|
+
|
|
141
|
+
declare const WysiwygBulletListTool: WysiwygEditorToolFactory<BulletListOptions>;
|
|
142
|
+
|
|
143
|
+
declare const WysiwygFormatBoldTool: WysiwygEditorToolFactory<BoldOptions>;
|
|
144
|
+
|
|
145
|
+
declare const WysiwygFormatItalicTool: WysiwygEditorToolFactory<ItalicOptions>;
|
|
146
|
+
|
|
147
|
+
declare const WysiwygFormatUnderlineTool: WysiwygEditorToolFactory<UnderlineOptions>;
|
|
148
|
+
|
|
149
|
+
declare const WysiwygHistoryTool: WysiwygEditorToolFactory<HistoryOptions>;
|
|
150
|
+
|
|
151
|
+
declare const WysiwygLinkTool: WysiwygEditorToolFactory<LinkOptions>;
|
|
152
|
+
|
|
153
|
+
declare const WysiwygOrderedListTool: WysiwygEditorToolFactory<OrderedListOptions>;
|
|
154
|
+
|
|
155
|
+
interface WysiwygColorItem {
|
|
156
|
+
key?: string | number;
|
|
157
|
+
name?: VNodeChild | ((vui: VuiService) => VNodeChild);
|
|
158
|
+
color: string | null;
|
|
159
|
+
}
|
|
160
|
+
interface CreateWysiwygColorToolOptions {
|
|
161
|
+
items: WysiwygColorItem[];
|
|
162
|
+
withLabel?: boolean;
|
|
163
|
+
}
|
|
164
|
+
declare function createWysiwygColorTool(opts: CreateWysiwygColorToolOptions): WysiwygEditorToolFactory;
|
|
165
|
+
|
|
166
|
+
declare const VWysiwygEditor: vue.DefineComponent<{
|
|
167
|
+
extensions: {
|
|
168
|
+
type: PropType<RawWysiwygExtension[]>;
|
|
169
|
+
default: () => never[];
|
|
170
|
+
};
|
|
171
|
+
tools: {
|
|
172
|
+
type: PropType<RawWysiwygEditorTool[]>;
|
|
173
|
+
default: () => never[];
|
|
174
|
+
};
|
|
175
|
+
floatingToolbar: BooleanConstructor;
|
|
176
|
+
disabledMinHeight: BooleanConstructor;
|
|
177
|
+
disabledMaxHeight: BooleanConstructor;
|
|
178
|
+
'v-slots': PropType<_fastkit_vue_utils__.ResolveRawSlots<FormControlSlots & InputBoxSlots>>;
|
|
179
|
+
size: {
|
|
180
|
+
type: PropType<"sm" | "md" | "lg">;
|
|
181
|
+
validator: (value: any) => boolean;
|
|
182
|
+
};
|
|
183
|
+
loading: BooleanConstructor;
|
|
184
|
+
variant: {
|
|
185
|
+
type: PropType<"flat" | "outlined" | "filled">;
|
|
186
|
+
validator: (value: any) => boolean;
|
|
187
|
+
};
|
|
188
|
+
startAdornment: PropType<_fastkit_vue_utils__.VNodeChildOrSlot>;
|
|
189
|
+
endAdornment: PropType<_fastkit_vue_utils__.VNodeChildOrSlot>;
|
|
190
|
+
tabindex: {
|
|
191
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
192
|
+
default: number;
|
|
193
|
+
};
|
|
194
|
+
nodeControl: PropType<_fastkit_vue_form_control__.FormNodeControl<any, any>>;
|
|
195
|
+
label: PropType<_fastkit_vue_utils__.VNodeChildOrSlot>;
|
|
196
|
+
hint: PropType<_fastkit_vue_utils__.VNodeChildOrSlot>;
|
|
197
|
+
hinttip: PropType<_fastkit_vue_form_control__.FormControlHinttip>;
|
|
198
|
+
hinttipDelay: PropType<_fastkit_vue_form_control__.FormControlHinttipDelay>;
|
|
199
|
+
infoAppends: PropType<_fastkit_vue_utils__.VNodeChildOrSlot>;
|
|
200
|
+
validating: BooleanConstructor;
|
|
201
|
+
pending: BooleanConstructor;
|
|
202
|
+
focused: BooleanConstructor;
|
|
203
|
+
dirty: BooleanConstructor;
|
|
204
|
+
pristine: BooleanConstructor;
|
|
205
|
+
errors: {
|
|
206
|
+
type: PropType<_fastkit_vue_form_control__.FormNodeError[]>;
|
|
207
|
+
default: () => _fastkit_vue_form_control__.FormNodeError[];
|
|
208
|
+
};
|
|
209
|
+
disabled: BooleanConstructor;
|
|
210
|
+
readonly: BooleanConstructor;
|
|
211
|
+
touched: BooleanConstructor;
|
|
212
|
+
untouched: BooleanConstructor;
|
|
213
|
+
required: BooleanConstructor;
|
|
214
|
+
invalid: BooleanConstructor;
|
|
215
|
+
valid: BooleanConstructor;
|
|
216
|
+
hiddenInfo: BooleanConstructor;
|
|
217
|
+
requiredChip: PropType<_fastkit_vue_form_control__.RequiredChipSource>;
|
|
218
|
+
minlength: (StringConstructor | NumberConstructor)[];
|
|
219
|
+
maxlength: (StringConstructor | NumberConstructor)[];
|
|
220
|
+
pattern: (RegExpConstructor | StringConstructor)[];
|
|
221
|
+
placeholder: StringConstructor;
|
|
222
|
+
autocapitalize: PropType<_fastkit_vue_form_control__.FormAutoCapitalize>;
|
|
223
|
+
finishings: PropType<_fastkit_vue_form_control__.RawTextableFinishingProp>;
|
|
224
|
+
counter: PropType<string | number | boolean>;
|
|
225
|
+
counterValue: PropType<(value: string) => number>;
|
|
226
|
+
limit: BooleanConstructor;
|
|
227
|
+
autocomplete: PropType<boolean | "name" | "off" | "on" | "honorific-prefix" | "given-name" | "additional-name" | "family-name" | "honorific-suffix" | "nickname" | "email" | "username" | "new-password" | "current-password" | "one-time-code" | "organization-title" | "organization" | "street-address" | "address-line1" | "address-line2" | "address-line3" | "address-level4" | "address-level3" | "address-level2" | "address-level1" | "country" | "country-name" | "postal-code" | "cc-name" | "cc-given-name" | "cc-additional-name" | "cc-family-name" | "cc-number" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-csc" | "cc-type" | "transaction-currency" | "transaction-amount" | "language" | "bday" | "bday-day" | "bday-month" | "bday-year" | "sex" | "tel" | "tel-country-code" | "tel-national" | "tel-area-code" | "tel-local" | "tel-extension" | "impp" | "url" | "photo">;
|
|
228
|
+
name: StringConstructor;
|
|
229
|
+
modelValue: vue.Prop<string, string>;
|
|
230
|
+
autofocus: BooleanConstructor;
|
|
231
|
+
spellcheck: BooleanConstructor;
|
|
232
|
+
viewonly: BooleanConstructor;
|
|
233
|
+
clearable: BooleanConstructor;
|
|
234
|
+
validateTiming: {
|
|
235
|
+
type: PropType<_fastkit_vue_form_control__.ValidateTiming>;
|
|
236
|
+
default: _fastkit_vue_form_control__.ValidateTiming;
|
|
237
|
+
};
|
|
238
|
+
rules: {
|
|
239
|
+
type: PropType<_fastkit_vue_form_control__.RecursiveValidatableRule>;
|
|
240
|
+
default: () => never[];
|
|
241
|
+
};
|
|
242
|
+
validationDeps: PropType<(nodeControl: _fastkit_vue_form_control__.FormNodeControl<any, any>) => any>;
|
|
243
|
+
error: BooleanConstructor;
|
|
244
|
+
errorMessages: PropType<string | string[]>;
|
|
245
|
+
}, {
|
|
246
|
+
focus: (position?: FocusPosition, options?: {
|
|
247
|
+
scrollIntoView?: boolean | undefined;
|
|
248
|
+
}) => _tiptap_vue_3.ChainedCommands | undefined;
|
|
249
|
+
blur: () => _tiptap_vue_3.ChainedCommands | undefined;
|
|
250
|
+
createTools: (bubbleMenu?: boolean) => JSX.Element;
|
|
251
|
+
parentControl: _fastkit_vui.ControlProvider | null;
|
|
252
|
+
size: vue.ComputedRef<"sm" | "md" | "lg">;
|
|
253
|
+
classes: vue.ComputedRef<any>;
|
|
254
|
+
computedMinlength: vue.ComputedRef<number | undefined>;
|
|
255
|
+
computedMaxlength: vue.ComputedRef<number | undefined>;
|
|
256
|
+
computedPattern: vue.ComputedRef<string | RegExp | undefined>;
|
|
257
|
+
computedPlaceholder: vue.ComputedRef<string | undefined>;
|
|
258
|
+
computedAutocapitalize: vue.ComputedRef<_fastkit_vue_form_control__.FormAutoCapitalize | undefined>;
|
|
259
|
+
counterSettings: vue.ComputedRef<_fastkit_vue_form_control__.TextableCounterSettings | undefined>;
|
|
260
|
+
counterResult: vue.ComputedRef<_fastkit_vue_form_control__.TextableCounterResult | undefined>;
|
|
261
|
+
computedAutocomplete: vue.ComputedRef<"name" | "off" | "on" | "honorific-prefix" | "given-name" | "additional-name" | "family-name" | "honorific-suffix" | "nickname" | "email" | "username" | "new-password" | "current-password" | "one-time-code" | "organization-title" | "organization" | "street-address" | "address-line1" | "address-line2" | "address-line3" | "address-level4" | "address-level3" | "address-level2" | "address-level1" | "country" | "country-name" | "postal-code" | "cc-name" | "cc-given-name" | "cc-additional-name" | "cc-family-name" | "cc-number" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-csc" | "cc-type" | "transaction-currency" | "transaction-amount" | "language" | "bday" | "bday-day" | "bday-month" | "bday-year" | "sex" | "tel" | "tel-country-code" | "tel-national" | "tel-area-code" | "tel-local" | "tel-extension" | "impp" | "url" | "photo" | undefined>;
|
|
262
|
+
nodeControl: _fastkit_vue_form_control__.FormNodeControl<any, any>;
|
|
263
|
+
currentValue: vue.WritableComputedRef<string>;
|
|
264
|
+
computedTabindex: vue.ComputedRef<number>;
|
|
265
|
+
validating: vue.Ref<boolean>;
|
|
266
|
+
autofocus: boolean;
|
|
267
|
+
pending: vue.ComputedRef<boolean>;
|
|
268
|
+
focused: vue.ComputedRef<boolean>;
|
|
269
|
+
initialValue: vue.Ref<string>;
|
|
270
|
+
dirty: vue.ComputedRef<boolean>;
|
|
271
|
+
pristine: vue.ComputedRef<boolean>;
|
|
272
|
+
propRules: vue.ComputedRef<_fastkit_vue_form_control__.RecursiveValidatableRule>;
|
|
273
|
+
isRequired: vue.ComputedRef<boolean>;
|
|
274
|
+
errors: vue.ComputedRef<_fastkit_vue_form_control__.FormNodeError[]>;
|
|
275
|
+
firstError: vue.ComputedRef<_fastkit_vue_form_control__.FormNodeError | undefined>;
|
|
276
|
+
hasMyError: vue.ComputedRef<boolean>;
|
|
277
|
+
hasError: vue.ComputedRef<boolean>;
|
|
278
|
+
isDisabled: vue.ComputedRef<boolean>;
|
|
279
|
+
isReadonly: vue.ComputedRef<boolean>;
|
|
280
|
+
canOperation: vue.ComputedRef<boolean>;
|
|
281
|
+
touched: vue.ComputedRef<boolean>;
|
|
282
|
+
untouched: vue.ComputedRef<boolean>;
|
|
283
|
+
isDestroyed: vue.ComputedRef<boolean>;
|
|
284
|
+
invalid: vue.ComputedRef<boolean>;
|
|
285
|
+
valid: vue.ComputedRef<boolean>;
|
|
286
|
+
shouldValidate: vue.ComputedRef<boolean>;
|
|
287
|
+
spellcheck: vue.ComputedRef<boolean>;
|
|
288
|
+
submiting: vue.ComputedRef<boolean>;
|
|
289
|
+
validateSelf: (force?: boolean | undefined) => Promise<_fastkit_vue_form_control__.ValidationResult>;
|
|
290
|
+
validate: () => Promise<boolean>;
|
|
291
|
+
editor: vue.ShallowRef<_tiptap_vue_3.Editor | undefined>;
|
|
292
|
+
}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
293
|
+
'update:modelValue': (value: string) => boolean;
|
|
294
|
+
'update:errors': (errors: _fastkit_vue_form_control__.FormNodeError[]) => boolean;
|
|
295
|
+
change: (value: string) => boolean;
|
|
296
|
+
focus: (ev: FocusEvent) => boolean;
|
|
297
|
+
blur: (ev: FocusEvent) => boolean;
|
|
298
|
+
}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
299
|
+
extensions: {
|
|
300
|
+
type: PropType<RawWysiwygExtension[]>;
|
|
301
|
+
default: () => never[];
|
|
302
|
+
};
|
|
303
|
+
tools: {
|
|
304
|
+
type: PropType<RawWysiwygEditorTool[]>;
|
|
305
|
+
default: () => never[];
|
|
306
|
+
};
|
|
307
|
+
floatingToolbar: BooleanConstructor;
|
|
308
|
+
disabledMinHeight: BooleanConstructor;
|
|
309
|
+
disabledMaxHeight: BooleanConstructor;
|
|
310
|
+
'v-slots': PropType<_fastkit_vue_utils__.ResolveRawSlots<FormControlSlots & InputBoxSlots>>;
|
|
311
|
+
size: {
|
|
312
|
+
type: PropType<"sm" | "md" | "lg">;
|
|
313
|
+
validator: (value: any) => boolean;
|
|
314
|
+
};
|
|
315
|
+
loading: BooleanConstructor;
|
|
316
|
+
variant: {
|
|
317
|
+
type: PropType<"flat" | "outlined" | "filled">;
|
|
318
|
+
validator: (value: any) => boolean;
|
|
319
|
+
};
|
|
320
|
+
startAdornment: PropType<_fastkit_vue_utils__.VNodeChildOrSlot>;
|
|
321
|
+
endAdornment: PropType<_fastkit_vue_utils__.VNodeChildOrSlot>;
|
|
322
|
+
tabindex: {
|
|
323
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
324
|
+
default: number;
|
|
325
|
+
};
|
|
326
|
+
nodeControl: PropType<_fastkit_vue_form_control__.FormNodeControl<any, any>>;
|
|
327
|
+
label: PropType<_fastkit_vue_utils__.VNodeChildOrSlot>;
|
|
328
|
+
hint: PropType<_fastkit_vue_utils__.VNodeChildOrSlot>;
|
|
329
|
+
hinttip: PropType<_fastkit_vue_form_control__.FormControlHinttip>;
|
|
330
|
+
hinttipDelay: PropType<_fastkit_vue_form_control__.FormControlHinttipDelay>;
|
|
331
|
+
infoAppends: PropType<_fastkit_vue_utils__.VNodeChildOrSlot>;
|
|
332
|
+
validating: BooleanConstructor;
|
|
333
|
+
pending: BooleanConstructor;
|
|
334
|
+
focused: BooleanConstructor;
|
|
335
|
+
dirty: BooleanConstructor;
|
|
336
|
+
pristine: BooleanConstructor;
|
|
337
|
+
errors: {
|
|
338
|
+
type: PropType<_fastkit_vue_form_control__.FormNodeError[]>;
|
|
339
|
+
default: () => _fastkit_vue_form_control__.FormNodeError[];
|
|
340
|
+
};
|
|
341
|
+
disabled: BooleanConstructor;
|
|
342
|
+
readonly: BooleanConstructor;
|
|
343
|
+
touched: BooleanConstructor;
|
|
344
|
+
untouched: BooleanConstructor;
|
|
345
|
+
required: BooleanConstructor;
|
|
346
|
+
invalid: BooleanConstructor;
|
|
347
|
+
valid: BooleanConstructor;
|
|
348
|
+
hiddenInfo: BooleanConstructor;
|
|
349
|
+
requiredChip: PropType<_fastkit_vue_form_control__.RequiredChipSource>;
|
|
350
|
+
minlength: (StringConstructor | NumberConstructor)[];
|
|
351
|
+
maxlength: (StringConstructor | NumberConstructor)[];
|
|
352
|
+
pattern: (RegExpConstructor | StringConstructor)[];
|
|
353
|
+
placeholder: StringConstructor;
|
|
354
|
+
autocapitalize: PropType<_fastkit_vue_form_control__.FormAutoCapitalize>;
|
|
355
|
+
finishings: PropType<_fastkit_vue_form_control__.RawTextableFinishingProp>;
|
|
356
|
+
counter: PropType<string | number | boolean>;
|
|
357
|
+
counterValue: PropType<(value: string) => number>;
|
|
358
|
+
limit: BooleanConstructor;
|
|
359
|
+
autocomplete: PropType<boolean | "name" | "off" | "on" | "honorific-prefix" | "given-name" | "additional-name" | "family-name" | "honorific-suffix" | "nickname" | "email" | "username" | "new-password" | "current-password" | "one-time-code" | "organization-title" | "organization" | "street-address" | "address-line1" | "address-line2" | "address-line3" | "address-level4" | "address-level3" | "address-level2" | "address-level1" | "country" | "country-name" | "postal-code" | "cc-name" | "cc-given-name" | "cc-additional-name" | "cc-family-name" | "cc-number" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-csc" | "cc-type" | "transaction-currency" | "transaction-amount" | "language" | "bday" | "bday-day" | "bday-month" | "bday-year" | "sex" | "tel" | "tel-country-code" | "tel-national" | "tel-area-code" | "tel-local" | "tel-extension" | "impp" | "url" | "photo">;
|
|
360
|
+
name: StringConstructor;
|
|
361
|
+
modelValue: vue.Prop<string, string>;
|
|
362
|
+
autofocus: BooleanConstructor;
|
|
363
|
+
spellcheck: BooleanConstructor;
|
|
364
|
+
viewonly: BooleanConstructor;
|
|
365
|
+
clearable: BooleanConstructor;
|
|
366
|
+
validateTiming: {
|
|
367
|
+
type: PropType<_fastkit_vue_form_control__.ValidateTiming>;
|
|
368
|
+
default: _fastkit_vue_form_control__.ValidateTiming;
|
|
369
|
+
};
|
|
370
|
+
rules: {
|
|
371
|
+
type: PropType<_fastkit_vue_form_control__.RecursiveValidatableRule>;
|
|
372
|
+
default: () => never[];
|
|
373
|
+
};
|
|
374
|
+
validationDeps: PropType<(nodeControl: _fastkit_vue_form_control__.FormNodeControl<any, any>) => any>;
|
|
375
|
+
error: BooleanConstructor;
|
|
376
|
+
errorMessages: PropType<string | string[]>;
|
|
377
|
+
}>> & {
|
|
378
|
+
onFocus?: ((ev: FocusEvent) => any) | undefined;
|
|
379
|
+
onBlur?: ((ev: FocusEvent) => any) | undefined;
|
|
380
|
+
onChange?: ((value: string) => any) | undefined;
|
|
381
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
382
|
+
"onUpdate:errors"?: ((errors: _fastkit_vue_form_control__.FormNodeError[]) => any) | undefined;
|
|
383
|
+
}, {
|
|
384
|
+
extensions: RawWysiwygExtension[];
|
|
385
|
+
autofocus: boolean;
|
|
386
|
+
error: boolean;
|
|
387
|
+
invalid: boolean;
|
|
388
|
+
loading: boolean;
|
|
389
|
+
tabindex: string | number;
|
|
390
|
+
validating: boolean;
|
|
391
|
+
pending: boolean;
|
|
392
|
+
focused: boolean;
|
|
393
|
+
dirty: boolean;
|
|
394
|
+
pristine: boolean;
|
|
395
|
+
errors: _fastkit_vue_form_control__.FormNodeError[];
|
|
396
|
+
disabled: boolean;
|
|
397
|
+
readonly: boolean;
|
|
398
|
+
touched: boolean;
|
|
399
|
+
untouched: boolean;
|
|
400
|
+
required: boolean;
|
|
401
|
+
valid: boolean;
|
|
402
|
+
hiddenInfo: boolean;
|
|
403
|
+
limit: boolean;
|
|
404
|
+
spellcheck: boolean;
|
|
405
|
+
viewonly: boolean;
|
|
406
|
+
clearable: boolean;
|
|
407
|
+
validateTiming: _fastkit_vue_form_control__.ValidateTiming;
|
|
408
|
+
rules: _fastkit_vue_form_control__.RecursiveValidatableRule;
|
|
409
|
+
tools: RawWysiwygEditorTool[];
|
|
410
|
+
floatingToolbar: boolean;
|
|
411
|
+
disabledMinHeight: boolean;
|
|
412
|
+
disabledMaxHeight: boolean;
|
|
413
|
+
}>;
|
|
414
|
+
|
|
415
|
+
export { CreateWysiwygColorToolOptions, CreatedWysiwygExtension, RawWysiwygEditorTool, RawWysiwygExtension, ResolvedWysiwygEditorSettings, VUI_WYSIWYG_EDITOR_SYMBOL, VWysiwygEditor, WysiwygBulletListTool, WysiwygColorExtension, WysiwygColorItem, WysiwygColorOptions, WysiwygEditorContext, WysiwygEditorEvent, WysiwygEditorEventsBucket, WysiwygEditorEventsOptions, WysiwygEditorInitializeContext, WysiwygEditorPrefixedEvent, WysiwygEditorTool, WysiwygEditorToolFactory, WysiwygExtensionFactory, WysiwygExtensionSource, WysiwygFormatBoldTool, WysiwygFormatItalicTool, WysiwygFormatUnderlineTool, WysiwygHistoryTool, WysiwygLinkTool, WysiwygLinter, WysiwygLinterBadWords, WysiwygLinterHeadingLevel, WysiwygLinterOptions, WysiwygLinterPlugin, WysiwygLinterPunctuation, WysiwygOrderedListTool, createWysiwygColorTool, createWysiwygExtension, resolveRawWysiwygEditorTools, resolveRawWysiwygExtensions };
|