@onereach/ui-components 4.1.0-beta.2509.0 → 4.1.0-beta.2511.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundled/v2/components/OrCode/OrCode.js +3 -4
- package/dist/bundled/v2/components/OrCode/index.js +3 -4
- package/dist/bundled/v2/components/OrCode/lang.js +2 -3
- package/dist/bundled/v2/components/OrCode/theme.js +1 -2
- package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.js +20 -13
- package/dist/bundled/v2/components/OrRichTextEditorV3/index.js +4 -4
- package/dist/bundled/v2/components/OrRichTextEditorV3/styles.js +0 -2
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.js +4 -4
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.js +3 -2
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/index.js +2 -1
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/theme.d.ts +24 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/theme.js +190 -0
- package/dist/bundled/v2/components/index.js +4 -4
- package/dist/bundled/v2/{index-92e69736.js → index-16aee5bc.js} +2 -3
- package/dist/bundled/{v3/index-db5e8c99.js → v2/index-70ca38c5.js} +1 -2
- package/dist/bundled/{v3/index-c76372bb.js → v2/index-f5487f12.js} +4545 -14
- package/dist/bundled/v2/index.js +5 -5
- package/dist/bundled/v3/{OrCode.vue_vue_type_script_lang-0c5e41b0.js → OrCode.vue_vue_type_script_lang-f9e835d0.js} +2 -2
- package/dist/bundled/v3/{OrRichTextEditor.vue_vue_type_script_lang-585bb303.js → OrRichTextEditor.vue_vue_type_script_lang-eb03c076.js} +12 -7
- package/dist/bundled/v3/components/OrCode/OrCode.js +5 -6
- package/dist/bundled/v3/components/OrCode/index.js +4 -5
- package/dist/bundled/v3/components/OrCode/lang.js +2 -3
- package/dist/bundled/v3/components/OrCode/theme.js +1 -2
- package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.js +21 -18
- package/dist/bundled/v3/components/OrRichTextEditorV3/index.js +5 -5
- package/dist/bundled/v3/components/OrRichTextEditorV3/styles.js +0 -2
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.js +4 -4
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.js +3 -2
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/index.js +2 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/theme.d.ts +24 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/theme.js +190 -0
- package/dist/bundled/v3/components/index.js +6 -6
- package/dist/bundled/v3/{index-92e69736.js → index-16aee5bc.js} +2 -3
- package/dist/bundled/{v2/index-db5e8c99.js → v3/index-70ca38c5.js} +1 -2
- package/dist/bundled/{v2/index-c76372bb.js → v3/index-f5487f12.js} +4545 -14
- package/dist/bundled/v3/index.js +7 -7
- package/dist/esm/v2/{OrRichTextEditor-78a3efc7.js → OrRichTextEditor-93ace5e2.js} +17 -12
- package/dist/esm/v2/{codemirrorView-2e87c938.js → codemirrorView-be2c7423.js} +170 -1
- package/dist/esm/v2/components/index.js +2 -2
- package/dist/esm/v2/components/or-rich-text-editor-v3/index.js +4 -2
- package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/index.js +3 -1
- package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/theme.d.ts +24 -0
- package/dist/esm/v2/index.js +2 -2
- package/dist/esm/v3/{OrRichTextEditor-bd855b1f.js → OrRichTextEditor-d99a44df.js} +28 -22
- package/dist/esm/v3/{codemirrorView-2e87c938.js → codemirrorView-be2c7423.js} +170 -1
- package/dist/esm/v3/components/index.js +2 -2
- package/dist/esm/v3/components/or-rich-text-editor-v3/index.js +4 -2
- package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/index.js +3 -1
- package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/theme.d.ts +24 -0
- package/dist/esm/v3/index.js +2 -2
- package/package.json +2 -2
- package/src/components/or-rich-text-editor-v3/OrRichTextEditor.vue +17 -9
- package/src/components/or-rich-text-editor-v3/styles.ts +0 -2
- package/src/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.ts +6 -4
- package/src/components/or-rich-text-editor-v3/utils/codemirror/theme.ts +213 -0
- package/dist/bundled/v2/index-62e39ec2.js +0 -4534
- package/dist/bundled/v3/index-62e39ec2.js +0 -4534
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as EditorView, a as EditorState, k as keymap } from '../../index-
|
|
2
|
-
import { b as basicSetup, i as indentWithTab } from '../../index-
|
|
1
|
+
import { E as EditorView, a as EditorState, k as keymap } from '../../index-f5487f12.js';
|
|
2
|
+
import { b as basicSetup, i as indentWithTab } from '../../index-16aee5bc.js';
|
|
3
3
|
import { useElementHover } from '@vueuse/core';
|
|
4
4
|
import { defineComponent, ref } from 'vue-demi';
|
|
5
5
|
import __vue_component__$3 from '../OrTeleport/OrTeleport.js';
|
|
@@ -14,8 +14,7 @@ import __vue_component__$6 from '../OrLabel/OrLabel.js';
|
|
|
14
14
|
import { s as styleInject } from '../../style-inject.es-4c6f2515.js';
|
|
15
15
|
import { n as normalizeComponent } from '../../normalize-component-6e8e3d80.js';
|
|
16
16
|
import '../../index.es-3f39f316.js';
|
|
17
|
-
import '../../index-
|
|
18
|
-
import '../../index-db5e8c99.js';
|
|
17
|
+
import '../../index-70ca38c5.js';
|
|
19
18
|
import 'portal-vue/dist/portal-vue.esm.js';
|
|
20
19
|
import '../OrTeleport/constants.js';
|
|
21
20
|
import '../OrTooltip/OrTooltip.js';
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
export { default as OrCode } from './OrCode.js';
|
|
2
2
|
export { OrCodeLanguages } from './constants.js';
|
|
3
|
-
import '../../index-
|
|
3
|
+
import '../../index-f5487f12.js';
|
|
4
4
|
import '../../index.es-3f39f316.js';
|
|
5
|
-
import '../../index-
|
|
6
|
-
import '../../index-
|
|
7
|
-
import '../../index-db5e8c99.js';
|
|
5
|
+
import '../../index-16aee5bc.js';
|
|
6
|
+
import '../../index-70ca38c5.js';
|
|
8
7
|
import '@vueuse/core';
|
|
9
8
|
import 'vue-demi';
|
|
10
9
|
import '../OrTeleport/OrTeleport.js';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { C as ContextTracker, E as ExternalTokenizer, L as LRParser, j as javascriptLanguage, e as javascript } from '../../index-
|
|
2
|
-
import {
|
|
3
|
-
import { E as EditorView, b as EditorSelection, P as Prec, k as keymap } from '../../index-c76372bb.js';
|
|
1
|
+
import { C as ContextTracker, E as ExternalTokenizer, L as LRParser, j as javascriptLanguage, e as javascript } from '../../index-70ca38c5.js';
|
|
2
|
+
import { _ as styleTags, $ as tags$1, a0 as parseMixed, a1 as LanguageSupport, s as syntaxTree, a2 as LRLanguage, a3 as indentNodeProp, a4 as continuedIndent, a5 as foldNodeProp, a6 as foldInside, E as EditorView, b as EditorSelection, a7 as NodeType, N as NodeProp, a8 as NodeSet, a9 as Parser, aa as Tag, ab as Tree, P as Prec, k as keymap, ac as Language, ad as defineLanguageFacet, ae as languageDataProp, af as LanguageDescription, ag as ParseContext } from '../../index-f5487f12.js';
|
|
4
3
|
import { OrCodeLanguages } from './constants.js';
|
|
5
4
|
import '../../index.es-3f39f316.js';
|
|
6
5
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { E as EditorView } from '../../index-
|
|
2
|
-
import { H as HighlightStyle, t as tags, d as syntaxHighlighting } from '../../index-62e39ec2.js';
|
|
1
|
+
import { E as EditorView, ah as HighlightStyle, $ as tags, M as syntaxHighlighting } from '../../index-f5487f12.js';
|
|
3
2
|
import '../../index.es-3f39f316.js';
|
|
4
3
|
|
|
5
4
|
// Using https://github.com/one-dark/vscode-one-dark-theme/ as reference for the colors
|
|
@@ -17,10 +17,10 @@ import { n as normalizeComponent } from '../../normalize-component-6e8e3d80.js';
|
|
|
17
17
|
import 'node:punycode';
|
|
18
18
|
import '../../index.es-3f39f316.js';
|
|
19
19
|
import './utils/codemirror/codemirrorView.js';
|
|
20
|
-
import '../../index-
|
|
21
|
-
import '
|
|
22
|
-
import '../../index-
|
|
23
|
-
import '../../index-
|
|
20
|
+
import '../../index-f5487f12.js';
|
|
21
|
+
import './utils/codemirror/theme.js';
|
|
22
|
+
import '../../index-16aee5bc.js';
|
|
23
|
+
import '../../index-70ca38c5.js';
|
|
24
24
|
import '../OrIconButtonV3/props.js';
|
|
25
25
|
import '../OrIconV3/props.js';
|
|
26
26
|
import '../OrIconButtonV3/styles.js';
|
|
@@ -1517,7 +1517,7 @@ var script = defineComponent({
|
|
|
1517
1517
|
},
|
|
1518
1518
|
toolbar: {
|
|
1519
1519
|
type: Array,
|
|
1520
|
-
default: () => [['heading'], ['bold', 'italic', 'strike'], ['underline', 'highlight'], ['link'], ['blockquote', 'codeBlock'], ['bulletList', 'orderedList'], ['undo', 'redo']]
|
|
1520
|
+
default: () => [['heading'], ['bold', 'italic', 'strike'], ['underline', 'highlight'], ['link'], ['blockquote', 'codeBlock'], ['bulletList', 'orderedList'], ['undo', 'redo'], ['file']]
|
|
1521
1521
|
},
|
|
1522
1522
|
description: {
|
|
1523
1523
|
type: String,
|
|
@@ -1540,7 +1540,7 @@ var script = defineComponent({
|
|
|
1540
1540
|
default: false
|
|
1541
1541
|
}
|
|
1542
1542
|
},
|
|
1543
|
-
emits: ['update:modelValue', 'input'],
|
|
1543
|
+
emits: ['update:modelValue', 'input', 'file-upload'],
|
|
1544
1544
|
expose: ['root'],
|
|
1545
1545
|
setup(props, context) {
|
|
1546
1546
|
// Refs
|
|
@@ -1553,7 +1553,6 @@ var script = defineComponent({
|
|
|
1553
1553
|
const isActive = ref({});
|
|
1554
1554
|
const isFocused = ref(props.autofocus);
|
|
1555
1555
|
const headingLevels = [1, 2, 3, 4];
|
|
1556
|
-
const previousHeadingLevel = ref();
|
|
1557
1556
|
const activeHeadingLevel = ref(0);
|
|
1558
1557
|
const markdownOutput = ref('');
|
|
1559
1558
|
const isOpenLinkModal = ref(false);
|
|
@@ -1576,7 +1575,8 @@ var script = defineComponent({
|
|
|
1576
1575
|
redo: 'redo',
|
|
1577
1576
|
undo: 'undo',
|
|
1578
1577
|
codeBlock: 'code_blocks',
|
|
1579
|
-
blockquote: 'format_quote'
|
|
1578
|
+
blockquote: 'format_quote',
|
|
1579
|
+
file: 'attach_file'
|
|
1580
1580
|
});
|
|
1581
1581
|
const iconTooltipsEnum = ref({
|
|
1582
1582
|
bold: 'Bold',
|
|
@@ -1590,7 +1590,8 @@ var script = defineComponent({
|
|
|
1590
1590
|
redo: 'Redo',
|
|
1591
1591
|
undo: 'Undo',
|
|
1592
1592
|
codeBlock: 'Code Block',
|
|
1593
|
-
blockquote: 'Quote'
|
|
1593
|
+
blockquote: 'Quote',
|
|
1594
|
+
file: 'File'
|
|
1594
1595
|
});
|
|
1595
1596
|
onMounted(() => {
|
|
1596
1597
|
editor = new Editor({
|
|
@@ -1686,9 +1687,11 @@ var script = defineComponent({
|
|
|
1686
1687
|
});
|
|
1687
1688
|
//Methods
|
|
1688
1689
|
const handleEditorClick = () => {
|
|
1690
|
+
var _a;
|
|
1689
1691
|
setActiveFormats();
|
|
1690
1692
|
isFocused.value = true;
|
|
1691
1693
|
editor === null || editor === void 0 ? void 0 : editor.commands.focus();
|
|
1694
|
+
activeHeadingLevel.value = ((_a = editor === null || editor === void 0 ? void 0 : editor.getAttributes('heading')) === null || _a === void 0 ? void 0 : _a.level) || 0;
|
|
1692
1695
|
};
|
|
1693
1696
|
const handleToolbarClick = (item, level) => {
|
|
1694
1697
|
var _a, _b;
|
|
@@ -1727,12 +1730,11 @@ var script = defineComponent({
|
|
|
1727
1730
|
case 'heading':
|
|
1728
1731
|
if (!level) {
|
|
1729
1732
|
editor === null || editor === void 0 ? void 0 : editor.commands.toggleHeading({
|
|
1730
|
-
level:
|
|
1733
|
+
level: 0
|
|
1731
1734
|
});
|
|
1732
1735
|
activeHeadingLevel.value = 0;
|
|
1733
1736
|
} else {
|
|
1734
1737
|
activeHeadingLevel.value = level;
|
|
1735
|
-
previousHeadingLevel.value = level;
|
|
1736
1738
|
editor === null || editor === void 0 ? void 0 : editor.commands.toggleHeading({
|
|
1737
1739
|
level: level
|
|
1738
1740
|
});
|
|
@@ -1743,6 +1745,9 @@ var script = defineComponent({
|
|
|
1743
1745
|
case 'redo':
|
|
1744
1746
|
item === 'undo' ? editor === null || editor === void 0 ? void 0 : editor.commands.undo() : editor === null || editor === void 0 ? void 0 : editor.commands.redo();
|
|
1745
1747
|
break;
|
|
1748
|
+
case 'file':
|
|
1749
|
+
context.emit('file-upload');
|
|
1750
|
+
break;
|
|
1746
1751
|
default:
|
|
1747
1752
|
editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleMark(item).run();
|
|
1748
1753
|
break;
|
|
@@ -1880,7 +1885,7 @@ var __vue_render__ = function () {
|
|
|
1880
1885
|
}, _vm._l(tool, function (item) {
|
|
1881
1886
|
return _c('div', {
|
|
1882
1887
|
key: item,
|
|
1883
|
-
staticClass: "
|
|
1888
|
+
staticClass: "flex gap-md"
|
|
1884
1889
|
}, [item === 'heading' ? _c('or-icon-button', {
|
|
1885
1890
|
ref: "toolbarButtonRef",
|
|
1886
1891
|
refInFor: true,
|
|
@@ -1924,9 +1929,11 @@ var __vue_render__ = function () {
|
|
|
1924
1929
|
})], 1);
|
|
1925
1930
|
}), 0);
|
|
1926
1931
|
}), 0), _vm._v(" "), _c('div', {
|
|
1932
|
+
staticClass: "p-sm"
|
|
1933
|
+
}, [_c('div', {
|
|
1927
1934
|
ref: "editorRef",
|
|
1928
1935
|
class: _vm.editorInputStyles
|
|
1929
|
-
})]), _vm._v(" "), _vm.toolbarButtonRef ? _c('or-menu', {
|
|
1936
|
+
}), _vm._v(" "), _vm._t("files")], 2)]), _vm._v(" "), _vm.toolbarButtonRef ? _c('or-menu', {
|
|
1930
1937
|
ref: "menuRef",
|
|
1931
1938
|
attrs: {
|
|
1932
1939
|
"trigger": _vm.toolbarButtonRef[_vm.getIndexOfHeading].root,
|
|
@@ -9,10 +9,10 @@ import '../../index.es-3f39f316.js';
|
|
|
9
9
|
import './styles.js';
|
|
10
10
|
import './utils/codemirror/codemirrorNode.js';
|
|
11
11
|
import './utils/codemirror/codemirrorView.js';
|
|
12
|
-
import '../../index-
|
|
13
|
-
import '
|
|
14
|
-
import '../../index-
|
|
15
|
-
import '../../index-
|
|
12
|
+
import '../../index-f5487f12.js';
|
|
13
|
+
import './utils/codemirror/theme.js';
|
|
14
|
+
import '../../index-16aee5bc.js';
|
|
15
|
+
import '../../index-70ca38c5.js';
|
|
16
16
|
import '../OrIconButtonV3/OrIconButton.js';
|
|
17
17
|
import '../OrIconButtonV3/props.js';
|
|
18
18
|
import '../OrIconV3/props.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { N as Node } from '../../../../tiptap-core.esm-f85402b1.js';
|
|
2
2
|
import CodeMirrorView from './codemirrorView.js';
|
|
3
|
-
import { m as minimalSetup } from '../../../../index-
|
|
4
|
-
import { e as javascript } from '../../../../index-
|
|
3
|
+
import { m as minimalSetup } from '../../../../index-16aee5bc.js';
|
|
4
|
+
import { e as javascript } from '../../../../index-70ca38c5.js';
|
|
5
5
|
import '../../../../index-62c3221b.js';
|
|
6
6
|
import '../../../../index.es-3f39f316.js';
|
|
7
|
-
import '../../../../index-
|
|
8
|
-
import '
|
|
7
|
+
import '../../../../index-f5487f12.js';
|
|
8
|
+
import './theme.js';
|
|
9
9
|
|
|
10
10
|
var codemirrorNode = Node.create({
|
|
11
11
|
name: 'codeBlock',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { n as exitCode, T as TextSelection, S as Selection } from '../../../../index-62c3221b.js';
|
|
2
|
-
import { a as EditorState, E as EditorView,
|
|
2
|
+
import { a as EditorState, E as EditorView, Y as highlightActiveLine, B as highlightActiveLineGutter, z as lineNumbers, k as keymap } from '../../../../index-f5487f12.js';
|
|
3
|
+
import theme from './theme.js';
|
|
3
4
|
import '../../../../index.es-3f39f316.js';
|
|
4
5
|
|
|
5
6
|
const computeChange = (oldVal, newVal) => {
|
|
@@ -45,7 +46,7 @@ class CodeMirrorView {
|
|
|
45
46
|
this.dom = this.cm.dom;
|
|
46
47
|
const cmState = EditorState.create({
|
|
47
48
|
doc: this.node.textContent,
|
|
48
|
-
extensions: [changeFilter, highlightActiveLine(), highlightActiveLineGutter(), lineNumbers(), keymap.of([{
|
|
49
|
+
extensions: [theme, changeFilter, highlightActiveLine(), highlightActiveLineGutter(), lineNumbers(), keymap.of([{
|
|
49
50
|
key: 'ArrowUp',
|
|
50
51
|
run: this.mayBeEscape('line', -1)
|
|
51
52
|
}, {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Extension } from '@codemirror/state';
|
|
2
|
+
import { HighlightStyle } from '@codemirror/language';
|
|
3
|
+
export declare const color: {
|
|
4
|
+
chalky: string;
|
|
5
|
+
coral: string;
|
|
6
|
+
cyan: string;
|
|
7
|
+
invalid: string;
|
|
8
|
+
ivory: string;
|
|
9
|
+
stone: string;
|
|
10
|
+
malibu: string;
|
|
11
|
+
sage: string;
|
|
12
|
+
whiskey: string;
|
|
13
|
+
violet: string;
|
|
14
|
+
darkBackground: string;
|
|
15
|
+
highlightBackground: string;
|
|
16
|
+
background: string;
|
|
17
|
+
tooltipBackground: string;
|
|
18
|
+
selection: string;
|
|
19
|
+
cursor: string;
|
|
20
|
+
};
|
|
21
|
+
export declare const orCodeTheme: Extension;
|
|
22
|
+
export declare const orCodeHighlightStyle: HighlightStyle;
|
|
23
|
+
declare const theme: Extension;
|
|
24
|
+
export default theme;
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { E as EditorView, ah as HighlightStyle, $ as tags, M as syntaxHighlighting } from '../../../../index-f5487f12.js';
|
|
2
|
+
import '../../../../index.es-3f39f316.js';
|
|
3
|
+
|
|
4
|
+
// Using https://github.com/one-dark/vscode-one-dark-theme/ as reference for the colors
|
|
5
|
+
const chalky = 'var(--c-warning-darken-20)',
|
|
6
|
+
coral = 'var(--c-error)',
|
|
7
|
+
cyan = '#56b6c2',
|
|
8
|
+
invalid = 'var(--c-white)',
|
|
9
|
+
ivory = 'var(--c-neutral-6)',
|
|
10
|
+
stone = 'var(--c-neutral-5)',
|
|
11
|
+
// Brightened compared to original to increase contrast
|
|
12
|
+
malibu = '#61afef',
|
|
13
|
+
sage = 'var(--c-success)',
|
|
14
|
+
whiskey = 'var(--c-warning-darken-5)',
|
|
15
|
+
violet = '#c678dd',
|
|
16
|
+
darkBackground = 'var(--c-neutral-1)',
|
|
17
|
+
highlightBackground = 'var(--c-neutral-2)',
|
|
18
|
+
background = 'var(--c-neutral-1)',
|
|
19
|
+
tooltipBackground = 'var(--c-neutral-2)',
|
|
20
|
+
selection = 'var(--c-neutral-3)',
|
|
21
|
+
cursor = 'var(--c-primary)';
|
|
22
|
+
/// The colors used in the theme, as CSS color strings.
|
|
23
|
+
const color = {
|
|
24
|
+
chalky,
|
|
25
|
+
coral,
|
|
26
|
+
cyan,
|
|
27
|
+
invalid,
|
|
28
|
+
ivory,
|
|
29
|
+
stone,
|
|
30
|
+
malibu,
|
|
31
|
+
sage,
|
|
32
|
+
whiskey,
|
|
33
|
+
violet,
|
|
34
|
+
darkBackground,
|
|
35
|
+
highlightBackground,
|
|
36
|
+
background,
|
|
37
|
+
tooltipBackground,
|
|
38
|
+
selection,
|
|
39
|
+
cursor
|
|
40
|
+
};
|
|
41
|
+
/// The editor theme styles for One Dark.
|
|
42
|
+
const orCodeTheme = EditorView.theme({
|
|
43
|
+
'&': {
|
|
44
|
+
color: ivory,
|
|
45
|
+
backgroundColor: background
|
|
46
|
+
},
|
|
47
|
+
'.cm-content': {
|
|
48
|
+
caretColor: cursor
|
|
49
|
+
},
|
|
50
|
+
'.cm-button': {
|
|
51
|
+
background: highlightBackground,
|
|
52
|
+
color: 'var(--c-neutral-6)',
|
|
53
|
+
border: 0,
|
|
54
|
+
borderRadius: 'var(--s-2)'
|
|
55
|
+
},
|
|
56
|
+
'.cm-panel.cm-search input[type=checkbox]': {
|
|
57
|
+
display: 'inline-block',
|
|
58
|
+
verticalAlign: 'middle'
|
|
59
|
+
},
|
|
60
|
+
'.cm-cursor, .cm-dropCursor': {
|
|
61
|
+
borderLeftColor: cursor
|
|
62
|
+
},
|
|
63
|
+
'&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection': {
|
|
64
|
+
backgroundColor: selection
|
|
65
|
+
},
|
|
66
|
+
'.cm-panels': {
|
|
67
|
+
backgroundColor: darkBackground,
|
|
68
|
+
color: ivory
|
|
69
|
+
},
|
|
70
|
+
'.cm-panels.cm-panels-top': {
|
|
71
|
+
borderBottom: '2px solid var(--c-neutral-2)'
|
|
72
|
+
},
|
|
73
|
+
'.cm-panels.cm-panels-bottom': {
|
|
74
|
+
borderTop: '2px solid var(--c-neutral-2)'
|
|
75
|
+
},
|
|
76
|
+
'.cm-searchMatch': {
|
|
77
|
+
backgroundColor: 'var(--c-neutral-1)',
|
|
78
|
+
outline: '1px solid var(--c-neutral-2)'
|
|
79
|
+
},
|
|
80
|
+
'.cm-searchMatch.cm-searchMatch-selected': {
|
|
81
|
+
backgroundColor: '#6199ff2f'
|
|
82
|
+
},
|
|
83
|
+
'.cm-activeLine': {
|
|
84
|
+
backgroundColor: '#6699ff0b'
|
|
85
|
+
},
|
|
86
|
+
'.cm-selectionMatch': {
|
|
87
|
+
backgroundColor: '#aafe661a'
|
|
88
|
+
},
|
|
89
|
+
'&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket': {
|
|
90
|
+
backgroundColor: '#bad0f847'
|
|
91
|
+
},
|
|
92
|
+
'.cm-gutters': {
|
|
93
|
+
backgroundColor: background,
|
|
94
|
+
color: stone,
|
|
95
|
+
border: 'none'
|
|
96
|
+
},
|
|
97
|
+
'.cm-activeLineGutter': {
|
|
98
|
+
backgroundColor: highlightBackground
|
|
99
|
+
},
|
|
100
|
+
'.cm-foldPlaceholder': {
|
|
101
|
+
backgroundColor: 'transparent',
|
|
102
|
+
border: 'none',
|
|
103
|
+
color: '#ddd'
|
|
104
|
+
},
|
|
105
|
+
'.cm-tooltip': {
|
|
106
|
+
border: 'none',
|
|
107
|
+
backgroundColor: tooltipBackground
|
|
108
|
+
},
|
|
109
|
+
'.cm-tooltip .cm-tooltip-arrow:before': {
|
|
110
|
+
borderTopColor: 'transparent',
|
|
111
|
+
borderBottomColor: 'transparent'
|
|
112
|
+
},
|
|
113
|
+
'.cm-tooltip .cm-tooltip-arrow:after': {
|
|
114
|
+
borderTopColor: tooltipBackground,
|
|
115
|
+
borderBottomColor: tooltipBackground
|
|
116
|
+
},
|
|
117
|
+
'.cm-tooltip-autocomplete': {
|
|
118
|
+
'& > ul > li[aria-selected]': {
|
|
119
|
+
backgroundColor: highlightBackground,
|
|
120
|
+
color: ivory
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
'.cm-textfield': {
|
|
124
|
+
outline: 'none',
|
|
125
|
+
background: background,
|
|
126
|
+
color: 'var(--c-neutral-6)',
|
|
127
|
+
backgroundColor: 'var(--c-neutral-1)',
|
|
128
|
+
border: '1px solid var(--c-neutral-2)',
|
|
129
|
+
borderRadius: 'var(--s-2)'
|
|
130
|
+
}
|
|
131
|
+
}, {
|
|
132
|
+
dark: true
|
|
133
|
+
});
|
|
134
|
+
/// The highlighting style for code in the One Dark theme.
|
|
135
|
+
const orCodeHighlightStyle = HighlightStyle.define([{
|
|
136
|
+
tag: tags.keyword,
|
|
137
|
+
color: violet
|
|
138
|
+
}, {
|
|
139
|
+
tag: [tags.name, tags.deleted, tags.character, tags.propertyName, tags.macroName],
|
|
140
|
+
color: coral
|
|
141
|
+
}, {
|
|
142
|
+
tag: [tags.function(tags.variableName), tags.labelName],
|
|
143
|
+
color: malibu
|
|
144
|
+
}, {
|
|
145
|
+
tag: [tags.color, tags.constant(tags.name), tags.standard(tags.name)],
|
|
146
|
+
color: whiskey
|
|
147
|
+
}, {
|
|
148
|
+
tag: [tags.definition(tags.name), tags.separator],
|
|
149
|
+
color: ivory
|
|
150
|
+
}, {
|
|
151
|
+
tag: [tags.typeName, tags.className, tags.number, tags.changed, tags.annotation, tags.modifier, tags.self, tags.namespace],
|
|
152
|
+
color: chalky
|
|
153
|
+
}, {
|
|
154
|
+
tag: [tags.operator, tags.operatorKeyword, tags.url, tags.escape, tags.regexp, tags.link, tags.special(tags.string)],
|
|
155
|
+
color: cyan
|
|
156
|
+
}, {
|
|
157
|
+
tag: [tags.meta, tags.comment],
|
|
158
|
+
color: stone
|
|
159
|
+
}, {
|
|
160
|
+
tag: tags.strong,
|
|
161
|
+
fontWeight: 'bold'
|
|
162
|
+
}, {
|
|
163
|
+
tag: tags.emphasis,
|
|
164
|
+
fontStyle: 'italic'
|
|
165
|
+
}, {
|
|
166
|
+
tag: tags.strikethrough,
|
|
167
|
+
textDecoration: 'line-through'
|
|
168
|
+
}, {
|
|
169
|
+
tag: tags.link,
|
|
170
|
+
color: stone,
|
|
171
|
+
textDecoration: 'underline'
|
|
172
|
+
}, {
|
|
173
|
+
tag: tags.heading,
|
|
174
|
+
fontWeight: 'bold',
|
|
175
|
+
color: coral
|
|
176
|
+
}, {
|
|
177
|
+
tag: [tags.atom, tags.bool, tags.special(tags.variableName)],
|
|
178
|
+
color: whiskey
|
|
179
|
+
}, {
|
|
180
|
+
tag: [tags.processingInstruction, tags.string, tags.inserted],
|
|
181
|
+
color: sage
|
|
182
|
+
}, {
|
|
183
|
+
tag: tags.invalid,
|
|
184
|
+
color: invalid
|
|
185
|
+
}]);
|
|
186
|
+
/// Extension to enable the One Dark theme (both the editor theme and
|
|
187
|
+
/// the highlight style).
|
|
188
|
+
const theme = [orCodeTheme, syntaxHighlighting(orCodeHighlightStyle)];
|
|
189
|
+
|
|
190
|
+
export { color, theme as default, orCodeHighlightStyle, orCodeTheme };
|
|
@@ -194,11 +194,10 @@ import './OrCardV3/styles.js';
|
|
|
194
194
|
import './OrCarousel/constants.js';
|
|
195
195
|
import './OrCheckboxV3/styles.js';
|
|
196
196
|
import './OrChips/constants.js';
|
|
197
|
-
import '../index-
|
|
197
|
+
import '../index-f5487f12.js';
|
|
198
198
|
import '../index.es-3f39f316.js';
|
|
199
|
-
import '../index-
|
|
200
|
-
import '../index-
|
|
201
|
-
import '../index-db5e8c99.js';
|
|
199
|
+
import '../index-16aee5bc.js';
|
|
200
|
+
import '../index-70ca38c5.js';
|
|
202
201
|
import './OrCode/lang.js';
|
|
203
202
|
import './OrCode/theme.js';
|
|
204
203
|
import './OrColorPicker/utils/defultPalette.js';
|
|
@@ -246,3 +245,4 @@ import '../tiptap-core.esm-f85402b1.js';
|
|
|
246
245
|
import './OrRichTextEditorV3/styles.js';
|
|
247
246
|
import './OrRichTextEditorV3/utils/codemirror/codemirrorNode.js';
|
|
248
247
|
import './OrRichTextEditorV3/utils/codemirror/codemirrorView.js';
|
|
248
|
+
import './OrRichTextEditorV3/utils/codemirror/theme.js';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { E as EditorView, F as Facet, c as combineConfig, S as StateField, b as EditorSelection, T as Transaction, C as ChangeSet, d as ChangeDesc, e as Text, f as countColumn, A as Annotation,
|
|
2
|
-
import {
|
|
3
|
-
import { c as closeBrackets, a as autocompletion, b as closeBracketsKeymap, d as completionKeymap } from './index-db5e8c99.js';
|
|
1
|
+
import { E as EditorView, F as Facet, c as combineConfig, S as StateField, b as EditorSelection, T as Transaction, C as ChangeSet, d as ChangeDesc, I as IndentContext, g as getIndentation, i as indentString, e as Text, f as indentUnit, h as countColumn, j as getIndentUnit, A as Annotation, l as StateEffect, m as matchBrackets, s as syntaxTree, N as NodeProp, D as Direction, n as findClusterBreak, V as ViewPlugin, o as Decoration, p as codePointAt, q as codePointSize, r as getPanel, t as CharCategory, P as Prec, u as fromCodePoint, v as showPanel, R as RangeSetBuilder, a as EditorState, w as runScopeHandlers, x as hoverTooltip, W as WidgetType, y as logException, z as lineNumbers, B as highlightActiveLineGutter, G as highlightSpecialChars, H as foldGutter, J as drawSelection, K as dropCursor, L as indentOnInput, M as syntaxHighlighting, O as defaultHighlightStyle, Q as bracketMatching, U as rectangularSelection, X as crosshairCursor, Y as highlightActiveLine, k as keymap, Z as foldKeymap } from './index-f5487f12.js';
|
|
2
|
+
import { c as closeBrackets, a as autocompletion, b as closeBracketsKeymap, d as completionKeymap } from './index-70ca38c5.js';
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
Comment or uncomment the current selection. Will use line comments
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { s as syntaxTree,
|
|
2
|
-
import { E as EditorView, l as codePointSize, j as codePointAt, b as EditorSelection, n as CharCategory, P as Prec, k as keymap, F as Facet, c as combineConfig, S as StateField, K as showTooltip, L as getTooltip, V as ViewPlugin, q as logException, g as StateEffect, M as MapMode, N as RangeValue, H as RangeSet, o as fromCodePoint, A as Annotation, e as Text, i as Decoration, D as Direction, W as WidgetType } from './index-c76372bb.js';
|
|
1
|
+
import { s as syntaxTree, E as EditorView, q as codePointSize, p as codePointAt, b as EditorSelection, t as CharCategory, P as Prec, k as keymap, F as Facet, c as combineConfig, S as StateField, ai as showTooltip, aj as getTooltip, V as ViewPlugin, y as logException, l as StateEffect, ak as MapMode, al as RangeValue, am as RangeSet, u as fromCodePoint, A as Annotation, e as Text, f as indentUnit, o as Decoration, D as Direction, W as WidgetType, a9 as Parser, a8 as NodeSet, a7 as NodeType, an as DefaultBufferLength, N as NodeProp, ab as Tree, ao as IterMode, _ as styleTags, $ as tags, a1 as LanguageSupport, a2 as LRLanguage, a3 as indentNodeProp, a4 as continuedIndent, ap as flatIndent, aq as delimitedIndent, a5 as foldNodeProp, a6 as foldInside, ar as NodeWeakMap } from './index-f5487f12.js';
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
An instance of this is passed to completion source functions.
|