@onereach/ui-components 8.18.2 → 8.18.3-beta.3938.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 +15 -8
- package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +2 -0
- package/dist/bundled/v2/index.js +1 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.js +1 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +1 -0
- 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.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-243f2ed9.js → OrRichTextEditorV3-1ebcb9b0.js} +17 -11
- package/dist/bundled/v3/components/index.js +1 -1
- package/dist/bundled/v3/index.js +2 -2
- package/dist/esm/v2/{OrRichTextEditor-1b7aeae0.js → OrRichTextEditor-a0463597.js} +15 -8
- package/dist/esm/v2/components/index.js +1 -1
- package/dist/esm/v2/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +2 -0
- package/dist/esm/v2/components/or-rich-text-editor-v3/index.js +1 -1
- package/dist/esm/v2/index.js +1 -1
- package/dist/esm/v3/{OrRichTextEditor-9b45fff5.js → OrRichTextEditor-9a0602f9.js} +17 -11
- package/dist/esm/v3/components/index.js +1 -1
- package/dist/esm/v3/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +1 -0
- package/dist/esm/v3/components/or-rich-text-editor-v3/index.js +1 -1
- package/dist/esm/v3/index.js +1 -1
- package/package.json +2 -3
- package/src/components/or-rich-text-editor-v3/OrRichTextEditor.vue +8 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
export { s as default } from '../OrRichTextEditorV3-
|
|
1
|
+
export { s as default } from '../OrRichTextEditorV3-1ebcb9b0.js';
|
|
@@ -74,6 +74,7 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
74
74
|
proxyModelValue: import("vue-demi").WritableComputedRef<string | undefined>;
|
|
75
75
|
disableMarkdown: import("vue-demi").Ref<boolean>;
|
|
76
76
|
sourceValue: import("vue-demi").Ref<string>;
|
|
77
|
+
activeHeadingLevel: import("vue-demi").Ref<number>;
|
|
77
78
|
}, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("update:modelValue" | "input" | "file-upload")[], "update:modelValue" | "input" | "file-upload", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
78
79
|
modelValue: {
|
|
79
80
|
type: StringConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { F as Formats, s as OrRichTextEditorV3 } from '../OrRichTextEditorV3-
|
|
1
|
+
export { F as Formats, s as OrRichTextEditorV3 } from '../OrRichTextEditorV3-1ebcb9b0.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { F as Formats } from '../OrRichTextEditorV3-
|
|
1
|
+
export { F as Formats } from '../OrRichTextEditorV3-1ebcb9b0.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { E as EditorContainer, f as EditorInput, b as Toolbar, c as ToolbarButton, e as ToolbarButtonFocused, T as ToolbarContainer } from '../OrRichTextEditorV3-
|
|
1
|
+
export { E as EditorContainer, f as EditorInput, b as Toolbar, c as ToolbarButton, e as ToolbarButtonFocused, T as ToolbarContainer } from '../OrRichTextEditorV3-1ebcb9b0.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { i as default } from '../../../OrRichTextEditorV3-
|
|
1
|
+
export { i as default } from '../../../OrRichTextEditorV3-1ebcb9b0.js';
|
|
2
2
|
import '../../../OrCode-46b1b8aa.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { C as default } from '../../../OrRichTextEditorV3-
|
|
1
|
+
export { C as default } from '../../../OrRichTextEditorV3-1ebcb9b0.js';
|
|
2
2
|
import '../../../OrCode-46b1b8aa.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { C as CodeMirrorView } from '../../../OrRichTextEditorV3-
|
|
1
|
+
export { C as CodeMirrorView } from '../../../OrRichTextEditorV3-1ebcb9b0.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../../../OrCode-46b1b8aa.js';
|
|
2
2
|
import '../../../../hooks/useTheme.js';
|
|
3
|
-
export { g as color, t as default, h as orCodeHighlightStyle, o as orCodeTheme } from '../../../OrRichTextEditorV3-
|
|
3
|
+
export { g as color, t as default, h as orCodeHighlightStyle, o as orCodeTheme } from '../../../OrRichTextEditorV3-1ebcb9b0.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { d as deserialize, a as serialize } from '../../OrRichTextEditorV3-
|
|
1
|
+
export { d as deserialize, a as serialize } from '../../OrRichTextEditorV3-1ebcb9b0.js';
|
package/dist/bundled/v3/components/{OrRichTextEditorV3-243f2ed9.js → OrRichTextEditorV3-1ebcb9b0.js}
RENAMED
|
@@ -27283,11 +27283,12 @@ var script = defineComponent({
|
|
|
27283
27283
|
proxyModelValue.value = markdownOutput.value;
|
|
27284
27284
|
};
|
|
27285
27285
|
const handleToolbarClick = (item, level) => {
|
|
27286
|
-
var _a, _b;
|
|
27286
|
+
var _a, _b, _c, _d;
|
|
27287
27287
|
switch (item) {
|
|
27288
27288
|
case 'source':
|
|
27289
27289
|
disableMarkdown.value = !disableMarkdown.value;
|
|
27290
27290
|
sourceValue.value = serialize(editor === null || editor === void 0 ? void 0 : editor.schema, editor === null || editor === void 0 ? void 0 : editor.getJSON());
|
|
27291
|
+
(_a = textareaRef.value) === null || _a === void 0 ? void 0 : _a.style.setProperty('height', `${((_b = editorRef.value) === null || _b === void 0 ? void 0 : _b.offsetHeight) || 88}px`);
|
|
27291
27292
|
nextTick(() => {
|
|
27292
27293
|
var _a;
|
|
27293
27294
|
return (_a = textareaRef.value) === null || _a === void 0 ? void 0 : _a.focus();
|
|
@@ -27305,15 +27306,15 @@ var script = defineComponent({
|
|
|
27305
27306
|
to,
|
|
27306
27307
|
empty
|
|
27307
27308
|
} = editor.state.selection;
|
|
27308
|
-
const isLink = (
|
|
27309
|
-
const existedText = (isLink === null || isLink === void 0 ? void 0 : isLink.length) ? ((
|
|
27309
|
+
const isLink = (_c = editor.view.state.doc.nodeAt(cursorPosition)) === null || _c === void 0 ? void 0 : _c.marks.filter(mark => mark.type.name === 'link');
|
|
27310
|
+
const existedText = (isLink === null || isLink === void 0 ? void 0 : isLink.length) ? ((_d = editor.view.state.doc.nodeAt(cursorPosition)) === null || _d === void 0 ? void 0 : _d.text) || '' : '';
|
|
27310
27311
|
text.value = empty ? existedText : editor.state.doc.textBetween(from, to, ' ');
|
|
27311
27312
|
link.value = editor.getAttributes('link').href || '';
|
|
27312
27313
|
}
|
|
27313
27314
|
isOpenLinkModal.value = !isOpenLinkModal.value;
|
|
27314
27315
|
break;
|
|
27315
27316
|
case 'blockquote':
|
|
27316
|
-
editor === null || editor === void 0 ? void 0 : editor.chain().
|
|
27317
|
+
editor === null || editor === void 0 ? void 0 : editor.chain().toggleBlockquote().run();
|
|
27317
27318
|
break;
|
|
27318
27319
|
case 'codeBlock':
|
|
27319
27320
|
if (!isActive.value['codeBlock']) {
|
|
@@ -27334,7 +27335,6 @@ var script = defineComponent({
|
|
|
27334
27335
|
level: level
|
|
27335
27336
|
});
|
|
27336
27337
|
}
|
|
27337
|
-
editor === null || editor === void 0 ? void 0 : editor.commands.focus();
|
|
27338
27338
|
break;
|
|
27339
27339
|
case 'undo':
|
|
27340
27340
|
case 'redo':
|
|
@@ -27344,7 +27344,7 @@ var script = defineComponent({
|
|
|
27344
27344
|
context.emit('file-upload');
|
|
27345
27345
|
break;
|
|
27346
27346
|
default:
|
|
27347
|
-
editor === null || editor === void 0 ? void 0 : editor.chain().
|
|
27347
|
+
editor === null || editor === void 0 ? void 0 : editor.chain().toggleMark(item).run();
|
|
27348
27348
|
break;
|
|
27349
27349
|
}
|
|
27350
27350
|
};
|
|
@@ -27463,7 +27463,8 @@ var script = defineComponent({
|
|
|
27463
27463
|
handleInput,
|
|
27464
27464
|
proxyModelValue,
|
|
27465
27465
|
disableMarkdown,
|
|
27466
|
-
sourceValue
|
|
27466
|
+
sourceValue,
|
|
27467
|
+
activeHeadingLevel
|
|
27467
27468
|
};
|
|
27468
27469
|
}
|
|
27469
27470
|
});
|
|
@@ -27531,7 +27532,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
27531
27532
|
variant: 'inherit',
|
|
27532
27533
|
size: 'm'
|
|
27533
27534
|
},
|
|
27534
|
-
onClick: _cache[0] || (_cache[0] = $event => _ctx.menuRef.
|
|
27535
|
+
onClick: _cache[0] || (_cache[0] = $event => _ctx.menuRef.toggle())
|
|
27535
27536
|
}, null, 8 /* PROPS */, ["selected", "disabled", "tooltip", "icon"])) : _ctx.isVisible(item) ? (openBlock(), createBlock(_component_or_icon_button, {
|
|
27536
27537
|
key: 1,
|
|
27537
27538
|
tooltip: {
|
|
@@ -27609,19 +27610,24 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
27609
27610
|
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.headingLevels, heading => {
|
|
27610
27611
|
return openBlock(), createBlock(_component_or_menu_item, {
|
|
27611
27612
|
key: heading,
|
|
27613
|
+
class: normalizeClass({
|
|
27614
|
+
'bg-surface-1': _ctx.activeHeadingLevel === heading
|
|
27615
|
+
}),
|
|
27612
27616
|
onClick: $event => _ctx.handleToolbarClick('heading', heading)
|
|
27613
27617
|
}, {
|
|
27614
27618
|
default: withCtx(() => [createTextVNode(" Heading " + toDisplayString(heading), 1 /* TEXT */)]),
|
|
27615
27619
|
|
|
27616
27620
|
_: 2 /* DYNAMIC */
|
|
27617
|
-
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick"]);
|
|
27621
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["class", "onClick"]);
|
|
27618
27622
|
}), 128 /* KEYED_FRAGMENT */)), createVNode(_component_or_menu_item, {
|
|
27623
|
+
class: normalizeClass({
|
|
27624
|
+
'bg-surface-1': !_ctx.activeHeadingLevel
|
|
27625
|
+
}),
|
|
27619
27626
|
onClick: _cache[5] || (_cache[5] = $event => _ctx.handleToolbarClick('heading'))
|
|
27620
27627
|
}, {
|
|
27621
27628
|
default: withCtx(() => [createTextVNode(" None ")]),
|
|
27622
27629
|
_: 1 /* STABLE */
|
|
27623
|
-
})]),
|
|
27624
|
-
|
|
27630
|
+
}, 8 /* PROPS */, ["class"])]),
|
|
27625
27631
|
_: 1 /* STABLE */
|
|
27626
27632
|
}, 8 /* PROPS */, ["trigger"])) : createCommentVNode("v-if", true), createVNode(_component_or_modal, {
|
|
27627
27633
|
"is-open": _ctx.isOpenLinkModal,
|
|
@@ -80,7 +80,7 @@ export { s as OrRangeSliderV3 } from './OrRangeSliderV3-f8024c15.js';
|
|
|
80
80
|
export { s as OrSliderV3, S as RangeSliderColor, a as RangeSliderOrientation, S as SliderColor, a as SliderOrientation } from './OrSliderV3-b69331d1.js';
|
|
81
81
|
export { s as OrRatingV3 } from './OrRatingV3-b6b47938.js';
|
|
82
82
|
export { s as OrResizeablePanelV3, R as ResizeablePanelPadding, a as ResizeablePanelPlacement, R as SidebarPadding } from './OrResizeablePanelV3-39bf5dc7.js';
|
|
83
|
-
export { F as Formats, s as OrRichTextEditorV3 } from './OrRichTextEditorV3-
|
|
83
|
+
export { F as Formats, s as OrRichTextEditorV3 } from './OrRichTextEditorV3-1ebcb9b0.js';
|
|
84
84
|
export { default as OrSearch } from './OrSearch/OrSearch.js';
|
|
85
85
|
export { OrSearchV3 } from './OrSearchV3/index.js';
|
|
86
86
|
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControlV3-56862f95.js';
|