@dxos/react-ui-editor 0.3.11-main.5c52a13 → 0.3.11-main.5cbcf4e
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 +23 -5
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/types/src/extensions/comments.d.ts +5 -1
- package/dist/types/src/extensions/comments.d.ts.map +1 -1
- package/package.json +24 -24
- package/src/components/TextEditor/MarkdownEditor.stories.tsx +2 -2
- package/src/components/Toolbar/Toolbar.stories.tsx +1 -1
- package/src/extensions/comments.ts +14 -4
- package/src/themes/default.ts +2 -2
|
@@ -1074,11 +1074,25 @@ var logChanges = (trs) => {
|
|
|
1074
1074
|
|
|
1075
1075
|
// packages/ui/react-ui-editor/src/extensions/comments.ts
|
|
1076
1076
|
var styles2 = EditorView5.baseTheme({
|
|
1077
|
-
"& .cm-comment": {
|
|
1077
|
+
"&light .cm-comment, &light .cm-comment-current": {
|
|
1078
|
+
mixBlendMode: "darken"
|
|
1079
|
+
},
|
|
1080
|
+
"&dark .cm-comment, &dark .cm-comment-current": {
|
|
1081
|
+
mixBlendMode: "plus-lighter"
|
|
1082
|
+
},
|
|
1083
|
+
"&light .cm-comment": {
|
|
1078
1084
|
backgroundColor: getToken("extend.colors.yellow.50")
|
|
1079
1085
|
},
|
|
1080
|
-
"& .cm-comment-current": {
|
|
1086
|
+
"&light .cm-comment-current": {
|
|
1081
1087
|
backgroundColor: getToken("extend.colors.yellow.100")
|
|
1088
|
+
},
|
|
1089
|
+
"&dark .cm-comment": {
|
|
1090
|
+
color: getToken("extend.colors.yellow.50"),
|
|
1091
|
+
backgroundColor: getToken("extend.colors.yellow.900")
|
|
1092
|
+
},
|
|
1093
|
+
"&dark .cm-comment-current": {
|
|
1094
|
+
color: getToken("extend.colors.yellow.100"),
|
|
1095
|
+
backgroundColor: getToken("extend.colors.yellow.950")
|
|
1082
1096
|
}
|
|
1083
1097
|
});
|
|
1084
1098
|
var commentMark = Decoration2.mark({
|
|
@@ -1287,7 +1301,11 @@ var createComment = (view) => {
|
|
|
1287
1301
|
to
|
|
1288
1302
|
});
|
|
1289
1303
|
if (cursor) {
|
|
1290
|
-
const id = options.onCreate?.(
|
|
1304
|
+
const id = options.onCreate?.({
|
|
1305
|
+
cursor,
|
|
1306
|
+
from,
|
|
1307
|
+
location: view.coordsAtPos(from)
|
|
1308
|
+
});
|
|
1291
1309
|
if (id) {
|
|
1292
1310
|
view.dispatch({
|
|
1293
1311
|
effects: setSelection.of({
|
|
@@ -2591,11 +2609,11 @@ var defaultTheme = {
|
|
|
2591
2609
|
fontSize: "16px"
|
|
2592
2610
|
},
|
|
2593
2611
|
"&light .cm-content": {
|
|
2594
|
-
color: get3(tokens, "extend.
|
|
2612
|
+
color: get3(tokens, "extend.semanticColors.base.fg.light", "black"),
|
|
2595
2613
|
caretColor: "black"
|
|
2596
2614
|
},
|
|
2597
2615
|
"&dark .cm-content": {
|
|
2598
|
-
color: get3(tokens, "extend.
|
|
2616
|
+
color: get3(tokens, "extend.semanticColors.base.fg.dark", "white"),
|
|
2599
2617
|
caretColor: "white"
|
|
2600
2618
|
},
|
|
2601
2619
|
//
|