@lvce-editor/editor-worker 18.1.0 → 18.2.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.
@@ -8159,7 +8159,27 @@ const setSelections = (editor, selections) => {
8159
8159
 
8160
8160
  const setText = (editor, text) => {
8161
8161
  string(text);
8162
- return setText$1(editor, text);
8162
+ const endRowIndex = editor.lines.length - 1;
8163
+ const endColumnIndex = editor.lines.at(-1).length;
8164
+ const start = {
8165
+ columnIndex: 0,
8166
+ rowIndex: 0
8167
+ };
8168
+ const end = {
8169
+ columnIndex: endColumnIndex,
8170
+ rowIndex: endRowIndex
8171
+ };
8172
+ const changes = [{
8173
+ deleted: getSelectionText(editor, {
8174
+ end,
8175
+ start
8176
+ }),
8177
+ end,
8178
+ inserted: splitLines(text),
8179
+ origin: EditorType,
8180
+ start
8181
+ }];
8182
+ return scheduleDocumentAndCursorsSelections(editor, changes);
8163
8183
  };
8164
8184
 
8165
8185
  const create$1 = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/editor-worker",
3
- "version": "18.1.0",
3
+ "version": "18.2.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git@github.com:lvce-editor/editor-worker.git"