@onereach/ui-components 2.70.0-beta.2164.0 → 2.70.0-beta.2167.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/{OrRichTextEditor-9e2535da.js → OrRichTextEditor-eb28a309.js} +15 -5
- package/dist/bundled/v2/components/index.js +1 -1
- package/dist/bundled/v2/components/or-rich-text-editor-v3/index.js +2 -2
- package/dist/bundled/v2/components/or-rich-text-editor-v3/styles.d.ts +1 -0
- package/dist/bundled/v2/index.js +2 -2
- package/dist/bundled/v3/{OrRichTextEditor.vue_vue_type_script_lang-1aa9ad53.js → OrRichTextEditor.vue_vue_type_script_lang-067e56ab.js} +14 -4
- package/dist/bundled/v3/components/index.js +1 -1
- package/dist/bundled/v3/components/or-rich-text-editor-v3/index.js +2 -2
- package/dist/bundled/v3/components/or-rich-text-editor-v3/styles.d.ts +1 -0
- package/dist/bundled/v3/index.js +3 -3
- package/dist/esm/v2/{OrRichTextEditor-ed356c5b.js → OrRichTextEditor-3a2ba021.js} +15 -6
- package/dist/esm/v2/components/index.js +1 -1
- package/dist/esm/v2/components/or-rich-text-editor-v3/index.js +1 -1
- 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-f710fc9d.js → OrRichTextEditor-91a94381.js} +14 -5
- package/dist/esm/v3/components/index.js +1 -1
- package/dist/esm/v3/components/or-rich-text-editor-v3/index.js +1 -1
- 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 +1 -1
- package/src/components/or-rich-text-editor-v3/OrRichTextEditor.vue +12 -3
- package/src/components/or-rich-text-editor-v3/styles.ts +6 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import './index-fa6eb4ca.js';
|
|
2
|
+
import { onClickOutside } from '@vueuse/core';
|
|
2
3
|
import { S as Schema, M as Mark$1, T as TextSelection, N as NodeSelection, a as Selection, b as Slice, d as dropPoint, D as DOMSerializer, F as Fragment, c as DOMParser$1, A as AllSelection, P as Plugin, e as NodeRange, f as findWrapping, R as ReplaceAroundStep, g as canSplit, l as liftTarget, h as canJoin, i as PluginKey, E as EditorState, j as createParagraphNear$1, k as deleteSelection$1, m as exitCode$1, n as joinUp$1, o as joinDown$1, p as joinBackward$1, q as joinForward$1, r as lift$1, s as liftEmptyBlock$1, t as newlineInCode$1, u as selectNodeBackward$1, v as selectNodeForward$1, w as selectParentNode$1, x as selectTextblockEnd$1, y as selectTextblockStart$1, z as Transform, B as setBlockType, C as wrapIn$1, G as ReplaceStep, H as Mapping, I as CodeMirrorView } from './codemirrorView-77ce9187.js';
|
|
3
4
|
import require$$8 from 'node:punycode';
|
|
4
5
|
import { c as keyName, d as base } from './index-780d00b0.js';
|
|
@@ -28071,7 +28072,10 @@ const Toolbar = [
|
|
|
28071
28072
|
'last-of-type:border-none'];
|
|
28072
28073
|
const ToolbarButton = [
|
|
28073
28074
|
// Typography
|
|
28074
|
-
'text-on-disabled', 'dark:text-
|
|
28075
|
+
'text-on-disabled', 'dark:text-on-disabled-dark'];
|
|
28076
|
+
const ToolbarButtonFocused = [
|
|
28077
|
+
// Typography
|
|
28078
|
+
'text-outline', 'dark:text-outline-dark'];
|
|
28075
28079
|
const ToolbarButtonActive = [
|
|
28076
28080
|
// Typography
|
|
28077
28081
|
'text-on-background', 'dark:text-on-background-dark'];
|
|
@@ -29597,6 +29601,7 @@ var script = defineComponent({
|
|
|
29597
29601
|
const toolbarButtonRef = ref();
|
|
29598
29602
|
const menuRef = ref();
|
|
29599
29603
|
const isActive = ref({});
|
|
29604
|
+
const isFocused = ref(props.autofocus);
|
|
29600
29605
|
const headingLevels = [1, 2, 3, 4];
|
|
29601
29606
|
const previousHeadingLevel = ref();
|
|
29602
29607
|
const activeHeadingLevel = ref(0);
|
|
@@ -29639,6 +29644,7 @@ var script = defineComponent({
|
|
|
29639
29644
|
onUpdate: ({
|
|
29640
29645
|
editor
|
|
29641
29646
|
}) => {
|
|
29647
|
+
isFocused.value = true;
|
|
29642
29648
|
setActiveFormats();
|
|
29643
29649
|
const html = editor.getHTML();
|
|
29644
29650
|
const text = editor.getText();
|
|
@@ -29700,7 +29706,10 @@ var script = defineComponent({
|
|
|
29700
29706
|
onBeforeUnmount(() => {
|
|
29701
29707
|
editor === null || editor === void 0 ? void 0 : editor.destroy();
|
|
29702
29708
|
});
|
|
29703
|
-
|
|
29709
|
+
onClickOutside(root, () => {
|
|
29710
|
+
isFocused.value = false;
|
|
29711
|
+
// trap.deactivate();
|
|
29712
|
+
});
|
|
29704
29713
|
// Computed
|
|
29705
29714
|
const proxyModelValue = computed({
|
|
29706
29715
|
get: () => {
|
|
@@ -29725,6 +29734,7 @@ var script = defineComponent({
|
|
|
29725
29734
|
//Methods
|
|
29726
29735
|
const handleEditorClick = () => {
|
|
29727
29736
|
setActiveFormats();
|
|
29737
|
+
isFocused.value = true;
|
|
29728
29738
|
editor === null || editor === void 0 ? void 0 : editor.commands.focus();
|
|
29729
29739
|
};
|
|
29730
29740
|
const handleToolbarClick = (item, level) => {
|
|
@@ -29797,7 +29807,7 @@ var script = defineComponent({
|
|
|
29797
29807
|
return [...ToolbarContainer];
|
|
29798
29808
|
});
|
|
29799
29809
|
const toolbarStyles = computed(() => {
|
|
29800
|
-
return [...Toolbar];
|
|
29810
|
+
return [...Toolbar, ...(isFocused.value ? ToolbarButtonFocused : ToolbarButton)];
|
|
29801
29811
|
});
|
|
29802
29812
|
const editorInputStyles = computed(() => {
|
|
29803
29813
|
return ['tiptap-editor', ...(props.fullHeight ? ['h-full'] : []), ...EditorInput];
|
|
@@ -29807,7 +29817,7 @@ var script = defineComponent({
|
|
|
29807
29817
|
// Layout
|
|
29808
29818
|
'flex',
|
|
29809
29819
|
// Spacing
|
|
29810
|
-
'gap-md', ...(isActive.value[item] ? ToolbarButtonActive :
|
|
29820
|
+
'gap-md', ...(isActive.value[item] ? ToolbarButtonActive : [])];
|
|
29811
29821
|
};
|
|
29812
29822
|
//Effects
|
|
29813
29823
|
watch(proxyModelValue, value => {
|
|
@@ -29943,7 +29953,7 @@ var __vue_staticRenderFns__ = [];
|
|
|
29943
29953
|
/* style */
|
|
29944
29954
|
const __vue_inject_styles__ = function (inject) {
|
|
29945
29955
|
if (!inject) return;
|
|
29946
|
-
inject("data-v-
|
|
29956
|
+
inject("data-v-98327460_0", {
|
|
29947
29957
|
source: ".tiptap-editor ol{margin:0 24px;list-style:decimal}.tiptap-editor ul{margin:0 24px;list-style:initial}.tiptap-editor pre{background-color:rgba(186,209,236,.3);padding:4px 8px;margin:4px 0;width:100%;border-radius:4px}.tiptap-editor blockquote{margin:8px 24px;padding:0 24px;border-left:4px solid #bad1ec}.tiptap-editor .is-editor-empty::before{content:attr(data-placeholder);height:0;pointer-events:none;float:left}.tiptap-editor .cm-editor{border:none;border-radius:4px}.tiptap-editor .cm-editor .cm-scroller{border-radius:4px}.tiptap-editor .cm-editor.cm-focused{outline:0}.tiptap-editor .cm-editor .cm-gutters{background-color:rgba(0,95,177,.08);border:none}.tiptap-editor .cm-editor .cm-gutters .cm-gutterElement{padding:0 10px}.tiptap-editor .cm-editor .cm-gutters .cm-gutterElement.cm-activeLineGutter{background-color:rgba(0,95,177,.07)}",
|
|
29948
29958
|
map: undefined,
|
|
29949
29959
|
media: undefined
|
|
@@ -96,7 +96,7 @@ export { p as PropsV3, a as useQueueV3, u as useToastV3 } from '../useToast-3a3d
|
|
|
96
96
|
export { O as OrTooltip } from '../OrTooltip-dfea7af2.js';
|
|
97
97
|
export { O as OrTooltipContent } from '../OrTooltipContent-f0fd5f75.js';
|
|
98
98
|
export { O as OrTooltipV3 } from '../OrTooltip-fbfa05fd.js';
|
|
99
|
-
export { _ as OrRichTextEditorV3 } from '../OrRichTextEditor-
|
|
99
|
+
export { _ as OrRichTextEditorV3 } from '../OrRichTextEditor-eb28a309.js';
|
|
100
100
|
import '../index-fa6eb4ca.js';
|
|
101
101
|
import 'vue';
|
|
102
102
|
import '@vue/composition-api/dist/vue-composition-api.mjs';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export { _ as OrRichTextEditorV3 } from '../../OrRichTextEditor-
|
|
1
|
+
export { _ as OrRichTextEditorV3 } from '../../OrRichTextEditor-eb28a309.js';
|
|
2
2
|
import '../../index-fa6eb4ca.js';
|
|
3
3
|
import 'vue';
|
|
4
4
|
import '@vue/composition-api/dist/vue-composition-api.mjs';
|
|
5
|
+
import '@vueuse/core';
|
|
5
6
|
import '../../codemirrorView-77ce9187.js';
|
|
6
7
|
import '../../index-780d00b0.js';
|
|
7
8
|
import 'node:punycode';
|
|
@@ -11,7 +12,6 @@ import '../../OrIcon-8625385f.js';
|
|
|
11
12
|
import '../../useClassAttribute-9bf33346.js';
|
|
12
13
|
import '../../normalize-component-6e8e3d80.js';
|
|
13
14
|
import '../../OrTooltip-fbfa05fd.js';
|
|
14
|
-
import '@vueuse/core';
|
|
15
15
|
import '../../OrPopover-5dc240f1.js';
|
|
16
16
|
import '../../floating-ui.dom.esm-83eba816.js';
|
|
17
17
|
import '../../OrBottomSheet-1cd1ab4c.js';
|
|
@@ -2,5 +2,6 @@ export declare const EditorContainer: string[];
|
|
|
2
2
|
export declare const ToolbarContainer: string[];
|
|
3
3
|
export declare const Toolbar: string[];
|
|
4
4
|
export declare const ToolbarButton: string[];
|
|
5
|
+
export declare const ToolbarButtonFocused: string[];
|
|
5
6
|
export declare const ToolbarButtonActive: string[];
|
|
6
7
|
export declare const EditorInput: string[];
|