@onereach/ui-components 10.2.0 → 10.2.1-beta.4272.0
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/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.js +382 -252
- package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +21 -68
- package/dist/bundled/v2/components/OrRichTextEditorV3/styles.d.ts +1 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/styles.js +5 -4
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.js +1 -1
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.js +1 -1
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/markdown.js +2 -2
- package/dist/bundled/v2/{index-02a897ac.js → index-0e9c2b43.js} +1 -1
- package/dist/bundled/v2/{index-7516cf60.js → index-f379c836.js} +258 -173
- package/dist/bundled/v2/{markdown-fe3bfb01.js → markdown-2d22cf16.js} +66 -113
- package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.js +1 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +14 -18
- package/dist/bundled/v3/components/OrRichTextEditorV3/index.js +1 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/props.js +1 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/styles.d.ts +1 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/styles.js +1 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.js +1 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.js +1 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/index.js +1 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/theme.js +1 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/markdown.js +1 -1
- package/dist/bundled/v3/components/{OrRichTextEditorV3-358d7df2.js → OrRichTextEditorV3-45e64a85.js} +673 -531
- package/dist/bundled/v3/components/index.js +1 -1
- package/dist/bundled/v3/index.js +1 -1
- package/dist/esm/v2/{OrRichTextEditor-734b8b27.js → OrRichTextEditor-fbcc33fd.js} +353 -244
- package/dist/esm/v2/components/index.js +1 -1
- package/dist/esm/v2/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +21 -68
- package/dist/esm/v2/components/or-rich-text-editor-v3/index.js +7 -7
- package/dist/esm/v2/components/or-rich-text-editor-v3/partials/EditorToolbar.vue.d.ts +160 -0
- package/dist/esm/v2/components/or-rich-text-editor-v3/styles.d.ts +1 -0
- package/dist/esm/v2/index.js +1 -1
- package/dist/esm/v3/{OrRichTextEditor-b5684aab.js → OrRichTextEditor-cdd9e3e4.js} +325 -242
- package/dist/esm/v3/components/index.js +1 -1
- package/dist/esm/v3/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +14 -18
- package/dist/esm/v3/components/or-rich-text-editor-v3/index.js +6 -6
- package/dist/esm/v3/components/or-rich-text-editor-v3/partials/EditorToolbar.vue.d.ts +89 -0
- package/dist/esm/v3/components/or-rich-text-editor-v3/styles.d.ts +1 -0
- package/dist/esm/v3/index.js +1 -1
- package/package.json +19 -20
- package/src/components/or-rich-text-editor-v3/OrRichTextEditor.vue +48 -203
- package/src/components/or-rich-text-editor-v3/partials/EditorToolbar.vue +238 -0
- package/src/components/or-rich-text-editor-v3/styles.ts +13 -10
|
@@ -5,58 +5,29 @@ import { Level } from '@tiptap/extension-heading';
|
|
|
5
5
|
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
6
6
|
editor: Editor | null;
|
|
7
7
|
editorRef: import("@vue/composition-api").Ref<HTMLDivElement | undefined>;
|
|
8
|
-
|
|
8
|
+
toolbarContainerRef: import("@vue/composition-api").Ref<ComponentPublicInstance<HTMLInputElement, {}, {}, {}, {}, {}, HTMLInputElement, {}, false> | undefined>;
|
|
9
9
|
containerRef: import("@vue/composition-api").Ref<ComponentPublicInstance<HTMLInputElement, {}, {}, {}, {}, {}, HTMLInputElement, {}, false> | undefined>;
|
|
10
|
-
toolbarButtonRef: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
11
|
-
[x: string]: ((...args: any[]) => any) | null;
|
|
12
|
-
} | string[], {} & {}, {
|
|
13
|
-
[x: number]: string;
|
|
14
|
-
} | {}, true> | undefined>;
|
|
15
|
-
moreButtonRef: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
16
|
-
[x: string]: ((...args: any[]) => any) | null;
|
|
17
|
-
} | string[], {} & {}, {
|
|
18
|
-
[x: number]: string;
|
|
19
|
-
} | {}, true> | undefined>;
|
|
20
10
|
textareaRef: import("@vue/composition-api").Ref<HTMLTextAreaElement | undefined>;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
} | {}, true> | undefined>;
|
|
26
|
-
menuRef: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
27
|
-
[x: string]: ((...args: any[]) => any) | null;
|
|
28
|
-
} | string[], {} & {}, {
|
|
29
|
-
[x: number]: string;
|
|
30
|
-
} | {}, true> | undefined>;
|
|
31
|
-
iconsEnum: import("@vue/composition-api").Ref<{
|
|
32
|
-
[x: string]: string;
|
|
33
|
-
}>;
|
|
34
|
-
handleToolbarClick: (item: string, level?: number) => void;
|
|
11
|
+
handleToolbarClick: ({ item, level }: {
|
|
12
|
+
item: string;
|
|
13
|
+
level?: number | undefined;
|
|
14
|
+
}) => void;
|
|
35
15
|
handleEditorClick: () => void;
|
|
36
16
|
isActive: import("@vue/composition-api").Ref<{
|
|
37
17
|
[x: string]: boolean;
|
|
38
18
|
}>;
|
|
39
|
-
iconTooltipsEnum: import("@vue/composition-api").Ref<{
|
|
40
|
-
[x: string]: string;
|
|
41
|
-
}>;
|
|
42
19
|
containerStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
43
|
-
toolbarContainerStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
44
|
-
toolbarStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
45
20
|
rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
46
21
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
47
22
|
editorInputStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
48
|
-
getIndexOfHeading: import("@vue/composition-api").ComputedRef<number>;
|
|
49
23
|
headingLevels: Level[];
|
|
50
|
-
headingIcon: import("@vue/composition-api").ComputedRef<string>;
|
|
51
24
|
attachLink: () => Promise<void>;
|
|
52
25
|
discardLink: () => void;
|
|
53
26
|
isOpenLinkModal: import("@vue/composition-api").Ref<boolean>;
|
|
54
27
|
text: import("@vue/composition-api").Ref<string>;
|
|
55
28
|
link: import("@vue/composition-api").Ref<string>;
|
|
56
29
|
isFocused: import("@vue/composition-api").Ref<boolean>;
|
|
57
|
-
isVisible: (value: string | Array<string>) => boolean;
|
|
58
30
|
countOfNotVisibleTools: import("@vue/composition-api").Ref<number>;
|
|
59
|
-
notVisibleTools: import("@vue/composition-api").ComputedRef<Set<string>>;
|
|
60
31
|
handleInput: (event: InputEvent) => void;
|
|
61
32
|
proxyModelValue: import("@vue/composition-api").WritableComputedRef<string>;
|
|
62
33
|
disableMarkdown: import("@vue/composition-api").Ref<boolean>;
|
|
@@ -103,6 +74,10 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
103
74
|
type: (BooleanConstructor | StringConstructor)[];
|
|
104
75
|
default: undefined;
|
|
105
76
|
};
|
|
77
|
+
readonly: {
|
|
78
|
+
type: BooleanConstructor;
|
|
79
|
+
default: boolean;
|
|
80
|
+
};
|
|
106
81
|
}, import("@vue/composition-api").ExtractPropTypes<{
|
|
107
82
|
modelValue: {
|
|
108
83
|
type: StringConstructor;
|
|
@@ -144,6 +119,10 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
144
119
|
type: (BooleanConstructor | StringConstructor)[];
|
|
145
120
|
default: undefined;
|
|
146
121
|
};
|
|
122
|
+
readonly: {
|
|
123
|
+
type: BooleanConstructor;
|
|
124
|
+
default: boolean;
|
|
125
|
+
};
|
|
147
126
|
}>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
148
127
|
modelValue: string;
|
|
149
128
|
toolbar: Tools;
|
|
@@ -155,63 +134,35 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
155
134
|
hint: string;
|
|
156
135
|
disabled: boolean;
|
|
157
136
|
error: string | boolean;
|
|
137
|
+
readonly: boolean;
|
|
158
138
|
} & {} & {
|
|
159
139
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
160
140
|
}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
161
141
|
editor: Editor | null;
|
|
162
142
|
editorRef: import("@vue/composition-api").Ref<HTMLDivElement | undefined>;
|
|
163
|
-
|
|
143
|
+
toolbarContainerRef: import("@vue/composition-api").Ref<ComponentPublicInstance<HTMLInputElement, {}, {}, {}, {}, {}, HTMLInputElement, {}, false> | undefined>;
|
|
164
144
|
containerRef: import("@vue/composition-api").Ref<ComponentPublicInstance<HTMLInputElement, {}, {}, {}, {}, {}, HTMLInputElement, {}, false> | undefined>;
|
|
165
|
-
toolbarButtonRef: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
166
|
-
[x: string]: ((...args: any[]) => any) | null;
|
|
167
|
-
} | string[], {} & {}, {
|
|
168
|
-
[x: number]: string;
|
|
169
|
-
} | {}, true> | undefined>;
|
|
170
|
-
moreButtonRef: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
171
|
-
[x: string]: ((...args: any[]) => any) | null;
|
|
172
|
-
} | string[], {} & {}, {
|
|
173
|
-
[x: number]: string;
|
|
174
|
-
} | {}, true> | undefined>;
|
|
175
145
|
textareaRef: import("@vue/composition-api").Ref<HTMLTextAreaElement | undefined>;
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
} | {}, true> | undefined>;
|
|
181
|
-
menuRef: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
182
|
-
[x: string]: ((...args: any[]) => any) | null;
|
|
183
|
-
} | string[], {} & {}, {
|
|
184
|
-
[x: number]: string;
|
|
185
|
-
} | {}, true> | undefined>;
|
|
186
|
-
iconsEnum: import("@vue/composition-api").Ref<{
|
|
187
|
-
[x: string]: string;
|
|
188
|
-
}>;
|
|
189
|
-
handleToolbarClick: (item: string, level?: number) => void;
|
|
146
|
+
handleToolbarClick: ({ item, level }: {
|
|
147
|
+
item: string;
|
|
148
|
+
level?: number | undefined;
|
|
149
|
+
}) => void;
|
|
190
150
|
handleEditorClick: () => void;
|
|
191
151
|
isActive: import("@vue/composition-api").Ref<{
|
|
192
152
|
[x: string]: boolean;
|
|
193
153
|
}>;
|
|
194
|
-
iconTooltipsEnum: import("@vue/composition-api").Ref<{
|
|
195
|
-
[x: string]: string;
|
|
196
|
-
}>;
|
|
197
154
|
containerStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
198
|
-
toolbarContainerStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
199
|
-
toolbarStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
200
155
|
rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
201
156
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
202
157
|
editorInputStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
203
|
-
getIndexOfHeading: import("@vue/composition-api").ComputedRef<number>;
|
|
204
158
|
headingLevels: Level[];
|
|
205
|
-
headingIcon: import("@vue/composition-api").ComputedRef<string>;
|
|
206
159
|
attachLink: () => Promise<void>;
|
|
207
160
|
discardLink: () => void;
|
|
208
161
|
isOpenLinkModal: import("@vue/composition-api").Ref<boolean>;
|
|
209
162
|
text: import("@vue/composition-api").Ref<string>;
|
|
210
163
|
link: import("@vue/composition-api").Ref<string>;
|
|
211
164
|
isFocused: import("@vue/composition-api").Ref<boolean>;
|
|
212
|
-
isVisible: (value: string | Array<string>) => boolean;
|
|
213
165
|
countOfNotVisibleTools: import("@vue/composition-api").Ref<number>;
|
|
214
|
-
notVisibleTools: import("@vue/composition-api").ComputedRef<Set<string>>;
|
|
215
166
|
handleInput: (event: InputEvent) => void;
|
|
216
167
|
proxyModelValue: import("@vue/composition-api").WritableComputedRef<string>;
|
|
217
168
|
disableMarkdown: import("@vue/composition-api").Ref<boolean>;
|
|
@@ -228,6 +179,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
228
179
|
hint: string;
|
|
229
180
|
disabled: boolean;
|
|
230
181
|
error: string | boolean;
|
|
182
|
+
readonly: boolean;
|
|
231
183
|
} & {} & {
|
|
232
184
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
233
185
|
}, {
|
|
@@ -241,5 +193,6 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
241
193
|
hint: string;
|
|
242
194
|
disabled: boolean;
|
|
243
195
|
error: string | boolean;
|
|
196
|
+
readonly: boolean;
|
|
244
197
|
}, true>);
|
|
245
198
|
export default _default;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const OrRichTextEditor: string[];
|
|
2
2
|
export declare const EditorContainer: string[];
|
|
3
|
+
export declare const EditorContainerFocus: string[];
|
|
3
4
|
export declare const ToolbarContainer: string[];
|
|
4
5
|
export declare const Toolbar: string[];
|
|
5
6
|
export declare const ToolbarButton: string[];
|
|
@@ -4,16 +4,17 @@ const OrRichTextEditor = [
|
|
|
4
4
|
// Spacing
|
|
5
5
|
'gap-xs',
|
|
6
6
|
// Box
|
|
7
|
-
'max-h-full'];
|
|
7
|
+
'max-h-full', 'w-full'];
|
|
8
8
|
const EditorContainer = [
|
|
9
9
|
// Layout
|
|
10
10
|
'layout-column',
|
|
11
|
-
// Theme (focus)
|
|
12
|
-
'focus-within:theme-background-primary-translucent-1', 'dark:focus-within:theme-background-primary-translucent-1-dark', 'focus-within:theme-border-1-primary', 'dark:focus-within:theme-border-1-primary-dark', 'focus-within:theme-outline-2-primary', 'dark:focus-within:theme-outline-2-primary-dark',
|
|
13
11
|
// Theme (invalid)
|
|
14
12
|
'invalid:theme-background-error-translucent-1', 'dark:invalid:theme-background-error-translucent-1-dark', 'invalid:theme-foreground-default', 'dark:invalid:theme-foreground-default-dark', 'invalid:theme-border-1-error', 'dark:invalid:theme-border-1-error-dark', 'invalid:theme-outline-2-transparent', 'dark:invalid:theme-outline-2-transparent',
|
|
15
13
|
// Box
|
|
16
14
|
'border-1', 'rounded-md', 'w-full', 'overflow-hidden', 'grow'];
|
|
15
|
+
const EditorContainerFocus = [
|
|
16
|
+
// Theme (focus)
|
|
17
|
+
'focus-within:theme-background-primary-translucent-1', 'dark:focus-within:theme-background-primary-translucent-1-dark', 'focus-within:theme-border-1-primary', 'dark:focus-within:theme-border-1-primary-dark', 'focus-within:theme-outline-2-primary', 'dark:focus-within:theme-outline-2-primary-dark'];
|
|
17
18
|
const ToolbarContainer = [
|
|
18
19
|
// Layout
|
|
19
20
|
'layout-row',
|
|
@@ -44,4 +45,4 @@ const EditorInput = [
|
|
|
44
45
|
// Typography
|
|
45
46
|
'typography-body-2-regular'];
|
|
46
47
|
|
|
47
|
-
export { EditorContainer, EditorInput, OrRichTextEditor, Toolbar, ToolbarButton, ToolbarButtonFocused, ToolbarContainer };
|
|
48
|
+
export { EditorContainer, EditorContainerFocus, EditorInput, OrRichTextEditor, Toolbar, ToolbarButton, ToolbarButtonFocused, ToolbarContainer };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as Node } from '../../../../index-
|
|
1
|
+
import { N as Node } from '../../../../index-f379c836.js';
|
|
2
2
|
import CodeMirrorView from './codemirrorView.js';
|
|
3
3
|
import { m as minimalSetup } from '../../../../index-f1a845c3.js';
|
|
4
4
|
import { javascript } from '../../../../index-5d81edfd.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as exitCode, T as TextSelection, S as Selection } from '../../../../index-
|
|
1
|
+
import { n as exitCode, T as TextSelection, S as Selection } from '../../../../index-0e9c2b43.js';
|
|
2
2
|
import { a as EditorState, E as EditorView, W as highlightActiveLine, z as highlightActiveLineGutter, y as lineNumbers, k as keymap } from '../../../../index-10711eb4.js';
|
|
3
3
|
import theme from './theme.js';
|
|
4
4
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { d as deserialize, s as serialize } from '../../../markdown-
|
|
2
|
-
import '../../../index-
|
|
1
|
+
export { d as deserialize, s as serialize } from '../../../markdown-2d22cf16.js';
|
|
2
|
+
import '../../../index-0e9c2b43.js';
|
|
@@ -7124,4 +7124,4 @@ typeof navigator != "undefined" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform)
|
|
|
7124
7124
|
// @ts-ignore
|
|
7125
7125
|
: typeof os != "undefined" && os.platform ? os.platform() == "darwin" : false;
|
|
7126
7126
|
|
|
7127
|
-
export { AllSelection as A,
|
|
7127
|
+
export { AllSelection as A, selectTextblockStart as B, Transform as C, DOMParser as D, EditorState as E, Fragment as F, setBlockType as G, wrapIn as H, ReplaceStep as I, Mapping as M, NodeSelection as N, Plugin as P, ReplaceAroundStep as R, Selection as S, TextSelection as T, PluginKey as a, Slice as b, Schema as c, dropPoint as d, Mark as e, DOMSerializer as f, NodeRange as g, findWrapping as h, canSplit as i, canJoin as j, createParagraphNear as k, liftTarget as l, deleteSelection as m, exitCode as n, joinUp as o, joinDown as p, joinBackward as q, joinForward as r, joinPoint as s, lift as t, liftEmptyBlock as u, newlineInCode as v, selectNodeBackward as w, selectNodeForward as x, selectParentNode as y, selectTextblockEnd as z };
|