@simon_he/vue-tui 1.1.9 → 1.1.11
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/{TSelect-CCsjjCOr.js → TSelect-C-WzsLAD.js} +42 -2
- package/dist/{TTree-3W5A2_EH.js → TTree-1JP-PZ2T.js} +1 -1
- package/dist/agent.cjs +30 -2
- package/dist/agent.js +1 -1
- package/dist/cli.cjs +6 -0
- package/dist/cli.js +8 -0
- package/dist/index.cjs +30 -2
- package/dist/index.js +2 -2
- package/dist/vue/components/TInput.d.ts +15 -0
- package/dist/vue/components/input/plugins/promptMentionPlugin.d.ts +0 -3
- package/dist/vue.cjs +30 -2
- package/dist/vue.js +2 -2
- package/package.json +1 -1
|
@@ -2452,6 +2452,10 @@ const TInput = defineComponent({
|
|
|
2452
2452
|
type: Boolean,
|
|
2453
2453
|
default: false
|
|
2454
2454
|
},
|
|
2455
|
+
collapseMultilineLines: {
|
|
2456
|
+
type: Number,
|
|
2457
|
+
default: 3
|
|
2458
|
+
},
|
|
2455
2459
|
multilineTexts: {
|
|
2456
2460
|
type: Array,
|
|
2457
2461
|
default: () => []
|
|
@@ -3396,7 +3400,7 @@ const TInput = defineComponent({
|
|
|
3396
3400
|
}
|
|
3397
3401
|
if (props.collapseMultiline) {
|
|
3398
3402
|
const lineCount = (text.match(/\n/g) || []).length + 1;
|
|
3399
|
-
if (lineCount >
|
|
3403
|
+
if (lineCount > props.collapseMultilineLines) {
|
|
3400
3404
|
insertMultilineToken(text);
|
|
3401
3405
|
return;
|
|
3402
3406
|
}
|
|
@@ -3689,7 +3693,11 @@ const TInput = defineComponent({
|
|
|
3689
3693
|
if ((e.key === "u" || e.key === "U") && e.ctrlKey && !e.metaKey && !e.altKey) {
|
|
3690
3694
|
e.preventDefault();
|
|
3691
3695
|
e.stopPropagation();
|
|
3692
|
-
|
|
3696
|
+
const next = deleteToLineBoundary(value, "start");
|
|
3697
|
+
if (next.deleted) {
|
|
3698
|
+
pushUndoSnapshot(next.value);
|
|
3699
|
+
applyEdit(next.value, next.cursor);
|
|
3700
|
+
}
|
|
3693
3701
|
return;
|
|
3694
3702
|
}
|
|
3695
3703
|
if ((e.key === "w" || e.key === "W") && e.ctrlKey && !e.metaKey && !e.altKey) {
|
|
@@ -3698,6 +3706,38 @@ const TInput = defineComponent({
|
|
|
3698
3706
|
clearAll();
|
|
3699
3707
|
return;
|
|
3700
3708
|
}
|
|
3709
|
+
if (e.key === "Backspace" && e.altKey && !e.ctrlKey && !e.metaKey) {
|
|
3710
|
+
e.preventDefault();
|
|
3711
|
+
e.stopPropagation();
|
|
3712
|
+
const { value: afterDelete, cursor: nextCursor, deleted } = deleteSelectionIfAny(value);
|
|
3713
|
+
if (deleted) {
|
|
3714
|
+
pushUndoSnapshot(afterDelete);
|
|
3715
|
+
applyEdit(afterDelete, nextCursor);
|
|
3716
|
+
return;
|
|
3717
|
+
}
|
|
3718
|
+
const next = deleteRangeIfAny(value, findWordLeft(value, cursor.value), cursor.value);
|
|
3719
|
+
if (next.deleted) {
|
|
3720
|
+
pushUndoSnapshot(next.value);
|
|
3721
|
+
applyEdit(next.value, next.cursor);
|
|
3722
|
+
}
|
|
3723
|
+
return;
|
|
3724
|
+
}
|
|
3725
|
+
if ((e.key === "Delete" || e.key === "d" || e.key === "D") && e.altKey && !e.ctrlKey && !e.metaKey) {
|
|
3726
|
+
e.preventDefault();
|
|
3727
|
+
e.stopPropagation();
|
|
3728
|
+
const { value: afterDelete, cursor: nextCursor, deleted } = deleteSelectionIfAny(value);
|
|
3729
|
+
if (deleted) {
|
|
3730
|
+
pushUndoSnapshot(afterDelete);
|
|
3731
|
+
applyEdit(afterDelete, nextCursor);
|
|
3732
|
+
return;
|
|
3733
|
+
}
|
|
3734
|
+
const next = deleteRangeIfAny(value, cursor.value, findWordRight(value, cursor.value));
|
|
3735
|
+
if (next.deleted) {
|
|
3736
|
+
pushUndoSnapshot(next.value);
|
|
3737
|
+
applyEdit(next.value, next.cursor);
|
|
3738
|
+
}
|
|
3739
|
+
return;
|
|
3740
|
+
}
|
|
3701
3741
|
if (e.key === "Backspace") {
|
|
3702
3742
|
const mentions = props.mentions ?? [];
|
|
3703
3743
|
if (!value && cursor.value <= 0 && mentions.length > 0) {
|
|
@@ -9,7 +9,7 @@ import { createFramePerfStore, createTraceStore } from "./trace-Bh8WnoMo.js";
|
|
|
9
9
|
import { envFlag, envString, firstNonEmptyEnv } from "./env-Cl8qmNFN.js";
|
|
10
10
|
import { createTerminalSelectionController } from "./terminal-selection-4W1SJj4c.js";
|
|
11
11
|
import { createDebugLogger, isDebugEnabled } from "./debug-logger-CmsGI4of.js";
|
|
12
|
-
import { TBox, TInput, TRenderPlane, resolveOverlayPlacement } from "./TSelect-
|
|
12
|
+
import { TBox, TInput, TRenderPlane, resolveOverlayPlacement } from "./TSelect-C-WzsLAD.js";
|
|
13
13
|
import { TText, TView, createFrameMailbox } from "./frame-mailbox-DaTrfyaF.js";
|
|
14
14
|
import { applyWheelScroll, createWheelScrollState, resetWheelScrollState } from "./wheel-scroll-CQ22Hcyj.js";
|
|
15
15
|
import { computed, defineComponent, effectScope, getCurrentInstance, h, inject, nextTick, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, provide, ref, shallowReactive, shallowRef, toRef, watch, watchEffect } from "vue";
|
package/dist/agent.cjs
CHANGED
|
@@ -3338,6 +3338,10 @@ var nextImeOwnerId = 0, nextPasteImageId = 0, TInput = (0, import_vue12.defineCo
|
|
|
3338
3338
|
collectMentions: { type: Boolean, default: !1 },
|
|
3339
3339
|
mentions: { type: Array, default: () => [] },
|
|
3340
3340
|
collapseMultiline: { type: Boolean, default: !1 },
|
|
3341
|
+
/**
|
|
3342
|
+
* Collapses pasted text into one multiline chip when its line count exceeds this value.
|
|
3343
|
+
*/
|
|
3344
|
+
collapseMultilineLines: { type: Number, default: 3 },
|
|
3341
3345
|
multilineTexts: {
|
|
3342
3346
|
type: Array,
|
|
3343
3347
|
default: () => []
|
|
@@ -4048,7 +4052,7 @@ var nextImeOwnerId = 0, nextPasteImageId = 0, TInput = (0, import_vue12.defineCo
|
|
|
4048
4052
|
return;
|
|
4049
4053
|
}
|
|
4050
4054
|
}
|
|
4051
|
-
if (props.collapseMultiline && (
|
|
4055
|
+
if (props.collapseMultiline && (text2.match(/\n/g) || []).length + 1 > props.collapseMultilineLines) {
|
|
4052
4056
|
insertMultilineToken(text2);
|
|
4053
4057
|
return;
|
|
4054
4058
|
}
|
|
@@ -4294,13 +4298,37 @@ var nextImeOwnerId = 0, nextPasteImageId = 0, TInput = (0, import_vue12.defineCo
|
|
|
4294
4298
|
return;
|
|
4295
4299
|
}
|
|
4296
4300
|
if ((e.key === "u" || e.key === "U") && e.ctrlKey && !e.metaKey && !e.altKey) {
|
|
4297
|
-
e.preventDefault(), e.stopPropagation()
|
|
4301
|
+
e.preventDefault(), e.stopPropagation();
|
|
4302
|
+
let next = deleteToLineBoundary(value, "start");
|
|
4303
|
+
next.deleted && (pushUndoSnapshot(next.value), applyEdit(next.value, next.cursor));
|
|
4298
4304
|
return;
|
|
4299
4305
|
}
|
|
4300
4306
|
if ((e.key === "w" || e.key === "W") && e.ctrlKey && !e.metaKey && !e.altKey) {
|
|
4301
4307
|
e.preventDefault(), e.stopPropagation(), clearAll();
|
|
4302
4308
|
return;
|
|
4303
4309
|
}
|
|
4310
|
+
if (e.key === "Backspace" && e.altKey && !e.ctrlKey && !e.metaKey) {
|
|
4311
|
+
e.preventDefault(), e.stopPropagation();
|
|
4312
|
+
let { value: afterDelete, cursor: nextCursor, deleted } = deleteSelectionIfAny(value);
|
|
4313
|
+
if (deleted) {
|
|
4314
|
+
pushUndoSnapshot(afterDelete), applyEdit(afterDelete, nextCursor);
|
|
4315
|
+
return;
|
|
4316
|
+
}
|
|
4317
|
+
let next = deleteRangeIfAny(value, findWordLeft(value, cursor.value), cursor.value);
|
|
4318
|
+
next.deleted && (pushUndoSnapshot(next.value), applyEdit(next.value, next.cursor));
|
|
4319
|
+
return;
|
|
4320
|
+
}
|
|
4321
|
+
if ((e.key === "Delete" || e.key === "d" || e.key === "D") && e.altKey && !e.ctrlKey && !e.metaKey) {
|
|
4322
|
+
e.preventDefault(), e.stopPropagation();
|
|
4323
|
+
let { value: afterDelete, cursor: nextCursor, deleted } = deleteSelectionIfAny(value);
|
|
4324
|
+
if (deleted) {
|
|
4325
|
+
pushUndoSnapshot(afterDelete), applyEdit(afterDelete, nextCursor);
|
|
4326
|
+
return;
|
|
4327
|
+
}
|
|
4328
|
+
let next = deleteRangeIfAny(value, cursor.value, findWordRight(value, cursor.value));
|
|
4329
|
+
next.deleted && (pushUndoSnapshot(next.value), applyEdit(next.value, next.cursor));
|
|
4330
|
+
return;
|
|
4331
|
+
}
|
|
4304
4332
|
if (e.key === "Backspace") {
|
|
4305
4333
|
let mentions = props.mentions ?? [];
|
|
4306
4334
|
if (!value && cursor.value <= 0 && mentions.length > 0) {
|
package/dist/agent.js
CHANGED
|
@@ -6,7 +6,7 @@ import "./frame-perf-CHpWhbC4.js";
|
|
|
6
6
|
import "./env-Cl8qmNFN.js";
|
|
7
7
|
import "./terminal-selection-4W1SJj4c.js";
|
|
8
8
|
import "./debug-logger-CmsGI4of.js";
|
|
9
|
-
import { TBox, TCommandPalette, TDialog, TInput, TRenderPlane, TSelect, computeCommandPaletteMatchRanges } from "./TSelect-
|
|
9
|
+
import { TBox, TCommandPalette, TDialog, TInput, TRenderPlane, TSelect, computeCommandPaletteMatchRanges } from "./TSelect-C-WzsLAD.js";
|
|
10
10
|
import { TText, TView } from "./frame-mailbox-DaTrfyaF.js";
|
|
11
11
|
import "./path-BI9W15Zt.js";
|
|
12
12
|
import "./wheel-scroll-CQ22Hcyj.js";
|
package/dist/cli.cjs
CHANGED
|
@@ -1436,6 +1436,8 @@ function parseCsi(sequence) {
|
|
|
1436
1436
|
return { handled: !0, event: keyEvent("Tab", "Tab", mods2) };
|
|
1437
1437
|
if (cp === 27)
|
|
1438
1438
|
return { handled: !0, event: keyEvent("Escape", "Escape", mods2) };
|
|
1439
|
+
if (cp === 127)
|
|
1440
|
+
return { handled: !0, event: keyEvent("Backspace", "Backspace", mods2) };
|
|
1439
1441
|
if (cp >= 32)
|
|
1440
1442
|
try {
|
|
1441
1443
|
return {
|
|
@@ -1981,6 +1983,10 @@ function createStdinDriver(options) {
|
|
|
1981
1983
|
dispatchEvent(keyEvent("Tab", "Tab", { altKey: !0 }), "alt");
|
|
1982
1984
|
return;
|
|
1983
1985
|
}
|
|
1986
|
+
if (code === 127) {
|
|
1987
|
+
dispatchEvent(keyEvent("Backspace", "Backspace", { altKey: !0 }), "alt");
|
|
1988
|
+
return;
|
|
1989
|
+
}
|
|
1984
1990
|
}
|
|
1985
1991
|
if (sequence === "\x1B") {
|
|
1986
1992
|
dispatchEvent(keyEvent("Escape", "Escape"), "escape");
|
package/dist/cli.js
CHANGED
|
@@ -1523,6 +1523,10 @@ function parseCsi(sequence) {
|
|
|
1523
1523
|
handled: true,
|
|
1524
1524
|
event: keyEvent("Escape", "Escape", mods2)
|
|
1525
1525
|
};
|
|
1526
|
+
if (cp === 127) return {
|
|
1527
|
+
handled: true,
|
|
1528
|
+
event: keyEvent("Backspace", "Backspace", mods2)
|
|
1529
|
+
};
|
|
1526
1530
|
if (cp >= 32) try {
|
|
1527
1531
|
return {
|
|
1528
1532
|
handled: true,
|
|
@@ -2303,6 +2307,10 @@ function createStdinDriver(options) {
|
|
|
2303
2307
|
dispatchEvent(keyEvent("Tab", "Tab", { altKey: true }), "alt");
|
|
2304
2308
|
return;
|
|
2305
2309
|
}
|
|
2310
|
+
if (code === 127) {
|
|
2311
|
+
dispatchEvent(keyEvent("Backspace", "Backspace", { altKey: true }), "alt");
|
|
2312
|
+
return;
|
|
2313
|
+
}
|
|
2306
2314
|
}
|
|
2307
2315
|
if (sequence === "\x1B") {
|
|
2308
2316
|
dispatchEvent(keyEvent("Escape", "Escape"), "escape");
|
package/dist/index.cjs
CHANGED
|
@@ -8975,6 +8975,10 @@ var nextImeOwnerId = 0, nextPasteImageId = 0, TInput = (0, import_vue20.defineCo
|
|
|
8975
8975
|
collectMentions: { type: Boolean, default: !1 },
|
|
8976
8976
|
mentions: { type: Array, default: () => [] },
|
|
8977
8977
|
collapseMultiline: { type: Boolean, default: !1 },
|
|
8978
|
+
/**
|
|
8979
|
+
* Collapses pasted text into one multiline chip when its line count exceeds this value.
|
|
8980
|
+
*/
|
|
8981
|
+
collapseMultilineLines: { type: Number, default: 3 },
|
|
8978
8982
|
multilineTexts: {
|
|
8979
8983
|
type: Array,
|
|
8980
8984
|
default: () => []
|
|
@@ -9685,7 +9689,7 @@ var nextImeOwnerId = 0, nextPasteImageId = 0, TInput = (0, import_vue20.defineCo
|
|
|
9685
9689
|
return;
|
|
9686
9690
|
}
|
|
9687
9691
|
}
|
|
9688
|
-
if (props.collapseMultiline && (
|
|
9692
|
+
if (props.collapseMultiline && (text.match(/\n/g) || []).length + 1 > props.collapseMultilineLines) {
|
|
9689
9693
|
insertMultilineToken(text);
|
|
9690
9694
|
return;
|
|
9691
9695
|
}
|
|
@@ -9931,13 +9935,37 @@ var nextImeOwnerId = 0, nextPasteImageId = 0, TInput = (0, import_vue20.defineCo
|
|
|
9931
9935
|
return;
|
|
9932
9936
|
}
|
|
9933
9937
|
if ((e.key === "u" || e.key === "U") && e.ctrlKey && !e.metaKey && !e.altKey) {
|
|
9934
|
-
e.preventDefault(), e.stopPropagation()
|
|
9938
|
+
e.preventDefault(), e.stopPropagation();
|
|
9939
|
+
let next = deleteToLineBoundary(value, "start");
|
|
9940
|
+
next.deleted && (pushUndoSnapshot(next.value), applyEdit(next.value, next.cursor));
|
|
9935
9941
|
return;
|
|
9936
9942
|
}
|
|
9937
9943
|
if ((e.key === "w" || e.key === "W") && e.ctrlKey && !e.metaKey && !e.altKey) {
|
|
9938
9944
|
e.preventDefault(), e.stopPropagation(), clearAll();
|
|
9939
9945
|
return;
|
|
9940
9946
|
}
|
|
9947
|
+
if (e.key === "Backspace" && e.altKey && !e.ctrlKey && !e.metaKey) {
|
|
9948
|
+
e.preventDefault(), e.stopPropagation();
|
|
9949
|
+
let { value: afterDelete, cursor: nextCursor, deleted } = deleteSelectionIfAny(value);
|
|
9950
|
+
if (deleted) {
|
|
9951
|
+
pushUndoSnapshot(afterDelete), applyEdit(afterDelete, nextCursor);
|
|
9952
|
+
return;
|
|
9953
|
+
}
|
|
9954
|
+
let next = deleteRangeIfAny(value, findWordLeft(value, cursor.value), cursor.value);
|
|
9955
|
+
next.deleted && (pushUndoSnapshot(next.value), applyEdit(next.value, next.cursor));
|
|
9956
|
+
return;
|
|
9957
|
+
}
|
|
9958
|
+
if ((e.key === "Delete" || e.key === "d" || e.key === "D") && e.altKey && !e.ctrlKey && !e.metaKey) {
|
|
9959
|
+
e.preventDefault(), e.stopPropagation();
|
|
9960
|
+
let { value: afterDelete, cursor: nextCursor, deleted } = deleteSelectionIfAny(value);
|
|
9961
|
+
if (deleted) {
|
|
9962
|
+
pushUndoSnapshot(afterDelete), applyEdit(afterDelete, nextCursor);
|
|
9963
|
+
return;
|
|
9964
|
+
}
|
|
9965
|
+
let next = deleteRangeIfAny(value, cursor.value, findWordRight(value, cursor.value));
|
|
9966
|
+
next.deleted && (pushUndoSnapshot(next.value), applyEdit(next.value, next.cursor));
|
|
9967
|
+
return;
|
|
9968
|
+
}
|
|
9941
9969
|
if (e.key === "Backspace") {
|
|
9942
9970
|
let mentions = props.mentions ?? [];
|
|
9943
9971
|
if (!value && cursor.value <= 0 && mentions.length > 0) {
|
package/dist/index.js
CHANGED
|
@@ -8,10 +8,10 @@ import "./runtime-Byf8XXOT.js";
|
|
|
8
8
|
import "./frame-perf-CHpWhbC4.js";
|
|
9
9
|
import "./trace-Bh8WnoMo.js";
|
|
10
10
|
import "./env-Cl8qmNFN.js";
|
|
11
|
-
import { TAutocompleteInput, TBadge, TCheckbox, TCode, TDataTable, TDivider, TFormField, TLink, TLinkifyText, TList, TPasswordInput, TRadioGroup, TSlider, TSwitch, TTable, TTag, TTree, TerminalProvider, createTInputHostPlugin } from "./TTree-
|
|
11
|
+
import { TAutocompleteInput, TBadge, TCheckbox, TCode, TDataTable, TDivider, TFormField, TLink, TLinkifyText, TList, TPasswordInput, TRadioGroup, TSlider, TSwitch, TTable, TTag, TTree, TerminalProvider, createTInputHostPlugin } from "./TTree-1JP-PZ2T.js";
|
|
12
12
|
import "./terminal-selection-4W1SJj4c.js";
|
|
13
13
|
import "./debug-logger-CmsGI4of.js";
|
|
14
|
-
import { TBox, TCommandPalette, TDialog, TInput, TSelect, computeCommandPaletteMatchRanges } from "./TSelect-
|
|
14
|
+
import { TBox, TCommandPalette, TDialog, TInput, TSelect, computeCommandPaletteMatchRanges } from "./TSelect-C-WzsLAD.js";
|
|
15
15
|
import { TText, TView } from "./frame-mailbox-DaTrfyaF.js";
|
|
16
16
|
import "./path-BI9W15Zt.js";
|
|
17
17
|
import "./wheel-scroll-CQ22Hcyj.js";
|
|
@@ -159,6 +159,13 @@ export declare const TInput: import("vue").DefineComponent<import("vue").Extract
|
|
|
159
159
|
type: BooleanConstructor;
|
|
160
160
|
default: boolean;
|
|
161
161
|
};
|
|
162
|
+
/**
|
|
163
|
+
* Collapses pasted text into one multiline chip when its line count exceeds this value.
|
|
164
|
+
*/
|
|
165
|
+
collapseMultilineLines: {
|
|
166
|
+
type: NumberConstructor;
|
|
167
|
+
default: number;
|
|
168
|
+
};
|
|
162
169
|
multilineTexts: {
|
|
163
170
|
type: PropType<readonly string[]>;
|
|
164
171
|
default: () => never[];
|
|
@@ -346,6 +353,13 @@ export declare const TInput: import("vue").DefineComponent<import("vue").Extract
|
|
|
346
353
|
type: BooleanConstructor;
|
|
347
354
|
default: boolean;
|
|
348
355
|
};
|
|
356
|
+
/**
|
|
357
|
+
* Collapses pasted text into one multiline chip when its line count exceeds this value.
|
|
358
|
+
*/
|
|
359
|
+
collapseMultilineLines: {
|
|
360
|
+
type: NumberConstructor;
|
|
361
|
+
default: number;
|
|
362
|
+
};
|
|
349
363
|
multilineTexts: {
|
|
350
364
|
type: PropType<readonly string[]>;
|
|
351
365
|
default: () => never[];
|
|
@@ -532,6 +546,7 @@ export declare const TInput: import("vue").DefineComponent<import("vue").Extract
|
|
|
532
546
|
collectMentions: boolean;
|
|
533
547
|
mentions: readonly string[];
|
|
534
548
|
collapseMultiline: boolean;
|
|
549
|
+
collapseMultilineLines: number;
|
|
535
550
|
multilineTexts: readonly string[];
|
|
536
551
|
secret: boolean;
|
|
537
552
|
maskChar: string;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import type { Style } from "../../../../core/types.js";
|
|
2
1
|
import type { MentionPathProvider, MentionSuggestionProvider } from "./promptMentionState.js";
|
|
3
2
|
import type { TInputPlugin } from "./types.js";
|
|
4
3
|
export type { MentionPathProvider, MentionSuggestionProvider } from "./promptMentionState.js";
|
|
5
4
|
export type PromptMentionPluginOptions = Readonly<{
|
|
6
|
-
/** Bisect-only type shim: the 1.1.7 consumer patch declares this option; this release ignores it at runtime. */
|
|
7
|
-
selectedMarkerStyle?: () => Style;
|
|
8
5
|
mentionSuggestionProviders?: readonly MentionSuggestionProvider[];
|
|
9
6
|
mentionPathProvider?: MentionPathProvider;
|
|
10
7
|
}>;
|
package/dist/vue.cjs
CHANGED
|
@@ -4122,6 +4122,10 @@ var nextImeOwnerId = 0, nextPasteImageId = 0, TInput = (0, import_vue15.defineCo
|
|
|
4122
4122
|
collectMentions: { type: Boolean, default: !1 },
|
|
4123
4123
|
mentions: { type: Array, default: () => [] },
|
|
4124
4124
|
collapseMultiline: { type: Boolean, default: !1 },
|
|
4125
|
+
/**
|
|
4126
|
+
* Collapses pasted text into one multiline chip when its line count exceeds this value.
|
|
4127
|
+
*/
|
|
4128
|
+
collapseMultilineLines: { type: Number, default: 3 },
|
|
4125
4129
|
multilineTexts: {
|
|
4126
4130
|
type: Array,
|
|
4127
4131
|
default: () => []
|
|
@@ -4832,7 +4836,7 @@ var nextImeOwnerId = 0, nextPasteImageId = 0, TInput = (0, import_vue15.defineCo
|
|
|
4832
4836
|
return;
|
|
4833
4837
|
}
|
|
4834
4838
|
}
|
|
4835
|
-
if (props.collapseMultiline && (
|
|
4839
|
+
if (props.collapseMultiline && (text.match(/\n/g) || []).length + 1 > props.collapseMultilineLines) {
|
|
4836
4840
|
insertMultilineToken(text);
|
|
4837
4841
|
return;
|
|
4838
4842
|
}
|
|
@@ -5078,13 +5082,37 @@ var nextImeOwnerId = 0, nextPasteImageId = 0, TInput = (0, import_vue15.defineCo
|
|
|
5078
5082
|
return;
|
|
5079
5083
|
}
|
|
5080
5084
|
if ((e.key === "u" || e.key === "U") && e.ctrlKey && !e.metaKey && !e.altKey) {
|
|
5081
|
-
e.preventDefault(), e.stopPropagation()
|
|
5085
|
+
e.preventDefault(), e.stopPropagation();
|
|
5086
|
+
let next = deleteToLineBoundary(value, "start");
|
|
5087
|
+
next.deleted && (pushUndoSnapshot(next.value), applyEdit(next.value, next.cursor));
|
|
5082
5088
|
return;
|
|
5083
5089
|
}
|
|
5084
5090
|
if ((e.key === "w" || e.key === "W") && e.ctrlKey && !e.metaKey && !e.altKey) {
|
|
5085
5091
|
e.preventDefault(), e.stopPropagation(), clearAll();
|
|
5086
5092
|
return;
|
|
5087
5093
|
}
|
|
5094
|
+
if (e.key === "Backspace" && e.altKey && !e.ctrlKey && !e.metaKey) {
|
|
5095
|
+
e.preventDefault(), e.stopPropagation();
|
|
5096
|
+
let { value: afterDelete, cursor: nextCursor, deleted } = deleteSelectionIfAny(value);
|
|
5097
|
+
if (deleted) {
|
|
5098
|
+
pushUndoSnapshot(afterDelete), applyEdit(afterDelete, nextCursor);
|
|
5099
|
+
return;
|
|
5100
|
+
}
|
|
5101
|
+
let next = deleteRangeIfAny(value, findWordLeft(value, cursor.value), cursor.value);
|
|
5102
|
+
next.deleted && (pushUndoSnapshot(next.value), applyEdit(next.value, next.cursor));
|
|
5103
|
+
return;
|
|
5104
|
+
}
|
|
5105
|
+
if ((e.key === "Delete" || e.key === "d" || e.key === "D") && e.altKey && !e.ctrlKey && !e.metaKey) {
|
|
5106
|
+
e.preventDefault(), e.stopPropagation();
|
|
5107
|
+
let { value: afterDelete, cursor: nextCursor, deleted } = deleteSelectionIfAny(value);
|
|
5108
|
+
if (deleted) {
|
|
5109
|
+
pushUndoSnapshot(afterDelete), applyEdit(afterDelete, nextCursor);
|
|
5110
|
+
return;
|
|
5111
|
+
}
|
|
5112
|
+
let next = deleteRangeIfAny(value, cursor.value, findWordRight(value, cursor.value));
|
|
5113
|
+
next.deleted && (pushUndoSnapshot(next.value), applyEdit(next.value, next.cursor));
|
|
5114
|
+
return;
|
|
5115
|
+
}
|
|
5088
5116
|
if (e.key === "Backspace") {
|
|
5089
5117
|
let mentions = props.mentions ?? [];
|
|
5090
5118
|
if (!value && cursor.value <= 0 && mentions.length > 0) {
|
package/dist/vue.js
CHANGED
|
@@ -8,10 +8,10 @@ import "./runtime-Byf8XXOT.js";
|
|
|
8
8
|
import "./frame-perf-CHpWhbC4.js";
|
|
9
9
|
import "./trace-Bh8WnoMo.js";
|
|
10
10
|
import "./env-Cl8qmNFN.js";
|
|
11
|
-
import { TAutocompleteInput, TBadge, TCheckbox, TCode, TDataTable, TDivider, TForm, TFormContextKey, TFormField, TLink, TLinkifyText, TList, TPasswordInput, TProgress, TRadioGroup, TSlider, TSpinner, TSwitch, TTable, TTag, TToastViewport, TTree, TerminalProvider, createTInputHostPlugin, useTForm } from "./TTree-
|
|
11
|
+
import { TAutocompleteInput, TBadge, TCheckbox, TCode, TDataTable, TDivider, TForm, TFormContextKey, TFormField, TLink, TLinkifyText, TList, TPasswordInput, TProgress, TRadioGroup, TSlider, TSpinner, TSwitch, TTable, TTag, TToastViewport, TTree, TerminalProvider, createTInputHostPlugin, useTForm } from "./TTree-1JP-PZ2T.js";
|
|
12
12
|
import "./terminal-selection-4W1SJj4c.js";
|
|
13
13
|
import "./debug-logger-CmsGI4of.js";
|
|
14
|
-
import { TBox, TCommandPalette, TDialog, TInput, TRenderPlane, TSelect, clamp$1, computeCommandPaletteMatchRanges, createOverlayFocusStack, isCommitMention, isWhitespace, mentionChipStyle, padEndByCells as padEndByCells$1, resolveOverlayPlacement, sliceByCellsWindow, textCellWidth as textCellWidth$1 } from "./TSelect-
|
|
14
|
+
import { TBox, TCommandPalette, TDialog, TInput, TRenderPlane, TSelect, clamp$1, computeCommandPaletteMatchRanges, createOverlayFocusStack, isCommitMention, isWhitespace, mentionChipStyle, padEndByCells as padEndByCells$1, resolveOverlayPlacement, sliceByCellsWindow, textCellWidth as textCellWidth$1 } from "./TSelect-C-WzsLAD.js";
|
|
15
15
|
import { TText, TView } from "./frame-mailbox-DaTrfyaF.js";
|
|
16
16
|
import { normalizePath, stripTrailingSlash } from "./path-BI9W15Zt.js";
|
|
17
17
|
import { applyWheelScroll, createWheelScrollState } from "./wheel-scroll-CQ22Hcyj.js";
|
package/package.json
CHANGED