@cgboiler/biz-basic 1.0.62 → 1.0.63
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/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/rich-text-editor/RichTextEditor.js +14 -9
- package/es/rich-text-editor/index.css +1 -1
- package/es/rich-text-editor/index.less +8 -24
- package/es/rich-text-editor/menu-system/components/color-highlight-popover.js +2 -2
- package/es/rich-text-editor/menu-system/components/heading-dropdown-menu.js +21 -2
- package/es/rich-text-editor/menu-system/components/horizontal-rule-button.js +1 -1
- package/es/rich-text-editor/menu-system/components/image-upload-node.js +5 -5
- package/es/rich-text-editor/menu-system/components/link-popover.js +5 -5
- package/es/rich-text-editor/menu-system/hooks/use-blockquote.d.ts +2 -2
- package/es/rich-text-editor/menu-system/hooks/use-blockquote.js +3 -3
- package/es/rich-text-editor/menu-system/hooks/use-code-block.d.ts +2 -2
- package/es/rich-text-editor/menu-system/hooks/use-code-block.js +3 -3
- package/es/rich-text-editor/menu-system/hooks/use-color-highlight.d.ts +2 -2
- package/es/rich-text-editor/menu-system/hooks/use-color-highlight.js +14 -14
- package/es/rich-text-editor/menu-system/hooks/use-file-upload.js +6 -11
- package/es/rich-text-editor/menu-system/hooks/use-heading-dropdown-menu.d.ts +1 -1
- package/es/rich-text-editor/menu-system/hooks/use-heading-dropdown-menu.js +3 -3
- package/es/rich-text-editor/menu-system/hooks/use-heading.js +17 -33
- package/es/rich-text-editor/menu-system/hooks/use-image-upload.d.ts +2 -2
- package/es/rich-text-editor/menu-system/hooks/use-image-upload.js +3 -3
- package/es/rich-text-editor/menu-system/hooks/use-list-dropdown-menu.js +8 -6
- package/es/rich-text-editor/menu-system/hooks/use-list.js +8 -8
- package/es/rich-text-editor/menu-system/hooks/use-mark.js +14 -3
- package/es/rich-text-editor/menu-system/hooks/use-text-align.js +6 -6
- package/es/rich-text-editor/menu-system/hooks/use-undo-redo.d.ts +2 -2
- package/es/rich-text-editor/menu-system/hooks/use-undo-redo.js +4 -4
- package/es/rich-text-editor/useExtensions.js +2 -5
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/rich-text-editor/RichTextEditor.js +14 -9
- package/lib/rich-text-editor/index.css +1 -1
- package/lib/rich-text-editor/index.less +8 -24
- package/lib/rich-text-editor/menu-system/components/color-highlight-popover.js +2 -2
- package/lib/rich-text-editor/menu-system/components/heading-dropdown-menu.js +21 -2
- package/lib/rich-text-editor/menu-system/components/horizontal-rule-button.js +1 -1
- package/lib/rich-text-editor/menu-system/components/image-upload-node.js +5 -5
- package/lib/rich-text-editor/menu-system/components/link-popover.js +5 -5
- package/lib/rich-text-editor/menu-system/hooks/use-blockquote.d.ts +2 -2
- package/lib/rich-text-editor/menu-system/hooks/use-blockquote.js +2 -2
- package/lib/rich-text-editor/menu-system/hooks/use-code-block.d.ts +2 -2
- package/lib/rich-text-editor/menu-system/hooks/use-code-block.js +2 -2
- package/lib/rich-text-editor/menu-system/hooks/use-color-highlight.d.ts +2 -2
- package/lib/rich-text-editor/menu-system/hooks/use-color-highlight.js +13 -13
- package/lib/rich-text-editor/menu-system/hooks/use-file-upload.js +6 -11
- package/lib/rich-text-editor/menu-system/hooks/use-heading-dropdown-menu.d.ts +1 -1
- package/lib/rich-text-editor/menu-system/hooks/use-heading-dropdown-menu.js +2 -2
- package/lib/rich-text-editor/menu-system/hooks/use-heading.js +15 -31
- package/lib/rich-text-editor/menu-system/hooks/use-image-upload.d.ts +2 -2
- package/lib/rich-text-editor/menu-system/hooks/use-image-upload.js +2 -2
- package/lib/rich-text-editor/menu-system/hooks/use-list-dropdown-menu.js +7 -5
- package/lib/rich-text-editor/menu-system/hooks/use-list.js +7 -7
- package/lib/rich-text-editor/menu-system/hooks/use-mark.js +13 -2
- package/lib/rich-text-editor/menu-system/hooks/use-text-align.js +5 -5
- package/lib/rich-text-editor/menu-system/hooks/use-undo-redo.d.ts +2 -2
- package/lib/rich-text-editor/menu-system/hooks/use-undo-redo.js +3 -3
- package/lib/rich-text-editor/useExtensions.js +2 -5
- package/package.json +1 -1
package/es/index.d.ts
CHANGED
package/es/index.js
CHANGED
|
@@ -27,6 +27,7 @@ var stdin_default = defineComponent({
|
|
|
27
27
|
}) {
|
|
28
28
|
const editor = ref();
|
|
29
29
|
const viewerRef = ref(null);
|
|
30
|
+
const isComposing = ref(false);
|
|
30
31
|
const extensions = useExtensions({
|
|
31
32
|
props,
|
|
32
33
|
emit
|
|
@@ -50,7 +51,9 @@ var stdin_default = defineComponent({
|
|
|
50
51
|
editor: editor2
|
|
51
52
|
}) => {
|
|
52
53
|
const html = editor2.getHTML();
|
|
53
|
-
|
|
54
|
+
if (props.modelValue !== html) {
|
|
55
|
+
emit("update:modelValue", html);
|
|
56
|
+
}
|
|
54
57
|
},
|
|
55
58
|
onSelectionUpdate: ({
|
|
56
59
|
editor: editor2
|
|
@@ -111,19 +114,13 @@ var stdin_default = defineComponent({
|
|
|
111
114
|
});
|
|
112
115
|
watch(() => props.modelValue, (newValue) => {
|
|
113
116
|
var _a, _b;
|
|
117
|
+
if (isComposing.value)
|
|
118
|
+
return;
|
|
114
119
|
if (((_a = editor.value) == null ? void 0 : _a.getHTML()) !== newValue) {
|
|
115
120
|
(_b = editor.value) == null ? void 0 : _b.commands.setContent(newValue || "");
|
|
116
121
|
}
|
|
117
122
|
});
|
|
118
123
|
watch(() => props.placeholder, () => {
|
|
119
|
-
var _a;
|
|
120
|
-
isFocusFromPlaceholder = true;
|
|
121
|
-
(_a = editor.value) == null ? void 0 : _a.commands.blur();
|
|
122
|
-
setTimeout(() => {
|
|
123
|
-
var _a2;
|
|
124
|
-
(_a2 = editor.value) == null ? void 0 : _a2.commands.focus();
|
|
125
|
-
isFocusFromPlaceholder = false;
|
|
126
|
-
}, 100);
|
|
127
124
|
});
|
|
128
125
|
watch(() => props.editable, (val) => {
|
|
129
126
|
var _a;
|
|
@@ -138,6 +135,14 @@ var stdin_default = defineComponent({
|
|
|
138
135
|
editorElement.addEventListener("click", mentionClickHandler);
|
|
139
136
|
editorElement.addEventListener("click", customContentClickHandler);
|
|
140
137
|
editorElement.addEventListener("mouseover", customContentHoverHandler);
|
|
138
|
+
editorElement.addEventListener("compositionstart", () => {
|
|
139
|
+
isComposing.value = true;
|
|
140
|
+
});
|
|
141
|
+
editorElement.addEventListener("compositionend", () => {
|
|
142
|
+
setTimeout(() => {
|
|
143
|
+
isComposing.value = false;
|
|
144
|
+
}, 50);
|
|
145
|
+
});
|
|
141
146
|
}
|
|
142
147
|
};
|
|
143
148
|
const removeEventListeners = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{overflow-wrap:break-word;-webkit-text-size-adjust:none;text-size-adjust:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--tt-gray-light-a-50: rgba(56, 56, 56, .04);--tt-gray-light-a-100: rgba(15, 22, 36, .05);--tt-gray-light-a-200: rgba(37, 39, 45, .1);--tt-gray-light-a-300: rgba(47, 50, 55, .2);--tt-gray-light-a-400: rgba(40, 44, 51, .42);--tt-gray-light-a-500: rgba(52, 55, 60, .64);--tt-gray-light-a-600: rgba(36, 39, 46, .78);--tt-gray-light-a-700: rgba(35, 37, 42, .87);--tt-gray-light-a-800: rgba(30, 32, 36, .95);--tt-gray-light-a-900: rgba(29, 30, 32, .98);--tt-gray-light-50: #fafafa;--tt-gray-light-100: #f4f4f5;--tt-gray-light-200: #eaeaeb;--tt-gray-light-300: #d5d6d7;--tt-gray-light-400: #a6a7ab;--tt-gray-light-500: #7d7f82;--tt-gray-light-600: #53565a;--tt-gray-light-700: #404145;--tt-gray-light-800: #2c2d30;--tt-gray-light-900: #222325;--tt-gray-dark-a-50: rgba(232, 232, 253, .05);--tt-gray-dark-a-100: rgba(231, 231, 243, .07);--tt-gray-dark-a-200: rgba(238, 238, 246, .11);--tt-gray-dark-a-300: rgba(239, 239, 245, .22);--tt-gray-dark-a-400: rgba(244, 244, 255, .37);--tt-gray-dark-a-500: rgba(236, 238, 253, .5);--tt-gray-dark-a-600: rgba(247, 247, 253, .64);--tt-gray-dark-a-700: rgba(251, 251, 254, .75);--tt-gray-dark-a-800: rgba(253, 253, 253, .88);--tt-gray-dark-a-900: rgba(255, 255, 255, .96);--tt-gray-dark-50: #19191a;--tt-gray-dark-100: #202022;--tt-gray-dark-200: #2d2d2f;--tt-gray-dark-300: #464649;--tt-gray-dark-400: #636369;--tt-gray-dark-500: #7c7c83;--tt-gray-dark-600: #a3a3a8;--tt-gray-dark-700: #c0c0c3;--tt-gray-dark-800: #e0e0e1;--tt-gray-dark-900: #f5f5f5;--tt-brand-color-50: #fef2f3;--tt-brand-color-100: #fce8e9;--tt-brand-color-200: #f9d4d5;--tt-brand-color-300: #f4b4b6;--tt-brand-color-400: #eb747e;--tt-brand-color-500: #c02537;--tt-brand-color-600: #a51c2d;--tt-brand-color-700: #8b1826;--tt-brand-color-800: #71131f;--tt-brand-color-900: #570f18;--tt-brand-color-950: #3a0a10;--tt-color-green-inc-5: hsl(129, 100%, 97%);--tt-color-green-inc-4: hsl(129, 100%, 92%);--tt-color-green-inc-3: hsl(131, 100%, 86%);--tt-color-green-inc-2: hsl(133, 98%, 78%);--tt-color-green-inc-1: hsl(137, 99%, 70%);--tt-color-green-base: hsl(147, 99%, 50%);--tt-color-green-dec-1: hsl(147, 97%, 41%);--tt-color-green-dec-2: hsl(146, 98%, 32%);--tt-color-green-dec-3: hsl(146, 100%, 24%);--tt-color-green-dec-4: hsl(144, 100%, 16%);--tt-color-green-dec-5: hsl(140, 100%, 9%);--tt-color-yellow-inc-5: hsl(50, 100%, 97%);--tt-color-yellow-inc-4: hsl(50, 100%, 91%);--tt-color-yellow-inc-3: hsl(50, 100%, 84%);--tt-color-yellow-inc-2: hsl(50, 100%, 77%);--tt-color-yellow-inc-1: hsl(50, 100%, 68%);--tt-color-yellow-base: hsl(52, 100%, 50%);--tt-color-yellow-dec-1: hsl(52, 100%, 41%);--tt-color-yellow-dec-2: hsl(52, 100%, 32%);--tt-color-yellow-dec-3: hsl(52, 100%, 24%);--tt-color-yellow-dec-4: hsl(51, 100%, 16%);--tt-color-yellow-dec-5: hsl(50, 100%, 9%);--tt-color-red-inc-5: hsl(11, 100%, 96%);--tt-color-red-inc-4: hsl(11, 100%, 88%);--tt-color-red-inc-3: hsl(10, 100%, 80%);--tt-color-red-inc-2: hsl(9, 100%, 73%);--tt-color-red-inc-1: hsl(7, 100%, 64%);--tt-color-red-base: hsl(7, 100%, 54%);--tt-color-red-dec-1: hsl(7, 100%, 41%);--tt-color-red-dec-2: hsl(5, 100%, 32%);--tt-color-red-dec-3: hsl(4, 100%, 24%);--tt-color-red-dec-4: hsl(3, 100%, 16%);--tt-color-red-dec-5: hsl(1, 100%, 9%);--white: #ffffff;--black: #0e0e11;--transparent: rgba(255, 255, 255, 0);--tt-shadow-elevated-md: 0px 16px 48px 0px rgba(17, 24, 39, .04), 0px 12px 24px 0px rgba(17, 24, 39, .04), 0px 6px 8px 0px rgba(17, 24, 39, .02), 0px 2px 3px 0px rgba(17, 24, 39, .02);--tt-radius-xxs: .125rem;--tt-radius-xs: .25rem;--tt-radius-sm: .375rem;--tt-radius-md: .5rem;--tt-radius-lg: .75rem;--tt-radius-xl: 1rem;--tt-transition-duration-short: .1s;--tt-transition-duration-default: .2s;--tt-transition-duration-long: .64s;--tt-transition-easing-default: cubic-bezier(.46, .03, .52, .96);--tt-transition-easing-cubic: cubic-bezier(.65, .05, .36, 1);--tt-transition-easing-quart: cubic-bezier(.77, 0, .18, 1);--tt-transition-easing-circ: cubic-bezier(.79, .14, .15, .86);--tt-transition-easing-back: cubic-bezier(.68, -.55, .27, 1.55);--tt-accent-contrast: 8%;--tt-destructive-contrast: 8%;--tt-foreground-contrast: 8%}:root,:root *,:root :before,:root :after{box-sizing:border-box}:root{--tt-bg-color: var(--white);--tt-border-color: var(--tt-gray-light-a-200);--tt-border-color-tint: var(--tt-gray-light-a-100);--tt-sidebar-bg-color: var(--tt-gray-light-100);--tt-scrollbar-color: var(--tt-gray-light-a-200);--tt-cursor-color: var(--tt-brand-color-500);--tt-selection-color: rgba(244, 180, 182, .2);--tt-card-bg-color: var(--white);--tt-card-border-color: var(--tt-gray-light-a-100)}.dark{--tt-bg-color: var(--black);--tt-border-color: var(--tt-gray-dark-a-200);--tt-border-color-tint: var(--tt-gray-dark-a-100);--tt-sidebar-bg-color: var(--tt-gray-dark-100);--tt-scrollbar-color: var(--tt-gray-dark-a-200);--tt-cursor-color: var(--tt-brand-color-400);--tt-selection-color: rgba(235, 116, 126, .2);--tt-card-bg-color: var(--tt-gray-dark-50);--tt-card-border-color: var(--tt-gray-dark-a-50);--tt-shadow-elevated-md: 0px 16px 48px 0px rgba(0, 0, 0, .5), 0px 12px 24px 0px rgba(0, 0, 0, .24), 0px 6px 8px 0px rgba(0, 0, 0, .22), 0px 2px 3px 0px rgba(0, 0, 0, .12)}:root{--tt-color-text-gray: hsl(45, 2%, 46%);--tt-color-text-brown: hsl(19, 31%, 47%);--tt-color-text-orange: hsl(30, 89%, 45%);--tt-color-text-yellow: hsl(38, 62%, 49%);--tt-color-text-green: hsl(148, 32%, 39%);--tt-color-text-blue: hsl(202, 54%, 43%);--tt-color-text-purple: hsl(274, 32%, 54%);--tt-color-text-pink: hsl(328, 49%, 53%);--tt-color-text-red: hsl(2, 62%, 55%);--tt-color-text-gray-contrast: hsla(39, 26%, 26%, .15);--tt-color-text-brown-contrast: hsla(18, 43%, 69%, .35);--tt-color-text-orange-contrast: hsla(24, 73%, 55%, .27);--tt-color-text-yellow-contrast: hsla(44, 82%, 59%, .39);--tt-color-text-green-contrast: hsla(126, 29%, 60%, .27);--tt-color-text-blue-contrast: hsla(202, 54%, 59%, .27);--tt-color-text-purple-contrast: hsla(274, 37%, 64%, .27);--tt-color-text-pink-contrast: hsla(331, 60%, 71%, .27);--tt-color-text-red-contrast: hsla(8, 79%, 79%, .4)}.dark{--tt-color-text-gray: hsl(0, 0%, 61%);--tt-color-text-brown: hsl(18, 35%, 58%);--tt-color-text-orange: hsl(25, 53%, 53%);--tt-color-text-yellow: hsl(36, 54%, 55%);--tt-color-text-green: hsl(145, 32%, 47%);--tt-color-text-blue: hsl(202, 64%, 52%);--tt-color-text-purple: hsl(270, 55%, 62%);--tt-color-text-pink: hsl(329, 57%, 58%);--tt-color-text-red: hsl(1, 69%, 60%);--tt-color-text-gray-contrast: hsla(0, 0%, 100%, .09);--tt-color-text-brown-contrast: hsla(17, 45%, 50%, .25);--tt-color-text-orange-contrast: hsla(27, 82%, 53%, .2);--tt-color-text-yellow-contrast: hsla(35, 49%, 47%, .2);--tt-color-text-green-contrast: hsla(151, 55%, 39%, .2);--tt-color-text-blue-contrast: hsla(202, 54%, 43%, .2);--tt-color-text-purple-contrast: hsla(271, 56%, 60%, .18);--tt-color-text-pink-contrast: hsla(331, 67%, 58%, .22);--tt-color-text-red-contrast: hsla(0, 67%, 60%, .25)}:root{--tt-color-highlight-yellow: #fef9c3;--tt-color-highlight-green: #dcfce7;--tt-color-highlight-blue: #e0f2fe;--tt-color-highlight-purple: #f3e8ff;--tt-color-highlight-red: #ffe4e6;--tt-color-highlight-gray: #f8f8f7;--tt-color-highlight-brown: #f4eeee;--tt-color-highlight-orange: #fbecdd;--tt-color-highlight-pink: #fcf1f6;--tt-color-highlight-yellow-contrast: #fbe604;--tt-color-highlight-green-contrast: #c7fad8;--tt-color-highlight-blue-contrast: #ceeafd;--tt-color-highlight-purple-contrast: #e4ccff;--tt-color-highlight-red-contrast: #ffccd0;--tt-color-highlight-gray-contrast: rgba(84, 72, 49, .15);--tt-color-highlight-brown-contrast: rgba(210, 162, 141, .35);--tt-color-highlight-orange-contrast: rgba(224, 124, 57, .27);--tt-color-highlight-pink-contrast: rgba(225, 136, 179, .27)}.dark{--tt-color-highlight-yellow: #6b6524;--tt-color-highlight-green: #509568;--tt-color-highlight-blue: #6e92aa;--tt-color-highlight-purple: #583e74;--tt-color-highlight-red: #743e42;--tt-color-highlight-gray: #2f2f2f;--tt-color-highlight-brown: #4a3228;--tt-color-highlight-orange: #5c3b23;--tt-color-highlight-pink: #4e2c3c;--tt-color-highlight-yellow-contrast: #58531e;--tt-color-highlight-green-contrast: #47855d;--tt-color-highlight-blue-contrast: #5e86a1;--tt-color-highlight-purple-contrast: #4c3564;--tt-color-highlight-red-contrast: #643539;--tt-color-highlight-gray-contrast: rgba(255, 255, 255, .094);--tt-color-highlight-brown-contrast: rgba(184, 101, 69, .25);--tt-color-highlight-orange-contrast: rgba(233, 126, 37, .2);--tt-color-highlight-pink-contrast: rgba(220, 76, 145, .22)}body .ProseMirror{flex:1;overflow:auto;outline:none;line-height:1.6;font-size:var(--font-base);--white: #fff;--black: #2e2b29;--gray-1: rgba(61, 37, 20, .05);--gray-2: rgba(61, 37, 20, .08);--gray-3: rgba(61, 37, 20, .12);--gray-4: rgba(53, 38, 28, .3);--gray-5: rgba(28, 25, 23, .6);--green: #22c55e;--purple: #6a00f5;--purple-contrast: #5800cc;--purple-light: rgba(88, 5, 255, .05);--yellow-contrast: #facc15;--yellow: rgba(250, 204, 21, .4);--yellow-light: #fffae5;--red: #ff5c33;--red-light: #ffebe5;--shadow: 0px 12px 33px 0px rgba(0, 0, 0, .06), 0px 3.618px 9.949px 0px rgba(0, 0, 0, .04);--tt-collaboration-carets-label: var(--tt-gray-light-900);--link-text-color: var(--tt-brand-color-500);--thread-text: var(--tt-gray-light-900);--placeholder-color: var(--tt-gray-light-a-400);--thread-bg-color: var(--tt-color-yellow-inc-2);--horizontal-rule-color: var(--tt-gray-light-a-200);--blockquote-bg-color: var(--tt-gray-light-900);--tiptap-ai-insertion-color: var(--tt-brand-color-600);--tt-inline-code-bg-color: var(--tt-gray-light-a-100);--tt-inline-code-text-color: var(--tt-gray-light-a-700);--tt-inline-code-border-color: var(--tt-gray-light-a-200);--tt-codeblock-bg: var(--tt-gray-light-a-50);--tt-codeblock-text: var(--tt-gray-light-a-800);--tt-codeblock-border: var(--tt-gray-light-a-200);--tt-checklist-bg-color: var(--tt-gray-light-a-100);--tt-checklist-bg-active-color: var(--tt-gray-light-a-900);--tt-checklist-border-color: var(--tt-gray-light-a-200);--tt-checklist-border-active-color: var(--tt-gray-light-a-900);--tt-checklist-check-icon-color: var(--white);--tt-checklist-text-active: var(--tt-gray-light-a-500);white-space:pre-wrap;caret-color:var(--tt-cursor-color)}body .ProseMirror :first-child{margin-top:0}body .ProseMirror>*{position:relative}body .ProseMirror:not(.readonly):not(.ProseMirror-hideselection) ::selection{background-color:var(--tt-selection-color)}body .ProseMirror .selection{display:inline;background-color:var(--tt-selection-color)}body .ProseMirror p{font-size:1rem;line-height:1.6}body .ProseMirror video{width:100%}body .ProseMirror ol{list-style:auto}body .ProseMirror ol ol,body .ProseMirror ul{list-style:disc}body .ProseMirror ol,body .ProseMirror ul{padding-left:1.5em;margin:0!important}body .ProseMirror ol li p,body .ProseMirror ul li p{margin-top:0!important;margin-bottom:0!important}body .ProseMirror li::marker{text-align:start!important}body .ProseMirror h1,body .ProseMirror h2,body .ProseMirror h3,body .ProseMirror h4,body .ProseMirror h5,body .ProseMirror h6{line-height:1.1;margin-top:1rem;margin-bottom:1rem;text-wrap:pretty}body .ProseMirror h1{font-size:1.4rem}body .ProseMirror h2{font-size:1.2rem}body .ProseMirror h3{font-size:1.1rem}body .ProseMirror h4,body .ProseMirror h5,body .ProseMirror h6{font-size:1rem}body .ProseMirror a,body .ProseMirror .editor-link{color:var(--purple);text-decoration:underline;cursor:pointer;transition:color .2s ease}body .ProseMirror a:hover,body .ProseMirror .editor-link:hover{color:var(--purple-contrast);text-decoration:underline}body .ProseMirror code{background-color:#ffe5e8;border-radius:.4rem;color:#c02537;padding:2px 4px;display:inline-block}body .ProseMirror .ProseMirror-selectednode:not(img):not(pre):not(.react-renderer){border-radius:var(--tt-radius-md);background-color:var(--tt-selection-color)}body .ProseMirror pre{background-color:var(--tt-codeblock-bg);color:var(--tt-codeblock-text);border:1px solid var(--tt-codeblock-border);margin-top:1.5em;margin-bottom:1.5em;padding:1em;font-size:1rem;border-radius:.375rem}body .ProseMirror pre code{background-color:transparent;border:none;border-radius:0;color:inherit;padding:0;display:block}body .ProseMirror pre.is-empty:before{left:1.15em!important;top:.8em!important}body .ProseMirror blockquote{border-left:3px solid var(--gray-3);margin:1.5rem 0;padding-left:1rem}body .ProseMirror hr{border:none;border-top:1px solid var(--gray-2);margin:2rem 0}body .ProseMirror p.is-editor-empty:first-child:before{color:var(--gray-4);content:attr(data-placeholder);float:left;height:0;pointer-events:none}body .ProseMirror .is-empty:before{color:var(--gray-4);content:attr(data-placeholder);float:left;height:0;pointer-events:none}body .ProseMirror table{border-collapse:collapse;margin:0;overflow:hidden;table-layout:fixed;width:100%}body .ProseMirror table td,body .ProseMirror table th{border:1px solid var(--gray-3);box-sizing:border-box;min-width:1em;padding:6px 8px;position:relative;vertical-align:top}body .ProseMirror table td>*,body .ProseMirror table th>*{margin-bottom:0}body .ProseMirror table th{background-color:var(--gray-1);font-weight:700;text-align:left}body .ProseMirror table .selectedCell:after{background:var(--gray-2);content:"";left:0;right:0;top:0;bottom:0;pointer-events:none;position:absolute;z-index:2}body .ProseMirror table .column-resize-handle{background-color:var(--purple);bottom:-2px;pointer-events:none;position:absolute;right:-2px;top:0;width:4px}body .ProseMirror .tableWrapper{margin:1.5rem 0;overflow-x:auto}body .ProseMirror.resize-cursor{cursor:ew-resize;cursor:col-resize}body .ProseMirror img{max-width:100%}body .ProseMirror .mention,body .ProseMirror .hash-tag{color:#c02537;padding:0 .3em}body .ProseMirror .custom-content{color:var(--custom-content-color, #000);padding:0 .3em;cursor:pointer;transition:color .2s ease}body .ProseMirror .custom-content:hover{color:var(--custom-content-hover-color, #c02537)}.animation-indent--right{animation:indent-right .5s cubic-bezier(.68,-.55,.27,1.55) 1 alternate-reverse}@keyframes indent-right{0%{transform:translate(0)}to{transform:translate(12px)}}.tiptap-editor-container{display:flex;flex-direction:column;border:1px solid var(--gray-3);border-radius:8px;overflow:hidden;height:100%;background-color:var(--white)}.dark .tiptap-editor-container{background-color:var(--black);border-color:var(--gray-4)}.tiptap-editor-container .tiptap-editor-toolbar{flex:0 0 auto;border-bottom:1px solid var(--gray-3);padding:4px;background-color:var(--gray-1);display:flex;flex-wrap:wrap;gap:4px}.dark .tiptap-editor-container .tiptap-editor-toolbar{border-bottom-color:var(--gray-4);background-color:var(--gray-2)}.tiptap-editor-container .tiptap-editor-content-wrapper{flex:1 1 auto;overflow-y:auto;position:relative;padding:8px;background-color:var(--white);display:flex;justify-content:center}.dark .tiptap-editor-container .tiptap-editor-content-wrapper{background-color:var(--black)}.tiptap-editor-container .tiptap-editor-content-wrapper .ProseMirror{width:100%}.dark .tiptap-dropdown-menu .el-dropdown-menu__item.is-active{color:var(--tt-brand-color-400)!important;background-color:var(--tt-brand-color-900)!important}.tiptap-dropdown-menu-item-content{display:flex;align-items:center;gap:8px;width:100%}.tiptap-dropdown-menu-item-label{font-size:10px;font-weight:700;color:var(--tt-text-muted);padding:1px 4px;border-radius:4px;min-width:20px;text-align:center}.dark .tiptap-dropdown-menu-item-label{background-color:var(--tt-gray-dark-200)}.tiptap-heading-trigger .tiptap-button-icon-chevron,.tiptap-list-dropdown-trigger .tiptap-button-icon-chevron{width:12px;height:12px;margin-left:2px;color:var(--tt-text-muted)}.tiptap-dropdown-menu-item-icon{width:16px;height:16px;color:var(--tt-text-muted)}.tiptap-dropdown-menu .el-dropdown-menu__item.is-active{color:var(--tt-brand-color-500)!important;background-color:var(--tt-brand-color-50)!important}.tiptap-dropdown-menu .el-dropdown-menu__item:hover,.tiptap-dropdown-menu .el-dropdown-menu__item:focus{color:var(--tt-brand-color-500)!important;background-color:var(--tt-brand-color-50)!important}
|
|
1
|
+
:root{overflow-wrap:break-word;-webkit-text-size-adjust:none;text-size-adjust:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--tt-gray-light-a-50: rgba(56, 56, 56, .04);--tt-gray-light-a-100: rgba(15, 22, 36, .05);--tt-gray-light-a-200: rgba(37, 39, 45, .1);--tt-gray-light-a-300: rgba(47, 50, 55, .2);--tt-gray-light-a-400: rgba(40, 44, 51, .42);--tt-gray-light-a-500: rgba(52, 55, 60, .64);--tt-gray-light-a-600: rgba(36, 39, 46, .78);--tt-gray-light-a-700: rgba(35, 37, 42, .87);--tt-gray-light-a-800: rgba(30, 32, 36, .95);--tt-gray-light-a-900: rgba(29, 30, 32, .98);--tt-gray-light-50: #fafafa;--tt-gray-light-100: #f4f4f5;--tt-gray-light-200: #eaeaeb;--tt-gray-light-300: #d5d6d7;--tt-gray-light-400: #a6a7ab;--tt-gray-light-500: #7d7f82;--tt-gray-light-600: #53565a;--tt-gray-light-700: #404145;--tt-gray-light-800: #2c2d30;--tt-gray-light-900: #222325;--tt-gray-dark-a-50: rgba(232, 232, 253, .05);--tt-gray-dark-a-100: rgba(231, 231, 243, .07);--tt-gray-dark-a-200: rgba(238, 238, 246, .11);--tt-gray-dark-a-300: rgba(239, 239, 245, .22);--tt-gray-dark-a-400: rgba(244, 244, 255, .37);--tt-gray-dark-a-500: rgba(236, 238, 253, .5);--tt-gray-dark-a-600: rgba(247, 247, 253, .64);--tt-gray-dark-a-700: rgba(251, 251, 254, .75);--tt-gray-dark-a-800: rgba(253, 253, 253, .88);--tt-gray-dark-a-900: rgba(255, 255, 255, .96);--tt-gray-dark-50: #19191a;--tt-gray-dark-100: #202022;--tt-gray-dark-200: #2d2d2f;--tt-gray-dark-300: #464649;--tt-gray-dark-400: #636369;--tt-gray-dark-500: #7c7c83;--tt-gray-dark-600: #a3a3a8;--tt-gray-dark-700: #c0c0c3;--tt-gray-dark-800: #e0e0e1;--tt-gray-dark-900: #f5f5f5;--tt-brand-color-50: #fef2f3;--tt-brand-color-100: #fce8e9;--tt-brand-color-200: #f9d4d5;--tt-brand-color-300: #f4b4b6;--tt-brand-color-400: #eb747e;--tt-brand-color-500: #c02537;--tt-brand-color-600: #a51c2d;--tt-brand-color-700: #8b1826;--tt-brand-color-800: #71131f;--tt-brand-color-900: #570f18;--tt-brand-color-950: #3a0a10;--tt-color-green-inc-5: hsl(129, 100%, 97%);--tt-color-green-inc-4: hsl(129, 100%, 92%);--tt-color-green-inc-3: hsl(131, 100%, 86%);--tt-color-green-inc-2: hsl(133, 98%, 78%);--tt-color-green-inc-1: hsl(137, 99%, 70%);--tt-color-green-base: hsl(147, 99%, 50%);--tt-color-green-dec-1: hsl(147, 97%, 41%);--tt-color-green-dec-2: hsl(146, 98%, 32%);--tt-color-green-dec-3: hsl(146, 100%, 24%);--tt-color-green-dec-4: hsl(144, 100%, 16%);--tt-color-green-dec-5: hsl(140, 100%, 9%);--tt-color-yellow-inc-5: hsl(50, 100%, 97%);--tt-color-yellow-inc-4: hsl(50, 100%, 91%);--tt-color-yellow-inc-3: hsl(50, 100%, 84%);--tt-color-yellow-inc-2: hsl(50, 100%, 77%);--tt-color-yellow-inc-1: hsl(50, 100%, 68%);--tt-color-yellow-base: hsl(52, 100%, 50%);--tt-color-yellow-dec-1: hsl(52, 100%, 41%);--tt-color-yellow-dec-2: hsl(52, 100%, 32%);--tt-color-yellow-dec-3: hsl(52, 100%, 24%);--tt-color-yellow-dec-4: hsl(51, 100%, 16%);--tt-color-yellow-dec-5: hsl(50, 100%, 9%);--tt-color-red-inc-5: hsl(11, 100%, 96%);--tt-color-red-inc-4: hsl(11, 100%, 88%);--tt-color-red-inc-3: hsl(10, 100%, 80%);--tt-color-red-inc-2: hsl(9, 100%, 73%);--tt-color-red-inc-1: hsl(7, 100%, 64%);--tt-color-red-base: hsl(7, 100%, 54%);--tt-color-red-dec-1: hsl(7, 100%, 41%);--tt-color-red-dec-2: hsl(5, 100%, 32%);--tt-color-red-dec-3: hsl(4, 100%, 24%);--tt-color-red-dec-4: hsl(3, 100%, 16%);--tt-color-red-dec-5: hsl(1, 100%, 9%);--white: #ffffff;--black: #0e0e11;--transparent: rgba(255, 255, 255, 0);--tt-shadow-elevated-md: 0px 16px 48px 0px rgba(17, 24, 39, .04), 0px 12px 24px 0px rgba(17, 24, 39, .04), 0px 6px 8px 0px rgba(17, 24, 39, .02), 0px 2px 3px 0px rgba(17, 24, 39, .02);--tt-radius-xxs: .125rem;--tt-radius-xs: .25rem;--tt-radius-sm: .375rem;--tt-radius-md: .5rem;--tt-radius-lg: .75rem;--tt-radius-xl: 1rem;--tt-transition-duration-short: .1s;--tt-transition-duration-default: .2s;--tt-transition-duration-long: .64s;--tt-transition-easing-default: cubic-bezier(.46, .03, .52, .96);--tt-transition-easing-cubic: cubic-bezier(.65, .05, .36, 1);--tt-transition-easing-quart: cubic-bezier(.77, 0, .18, 1);--tt-transition-easing-circ: cubic-bezier(.79, .14, .15, .86);--tt-transition-easing-back: cubic-bezier(.68, -.55, .27, 1.55);--tt-accent-contrast: 8%;--tt-destructive-contrast: 8%;--tt-foreground-contrast: 8%}:root,:root *,:root :before,:root :after{box-sizing:border-box}:root{--tt-bg-color: var(--white);--tt-border-color: var(--tt-gray-light-a-200);--tt-border-color-tint: var(--tt-gray-light-a-100);--tt-sidebar-bg-color: var(--tt-gray-light-100);--tt-scrollbar-color: var(--tt-gray-light-a-200);--tt-cursor-color: var(--tt-brand-color-500);--tt-selection-color: rgba(244, 180, 182, .2);--tt-card-bg-color: var(--white);--tt-card-border-color: var(--tt-gray-light-a-100)}.dark{--tt-bg-color: var(--black);--tt-border-color: var(--tt-gray-dark-a-200);--tt-border-color-tint: var(--tt-gray-dark-a-100);--tt-sidebar-bg-color: var(--tt-gray-dark-100);--tt-scrollbar-color: var(--tt-gray-dark-a-200);--tt-cursor-color: var(--tt-brand-color-400);--tt-selection-color: rgba(235, 116, 126, .2);--tt-card-bg-color: var(--tt-gray-dark-50);--tt-card-border-color: var(--tt-gray-dark-a-50);--tt-shadow-elevated-md: 0px 16px 48px 0px rgba(0, 0, 0, .5), 0px 12px 24px 0px rgba(0, 0, 0, .24), 0px 6px 8px 0px rgba(0, 0, 0, .22), 0px 2px 3px 0px rgba(0, 0, 0, .12)}:root{--tt-color-text-gray: hsl(45, 2%, 46%);--tt-color-text-brown: hsl(19, 31%, 47%);--tt-color-text-orange: hsl(30, 89%, 45%);--tt-color-text-yellow: hsl(38, 62%, 49%);--tt-color-text-green: hsl(148, 32%, 39%);--tt-color-text-blue: hsl(202, 54%, 43%);--tt-color-text-purple: hsl(274, 32%, 54%);--tt-color-text-pink: hsl(328, 49%, 53%);--tt-color-text-red: hsl(2, 62%, 55%);--tt-color-text-gray-contrast: hsla(39, 26%, 26%, .15);--tt-color-text-brown-contrast: hsla(18, 43%, 69%, .35);--tt-color-text-orange-contrast: hsla(24, 73%, 55%, .27);--tt-color-text-yellow-contrast: hsla(44, 82%, 59%, .39);--tt-color-text-green-contrast: hsla(126, 29%, 60%, .27);--tt-color-text-blue-contrast: hsla(202, 54%, 59%, .27);--tt-color-text-purple-contrast: hsla(274, 37%, 64%, .27);--tt-color-text-pink-contrast: hsla(331, 60%, 71%, .27);--tt-color-text-red-contrast: hsla(8, 79%, 79%, .4)}.dark{--tt-color-text-gray: hsl(0, 0%, 61%);--tt-color-text-brown: hsl(18, 35%, 58%);--tt-color-text-orange: hsl(25, 53%, 53%);--tt-color-text-yellow: hsl(36, 54%, 55%);--tt-color-text-green: hsl(145, 32%, 47%);--tt-color-text-blue: hsl(202, 64%, 52%);--tt-color-text-purple: hsl(270, 55%, 62%);--tt-color-text-pink: hsl(329, 57%, 58%);--tt-color-text-red: hsl(1, 69%, 60%);--tt-color-text-gray-contrast: hsla(0, 0%, 100%, .09);--tt-color-text-brown-contrast: hsla(17, 45%, 50%, .25);--tt-color-text-orange-contrast: hsla(27, 82%, 53%, .2);--tt-color-text-yellow-contrast: hsla(35, 49%, 47%, .2);--tt-color-text-green-contrast: hsla(151, 55%, 39%, .2);--tt-color-text-blue-contrast: hsla(202, 54%, 43%, .2);--tt-color-text-purple-contrast: hsla(271, 56%, 60%, .18);--tt-color-text-pink-contrast: hsla(331, 67%, 58%, .22);--tt-color-text-red-contrast: hsla(0, 67%, 60%, .25)}:root{--tt-color-highlight-yellow: #fef9c3;--tt-color-highlight-green: #dcfce7;--tt-color-highlight-blue: #e0f2fe;--tt-color-highlight-purple: #f3e8ff;--tt-color-highlight-red: #ffe4e6;--tt-color-highlight-gray: #f8f8f7;--tt-color-highlight-brown: #f4eeee;--tt-color-highlight-orange: #fbecdd;--tt-color-highlight-pink: #fcf1f6;--tt-color-highlight-yellow-contrast: #fbe604;--tt-color-highlight-green-contrast: #c7fad8;--tt-color-highlight-blue-contrast: #ceeafd;--tt-color-highlight-purple-contrast: #e4ccff;--tt-color-highlight-red-contrast: #ffccd0;--tt-color-highlight-gray-contrast: rgba(84, 72, 49, .15);--tt-color-highlight-brown-contrast: rgba(210, 162, 141, .35);--tt-color-highlight-orange-contrast: rgba(224, 124, 57, .27);--tt-color-highlight-pink-contrast: rgba(225, 136, 179, .27)}.dark{--tt-color-highlight-yellow: #6b6524;--tt-color-highlight-green: #509568;--tt-color-highlight-blue: #6e92aa;--tt-color-highlight-purple: #583e74;--tt-color-highlight-red: #743e42;--tt-color-highlight-gray: #2f2f2f;--tt-color-highlight-brown: #4a3228;--tt-color-highlight-orange: #5c3b23;--tt-color-highlight-pink: #4e2c3c;--tt-color-highlight-yellow-contrast: #58531e;--tt-color-highlight-green-contrast: #47855d;--tt-color-highlight-blue-contrast: #5e86a1;--tt-color-highlight-purple-contrast: #4c3564;--tt-color-highlight-red-contrast: #643539;--tt-color-highlight-gray-contrast: rgba(255, 255, 255, .094);--tt-color-highlight-brown-contrast: rgba(184, 101, 69, .25);--tt-color-highlight-orange-contrast: rgba(233, 126, 37, .2);--tt-color-highlight-pink-contrast: rgba(220, 76, 145, .22)}body .ProseMirror{flex:1;overflow:auto;outline:none;line-height:1.6;font-size:var(--font-base);--white: #fff;--black: #2e2b29;--gray-1: rgba(61, 37, 20, .05);--gray-2: rgba(61, 37, 20, .08);--gray-3: rgba(61, 37, 20, .12);--gray-4: rgba(53, 38, 28, .3);--gray-5: rgba(28, 25, 23, .6);--green: #22c55e;--purple: #6a00f5;--purple-contrast: #5800cc;--purple-light: rgba(88, 5, 255, .05);--yellow-contrast: #facc15;--yellow: rgba(250, 204, 21, .4);--yellow-light: #fffae5;--red: #ff5c33;--red-light: #ffebe5;--shadow: 0px 12px 33px 0px rgba(0, 0, 0, .06), 0px 3.618px 9.949px 0px rgba(0, 0, 0, .04);--tt-collaboration-carets-label: var(--tt-gray-light-900);--link-text-color: var(--tt-brand-color-500);--thread-text: var(--tt-gray-light-900);--placeholder-color: var(--tt-gray-light-a-400);--thread-bg-color: var(--tt-color-yellow-inc-2);--horizontal-rule-color: var(--tt-gray-light-a-200);--blockquote-bg-color: var(--tt-gray-light-900);--tiptap-ai-insertion-color: var(--tt-brand-color-600);--tt-inline-code-bg-color: var(--tt-gray-light-a-100);--tt-inline-code-text-color: var(--tt-gray-light-a-700);--tt-inline-code-border-color: var(--tt-gray-light-a-200);--tt-codeblock-bg: var(--tt-gray-light-a-50);--tt-codeblock-text: var(--tt-gray-light-a-800);--tt-codeblock-border: var(--tt-gray-light-a-200);--tt-checklist-bg-color: var(--tt-gray-light-a-100);--tt-checklist-bg-active-color: var(--tt-gray-light-a-900);--tt-checklist-border-color: var(--tt-gray-light-a-200);--tt-checklist-border-active-color: var(--tt-gray-light-a-900);--tt-checklist-check-icon-color: var(--white);--tt-checklist-text-active: var(--tt-gray-light-a-500);white-space:pre-wrap;caret-color:var(--tt-cursor-color)}body .ProseMirror :first-child{margin-top:0}body .ProseMirror>*{position:relative}body .ProseMirror:not(.readonly):not(.ProseMirror-hideselection) ::selection{background-color:var(--tt-selection-color)}body .ProseMirror .selection{display:inline;background-color:var(--tt-selection-color)}body .ProseMirror p{font-size:1rem;line-height:1.6}body .ProseMirror video{width:100%}body .ProseMirror ol{list-style:auto}body .ProseMirror ol ol,body .ProseMirror ul{list-style:disc}body .ProseMirror ol,body .ProseMirror ul{padding-left:1.5em;margin:0!important}body .ProseMirror ol li p,body .ProseMirror ul li p{margin-top:0!important;margin-bottom:0!important}body .ProseMirror li::marker{text-align:start!important}body .ProseMirror h1,body .ProseMirror h2,body .ProseMirror h3,body .ProseMirror h4,body .ProseMirror h5,body .ProseMirror h6{line-height:1.1;margin-top:1rem;margin-bottom:1rem;text-wrap:pretty}body .ProseMirror h1{font-size:1.4rem}body .ProseMirror h2{font-size:1.2rem}body .ProseMirror h3{font-size:1.1rem}body .ProseMirror h4,body .ProseMirror h5,body .ProseMirror h6{font-size:1rem}body .ProseMirror a,body .ProseMirror .editor-link{color:var(--purple);text-decoration:underline;cursor:pointer;transition:color .2s ease}body .ProseMirror a:hover,body .ProseMirror .editor-link:hover{color:var(--purple-contrast);text-decoration:underline}body .ProseMirror code{background-color:#ffe5e8;border-radius:.4rem;color:#c02537;padding:2px 4px;display:inline-block}body .ProseMirror .ProseMirror-selectednode:not(img):not(pre):not(.react-renderer){border-radius:var(--tt-radius-md);background-color:var(--tt-selection-color)}body .ProseMirror pre{background-color:var(--tt-codeblock-bg);color:var(--tt-codeblock-text);border:1px solid var(--tt-codeblock-border);margin-top:1.5em;margin-bottom:1.5em;padding:1em;font-size:1rem;border-radius:.375rem}body .ProseMirror pre code{background-color:transparent;border:none;border-radius:0;color:inherit;padding:0;display:block}body .ProseMirror pre.is-empty:before{left:1.15em!important;top:.8em!important}body .ProseMirror blockquote{border-left:3px solid var(--gray-3);margin:1.5rem 0;padding-left:1rem}body .ProseMirror hr{border:none;border-top:1px solid var(--gray-2);margin:2rem 0}body .ProseMirror p.is-editor-empty:first-child:before{color:var(--gray-4);content:attr(data-placeholder);float:left;height:0;pointer-events:none}body .ProseMirror .is-empty:before{color:var(--gray-4);content:attr(data-placeholder);float:left;height:0;pointer-events:none}body .ProseMirror table{border-collapse:collapse;margin:0;overflow:hidden;table-layout:fixed;width:100%}body .ProseMirror table td,body .ProseMirror table th{border:1px solid var(--gray-3);box-sizing:border-box;min-width:1em;padding:6px 8px;position:relative;vertical-align:top}body .ProseMirror table td>*,body .ProseMirror table th>*{margin-bottom:0}body .ProseMirror table th{background-color:var(--gray-1);font-weight:700;text-align:left}body .ProseMirror table .selectedCell:after{background:var(--gray-2);content:"";left:0;right:0;top:0;bottom:0;pointer-events:none;position:absolute;z-index:2}body .ProseMirror table .column-resize-handle{background-color:var(--purple);bottom:-2px;pointer-events:none;position:absolute;right:-2px;top:0;width:4px}body .ProseMirror .tableWrapper{margin:1.5rem 0;overflow-x:auto}body .ProseMirror.resize-cursor{cursor:ew-resize;cursor:col-resize}body .ProseMirror img{max-width:100%}body .ProseMirror .mention,body .ProseMirror .hash-tag{color:#c02537;padding:0 .3em}body .ProseMirror .custom-content{color:var(--custom-content-color, #000);padding:0 .3em;cursor:pointer;transition:color .2s ease}body .ProseMirror .custom-content:hover{color:var(--custom-content-hover-color, #c02537)}.animation-indent--right{animation:indent-right .5s cubic-bezier(.68,-.55,.27,1.55) 1 alternate-reverse}@keyframes indent-right{0%{transform:translate(0)}to{transform:translate(12px)}}.tiptap-editor-container{display:flex;flex-direction:column;border:1px solid var(--gray-3);border-radius:8px;overflow:hidden;height:100%;min-height:0;background-color:var(--white)}.dark .tiptap-editor-container{background-color:var(--black);border-color:var(--gray-4)}.tiptap-editor-container .tiptap-editor-toolbar{flex:0 0 auto;border-bottom:1px solid var(--gray-3);padding:4px;background-color:var(--gray-1);display:flex;flex-wrap:wrap;gap:4px}.dark .tiptap-editor-container .tiptap-editor-toolbar{border-bottom-color:var(--gray-4);background-color:var(--gray-2)}.tiptap-editor-container .tiptap-editor-content-wrapper{flex:1 1 auto;-webkit-box-flex:1;min-height:0;overflow-y:auto;position:relative;padding:8px;background-color:var(--white);display:block}.dark .tiptap-editor-container .tiptap-editor-content-wrapper{background-color:var(--black)}.tiptap-editor-container .tiptap-editor-content-wrapper .ProseMirror{width:100%}.tiptap-dropdown-menu .el-dropdown-menu__item.is-active,.tiptap-dropdown-menu .el-dropdown-menu__item:hover,.tiptap-dropdown-menu .el-dropdown-menu__item:focus{color:var(--tt-brand-color-500)!important;background-color:var(--tt-brand-color-50)!important}.dark .tiptap-dropdown-menu .el-dropdown-menu__item.is-active,.dark .tiptap-dropdown-menu .el-dropdown-menu__item:hover,.dark .tiptap-dropdown-menu .el-dropdown-menu__item:focus{color:var(--tt-brand-color-400)!important;background-color:var(--tt-brand-color-900)!important}.tiptap-dropdown-menu-item-content{display:flex;align-items:center;gap:8px;width:100%}.tiptap-dropdown-menu-item-label{font-size:10px;font-weight:700;color:var(--tt-text-muted);padding:1px 4px;border-radius:4px;min-width:20px;text-align:center}.dark .tiptap-dropdown-menu-item-label{background-color:var(--tt-gray-dark-200)}.tiptap-heading-trigger .tiptap-button-icon-chevron,.tiptap-list-dropdown-trigger .tiptap-button-icon-chevron{width:12px;height:12px;margin-left:2px;color:var(--tt-text-muted)}.tiptap-dropdown-menu-item-icon{width:16px;height:16px;color:var(--tt-text-muted)}
|
|
@@ -70,11 +70,6 @@ body .ProseMirror {
|
|
|
70
70
|
background-color: var(--tt-selection-color);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
.ProseMirror-selectednode:not(img):not(pre):not(.react-renderer) {
|
|
74
|
-
border-radius: var(--tt-radius-md);
|
|
75
|
-
background-color: var(--tt-selection-color);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
73
|
/* Paragraphs */
|
|
79
74
|
p {
|
|
80
75
|
font-size: 1rem;
|
|
@@ -325,10 +320,12 @@ body .ProseMirror {
|
|
|
325
320
|
.tiptap-editor-container {
|
|
326
321
|
display: flex;
|
|
327
322
|
flex-direction: column;
|
|
323
|
+
-webkit-box-orient: vertical; // Required for Mac/Safari line-clamp support
|
|
328
324
|
border: 1px solid var(--gray-3);
|
|
329
325
|
border-radius: 8px;
|
|
330
326
|
overflow: hidden;
|
|
331
327
|
height: 100%;
|
|
328
|
+
min-height: 0;
|
|
332
329
|
background-color: var(--white);
|
|
333
330
|
|
|
334
331
|
.dark & {
|
|
@@ -353,12 +350,13 @@ body .ProseMirror {
|
|
|
353
350
|
|
|
354
351
|
.tiptap-editor-content-wrapper {
|
|
355
352
|
flex: 1 1 auto;
|
|
353
|
+
-webkit-box-flex: 1; // Required for Mac/Safari line-clamp support
|
|
354
|
+
min-height: 0;
|
|
356
355
|
overflow-y: auto;
|
|
357
356
|
position: relative;
|
|
358
357
|
padding: 8px;
|
|
359
358
|
background-color: var(--white);
|
|
360
|
-
display: flex
|
|
361
|
-
justify-content: center;
|
|
359
|
+
display: block; // Changed from flex to block to improve stability on Mac Safari
|
|
362
360
|
|
|
363
361
|
.dark & {
|
|
364
362
|
background-color: var(--black);
|
|
@@ -373,7 +371,9 @@ body .ProseMirror {
|
|
|
373
371
|
/* Dropdown styling */
|
|
374
372
|
.tiptap-dropdown-menu {
|
|
375
373
|
.el-dropdown-menu__item {
|
|
376
|
-
&.is-active
|
|
374
|
+
&.is-active,
|
|
375
|
+
&:hover,
|
|
376
|
+
&:focus {
|
|
377
377
|
color: var(--tt-brand-color-500) !important;
|
|
378
378
|
background-color: var(--tt-brand-color-50) !important;
|
|
379
379
|
|
|
@@ -396,7 +396,6 @@ body .ProseMirror {
|
|
|
396
396
|
font-size: 10px;
|
|
397
397
|
font-weight: 700;
|
|
398
398
|
color: var(--tt-text-muted);
|
|
399
|
-
// background-color: var(--tt-gray-light-100);
|
|
400
399
|
padding: 1px 4px;
|
|
401
400
|
border-radius: 4px;
|
|
402
401
|
min-width: 20px;
|
|
@@ -422,18 +421,3 @@ body .ProseMirror {
|
|
|
422
421
|
height: 16px;
|
|
423
422
|
color: var(--tt-text-muted);
|
|
424
423
|
}
|
|
425
|
-
|
|
426
|
-
/* Dropdown styling */
|
|
427
|
-
.tiptap-dropdown-menu {
|
|
428
|
-
.el-dropdown-menu__item {
|
|
429
|
-
&.is-active {
|
|
430
|
-
color: var(--tt-brand-color-500) !important;
|
|
431
|
-
background-color: var(--tt-brand-color-50) !important;
|
|
432
|
-
}
|
|
433
|
-
&:hover,
|
|
434
|
-
&:focus {
|
|
435
|
-
color: var(--tt-brand-color-500) !important;
|
|
436
|
-
background-color: var(--tt-brand-color-50) !important;
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
}
|
|
@@ -66,7 +66,7 @@ const ColorHighlightPopover = defineComponent({
|
|
|
66
66
|
"class": "tiptap-color-highlight-popover-content"
|
|
67
67
|
}, [_createVNode("div", {
|
|
68
68
|
"class": "tiptap-color-highlight-grid"
|
|
69
|
-
}, [["
|
|
69
|
+
}, [["\u7EFF\u8272", "\u84DD\u8272", "\u7EA2\u8272", "\u7D2B\u8272", "\u9EC4\u8272"].map((name) => HIGHLIGHT_COLORS.find((c) => c.label.includes(name))).filter(Boolean).map((color) => _createVNode(ColorHighlightButton, {
|
|
70
70
|
"key": color.value,
|
|
71
71
|
"editor": props.editor,
|
|
72
72
|
"highlightColor": color.value,
|
|
@@ -83,7 +83,7 @@ const ColorHighlightPopover = defineComponent({
|
|
|
83
83
|
handleRemoveHighlight();
|
|
84
84
|
isOpen.value = false;
|
|
85
85
|
},
|
|
86
|
-
"tooltip": "
|
|
86
|
+
"tooltip": "\u79FB\u9664\u80CC\u666F\u8272",
|
|
87
87
|
"class": "tiptap-color-highlight-remove-button"
|
|
88
88
|
}, {
|
|
89
89
|
default: () => [_createVNode(BanIcon, {
|
|
@@ -50,7 +50,11 @@ const HeadingDropdownMenu = defineComponent({
|
|
|
50
50
|
});
|
|
51
51
|
const handleLevelSelect = (level) => {
|
|
52
52
|
const editor = props.editor && "value" in props.editor ? props.editor.value : props.editor;
|
|
53
|
-
|
|
53
|
+
if (level === 0) {
|
|
54
|
+
editor.chain().focus().setNode("paragraph").run();
|
|
55
|
+
} else {
|
|
56
|
+
toggleHeading(editor, level);
|
|
57
|
+
}
|
|
54
58
|
};
|
|
55
59
|
return () => {
|
|
56
60
|
if (!isVisible.value)
|
|
@@ -80,6 +84,12 @@ const HeadingDropdownMenu = defineComponent({
|
|
|
80
84
|
dropdown: () => _createVNode(ElDropdownMenu, null, {
|
|
81
85
|
default: () => [levels.map((level) => {
|
|
82
86
|
const HeadingOptionIcon = headingIcons[level] || Icons.HeadingIcon;
|
|
87
|
+
const levelLabels = {
|
|
88
|
+
1: "\u4E00\u7EA7\u6807\u9898",
|
|
89
|
+
2: "\u4E8C\u7EA7\u6807\u9898",
|
|
90
|
+
3: "\u4E09\u7EA7\u6807\u9898",
|
|
91
|
+
4: "\u56DB\u7EA7\u6807\u9898"
|
|
92
|
+
};
|
|
83
93
|
return _createVNode(ElDropdownItem, {
|
|
84
94
|
"key": level,
|
|
85
95
|
"command": level,
|
|
@@ -89,8 +99,17 @@ const HeadingDropdownMenu = defineComponent({
|
|
|
89
99
|
"class": "tiptap-dropdown-menu-item-content"
|
|
90
100
|
}, [_createVNode("span", {
|
|
91
101
|
"class": "tiptap-dropdown-menu-item-label"
|
|
92
|
-
}, [_createTextVNode("H"), level]), _createVNode("span", null, [
|
|
102
|
+
}, [_createTextVNode("H"), level]), _createVNode("span", null, [levelLabels[level] || `\u6807\u9898 ${level}`])])]
|
|
93
103
|
});
|
|
104
|
+
}), _createVNode(ElDropdownItem, {
|
|
105
|
+
"command": 0,
|
|
106
|
+
"class": cn(!activeLevel.value && "is-active")
|
|
107
|
+
}, {
|
|
108
|
+
default: () => [_createVNode("div", {
|
|
109
|
+
"class": "tiptap-dropdown-menu-item-content"
|
|
110
|
+
}, [_createVNode("span", {
|
|
111
|
+
"class": "tiptap-dropdown-menu-item-label"
|
|
112
|
+
}, [_createTextVNode("P")]), _createVNode("span", null, [_createTextVNode("\u6B63\u6587")])])]
|
|
94
113
|
})]
|
|
95
114
|
})
|
|
96
115
|
});
|
|
@@ -27,7 +27,7 @@ const HorizontalRuleButton = defineComponent({
|
|
|
27
27
|
"type": "button",
|
|
28
28
|
"data-style": "ghost",
|
|
29
29
|
"role": "button",
|
|
30
|
-
"tooltip": "
|
|
30
|
+
"tooltip": "\u5206\u5272\u7EBF",
|
|
31
31
|
"onClick": handleHorizontalRule,
|
|
32
32
|
"class": cn(props.className)
|
|
33
33
|
}, attrs), {
|
|
@@ -179,9 +179,9 @@ const DropZoneContent = defineComponent({
|
|
|
179
179
|
"class": "tiptap-image-upload-content"
|
|
180
180
|
}, [_createVNode("span", {
|
|
181
181
|
"class": "tiptap-image-upload-text"
|
|
182
|
-
}, [_createVNode("em", null, [_createTextVNode("
|
|
182
|
+
}, [_createVNode("em", null, [_createTextVNode("\u70B9\u51FB\u4E0A\u4F20")]), _createTextVNode(" \u6216\u62D6\u62FD\u56FE\u7247\u81F3\u6B64")]), _createVNode("span", {
|
|
183
183
|
"class": "tiptap-image-upload-subtext"
|
|
184
|
-
}, [_createTextVNode("
|
|
184
|
+
}, [_createTextVNode("\u6700\u591A\u652F\u6301 "), this.limit, _createTextVNode(" \u4E2A\u6587\u4EF6\uFF0C\u6BCF\u4E2A\u6587\u4EF6\u6700\u5927 "), this.maxSize / 1024 / 1024, _createTextVNode("MB\u3002")])])]);
|
|
185
185
|
}
|
|
186
186
|
});
|
|
187
187
|
const ImageUploadNodeView = defineComponent({
|
|
@@ -239,7 +239,7 @@ const ImageUploadNodeView = defineComponent({
|
|
|
239
239
|
const target = e.target;
|
|
240
240
|
const files = target.files;
|
|
241
241
|
if (!files || files.length === 0) {
|
|
242
|
-
(_b = (_a = extension.options).onError) == null ? void 0 : _b.call(_a, new Error("
|
|
242
|
+
(_b = (_a = extension.options).onError) == null ? void 0 : _b.call(_a, new Error("\u672A\u9009\u62E9\u6587\u4EF6"));
|
|
243
243
|
return;
|
|
244
244
|
}
|
|
245
245
|
handleUpload(Array.from(files));
|
|
@@ -268,7 +268,7 @@ const ImageUploadNodeView = defineComponent({
|
|
|
268
268
|
"class": "tiptap-image-upload-previews"
|
|
269
269
|
}, [fileItems.value.length > 1 && _createVNode("div", {
|
|
270
270
|
"class": "tiptap-image-upload-header"
|
|
271
|
-
}, [_createVNode("span", null, [_createTextVNode("
|
|
271
|
+
}, [_createVNode("span", null, [_createTextVNode("\u6B63\u5728\u4E0A\u4F20 "), fileItems.value.length, _createTextVNode(" \u4E2A\u6587\u4EF6")]), _createVNode(Button, {
|
|
272
272
|
"type": "button",
|
|
273
273
|
"data-style": "ghost",
|
|
274
274
|
"onClick": (e) => {
|
|
@@ -276,7 +276,7 @@ const ImageUploadNodeView = defineComponent({
|
|
|
276
276
|
clearAllFiles();
|
|
277
277
|
}
|
|
278
278
|
}, {
|
|
279
|
-
default: () => [_createTextVNode("
|
|
279
|
+
default: () => [_createTextVNode("\u5168\u90E8\u6E05\u9664")]
|
|
280
280
|
})]), fileItems.value.map((fileItem) => _createVNode(ImageUploadPreview, {
|
|
281
281
|
"key": fileItem.id,
|
|
282
282
|
"fileItem": fileItem,
|
|
@@ -61,7 +61,7 @@ const LinkPopover = defineComponent({
|
|
|
61
61
|
"data-style": "ghost",
|
|
62
62
|
"data-active-state": linkUrl.value ? "on" : "off",
|
|
63
63
|
"role": "button",
|
|
64
|
-
"tooltip": "
|
|
64
|
+
"tooltip": "\u94FE\u63A5",
|
|
65
65
|
"class": cn(props.className)
|
|
66
66
|
}, attrs), {
|
|
67
67
|
default: () => [_createVNode(LinkIcon, {
|
|
@@ -81,7 +81,7 @@ const LinkPopover = defineComponent({
|
|
|
81
81
|
}, [_createVNode(ElInput, {
|
|
82
82
|
"modelValue": tempUrl.value,
|
|
83
83
|
"onUpdate:modelValue": ($event) => tempUrl.value = $event,
|
|
84
|
-
"placeholder": "
|
|
84
|
+
"placeholder": "\u7C98\u8D34\u94FE\u63A5...",
|
|
85
85
|
"size": "small",
|
|
86
86
|
"style": "width: 180px;",
|
|
87
87
|
"onKeydown": (e) => e.key === "Enter" && onApply()
|
|
@@ -89,7 +89,7 @@ const LinkPopover = defineComponent({
|
|
|
89
89
|
"type": "button",
|
|
90
90
|
"data-style": "ghost",
|
|
91
91
|
"onClick": onApply,
|
|
92
|
-
"tooltip": "
|
|
92
|
+
"tooltip": "\u5E94\u7528",
|
|
93
93
|
"data-size": "small"
|
|
94
94
|
}, {
|
|
95
95
|
default: () => [_createVNode(CornerDownLeftIcon, {
|
|
@@ -101,7 +101,7 @@ const LinkPopover = defineComponent({
|
|
|
101
101
|
"type": "button",
|
|
102
102
|
"data-style": "ghost",
|
|
103
103
|
"onClick": onOpenLink,
|
|
104
|
-
"tooltip": "
|
|
104
|
+
"tooltip": "\u65B0\u7A97\u53E3\u6253\u5F00",
|
|
105
105
|
"data-size": "small"
|
|
106
106
|
}, {
|
|
107
107
|
default: () => [_createVNode(ExternalLinkIcon, {
|
|
@@ -111,7 +111,7 @@ const LinkPopover = defineComponent({
|
|
|
111
111
|
"type": "button",
|
|
112
112
|
"data-style": "ghost",
|
|
113
113
|
"onClick": onRemove,
|
|
114
|
-
"tooltip": "
|
|
114
|
+
"tooltip": "\u79FB\u9664",
|
|
115
115
|
"data-size": "small"
|
|
116
116
|
}, {
|
|
117
117
|
default: () => [_createVNode(TrashIcon, {
|
|
@@ -18,7 +18,7 @@ export declare function useBlockquote(config: UseBlockquoteConfig): {
|
|
|
18
18
|
canToggle: import("vue").Ref<boolean, boolean>;
|
|
19
19
|
label: string;
|
|
20
20
|
shortcutKeys: string;
|
|
21
|
-
Icon: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
21
|
+
Icon: import("vue").Raw<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
22
22
|
className: {
|
|
23
23
|
type: StringConstructor;
|
|
24
24
|
default: string;
|
|
@@ -30,5 +30,5 @@ export declare function useBlockquote(config: UseBlockquoteConfig): {
|
|
|
30
30
|
};
|
|
31
31
|
}>> & Readonly<{}>, {
|
|
32
32
|
className: string;
|
|
33
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any
|
|
33
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
|
|
34
34
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref, watch, onBeforeUnmount } from "vue";
|
|
1
|
+
import { ref, watch, onBeforeUnmount, markRaw } from "vue";
|
|
2
2
|
import { NodeSelection, TextSelection } from "@tiptap/pm/state";
|
|
3
3
|
import {
|
|
4
4
|
findNodePosition,
|
|
@@ -126,9 +126,9 @@ function useBlockquote(config) {
|
|
|
126
126
|
isActive,
|
|
127
127
|
handleToggle,
|
|
128
128
|
canToggle,
|
|
129
|
-
label: "
|
|
129
|
+
label: "\u5F15\u7528",
|
|
130
130
|
shortcutKeys: BLOCKQUOTE_SHORTCUT_KEY,
|
|
131
|
-
Icon: BlockquoteIcon
|
|
131
|
+
Icon: markRaw(BlockquoteIcon)
|
|
132
132
|
};
|
|
133
133
|
}
|
|
134
134
|
export {
|
|
@@ -18,7 +18,7 @@ export declare function useCodeBlock(config: UseCodeBlockConfig): {
|
|
|
18
18
|
canToggle: import("vue").Ref<boolean, boolean>;
|
|
19
19
|
label: string;
|
|
20
20
|
shortcutKeys: string;
|
|
21
|
-
Icon: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
21
|
+
Icon: import("vue").Raw<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
22
22
|
className: {
|
|
23
23
|
type: StringConstructor;
|
|
24
24
|
default: string;
|
|
@@ -30,5 +30,5 @@ export declare function useCodeBlock(config: UseCodeBlockConfig): {
|
|
|
30
30
|
};
|
|
31
31
|
}>> & Readonly<{}>, {
|
|
32
32
|
className: string;
|
|
33
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any
|
|
33
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
|
|
34
34
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref, watch, onBeforeUnmount } from "vue";
|
|
1
|
+
import { ref, watch, onBeforeUnmount, markRaw } from "vue";
|
|
2
2
|
import { NodeSelection, TextSelection } from "@tiptap/pm/state";
|
|
3
3
|
import {
|
|
4
4
|
findNodePosition,
|
|
@@ -126,9 +126,9 @@ function useCodeBlock(config) {
|
|
|
126
126
|
isActive,
|
|
127
127
|
handleToggle,
|
|
128
128
|
canToggle: canToggleState,
|
|
129
|
-
label: "
|
|
129
|
+
label: "\u4EE3\u7801\u5757",
|
|
130
130
|
shortcutKeys: CODE_BLOCK_SHORTCUT_KEY,
|
|
131
|
-
Icon: CodeBlockIcon
|
|
131
|
+
Icon: markRaw(CodeBlockIcon)
|
|
132
132
|
};
|
|
133
133
|
}
|
|
134
134
|
export {
|
|
@@ -30,7 +30,7 @@ export declare function useColorHighlight(config: {
|
|
|
30
30
|
canHighlight: import("vue").Ref<boolean, boolean>;
|
|
31
31
|
label: string;
|
|
32
32
|
shortcutKeys: string;
|
|
33
|
-
Icon: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
33
|
+
Icon: import("vue").Raw<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
34
34
|
className: {
|
|
35
35
|
type: StringConstructor;
|
|
36
36
|
default: string;
|
|
@@ -42,5 +42,5 @@ export declare function useColorHighlight(config: {
|
|
|
42
42
|
};
|
|
43
43
|
}>> & Readonly<{}>, {
|
|
44
44
|
className: string;
|
|
45
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any
|
|
45
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
|
|
46
46
|
};
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import { ref, watch, onBeforeUnmount } from "vue";
|
|
1
|
+
import { ref, watch, onBeforeUnmount, markRaw } from "vue";
|
|
2
2
|
import { isMarkInSchema, isNodeTypeSelected } from "../utils/tiptap-utils";
|
|
3
3
|
import { HighlighterIcon } from "../icons";
|
|
4
4
|
const COLOR_HIGHLIGHT_SHORTCUT_KEY = "mod+shift+h";
|
|
5
5
|
const HIGHLIGHT_COLORS = [
|
|
6
6
|
{
|
|
7
|
-
label: "
|
|
7
|
+
label: "\u9ED8\u8BA4\u80CC\u666F",
|
|
8
8
|
value: "var(--tt-bg-color)",
|
|
9
9
|
border: "var(--tt-bg-color-contrast)"
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
|
-
label: "
|
|
12
|
+
label: "\u7070\u8272\u80CC\u666F",
|
|
13
13
|
value: "var(--tt-color-highlight-gray)",
|
|
14
14
|
border: "var(--tt-color-highlight-gray-contrast)"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
|
-
label: "
|
|
17
|
+
label: "\u68D5\u8272\u80CC\u666F",
|
|
18
18
|
value: "var(--tt-color-highlight-brown)",
|
|
19
19
|
border: "var(--tt-color-highlight-brown-contrast)"
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
|
-
label: "
|
|
22
|
+
label: "\u6A59\u8272\u80CC\u666F",
|
|
23
23
|
value: "var(--tt-color-highlight-orange)",
|
|
24
24
|
border: "var(--tt-color-highlight-orange-contrast)"
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
|
-
label: "
|
|
27
|
+
label: "\u9EC4\u8272\u80CC\u666F",
|
|
28
28
|
value: "var(--tt-color-highlight-yellow)",
|
|
29
29
|
border: "var(--tt-color-highlight-yellow-contrast)"
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
|
-
label: "
|
|
32
|
+
label: "\u7EFF\u8272\u80CC\u666F",
|
|
33
33
|
value: "var(--tt-color-highlight-green)",
|
|
34
34
|
border: "var(--tt-color-highlight-green-contrast)"
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
|
-
label: "
|
|
37
|
+
label: "\u84DD\u8272\u80CC\u666F",
|
|
38
38
|
value: "var(--tt-color-highlight-blue)",
|
|
39
39
|
border: "var(--tt-color-highlight-blue-contrast)"
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
|
-
label: "
|
|
42
|
+
label: "\u7D2B\u8272\u80CC\u666F",
|
|
43
43
|
value: "var(--tt-color-highlight-purple)",
|
|
44
44
|
border: "var(--tt-color-highlight-purple-contrast)"
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
|
-
label: "
|
|
47
|
+
label: "\u7C89\u8272\u80CC\u666F",
|
|
48
48
|
value: "var(--tt-color-highlight-pink)",
|
|
49
49
|
border: "var(--tt-color-highlight-pink-contrast)"
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
|
-
label: "
|
|
52
|
+
label: "\u7EA2\u8272\u80CC\u666F",
|
|
53
53
|
value: "var(--tt-color-highlight-red)",
|
|
54
54
|
border: "var(--tt-color-highlight-red-contrast)"
|
|
55
55
|
}
|
|
@@ -141,7 +141,7 @@ function useColorHighlight(config) {
|
|
|
141
141
|
const editor = getEditor();
|
|
142
142
|
const success = removeHighlight(editor);
|
|
143
143
|
if (success) {
|
|
144
|
-
onApplied == null ? void 0 : onApplied({ color: "", label: "
|
|
144
|
+
onApplied == null ? void 0 : onApplied({ color: "", label: "\u79FB\u9664\u80CC\u666F\u8272" });
|
|
145
145
|
}
|
|
146
146
|
};
|
|
147
147
|
return {
|
|
@@ -150,9 +150,9 @@ function useColorHighlight(config) {
|
|
|
150
150
|
handleColorHighlight,
|
|
151
151
|
handleRemoveHighlight,
|
|
152
152
|
canHighlight,
|
|
153
|
-
label: label || "
|
|
153
|
+
label: label || "\u80CC\u666F\u8272",
|
|
154
154
|
shortcutKeys: COLOR_HIGHLIGHT_SHORTCUT_KEY,
|
|
155
|
-
Icon: HighlighterIcon
|
|
155
|
+
Icon: markRaw(HighlighterIcon)
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
158
|
export {
|
|
@@ -24,9 +24,7 @@ function useFileUpload(options) {
|
|
|
24
24
|
const uploadFile = (file) => __async(this, null, function* () {
|
|
25
25
|
var _a, _b, _c;
|
|
26
26
|
if (file.size > options.maxSize) {
|
|
27
|
-
const error = new Error(
|
|
28
|
-
`File size exceeds maximum allowed (${options.maxSize / 1024 / 1024}MB)`
|
|
29
|
-
);
|
|
27
|
+
const error = new Error(`\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7\u6700\u5927\u9650\u5236 (${options.maxSize / 1024 / 1024}MB)`);
|
|
30
28
|
(_a = options.onError) == null ? void 0 : _a.call(options, error);
|
|
31
29
|
return null;
|
|
32
30
|
}
|
|
@@ -42,7 +40,7 @@ function useFileUpload(options) {
|
|
|
42
40
|
fileItems.value.push(newFileItem);
|
|
43
41
|
try {
|
|
44
42
|
if (!options.upload) {
|
|
45
|
-
throw new Error("
|
|
43
|
+
throw new Error("\u672A\u5B9A\u4E49\u4E0A\u4F20\u51FD\u6570");
|
|
46
44
|
}
|
|
47
45
|
const url = yield options.upload(
|
|
48
46
|
file,
|
|
@@ -55,7 +53,7 @@ function useFileUpload(options) {
|
|
|
55
53
|
abortController.signal
|
|
56
54
|
);
|
|
57
55
|
if (!url)
|
|
58
|
-
throw new Error("
|
|
56
|
+
throw new Error("\u4E0A\u4F20\u5931\u8D25\uFF1A\u672A\u8FD4\u56DE URL");
|
|
59
57
|
if (!abortController.signal.aborted) {
|
|
60
58
|
const item = fileItems.value.find((i) => i.id === fileId);
|
|
61
59
|
if (item) {
|
|
@@ -74,7 +72,7 @@ function useFileUpload(options) {
|
|
|
74
72
|
item.status = "error";
|
|
75
73
|
item.progress = 0;
|
|
76
74
|
}
|
|
77
|
-
(_c = options.onError) == null ? void 0 : _c.call(options, error instanceof Error ? error : new Error("
|
|
75
|
+
(_c = options.onError) == null ? void 0 : _c.call(options, error instanceof Error ? error : new Error("\u4E0A\u4F20\u5931\u8D25"));
|
|
78
76
|
}
|
|
79
77
|
return null;
|
|
80
78
|
}
|
|
@@ -82,14 +80,11 @@ function useFileUpload(options) {
|
|
|
82
80
|
const uploadFiles = (files) => __async(this, null, function* () {
|
|
83
81
|
var _a, _b;
|
|
84
82
|
if (!files || files.length === 0) {
|
|
85
|
-
(_a = options.onError) == null ? void 0 : _a.call(options, new Error("
|
|
83
|
+
(_a = options.onError) == null ? void 0 : _a.call(options, new Error("\u6CA1\u6709\u8981\u4E0A\u4F20\u7684\u6587\u4EF6"));
|
|
86
84
|
return [];
|
|
87
85
|
}
|
|
88
86
|
if (options.limit && files.length > options.limit) {
|
|
89
|
-
(_b = options.onError) == null ? void 0 : _b.call(
|
|
90
|
-
options,
|
|
91
|
-
new Error(`Maximum ${options.limit} file${options.limit === 1 ? "" : "s"} allowed`)
|
|
92
|
-
);
|
|
87
|
+
(_b = options.onError) == null ? void 0 : _b.call(options, new Error(`\u6700\u591A\u5141\u8BB8\u4E0A\u4F20 ${options.limit} \u4E2A\u6587\u4EF6`));
|
|
93
88
|
return [];
|
|
94
89
|
}
|
|
95
90
|
const uploadPromises = files.map((file) => uploadFile(file));
|
|
@@ -13,7 +13,7 @@ export declare function useHeadingDropdownMenu(config: UseHeadingDropdownMenuCon
|
|
|
13
13
|
canToggle: import("vue").Ref<boolean, boolean>;
|
|
14
14
|
levels: Level[];
|
|
15
15
|
label: string;
|
|
16
|
-
Icon: import("vue").
|
|
16
|
+
Icon: import("vue").ShallowRef<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
17
17
|
className: {
|
|
18
18
|
type: StringConstructor;
|
|
19
19
|
default: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref, watch, onBeforeUnmount } from "vue";
|
|
1
|
+
import { ref, watch, onBeforeUnmount, shallowRef } from "vue";
|
|
2
2
|
import {
|
|
3
3
|
isHeadingActive,
|
|
4
4
|
canToggle,
|
|
@@ -50,7 +50,7 @@ function useHeadingDropdownMenu(config) {
|
|
|
50
50
|
},
|
|
51
51
|
{ immediate: true }
|
|
52
52
|
);
|
|
53
|
-
const Icon =
|
|
53
|
+
const Icon = shallowRef(HeadingIcon);
|
|
54
54
|
watch(activeLevel, (val) => {
|
|
55
55
|
Icon.value = val ? headingIcons[val] : HeadingIcon;
|
|
56
56
|
});
|
|
@@ -60,7 +60,7 @@ function useHeadingDropdownMenu(config) {
|
|
|
60
60
|
isActive,
|
|
61
61
|
canToggle: canToggleState,
|
|
62
62
|
levels,
|
|
63
|
-
label: "
|
|
63
|
+
label: "\u6807\u9898",
|
|
64
64
|
Icon
|
|
65
65
|
};
|
|
66
66
|
}
|