@onereach/ui-components 25.1.1-beta.5755.0 → 25.1.1-beta.5757.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/esm/{OrAutocomplete-BYPOrjCw.mjs → OrAutocomplete-D6Vx762l.mjs} +7 -7
- package/dist/esm/{OrAutocomplete-BYPOrjCw.mjs.map → OrAutocomplete-D6Vx762l.mjs.map} +1 -1
- package/dist/esm/{OrCardCollection-8aMbrjmE.mjs → OrCardCollection-B3l8giSn.mjs} +4 -4
- package/dist/esm/{OrCardCollection-8aMbrjmE.mjs.map → OrCardCollection-B3l8giSn.mjs.map} +1 -1
- package/dist/esm/{OrCode-BQd66v38.mjs → OrCode-C-aENyuR.mjs} +3 -3
- package/dist/esm/{OrCode-BQd66v38.mjs.map → OrCode-C-aENyuR.mjs.map} +1 -1
- package/dist/esm/{OrConfirm-hPRH5PIY.mjs → OrConfirm-CT16BlWw.mjs} +2 -2
- package/dist/esm/{OrConfirm-hPRH5PIY.mjs.map → OrConfirm-CT16BlWw.mjs.map} +1 -1
- package/dist/esm/{OrContextMenu-CrpiM2Jq.mjs → OrContextMenu-DoEeRp5C.mjs} +3 -3
- package/dist/esm/{OrContextMenu-CrpiM2Jq.mjs.map → OrContextMenu-DoEeRp5C.mjs.map} +1 -1
- package/dist/esm/{OrDataGrid-3UnDS9Cf.mjs → OrDataGrid-DPwCfdrK.mjs} +11 -11
- package/dist/esm/{OrDataGrid-3UnDS9Cf.mjs.map → OrDataGrid-DPwCfdrK.mjs.map} +1 -1
- package/dist/esm/{OrDateFormat-RNeTJhfN.mjs → OrDateFormat-BYcvr2pu.mjs} +2 -2
- package/dist/esm/{OrDateFormat-RNeTJhfN.mjs.map → OrDateFormat-BYcvr2pu.mjs.map} +1 -1
- package/dist/esm/{OrDatePicker-C7FejdS-.mjs → OrDatePicker-B5R1ziZF.mjs} +4 -4
- package/dist/esm/{OrDatePicker-C7FejdS-.mjs.map → OrDatePicker-B5R1ziZF.mjs.map} +1 -1
- package/dist/esm/{OrDateRangePicker-BbaCBJbG.mjs → OrDateRangePicker-BsWultj3.mjs} +4 -4
- package/dist/esm/{OrDateRangePicker-BbaCBJbG.mjs.map → OrDateRangePicker-BsWultj3.mjs.map} +1 -1
- package/dist/esm/{OrDateTimeFormat-C-dCMxgq.mjs → OrDateTimeFormat-Bf5RKESC.mjs} +2 -2
- package/dist/esm/{OrDateTimeFormat-C-dCMxgq.mjs.map → OrDateTimeFormat-Bf5RKESC.mjs.map} +1 -1
- package/dist/esm/{OrDateTimePicker-ZFrPrPwN.mjs → OrDateTimePicker-DnkdBdi0.mjs} +2 -2
- package/dist/esm/{OrDateTimePicker-ZFrPrPwN.mjs.map → OrDateTimePicker-DnkdBdi0.mjs.map} +1 -1
- package/dist/esm/{OrDateTimePicker.vue_vue_type_script_lang-Fl-_-QVp.mjs → OrDateTimePicker.vue_vue_type_script_lang-BGOGNFWu.mjs} +5 -5
- package/dist/esm/{OrDateTimePicker.vue_vue_type_script_lang-Fl-_-QVp.mjs.map → OrDateTimePicker.vue_vue_type_script_lang-BGOGNFWu.mjs.map} +1 -1
- package/dist/esm/{OrEditorTabs-yT45X6oK.mjs → OrEditorTabs-BJv_yHTK.mjs} +16 -16
- package/dist/esm/OrEditorTabs-BJv_yHTK.mjs.map +1 -0
- package/dist/esm/{OrFilter-C8d3OmGK.mjs → OrFilter-DuFoI_Sd.mjs} +3 -3
- package/dist/esm/{OrFilter-C8d3OmGK.mjs.map → OrFilter-DuFoI_Sd.mjs.map} +1 -1
- package/dist/esm/{OrFilterPopover-C8lXb-hJ.mjs → OrFilterPopover-BwHlCPf2.mjs} +3 -3
- package/dist/esm/{OrFilterPopover-C8lXb-hJ.mjs.map → OrFilterPopover-BwHlCPf2.mjs.map} +1 -1
- package/dist/esm/{OrFilterTrigger-zfcgyC7C.mjs → OrFilterTrigger-Ch293iF_.mjs} +2 -2
- package/dist/esm/{OrFilterTrigger-zfcgyC7C.mjs.map → OrFilterTrigger-Ch293iF_.mjs.map} +1 -1
- package/dist/esm/{OrIconButton-BlHCLpeW.mjs → OrIconButton-BajZRp1k.mjs} +2 -2
- package/dist/esm/{OrIconButton-BlHCLpeW.mjs.map → OrIconButton-BajZRp1k.mjs.map} +1 -1
- package/dist/esm/{OrInlineInput-1WPe9sXl.mjs → OrInlineInput-BG3yAs5M.mjs} +2 -2
- package/dist/esm/{OrInlineInput-1WPe9sXl.mjs.map → OrInlineInput-BG3yAs5M.mjs.map} +1 -1
- package/dist/esm/{OrInlineTextarea-COQceBb0.mjs → OrInlineTextarea-CZVqac2G.mjs} +2 -2
- package/dist/esm/{OrInlineTextarea-COQceBb0.mjs.map → OrInlineTextarea-CZVqac2G.mjs.map} +1 -1
- package/dist/esm/{OrInput-BqDsy3wR.mjs → OrInput-BrJzxNyE.mjs} +2 -2
- package/dist/esm/{OrInput-BqDsy3wR.mjs.map → OrInput-BrJzxNyE.mjs.map} +1 -1
- package/dist/esm/{OrList-Gr14z616.mjs → OrList-Ded7wJKj.mjs} +2 -2
- package/dist/esm/{OrList-Gr14z616.mjs.map → OrList-Ded7wJKj.mjs.map} +1 -1
- package/dist/esm/{OrMenu-CJT4Snay.mjs → OrMenu-CWFxzBH9.mjs} +36 -33
- package/dist/esm/OrMenu-CWFxzBH9.mjs.map +1 -0
- package/dist/esm/{OrMenuItem-puiy5rFO.mjs → OrMenuItem-BdpVH1hf.mjs} +33 -28
- package/dist/esm/OrMenuItem-BdpVH1hf.mjs.map +1 -0
- package/dist/esm/{OrModal-CQhwUYFk.mjs → OrModal-Cbi6xMwA.mjs} +2 -2
- package/dist/esm/{OrModal-CQhwUYFk.mjs.map → OrModal-Cbi6xMwA.mjs.map} +1 -1
- package/dist/esm/{OrNotification-Dz3Tr1wI.mjs → OrNotification-DVQ-x6mP.mjs} +2 -2
- package/dist/esm/{OrNotification-Dz3Tr1wI.mjs.map → OrNotification-DVQ-x6mP.mjs.map} +1 -1
- package/dist/esm/{OrPagination-ClBRmPjj.mjs → OrPagination-FHzIWys-.mjs} +3 -3
- package/dist/esm/{OrPagination-ClBRmPjj.mjs.map → OrPagination-FHzIWys-.mjs.map} +1 -1
- package/dist/esm/{OrPopover-DbygLPtT.mjs → OrPopover-FA8G-paf.mjs} +92 -91
- package/dist/esm/OrPopover-FA8G-paf.mjs.map +1 -0
- package/dist/esm/{OrRangeSlider-Dim4sU4v.mjs → OrRangeSlider-Bw19Cx4f.mjs} +3 -3
- package/dist/esm/{OrRangeSlider-Dim4sU4v.mjs.map → OrRangeSlider-Bw19Cx4f.mjs.map} +1 -1
- package/dist/esm/{OrResizeablePanel-DuGgwmhB.mjs → OrResizeablePanel-CKWcCNDY.mjs} +2 -2
- package/dist/esm/{OrResizeablePanel-DuGgwmhB.mjs.map → OrResizeablePanel-CKWcCNDY.mjs.map} +1 -1
- package/dist/esm/{OrRichTextEditor-DKhL46g9.mjs → OrRichTextEditor-CxWFAu2l.mjs} +306 -315
- package/dist/esm/OrRichTextEditor-CxWFAu2l.mjs.map +1 -0
- package/dist/esm/{OrRichTooltip-D8vv5Btb.mjs → OrRichTooltip-CcQpjWtS.mjs} +2 -2
- package/dist/esm/{OrRichTooltip-D8vv5Btb.mjs.map → OrRichTooltip-CcQpjWtS.mjs.map} +1 -1
- package/dist/esm/{OrSearch-OIfce3Md.mjs → OrSearch-B3zonpwn.mjs} +2 -2
- package/dist/esm/{OrSearch-OIfce3Md.mjs.map → OrSearch-B3zonpwn.mjs.map} +1 -1
- package/dist/esm/{OrSelect-DL28KJCH.mjs → OrSelect-DbALZEpy.mjs} +7 -7
- package/dist/esm/{OrSelect-DL28KJCH.mjs.map → OrSelect-DbALZEpy.mjs.map} +1 -1
- package/dist/esm/{OrSlider-Cec0WpUQ.mjs → OrSlider-XimfcpRY.mjs} +2 -2
- package/dist/esm/{OrSlider-Cec0WpUQ.mjs.map → OrSlider-XimfcpRY.mjs.map} +1 -1
- package/dist/esm/{OrSlider.vue_vue_type_script_lang-C5rLh1F0.mjs → OrSlider.vue_vue_type_script_lang-yh5NyhYF.mjs} +2 -2
- package/dist/esm/{OrSlider.vue_vue_type_script_lang-C5rLh1F0.mjs.map → OrSlider.vue_vue_type_script_lang-yh5NyhYF.mjs.map} +1 -1
- package/dist/esm/{OrSorting-Crre3wAt.mjs → OrSorting-CmlsygnE.mjs} +3 -3
- package/dist/esm/{OrSorting-Crre3wAt.mjs.map → OrSorting-CmlsygnE.mjs.map} +1 -1
- package/dist/esm/OrSubMenuItem-SM7aCRt8.mjs +151 -0
- package/dist/esm/OrSubMenuItem-SM7aCRt8.mjs.map +1 -0
- package/dist/esm/{OrTabs-D4RY2JMk.mjs → OrTabs-EZYo-4P_.mjs} +3 -3
- package/dist/esm/{OrTabs-D4RY2JMk.mjs.map → OrTabs-EZYo-4P_.mjs.map} +1 -1
- package/dist/esm/{OrTag-Bixe0EQq.mjs → OrTag-DaaYEGhC.mjs} +2 -2
- package/dist/esm/{OrTag-Bixe0EQq.mjs.map → OrTag-DaaYEGhC.mjs.map} +1 -1
- package/dist/esm/{OrTagInput-iFJhEZwO.mjs → OrTagInput-CDOp-U7t.mjs} +4 -4
- package/dist/esm/{OrTagInput-iFJhEZwO.mjs.map → OrTagInput-CDOp-U7t.mjs.map} +1 -1
- package/dist/esm/{OrTags-CS0bcLtx.mjs → OrTags-DVsMxFxa.mjs} +3 -3
- package/dist/esm/{OrTags-CS0bcLtx.mjs.map → OrTags-DVsMxFxa.mjs.map} +1 -1
- package/dist/esm/{OrTimeFormat-CMYDyfoT.mjs → OrTimeFormat-Dlw6grIR.mjs} +2 -2
- package/dist/esm/{OrTimeFormat-CMYDyfoT.mjs.map → OrTimeFormat-Dlw6grIR.mjs.map} +1 -1
- package/dist/esm/{OrTimePicker-BO-Vxw21.mjs → OrTimePicker-GiacJN0e.mjs} +4 -4
- package/dist/esm/{OrTimePicker-BO-Vxw21.mjs.map → OrTimePicker-GiacJN0e.mjs.map} +1 -1
- package/dist/esm/{OrTimeRangePicker-MvRUSg_g.mjs → OrTimeRangePicker-9YELNKcp.mjs} +4 -4
- package/dist/esm/{OrTimeRangePicker-MvRUSg_g.mjs.map → OrTimeRangePicker-9YELNKcp.mjs.map} +1 -1
- package/dist/esm/{OrTooltip-DqwjoE82.mjs → OrTooltip-BIJSpzmX.mjs} +2 -2
- package/dist/esm/{OrTooltip-DqwjoE82.mjs.map → OrTooltip-BIJSpzmX.mjs.map} +1 -1
- package/dist/esm/components/index.mjs +88 -86
- package/dist/esm/components/index.mjs.map +1 -1
- package/dist/esm/components/or-autocomplete-v3/index.mjs +1 -1
- package/dist/esm/components/or-card-collection-v3/index.mjs +1 -1
- package/dist/esm/components/or-code-v3/index.mjs +1 -1
- package/dist/esm/components/or-confirm-v3/index.mjs +1 -1
- package/dist/esm/components/or-context-menu-v3/index.mjs +1 -1
- package/dist/esm/components/or-data-grid-v3/index.mjs +1 -1
- package/dist/esm/components/or-date-format-v3/index.mjs +1 -1
- package/dist/esm/components/or-date-picker-v3/index.mjs +1 -1
- package/dist/esm/components/or-date-range-picker-v3/index.mjs +1 -1
- package/dist/esm/components/or-date-time-format-v3/index.mjs +1 -1
- package/dist/esm/components/or-date-time-picker-v3/index.mjs +2 -2
- package/dist/esm/components/or-editor-tabs-v3/index.mjs +1 -1
- package/dist/esm/components/or-filter-popover-v3/index.mjs +1 -1
- package/dist/esm/components/or-filter-trigger-v3/index.mjs +1 -1
- package/dist/esm/components/or-filter-v3/index.mjs +1 -1
- package/dist/esm/components/or-icon-button-v3/index.mjs +1 -1
- package/dist/esm/components/or-inline-input-v3/index.mjs +1 -1
- package/dist/esm/components/or-inline-textarea-v3/index.mjs +1 -1
- package/dist/esm/components/or-input-v3/index.mjs +1 -1
- package/dist/esm/components/or-list-v3/index.mjs +1 -1
- package/dist/esm/components/or-menu-item-v3/index.mjs +1 -1
- package/dist/esm/components/or-menu-v3/index.mjs +1 -1
- package/dist/esm/components/or-modal-v3/index.mjs +1 -1
- package/dist/esm/components/or-notification-v3/index.mjs +1 -1
- package/dist/esm/components/or-pagination-v3/index.mjs +1 -1
- package/dist/esm/components/or-popover-v3/index.mjs +1 -1
- package/dist/esm/components/or-range-slider-v3/index.mjs +1 -1
- package/dist/esm/components/or-resizeable-panel-v3/index.mjs +1 -1
- package/dist/esm/components/or-rich-text-editor-v3/index.mjs +1 -1
- package/dist/esm/components/or-rich-tooltip-v3/index.mjs +1 -1
- package/dist/esm/components/or-search-v3/index.mjs +1 -1
- package/dist/esm/components/or-select-v3/index.mjs +1 -1
- package/dist/esm/components/or-sidebar-v3/index.mjs +1 -1
- package/dist/esm/components/or-slider-v3/index.mjs +2 -2
- package/dist/esm/components/or-sorting-v3/index.mjs +1 -1
- package/dist/esm/components/or-sub-menu-item-v3/index.mjs +5 -0
- package/dist/esm/components/or-sub-menu-item-v3/index.mjs.map +1 -0
- package/dist/esm/components/or-tabs-v3/index.mjs +1 -1
- package/dist/esm/components/or-tag-input-v3/index.mjs +1 -1
- package/dist/esm/components/or-tag-v3/index.mjs +1 -1
- package/dist/esm/components/or-tags-v3/index.mjs +1 -1
- package/dist/esm/components/or-time-format-v3/index.mjs +1 -1
- package/dist/esm/components/or-time-picker-v3/index.mjs +1 -1
- package/dist/esm/components/or-time-range-picker-v3/index.mjs +1 -1
- package/dist/esm/components/or-toast-v3/index.mjs +1 -1
- package/dist/esm/components/or-tooltip-v3/index.mjs +1 -1
- package/dist/esm/index.mjs +88 -86
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/{props-BxqD8LGb.mjs → props-r8F44lpX.mjs} +2 -2
- package/dist/esm/{props-BxqD8LGb.mjs.map → props-r8F44lpX.mjs.map} +1 -1
- package/dist/esm/{types-BwxhurSS.mjs → types-DrGu4wlu.mjs} +2 -2
- package/dist/esm/{types-BwxhurSS.mjs.map → types-DrGu4wlu.mjs.map} +1 -1
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/or-data-grid-v3/OrDataGrid.vue.d.ts +8 -0
- package/dist/types/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue.d.ts +12 -2
- package/dist/types/components/or-editor-tabs-v3/OrEditorTabs.vue.d.ts +1 -1
- package/dist/types/components/or-menu-item-v3/OrMenuItem.vue.d.ts +3 -1
- package/dist/types/components/or-menu-v3/OrMenu.vue.d.ts +2 -1
- package/dist/types/components/or-pagination-v3/OrPagination.vue.d.ts +4 -0
- package/dist/types/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +2 -0
- package/dist/types/components/or-sorting-v3/OrSorting.vue.d.ts +1 -0
- package/dist/types/components/or-sub-menu-item-v3/OrSubMenuItem.vue.d.ts +1163 -0
- package/dist/types/components/or-sub-menu-item-v3/index.d.ts +1 -0
- package/dist/types/components/or-tabs-v3/OrTabs.vue.d.ts +2 -0
- package/package.json +3 -3
- package/src/components/index.ts +1 -0
- package/dist/esm/OrEditorTabs-yT45X6oK.mjs.map +0 -1
- package/dist/esm/OrMenu-CJT4Snay.mjs.map +0 -1
- package/dist/esm/OrMenuItem-puiy5rFO.mjs.map +0 -1
- package/dist/esm/OrPopover-DbygLPtT.mjs.map +0 -1
- package/dist/esm/OrRichTextEditor-DKhL46g9.mjs.map +0 -1
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("[data-v-
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("[data-v-f034427c] .or-cm-paragraph{@apply my-xs;}[data-v-f034427c] .or-cm-bulletList{@apply mx-lg my-xs list-disc;}[data-v-f034427c] .or-cm-orderedList{@apply mx-lg my-xs list-decimal;}[data-v-f034427c] .or-cm-blockquote{@apply my-sm mx-lg px-lg border-l-2 border-outline;}[data-v-f034427c] .or-cm-link{@apply text-primary cursor-pointer;}[data-v-f034427c] .or-cm-placeholder{@apply text-outline;}[data-v-f034427c] .or-cm-editorProps{@apply flex flex-col focus:outline-none gap-xs h-full;}.tiptap-editor-v3 .is-editor-empty:before{float:left;height:0;pointer-events:none;content:attr(data-placeholder)}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
2
|
import { useTheme as ft, useResponsive as pt } from "@onereach/ui-components-common/hooks";
|
|
3
3
|
import { isArray as gt } from "@onereach/ui-components-common/utils";
|
|
4
4
|
import { O as ht } from "./OrButton-C_hXddAf.mjs";
|
|
5
5
|
import { O as vt } from "./OrError-B5ihH6-3.mjs";
|
|
6
6
|
import { O as bt } from "./OrHint-NvbZyURY.mjs";
|
|
7
|
-
import { O as kt } from "./OrIconButton-
|
|
7
|
+
import { O as kt } from "./OrIconButton-BajZRp1k.mjs";
|
|
8
8
|
import { O as yt } from "./OrInputBox-6ciokFdU.mjs";
|
|
9
|
-
import { O as Ct } from "./OrInput-
|
|
9
|
+
import { O as Ct } from "./OrInput-BrJzxNyE.mjs";
|
|
10
10
|
import { O as wt } from "./OrLabel-K7_HgvcK.mjs";
|
|
11
|
-
import { O as Ot } from "./OrMenuItem-
|
|
12
|
-
import { O as St } from "./OrMenu-
|
|
13
|
-
import { O as Lt } from "./OrModal-
|
|
14
|
-
import { O as Bt } from "./OrPopover-
|
|
11
|
+
import { O as Ot } from "./OrMenuItem-BdpVH1hf.mjs";
|
|
12
|
+
import { O as St } from "./OrMenu-CWFxzBH9.mjs";
|
|
13
|
+
import { O as Lt } from "./OrModal-Cbi6xMwA.mjs";
|
|
14
|
+
import { O as Bt } from "./OrPopover-FA8G-paf.mjs";
|
|
15
15
|
import { Node as Mt, Editor as At, mergeAttributes as Pt } from "@tiptap/core";
|
|
16
|
-
import
|
|
17
|
-
import
|
|
16
|
+
import Fe from "@tiptap/extension-blockquote";
|
|
17
|
+
import qe from "@tiptap/extension-bullet-list";
|
|
18
18
|
import Ht from "@tiptap/extension-heading";
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
19
|
+
import ze from "@tiptap/extension-highlight";
|
|
20
|
+
import Te from "@tiptap/extension-link";
|
|
21
|
+
import De from "@tiptap/extension-ordered-list";
|
|
22
|
+
import Ue from "@tiptap/extension-paragraph";
|
|
23
23
|
import Rt from "@tiptap/extension-placeholder";
|
|
24
|
-
import
|
|
24
|
+
import We from "@tiptap/extension-underline";
|
|
25
25
|
import Nt from "@tiptap/starter-kit";
|
|
26
26
|
import { useResizeObserver as Vt, useDebounceFn as $t, onClickOutside as It } from "@vueuse/core";
|
|
27
27
|
import { useFocusTrap as Et } from "@vueuse/integrations/useFocusTrap";
|
|
28
|
-
import { defineComponent as Ft, shallowRef as qt, ref as m, onMounted as zt, onBeforeUnmount as Tt, computed as w, watch as Dt, nextTick as Ut, resolveComponent as O, openBlock as f, createElementBlock as
|
|
28
|
+
import { defineComponent as Ft, shallowRef as qt, ref as m, onMounted as zt, onBeforeUnmount as Tt, computed as w, watch as Dt, nextTick as Ut, resolveComponent as O, openBlock as f, createElementBlock as F, normalizeClass as R, createBlock as H, withCtx as v, renderSlot as ee, createTextVNode as V, toDisplayString as te, createCommentVNode as T, createVNode as $, createElementVNode as q, Fragment as oe, renderList as re, withDirectives as ne, vShow as ae, vModelText as Wt } from "vue";
|
|
29
29
|
import { TextSelection as Gt, Selection as Jt } from "prosemirror-state";
|
|
30
30
|
import { exitCode as jt } from "prosemirror-commands";
|
|
31
|
-
import { EditorState as
|
|
32
|
-
import { EditorView as
|
|
31
|
+
import { EditorState as Ce } from "@codemirror/state";
|
|
32
|
+
import { EditorView as Ge, highlightActiveLine as Kt, highlightActiveLineGutter as Qt, lineNumbers as Xt, keymap as Yt } from "@codemirror/view";
|
|
33
33
|
import { HighlightStyle as Zt, syntaxHighlighting as xt } from "@codemirror/language";
|
|
34
|
-
import { tags as
|
|
34
|
+
import { tags as a } from "@lezer/highlight";
|
|
35
35
|
import { minimalSetup as _t } from "codemirror";
|
|
36
36
|
import { javascript as eo } from "@codemirror/lang-javascript";
|
|
37
37
|
import to from "@tiptap/extension-bold";
|
|
38
38
|
import oo from "@tiptap/extension-code-block";
|
|
39
39
|
import ro from "@tiptap/extension-hard-break";
|
|
40
|
-
import
|
|
41
|
-
import
|
|
40
|
+
import no from "@tiptap/extension-italic";
|
|
41
|
+
import ao from "@tiptap/extension-list-item";
|
|
42
42
|
import lo from "@tiptap/extension-strike";
|
|
43
43
|
import so from "@tiptap/extension-horizontal-rule";
|
|
44
44
|
import { marked as io } from "marked";
|
|
45
|
-
import { defaultMarkdownSerializer as S, MarkdownSerializer as
|
|
46
|
-
import { DOMParser as
|
|
45
|
+
import { defaultMarkdownSerializer as S, MarkdownSerializer as co } from "prosemirror-markdown";
|
|
46
|
+
import { DOMParser as uo } from "prosemirror-model";
|
|
47
47
|
import { _ as mo } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
48
|
-
var
|
|
48
|
+
var Je = /* @__PURE__ */ ((e) => (e.Markdown = "markdown", e.Markup = "markup", e))(Je || {}), je = /* @__PURE__ */ ((e) => (e.bold = "format_bold", e.italic = "format_italic", e.underline = "format_underlined", e.strike = "format_strikethrough", e.bulletList = "format_list_bulleted", e.orderedList = "format_list_numbered", e.link = "link", e.highlight = "highlight", e.redo = "redo", e.undo = "undo", e.codeBlock = "code_blocks", e.blockquote = "format_quote", e.file = "attach_file", e.source = "source_notes", e))(je || {}), Ke = /* @__PURE__ */ ((e) => (e.bold = "Bold", e.italic = "Italic", e.underline = "Underline", e.strike = "Strike", e.bulletList = "Bulleted List", e.orderedList = "Numbered List", e.link = "Link", e.highlight = "Highlight", e.redo = "Redo", e.undo = "Undo", e.codeBlock = "Code Block", e.blockquote = "Quote", e.file = "File", e.source = "Source", e))(Ke || {});
|
|
49
49
|
const fo = [
|
|
50
50
|
// Layout
|
|
51
51
|
"layout-column",
|
|
@@ -84,24 +84,24 @@ const fo = [
|
|
|
84
84
|
"typography-body-2-regular",
|
|
85
85
|
// Size
|
|
86
86
|
"h-full"
|
|
87
|
-
],
|
|
88
|
-
var
|
|
89
|
-
const ko = (
|
|
90
|
-
var Ae, Pe, He, Re, Ne, Ve, $e, Ie, Ee
|
|
91
|
-
const Oo =
|
|
87
|
+
], n = ft(), vo = n == null ? void 0 : n.backgroundColor["custom-colors-custom-6"], we = n == null ? void 0 : n.backgroundColor["custom-colors-custom-1"], bo = n == null ? void 0 : n.backgroundColor["custom-colors-custom-3"];
|
|
88
|
+
var Be;
|
|
89
|
+
const ko = (Be = n == null ? void 0 : n.backgroundColor) == null ? void 0 : Be.white, le = n == null ? void 0 : n.backgroundColor["custom-colors-custom-6"], fe = n == null ? void 0 : n.backgroundColor["custom-colors-custom-5"], yo = n == null ? void 0 : n.backgroundColor["custom-colors-custom-3"], Co = n == null ? void 0 : n.backgroundColor.success, Oe = n == null ? void 0 : n.backgroundColor.warning, wo = n == null ? void 0 : n.backgroundColor["custom-colors-custom-1"];
|
|
90
|
+
var Me, Ae, Pe, He, Re, Ne, Ve, $e, Ie, Ee;
|
|
91
|
+
const Oo = Ge.theme({
|
|
92
92
|
"&": {
|
|
93
|
-
color:
|
|
94
|
-
backgroundColor: (
|
|
93
|
+
color: le,
|
|
94
|
+
backgroundColor: (Me = n == null ? void 0 : n.backgroundColor) == null ? void 0 : Me["bg-primary-container"]
|
|
95
95
|
},
|
|
96
96
|
".cm-editor": {
|
|
97
97
|
border: "none",
|
|
98
|
-
borderRadius: (
|
|
98
|
+
borderRadius: (Ae = n == null ? void 0 : n.spacing) == null ? void 0 : Ae.xs
|
|
99
99
|
},
|
|
100
100
|
"&.cm-focused": {
|
|
101
101
|
outline: "none"
|
|
102
102
|
},
|
|
103
103
|
".cm-scroller": {
|
|
104
|
-
borderRadius: (
|
|
104
|
+
borderRadius: (Pe = n == null ? void 0 : n.spacing) == null ? void 0 : Pe.xs
|
|
105
105
|
},
|
|
106
106
|
".cm-content": {
|
|
107
107
|
// caretColor: cursor,
|
|
@@ -110,7 +110,7 @@ const Oo = Je.theme({
|
|
|
110
110
|
// background: highlightBackground,
|
|
111
111
|
// color: themes?.colors?.neutral?.[600],
|
|
112
112
|
border: 0,
|
|
113
|
-
borderRadius: (
|
|
113
|
+
borderRadius: (He = n == null ? void 0 : n.spacing) == null ? void 0 : He.xs
|
|
114
114
|
},
|
|
115
115
|
".cm-panel.cm-search input[type=checkbox]": {
|
|
116
116
|
display: "inline-block",
|
|
@@ -122,7 +122,7 @@ const Oo = Je.theme({
|
|
|
122
122
|
},
|
|
123
123
|
".cm-panels": {
|
|
124
124
|
// backgroundColor: darkBackground,
|
|
125
|
-
color:
|
|
125
|
+
color: le
|
|
126
126
|
},
|
|
127
127
|
// '.cm-panels.cm-panels-top': { borderBottom: `2px solid ${themes?.colors?.neutral?.[200]}` },
|
|
128
128
|
// '.cm-panels.cm-panels-bottom': { borderTop: `2px solid ${themes?.colors?.neutral?.[200]}` },
|
|
@@ -134,23 +134,23 @@ const Oo = Je.theme({
|
|
|
134
134
|
// backgroundColor: themes?.colors?.sky?.[100],
|
|
135
135
|
},
|
|
136
136
|
".cm-activeLine": {
|
|
137
|
-
backgroundColor: (
|
|
137
|
+
backgroundColor: (Re = n == null ? void 0 : n.backgroundColor) == null ? void 0 : Re["bg-secondary-container"]
|
|
138
138
|
},
|
|
139
139
|
// '.cm-selectionMatch': { backgroundColor: themes?.colors?.lime?.[500] },
|
|
140
140
|
"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": {
|
|
141
141
|
// backgroundColor: themes?.colors?.lime?.[600],
|
|
142
142
|
},
|
|
143
143
|
".cm-gutters": {
|
|
144
|
-
backgroundColor: (
|
|
145
|
-
color:
|
|
144
|
+
backgroundColor: (Ne = n == null ? void 0 : n.backgroundColor) == null ? void 0 : Ne["primary-opacity-0-12"],
|
|
145
|
+
color: fe,
|
|
146
146
|
border: "none"
|
|
147
147
|
},
|
|
148
148
|
".cm-lineNumbers .cm-gutterElement": {
|
|
149
|
-
paddingLeft: (
|
|
150
|
-
paddingRight: (
|
|
149
|
+
paddingLeft: (Ve = n == null ? void 0 : n.spacing) == null ? void 0 : Ve["sm+*"],
|
|
150
|
+
paddingRight: ($e = n == null ? void 0 : n.spacing) == null ? void 0 : $e["sm+*"]
|
|
151
151
|
},
|
|
152
152
|
".cm-activeLineGutter": {
|
|
153
|
-
backgroundColor: (
|
|
153
|
+
backgroundColor: (Ie = n == null ? void 0 : n.backgroundColor) == null ? void 0 : Ie["primary-opacity-0-16"]
|
|
154
154
|
},
|
|
155
155
|
".cm-foldPlaceholder": {
|
|
156
156
|
backgroundColor: "transparent",
|
|
@@ -172,7 +172,7 @@ const Oo = Je.theme({
|
|
|
172
172
|
".cm-tooltip-autocomplete": {
|
|
173
173
|
"& > ul > li[aria-selected]": {
|
|
174
174
|
// backgroundColor: highlightBackground,
|
|
175
|
-
color:
|
|
175
|
+
color: le
|
|
176
176
|
}
|
|
177
177
|
},
|
|
178
178
|
".cm-textfield": {
|
|
@@ -181,104 +181,104 @@ const Oo = Je.theme({
|
|
|
181
181
|
// color: themes?.colors?.neutral?.[600],
|
|
182
182
|
// backgroundColor: themes?.colors?.neutral?.[100],
|
|
183
183
|
// border: `1px solid ${themes?.colors?.neutral?.[200]}`,
|
|
184
|
-
borderRadius: (
|
|
184
|
+
borderRadius: (Ee = n == null ? void 0 : n.spacing) == null ? void 0 : Ee.xs
|
|
185
185
|
}
|
|
186
186
|
}, { dark: !0 }), So = Zt.define([
|
|
187
187
|
{
|
|
188
|
-
tag:
|
|
188
|
+
tag: a.keyword,
|
|
189
189
|
color: wo
|
|
190
190
|
},
|
|
191
191
|
{
|
|
192
|
-
tag: [
|
|
193
|
-
color:
|
|
192
|
+
tag: [a.name, a.deleted, a.character, a.propertyName, a.macroName],
|
|
193
|
+
color: we
|
|
194
194
|
},
|
|
195
195
|
{
|
|
196
|
-
tag: [
|
|
196
|
+
tag: [a.function(a.variableName), a.labelName],
|
|
197
197
|
color: yo
|
|
198
198
|
},
|
|
199
199
|
{
|
|
200
|
-
tag: [
|
|
201
|
-
color:
|
|
200
|
+
tag: [a.color, a.constant(a.name), a.standard(a.name)],
|
|
201
|
+
color: Oe
|
|
202
202
|
},
|
|
203
203
|
{
|
|
204
|
-
tag: [
|
|
205
|
-
color:
|
|
204
|
+
tag: [a.definition(a.name), a.separator],
|
|
205
|
+
color: le
|
|
206
206
|
},
|
|
207
207
|
{
|
|
208
|
-
tag: [
|
|
208
|
+
tag: [a.typeName, a.className, a.number, a.changed, a.annotation, a.modifier, a.self, a.namespace],
|
|
209
209
|
color: vo
|
|
210
210
|
},
|
|
211
211
|
{
|
|
212
|
-
tag: [
|
|
212
|
+
tag: [a.operator, a.operatorKeyword, a.url, a.escape, a.regexp, a.link, a.special(a.string)],
|
|
213
213
|
color: bo
|
|
214
214
|
},
|
|
215
215
|
{
|
|
216
|
-
tag: [
|
|
217
|
-
color:
|
|
216
|
+
tag: [a.meta, a.comment],
|
|
217
|
+
color: fe
|
|
218
218
|
},
|
|
219
219
|
{
|
|
220
|
-
tag:
|
|
220
|
+
tag: a.strong,
|
|
221
221
|
fontWeight: "bold"
|
|
222
222
|
},
|
|
223
223
|
{
|
|
224
|
-
tag:
|
|
224
|
+
tag: a.emphasis,
|
|
225
225
|
fontStyle: "italic"
|
|
226
226
|
},
|
|
227
227
|
{
|
|
228
|
-
tag:
|
|
228
|
+
tag: a.strikethrough,
|
|
229
229
|
textDecoration: "line-through"
|
|
230
230
|
},
|
|
231
231
|
{
|
|
232
|
-
tag:
|
|
233
|
-
color:
|
|
232
|
+
tag: a.link,
|
|
233
|
+
color: fe,
|
|
234
234
|
textDecoration: "underline"
|
|
235
235
|
},
|
|
236
236
|
{
|
|
237
|
-
tag:
|
|
237
|
+
tag: a.heading,
|
|
238
238
|
fontWeight: "bold",
|
|
239
|
-
color:
|
|
239
|
+
color: we
|
|
240
240
|
},
|
|
241
241
|
{
|
|
242
|
-
tag: [
|
|
243
|
-
color:
|
|
242
|
+
tag: [a.atom, a.bool, a.special(a.variableName)],
|
|
243
|
+
color: Oe
|
|
244
244
|
},
|
|
245
245
|
{
|
|
246
|
-
tag: [
|
|
246
|
+
tag: [a.processingInstruction, a.string, a.inserted],
|
|
247
247
|
color: Co
|
|
248
248
|
},
|
|
249
249
|
{
|
|
250
|
-
tag:
|
|
250
|
+
tag: a.invalid,
|
|
251
251
|
color: ko
|
|
252
252
|
}
|
|
253
|
-
]), Lo = [Oo, xt(So)],
|
|
253
|
+
]), Lo = [Oo, xt(So)], Se = (e, o) => {
|
|
254
254
|
if (e === o)
|
|
255
255
|
return null;
|
|
256
|
-
let t = 0,
|
|
257
|
-
for (; t <
|
|
256
|
+
let t = 0, i = e.length, l = o.length;
|
|
257
|
+
for (; t < i && e.charCodeAt(t) === o.charCodeAt(t); )
|
|
258
258
|
t += 1;
|
|
259
|
-
for (;
|
|
260
|
-
|
|
259
|
+
for (; i > t && l > t && e.charCodeAt(i - 1) === o.charCodeAt(l - 1); )
|
|
260
|
+
i -= 1, l -= 1;
|
|
261
261
|
return {
|
|
262
262
|
from: t,
|
|
263
|
-
to:
|
|
263
|
+
to: i,
|
|
264
264
|
text: o.slice(t, l)
|
|
265
265
|
};
|
|
266
266
|
};
|
|
267
267
|
class Bo {
|
|
268
268
|
constructor(o) {
|
|
269
|
-
var
|
|
269
|
+
var g;
|
|
270
270
|
this.updating = !1, this.node = o.node, this.view = o.view;
|
|
271
|
-
const t = ((
|
|
271
|
+
const t = ((g = o.cmOptions) == null ? void 0 : g.extensions) || [];
|
|
272
272
|
this.name = "codeBlock", this.getPos = o.getPos;
|
|
273
|
-
const
|
|
274
|
-
this.cm = new
|
|
273
|
+
const i = Ce.changeFilter.of((L) => (!L.docChanged && !this.updating && this.forwardSelection(), !0));
|
|
274
|
+
this.cm = new Ge({
|
|
275
275
|
dispatch: this.dispatch.bind(this)
|
|
276
276
|
}), this.dom = this.cm.dom;
|
|
277
|
-
const l =
|
|
277
|
+
const l = Ce.create({
|
|
278
278
|
doc: this.node.textContent,
|
|
279
279
|
extensions: [
|
|
280
280
|
Lo,
|
|
281
|
-
|
|
281
|
+
i,
|
|
282
282
|
Kt(),
|
|
283
283
|
Qt(),
|
|
284
284
|
Xt(),
|
|
@@ -316,22 +316,22 @@ class Bo {
|
|
|
316
316
|
t.eq(o.selection) || this.view.dispatch(o.tr.setSelection(t));
|
|
317
317
|
}
|
|
318
318
|
asProseMirrorSelection(o) {
|
|
319
|
-
const t = this.getPos() + 1, { anchor:
|
|
320
|
-
return Gt.create(o,
|
|
319
|
+
const t = this.getPos() + 1, { anchor: i, head: l } = this.cm.state.selection.main;
|
|
320
|
+
return Gt.create(o, i + t, l + t);
|
|
321
321
|
}
|
|
322
322
|
dispatch(o) {
|
|
323
323
|
if (this.cm.setState(o.state), o.docChanged && !this.updating) {
|
|
324
|
-
const t = this.getPos() + 1,
|
|
324
|
+
const t = this.getPos() + 1, i = o.state.doc.toString(), l = Se(this.node.textContent, i);
|
|
325
325
|
if (!l)
|
|
326
326
|
return;
|
|
327
|
-
const
|
|
327
|
+
const g = l.text ? this.view.state.schema.text(l.text) : null, L = this.view.state.tr.replaceWith(l.from + t, l.to + t, g);
|
|
328
328
|
this.view.dispatch(L), this.forwardSelection();
|
|
329
329
|
}
|
|
330
330
|
}
|
|
331
331
|
mayBeEscape(o, t) {
|
|
332
|
-
return (
|
|
333
|
-
const { state: l } =
|
|
334
|
-
const y =
|
|
332
|
+
return (i) => {
|
|
333
|
+
const { state: l } = i, { selection: g } = l, k = (() => {
|
|
334
|
+
const y = g.main.from, A = l.doc.lineAt(y);
|
|
335
335
|
return {
|
|
336
336
|
line: A.number,
|
|
337
337
|
ch: y - A.from
|
|
@@ -347,7 +347,7 @@ class Bo {
|
|
|
347
347
|
if (o.type !== this.node.type)
|
|
348
348
|
return !1;
|
|
349
349
|
this.node = o;
|
|
350
|
-
const t =
|
|
350
|
+
const t = Se(this.cm.state.doc.toString(), o.textContent);
|
|
351
351
|
return t && (this.updating = !0, this.cm.dispatch({
|
|
352
352
|
changes: {
|
|
353
353
|
from: t.from,
|
|
@@ -408,13 +408,13 @@ const Mo = Mt.create({
|
|
|
408
408
|
}
|
|
409
409
|
}), Ao = {
|
|
410
410
|
...S.nodes,
|
|
411
|
-
[
|
|
412
|
-
[
|
|
413
|
-
[
|
|
414
|
-
[
|
|
411
|
+
[Ue.name]: S.nodes.paragraph,
|
|
412
|
+
[qe.name]: S.nodes.bullet_list,
|
|
413
|
+
[ao.name]: S.nodes.list_item,
|
|
414
|
+
[De.name]: S.nodes.ordered_list,
|
|
415
415
|
[ro.name]: S.nodes.hard_break,
|
|
416
416
|
[oo.name]: S.nodes.code_block,
|
|
417
|
-
[
|
|
417
|
+
[Fe.name]: S.nodes.blockquote,
|
|
418
418
|
[so.name]: S.nodes.horizontal_rule
|
|
419
419
|
}, Po = {
|
|
420
420
|
...S.marks,
|
|
@@ -425,56 +425,56 @@ const Mo = Mt.create({
|
|
|
425
425
|
mixable: !0,
|
|
426
426
|
expelEnclosingWhitespace: !0
|
|
427
427
|
},
|
|
428
|
-
[
|
|
428
|
+
[no.name]: {
|
|
429
429
|
open: " _",
|
|
430
430
|
close: "_ ",
|
|
431
431
|
mixable: !0,
|
|
432
432
|
expelEnclosingWhitespace: !0
|
|
433
433
|
},
|
|
434
|
-
[
|
|
434
|
+
[ze.name]: {
|
|
435
435
|
open: "==",
|
|
436
436
|
close: "==",
|
|
437
437
|
mixable: !0,
|
|
438
438
|
expelEnclosingWhitespace: !0
|
|
439
439
|
},
|
|
440
|
-
[
|
|
440
|
+
[We.name]: {
|
|
441
441
|
open: "<u>",
|
|
442
442
|
close: "</u>",
|
|
443
443
|
mixable: !0,
|
|
444
444
|
expelEnclosingWhitespace: !0
|
|
445
445
|
},
|
|
446
|
-
[
|
|
447
|
-
open(e, o, t,
|
|
448
|
-
return
|
|
446
|
+
[Te.name]: {
|
|
447
|
+
open(e, o, t, i) {
|
|
448
|
+
return Le(o, t, i, 1) ? "<" : "[";
|
|
449
449
|
},
|
|
450
|
-
close(e, o, t,
|
|
450
|
+
close(e, o, t, i) {
|
|
451
451
|
const l = o.attrs.canonicalSrc || o.attrs.href;
|
|
452
|
-
return
|
|
452
|
+
return Le(o, t, i, -1) ? ">" : `](${e.esc(l)}${o.attrs.title ? ` ${e.quote(o.attrs.title)}` : ""})`;
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
455
|
};
|
|
456
|
-
function
|
|
456
|
+
function Le(e, o, t, i) {
|
|
457
457
|
if (e.attrs.title || !/^\w+:/.test(e.attrs.href)) return !1;
|
|
458
|
-
const l = o.child(t + (
|
|
458
|
+
const l = o.child(t + (i < 0 ? -1 : 0));
|
|
459
459
|
if (!l.isText || l.text !== e.attrs.href || l.marks[l.marks.length - 1] !== e)
|
|
460
460
|
return !1;
|
|
461
|
-
if (t === (
|
|
462
|
-
const
|
|
463
|
-
return !e.isInSet(
|
|
461
|
+
if (t === (i < 0 ? 1 : o.childCount - 1)) return !0;
|
|
462
|
+
const g = o.child(t + (i < 0 ? -2 : 1));
|
|
463
|
+
return !e.isInSet(g.marks);
|
|
464
464
|
}
|
|
465
|
-
function
|
|
466
|
-
const t = new
|
|
465
|
+
function de(e, o) {
|
|
466
|
+
const t = new co(
|
|
467
467
|
Ao,
|
|
468
468
|
Po
|
|
469
|
-
),
|
|
470
|
-
return t.serialize(
|
|
469
|
+
), i = e.nodeFromJSON(o);
|
|
470
|
+
return t.serialize(i, { tightLists: !0 });
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function me(e, o) {
|
|
473
473
|
if (!o) return null;
|
|
474
474
|
const t = io.parse(o);
|
|
475
475
|
if (!t) return null;
|
|
476
|
-
const
|
|
477
|
-
return l.append(document.createComment(o)),
|
|
476
|
+
const i = new DOMParser(), { body: l } = i.parseFromString(t, "text/html");
|
|
477
|
+
return l.append(document.createComment(o)), uo.fromSchema(e).parse(l).toJSON();
|
|
478
478
|
}
|
|
479
479
|
const Ho = Ft({
|
|
480
480
|
name: "OrRichTextEditor",
|
|
@@ -510,7 +510,7 @@ const Ho = Ft({
|
|
|
510
510
|
},
|
|
511
511
|
format: {
|
|
512
512
|
type: String,
|
|
513
|
-
default: () =>
|
|
513
|
+
default: () => Je.Markup
|
|
514
514
|
},
|
|
515
515
|
label: {
|
|
516
516
|
type: String,
|
|
@@ -550,7 +550,7 @@ const Ho = Ft({
|
|
|
550
550
|
],
|
|
551
551
|
setup(e, o) {
|
|
552
552
|
let t = qt();
|
|
553
|
-
const
|
|
553
|
+
const i = m(), l = m(), g = m(), L = m(), k = m(), D = m(), U = m(), W = m(), G = m(), B = m({
|
|
554
554
|
bold: !1,
|
|
555
555
|
italic: !1,
|
|
556
556
|
underline: !1,
|
|
@@ -565,29 +565,29 @@ const Ho = Ft({
|
|
|
565
565
|
blockquote: !1,
|
|
566
566
|
file: !1,
|
|
567
567
|
source: !1
|
|
568
|
-
}), y = m(e.autofocus), A = [1, 2, 3, 4], P = m(0),
|
|
569
|
-
let
|
|
568
|
+
}), y = m(e.autofocus), A = [1, 2, 3, 4], P = m(0), I = m(""), s = m(!1), N = m(!1), d = m(""), b = m(""), se = m(0), pe = m(""), { isMobile: ge } = pt();
|
|
569
|
+
let he = Et(i, {
|
|
570
570
|
fallbackFocus: ".container",
|
|
571
571
|
allowOutsideClick: !0
|
|
572
572
|
});
|
|
573
|
-
Vt(
|
|
574
|
-
var
|
|
575
|
-
const
|
|
576
|
-
if (k.value && l.value &&
|
|
573
|
+
Vt(g, $t((r) => {
|
|
574
|
+
var h, p;
|
|
575
|
+
const c = r[0], { width: u } = c.contentRect;
|
|
576
|
+
if (k.value && l.value && ve.value) {
|
|
577
577
|
let C = 0;
|
|
578
|
-
C = ((
|
|
579
|
-
const M =
|
|
580
|
-
|
|
578
|
+
C = ((p = (h = l.value.firstElementChild) == null ? void 0 : h.firstElementChild) == null ? void 0 : p.offsetWidth) + 16;
|
|
579
|
+
const M = u / C - 2;
|
|
580
|
+
se.value = Math.round(ve.value - M);
|
|
581
581
|
}
|
|
582
582
|
}, 10)), zt(() => {
|
|
583
583
|
t.value = new At({
|
|
584
584
|
onUpdate: ({ editor: r }) => {
|
|
585
|
-
y.value = !0,
|
|
586
|
-
const
|
|
587
|
-
e.format === "markdown" ? (
|
|
585
|
+
y.value = !0, ce();
|
|
586
|
+
const c = r.getHTML(), u = r.getText();
|
|
587
|
+
e.format === "markdown" ? (I.value = de(r.schema, r.getJSON()), E.value = I.value) : E.value = u === "" ? u : c;
|
|
588
588
|
},
|
|
589
589
|
onCreate: ({ editor: r }) => {
|
|
590
|
-
e.format === "markdown" ? r.commands.setContent(
|
|
590
|
+
e.format === "markdown" ? r.commands.setContent(me(r.schema, E.value)) : r.commands.setContent(E.value);
|
|
591
591
|
},
|
|
592
592
|
onFocus(r) {
|
|
593
593
|
o.emit("focus", r);
|
|
@@ -595,7 +595,7 @@ const Ho = Ft({
|
|
|
595
595
|
onBlur(r) {
|
|
596
596
|
o.emit("blur", r);
|
|
597
597
|
},
|
|
598
|
-
element:
|
|
598
|
+
element: i.value,
|
|
599
599
|
autofocus: e.autofocus,
|
|
600
600
|
enableInputRules: !0,
|
|
601
601
|
enablePasteRules: !0,
|
|
@@ -609,40 +609,40 @@ const Ho = Ft({
|
|
|
609
609
|
orderedList: !1,
|
|
610
610
|
blockquote: !1
|
|
611
611
|
}),
|
|
612
|
-
|
|
612
|
+
Ue.configure({
|
|
613
613
|
HTMLAttributes: {
|
|
614
614
|
class: "or-cm-paragraph my-xs"
|
|
615
615
|
}
|
|
616
616
|
}),
|
|
617
|
-
|
|
617
|
+
qe.configure({
|
|
618
618
|
HTMLAttributes: {
|
|
619
619
|
class: "or-cm-bulletList mx-lg my-xs list-disc"
|
|
620
620
|
}
|
|
621
621
|
}),
|
|
622
|
-
|
|
622
|
+
De.configure({
|
|
623
623
|
HTMLAttributes: {
|
|
624
624
|
class: "or-cm-orderedList mx-lg my-xs list-decimal"
|
|
625
625
|
}
|
|
626
626
|
}),
|
|
627
|
-
|
|
627
|
+
Fe.configure({
|
|
628
628
|
HTMLAttributes: {
|
|
629
629
|
class: "or-cm-blockquote my-sm mx-lg px-lg border-l-2 border-outline"
|
|
630
630
|
}
|
|
631
631
|
}),
|
|
632
632
|
Ht.configure({ levels: A }).extend({
|
|
633
633
|
levels: A,
|
|
634
|
-
renderHTML({ node: r, HTMLAttributes:
|
|
634
|
+
renderHTML({ node: r, HTMLAttributes: c }) {
|
|
635
635
|
return [
|
|
636
636
|
"h" + r.attrs.level,
|
|
637
|
-
Pt(
|
|
637
|
+
Pt(c, {
|
|
638
638
|
class: `typography-headline-${r.attrs.level} my-xs`
|
|
639
639
|
}),
|
|
640
640
|
0
|
|
641
641
|
];
|
|
642
642
|
}
|
|
643
643
|
}),
|
|
644
|
-
|
|
645
|
-
|
|
644
|
+
We,
|
|
645
|
+
Te.configure({
|
|
646
646
|
openOnClick: !0,
|
|
647
647
|
linkOnPaste: !0,
|
|
648
648
|
autolink: !1,
|
|
@@ -652,7 +652,7 @@ const Ho = Ft({
|
|
|
652
652
|
class: "or-cm-link text-primary cursor-pointer"
|
|
653
653
|
}
|
|
654
654
|
}),
|
|
655
|
-
|
|
655
|
+
ze,
|
|
656
656
|
Rt.configure({
|
|
657
657
|
placeholder: e.placeholder,
|
|
658
658
|
emptyEditorClass: "or-cm-placeholder text-outline is-editor-empty"
|
|
@@ -666,38 +666,38 @@ const Ho = Ft({
|
|
|
666
666
|
parseOptions: {
|
|
667
667
|
preserveWhitespace: !0
|
|
668
668
|
}
|
|
669
|
-
}),
|
|
669
|
+
}), ce(), he.activate();
|
|
670
670
|
}), Tt(() => {
|
|
671
671
|
var r;
|
|
672
672
|
(r = t.value) == null || r.destroy();
|
|
673
|
-
}), It(
|
|
674
|
-
y.value = !1,
|
|
673
|
+
}), It(g, () => {
|
|
674
|
+
y.value = !1, he.deactivate();
|
|
675
675
|
});
|
|
676
|
-
const
|
|
676
|
+
const E = w({
|
|
677
677
|
get: () => e.modelValue,
|
|
678
678
|
set: (r) => {
|
|
679
679
|
o.emit("input", r), o.emit("update:modelValue", r);
|
|
680
680
|
}
|
|
681
|
-
}),
|
|
682
|
-
const r =
|
|
683
|
-
let
|
|
684
|
-
return e.toolbar.forEach((
|
|
685
|
-
|
|
686
|
-
}),
|
|
687
|
-
}),
|
|
688
|
-
var r,
|
|
689
|
-
|
|
690
|
-
},
|
|
691
|
-
var
|
|
692
|
-
const
|
|
693
|
-
(
|
|
694
|
-
},
|
|
695
|
-
var
|
|
681
|
+
}), Qe = w(() => e.toolbar.flat().indexOf("heading")), Xe = w(() => (r) => je[r]), Ye = w(() => (r) => Ke[r]), Ze = w(() => P.value && B.value.heading ? `format_h${P.value}` : "format_paragraph"), ve = w(() => e.toolbar.flat().length), ie = w(() => {
|
|
682
|
+
const r = se.value, c = e.toolbar.flat();
|
|
683
|
+
let u = new Set(c.slice(c.length - r, c.length));
|
|
684
|
+
return e.toolbar.forEach((h) => {
|
|
685
|
+
h.some((p) => u.has(p)) && h.forEach((p) => u.add(p));
|
|
686
|
+
}), u;
|
|
687
|
+
}), xe = () => {
|
|
688
|
+
var r, c, u;
|
|
689
|
+
ce(), y.value = !0, (r = t.value) == null || r.commands.focus(), P.value = ((u = (c = t.value) == null ? void 0 : c.getAttributes("heading")) == null ? void 0 : u.level) || 0;
|
|
690
|
+
}, _e = (r) => ge.value ? !0 : gt(r) ? !r.some((u) => ie.value.has(u)) : !ie.value.has(r), et = (r) => {
|
|
691
|
+
var h, p, C, M;
|
|
692
|
+
const u = r.target.value;
|
|
693
|
+
(p = t.value) == null || p.commands.setContent(me((h = t.value) == null ? void 0 : h.schema, u)), I.value = de((C = t.value) == null ? void 0 : C.schema, (M = t.value) == null ? void 0 : M.getJSON()), E.value = I.value;
|
|
694
|
+
}, tt = (r, c) => {
|
|
695
|
+
var u, h, p, C, M, J, j, K, Q, X, Y, Z, z, _, be, ke, ye;
|
|
696
696
|
switch (r) {
|
|
697
697
|
case "source":
|
|
698
|
-
|
|
699
|
-
var
|
|
700
|
-
return (
|
|
698
|
+
N.value = !N.value, pe.value = de((u = t.value) == null ? void 0 : u.schema, (h = t.value) == null ? void 0 : h.getJSON()), (C = L.value) == null || C.style.setProperty("height", `${((p = i.value) == null ? void 0 : p.offsetHeight) || 88}px`), Ut(() => {
|
|
699
|
+
var x;
|
|
700
|
+
return (x = L.value) == null ? void 0 : x.focus();
|
|
701
701
|
});
|
|
702
702
|
break;
|
|
703
703
|
case "bulletList":
|
|
@@ -706,10 +706,10 @@ const Ho = Ft({
|
|
|
706
706
|
break;
|
|
707
707
|
case "link":
|
|
708
708
|
if (t.value) {
|
|
709
|
-
const
|
|
710
|
-
d.value =
|
|
709
|
+
const x = ((j = t.value) == null ? void 0 : j.state.selection.$anchor.pos) || 0, { from: it, to: ct, empty: ut } = t.value.state.selection, ue = (K = t.value.view.state.doc.nodeAt(x)) == null ? void 0 : K.marks.filter((mt) => mt.type.name === "link"), dt = ue != null && ue.length && ((Q = t.value.view.state.doc.nodeAt(x)) == null ? void 0 : Q.text) || "";
|
|
710
|
+
d.value = ut ? dt : t.value.state.doc.textBetween(it, ct, " "), b.value = t.value.getAttributes("link").href || "";
|
|
711
711
|
}
|
|
712
|
-
|
|
712
|
+
s.value = !s.value;
|
|
713
713
|
break;
|
|
714
714
|
case "blockquote":
|
|
715
715
|
(X = t.value) == null || X.chain().toggleBlockquote().run();
|
|
@@ -718,82 +718,73 @@ const Ho = Ft({
|
|
|
718
718
|
B.value.codeBlock ? (Z = t.value) == null || Z.commands.setNode("paragraph") : (Y = t.value) == null || Y.commands.setNode(r, { language: "javascript" });
|
|
719
719
|
break;
|
|
720
720
|
case "heading":
|
|
721
|
-
|
|
721
|
+
c ? (P.value = c, (_ = t.value) == null || _.commands.toggleHeading({ level: c })) : ((z = t.value) == null || z.commands.setParagraph(), P.value = 0);
|
|
722
722
|
break;
|
|
723
723
|
case "undo":
|
|
724
724
|
case "redo":
|
|
725
|
-
r === "undo" ? (
|
|
725
|
+
r === "undo" ? (be = t.value) == null || be.commands.undo() : (ke = t.value) == null || ke.commands.redo();
|
|
726
726
|
break;
|
|
727
727
|
case "file":
|
|
728
728
|
o.emit("file-upload");
|
|
729
729
|
break;
|
|
730
730
|
default:
|
|
731
|
-
(
|
|
731
|
+
(ye = t.value) == null || ye.chain().toggleMark(r).run();
|
|
732
732
|
break;
|
|
733
733
|
}
|
|
734
|
-
},
|
|
735
|
-
var
|
|
736
|
-
|
|
737
|
-
const r = (C = t.value) == null ? void 0 : C.state.selection.empty,
|
|
738
|
-
|
|
739
|
-
href:
|
|
740
|
-
target: "__blank"
|
|
741
|
-
}).command(({ tr: R }) => {
|
|
742
|
-
const fe = d.value[d.value.length - 1] === " " ? d.value : `${d.value} `;
|
|
743
|
-
return R.insertText(fe), !0;
|
|
744
|
-
}).run()), v.value && p === d.value && r && ((Y = t.value) == null || Y.chain().extendMarkRange("link").updateAttributes("link", {
|
|
745
|
-
href: v.value
|
|
746
|
-
}).run()), v.value && d.value !== p && !r && ((te = t.value) == null || te.chain().focus().insertContentAt({
|
|
747
|
-
from: (Z = t.value) == null ? void 0 : Z.state.selection.from,
|
|
748
|
-
to: (x = t.value) == null ? void 0 : x.state.selection.to
|
|
749
|
-
}, d.value).setTextSelection({
|
|
750
|
-
from: (_ = t.value) == null ? void 0 : _.state.selection.from,
|
|
751
|
-
to: ((ee = t.value) == null ? void 0 : ee.state.selection.from) + d.value.length
|
|
752
|
-
}).setMark("link", {
|
|
753
|
-
href: v.value,
|
|
734
|
+
}, ot = async () => {
|
|
735
|
+
var p, C, M, J, j, K, Q, X, Y, Z;
|
|
736
|
+
b.value === "" && ((p = t.value) == null || p.chain().focus().extendMarkRange("link").unsetLink().run());
|
|
737
|
+
const r = (C = t.value) == null ? void 0 : C.state.selection.empty, c = ((M = t.value) == null ? void 0 : M.state.selection.$anchor.pos) || 0, u = (j = (J = t.value) == null ? void 0 : J.view.state.doc.nodeAt(c)) == null ? void 0 : j.marks.filter((z) => z.type.name === "link"), h = u != null && u.length ? (Q = (K = t.value) == null ? void 0 : K.view.state.doc.nodeAt(c)) == null ? void 0 : Q.text : "";
|
|
738
|
+
b.value && r && !h && ((X = t.value) == null || X.chain().focus().setMark("link", {
|
|
739
|
+
href: b.value,
|
|
754
740
|
target: "__blank"
|
|
755
|
-
}).
|
|
756
|
-
|
|
741
|
+
}).command(({ tr: z }) => {
|
|
742
|
+
const _ = d.value[d.value.length - 1] === " " ? d.value : `${d.value} `;
|
|
743
|
+
return z.insertText(_), !0;
|
|
744
|
+
}).run()), b.value && h === d.value && r && ((Y = t.value) == null || Y.chain().extendMarkRange("link").updateAttributes("link", {
|
|
745
|
+
href: b.value
|
|
746
|
+
}).run()), b.value && !r && ((Z = t.value) == null || Z.chain().focus().setMark("link", {
|
|
747
|
+
href: b.value,
|
|
757
748
|
target: "__blank"
|
|
758
|
-
}).run()), d.value = "",
|
|
759
|
-
},
|
|
760
|
-
|
|
761
|
-
},
|
|
762
|
-
e.toolbar.flat().forEach((
|
|
763
|
-
var
|
|
764
|
-
|
|
749
|
+
}).run()), d.value = "", b.value = "", s.value = !1;
|
|
750
|
+
}, rt = () => {
|
|
751
|
+
s.value = !1;
|
|
752
|
+
}, ce = () => {
|
|
753
|
+
e.toolbar.flat().forEach((c) => {
|
|
754
|
+
var u;
|
|
755
|
+
c === "source" ? B.value[c] = N.value : B.value[c] = ((u = t.value) == null ? void 0 : u.isActive(c)) || !1;
|
|
765
756
|
});
|
|
766
757
|
};
|
|
767
758
|
Dt([
|
|
768
759
|
t,
|
|
769
|
-
|
|
760
|
+
E,
|
|
770
761
|
() => e.disabled
|
|
771
762
|
], ([
|
|
772
763
|
r,
|
|
773
|
-
|
|
774
|
-
|
|
764
|
+
c,
|
|
765
|
+
u
|
|
775
766
|
]) => {
|
|
776
|
-
|
|
767
|
+
c !== (r == null ? void 0 : r.getHTML()) && e.format !== "markdown" && (r == null || r.commands.setContent(c)), c !== I.value && e.format === "markdown" && (r == null || r.commands.setContent(me(r == null ? void 0 : r.schema, c))), r == null || r.setEditable(!u);
|
|
777
768
|
});
|
|
778
769
|
const nt = w(() => [
|
|
779
770
|
"or-rich-text-editor-v3",
|
|
780
771
|
...fo
|
|
781
|
-
]),
|
|
772
|
+
]), at = w(() => [
|
|
782
773
|
...po
|
|
783
|
-
]),
|
|
774
|
+
]), lt = w(() => [
|
|
784
775
|
...go
|
|
785
|
-
]),
|
|
776
|
+
]), st = w(() => [
|
|
786
777
|
"tiptap-editor-v3",
|
|
787
778
|
...ho
|
|
788
779
|
]);
|
|
789
780
|
return {
|
|
790
|
-
root:
|
|
781
|
+
root: g,
|
|
791
782
|
rootStyles: nt,
|
|
792
783
|
toolbarRef: l,
|
|
793
|
-
toolbarStyles:
|
|
794
|
-
toolbarGroupStyles:
|
|
795
|
-
controlRef:
|
|
796
|
-
controlStyles:
|
|
784
|
+
toolbarStyles: at,
|
|
785
|
+
toolbarGroupStyles: lt,
|
|
786
|
+
controlRef: i,
|
|
787
|
+
controlStyles: st,
|
|
797
788
|
editor: t,
|
|
798
789
|
containerRef: k,
|
|
799
790
|
toolbarButtonRef: W,
|
|
@@ -801,84 +792,84 @@ const Ho = Ft({
|
|
|
801
792
|
textareaRef: L,
|
|
802
793
|
morePopoverRef: U,
|
|
803
794
|
menuRef: G,
|
|
804
|
-
handleToolbarClick:
|
|
805
|
-
handleEditorClick:
|
|
795
|
+
handleToolbarClick: tt,
|
|
796
|
+
handleEditorClick: xe,
|
|
806
797
|
isActive: B,
|
|
807
|
-
getRichTextEditorIcon:
|
|
808
|
-
getRichTextEditorTooltipIcon:
|
|
809
|
-
getIndexOfHeading:
|
|
798
|
+
getRichTextEditorIcon: Xe,
|
|
799
|
+
getRichTextEditorTooltipIcon: Ye,
|
|
800
|
+
getIndexOfHeading: Qe,
|
|
810
801
|
headingLevels: A,
|
|
811
|
-
headingIcon:
|
|
812
|
-
attachLink:
|
|
813
|
-
discardLink:
|
|
814
|
-
isOpenLinkModal:
|
|
802
|
+
headingIcon: Ze,
|
|
803
|
+
attachLink: ot,
|
|
804
|
+
discardLink: rt,
|
|
805
|
+
isOpenLinkModal: s,
|
|
815
806
|
text: d,
|
|
816
|
-
link:
|
|
807
|
+
link: b,
|
|
817
808
|
isFocused: y,
|
|
818
|
-
isVisible:
|
|
819
|
-
isMobile:
|
|
820
|
-
countOfNotVisibleTools:
|
|
821
|
-
notVisibleTools:
|
|
822
|
-
handleInput:
|
|
823
|
-
model:
|
|
824
|
-
disableMarkdown:
|
|
825
|
-
sourceValue:
|
|
809
|
+
isVisible: _e,
|
|
810
|
+
isMobile: ge,
|
|
811
|
+
countOfNotVisibleTools: se,
|
|
812
|
+
notVisibleTools: ie,
|
|
813
|
+
handleInput: et,
|
|
814
|
+
model: E,
|
|
815
|
+
disableMarkdown: N,
|
|
816
|
+
sourceValue: pe,
|
|
826
817
|
activeHeadingLevel: P
|
|
827
818
|
};
|
|
828
819
|
}
|
|
829
820
|
}), Ro = ["disabled"], No = ["disabled"], Vo = {
|
|
830
|
-
class: /* @__PURE__ */
|
|
821
|
+
class: /* @__PURE__ */ R(["p-sm", "overflow-auto", "min-h-[88px]", "h-full"])
|
|
831
822
|
}, $o = ["activated"], Io = { class: "flex p-sm gap-md" }, Eo = {
|
|
832
|
-
class: /* @__PURE__ */
|
|
823
|
+
class: /* @__PURE__ */ R(["layout-column", "gap-md"])
|
|
833
824
|
}, Fo = {
|
|
834
|
-
class: /* @__PURE__ */
|
|
825
|
+
class: /* @__PURE__ */ R(["layout-row-reverse", "gap-md"])
|
|
835
826
|
};
|
|
836
|
-
function qo(e, o, t,
|
|
837
|
-
const L = O("OrLabel"), k = O("OrIconButton"), D = O("OrInputBox"), U = O("OrHint"), W = O("OrError"), G = O("OrPopover"), B = O("OrMenuItem"), y = O("OrMenu"), A = O("OrInput"), P = O("OrButton"),
|
|
838
|
-
return f(),
|
|
827
|
+
function qo(e, o, t, i, l, g) {
|
|
828
|
+
const L = O("OrLabel"), k = O("OrIconButton"), D = O("OrInputBox"), U = O("OrHint"), W = O("OrError"), G = O("OrPopover"), B = O("OrMenuItem"), y = O("OrMenu"), A = O("OrInput"), P = O("OrButton"), I = O("OrModal");
|
|
829
|
+
return f(), F("div", {
|
|
839
830
|
ref: "root",
|
|
840
|
-
class:
|
|
831
|
+
class: R(e.rootStyles)
|
|
841
832
|
}, [
|
|
842
|
-
e.$slots.label || e.$slots.addon || e.label ? (f(),
|
|
833
|
+
e.$slots.label || e.$slots.addon || e.label ? (f(), H(L, {
|
|
843
834
|
key: 0,
|
|
844
835
|
variant: "input",
|
|
845
836
|
required: e.required,
|
|
846
837
|
disabled: e.disabled
|
|
847
838
|
}, {
|
|
848
|
-
addon:
|
|
849
|
-
|
|
839
|
+
addon: v(() => [
|
|
840
|
+
ee(e.$slots, "addon", {}, void 0, !0)
|
|
850
841
|
]),
|
|
851
|
-
default:
|
|
852
|
-
|
|
853
|
-
|
|
842
|
+
default: v(() => [
|
|
843
|
+
ee(e.$slots, "label", {}, () => [
|
|
844
|
+
V(te(e.label), 1)
|
|
854
845
|
], !0)
|
|
855
846
|
]),
|
|
856
847
|
_: 3
|
|
857
848
|
}, 8, ["required", "disabled"])) : T("", !0),
|
|
858
|
-
|
|
849
|
+
$(D, {
|
|
859
850
|
ref: "containerRef",
|
|
860
851
|
class: "grow",
|
|
861
852
|
direction: "column",
|
|
862
853
|
invalid: !!e.error,
|
|
863
854
|
disabled: e.disabled,
|
|
864
|
-
onClick: o[4] || (o[4] = (
|
|
855
|
+
onClick: o[4] || (o[4] = (s) => e.handleEditorClick())
|
|
865
856
|
}, {
|
|
866
|
-
default:
|
|
867
|
-
|
|
857
|
+
default: v(() => [
|
|
858
|
+
q("div", {
|
|
868
859
|
ref: "toolbarRef",
|
|
869
|
-
class:
|
|
860
|
+
class: R(e.toolbarStyles),
|
|
870
861
|
disabled: e.disabled || !e.isFocused
|
|
871
862
|
}, [
|
|
872
|
-
(f(!0),
|
|
873
|
-
key:
|
|
874
|
-
class:
|
|
863
|
+
(f(!0), F(oe, null, re(e.toolbar, (s, N) => (f(), F("div", {
|
|
864
|
+
key: N,
|
|
865
|
+
class: R([...e.toolbarGroupStyles, { hidden: !e.isVisible(s) }]),
|
|
875
866
|
disabled: e.disabled || !e.isFocused
|
|
876
867
|
}, [
|
|
877
|
-
(f(!0),
|
|
868
|
+
(f(!0), F(oe, null, re(s, (d) => (f(), F("div", {
|
|
878
869
|
key: d,
|
|
879
|
-
class:
|
|
870
|
+
class: R(["flex gap-md", { hidden: !e.isVisible(d) }])
|
|
880
871
|
}, [
|
|
881
|
-
d === "heading" ? (f(),
|
|
872
|
+
d === "heading" ? (f(), H(k, {
|
|
882
873
|
key: 0,
|
|
883
874
|
ref_for: !0,
|
|
884
875
|
ref: "toolbarButtonRef",
|
|
@@ -886,158 +877,158 @@ function qo(e, o, t, s, l, h) {
|
|
|
886
877
|
tooltip: { content: d, placement: "top" },
|
|
887
878
|
selected: e.isActive[d],
|
|
888
879
|
disabled: e.disabled || !e.isFocused,
|
|
889
|
-
onClick: o[0] || (o[0] = (
|
|
890
|
-
}, null, 8, ["icon", "tooltip", "selected", "disabled"])) : e.isVisible(d) ? (f(),
|
|
880
|
+
onClick: o[0] || (o[0] = (b) => e.menuRef && e.menuRef.toggle())
|
|
881
|
+
}, null, 8, ["icon", "tooltip", "selected", "disabled"])) : e.isVisible(d) ? (f(), H(k, {
|
|
891
882
|
key: 1,
|
|
892
883
|
icon: { icon: e.getRichTextEditorIcon(d), variant: "inherit" },
|
|
893
884
|
tooltip: { content: e.getRichTextEditorTooltipIcon(d), placement: "top" },
|
|
894
885
|
selected: e.isActive[d],
|
|
895
886
|
disabled: e.disabled || !e.isFocused,
|
|
896
|
-
onClick: (
|
|
887
|
+
onClick: (b) => e.handleToolbarClick(d)
|
|
897
888
|
}, null, 8, ["icon", "tooltip", "selected", "disabled", "onClick"])) : T("", !0)
|
|
898
889
|
], 2))), 128))
|
|
899
890
|
], 10, No))), 128)),
|
|
900
|
-
e.countOfNotVisibleTools > 0 && !e.isMobile ? (f(),
|
|
891
|
+
e.countOfNotVisibleTools > 0 && !e.isMobile ? (f(), H(k, {
|
|
901
892
|
key: 0,
|
|
902
893
|
ref: "moreButtonRef",
|
|
903
|
-
class:
|
|
894
|
+
class: R(["mx-sm"]),
|
|
904
895
|
icon: { icon: "more_horiz", variant: "inherit" },
|
|
905
896
|
disabled: e.disabled || !e.isFocused,
|
|
906
897
|
"force-state": e.morePopoverRef && e.morePopoverRef.state === "open" ? "hover" : void 0,
|
|
907
|
-
onClick: o[1] || (o[1] = (
|
|
898
|
+
onClick: o[1] || (o[1] = (s) => e.morePopoverRef && e.morePopoverRef.open())
|
|
908
899
|
}, null, 8, ["disabled", "force-state"])) : T("", !0)
|
|
909
900
|
], 10, Ro),
|
|
910
|
-
|
|
911
|
-
|
|
901
|
+
q("div", Vo, [
|
|
902
|
+
ne(q("textarea", {
|
|
912
903
|
ref: "textareaRef",
|
|
913
|
-
"onUpdate:modelValue": o[2] || (o[2] = (
|
|
904
|
+
"onUpdate:modelValue": o[2] || (o[2] = (s) => e.sourceValue = s),
|
|
914
905
|
activated: e.disableMarkdown,
|
|
915
906
|
class: "block w-full h-full resize-none border-none outline-none bg-transparent typography-body-2-regular",
|
|
916
|
-
onInput: o[3] || (o[3] = (...
|
|
907
|
+
onInput: o[3] || (o[3] = (...s) => e.handleInput && e.handleInput(...s))
|
|
917
908
|
}, null, 40, $o), [
|
|
918
|
-
[
|
|
909
|
+
[ae, e.disableMarkdown],
|
|
919
910
|
[Wt, e.sourceValue]
|
|
920
911
|
]),
|
|
921
|
-
|
|
912
|
+
ne(q("div", {
|
|
922
913
|
ref: "controlRef",
|
|
923
|
-
class:
|
|
914
|
+
class: R(e.controlStyles)
|
|
924
915
|
}, null, 2), [
|
|
925
|
-
[
|
|
916
|
+
[ae, !e.disableMarkdown]
|
|
926
917
|
]),
|
|
927
|
-
|
|
918
|
+
ee(e.$slots, "files", {}, void 0, !0)
|
|
928
919
|
])
|
|
929
920
|
]),
|
|
930
921
|
_: 3
|
|
931
922
|
}, 8, ["invalid", "disabled"]),
|
|
932
|
-
e.$slots.hint || e.hint ?
|
|
923
|
+
e.$slots.hint || e.hint ? ne((f(), H(U, {
|
|
933
924
|
key: 1,
|
|
934
925
|
disabled: e.disabled
|
|
935
926
|
}, {
|
|
936
|
-
default:
|
|
937
|
-
|
|
938
|
-
|
|
927
|
+
default: v(() => [
|
|
928
|
+
ee(e.$slots, "hint", {}, () => [
|
|
929
|
+
V(te(e.hint), 1)
|
|
939
930
|
], !0)
|
|
940
931
|
]),
|
|
941
932
|
_: 3
|
|
942
933
|
}, 8, ["disabled"])), [
|
|
943
|
-
[
|
|
934
|
+
[ae, !e.error]
|
|
944
935
|
]) : T("", !0),
|
|
945
|
-
|
|
946
|
-
default:
|
|
947
|
-
|
|
936
|
+
ne($(W, { disabled: e.disabled }, {
|
|
937
|
+
default: v(() => [
|
|
938
|
+
V(te(e.error), 1)
|
|
948
939
|
]),
|
|
949
940
|
_: 1
|
|
950
941
|
}, 8, ["disabled"]), [
|
|
951
|
-
[
|
|
942
|
+
[ae, typeof e.error == "string" && e.error.length > 0]
|
|
952
943
|
]),
|
|
953
|
-
e.moreButtonRef ? (f(),
|
|
944
|
+
e.moreButtonRef ? (f(), H(G, {
|
|
954
945
|
key: 2,
|
|
955
946
|
ref: "morePopoverRef",
|
|
956
947
|
trigger: e.moreButtonRef && e.moreButtonRef.root,
|
|
957
948
|
placement: "top-end"
|
|
958
949
|
}, {
|
|
959
|
-
default:
|
|
960
|
-
|
|
961
|
-
(f(!0),
|
|
962
|
-
key:
|
|
963
|
-
icon: { icon: e.getRichTextEditorIcon(
|
|
964
|
-
tooltip: { content: e.getRichTextEditorTooltipIcon(
|
|
965
|
-
selected: e.isActive[
|
|
966
|
-
onClick: (
|
|
950
|
+
default: v(() => [
|
|
951
|
+
q("div", Io, [
|
|
952
|
+
(f(!0), F(oe, null, re(e.notVisibleTools, (s) => (f(), H(k, {
|
|
953
|
+
key: s,
|
|
954
|
+
icon: { icon: e.getRichTextEditorIcon(s), variant: "inherit" },
|
|
955
|
+
tooltip: { content: e.getRichTextEditorTooltipIcon(s), placement: "top" },
|
|
956
|
+
selected: e.isActive[s],
|
|
957
|
+
onClick: (N) => e.handleToolbarClick(s)
|
|
967
958
|
}, null, 8, ["icon", "tooltip", "selected", "onClick"]))), 128))
|
|
968
959
|
])
|
|
969
960
|
]),
|
|
970
961
|
_: 1
|
|
971
962
|
}, 8, ["trigger"])) : T("", !0),
|
|
972
|
-
e.toolbarButtonRef ? (f(),
|
|
963
|
+
e.toolbarButtonRef ? (f(), H(y, {
|
|
973
964
|
key: 3,
|
|
974
965
|
ref: "menuRef",
|
|
975
966
|
trigger: e.toolbarButtonRef[e.getIndexOfHeading] && e.toolbarButtonRef[e.getIndexOfHeading].root,
|
|
976
967
|
placement: "bottom-start"
|
|
977
968
|
}, {
|
|
978
|
-
default:
|
|
979
|
-
(f(!0),
|
|
980
|
-
key:
|
|
981
|
-
selected: e.activeHeadingLevel ===
|
|
982
|
-
onClick: (
|
|
969
|
+
default: v(() => [
|
|
970
|
+
(f(!0), F(oe, null, re(e.headingLevels, (s) => (f(), H(B, {
|
|
971
|
+
key: s,
|
|
972
|
+
selected: e.activeHeadingLevel === s,
|
|
973
|
+
onClick: (N) => e.handleToolbarClick("heading", s)
|
|
983
974
|
}, {
|
|
984
|
-
default:
|
|
985
|
-
|
|
975
|
+
default: v(() => [
|
|
976
|
+
V(" Heading " + te(s), 1)
|
|
986
977
|
]),
|
|
987
978
|
_: 2
|
|
988
979
|
}, 1032, ["selected", "onClick"]))), 128)),
|
|
989
|
-
|
|
980
|
+
$(B, {
|
|
990
981
|
selected: !e.activeHeadingLevel,
|
|
991
|
-
onClick: o[5] || (o[5] = (
|
|
982
|
+
onClick: o[5] || (o[5] = (s) => e.handleToolbarClick("heading"))
|
|
992
983
|
}, {
|
|
993
|
-
default:
|
|
994
|
-
|
|
984
|
+
default: v(() => [
|
|
985
|
+
V(" None ")
|
|
995
986
|
]),
|
|
996
987
|
_: 1
|
|
997
988
|
}, 8, ["selected"])
|
|
998
989
|
]),
|
|
999
990
|
_: 1
|
|
1000
991
|
}, 8, ["trigger"])) : T("", !0),
|
|
1001
|
-
I
|
|
992
|
+
$(I, {
|
|
1002
993
|
"is-open": e.isOpenLinkModal,
|
|
1003
994
|
size: "s"
|
|
1004
995
|
}, {
|
|
1005
|
-
header:
|
|
1006
|
-
|
|
996
|
+
header: v(() => [
|
|
997
|
+
V(" Add Link ")
|
|
1007
998
|
]),
|
|
1008
|
-
footer:
|
|
1009
|
-
|
|
1010
|
-
|
|
999
|
+
footer: v(() => [
|
|
1000
|
+
q("div", Fo, [
|
|
1001
|
+
$(P, {
|
|
1011
1002
|
variant: "contained",
|
|
1012
|
-
onClick: o[8] || (o[8] = (
|
|
1003
|
+
onClick: o[8] || (o[8] = (s) => e.attachLink())
|
|
1013
1004
|
}, {
|
|
1014
|
-
default:
|
|
1015
|
-
|
|
1005
|
+
default: v(() => [
|
|
1006
|
+
V(" Save ")
|
|
1016
1007
|
]),
|
|
1017
1008
|
_: 1
|
|
1018
1009
|
}),
|
|
1019
|
-
|
|
1010
|
+
$(P, {
|
|
1020
1011
|
variant: "outlined",
|
|
1021
|
-
onClick: o[9] || (o[9] = (
|
|
1012
|
+
onClick: o[9] || (o[9] = (s) => e.discardLink())
|
|
1022
1013
|
}, {
|
|
1023
|
-
default:
|
|
1024
|
-
|
|
1014
|
+
default: v(() => [
|
|
1015
|
+
V(" Cancel ")
|
|
1025
1016
|
]),
|
|
1026
1017
|
_: 1
|
|
1027
1018
|
})
|
|
1028
1019
|
])
|
|
1029
1020
|
]),
|
|
1030
|
-
default:
|
|
1031
|
-
|
|
1032
|
-
|
|
1021
|
+
default: v(() => [
|
|
1022
|
+
q("div", Eo, [
|
|
1023
|
+
$(A, {
|
|
1033
1024
|
modelValue: e.text,
|
|
1034
|
-
"onUpdate:modelValue": o[6] || (o[6] = (
|
|
1025
|
+
"onUpdate:modelValue": o[6] || (o[6] = (s) => e.text = s),
|
|
1035
1026
|
label: "Text",
|
|
1036
1027
|
placeholder: "Enter text"
|
|
1037
1028
|
}, null, 8, ["modelValue"]),
|
|
1038
|
-
|
|
1029
|
+
$(A, {
|
|
1039
1030
|
modelValue: e.link,
|
|
1040
|
-
"onUpdate:modelValue": o[7] || (o[7] = (
|
|
1031
|
+
"onUpdate:modelValue": o[7] || (o[7] = (s) => e.link = s),
|
|
1041
1032
|
label: "Link",
|
|
1042
1033
|
placeholder: "Enter link"
|
|
1043
1034
|
}, null, 8, ["modelValue"])
|
|
@@ -1047,11 +1038,11 @@ function qo(e, o, t, s, l, h) {
|
|
|
1047
1038
|
}, 8, ["is-open"])
|
|
1048
1039
|
], 2);
|
|
1049
1040
|
}
|
|
1050
|
-
const Rr = /* @__PURE__ */ mo(Ho, [["render", qo], ["__scopeId", "data-v-
|
|
1041
|
+
const Rr = /* @__PURE__ */ mo(Ho, [["render", qo], ["__scopeId", "data-v-f034427c"]]);
|
|
1051
1042
|
export {
|
|
1052
|
-
|
|
1043
|
+
Je as F,
|
|
1053
1044
|
Rr as O,
|
|
1054
|
-
|
|
1055
|
-
|
|
1045
|
+
je as R,
|
|
1046
|
+
Ke as a
|
|
1056
1047
|
};
|
|
1057
|
-
//# sourceMappingURL=OrRichTextEditor-
|
|
1048
|
+
//# sourceMappingURL=OrRichTextEditor-CxWFAu2l.mjs.map
|