@dou-ui/code 0.1.0-alpha.3 → 0.1.0-alpha.5
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/code-diff.js.map +1 -1
- package/dist/code-diff.vue_vue_type_script_setup_true_lang.js +422 -16
- package/dist/code-diff.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/code-editor.js.map +1 -1
- package/dist/code-editor.vue_vue_type_script_setup_true_lang.js +109 -48
- package/dist/code-editor.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/extension.js +6 -1
- package/dist/extension.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/code-diff.vue.d.ts +4 -2
- package/dist/types/extension.d.ts +21 -3
- package/dist/types/index.d.ts +4 -2
- package/dist/types/types.d.ts +55 -3
- package/package.json +3 -3
|
@@ -15,7 +15,7 @@ import { SyntaxWorkerClient, holdWorker, ownWorker } from "./language/worker-cli
|
|
|
15
15
|
import { format, useCodeMessages } from "./locale.js";
|
|
16
16
|
import { visibleViewport } from "./view/viewport.js";
|
|
17
17
|
import code_keys_default from "./code-keys2.js";
|
|
18
|
-
import { CODE_EDITOR_KEY } from "./extension.js";
|
|
18
|
+
import { CODE_EDITOR_KEY, WIDGET_HEIGHT_KEY } from "./extension.js";
|
|
19
19
|
import render_part_default from "./render-part.js";
|
|
20
20
|
import { matchCompletion } from "./completion/match.js";
|
|
21
21
|
import { parseSnippet } from "./completion/snippet.js";
|
|
@@ -23,33 +23,38 @@ import { diffText } from "./view/input.js";
|
|
|
23
23
|
import { LineLayout, UNWRAPPED, rowOfCol, updateRows, wrapLine } from "./view/layout.js";
|
|
24
24
|
import { Measure } from "./view/measure.js";
|
|
25
25
|
import { DouFindReplace, DouToggle, DouTooltip, holdPointer, isApplePlatform, isComposing, scrollPositionOf, useLocale, useNamespace, useTeleport, useZIndex } from "dou-ui";
|
|
26
|
-
import { Fragment, Teleport, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, getCurrentInstance, isMemoSame, markRaw, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, provide, reactive, ref, renderList, resolveDynamicComponent, shallowReactive, shallowRef, toDisplayString, toRaw, unref, watch, withCtx, withModifiers } from "vue";
|
|
26
|
+
import { Fragment, Teleport, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, getCurrentInstance, inject, isMemoSame, markRaw, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, provide, reactive, ref, renderList, resolveDynamicComponent, shallowReactive, shallowRef, toDisplayString, toRaw, unref, watch, withCtx, withModifiers } from "vue";
|
|
27
27
|
import { AlertTriangleIcon, ChevronDownIcon, ChevronRightIcon, FunctionIcon, GripVerticalIcon, InfoIcon, LetterCaseIcon, LightbulbIcon, PackageIcon, RegexIcon, SquareCodeIcon, SymbolClassIcon, SymbolConstantIcon, SymbolKeywordIcon, SymbolTypeAliasIcon, TypeIcon, VariableIcon, WholeWordIcon, WrenchIcon, XCircleIcon } from "@dou-ui/icons";
|
|
28
28
|
// src/code-editor.vue?vue&type=script&setup=true&lang.ts
|
|
29
29
|
var _hoisted_1 = [
|
|
30
30
|
"title",
|
|
31
31
|
"data-gutter-cell",
|
|
32
|
-
"data-line"
|
|
32
|
+
"data-line",
|
|
33
|
+
"onKeydown"
|
|
33
34
|
];
|
|
34
|
-
var _hoisted_2 =
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
-
var
|
|
35
|
+
var _hoisted_2 = {
|
|
36
|
+
key: 1,
|
|
37
|
+
"aria-hidden": "true"
|
|
38
|
+
};
|
|
39
|
+
var _hoisted_3 = ["data-fold"];
|
|
40
|
+
var _hoisted_4 = ["title"];
|
|
41
|
+
var _hoisted_5 = ["data-unfold", "title"];
|
|
42
|
+
var _hoisted_6 = ["title"];
|
|
43
|
+
var _hoisted_7 = ["data-unfold", "title"];
|
|
44
|
+
var _hoisted_8 = ["aria-label"];
|
|
45
|
+
var _hoisted_9 = ["aria-current", "onClick"];
|
|
46
|
+
var _hoisted_10 = ["aria-label"];
|
|
47
|
+
var _hoisted_11 = [
|
|
43
48
|
"id",
|
|
44
49
|
"aria-selected",
|
|
45
50
|
"onClick"
|
|
46
51
|
];
|
|
47
|
-
var
|
|
48
|
-
var
|
|
49
|
-
var
|
|
50
|
-
var
|
|
51
|
-
var
|
|
52
|
-
var
|
|
52
|
+
var _hoisted_12 = ["aria-label"];
|
|
53
|
+
var _hoisted_13 = ["onPointerdown"];
|
|
54
|
+
var _hoisted_14 = ["title"];
|
|
55
|
+
var _hoisted_15 = ["aria-label"];
|
|
56
|
+
var _hoisted_16 = ["onClick"];
|
|
57
|
+
var _hoisted_17 = [
|
|
53
58
|
"aria-label",
|
|
54
59
|
"aria-placeholder",
|
|
55
60
|
"aria-autocomplete",
|
|
@@ -57,8 +62,8 @@ var _hoisted_16 = [
|
|
|
57
62
|
"readonly",
|
|
58
63
|
"disabled"
|
|
59
64
|
];
|
|
60
|
-
var
|
|
61
|
-
var
|
|
65
|
+
var _hoisted_18 = ["role", "aria-label"];
|
|
66
|
+
var _hoisted_19 = ["aria-label", "title"];
|
|
62
67
|
var MAX_HEIGHT = 8e6;
|
|
63
68
|
var OVERSCAN = 6;
|
|
64
69
|
/** The textarea mirrors at most this much text around the cursor. */
|
|
@@ -550,6 +555,7 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
550
555
|
});
|
|
551
556
|
/** The widgets' heights as last measured, by key. */
|
|
552
557
|
const widgetHeights = shallowReactive(/* @__PURE__ */ new Map());
|
|
558
|
+
const onWidgetHeight = inject(WIDGET_HEIGHT_KEY, null);
|
|
553
559
|
const widgets = computed(() => {
|
|
554
560
|
const drawn = layout.value;
|
|
555
561
|
const lh = lineHeight.value;
|
|
@@ -673,7 +679,10 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
673
679
|
const id = observedWidgets.get(target);
|
|
674
680
|
if (!id || !target.isConnected) return;
|
|
675
681
|
const height = target.offsetHeight;
|
|
676
|
-
if (height && widgetHeights.get(id) !== height)
|
|
682
|
+
if (height && widgetHeights.get(id) !== height) {
|
|
683
|
+
onWidgetHeight?.(id, height);
|
|
684
|
+
widgetHeights.set(id, height);
|
|
685
|
+
}
|
|
677
686
|
};
|
|
678
687
|
measureNow(el);
|
|
679
688
|
if (typeof ResizeObserver === "undefined") return;
|
|
@@ -827,9 +836,40 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
827
836
|
}));
|
|
828
837
|
}
|
|
829
838
|
/** The markers of each column, by line, for the lines in view. */
|
|
839
|
+
/** The line the mouse is over in the text, so the gutter can show markers waiting for it. */
|
|
840
|
+
const hoveredLine = ref(null);
|
|
841
|
+
function lineAtY(y) {
|
|
842
|
+
const rect = content.value?.getBoundingClientRect();
|
|
843
|
+
if (!rect) return null;
|
|
844
|
+
return doc.value.lineAt(posAtCoords({
|
|
845
|
+
x: rect.left + 1,
|
|
846
|
+
y
|
|
847
|
+
})).number;
|
|
848
|
+
}
|
|
849
|
+
/** A marker in a pressable column is a button: Enter or Space presses it. */
|
|
850
|
+
function onCellKeydown(event, column, line) {
|
|
851
|
+
if (event.key !== "Enter" && event.key !== " ") return;
|
|
852
|
+
const press = gutterColumns.value[column]?.onPress;
|
|
853
|
+
if (!press || props.disabled) return;
|
|
854
|
+
event.preventDefault();
|
|
855
|
+
const cell = event.currentTarget;
|
|
856
|
+
press(line, event);
|
|
857
|
+
nextTick(() => {
|
|
858
|
+
const where = document.activeElement;
|
|
859
|
+
if ((!cell.isConnected || cell.getAttribute("role") !== "button") && (!where || where === document.body || where === cell)) focusInput();
|
|
860
|
+
});
|
|
861
|
+
}
|
|
862
|
+
/** Columns already warned about markers without a name, while developing. */
|
|
863
|
+
const unnamed = /* @__PURE__ */ new Set();
|
|
830
864
|
const gutterMarkers = computed(() => gutterColumns.value.map((column) => {
|
|
831
865
|
const byLine = /* @__PURE__ */ new Map();
|
|
832
|
-
for (const marker of column.markers())
|
|
866
|
+
for (const marker of column.markers()) {
|
|
867
|
+
byLine.set(marker.line, marker);
|
|
868
|
+
if (process.env.NODE_ENV !== "production" && column.onPress && !marker.title) {
|
|
869
|
+
if (!unnamed.has(column.name)) console.warn(`[@dou-ui/code] gutter "${column.name}": a marker in a column with \`onPress\` is a button and needs a \`title\` to name it.`);
|
|
870
|
+
unnamed.add(column.name);
|
|
871
|
+
}
|
|
872
|
+
}
|
|
833
873
|
return byLine;
|
|
834
874
|
}));
|
|
835
875
|
const gutterWidth = computed(() => {
|
|
@@ -2066,6 +2106,7 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
2066
2106
|
* the mouse events a browser makes up after it would only close it again.
|
|
2067
2107
|
*/
|
|
2068
2108
|
function onContentHover(event) {
|
|
2109
|
+
if (event.pointerType === "mouse") hoveredLine.value = lineAtY(event.clientY);
|
|
2069
2110
|
if (event.pointerType !== "mouse" || drag || problemBox.value?.keyboard) return;
|
|
2070
2111
|
if (!content.value?.getBoundingClientRect()) return;
|
|
2071
2112
|
const point = {
|
|
@@ -2089,6 +2130,7 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
2089
2130
|
clearTimeout(problemTimer);
|
|
2090
2131
|
}
|
|
2091
2132
|
function onContentLeave(event) {
|
|
2133
|
+
hoveredLine.value = null;
|
|
2092
2134
|
if (event.pointerType !== "mouse" || problemBox.value?.keyboard) return;
|
|
2093
2135
|
clearTimeout(problemTimer);
|
|
2094
2136
|
problemTimer = window.setTimeout(closeProblems, 250);
|
|
@@ -3030,6 +3072,12 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
3030
3072
|
], apple));
|
|
3031
3073
|
/** After Escape, Tab leaves the editor instead of indenting, so keyboard users are never stuck. */
|
|
3032
3074
|
let tabLeaves = false;
|
|
3075
|
+
const MODIFIERS = /* @__PURE__ */ new Set([
|
|
3076
|
+
"Shift",
|
|
3077
|
+
"Control",
|
|
3078
|
+
"Alt",
|
|
3079
|
+
"Meta"
|
|
3080
|
+
]);
|
|
3033
3081
|
/** When Enter last confirmed a composition; some browsers also put a line break into the textarea for it, right after. */
|
|
3034
3082
|
let confirmEnter = -Infinity;
|
|
3035
3083
|
function onKeydown(event) {
|
|
@@ -3057,7 +3105,7 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
3057
3105
|
return;
|
|
3058
3106
|
}
|
|
3059
3107
|
const leaving = tabLeaves && (name === "tab" || name === "shift+tab");
|
|
3060
|
-
tabLeaves = name === "escape";
|
|
3108
|
+
if (!MODIFIERS.has(event.key)) tabLeaves = name === "escape";
|
|
3061
3109
|
if (leaving) {
|
|
3062
3110
|
const first = name === "tab" && !shownWidgets.value.length ? keysEl.value?.querySelector("button") : null;
|
|
3063
3111
|
if (first) {
|
|
@@ -4454,6 +4502,7 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
4454
4502
|
};
|
|
4455
4503
|
context = api;
|
|
4456
4504
|
provide(CODE_EDITOR_KEY, api);
|
|
4505
|
+
provide(WIDGET_HEIGHT_KEY, null);
|
|
4457
4506
|
__expose(api);
|
|
4458
4507
|
return (_ctx, _cache) => {
|
|
4459
4508
|
return openBlock(), createElementBlock("div", {
|
|
@@ -4591,7 +4640,6 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
4591
4640
|
}, [__props.gutter && (__props.lineNumbers || __props.foldable || gutterCells.value) ? (openBlock(), createElementBlock("div", {
|
|
4592
4641
|
key: 0,
|
|
4593
4642
|
class: normalizeClass(unref(ns).e("gutter")),
|
|
4594
|
-
"aria-hidden": "true",
|
|
4595
4643
|
onPointerdown: _cache[5] || (_cache[5] = ($event) => onPointerDown($event, "gutter")),
|
|
4596
4644
|
onPointermove: onPointerMove,
|
|
4597
4645
|
onPointerup: _cache[6] || (_cache[6] = ($event) => onPointerUp($event, "gutter")),
|
|
@@ -4605,7 +4653,11 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
4605
4653
|
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(rows.value, (row) => {
|
|
4606
4654
|
return openBlock(), createElementBlock("div", {
|
|
4607
4655
|
key: row.n,
|
|
4608
|
-
class: normalizeClass([
|
|
4656
|
+
class: normalizeClass([
|
|
4657
|
+
unref(ns).e("number"),
|
|
4658
|
+
unref(ns).is("active", row.n === activeLineNumber.value),
|
|
4659
|
+
unref(ns).is("hovered", row.n === hoveredLine.value)
|
|
4660
|
+
]),
|
|
4609
4661
|
style: normalizeStyle({
|
|
4610
4662
|
height: row.wrapped.breaks.length ? `${(row.wrapped.breaks.length + 1) * lineHeight.value}px` : void 0,
|
|
4611
4663
|
marginTop: gapBefore(row.n) ? `${gapBefore(row.n)}px` : void 0
|
|
@@ -4615,21 +4667,30 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
4615
4667
|
key: 0,
|
|
4616
4668
|
class: normalizeClass(unref(ns).e("cells"))
|
|
4617
4669
|
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(gutterColumns.value, (column, c) => {
|
|
4618
|
-
return openBlock(), createElementBlock("span", {
|
|
4670
|
+
return openBlock(), createElementBlock("span", mergeProps({
|
|
4619
4671
|
key: column.name,
|
|
4620
|
-
class:
|
|
4621
|
-
|
|
4672
|
+
class: [
|
|
4673
|
+
unref(ns).e("cell"),
|
|
4674
|
+
unref(ns).is("on-hover", gutterMarkers.value[c]?.get(row.n)?.visible === "hover"),
|
|
4675
|
+
gutterMarkers.value[c]?.get(row.n)?.class
|
|
4676
|
+
],
|
|
4677
|
+
style: { width: `${column.width}px` },
|
|
4622
4678
|
title: gutterMarkers.value[c]?.get(row.n)?.title,
|
|
4623
4679
|
"data-gutter-cell": column.onPress ? c : void 0,
|
|
4624
4680
|
"data-line": row.n
|
|
4625
|
-
},
|
|
4681
|
+
}, { ref_for: true }, column.onPress && gutterMarkers.value[c]?.get(row.n) && !__props.disabled ? {
|
|
4682
|
+
role: "button",
|
|
4683
|
+
tabindex: row.n === activeLineNumber.value ? 0 : -1,
|
|
4684
|
+
"aria-label": gutterMarkers.value[c].get(row.n).title
|
|
4685
|
+
} : { "aria-hidden": "true" }, { onKeydown: ($event) => onCellKeydown($event, c, row.n) }), [gutterMarkers.value[c]?.get(row.n) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [gutterMarkers.value[c].get(row.n).icon ? (openBlock(), createBlock(resolveDynamicComponent(gutterMarkers.value[c].get(row.n).icon), { key: 0 })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(gutterMarkers.value[c].get(row.n).text), 1)], 64))], 64)) : createCommentVNode("", true)], 16, _hoisted_1);
|
|
4626
4686
|
}), 128))], 2)) : createCommentVNode("", true),
|
|
4627
|
-
__props.lineNumbers ? (openBlock(), createElementBlock(
|
|
4687
|
+
__props.lineNumbers ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(row.n), 1)) : createCommentVNode("", true),
|
|
4628
4688
|
__props.foldable && (row.folded || foldableLines.value.has(row.n)) ? (openBlock(), createElementBlock("span", {
|
|
4629
4689
|
key: 2,
|
|
4630
4690
|
class: normalizeClass([unref(ns).e("fold-toggle"), unref(ns).is("folded", row.folded)]),
|
|
4631
|
-
"data-fold": row.n
|
|
4632
|
-
|
|
4691
|
+
"data-fold": row.n,
|
|
4692
|
+
"aria-hidden": "true"
|
|
4693
|
+
}, [row.folded ? (openBlock(), createBlock(unref(ChevronRightIcon), { key: 0 })) : (openBlock(), createBlock(unref(ChevronDownIcon), { key: 1 }))], 10, _hoisted_3)) : createCommentVNode("", true)
|
|
4633
4694
|
], 6);
|
|
4634
4695
|
}), 128))], 6)], 34)) : createCommentVNode("", true), createElementVNode("div", {
|
|
4635
4696
|
ref_key: "content",
|
|
@@ -4741,13 +4802,13 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
4741
4802
|
class: normalizeClass(part[1]),
|
|
4742
4803
|
title: part[2],
|
|
4743
4804
|
style: normalizeStyle(part[4])
|
|
4744
|
-
}, toDisplayString(part[0]), 15,
|
|
4805
|
+
}, toDisplayString(part[0]), 15, _hoisted_4)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [createTextVNode(toDisplayString(part[0]), 1)], 64))], 64);
|
|
4745
4806
|
}), 128)), row.folded && sub === row.wrapped.breaks.length ? (openBlock(), createElementBlock("span", {
|
|
4746
4807
|
key: 0,
|
|
4747
4808
|
class: normalizeClass(unref(ns).e("fold-marker")),
|
|
4748
4809
|
"data-unfold": row.n,
|
|
4749
4810
|
title: unref(messages).unfold
|
|
4750
|
-
}, "⋯", 10,
|
|
4811
|
+
}, "⋯", 10, _hoisted_5)) : createCommentVNode("", true)], 6);
|
|
4751
4812
|
}), 128)) : row.tokens || row.marks || row.inlines ? (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(partsOf(row), (part, i) => {
|
|
4752
4813
|
return openBlock(), createElementBlock(Fragment, { key: i }, [part[3] !== void 0 ? (openBlock(), createElementBlock("span", {
|
|
4753
4814
|
key: 0,
|
|
@@ -4760,13 +4821,13 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
4760
4821
|
class: normalizeClass(part[1]),
|
|
4761
4822
|
title: part[2],
|
|
4762
4823
|
style: normalizeStyle(part[4])
|
|
4763
|
-
}, toDisplayString(part[0]), 15,
|
|
4824
|
+
}, toDisplayString(part[0]), 15, _hoisted_6)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [createTextVNode(toDisplayString(part[0]), 1)], 64))], 64);
|
|
4764
4825
|
}), 128)) : (openBlock(), createElementBlock(Fragment, { key: 3 }, [createTextVNode(toDisplayString(row.text), 1)], 64)), row.folded && !row.wrapped.breaks.length ? (openBlock(), createElementBlock("span", {
|
|
4765
4826
|
key: 4,
|
|
4766
4827
|
class: normalizeClass(unref(ns).e("fold-marker")),
|
|
4767
4828
|
"data-unfold": row.n,
|
|
4768
4829
|
title: unref(messages).unfold
|
|
4769
|
-
}, "⋯", 10,
|
|
4830
|
+
}, "⋯", 10, _hoisted_7)) : createCommentVNode("", true)], 6));
|
|
4770
4831
|
_item.memo = _memo;
|
|
4771
4832
|
return _item;
|
|
4772
4833
|
}, _cache, 10), 128))], 6),
|
|
@@ -4846,9 +4907,9 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
4846
4907
|
class: normalizeClass([unref(ns).e("fix"), unref(ns).is("active", i === problemBox.value.index)]),
|
|
4847
4908
|
"aria-current": i === problemBox.value.index || void 0,
|
|
4848
4909
|
onClick: ($event) => runFix(i)
|
|
4849
|
-
}, toDisplayString(fix.action.label), 11,
|
|
4910
|
+
}, toDisplayString(fix.action.label), 11, _hoisted_9);
|
|
4850
4911
|
}), 128))], 2)) : createCommentVNode("", true)
|
|
4851
|
-
], 46,
|
|
4912
|
+
], 46, _hoisted_8)) : createCommentVNode("", true),
|
|
4852
4913
|
completionStyle.value ? (openBlock(), createElementBlock("div", {
|
|
4853
4914
|
key: 1,
|
|
4854
4915
|
ref_key: "completionEl",
|
|
@@ -4887,8 +4948,8 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
4887
4948
|
key: 0,
|
|
4888
4949
|
class: normalizeClass(unref(ns).e("completion-detail"))
|
|
4889
4950
|
}, toDisplayString(item.option.detail), 3)) : createCommentVNode("", true)
|
|
4890
|
-
], 10,
|
|
4891
|
-
}), 128))], 10,
|
|
4951
|
+
], 10, _hoisted_11);
|
|
4952
|
+
}), 128))], 10, _hoisted_10), completion.value.items[completion.value.index]?.option.info ? (openBlock(), createElementBlock("div", {
|
|
4892
4953
|
key: 0,
|
|
4893
4954
|
class: normalizeClass(unref(ns).e("completion-info"))
|
|
4894
4955
|
}, [typeof completion.value.items[completion.value.index].option.info === "string" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(completion.value.items[completion.value.index].option.info), 1)], 64)) : (openBlock(), createBlock(unref(render_part_default), {
|
|
@@ -4915,7 +4976,7 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
4915
4976
|
}, [typeof signature.value.result.info === "string" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(signature.value.result.info), 1)], 64)) : (openBlock(), createBlock(unref(render_part_default), {
|
|
4916
4977
|
key: 1,
|
|
4917
4978
|
render: signature.value.result.info
|
|
4918
|
-
}, null, 8, ["render"]))], 2)) : createCommentVNode("", true)], 46,
|
|
4979
|
+
}, null, 8, ["render"]))], 2)) : createCommentVNode("", true)], 46, _hoisted_12)) : createCommentVNode("", true),
|
|
4919
4980
|
(openBlock(true), createElementBlock(Fragment, null, renderList(handles.value, (handle) => {
|
|
4920
4981
|
return openBlock(), createElementBlock("div", {
|
|
4921
4982
|
key: handle.kind,
|
|
@@ -4923,7 +4984,7 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
4923
4984
|
style: normalizeStyle({ transform: `translate(${handle.left}px, ${handle.top}px)` }),
|
|
4924
4985
|
"aria-hidden": "true",
|
|
4925
4986
|
onPointerdown: ($event) => onHandleDown($event, handle.kind)
|
|
4926
|
-
}, null, 46,
|
|
4987
|
+
}, null, 46, _hoisted_13);
|
|
4927
4988
|
}), 128)),
|
|
4928
4989
|
magnifier.value ? (openBlock(), createElementBlock("div", {
|
|
4929
4990
|
key: 3,
|
|
@@ -4943,7 +5004,7 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
4943
5004
|
class: normalizeClass(part[1]),
|
|
4944
5005
|
title: part[2],
|
|
4945
5006
|
style: normalizeStyle(part[4])
|
|
4946
|
-
}, toDisplayString(part[0]), 15,
|
|
5007
|
+
}, toDisplayString(part[0]), 15, _hoisted_14)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [createTextVNode(toDisplayString(part[0]), 1)], 64))], 64);
|
|
4947
5008
|
}), 128))], 6), createElementVNode("div", {
|
|
4948
5009
|
class: normalizeClass(unref(ns).e("magnifier-caret")),
|
|
4949
5010
|
style: normalizeStyle({ left: `${magnifier.value.caret - 1}px` })
|
|
@@ -4964,8 +5025,8 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
4964
5025
|
tabindex: "-1",
|
|
4965
5026
|
class: normalizeClass(unref(ns).e("menu-button")),
|
|
4966
5027
|
onClick: ($event) => item.run()
|
|
4967
|
-
}, toDisplayString(item.label), 11,
|
|
4968
|
-
}), 128))], 46,
|
|
5028
|
+
}, toDisplayString(item.label), 11, _hoisted_16);
|
|
5029
|
+
}), 128))], 46, _hoisted_15)) : createCommentVNode("", true)
|
|
4969
5030
|
], 6)], 8, ["to", "disabled"])),
|
|
4970
5031
|
createElementVNode("textarea", {
|
|
4971
5032
|
ref_key: "input",
|
|
@@ -4998,7 +5059,7 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
4998
5059
|
onPaste,
|
|
4999
5060
|
onFocus,
|
|
5000
5061
|
onBlur
|
|
5001
|
-
}, null, 46,
|
|
5062
|
+
}, null, 46, _hoisted_17),
|
|
5002
5063
|
shownWidgets.value.length ? (openBlock(), createElementBlock("div", {
|
|
5003
5064
|
key: 3,
|
|
5004
5065
|
class: normalizeClass(unref(ns).e("widgets")),
|
|
@@ -5017,7 +5078,7 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
5017
5078
|
transform: `translate(${scrollLeft.value}px, ${widget.top}px)`,
|
|
5018
5079
|
width: `${Math.max(0, viewWidth.value - gutterWidth.value)}px`
|
|
5019
5080
|
})
|
|
5020
|
-
}, [createVNode(unref(render_part_default), { render: widget.render }, null, 8, ["render"])], 14,
|
|
5081
|
+
}, [createVNode(unref(render_part_default), { render: widget.render }, null, 8, ["render"])], 14, _hoisted_18);
|
|
5021
5082
|
}), 128))], 34)) : createCommentVNode("", true)
|
|
5022
5083
|
], 34)], 6)], 34), minimapOn.value && minimap.value ? (openBlock(), createElementBlock("div", {
|
|
5023
5084
|
key: 0,
|
|
@@ -5069,7 +5130,7 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
5069
5130
|
onPointerdown: onKeysGripDown,
|
|
5070
5131
|
onKeydown: onKeysGripKey,
|
|
5071
5132
|
onMousedown: _cache[25] || (_cache[25] = withModifiers(() => {}, ["prevent"]))
|
|
5072
|
-
}, [createVNode(unref(GripVerticalIcon))], 42,
|
|
5133
|
+
}, [createVNode(unref(GripVerticalIcon))], 42, _hoisted_19), createVNode(code_keys_default, {
|
|
5073
5134
|
editor: keysEditor,
|
|
5074
5135
|
keys: keysList.value,
|
|
5075
5136
|
messages: unref(messages)
|