@dxos/react-ui-editor 0.6.7-staging.1976059 → 0.6.7-staging.e9eb1ed
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/lib/browser/index.mjs +8 -20
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.d.ts +8 -8
- package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts +10 -13
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts.map +1 -1
- package/dist/types/src/extensions/automerge/automerge.stories.d.ts +4 -6
- package/dist/types/src/extensions/automerge/automerge.stories.d.ts.map +1 -1
- package/dist/types/src/extensions/automerge/defs.d.ts.map +1 -1
- package/dist/types/src/extensions/automerge/update-automerge.d.ts.map +1 -1
- package/dist/types/src/extensions/blast.d.ts.map +1 -1
- package/dist/types/src/extensions/command/state.d.ts +1 -1
- package/dist/types/src/extensions/command/state.d.ts.map +1 -1
- package/dist/types/src/extensions/comments.d.ts.map +1 -1
- package/dist/types/src/extensions/factories.d.ts.map +1 -1
- package/dist/types/src/extensions/state.d.ts.map +1 -1
- package/dist/types/src/hooks/InputMode.stories.d.ts +3 -5
- package/dist/types/src/hooks/InputMode.stories.d.ts.map +1 -1
- package/dist/types/src/hooks/TextEditor.stories.d.ts +24 -26
- package/dist/types/src/hooks/TextEditor.stories.d.ts.map +1 -1
- package/dist/types/src/hooks/useActionHandler.d.ts +1 -1
- package/dist/types/src/hooks/useTextEditor.d.ts.map +1 -1
- package/dist/types/src/themes/default.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +0 -2
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/util.d.ts.map +1 -1
- package/package.json +27 -27
- package/src/components/Toolbar/Toolbar.tsx +1 -9
- package/src/extensions/automerge/automerge.stories.tsx +1 -1
- package/src/extensions/comments.ts +0 -4
- package/src/themes/default.ts +7 -11
- package/src/translations.ts +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import '@dxosTheme';
|
|
2
|
-
import React from 'react';
|
|
3
3
|
import { type UseTextEditorProps } from './useTextEditor';
|
|
4
4
|
type StoryProps = {
|
|
5
5
|
id?: string;
|
|
@@ -10,7 +10,7 @@ type StoryProps = {
|
|
|
10
10
|
declare const _default: {
|
|
11
11
|
title: string;
|
|
12
12
|
decorators: import("@storybook/react/*").Decorator[];
|
|
13
|
-
render: ({ id, text, extensions: _extensions, readonly, placeholder, selection, }: StoryProps) =>
|
|
13
|
+
render: ({ id, text, extensions: _extensions, readonly, placeholder, selection, }: StoryProps) => JSX.Element;
|
|
14
14
|
parameters: {
|
|
15
15
|
translations: {
|
|
16
16
|
'en-US': {
|
|
@@ -26,8 +26,6 @@ declare const _default: {
|
|
|
26
26
|
'blockquote label': string;
|
|
27
27
|
'codeblock label': string;
|
|
28
28
|
'comment label': string;
|
|
29
|
-
'selection overlaps existing comment label': string;
|
|
30
|
-
'select text to comment label': string;
|
|
31
29
|
'image label': string;
|
|
32
30
|
'heading label': string;
|
|
33
31
|
'table label': string;
|
|
@@ -46,69 +44,69 @@ declare const _default: {
|
|
|
46
44
|
};
|
|
47
45
|
export default _default;
|
|
48
46
|
export declare const Default: {
|
|
49
|
-
render: () =>
|
|
47
|
+
render: () => JSX.Element;
|
|
50
48
|
};
|
|
51
49
|
export declare const Readonly: {
|
|
52
|
-
render: () =>
|
|
50
|
+
render: () => JSX.Element;
|
|
53
51
|
};
|
|
54
52
|
export declare const NoExtensions: {
|
|
55
|
-
render: () =>
|
|
53
|
+
render: () => JSX.Element;
|
|
56
54
|
};
|
|
57
55
|
export declare const Empty: {
|
|
58
|
-
render: () =>
|
|
56
|
+
render: () => JSX.Element;
|
|
59
57
|
};
|
|
60
58
|
export declare const Scrolling: {
|
|
61
|
-
render: () =>
|
|
59
|
+
render: () => JSX.Element;
|
|
62
60
|
};
|
|
63
61
|
export declare const ScrollingWithImages: {
|
|
64
|
-
render: () =>
|
|
62
|
+
render: () => JSX.Element;
|
|
65
63
|
};
|
|
66
64
|
export declare const Links: {
|
|
67
|
-
render: () =>
|
|
65
|
+
render: () => JSX.Element;
|
|
68
66
|
};
|
|
69
67
|
export declare const Image: {
|
|
70
|
-
render: () =>
|
|
68
|
+
render: () => JSX.Element;
|
|
71
69
|
};
|
|
72
70
|
export declare const Code: {
|
|
73
|
-
render: () =>
|
|
71
|
+
render: () => JSX.Element;
|
|
74
72
|
};
|
|
75
73
|
export declare const Lists: {
|
|
76
|
-
render: () =>
|
|
74
|
+
render: () => JSX.Element;
|
|
77
75
|
};
|
|
78
76
|
export declare const Table: {
|
|
79
|
-
render: () =>
|
|
77
|
+
render: () => JSX.Element;
|
|
80
78
|
};
|
|
81
79
|
export declare const Autocomplete: {
|
|
82
|
-
render: () =>
|
|
80
|
+
render: () => JSX.Element;
|
|
83
81
|
};
|
|
84
82
|
export declare const CommentedOut: {
|
|
85
|
-
render: () =>
|
|
83
|
+
render: () => JSX.Element;
|
|
86
84
|
};
|
|
87
85
|
export declare const Mention: {
|
|
88
|
-
render: () =>
|
|
86
|
+
render: () => JSX.Element;
|
|
89
87
|
};
|
|
90
88
|
export declare const Command: {
|
|
91
|
-
render: () =>
|
|
89
|
+
render: () => JSX.Element;
|
|
92
90
|
};
|
|
93
91
|
export declare const Comments: {
|
|
94
|
-
render: () =>
|
|
92
|
+
render: () => JSX.Element;
|
|
95
93
|
};
|
|
96
94
|
export declare const Vim: {
|
|
97
|
-
render: () =>
|
|
95
|
+
render: () => JSX.Element;
|
|
98
96
|
};
|
|
99
97
|
export declare const Annotations: {
|
|
100
|
-
render: () =>
|
|
98
|
+
render: () => JSX.Element;
|
|
101
99
|
};
|
|
102
100
|
export declare const DND: {
|
|
103
|
-
render: () =>
|
|
101
|
+
render: () => JSX.Element;
|
|
104
102
|
};
|
|
105
103
|
export declare const Listener: {
|
|
106
|
-
render: () =>
|
|
104
|
+
render: () => JSX.Element;
|
|
107
105
|
};
|
|
108
106
|
export declare const Typewriter: {
|
|
109
|
-
render: () =>
|
|
107
|
+
render: () => JSX.Element;
|
|
110
108
|
};
|
|
111
109
|
export declare const Blast: {
|
|
112
|
-
render: () =>
|
|
110
|
+
render: () => JSX.Element;
|
|
113
111
|
};
|
|
114
112
|
//# sourceMappingURL=TextEditor.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextEditor.stories.d.ts","sourceRoot":"","sources":["../../../../src/hooks/TextEditor.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"TextEditor.stories.d.ts","sourceRoot":"","sources":["../../../../src/hooks/TextEditor.stories.tsx"],"names":[],"mappings":";AAIA,OAAO,YAAY,CAAC;AAmBpB,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AA0NzE,KAAK,UAAU,GAAG;IAChB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,IAAI,CAAC,kBAAkB,EAAE,WAAW,GAAG,YAAY,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCzD,wBAKE;AAeF,eAAO,MAAM,OAAO;;CAEnB,CAAC;AAEF,eAAO,MAAM,QAAQ;;CAEpB,CAAC;AAEF,eAAO,MAAM,YAAY;;CAExB,CAAC;AASF,eAAO,MAAM,KAAK;;CAEjB,CAAC;AAIF,eAAO,MAAM,SAAS;;CAUrB,CAAC;AAEF,eAAO,MAAM,mBAAmB;;CAE/B,CAAC;AAEF,eAAO,MAAM,KAAK;;CAEjB,CAAC;AAEF,eAAO,MAAM,KAAK;;CAEjB,CAAC;AAEF,eAAO,MAAM,IAAI;;CAEhB,CAAC;AAEF,eAAO,MAAM,KAAK;;CAIjB,CAAC;AAEF,eAAO,MAAM,KAAK;;CAEjB,CAAC;AAEF,eAAO,MAAM,YAAY;;CAYxB,CAAC;AAEF,eAAO,MAAM,YAAY;;CAWxB,CAAC;AAEF,eAAO,MAAM,OAAO;;CAWnB,CAAC;AAmDF,eAAO,MAAM,OAAO;;CAOnB,CAAC;AAEF,eAAO,MAAM,QAAQ;;CAsCpB,CAAC;AAEF,eAAO,MAAM,GAAG;;CAOf,CAAC;AAEF,eAAO,MAAM,WAAW;;CAEvB,CAAC;AAEF,eAAO,MAAM,GAAG;;CAaf,CAAC;AAIF,eAAO,MAAM,QAAQ;;CAgBpB,CAAC;AAEF,eAAO,MAAM,UAAU;;CAOtB,CAAC;AAEF,eAAO,MAAM,KAAK;;CAqBjB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type EditorView } from '@codemirror/view';
|
|
2
2
|
import { type ToolbarProps } from '../components';
|
|
3
|
-
export declare const useActionHandler: (view?: EditorView | null) => ToolbarProps[
|
|
3
|
+
export declare const useActionHandler: (view?: EditorView | null) => ToolbarProps['onAction'];
|
|
4
4
|
//# sourceMappingURL=useActionHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTextEditor.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useTextEditor.ts"],"names":[],"mappings":"AAIA,OAAO,EAAe,KAAK,iBAAiB,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC1F,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAIf,OAAO,EAAc,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAK5D,MAAM,MAAM,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AACH,eAAO,MAAM,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../../src/themes/default.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,WAAW,EAAU,MAAM,WAAW,CAAC;AAKrD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,EAAE,WAgR1B,CAAC"}
|
|
@@ -13,8 +13,6 @@ declare const _default: {
|
|
|
13
13
|
'blockquote label': string;
|
|
14
14
|
'codeblock label': string;
|
|
15
15
|
'comment label': string;
|
|
16
|
-
'selection overlaps existing comment label': string;
|
|
17
|
-
'select text to comment label': string;
|
|
18
16
|
'image label': string;
|
|
19
17
|
'heading label': string;
|
|
20
18
|
'table label': string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc,oBAAoB,CAAC
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc,oBAAoB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEhD,wBA4BE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/util.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD;;GAEG;AAEH,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/util.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD;;GAEG;AAEH,eAAO,MAAM,eAAe,2BAA4B,CAAC,KAAG,CAOxC,CAAC;AAErB,eAAO,MAAM,UAAU,QAAS,SAAS,WAAW,EAAE,SAmBrD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/react-ui-editor",
|
|
3
|
-
"version": "0.6.7-staging.
|
|
3
|
+
"version": "0.6.7-staging.e9eb1ed",
|
|
4
4
|
"description": "Document editing experience within a DXOS shell.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -47,19 +47,19 @@
|
|
|
47
47
|
"lodash.sortby": "^4.7.0",
|
|
48
48
|
"react-dropzone": "^14.2.3",
|
|
49
49
|
"style-mod": "^4.1.0",
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/context": "0.6.7-staging.
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/react-async": "0.6.7-staging.
|
|
60
|
-
"@dxos/react-ui": "0.6.7-staging.
|
|
61
|
-
"@dxos/react-ui-theme": "0.6.7-staging.
|
|
62
|
-
"@dxos/util": "0.6.7-staging.
|
|
50
|
+
"@dxos/automerge": "0.6.7-staging.e9eb1ed",
|
|
51
|
+
"@dxos/context": "0.6.7-staging.e9eb1ed",
|
|
52
|
+
"@dxos/async": "0.6.7-staging.e9eb1ed",
|
|
53
|
+
"@dxos/display-name": "0.6.7-staging.e9eb1ed",
|
|
54
|
+
"@dxos/echo-schema": "0.6.7-staging.e9eb1ed",
|
|
55
|
+
"@dxos/debug": "0.6.7-staging.e9eb1ed",
|
|
56
|
+
"@dxos/invariant": "0.6.7-staging.e9eb1ed",
|
|
57
|
+
"@dxos/protocols": "0.6.7-staging.e9eb1ed",
|
|
58
|
+
"@dxos/log": "0.6.7-staging.e9eb1ed",
|
|
59
|
+
"@dxos/react-async": "0.6.7-staging.e9eb1ed",
|
|
60
|
+
"@dxos/react-ui": "0.6.7-staging.e9eb1ed",
|
|
61
|
+
"@dxos/react-ui-theme": "0.6.7-staging.e9eb1ed",
|
|
62
|
+
"@dxos/util": "0.6.7-staging.e9eb1ed"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@phosphor-icons/react": "^2.1.5",
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
"@types/lodash.get": "^4.4.7",
|
|
72
72
|
"@types/lodash.pick": "^4.4.7",
|
|
73
73
|
"@types/lodash.sortby": "^4.7.7",
|
|
74
|
-
"@types/react": "
|
|
75
|
-
"@types/react-dom": "
|
|
74
|
+
"@types/react": "^18.0.21",
|
|
75
|
+
"@types/react-dom": "^18.0.6",
|
|
76
76
|
"@types/react-test-renderer": "^17.0.2",
|
|
77
77
|
"@vitest/browser": "^1.5.0",
|
|
78
78
|
"@vitest/ui": "^1.5.0",
|
|
@@ -85,22 +85,22 @@
|
|
|
85
85
|
"vite-plugin-top-level-await": "^1.4.1",
|
|
86
86
|
"vite-plugin-wasm": "^3.3.0",
|
|
87
87
|
"vitest": "^1.5.0",
|
|
88
|
-
"@
|
|
89
|
-
"@
|
|
90
|
-
"@dxos/config": "0.6.7-staging.
|
|
91
|
-
"@dxos/echo-
|
|
92
|
-
"@dxos/
|
|
93
|
-
"@dxos/
|
|
94
|
-
"@dxos/random": "0.6.7-staging.
|
|
95
|
-
"@dxos/react-ui": "0.6.7-staging.
|
|
96
|
-
"@dxos/react-client": "0.6.7-staging.
|
|
97
|
-
"@dxos/storybook-utils": "0.6.7-staging.
|
|
88
|
+
"@braneframe/types": "0.6.7-staging.e9eb1ed",
|
|
89
|
+
"@dxos/automerge": "0.6.7-staging.e9eb1ed",
|
|
90
|
+
"@dxos/config": "0.6.7-staging.e9eb1ed",
|
|
91
|
+
"@dxos/echo-typegen": "0.6.7-staging.e9eb1ed",
|
|
92
|
+
"@dxos/keyboard": "0.6.7-staging.e9eb1ed",
|
|
93
|
+
"@dxos/echo-signals": "0.6.7-staging.e9eb1ed",
|
|
94
|
+
"@dxos/random": "0.6.7-staging.e9eb1ed",
|
|
95
|
+
"@dxos/react-ui": "0.6.7-staging.e9eb1ed",
|
|
96
|
+
"@dxos/react-client": "0.6.7-staging.e9eb1ed",
|
|
97
|
+
"@dxos/storybook-utils": "0.6.7-staging.e9eb1ed"
|
|
98
98
|
},
|
|
99
99
|
"peerDependencies": {
|
|
100
100
|
"@phosphor-icons/react": "^2.1.5",
|
|
101
101
|
"react": "^18.0.0",
|
|
102
102
|
"react-dom": "^18.0.0",
|
|
103
|
-
"@dxos/react-client": "0.6.7-staging.
|
|
103
|
+
"@dxos/react-client": "0.6.7-staging.e9eb1ed"
|
|
104
104
|
},
|
|
105
105
|
"publishConfig": {
|
|
106
106
|
"access": "public"
|
|
@@ -482,14 +482,6 @@ const MarkdownCustom = ({ onUpload }: MarkdownCustomOptions = {}) => {
|
|
|
482
482
|
const MarkdownActions = () => {
|
|
483
483
|
const { onAction, state } = useToolbarContext('MarkdownActions');
|
|
484
484
|
const { t } = useTranslation(translationKey);
|
|
485
|
-
|
|
486
|
-
let toolTipKey = 'comment label';
|
|
487
|
-
if (state?.comment) {
|
|
488
|
-
toolTipKey = 'selection overlaps existing comment label';
|
|
489
|
-
} else if (state?.selection === false) {
|
|
490
|
-
toolTipKey = 'select text to comment label';
|
|
491
|
-
}
|
|
492
|
-
|
|
493
485
|
return (
|
|
494
486
|
<>
|
|
495
487
|
{/* TODO(burdon): Toggle readonly state. */}
|
|
@@ -503,7 +495,7 @@ const MarkdownActions = () => {
|
|
|
503
495
|
onClick={() => onAction?.({ type: 'comment' })}
|
|
504
496
|
disabled={!state || state.comment || !state.selection}
|
|
505
497
|
>
|
|
506
|
-
{t(
|
|
498
|
+
{t('comment label')}
|
|
507
499
|
</ToolbarButton>
|
|
508
500
|
</>
|
|
509
501
|
);
|
|
@@ -10,7 +10,7 @@ import React, { useEffect, useState } from 'react';
|
|
|
10
10
|
import { TextType } from '@braneframe/types';
|
|
11
11
|
import { Repo } from '@dxos/automerge/automerge-repo';
|
|
12
12
|
import { BroadcastChannelNetworkAdapter } from '@dxos/automerge/automerge-repo-network-broadcastchannel';
|
|
13
|
-
import { type Expando
|
|
13
|
+
import { create, type Expando } from '@dxos/echo-schema';
|
|
14
14
|
import { type PublicKey } from '@dxos/keys';
|
|
15
15
|
import { Filter, DocAccessor, createDocAccessor, useSpace, useQuery, type Space } from '@dxos/react-client/echo';
|
|
16
16
|
import { useIdentity, type Identity } from '@dxos/react-client/halo';
|
|
@@ -611,10 +611,6 @@ const hasActiveSelection = (state: EditorState): boolean => {
|
|
|
611
611
|
return state.selection.ranges.some((range) => !range.empty);
|
|
612
612
|
};
|
|
613
613
|
|
|
614
|
-
/**
|
|
615
|
-
* Manages external comment synchronization for the editor.
|
|
616
|
-
* This class subscribes to external comment updates and applies them to the editor view.
|
|
617
|
-
*/
|
|
618
614
|
class ExternalCommentSync implements PluginValue {
|
|
619
615
|
private readonly unsubscribe: () => void;
|
|
620
616
|
|
package/src/themes/default.ts
CHANGED
|
@@ -150,7 +150,9 @@ export const defaultTheme: ThemeStyles = {
|
|
|
150
150
|
//
|
|
151
151
|
// tooltip
|
|
152
152
|
//
|
|
153
|
-
'.cm-tooltip': {
|
|
153
|
+
'.cm-tooltip': {
|
|
154
|
+
border: 'none',
|
|
155
|
+
},
|
|
154
156
|
'&light .cm-tooltip': {
|
|
155
157
|
background: `${get(tokens, 'extend.colors.neutral.100')} !important`,
|
|
156
158
|
},
|
|
@@ -163,27 +165,21 @@ export const defaultTheme: ThemeStyles = {
|
|
|
163
165
|
// autocomplete
|
|
164
166
|
// https://github.com/codemirror/autocomplete/blob/main/src/completion.ts
|
|
165
167
|
//
|
|
166
|
-
'.cm-tooltip
|
|
168
|
+
'.cm-tooltip-autocomplete': {
|
|
167
169
|
marginTop: '4px',
|
|
168
170
|
marginLeft: '-3px',
|
|
169
171
|
},
|
|
170
|
-
'.cm-tooltip
|
|
172
|
+
'.cm-tooltip-autocomplete > ul': {
|
|
171
173
|
maxHeight: '20em !important',
|
|
172
174
|
},
|
|
173
|
-
'.cm-tooltip
|
|
174
|
-
'.cm-tooltip
|
|
175
|
+
'.cm-tooltip-autocomplete > ul > li': {},
|
|
176
|
+
'.cm-tooltip-autocomplete > ul > li[aria-selected]': {},
|
|
175
177
|
// TODO(burdon): Can we add a class prefix to avoid adding !important?
|
|
176
178
|
'.cm-tooltip.cm-tooltip-autocomplete > ul > completion-section': {
|
|
177
179
|
paddingLeft: '4px !important',
|
|
178
180
|
borderBottom: 'none !important',
|
|
179
181
|
color: get(tokens, 'extend.colors.primary.500'),
|
|
180
182
|
},
|
|
181
|
-
'.cm-tooltip.cm-completionInfo': {
|
|
182
|
-
border: get(tokens, 'extend.colors.neutral.500'),
|
|
183
|
-
width: '360px !important',
|
|
184
|
-
margin: '-10px 1px 0 1px',
|
|
185
|
-
padding: '8px !important',
|
|
186
|
-
},
|
|
187
183
|
'.cm-completionIcon': {
|
|
188
184
|
display: 'none',
|
|
189
185
|
},
|
package/src/translations.ts
CHANGED
|
@@ -19,8 +19,6 @@ export default [
|
|
|
19
19
|
'blockquote label': 'Block quote',
|
|
20
20
|
'codeblock label': 'Code block',
|
|
21
21
|
'comment label': 'Create comment',
|
|
22
|
-
'selection overlaps existing comment label': 'Selection overlaps existing comment',
|
|
23
|
-
'select text to comment label': 'Select text to comment',
|
|
24
22
|
'image label': 'Insert image',
|
|
25
23
|
'heading label': 'Heading level',
|
|
26
24
|
'table label': 'Create table',
|