@dxos/react-ui-editor 0.3.11-main.dafb7f2 → 0.3.11-main.e716c43
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 +50 -55
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/types/src/components/TextEditor/MarkdownEditor.stories.d.ts +3 -3
- package/dist/types/src/components/TextEditor/MarkdownEditor.stories.d.ts.map +1 -1
- package/dist/types/src/extensions/code.d.ts.map +1 -1
- package/dist/types/src/extensions/comments.d.ts.map +1 -1
- package/dist/types/src/extensions/hr.d.ts.map +1 -1
- package/dist/types/src/extensions/index.d.ts +0 -1
- package/dist/types/src/extensions/index.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/highlight.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/styles/tokens.d.ts +1 -0
- package/dist/types/src/styles/tokens.d.ts.map +1 -1
- package/package.json +22 -22
- package/src/components/TextEditor/MarkdownEditor.stories.tsx +6 -7
- package/src/extensions/code.ts +4 -5
- package/src/extensions/comments.ts +4 -5
- package/src/extensions/hr.ts +2 -3
- package/src/extensions/index.ts +0 -1
- package/src/extensions/link.ts +1 -1
- package/src/extensions/markdown/highlight.ts +3 -4
- package/src/extensions/table.ts +4 -1
- package/src/index.ts +1 -0
- package/src/styles/tokens.ts +3 -0
- package/dist/types/src/extensions/mermaid.d.ts +0 -3
- package/dist/types/src/extensions/mermaid.d.ts.map +0 -1
- package/src/extensions/mermaid.ts +0 -11
package/src/extensions/table.ts
CHANGED
|
@@ -81,7 +81,6 @@ const update = (state: EditorState, options: TableOptions) => {
|
|
|
81
81
|
table.from,
|
|
82
82
|
table.to,
|
|
83
83
|
Decoration.replace({
|
|
84
|
-
block: true,
|
|
85
84
|
widget: new TableWidget(table),
|
|
86
85
|
}),
|
|
87
86
|
);
|
|
@@ -132,4 +131,8 @@ class TableWidget extends WidgetType {
|
|
|
132
131
|
|
|
133
132
|
return table;
|
|
134
133
|
}
|
|
134
|
+
|
|
135
|
+
override ignoreEvent(e: Event) {
|
|
136
|
+
return !/^mouse/.test(e.type);
|
|
137
|
+
}
|
|
135
138
|
}
|
package/src/index.ts
CHANGED
package/src/styles/tokens.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import get from 'lodash.get';
|
|
5
6
|
import type { StyleSpec } from 'style-mod';
|
|
6
7
|
|
|
7
8
|
import { tailwindConfig, type TailwindConfig } from '@dxos/react-ui-theme';
|
|
@@ -12,3 +13,5 @@ export type ThemeStyles = {
|
|
|
12
13
|
|
|
13
14
|
// TODO(thure): Why export the whole theme? Can this be done differently?
|
|
14
15
|
export const tokens: TailwindConfig['theme'] = tailwindConfig({}).theme;
|
|
16
|
+
|
|
17
|
+
export const getToken = (path: string, defaultValue: any = undefined) => get(tokens, path, defaultValue);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mermaid.d.ts","sourceRoot":"","sources":["../../../../src/extensions/mermaid.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAInD,eAAO,MAAM,OAAO,QAAO,SAE1B,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2024 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { type Extension } from '@codemirror/state';
|
|
6
|
-
|
|
7
|
-
// TODO(burdon): How will this interact with the code extension?
|
|
8
|
-
// TODO(burdon): Move to mermaid-plugin (which should contribute this extension).
|
|
9
|
-
export const mermaid = (): Extension => {
|
|
10
|
-
return [];
|
|
11
|
-
};
|