@onereach/ui-components 2.67.4 → 2.68.0-beta.2001.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.
Files changed (50) hide show
  1. package/dist/bundled/v2/{OrCode-edc7a1f5.js → OrCode-0cd991a1.js} +1 -114
  2. package/dist/bundled/v2/{OrConfirm-1d396830.js → OrConfirm-22c7622d.js} +1 -1
  3. package/dist/bundled/v2/components/index.js +3 -2
  4. package/dist/bundled/v2/components/or-code/index.js +2 -1
  5. package/dist/bundled/v2/components/or-confirm-v3/index.js +1 -1
  6. package/dist/bundled/v2/components/or-rich-text-editor-v3/OrRichTextEditor.stories3.d.ts +12 -0
  7. package/dist/bundled/v2/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +149 -0
  8. package/dist/bundled/v2/components/or-rich-text-editor-v3/index.d.ts +1 -0
  9. package/dist/bundled/v2/components/or-rich-text-editor-v3/index.js +36840 -0
  10. package/dist/bundled/v2/components/or-rich-text-editor-v3/styles.d.ts +6 -0
  11. package/dist/bundled/v2/index.es-3f39f316.js +115 -0
  12. package/dist/bundled/v2/index.js +4 -3
  13. package/dist/bundled/v3/{OrCode.vue_vue_type_script_lang-ef5e7f04.js → OrCode.vue_vue_type_script_lang-6c5f94a6.js} +1 -114
  14. package/dist/bundled/v3/OrMenu-08aa60de.js +29 -0
  15. package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-ca57f9d9.js → OrTabs.vue_vue_type_script_lang-2fdbd2f2.js} +10 -36
  16. package/dist/bundled/v3/components/index.js +4 -2
  17. package/dist/bundled/v3/components/or-code/index.js +2 -1
  18. package/dist/bundled/v3/components/or-rich-text-editor-v3/OrRichTextEditor.stories3.d.ts +12 -0
  19. package/dist/bundled/v3/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +149 -0
  20. package/dist/bundled/v3/components/or-rich-text-editor-v3/index.d.ts +1 -0
  21. package/dist/bundled/v3/components/or-rich-text-editor-v3/index.js +36811 -0
  22. package/dist/bundled/v3/components/or-rich-text-editor-v3/styles.d.ts +6 -0
  23. package/dist/bundled/v3/components/or-tabs-v3/index.js +2 -1
  24. package/dist/bundled/v3/index.es-3f39f316.js +115 -0
  25. package/dist/bundled/v3/index.js +8 -6
  26. package/dist/esm/v2/{OrConfirm-e3b3418f.js → OrConfirm-367ac968.js} +1 -1
  27. package/dist/esm/v2/components/index.js +1 -1
  28. package/dist/esm/v2/components/or-confirm-v3/index.js +1 -1
  29. package/dist/esm/v2/components/or-rich-text-editor-v3/OrRichTextEditor.stories3.d.ts +12 -0
  30. package/dist/esm/v2/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +149 -0
  31. package/dist/esm/v2/components/or-rich-text-editor-v3/index.d.ts +1 -0
  32. package/dist/esm/v2/components/or-rich-text-editor-v3/index.js +524 -0
  33. package/dist/esm/v2/components/or-rich-text-editor-v3/styles.d.ts +6 -0
  34. package/dist/esm/v2/index.js +1 -1
  35. package/dist/esm/v3/{OrConfirm-b78c5299.js → OrConfirm-e6735cc8.js} +1 -1
  36. package/dist/esm/v3/components/index.js +1 -1
  37. package/dist/esm/v3/components/or-confirm-v3/index.js +1 -1
  38. package/dist/esm/v3/components/or-rich-text-editor-v3/OrRichTextEditor.stories3.d.ts +12 -0
  39. package/dist/esm/v3/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +149 -0
  40. package/dist/esm/v3/components/or-rich-text-editor-v3/index.d.ts +1 -0
  41. package/dist/esm/v3/components/or-rich-text-editor-v3/index.js +493 -0
  42. package/dist/esm/v3/components/or-rich-text-editor-v3/styles.d.ts +6 -0
  43. package/dist/esm/v3/index.js +1 -1
  44. package/package.json +20 -3
  45. package/src/components/or-confirm-v3/OrConfirm.vue +1 -1
  46. package/src/components/or-rich-text-editor-v3/OrRichTextEditor.docs.mdx +16 -0
  47. package/src/components/or-rich-text-editor-v3/OrRichTextEditor.stories3.ts +62 -0
  48. package/src/components/or-rich-text-editor-v3/OrRichTextEditor.vue +520 -0
  49. package/src/components/or-rich-text-editor-v3/index.ts +1 -0
  50. package/src/components/or-rich-text-editor-v3/styles.ts +65 -0
