@adecore/editor-react 0.41.1 → 0.42.0
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/EditorView.js +7 -1
- package/dist/shortcut-keys.d.ts +8 -0
- package/package.json +6 -6
- package/src/EditorView.tsx +9 -0
package/dist/EditorView.js
CHANGED
|
@@ -2,7 +2,7 @@ import { c as _c } from "react/compiler-runtime";
|
|
|
2
2
|
import { createHolder } from './holder.js';
|
|
3
3
|
import { useLayoutEffect, useMemo, useRef, useSyncExternalStore } from 'react';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import { DEFAULT_SMART_KEYS } from '@adecore/editor';
|
|
5
|
+
import { DEFAULT_SMART_KEYS, DEFAULT_TODO_WORDS } from '@adecore/editor';
|
|
6
6
|
import { EditorLanguage } from './editor-language.js';
|
|
7
7
|
import { LanguagePopups } from "./LanguagePopups.js";
|
|
8
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -70,6 +70,12 @@ function applyChangedOptions(editor, before, after) {
|
|
|
70
70
|
if (after.label !== undefined && before.label !== after.label) {
|
|
71
71
|
editor.setLabel(after.label);
|
|
72
72
|
}
|
|
73
|
+
if (before.fontSize !== after.fontSize) {
|
|
74
|
+
editor.setFontSize?.(after.fontSize ?? null);
|
|
75
|
+
}
|
|
76
|
+
if (before.todoWords?.join('\n') !== after.todoWords?.join('\n')) {
|
|
77
|
+
editor.setTodoWords?.(after.todoWords ?? DEFAULT_TODO_WORDS);
|
|
78
|
+
}
|
|
73
79
|
}
|
|
74
80
|
export function EditorView(t0) {
|
|
75
81
|
const $ = _c(37);
|
package/dist/shortcut-keys.d.ts
CHANGED
|
@@ -16,6 +16,9 @@ export declare function shortcutsOf(keymap: Keymap, apple: boolean): {
|
|
|
16
16
|
collapseAll: LanguageShortcut | null;
|
|
17
17
|
collapseDocComments: LanguageShortcut | null;
|
|
18
18
|
collapseRecursively: LanguageShortcut | null;
|
|
19
|
+
convertIndentsToSpaces: LanguageShortcut | null;
|
|
20
|
+
convertIndentsToTabs: LanguageShortcut | null;
|
|
21
|
+
decreaseFontSize: LanguageShortcut | null;
|
|
19
22
|
deleteLine: LanguageShortcut | null;
|
|
20
23
|
deleteWordLeft: LanguageShortcut | null;
|
|
21
24
|
deleteWordRight: LanguageShortcut | null;
|
|
@@ -40,6 +43,7 @@ export declare function shortcutsOf(keymap: Keymap, apple: boolean): {
|
|
|
40
43
|
goToTypeDefinition: LanguageShortcut | null;
|
|
41
44
|
historyBack: LanguageShortcut | null;
|
|
42
45
|
historyForward: LanguageShortcut | null;
|
|
46
|
+
increaseFontSize: LanguageShortcut | null;
|
|
43
47
|
inlineEdit: LanguageShortcut | null;
|
|
44
48
|
joinLines: LanguageShortcut | null;
|
|
45
49
|
matchBrace: LanguageShortcut | null;
|
|
@@ -59,6 +63,8 @@ export declare function shortcutsOf(keymap: Keymap, apple: boolean): {
|
|
|
59
63
|
refactorThis: LanguageShortcut | null;
|
|
60
64
|
renameSymbol: LanguageShortcut | null;
|
|
61
65
|
replace: LanguageShortcut | null;
|
|
66
|
+
resetFontSize: LanguageShortcut | null;
|
|
67
|
+
reverseLines: LanguageShortcut | null;
|
|
62
68
|
save: LanguageShortcut | null;
|
|
63
69
|
selectAll: LanguageShortcut | null;
|
|
64
70
|
selectAllOccurrences: LanguageShortcut | null;
|
|
@@ -73,6 +79,7 @@ export declare function shortcutsOf(keymap: Keymap, apple: boolean): {
|
|
|
73
79
|
shrinkSelection: LanguageShortcut | null;
|
|
74
80
|
smartEnd: LanguageShortcut | null;
|
|
75
81
|
smartHome: LanguageShortcut | null;
|
|
82
|
+
sortLines: LanguageShortcut | null;
|
|
76
83
|
splitLine: LanguageShortcut | null;
|
|
77
84
|
startNewLine: LanguageShortcut | null;
|
|
78
85
|
startNewLineBefore: LanguageShortcut | null;
|
|
@@ -86,6 +93,7 @@ export declare function shortcutsOf(keymap: Keymap, apple: boolean): {
|
|
|
86
93
|
toggleRenderedDocs: LanguageShortcut | null;
|
|
87
94
|
triggerCompletion: LanguageShortcut | null;
|
|
88
95
|
undo: LanguageShortcut | null;
|
|
96
|
+
uniqueLines: LanguageShortcut | null;
|
|
89
97
|
unselectOccurrence: LanguageShortcut | null;
|
|
90
98
|
wordLeft: LanguageShortcut | null;
|
|
91
99
|
wordRight: LanguageShortcut | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adecore/editor-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Language-enabled editors, feature coordination and React popups over injected language services.",
|
|
6
6
|
"license": "FSL-1.1-MIT",
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
"test": "bun test --conditions=source"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@adecore/editor": "0.
|
|
66
|
-
"@adecore/lsp": "0.
|
|
67
|
-
"@adecore/merge": "0.
|
|
65
|
+
"@adecore/editor": "0.42.0",
|
|
66
|
+
"@adecore/lsp": "0.42.0",
|
|
67
|
+
"@adecore/merge": "0.42.0",
|
|
68
68
|
"lucide-react": "^1.61.0",
|
|
69
69
|
"react-markdown": "^10.1.0",
|
|
70
70
|
"remark-breaks": "^4.0.0",
|
|
@@ -72,14 +72,14 @@
|
|
|
72
72
|
"zustand": "^5.0.16"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@adecore/ui": "^0.
|
|
75
|
+
"@adecore/ui": "^0.42.0",
|
|
76
76
|
"i18next": "^26.4.2",
|
|
77
77
|
"react": "^19.3.0",
|
|
78
78
|
"react-dom": "^19.3.0",
|
|
79
79
|
"react-i18next": "^17.0.15"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
|
-
"@adecore/ui": "0.
|
|
82
|
+
"@adecore/ui": "0.42.0",
|
|
83
83
|
"@types/bun": "^1.4.4",
|
|
84
84
|
"@types/react": "^19.3.0",
|
|
85
85
|
"@types/react-dom": "^19.3.0",
|
package/src/EditorView.tsx
CHANGED
|
@@ -4,6 +4,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
4
4
|
import type { TFunction } from 'i18next';
|
|
5
5
|
import {
|
|
6
6
|
DEFAULT_SMART_KEYS,
|
|
7
|
+
DEFAULT_TODO_WORDS,
|
|
7
8
|
type Editor,
|
|
8
9
|
type EditorEngine,
|
|
9
10
|
type EditorIndentation,
|
|
@@ -114,6 +115,14 @@ function applyChangedOptions(editor: Editor, before: EditorOptions, after: Edito
|
|
|
114
115
|
if (after.label !== undefined && before.label !== after.label) {
|
|
115
116
|
editor.setLabel(after.label);
|
|
116
117
|
}
|
|
118
|
+
|
|
119
|
+
if (before.fontSize !== after.fontSize) {
|
|
120
|
+
editor.setFontSize?.(after.fontSize ?? null);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
if (before.todoWords?.join('\n') !== after.todoWords?.join('\n')) {
|
|
124
|
+
editor.setTodoWords?.(after.todoWords ?? DEFAULT_TODO_WORDS);
|
|
125
|
+
}
|
|
117
126
|
}
|
|
118
127
|
|
|
119
128
|
export function EditorView({
|