@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 { defineComponent, ref, onMounted, onBeforeUnmount, computed, watch } from 'vue';
|
|
2
|
+
import { onClickOutside } from '@vueuse/core';
|
|
2
3
|
import { S as Schema, M as Mark$1, N as NodeSelection, T as TextSelection, a as Selection, b as Slice, d as dropPoint, F as Fragment, D as DOMSerializer, 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';
|
|
@@ -28072,7 +28073,10 @@ const Toolbar = [
|
|
|
28072
28073
|
'last-of-type:border-none'];
|
|
28073
28074
|
const ToolbarButton = [
|
|
28074
28075
|
// Typography
|
|
28075
|
-
'text-on-disabled', 'dark:text-
|
|
28076
|
+
'text-on-disabled', 'dark:text-on-disabled-dark'];
|
|
28077
|
+
const ToolbarButtonFocused = [
|
|
28078
|
+
// Typography
|
|
28079
|
+
'text-outline', 'dark:text-outline-dark'];
|
|
28076
28080
|
const ToolbarButtonActive = [
|
|
28077
28081
|
// Typography
|
|
28078
28082
|
'text-on-background', 'dark:text-on-background-dark'];
|
|
@@ -29598,6 +29602,7 @@ var script = defineComponent({
|
|
|
29598
29602
|
const toolbarButtonRef = ref();
|
|
29599
29603
|
const menuRef = ref();
|
|
29600
29604
|
const isActive = ref({});
|
|
29605
|
+
const isFocused = ref(props.autofocus);
|
|
29601
29606
|
const headingLevels = [1, 2, 3, 4];
|
|
29602
29607
|
const previousHeadingLevel = ref();
|
|
29603
29608
|
const activeHeadingLevel = ref(0);
|
|
@@ -29640,6 +29645,7 @@ var script = defineComponent({
|
|
|
29640
29645
|
onUpdate: ({
|
|
29641
29646
|
editor
|
|
29642
29647
|
}) => {
|
|
29648
|
+
isFocused.value = true;
|
|
29643
29649
|
setActiveFormats();
|
|
29644
29650
|
const html = editor.getHTML();
|
|
29645
29651
|
const text = editor.getText();
|
|
@@ -29701,7 +29707,10 @@ var script = defineComponent({
|
|
|
29701
29707
|
onBeforeUnmount(() => {
|
|
29702
29708
|
editor === null || editor === void 0 ? void 0 : editor.destroy();
|
|
29703
29709
|
});
|
|
29704
|
-
|
|
29710
|
+
onClickOutside(root, () => {
|
|
29711
|
+
isFocused.value = false;
|
|
29712
|
+
// trap.deactivate();
|
|
29713
|
+
});
|
|
29705
29714
|
// Computed
|
|
29706
29715
|
const proxyModelValue = computed({
|
|
29707
29716
|
get: () => {
|
|
@@ -29726,6 +29735,7 @@ var script = defineComponent({
|
|
|
29726
29735
|
//Methods
|
|
29727
29736
|
const handleEditorClick = () => {
|
|
29728
29737
|
setActiveFormats();
|
|
29738
|
+
isFocused.value = true;
|
|
29729
29739
|
editor === null || editor === void 0 ? void 0 : editor.commands.focus();
|
|
29730
29740
|
};
|
|
29731
29741
|
const handleToolbarClick = (item, level) => {
|
|
@@ -29798,7 +29808,7 @@ var script = defineComponent({
|
|
|
29798
29808
|
return [...ToolbarContainer];
|
|
29799
29809
|
});
|
|
29800
29810
|
const toolbarStyles = computed(() => {
|
|
29801
|
-
return [...Toolbar];
|
|
29811
|
+
return [...Toolbar, ...(isFocused.value ? ToolbarButtonFocused : ToolbarButton)];
|
|
29802
29812
|
});
|
|
29803
29813
|
const editorInputStyles = computed(() => {
|
|
29804
29814
|
return ['tiptap-editor', ...(props.fullHeight ? ['h-full'] : []), ...EditorInput];
|
|
@@ -29808,7 +29818,7 @@ var script = defineComponent({
|
|
|
29808
29818
|
// Layout
|
|
29809
29819
|
'flex',
|
|
29810
29820
|
// Spacing
|
|
29811
|
-
'gap-md', ...(isActive.value[item] ? ToolbarButtonActive :
|
|
29821
|
+
'gap-md', ...(isActive.value[item] ? ToolbarButtonActive : [])];
|
|
29812
29822
|
};
|
|
29813
29823
|
//Effects
|
|
29814
29824
|
watch(proxyModelValue, value => {
|
|
@@ -96,7 +96,7 @@ export { p as PropsV3, a as useQueueV3, u as useToastV3 } from '../useToast-4d43
|
|
|
96
96
|
export { s as OrTooltip } from '../OrTooltip.vue_vue_type_script_lang-fa52d391.js';
|
|
97
97
|
export { s as OrTooltipContent } from '../OrTooltipContent-b0dcb862.js';
|
|
98
98
|
export { s as OrTooltipV3 } from '../OrTooltip.vue_vue_type_script_lang-67cc86ed.js';
|
|
99
|
-
export { s as OrRichTextEditorV3 } from '../OrRichTextEditor.vue_vue_type_script_lang-
|
|
99
|
+
export { s as OrRichTextEditorV3 } from '../OrRichTextEditor.vue_vue_type_script_lang-067e56ab.js';
|
|
100
100
|
import 'vue';
|
|
101
101
|
import 'lodash';
|
|
102
102
|
import '../OrIcon-1cae8a64.js';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export { s as OrRichTextEditorV3 } from '../../OrRichTextEditor.vue_vue_type_script_lang-
|
|
1
|
+
export { s as OrRichTextEditorV3 } from '../../OrRichTextEditor.vue_vue_type_script_lang-067e56ab.js';
|
|
2
2
|
import 'vue';
|
|
3
|
+
import '@vueuse/core';
|
|
3
4
|
import '../../codemirrorView-77ce9187.js';
|
|
4
5
|
import '../../index-780d00b0.js';
|
|
5
6
|
import 'node:punycode';
|
|
@@ -10,7 +11,6 @@ import '../../OrIcon-d878b768.js';
|
|
|
10
11
|
import '../../OrIcon.vue_vue_type_script_lang-a119a715.js';
|
|
11
12
|
import '../../useClassAttribute-00888f78.js';
|
|
12
13
|
import '../../OrTooltip.vue_vue_type_script_lang-67cc86ed.js';
|
|
13
|
-
import '@vueuse/core';
|
|
14
14
|
import '../../OrPopover-c462ce77.js';
|
|
15
15
|
import '../../OrPopover.vue_vue_type_script_lang-54c7b11c.js';
|
|
16
16
|
import '../../floating-ui.dom.esm-83eba816.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[];
|