@dxos/react-ui-editor 0.6.12-main.f9d0246 → 0.6.12-staging.0b4bb48
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 +2 -3
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/types/src/TextEditor.stories.d.ts +1 -1
- package/dist/types/src/TextEditor.stories.d.ts.map +1 -1
- package/dist/types/src/defaults.d.ts.map +1 -1
- package/dist/types/src/extensions/automerge/automerge.spec.d.ts +2 -0
- package/dist/types/src/extensions/automerge/automerge.spec.d.ts.map +1 -0
- package/dist/types/src/extensions/automerge/automerge.test.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/formatting.test.d.ts.map +1 -1
- package/dist/types/src/styles/theme.d.ts.map +1 -1
- package/package.json +27 -32
- package/src/TextEditor.stories.tsx +12 -13
- package/src/defaults.ts +2 -0
- package/src/extensions/automerge/{automerge.test.tsx → automerge.spec.tsx} +0 -1
- package/src/extensions/automerge/automerge.test.ts +13 -0
- package/src/extensions/automerge/automerge.ts +1 -1
- package/src/extensions/markdown/changes.test.ts +3 -1
- package/src/extensions/markdown/formatting.test.ts +3 -1
- package/src/extensions/markdown/parser.test.ts +2 -1
- package/src/extensions/markdown/table.ts +3 -3
- package/src/styles/theme.ts +1 -2
@@ -4,7 +4,9 @@
|
|
4
4
|
|
5
5
|
import { markdownLanguage } from '@codemirror/lang-markdown';
|
6
6
|
import { EditorState, type StateCommand } from '@codemirror/state';
|
7
|
-
import {
|
7
|
+
import { expect } from 'chai';
|
8
|
+
|
9
|
+
import { describe, test } from '@dxos/test';
|
8
10
|
|
9
11
|
import {
|
10
12
|
addBlockquote,
|
@@ -5,7 +5,8 @@
|
|
5
5
|
// @ts-ignore
|
6
6
|
import { testTree } from '@lezer/generator/test';
|
7
7
|
import { parser } from '@lezer/markdown';
|
8
|
-
|
8
|
+
|
9
|
+
import { describe, test } from '@dxos/test';
|
9
10
|
|
10
11
|
describe('parser', () => {
|
11
12
|
// test.only('list-mark', () => {
|
@@ -25,9 +25,9 @@ export type TableOptions = {};
|
|
25
25
|
* https://github.github.com/gfm/#tables-extension
|
26
26
|
*/
|
27
27
|
export const table = (options: TableOptions = {}): Extension => {
|
28
|
-
return StateField.define<RangeSet<
|
28
|
+
return StateField.define<RangeSet<any>>({
|
29
29
|
create: (state) => update(state, options),
|
30
|
-
update: (_: RangeSet<
|
30
|
+
update: (_: RangeSet<any>, tr: Transaction) => update(tr.state, options),
|
31
31
|
provide: (field) => EditorView.decorations.from(field),
|
32
32
|
});
|
33
33
|
};
|
@@ -40,7 +40,7 @@ type Table = {
|
|
40
40
|
};
|
41
41
|
|
42
42
|
const update = (state: EditorState, _options: TableOptions) => {
|
43
|
-
const builder = new RangeSetBuilder
|
43
|
+
const builder = new RangeSetBuilder();
|
44
44
|
const cursor = state.selection.main.head;
|
45
45
|
|
46
46
|
const tables: Table[] = [];
|
package/src/styles/theme.ts
CHANGED
@@ -74,7 +74,6 @@ export const defaultTheme: ThemeStyles = {
|
|
74
74
|
*/
|
75
75
|
'.cm-gutters': {
|
76
76
|
background: 'var(--surface-bg)',
|
77
|
-
borderRight: 'none',
|
78
77
|
},
|
79
78
|
'.cm-gutter': {},
|
80
79
|
'.cm-gutter.cm-lineNumbers .cm-gutterElement': {
|
@@ -96,7 +95,7 @@ export const defaultTheme: ThemeStyles = {
|
|
96
95
|
paddingInline: 0,
|
97
96
|
},
|
98
97
|
'.cm-activeLine': {
|
99
|
-
background: 'var(--dx-
|
98
|
+
background: 'var(--dx-hoverSurface)',
|
100
99
|
},
|
101
100
|
|
102
101
|
/**
|