@@ -0,0 +1,524 @@
1
+ import { defineComponent, ref, onMounted, onBeforeUnmount, computed, watch } from 'vue-demi';
2
+ import { u as useClassAttribute } from '../../useClassAttribute-47fdb016.js';
3
+ import '@vueuse/core';
4
+ import { defaultMarkdownSerializer, MarkdownSerializer } from 'prosemirror-markdown';
5
+ import { DOMParser as DOMParser$1 } from 'prosemirror-model';
6
+ import { marked } from 'marked';
7
+ import { _ as __vue_component__$1 } from '../../OrIconButton-a7764de4.js';
8
+ import { _ as __vue_component__$2 } from '../../OrLabel-5670468e.js';
9
+ import { _ as __vue_component__$4 } from '../../OrMenu-e7210edc.js';
10
+ import '../../OrPopover-ef8c91f1.js';
11
+ import { _ as __vue_component__$3 } from '../../OrMenuItem-038641b7.js';
12
+ import { Editor, mergeAttributes } from '@tiptap/core';
13
+ import StarterKit from '@tiptap/starter-kit';
14
+ import Underline from '@tiptap/extension-underline';
15
+ import Link from '@tiptap/extension-link';
16
+ import Highlight from '@tiptap/extension-highlight';
17
+ import Heading from '@tiptap/extension-heading';
18
+ import Placeholder from '@tiptap/extension-placeholder';
19
+ import Paragraph from '@tiptap/extension-paragraph';
20
+ import BulletList from '@tiptap/extension-bullet-list';
21
+ import ListItem from '@tiptap/extension-list-item';
22
+ import OrderedList from '@tiptap/extension-ordered-list';
23
+ import Strike from '@tiptap/extension-strike';
24
+ import Italic from '@tiptap/extension-italic';
25
+ import Bold from '@tiptap/extension-bold';
26
+ import { n as normalizeComponent } from '../../normalize-component-6e8e3d80.js';
27
+ import { c as createInjector } from '../../browser-82dea9ed.js';
28
+ import '../../OrIcon-05689298.js';
29
+ import '../../OrTooltip-3454c2e6.js';
30
+ import '@floating-ui/dom';
31
+ import '../../useElevation-31bfe1f6.js';
32
+ import '../../useResponsive-a02e95b7.js';
33
+ import '../../OrBottomSheet-5acd034f.js';
34
+ import '../../OrOverlay-18ba2dc6.js';
35
+ import '../../OrTeleport.vue2-fb92f29f.js';
36
+ import 'portal-vue';
37
+
38
+ const EditorContainer = [
39
+ // Colors
40
+ 'border-outline', 'dark:border-outline-dark', 'focus-within:theme-border-1-primary', 'dark:focus-within:theme-border-1-primary-dark', 'focus-within:bg-primary-opacity-0-08', 'dark:focus-within:bg-primary-opacity-0-08-dark', 'focus-within:theme-outline-primary', 'dark:focus-within:theme-outline-primary-dark',
41
+ // Sizing
42
+ 'border-1', 'rounded-md'];
43
+ const ToolbarContainer = [
44
+ // Layout
45
+ 'flex',
46
+ //Spacing
47
+ 'py-sm',
48
+ //Sizing
49
+ 'border-b-1',
50
+ //Colors
51
+ 'border-b-outline', 'dark:border-b-outline-dark'];
52
+ const Toolbar = [
53
+ // Layout
54
+ 'flex',
55
+ // Spacing
56
+ 'px-sm', 'gap-md',
57
+ // Sizing
58
+ 'border-r-1',
59
+ //Colors
60
+ 'border-r-disabled', 'dark:border-r-outline-dark',
61
+ // Last child
62
+ 'last-of-type:border-none'];
63
+ const ToolbarButton = [
64
+ // Typography
65
+ 'text-on-disabled', 'dark:text-outline-dark'];
66
+ const ToolbarButtonActive = [
67
+ // Typography
68
+ 'text-on-background', 'dark:text-on-background-dark'];
69
+ const EditorInput = [
70
+ // Spacing
71
+ 'p-sm',
72
+ // Typography
73
+ 'typography-body-2-regular', 'text-on-background', 'dark:text-on-background-dark',
74
+ // Sizing
75
+ 'min-h-[88px]'];
76
+
77
+ var script = defineComponent({
78
+ name: 'OrRichTextEditor',
79
+ components: {
80
+ OrIconButton: __vue_component__$1,
81
+ OrLabel: __vue_component__$2,
82
+ OrMenuItem: __vue_component__$3,
83
+ OrMenu: __vue_component__$4
84
+ },
85
+ inheritAttrs: false,
86
+ props: {
87
+ modelValue: {
88
+ type: String,
89
+ default: '',
90
+ required: false
91
+ },
92
+ toolbar: {
93
+ type: Array,
94
+ default: () => [['heading'], ['bold', 'italic', 'strike'], ['underline', 'highlight'], ['link'], ['bulletList', 'orderedList'], ['undo', 'redo']]
95
+ },
96
+ description: {
97
+ type: String,
98
+ default: 'Description'
99
+ },
100
+ placeholder: {
101
+ type: String,
102
+ default: 'Write something...'
103
+ },
104
+ autofocus: {
105
+ type: Boolean,
106
+ default: false
107
+ },
108
+ markdown: {
109
+ type: Boolean,
110
+ default: true
111
+ }
112
+ },
113
+ emits: ['update:modelValue'],
114
+ setup(props, {
115
+ emit
116
+ }) {
117
+ // Refs
118
+ let editor = null;
119
+ const editorRef = ref();
120
+ const containerRef = ref();
121
+ const toolbarButtonRef = ref();
122
+ const menuRef = ref();
123
+ const isActive = ref({});
124
+ const headingLevels = [1, 2, 3, 4];
125
+ const previousHeadingLevel = ref();
126
+ const activeHeadingLevel = ref(0);
127
+ const markdownOutput = ref('');
128
+ const iconsEnum = ref({
129
+ bold: 'format_bold',
130
+ italic: 'format_italic',
131
+ underline: 'format_underlined',
132
+ strike: 'format_strikethrough',
133
+ bulletList: 'format_list_bulleted',
134
+ orderedList: 'format_list_numbered',
135
+ link: 'link',
136
+ highlight: 'highlight',
137
+ redo: 'redo',
138
+ undo: 'undo'
139
+ });
140
+ const iconTooltipsEnum = ref({
141
+ bold: 'Bold',
142
+ italic: 'Italic',
143
+ underline: 'Underline',
144
+ strike: 'Strike',
145
+ bulletList: 'Bulleted List',
146
+ orderedList: 'Numbered List',
147
+ link: 'Link',
148
+ highlight: 'Highlight',
149
+ redo: 'Redo',
150
+ undo: 'Undo'
151
+ });
152
+ const serializerMarks = {
153
+ ...defaultMarkdownSerializer.marks,
154
+ [Bold.name]: defaultMarkdownSerializer.marks.strong,
155
+ [Strike.name]: {
156
+ open: '~~',
157
+ close: '~~',
158
+ mixable: true,
159
+ expelEnclosingWhitespace: true
160
+ },
161
+ [Italic.name]: {
162
+ open: '_',
163
+ close: '_',
164
+ mixable: true,
165
+ expelEnclosingWhitespace: true
166
+ },
167
+ [Highlight.name]: {
168
+ open: '==',
169
+ close: '==',
170
+ mixable: true,
171
+ expelEnclosingWhitespace: true
172
+ },
173
+ [Link.name]: {
174
+ open(state, mark, parent, index) {
175
+ return isPlainURL(mark, parent, index, 1) ? '<' : '[';
176
+ },
177
+ close(state, mark, parent, index) {
178
+ const href = mark.attrs.canonicalSrc || mark.attrs.href;
179
+ return isPlainURL(mark, parent, index, -1) ? '>' : `](${state.esc(href)}${mark.attrs.title ? ` ${state.quote(mark.attrs.title)}` : ''})`;
180
+ }
181
+ }
182
+ };
183
+ const serializerNodes = {
184
+ ...defaultMarkdownSerializer.nodes,
185
+ [Paragraph.name]: defaultMarkdownSerializer.nodes.paragraph,
186
+ [BulletList.name]: defaultMarkdownSerializer.nodes.bullet_list,
187
+ [ListItem.name]: defaultMarkdownSerializer.nodes.list_item,
188
+ [OrderedList.name]: defaultMarkdownSerializer.nodes.ordered_list
189
+ // [HardBreak.name]: //TODO: add hard break
190
+ };
191
+
192
+ onMounted(() => {
193
+ editor = new Editor({
194
+ onUpdate: ({
195
+ editor
196
+ }) => {
197
+ setActiveFormats();
198
+ const html = editor.getHTML();
199
+ const text = editor.getText();
200
+ if (props.markdown) {
201
+ const markdown = markdownOutput.value = serialize(editor.schema, editor.getJSON());
202
+ emit('update:modelValue', markdown);
203
+ } else {
204
+ emit('update:modelValue', text === '' ? text : html);
205
+ }
206
+ },
207
+ onCreate: ({
208
+ editor
209
+ }) => {
210
+ if (props.markdown) {
211
+ const deserialized = deserialize(editor.schema, props.modelValue);
212
+ editor.commands.setContent(deserialized);
213
+ } else {
214
+ editor.commands.setContent(props.modelValue);
215
+ }
216
+ },
217
+ element: editorRef.value,
218
+ autofocus: props.autofocus,
219
+ extensions: [StarterKit.configure({
220
+ heading: false
221
+ }), Heading.configure({
222
+ levels: headingLevels
223
+ }).extend({
224
+ levels: headingLevels,
225
+ renderHTML({
226
+ node,
227
+ HTMLAttributes
228
+ }) {
229
+ return ['h' + node.attrs.level, mergeAttributes(HTMLAttributes, {
230
+ class: `typography-headline-${node.attrs.level}`
231
+ }), 0];
232
+ }
233
+ }), Underline, Link.configure({
234
+ openOnClick: true,
235
+ linkOnPaste: true,
236
+ autolink: false,
237
+ protocols: ['ftp', 'mailto', 'http', 'https'],
238
+ validate: href => /^https?:\/\//.test(href),
239
+ HTMLAttributes: {
240
+ class: 'text-primary cursor-pointer'
241
+ }
242
+ }), Highlight, Placeholder.configure({
243
+ placeholder: props.placeholder,
244
+ emptyEditorClass: 'is-editor-empty text-outline'
245
+ })],
246
+ editorProps: {
247
+ attributes: {
248
+ class: 'focus:outline-none'
249
+ }
250
+ }
251
+ });
252
+ setActiveFormats();
253
+ });
254
+ onBeforeUnmount(() => {
255
+ editor === null || editor === void 0 ? void 0 : editor.destroy();
256
+ });
257
+ // Computed
258
+ const getIndexOfHeading = computed(() => {
259
+ return props.toolbar.flat().indexOf('heading');
260
+ });
261
+ const headingIcon = computed(() => {
262
+ if (activeHeadingLevel.value && isActive.value.heading) {
263
+ return `format_h${activeHeadingLevel.value}`;
264
+ }
265
+ return 'format_paragraph';
266
+ });
267
+ // Methods
268
+ const handleEditorClick = () => {
269
+ setActiveFormats();
270
+ editor === null || editor === void 0 ? void 0 : editor.commands.focus();
271
+ };
272
+ const handleToolbarClick = (item, level) => {
273
+ if (item === 'bulletList' || item === 'orderedList') {
274
+ item === 'bulletList' ? editor === null || editor === void 0 ? void 0 : editor.commands.toggleBulletList() : editor === null || editor === void 0 ? void 0 : editor.commands.toggleOrderedList();
275
+ } else if (item === 'link') {
276
+ setLink();
277
+ } else if (item === 'heading') {
278
+ if (!level) {
279
+ editor === null || editor === void 0 ? void 0 : editor.commands.toggleHeading({
280
+ level: previousHeadingLevel.value
281
+ });
282
+ activeHeadingLevel.value = 0;
283
+ } else {
284
+ activeHeadingLevel.value = level;
285
+ previousHeadingLevel.value = level;
286
+ editor === null || editor === void 0 ? void 0 : editor.commands.toggleHeading({
287
+ level: level
288
+ });
289
+ }
290
+ editor === null || editor === void 0 ? void 0 : editor.commands.focus();
291
+ } else if (item === 'undo' || item === 'redo') {
292
+ item === 'undo' ? editor === null || editor === void 0 ? void 0 : editor.commands.undo() : editor === null || editor === void 0 ? void 0 : editor.commands.redo();
293
+ } else {
294
+ editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleMark(item).run();
295
+ }
296
+ };
297
+ const setLink = () => {
298
+ const previousUrl = editor === null || editor === void 0 ? void 0 : editor.getAttributes('link').href;
299
+ const url = window.prompt('URL', previousUrl);
300
+ // cancelled
301
+ if (url === null) {
302
+ return;
303
+ }
304
+ // empty
305
+ if (url === '') {
306
+ editor === null || editor === void 0 ? void 0 : editor.chain().focus().extendMarkRange('link').unsetLink().run();
307
+ return;
308
+ }
309
+ // update link
310
+ editor === null || editor === void 0 ? void 0 : editor.chain().focus().extendMarkRange('link').setLink({
311
+ href: url
312
+ }).run();
313
+ };
314
+ const setActiveFormats = () => {
315
+ const toolbarList = props.toolbar.flat();
316
+ toolbarList.forEach(item => {
317
+ isActive.value[item] = (editor === null || editor === void 0 ? void 0 : editor.isActive(item)) || false;
318
+ });
319
+ };
320
+ // Styles
321
+ const classAttribute = useClassAttribute();
322
+ const rootStyles = computed(() => {
323
+ return ['or-rich-text-editor', classAttribute.value];
324
+ });
325
+ const containerStyles = computed(() => {
326
+ return [...EditorContainer];
327
+ });
328
+ const toolbarContainerStyles = computed(() => {
329
+ return [...ToolbarContainer];
330
+ });
331
+ const toolbarStyles = computed(() => {
332
+ return [...Toolbar];
333
+ });
334
+ const editorInputStyles = computed(() => {
335
+ return ['tiptap-editor', ...EditorInput];
336
+ });
337
+ const toolbarButtonStyles = item => {
338
+ return [
339
+ // Layout
340
+ 'flex',
341
+ // Spacing
342
+ 'gap-md', ...(isActive.value[item] ? ToolbarButtonActive : ToolbarButton)];
343
+ };
344
+ const isPlainURL = (link, parent, index, side) => {
345
+ if (link.attrs.title || !/^\w+:/.test(link.attrs.href)) return false;
346
+ const content = parent.child(index + (side < 0 ? -1 : 0));
347
+ if (!content.isText || content.text !== link.attrs.href || content.marks[content.marks.length - 1] !== link) return false;
348
+ if (index === (side < 0 ? 1 : parent.childCount - 1)) return true;
349
+ const next = parent.child(index + (side < 0 ? -2 : 1));
350
+ return !link.isInSet(next.marks);
351
+ };
352
+ const serialize = (schema, content) => {
353
+ const proseMirrorDocument = schema.nodeFromJSON(content);
354
+ const serializer = new MarkdownSerializer(serializerNodes, serializerMarks);
355
+ return serializer.serialize(proseMirrorDocument, {
356
+ tightLists: true
357
+ });
358
+ };
359
+ const deserialize = (schema, content) => {
360
+ const html = marked.parse(content);
361
+ if (!html) return null;
362
+ const parser = new DOMParser();
363
+ const {
364
+ body
365
+ } = parser.parseFromString(html, 'text/html');
366
+ // append original source as a comment that nodes can access
367
+ body.append(document.createComment(content));
368
+ const state = DOMParser$1.fromSchema(schema).parse(body);
369
+ return state.toJSON();
370
+ };
371
+ //Effects
372
+ watch(() => props.modelValue, value => {
373
+ if (value !== (editor === null || editor === void 0 ? void 0 : editor.getHTML()) && !props.markdown) {
374
+ editor === null || editor === void 0 ? void 0 : editor.commands.setContent(value);
375
+ }
376
+ if (props.markdown && value !== markdownOutput.value) {
377
+ editor === null || editor === void 0 ? void 0 : editor.commands.setContent(markdownOutput.value);
378
+ }
379
+ });
380
+ return {
381
+ editor,
382
+ editorRef,
383
+ containerRef,
384
+ toolbarButtonRef,
385
+ menuRef,
386
+ iconsEnum,
387
+ handleToolbarClick,
388
+ handleEditorClick,
389
+ isActive,
390
+ iconTooltipsEnum,
391
+ containerStyles,
392
+ toolbarContainerStyles,
393
+ toolbarStyles,
394
+ rootStyles,
395
+ toolbarButtonStyles,
396
+ editorInputStyles,
397
+ getIndexOfHeading,
398
+ headingLevels,
399
+ headingIcon
400
+ };
401
+ }
402
+ });
403
+
404
+ /* script */
405
+ const __vue_script__ = script;
406
+
407
+ /* template */
408
+ var __vue_render__ = function () {
409
+ var _vm = this;
410
+ var _h = _vm.$createElement;
411
+ var _c = _vm._self._c || _h;
412
+ return _c('div', _vm._b({
413
+ ref: "root",
414
+ class: _vm.rootStyles
415
+ }, 'div', _vm.$attrs, false), [_c('or-label', [_vm._v("\n " + _vm._s(_vm.description) + "\n ")]), _vm._v(" "), _c('div', {
416
+ ref: "containerRef",
417
+ class: _vm.containerStyles,
418
+ on: {
419
+ "click": function ($event) {
420
+ return _vm.handleEditorClick();
421
+ }
422
+ }
423
+ }, [_c('div', {
424
+ class: _vm.toolbarContainerStyles
425
+ }, _vm._l(_vm.toolbar, function (tool) {
426
+ return _c('div', {
427
+ key: tool,
428
+ class: _vm.toolbarStyles
429
+ }, _vm._l(tool, function (item) {
430
+ return _c('div', {
431
+ key: item,
432
+ staticClass: "-my-xs",
433
+ class: _vm.toolbarButtonStyles(item)
434
+ }, [item === 'heading' ? _c('or-icon-button', {
435
+ ref: "toolbarButtonRef",
436
+ refInFor: true,
437
+ attrs: {
438
+ "tooltip": {
439
+ text: item,
440
+ placement: 'top'
441
+ },
442
+ "icon": {
443
+ icon: _vm.headingIcon,
444
+ variant: 'inherit',
445
+ size: 'm'
446
+ }
447
+ },
448
+ on: {
449
+ "click": function ($event) {
450
+ return _vm.menuRef.open();
451
+ }
452
+ }
453
+ }) : _c('or-icon-button', {
454
+ attrs: {
455
+ "tooltip": {
456
+ text: _vm.iconTooltipsEnum[item],
457
+ placement: 'top'
458
+ },
459
+ "icon": {
460
+ icon: _vm.iconsEnum[item],
461
+ variant: 'inherit',
462
+ size: 'm'
463
+ }
464
+ },
465
+ on: {
466
+ "click": function ($event) {
467
+ return _vm.handleToolbarClick(item);
468
+ }
469
+ }
470
+ })], 1);
471
+ }), 0);
472
+ }), 0), _vm._v(" "), _c('div', {
473
+ ref: "editorRef",
474
+ class: _vm.editorInputStyles
475
+ })]), _vm._v(" "), _vm.toolbarButtonRef ? _c('or-menu', {
476
+ ref: "menuRef",
477
+ attrs: {
478
+ "trigger": _vm.toolbarButtonRef[_vm.getIndexOfHeading].root,
479
+ "placement": "bottom-start"
480
+ }
481
+ }, [_vm._l(_vm.headingLevels, function (heading) {
482
+ return _c('or-menu-item', {
483
+ key: heading,
484
+ on: {
485
+ "click": function ($event) {
486
+ return _vm.handleToolbarClick('heading', heading);
487
+ }
488
+ }
489
+ }, [_vm._v("\n Heading " + _vm._s(heading) + "\n ")]);
490
+ }), _vm._v(" "), _c('or-menu-item', {
491
+ on: {
492
+ "click": function ($event) {
493
+ return _vm.handleToolbarClick('heading');
494
+ }
495
+ }
496
+ }, [_vm._v("\n None\n ")])], 2) : _vm._e()], 1);
497
+ };
498
+ var __vue_staticRenderFns__ = [];
499
+
500
+ /* style */
501
+ const __vue_inject_styles__ = function (inject) {
502
+ if (!inject) return;
503
+ inject("data-v-592455cc_0", {
504
+ source: ".tiptap-editor ol{margin:0 24px;list-style:decimal}.tiptap-editor ul{margin:0 24px;list-style:initial}.tiptap-editor .is-editor-empty::before{content:attr(data-placeholder);height:0;pointer-events:none;float:left}",
505
+ map: undefined,
506
+ media: undefined
507
+ });
508
+ };
509
+ /* scoped */
510
+ const __vue_scope_id__ = undefined;
511
+ /* module identifier */
512
+ const __vue_module_identifier__ = undefined;
513
+ /* functional template */
514
+ const __vue_is_functional_template__ = false;
515
+ /* style inject SSR */
516
+
517
+ /* style inject shadow dom */
518
+
519
+ const __vue_component__ = /*#__PURE__*/normalizeComponent({
520
+ render: __vue_render__,
521
+ staticRenderFns: __vue_staticRenderFns__
522
+ }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, createInjector, undefined, undefined);
523
+
524
+ export { __vue_component__ as OrRichTextEditor };
@@ -0,0 +1,6 @@
1
+ export declare const EditorContainer: string[];
2
+ export declare const ToolbarContainer: string[];
3
+ export declare const Toolbar: string[];
4
+ export declare const ToolbarButton: string[];
5
+ export declare const ToolbarButtonActive: string[];
6
+ export declare const EditorInput: string[];
@@ -19,7 +19,7 @@ export { _ as OrCode, O as OrCodeLanguages } from './OrCode-41dd5f9b.js';
19
19
  export { _ as OrCollapse } from './OrCollapse-4d892ca3.js';
