@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.
@@ -2,7 +2,9 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import { describe, expect, test } from 'vitest';
5
+ import { expect } from 'chai';
6
+
7
+ import { describe, test } from '@dxos/test';
6
8
 
7
9
  import { createLinkLabel } from './changes';
8
10
 
@@ -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 { describe, expect, test } from 'vitest';
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
- import { describe, test } from 'vitest';
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<Decoration>>({
28
+ return StateField.define<RangeSet<any>>({
29
29
  create: (state) => update(state, options),
30
- update: (_: RangeSet<Decoration>, tr: Transaction) => update(tr.state, options),
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<Decoration>();
43
+ const builder = new RangeSetBuilder();
44
44
  const cursor = state.selection.main.head;
45
45
 
46
46
  const tables: Table[] = [];
@@ -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-cmActiveLine)',
98
+ background: 'var(--dx-hoverSurface)',
100
99
  },
101
100
 
102
101
  /**