20
20
  export { _ as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from './OrColorPicker-75abefdd.js';
21
21
  export { _ as OrConfirm } from './OrConfirm-d7112dd3.js';
22
- export { C as ConfirmType, _ as OrConfirmV3 } from './OrConfirm-e3b3418f.js';
22
+ export { C as ConfirmType, _ as OrConfirmV3 } from './OrConfirm-367ac968.js';
23
23
  export { D as DEFAULT_TEXT, _ as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from './OrDateTimePicker-349df9b2.js';
24
24
  export { _ as OrError } from './OrError-081130bb.js';
25
25
  export { _ as OrErrorTagV3 } from './OrErrorTag-c14e0298.js';
@@ -217,7 +217,7 @@ var script = defineComponent({
217
217
  });
218
218
 
219
219
  const _hoisted_1 = {
220
- class: /*#__PURE__*/normalizeClass(['grow', 'overflow-y-auto', 'overflow-x-hidden'])
220
+ class: /*#__PURE__*/normalizeClass(['grow', 'overflow-y-auto'])
221
221
  };
222
222
  function render(_ctx, _cache, $props, $setup, $data, $options) {
223
223
  const _component_OrInput = resolveComponent("OrInput");
@@ -16,7 +16,7 @@ export { s as OrCode, O as OrCodeLanguages } from '../OrCode-ee19a5e6.js';
16
16
  export { s as OrCollapse } from '../OrCollapse-445141ab.js';
17
17
  export { s as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from '../OrColorPicker-189cb097.js';
18
18
  export { s as OrConfirm } from '../OrConfirm-f39bd784.js';
19
- export { C as ConfirmType, s as OrConfirmV3 } from '../OrConfirm-b78c5299.js';
19
+ export { C as ConfirmType, s as OrConfirmV3 } from '../OrConfirm-e6735cc8.js';
20
20
  export { D as DEFAULT_TEXT, s as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from '../OrDateTimePicker-f2e08564.js';
21
21
  export { s as OrError } from '../OrError-f90296db.js';
22
22
  export { s as OrErrorTagV3 } from '../OrErrorTag-bbfd3ca6.js';
@@ -1,4 +1,4 @@
1
- export { C as ConfirmType, s as OrConfirmV3 } from '../../OrConfirm-b78c5299.js';
1
+ export { C as ConfirmType, s as OrConfirmV3 } from '../../OrConfirm-e6735cc8.js';
2
2
  import 'vue-demi';
3
3
  import '../../OrButton-4d0c2edd.js';
4
4
  import '../../useClassAttribute-47fdb016.js';
@@ -0,0 +1,12 @@
1
+ import { Meta, StoryFn } from '@storybook/vue3';
2
+ declare const _default: Meta<import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<unknown>, import("@vue/composition-api").MethodOptions, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>, import("@vue/composition-api").ExtractPropTypes<import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
3
+ [x: string]: ((...args: any[]) => any) | null;
4
+ } | string[], {} & {}, {
5
+ [x: number]: string;
6
+ } | {}, true>)>;
7
+ export default _default;
8
+ export declare const RichTextEditor: StoryFn<import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<unknown>, import("@vue/composition-api").MethodOptions, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>, import("@vue/composition-api").ExtractPropTypes<import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
9
+ [x: string]: ((...args: any[]) => any) | null;
10
+ } | string[], {} & {}, {
11
+ [x: number]: string;
12
+ } | {}, true>)>;