@dou-ui/code 0.1.0-alpha.22 → 0.1.0-alpha.24

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.
@@ -37,24 +37,30 @@ var _hoisted_2 = {
37
37
  "aria-hidden": "true"
38
38
  };
39
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 = [
40
+ var _hoisted_4 = [
41
+ "title",
42
+ "data-gutter-cell",
43
+ "data-line",
44
+ "onKeydown"
45
+ ];
46
+ var _hoisted_5 = ["title"];
47
+ var _hoisted_6 = ["data-unfold", "title"];
48
+ var _hoisted_7 = ["title"];
49
+ var _hoisted_8 = ["data-unfold", "title"];
50
+ var _hoisted_9 = ["aria-label"];
51
+ var _hoisted_10 = ["aria-current", "onClick"];
52
+ var _hoisted_11 = ["aria-label"];
53
+ var _hoisted_12 = [
48
54
  "id",
49
55
  "aria-selected",
50
56
  "onClick"
51
57
  ];
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 = [
58
+ var _hoisted_13 = ["aria-label"];
59
+ var _hoisted_14 = ["onPointerdown"];
60
+ var _hoisted_15 = ["title"];
61
+ var _hoisted_16 = ["aria-label"];
62
+ var _hoisted_17 = ["onClick"];
63
+ var _hoisted_18 = [
58
64
  "aria-label",
59
65
  "aria-placeholder",
60
66
  "aria-autocomplete",
@@ -62,8 +68,8 @@ var _hoisted_17 = [
62
68
  "readonly",
63
69
  "disabled"
64
70
  ];
65
- var _hoisted_18 = ["role", "aria-label"];
66
- var _hoisted_19 = ["aria-label", "title"];
71
+ var _hoisted_19 = ["role", "aria-label"];
72
+ var _hoisted_20 = ["aria-label", "title"];
67
73
  var MAX_HEIGHT = 8e6;
68
74
  var OVERSCAN = 6;
69
75
  /** The textarea mirrors at most this much text around the cursor. */
@@ -178,10 +184,12 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
178
184
  const emit = __emit;
179
185
  const ns = useNamespace("code-editor");
180
186
  const instance = getCurrentInstance();
181
- /** Space above the first line and below the last, and before and after each line; set from the styles once measured. */
187
+ /** Space above the first line and below the last, before and after each line, and around line numbers; set from the styles once measured. */
182
188
  const pad = reactive({
183
189
  x: 12,
184
- y: 8
190
+ y: 8,
191
+ gutterLeft: 16,
192
+ gutterRight: 12
185
193
  });
186
194
  /** Browsers stop growing an element somewhere past 16M px; taller texts scroll in scaled steps. */
187
195
  const apple = isApplePlatform();
@@ -577,6 +585,7 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
577
585
  above,
578
586
  render: widget.render,
579
587
  label: widget.label,
588
+ fullWidth: !!widget.fullWidth,
580
589
  row: drawn.rowOf(n) + (above ? 0 : drawn.rowsOf(n)),
581
590
  height: widgetHeights.get(key) ?? widget.height ?? lh,
582
591
  before: 0
@@ -806,18 +815,28 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
806
815
  if (props.diagnostics !== void 0 || linting.value || diagnostics.value.length) columns.push({
807
816
  name: "problems",
808
817
  width: 16,
818
+ overlay: false,
809
819
  markers: problemMarkers
810
820
  });
811
821
  for (const extension of extensions.value) for (const gutter of extension.gutters ?? []) columns.push({
812
822
  name: gutter.name,
813
- width: gutter.width ?? 16,
823
+ width: gutter.width ?? (gutter.overlay ? 18 : 16),
824
+ overlay: !!gutter.overlay,
814
825
  markers: () => withHoverMarker(gutter.markers?.(context) ?? [], gutter.hoverMarker),
815
826
  onPress: gutter.onPress && ((line, event) => gutter.onPress(line, event, context)),
816
827
  pressOn: gutter.pressOn
817
828
  });
818
829
  return columns;
819
830
  });
820
- const gutterCells = computed(() => gutterColumns.value.reduce((sum, column) => sum + column.width, 0));
831
+ const flowGutterColumns = computed(() => gutterColumns.value.map((column, index) => ({
832
+ column,
833
+ index
834
+ })).filter((item) => !item.column.overlay));
835
+ const overlayGutterColumns = computed(() => gutterColumns.value.map((column, index) => ({
836
+ column,
837
+ index
838
+ })).filter((item) => item.column.overlay));
839
+ const gutterCells = computed(() => flowGutterColumns.value.reduce((sum, item) => sum + item.column.width, 0));
821
840
  /** A column's markers, and its `hoverMarker` on the other lines in view. */
822
841
  function withHoverMarker(own, hover) {
823
842
  if (!hover) return own;
@@ -897,7 +916,7 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
897
916
  if (!props.gutter || !props.lineNumbers && !props.foldable && !cells) return 0;
898
917
  metrics.value;
899
918
  const digits = Math.max(2, String(doc.value.lines).length);
900
- return cells + (props.lineNumbers ? Math.ceil(digits * measure.cell) + 28 : 12) + (props.foldable ? 14 : 0);
919
+ return cells + (props.lineNumbers ? Math.ceil(digits * measure.cell) + pad.gutterLeft + pad.gutterRight : props.foldable ? 12 : 0) + (props.foldable ? 14 : 0);
901
920
  });
902
921
  const contentWidth = computed(() => {
903
922
  if (props.wrap) return 0;
@@ -4402,10 +4421,15 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
4402
4421
  });
4403
4422
  }
4404
4423
  let resize;
4405
- function refreshMetrics() {
4406
- measure.refresh(props.tabSize);
4424
+ function syncPadding() {
4407
4425
  pad.y = measure.padY;
4408
4426
  pad.x = measure.padX;
4427
+ pad.gutterLeft = measure.gutterPadLeft;
4428
+ pad.gutterRight = measure.gutterPadRight;
4429
+ }
4430
+ function refreshMetrics() {
4431
+ measure.refresh(props.tabSize);
4432
+ syncPadding();
4409
4433
  readFrameFont();
4410
4434
  metrics.value++;
4411
4435
  syncInput();
@@ -4422,6 +4446,11 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
4422
4446
  viewHeight.value = el.clientHeight;
4423
4447
  viewWidth.value = el.clientWidth;
4424
4448
  rootWidth.value = root.value?.clientWidth ?? 0;
4449
+ if (measure.refreshPadding()) {
4450
+ syncPadding();
4451
+ metrics.value++;
4452
+ syncInput();
4453
+ }
4425
4454
  updateClip();
4426
4455
  });
4427
4456
  resize.observe(el);
@@ -4586,6 +4615,8 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
4586
4615
  unref(ns).is("focused", focused.value),
4587
4616
  unref(ns).is("readonly", !!__props.readonly),
4588
4617
  unref(ns).is("disabled", !!__props.disabled),
4618
+ unref(ns).is("line-numbers", __props.lineNumbers),
4619
+ unref(ns).is("gutter-empty", !gutterWidth.value),
4589
4620
  unref(ns).is("foldable", __props.foldable),
4590
4621
  unref(ns).is("wrap", __props.wrap),
4591
4622
  unref(ns).is("bordered", __props.bordered),
@@ -4594,6 +4625,8 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
4594
4625
  style: normalizeStyle({
4595
4626
  "--dou-code-editor-gutter": `${gutterWidth.value}px`,
4596
4627
  "--dou-code-editor-gutter-cells": `${gutterCells.value}px`,
4628
+ "--dou-code-editor-view-width": viewWidth.value > 0 ? `${viewWidth.value}px` : void 0,
4629
+ "--dou-code-editor-widget-width": viewWidth.value > 0 ? `${Math.max(0, viewWidth.value - gutterWidth.value)}px` : void 0,
4597
4630
  "--dou-code-editor-tab-size": __props.tabSize
4598
4631
  })
4599
4632
  }, [
@@ -4711,160 +4744,203 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
4711
4744
  height: `${sizerHeight.value}px`,
4712
4745
  minWidth: `max(100%, ${contentWidth.value + gutterWidth.value}px)`
4713
4746
  })
4714
- }, [__props.gutter && (__props.lineNumbers || __props.foldable || gutterCells.value) ? (openBlock(), createElementBlock("div", {
4715
- key: 0,
4716
- class: normalizeClass(unref(ns).e("gutter")),
4717
- onPointerdown: _cache[5] || (_cache[5] = ($event) => onPointerDown($event, "gutter")),
4718
- onPointermove: onPointerMove,
4719
- onPointerup: _cache[6] || (_cache[6] = ($event) => onPointerUp($event, "gutter")),
4720
- onPointercancel: onPointerCancel,
4721
- onPointerenter: _cache[7] || (_cache[7] = ($event) => gutterHover.value = true),
4722
- onPointerleave: _cache[8] || (_cache[8] = ($event) => gutterHover.value = false),
4723
- onMousedown: _cache[9] || (_cache[9] = withModifiers(() => {}, ["prevent"]))
4724
- }, [createElementVNode("div", {
4725
- class: normalizeClass(unref(ns).e("numbers")),
4726
- style: normalizeStyle({ transform: `translateY(${yOf(visibleFrom.value)}px)` })
4727
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(rows.value, (row) => {
4728
- return openBlock(), createElementBlock("div", {
4729
- key: row.n,
4730
- class: normalizeClass([
4731
- unref(ns).e("number"),
4732
- unref(ns).is("active", row.n === activeLineNumber.value),
4733
- unref(ns).is("hovered", row.n === hoveredLine.value)
4734
- ]),
4735
- style: normalizeStyle({
4736
- height: row.wrapped.breaks.length ? `${(row.wrapped.breaks.length + 1) * lineHeight.value}px` : void 0,
4737
- marginTop: gapBefore(row.n) ? `${gapBefore(row.n)}px` : void 0
4738
- })
4739
- }, [
4740
- gutterCells.value ? (openBlock(), createElementBlock("span", {
4741
- key: 0,
4742
- class: normalizeClass(unref(ns).e("cells"))
4743
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(gutterColumns.value, (column, c) => {
4744
- return openBlock(), createElementBlock("span", mergeProps({
4745
- key: column.name,
4746
- class: [
4747
- unref(ns).e("cell"),
4748
- unref(ns).is("on-hover", gutterMarkers.value[c]?.get(row.n)?.visible === "hover"),
4749
- gutterMarkers.value[c]?.get(row.n)?.class
4750
- ],
4751
- style: { width: `${column.width}px` },
4752
- title: gutterMarkers.value[c]?.get(row.n)?.title,
4753
- "data-gutter-cell": column.onPress && (column.pressOn !== "markers" || gutterMarkers.value[c]?.has(row.n)) ? c : void 0,
4754
- "data-line": row.n
4755
- }, { ref_for: true }, column.onPress && gutterMarkers.value[c]?.get(row.n) && !__props.disabled ? {
4756
- role: "button",
4757
- tabindex: row.n === activeLineNumber.value ? 0 : -1,
4758
- "aria-label": gutterMarkers.value[c].get(row.n).title
4759
- } : { "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);
4760
- }), 128))], 2)) : createCommentVNode("", true),
4761
- __props.lineNumbers ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(row.n), 1)) : createCommentVNode("", true),
4762
- __props.foldable && (row.folded || foldableLines.value.has(row.n)) ? (openBlock(), createElementBlock("span", {
4763
- key: 2,
4764
- class: normalizeClass([unref(ns).e("fold-toggle"), unref(ns).is("folded", row.folded)]),
4765
- "data-fold": row.n,
4766
- "aria-hidden": "true"
4767
- }, [row.folded ? (openBlock(), createBlock(unref(ChevronRightIcon), { key: 0 })) : (openBlock(), createBlock(unref(ChevronDownIcon), { key: 1 }))], 10, _hoisted_3)) : createCommentVNode("", true)
4768
- ], 6);
4769
- }), 128))], 6)], 34)) : createCommentVNode("", true), createElementVNode("div", {
4770
- ref_key: "content",
4771
- ref: content,
4772
- class: normalizeClass(unref(ns).e("content")),
4773
- onPointerdown: _cache[21] || (_cache[21] = ($event) => onPointerDown($event, "text")),
4774
- onPointermove: _cache[22] || (_cache[22] = ($event) => (onPointerMove($event), onContentHover($event))),
4775
- onPointerup: _cache[23] || (_cache[23] = ($event) => onPointerUp($event, "text")),
4776
- onPointercancel: onPointerCancel,
4777
- onPointerleave: onContentLeave,
4778
- onMousedown: _cache[24] || (_cache[24] = withModifiers(() => {}, ["prevent"]))
4779
4747
  }, [
4780
- createElementVNode("div", {
4781
- ref_key: "probe",
4782
- ref: probe,
4783
- class: normalizeClass(unref(ns).e("probe")),
4784
- "aria-hidden": "true"
4785
- }, null, 2),
4786
- __props.activeLine && activeLineTop.value !== null && !__props.disabled ? (openBlock(), createElementBlock("div", {
4748
+ __props.gutter && (__props.lineNumbers || __props.foldable || gutterColumns.value.length) ? (openBlock(), createElementBlock("div", {
4787
4749
  key: 0,
4788
- class: normalizeClass(unref(ns).e("active-line")),
4789
- style: normalizeStyle({
4790
- transform: `translateY(${activeLineTop.value}px)`,
4791
- height: activeLineRows.value > 1 ? `${activeLineRows.value * lineHeight.value}px` : void 0
4792
- })
4793
- }, null, 6)) : createCommentVNode("", true),
4794
- createElementVNode("div", {
4795
- class: normalizeClass(unref(ns).e("matches")),
4796
- "aria-hidden": "true"
4797
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(matchBoxes.value, (box) => {
4798
- return openBlock(), createElementBlock("div", {
4799
- key: box.key,
4800
- class: normalizeClass([unref(ns).e("match"), unref(ns).is("current", box.current)]),
4801
- style: normalizeStyle({
4802
- transform: `translate(${box.left}px, ${box.top}px)`,
4803
- width: `${box.width}px`
4804
- })
4805
- }, null, 6);
4806
- }), 128))], 2),
4807
- createElementVNode("div", {
4808
- class: normalizeClass(unref(ns).e("brackets")),
4809
- "aria-hidden": "true"
4810
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(bracketBoxes.value, (box) => {
4750
+ class: normalizeClass(unref(ns).e("gutter")),
4751
+ onPointerdown: _cache[5] || (_cache[5] = ($event) => onPointerDown($event, "gutter")),
4752
+ onPointermove: onPointerMove,
4753
+ onPointerup: _cache[6] || (_cache[6] = ($event) => onPointerUp($event, "gutter")),
4754
+ onPointercancel: onPointerCancel,
4755
+ onPointerenter: _cache[7] || (_cache[7] = ($event) => gutterHover.value = true),
4756
+ onPointerleave: _cache[8] || (_cache[8] = ($event) => gutterHover.value = false),
4757
+ onMousedown: _cache[9] || (_cache[9] = withModifiers(() => {}, ["prevent"]))
4758
+ }, [createElementVNode("div", {
4759
+ class: normalizeClass(unref(ns).e("numbers")),
4760
+ style: normalizeStyle({ transform: `translateY(${yOf(visibleFrom.value)}px)` })
4761
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(rows.value, (row) => {
4811
4762
  return openBlock(), createElementBlock("div", {
4812
- key: box.key,
4813
- class: normalizeClass([unref(ns).e("bracket"), unref(ns).is("unmatched", !box.matched)]),
4763
+ key: row.n,
4764
+ class: normalizeClass([
4765
+ unref(ns).e("number"),
4766
+ unref(ns).is("active", row.n === activeLineNumber.value),
4767
+ unref(ns).is("hovered", row.n === hoveredLine.value)
4768
+ ]),
4814
4769
  style: normalizeStyle({
4815
- transform: `translate(${box.left}px, ${box.top}px)`,
4816
- width: `${box.width}px`
4770
+ height: row.wrapped.breaks.length ? `${(row.wrapped.breaks.length + 1) * lineHeight.value}px` : void 0,
4771
+ marginTop: gapBefore(row.n) ? `${gapBefore(row.n)}px` : void 0
4817
4772
  })
4818
- }, null, 6);
4819
- }), 128))], 2),
4773
+ }, [
4774
+ flowGutterColumns.value.length ? (openBlock(), createElementBlock("span", {
4775
+ key: 0,
4776
+ class: normalizeClass(unref(ns).e("cells"))
4777
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(flowGutterColumns.value, (item) => {
4778
+ return openBlock(), createElementBlock("span", mergeProps({
4779
+ key: item.column.name,
4780
+ class: [
4781
+ unref(ns).e("cell"),
4782
+ unref(ns).is("on-hover", gutterMarkers.value[item.index]?.get(row.n)?.visible === "hover"),
4783
+ gutterMarkers.value[item.index]?.get(row.n)?.class
4784
+ ],
4785
+ style: { width: `${item.column.width}px` },
4786
+ title: gutterMarkers.value[item.index]?.get(row.n)?.title,
4787
+ "data-gutter-cell": item.column.onPress && (item.column.pressOn !== "markers" || gutterMarkers.value[item.index]?.has(row.n)) ? item.index : void 0,
4788
+ "data-line": row.n
4789
+ }, { ref_for: true }, item.column.onPress && gutterMarkers.value[item.index]?.get(row.n) && !__props.disabled ? {
4790
+ role: "button",
4791
+ tabindex: row.n === activeLineNumber.value ? 0 : -1,
4792
+ "aria-label": gutterMarkers.value[item.index].get(row.n).title
4793
+ } : { "aria-hidden": "true" }, { onKeydown: ($event) => onCellKeydown($event, item.index, row.n) }), [gutterMarkers.value[item.index]?.get(row.n) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [gutterMarkers.value[item.index].get(row.n).icon ? (openBlock(), createBlock(resolveDynamicComponent(gutterMarkers.value[item.index].get(row.n).icon), { key: 0 })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(gutterMarkers.value[item.index].get(row.n).text), 1)], 64))], 64)) : createCommentVNode("", true)], 16, _hoisted_1);
4794
+ }), 128))], 2)) : createCommentVNode("", true),
4795
+ __props.lineNumbers ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(row.n), 1)) : createCommentVNode("", true),
4796
+ __props.foldable && (row.folded || foldableLines.value.has(row.n)) ? (openBlock(), createElementBlock("span", {
4797
+ key: 2,
4798
+ class: normalizeClass([unref(ns).e("fold-toggle"), unref(ns).is("folded", row.folded)]),
4799
+ "data-fold": row.n,
4800
+ "aria-hidden": "true"
4801
+ }, [row.folded ? (openBlock(), createBlock(unref(ChevronRightIcon), { key: 0 })) : (openBlock(), createBlock(unref(ChevronDownIcon), { key: 1 }))], 10, _hoisted_3)) : createCommentVNode("", true),
4802
+ overlayGutterColumns.value.length ? (openBlock(), createElementBlock("span", {
4803
+ key: 3,
4804
+ class: normalizeClass(unref(ns).e("overlays"))
4805
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(overlayGutterColumns.value, (item) => {
4806
+ return openBlock(), createElementBlock(Fragment, { key: item.column.name }, [gutterMarkers.value[item.index]?.get(row.n) ? (openBlock(), createElementBlock("span", mergeProps({
4807
+ key: 0,
4808
+ class: [
4809
+ unref(ns).e("cell"),
4810
+ unref(ns).is("overlay", true),
4811
+ unref(ns).is("on-hover", gutterMarkers.value[item.index].get(row.n).visible === "hover"),
4812
+ gutterMarkers.value[item.index].get(row.n).class
4813
+ ],
4814
+ style: { width: `${item.column.width}px` },
4815
+ title: gutterMarkers.value[item.index].get(row.n).title,
4816
+ "data-gutter-cell": item.column.onPress ? item.index : void 0,
4817
+ "data-line": row.n
4818
+ }, { ref_for: true }, item.column.onPress && !__props.disabled ? {
4819
+ role: "button",
4820
+ tabindex: row.n === activeLineNumber.value ? 0 : -1,
4821
+ "aria-label": gutterMarkers.value[item.index].get(row.n).title
4822
+ } : { "aria-hidden": "true" }, { onKeydown: ($event) => onCellKeydown($event, item.index, row.n) }), [gutterMarkers.value[item.index].get(row.n).icon ? (openBlock(), createBlock(resolveDynamicComponent(gutterMarkers.value[item.index].get(row.n).icon), { key: 0 })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(gutterMarkers.value[item.index].get(row.n).text), 1)], 64))], 16, _hoisted_4)) : createCommentVNode("", true)], 64);
4823
+ }), 128))], 2)) : createCommentVNode("", true)
4824
+ ], 6);
4825
+ }), 128))], 6)], 34)) : createCommentVNode("", true),
4820
4826
  createElementVNode("div", {
4821
- class: normalizeClass(unref(ns).e("selections")),
4822
- "aria-hidden": "true"
4823
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(selectionBoxes.value, (box) => {
4824
- return openBlock(), createElementBlock("div", {
4825
- key: box.key,
4826
- class: normalizeClass(unref(ns).e("selection")),
4827
+ ref_key: "content",
4828
+ ref: content,
4829
+ class: normalizeClass(unref(ns).e("content")),
4830
+ onPointerdown: _cache[18] || (_cache[18] = ($event) => onPointerDown($event, "text")),
4831
+ onPointermove: _cache[19] || (_cache[19] = ($event) => (onPointerMove($event), onContentHover($event))),
4832
+ onPointerup: _cache[20] || (_cache[20] = ($event) => onPointerUp($event, "text")),
4833
+ onPointercancel: onPointerCancel,
4834
+ onPointerleave: onContentLeave,
4835
+ onMousedown: _cache[21] || (_cache[21] = withModifiers(() => {}, ["prevent"]))
4836
+ }, [
4837
+ createElementVNode("div", {
4838
+ ref_key: "probe",
4839
+ ref: probe,
4840
+ class: normalizeClass(unref(ns).e("probe")),
4841
+ "aria-hidden": "true"
4842
+ }, null, 2),
4843
+ __props.activeLine && activeLineTop.value !== null && !__props.disabled ? (openBlock(), createElementBlock("div", {
4844
+ key: 0,
4845
+ class: normalizeClass(unref(ns).e("active-line")),
4827
4846
  style: normalizeStyle({
4828
- transform: `translate(${box.left}px, ${box.top}px)`,
4829
- width: `${box.width}px`
4847
+ transform: `translateY(${activeLineTop.value}px)`,
4848
+ height: activeLineRows.value > 1 ? `${activeLineRows.value * lineHeight.value}px` : void 0
4830
4849
  })
4831
- }, null, 6);
4832
- }), 128))], 2),
4833
- createElementVNode("div", {
4834
- class: normalizeClass(unref(ns).e("lines")),
4835
- "aria-hidden": "true",
4836
- style: normalizeStyle({ transform: `translateY(${yOf(visibleFrom.value)}px)` })
4837
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(rows.value, (row, __, ___, _cached) => {
4838
- const _memo = [
4839
- row.text,
4840
- row.tokens,
4841
- row.compose?.join("\0"),
4842
- row.wrapped,
4843
- row.folded,
4844
- row.marksKey,
4845
- row.inlinesKey,
4846
- row.lineClass,
4847
- gapBefore(row.n)
4848
- ];
4849
- if (_cached && _cached.el && _cached.key === row.n && isMemoSame(_cached, _memo)) return _cached;
4850
- const _item = (openBlock(), createElementBlock("div", {
4851
- key: row.n,
4852
- class: normalizeClass([
4853
- unref(ns).e("line"),
4854
- unref(ns).is("wrapped", !!row.wrapped.breaks.length),
4855
- row.lineClass
4856
- ]),
4857
- style: normalizeStyle(gapBefore(row.n) ? { marginTop: `${gapBefore(row.n)}px` } : void 0)
4858
- }, [row.compose ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
4859
- createTextVNode(toDisplayString(row.compose[0]), 1),
4860
- createElementVNode("span", { class: normalizeClass(unref(ns).e("compose")) }, toDisplayString(row.compose[1]), 3),
4861
- createTextVNode(toDisplayString(row.compose[2]), 1)
4862
- ], 64)) : row.wrapped.breaks.length ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(row.wrapped.breaks.length + 1, (_, sub) => {
4850
+ }, null, 6)) : createCommentVNode("", true),
4851
+ createElementVNode("div", {
4852
+ class: normalizeClass(unref(ns).e("matches")),
4853
+ "aria-hidden": "true"
4854
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(matchBoxes.value, (box) => {
4855
+ return openBlock(), createElementBlock("div", {
4856
+ key: box.key,
4857
+ class: normalizeClass([unref(ns).e("match"), unref(ns).is("current", box.current)]),
4858
+ style: normalizeStyle({
4859
+ transform: `translate(${box.left}px, ${box.top}px)`,
4860
+ width: `${box.width}px`
4861
+ })
4862
+ }, null, 6);
4863
+ }), 128))], 2),
4864
+ createElementVNode("div", {
4865
+ class: normalizeClass(unref(ns).e("brackets")),
4866
+ "aria-hidden": "true"
4867
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(bracketBoxes.value, (box) => {
4863
4868
  return openBlock(), createElementBlock("div", {
4864
- key: sub,
4865
- class: normalizeClass(unref(ns).e("row")),
4866
- style: normalizeStyle(sub ? { paddingLeft: `${row.wrapped.indent}px` } : void 0)
4867
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(rowParts(row, sub), (part, i) => {
4869
+ key: box.key,
4870
+ class: normalizeClass([unref(ns).e("bracket"), unref(ns).is("unmatched", !box.matched)]),
4871
+ style: normalizeStyle({
4872
+ transform: `translate(${box.left}px, ${box.top}px)`,
4873
+ width: `${box.width}px`
4874
+ })
4875
+ }, null, 6);
4876
+ }), 128))], 2),
4877
+ createElementVNode("div", {
4878
+ class: normalizeClass(unref(ns).e("selections")),
4879
+ "aria-hidden": "true"
4880
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(selectionBoxes.value, (box) => {
4881
+ return openBlock(), createElementBlock("div", {
4882
+ key: box.key,
4883
+ class: normalizeClass(unref(ns).e("selection")),
4884
+ style: normalizeStyle({
4885
+ transform: `translate(${box.left}px, ${box.top}px)`,
4886
+ width: `${box.width}px`
4887
+ })
4888
+ }, null, 6);
4889
+ }), 128))], 2),
4890
+ createElementVNode("div", {
4891
+ class: normalizeClass(unref(ns).e("lines")),
4892
+ "aria-hidden": "true",
4893
+ style: normalizeStyle({ transform: `translateY(${yOf(visibleFrom.value)}px)` })
4894
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(rows.value, (row, __, ___, _cached) => {
4895
+ const _memo = [
4896
+ row.text,
4897
+ row.tokens,
4898
+ row.compose?.join("\0"),
4899
+ row.wrapped,
4900
+ row.folded,
4901
+ row.marksKey,
4902
+ row.inlinesKey,
4903
+ row.lineClass,
4904
+ gapBefore(row.n)
4905
+ ];
4906
+ if (_cached && _cached.el && _cached.key === row.n && isMemoSame(_cached, _memo)) return _cached;
4907
+ const _item = (openBlock(), createElementBlock("div", {
4908
+ key: row.n,
4909
+ class: normalizeClass([
4910
+ unref(ns).e("line"),
4911
+ unref(ns).is("wrapped", !!row.wrapped.breaks.length),
4912
+ row.lineClass
4913
+ ]),
4914
+ style: normalizeStyle(gapBefore(row.n) ? { marginTop: `${gapBefore(row.n)}px` } : void 0)
4915
+ }, [row.compose ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
4916
+ createTextVNode(toDisplayString(row.compose[0]), 1),
4917
+ createElementVNode("span", { class: normalizeClass(unref(ns).e("compose")) }, toDisplayString(row.compose[1]), 3),
4918
+ createTextVNode(toDisplayString(row.compose[2]), 1)
4919
+ ], 64)) : row.wrapped.breaks.length ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(row.wrapped.breaks.length + 1, (_, sub) => {
4920
+ return openBlock(), createElementBlock("div", {
4921
+ key: sub,
4922
+ class: normalizeClass(unref(ns).e("row")),
4923
+ style: normalizeStyle(sub ? { paddingLeft: `${row.wrapped.indent}px` } : void 0)
4924
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(rowParts(row, sub), (part, i) => {
4925
+ return openBlock(), createElementBlock(Fragment, { key: i }, [part[3] !== void 0 ? (openBlock(), createElementBlock("span", {
4926
+ key: 0,
4927
+ ref_for: true,
4928
+ ref: (el) => observeInline(el, row.inlines[part[3]].key, row.inlines[part[3]].width),
4929
+ class: normalizeClass(unref(ns).e("inline")),
4930
+ style: normalizeStyle(row.inlines[part[3]].width !== void 0 ? { width: `${row.inlines[part[3]].width}px` } : void 0)
4931
+ }, [createVNode(unref(render_part_default), { render: row.inlines[part[3]].render }, null, 8, ["render"])], 6)) : part[1] ? (openBlock(), createElementBlock("span", {
4932
+ key: 1,
4933
+ class: normalizeClass(part[1]),
4934
+ title: part[2],
4935
+ style: normalizeStyle(part[4])
4936
+ }, toDisplayString(part[0]), 15, _hoisted_5)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [createTextVNode(toDisplayString(part[0]), 1)], 64))], 64);
4937
+ }), 128)), row.folded && sub === row.wrapped.breaks.length ? (openBlock(), createElementBlock("span", {
4938
+ key: 0,
4939
+ class: normalizeClass(unref(ns).e("fold-marker")),
4940
+ "data-unfold": row.n,
4941
+ title: unref(messages).unfold
4942
+ }, "⋯", 10, _hoisted_6)) : createCommentVNode("", true)], 6);
4943
+ }), 128)) : row.tokens || row.marks || row.inlines ? (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(partsOf(row), (part, i) => {
4868
4944
  return openBlock(), createElementBlock(Fragment, { key: i }, [part[3] !== void 0 ? (openBlock(), createElementBlock("span", {
4869
4945
  key: 0,
4870
4946
  ref_for: true,
@@ -4876,285 +4952,266 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
4876
4952
  class: normalizeClass(part[1]),
4877
4953
  title: part[2],
4878
4954
  style: normalizeStyle(part[4])
4879
- }, toDisplayString(part[0]), 15, _hoisted_4)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [createTextVNode(toDisplayString(part[0]), 1)], 64))], 64);
4880
- }), 128)), row.folded && sub === row.wrapped.breaks.length ? (openBlock(), createElementBlock("span", {
4881
- key: 0,
4955
+ }, toDisplayString(part[0]), 15, _hoisted_7)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [createTextVNode(toDisplayString(part[0]), 1)], 64))], 64);
4956
+ }), 128)) : (openBlock(), createElementBlock(Fragment, { key: 3 }, [createTextVNode(toDisplayString(row.text), 1)], 64)), row.folded && !row.wrapped.breaks.length ? (openBlock(), createElementBlock("span", {
4957
+ key: 4,
4882
4958
  class: normalizeClass(unref(ns).e("fold-marker")),
4883
4959
  "data-unfold": row.n,
4884
4960
  title: unref(messages).unfold
4885
- }, "⋯", 10, _hoisted_5)) : createCommentVNode("", true)], 6);
4886
- }), 128)) : row.tokens || row.marks || row.inlines ? (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(partsOf(row), (part, i) => {
4887
- return openBlock(), createElementBlock(Fragment, { key: i }, [part[3] !== void 0 ? (openBlock(), createElementBlock("span", {
4961
+ }, "⋯", 10, _hoisted_8)) : createCommentVNode("", true)], 6));
4962
+ _item.memo = _memo;
4963
+ return _item;
4964
+ }, _cache, 10), 128))], 6),
4965
+ __props.placeholder && !doc.value.length && !composing.value ? (openBlock(), createElementBlock("div", {
4966
+ key: 1,
4967
+ class: normalizeClass(unref(ns).e("placeholder")),
4968
+ "aria-hidden": "true"
4969
+ }, toDisplayString(__props.placeholder), 3)) : createCommentVNode("", true),
4970
+ focused.value ? (openBlock(), createElementBlock("div", {
4971
+ key: blink.value,
4972
+ class: normalizeClass(unref(ns).e("cursors")),
4973
+ "aria-hidden": "true"
4974
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(cursors.value, (cursor) => {
4975
+ return openBlock(), createElementBlock("div", {
4976
+ key: cursor.key,
4977
+ class: normalizeClass(unref(ns).e("cursor")),
4978
+ style: normalizeStyle({ transform: `translate(${cursor.left - 1}px, ${cursor.top}px)` })
4979
+ }, null, 6);
4980
+ }), 128))], 2)) : createCommentVNode("", true),
4981
+ (openBlock(), createBlock(Teleport, {
4982
+ to: floatingTarget.value || "body",
4983
+ disabled: !floatingTarget.value
4984
+ }, [createElementVNode("div", {
4985
+ ref_key: "floatingEl",
4986
+ ref: floatingEl,
4987
+ class: normalizeClass([
4988
+ unref(ns).e("floating"),
4989
+ unref(ns).is("outside", !!floatingTarget.value),
4990
+ unref(ns).is("fixed", !!floatingTarget.value && anchorMode.value === "fixed"),
4991
+ unref(ns).is("scrolling", !!floatingTarget.value && boxScrolling.value)
4992
+ ]),
4993
+ style: normalizeStyle(floatingTarget.value ? {
4994
+ ...frameVars.value,
4995
+ zIndex: floatingZ.value,
4996
+ transform: `translate(${layerShift.value.x}px, ${layerShift.value.y}px)`
4997
+ } : void 0)
4998
+ }, [
4999
+ problemStyle.value ? (openBlock(), createElementBlock("div", {
4888
5000
  key: 0,
4889
- ref_for: true,
4890
- ref: (el) => observeInline(el, row.inlines[part[3]].key, row.inlines[part[3]].width),
4891
- class: normalizeClass(unref(ns).e("inline")),
4892
- style: normalizeStyle(row.inlines[part[3]].width !== void 0 ? { width: `${row.inlines[part[3]].width}px` } : void 0)
4893
- }, [createVNode(unref(render_part_default), { render: row.inlines[part[3]].render }, null, 8, ["render"])], 6)) : part[1] ? (openBlock(), createElementBlock("span", {
5001
+ ref_key: "problemEl",
5002
+ ref: problemEl,
5003
+ class: normalizeClass(unref(ns).e("problems")),
5004
+ role: "group",
5005
+ "aria-label": problemBox.value.problems.length ? unref(messages).problems : unref(messages).details,
5006
+ style: normalizeStyle(problemStyle.value),
5007
+ onPointerdown: _cache[12] || (_cache[12] = withModifiers(() => {}, ["stop", "prevent"])),
5008
+ onPointermove: _cache[13] || (_cache[13] = withModifiers(() => {}, ["stop"])),
5009
+ onPointerenter: keepProblems,
5010
+ onPointerleave: onContentLeave
5011
+ }, [
5012
+ (openBlock(true), createElementBlock(Fragment, null, renderList(problemBox.value.info, (item, i) => {
5013
+ return openBlock(), createElementBlock("div", {
5014
+ key: `info-${i}`,
5015
+ class: normalizeClass(unref(ns).e("hover"))
5016
+ }, [typeof item === "string" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(item), 1)], 64)) : (openBlock(), createBlock(unref(render_part_default), {
5017
+ key: 1,
5018
+ render: item
5019
+ }, null, 8, ["render"]))], 2);
5020
+ }), 128)),
5021
+ (openBlock(true), createElementBlock(Fragment, null, renderList(problemBox.value.problems, (problem, i) => {
5022
+ return openBlock(), createElementBlock("div", {
5023
+ key: i,
5024
+ class: normalizeClass([unref(ns).e("problem-item"), unref(ns).is(problem.severity, true)])
5025
+ }, [(openBlock(), createBlock(resolveDynamicComponent(SEVERITY_ICON[problem.severity]), { class: normalizeClass(unref(ns).e("problem-severity")) }, null, 8, ["class"])), createElementVNode("span", { class: normalizeClass(unref(ns).e("problem-message")) }, [createTextVNode(toDisplayString(problem.message), 1), problem.source ? (openBlock(), createElementBlock("span", {
5026
+ key: 0,
5027
+ class: normalizeClass(unref(ns).e("problem-source"))
5028
+ }, toDisplayString(problem.source), 3)) : createCommentVNode("", true)], 2)], 2);
5029
+ }), 128)),
5030
+ fixes.value.length ? (openBlock(), createElementBlock("div", {
5031
+ key: 0,
5032
+ class: normalizeClass(unref(ns).e("fixes"))
5033
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(fixes.value, (fix, i) => {
5034
+ return openBlock(), createElementBlock("button", {
5035
+ key: i,
5036
+ type: "button",
5037
+ tabindex: "-1",
5038
+ class: normalizeClass([unref(ns).e("fix"), unref(ns).is("active", i === problemBox.value.index)]),
5039
+ "aria-current": i === problemBox.value.index || void 0,
5040
+ onClick: ($event) => runFix(i)
5041
+ }, toDisplayString(fix.action.label), 11, _hoisted_10);
5042
+ }), 128))], 2)) : createCommentVNode("", true)
5043
+ ], 46, _hoisted_9)) : createCommentVNode("", true),
5044
+ completionStyle.value ? (openBlock(), createElementBlock("div", {
4894
5045
  key: 1,
4895
- class: normalizeClass(part[1]),
4896
- title: part[2],
4897
- style: normalizeStyle(part[4])
4898
- }, toDisplayString(part[0]), 15, _hoisted_6)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [createTextVNode(toDisplayString(part[0]), 1)], 64))], 64);
4899
- }), 128)) : (openBlock(), createElementBlock(Fragment, { key: 3 }, [createTextVNode(toDisplayString(row.text), 1)], 64)), row.folded && !row.wrapped.breaks.length ? (openBlock(), createElementBlock("span", {
4900
- key: 4,
4901
- class: normalizeClass(unref(ns).e("fold-marker")),
4902
- "data-unfold": row.n,
4903
- title: unref(messages).unfold
4904
- }, "⋯", 10, _hoisted_7)) : createCommentVNode("", true)], 6));
4905
- _item.memo = _memo;
4906
- return _item;
4907
- }, _cache, 10), 128))], 6),
4908
- __props.placeholder && !doc.value.length && !composing.value ? (openBlock(), createElementBlock("div", {
4909
- key: 1,
4910
- class: normalizeClass(unref(ns).e("placeholder")),
4911
- "aria-hidden": "true"
4912
- }, toDisplayString(__props.placeholder), 3)) : createCommentVNode("", true),
4913
- focused.value ? (openBlock(), createElementBlock("div", {
4914
- key: blink.value,
4915
- class: normalizeClass(unref(ns).e("cursors")),
4916
- "aria-hidden": "true"
4917
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(cursors.value, (cursor) => {
4918
- return openBlock(), createElementBlock("div", {
4919
- key: cursor.key,
4920
- class: normalizeClass(unref(ns).e("cursor")),
4921
- style: normalizeStyle({ transform: `translate(${cursor.left - 1}px, ${cursor.top}px)` })
4922
- }, null, 6);
4923
- }), 128))], 2)) : createCommentVNode("", true),
4924
- (openBlock(), createBlock(Teleport, {
4925
- to: floatingTarget.value || "body",
4926
- disabled: !floatingTarget.value
4927
- }, [createElementVNode("div", {
4928
- ref_key: "floatingEl",
4929
- ref: floatingEl,
4930
- class: normalizeClass([
4931
- unref(ns).e("floating"),
4932
- unref(ns).is("outside", !!floatingTarget.value),
4933
- unref(ns).is("fixed", !!floatingTarget.value && anchorMode.value === "fixed"),
4934
- unref(ns).is("scrolling", !!floatingTarget.value && boxScrolling.value)
4935
- ]),
4936
- style: normalizeStyle(floatingTarget.value ? {
4937
- ...frameVars.value,
4938
- zIndex: floatingZ.value,
4939
- transform: `translate(${layerShift.value.x}px, ${layerShift.value.y}px)`
4940
- } : void 0)
4941
- }, [
4942
- problemStyle.value ? (openBlock(), createElementBlock("div", {
4943
- key: 0,
4944
- ref_key: "problemEl",
4945
- ref: problemEl,
4946
- class: normalizeClass(unref(ns).e("problems")),
4947
- role: "group",
4948
- "aria-label": problemBox.value.problems.length ? unref(messages).problems : unref(messages).details,
4949
- style: normalizeStyle(problemStyle.value),
4950
- onPointerdown: _cache[12] || (_cache[12] = withModifiers(() => {}, ["stop", "prevent"])),
4951
- onPointermove: _cache[13] || (_cache[13] = withModifiers(() => {}, ["stop"])),
4952
- onPointerenter: keepProblems,
4953
- onPointerleave: onContentLeave
4954
- }, [
4955
- (openBlock(true), createElementBlock(Fragment, null, renderList(problemBox.value.info, (item, i) => {
4956
- return openBlock(), createElementBlock("div", {
4957
- key: `info-${i}`,
4958
- class: normalizeClass(unref(ns).e("hover"))
4959
- }, [typeof item === "string" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(item), 1)], 64)) : (openBlock(), createBlock(unref(render_part_default), {
4960
- key: 1,
4961
- render: item
4962
- }, null, 8, ["render"]))], 2);
4963
- }), 128)),
4964
- (openBlock(true), createElementBlock(Fragment, null, renderList(problemBox.value.problems, (problem, i) => {
5046
+ ref_key: "completionEl",
5047
+ ref: completionEl,
5048
+ class: normalizeClass(unref(ns).e("completions")),
5049
+ style: normalizeStyle(completionStyle.value),
5050
+ onPointerdown: _cache[14] || (_cache[14] = withModifiers(() => {}, ["stop", "prevent"])),
5051
+ onPointermove: _cache[15] || (_cache[15] = withModifiers(() => {}, ["stop"]))
5052
+ }, [createElementVNode("div", {
5053
+ id: completionId,
5054
+ ref_key: "completionList",
5055
+ ref: completionList,
5056
+ class: normalizeClass(unref(ns).e("completion-list")),
5057
+ role: "listbox",
5058
+ "aria-label": unref(messages).completions
5059
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(completion.value.items, (item, i) => {
4965
5060
  return openBlock(), createElementBlock("div", {
5061
+ id: `${completionId}-${i}`,
4966
5062
  key: i,
4967
- class: normalizeClass([unref(ns).e("problem-item"), unref(ns).is(problem.severity, true)])
4968
- }, [(openBlock(), createBlock(resolveDynamicComponent(SEVERITY_ICON[problem.severity]), { class: normalizeClass(unref(ns).e("problem-severity")) }, null, 8, ["class"])), createElementVNode("span", { class: normalizeClass(unref(ns).e("problem-message")) }, [createTextVNode(toDisplayString(problem.message), 1), problem.source ? (openBlock(), createElementBlock("span", {
5063
+ role: "option",
5064
+ "aria-selected": i === completion.value.index,
5065
+ class: normalizeClass([unref(ns).e("completion"), unref(ns).is("active", i === completion.value.index)]),
5066
+ onClick: ($event) => acceptCompletion(i)
5067
+ }, [
5068
+ (openBlock(), createBlock(resolveDynamicComponent(KIND_ICON[item.option.kind ?? "text"]), {
5069
+ class: normalizeClass([unref(ns).e("completion-kind"), unref(ns).is(item.option.kind ?? "text", true)]),
5070
+ "aria-hidden": "true"
5071
+ }, null, 8, ["class"])),
5072
+ createElementVNode("span", { class: normalizeClass(unref(ns).e("completion-label")) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(labelParts(item), (part, j) => {
5073
+ return openBlock(), createElementBlock(Fragment, { key: j }, [part[1] ? (openBlock(), createElementBlock("mark", {
5074
+ key: 0,
5075
+ class: normalizeClass(unref(ns).e("completion-match"))
5076
+ }, toDisplayString(part[0]), 3)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(part[0]), 1)], 64))], 64);
5077
+ }), 128))], 2),
5078
+ item.option.detail ? (openBlock(), createElementBlock("span", {
5079
+ key: 0,
5080
+ class: normalizeClass(unref(ns).e("completion-detail"))
5081
+ }, toDisplayString(item.option.detail), 3)) : createCommentVNode("", true)
5082
+ ], 10, _hoisted_12);
5083
+ }), 128))], 10, _hoisted_11), completion.value.items[completion.value.index]?.option.info ? (openBlock(), createElementBlock("div", {
5084
+ key: 0,
5085
+ class: normalizeClass(unref(ns).e("completion-info"))
5086
+ }, [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), {
5087
+ key: 1,
5088
+ render: completion.value.items[completion.value.index].option.info
5089
+ }, null, 8, ["render"]))], 2)) : createCommentVNode("", true)], 38)) : createCommentVNode("", true),
5090
+ signatureStyle.value ? (openBlock(), createElementBlock("div", {
5091
+ key: 2,
5092
+ ref_key: "signatureEl",
5093
+ ref: signatureEl,
5094
+ class: normalizeClass(unref(ns).e("signature")),
5095
+ role: "note",
5096
+ "aria-label": unref(messages).signature,
5097
+ style: normalizeStyle(signatureStyle.value),
5098
+ onPointerdown: _cache[16] || (_cache[16] = withModifiers(() => {}, ["stop", "prevent"]))
5099
+ }, [createElementVNode("div", { class: normalizeClass(unref(ns).e("signature-label")) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(signatureParts.value, (part, i) => {
5100
+ return openBlock(), createElementBlock(Fragment, { key: i }, [part[1] ? (openBlock(), createElementBlock("span", {
4969
5101
  key: 0,
4970
- class: normalizeClass(unref(ns).e("problem-source"))
4971
- }, toDisplayString(problem.source), 3)) : createCommentVNode("", true)], 2)], 2);
4972
- }), 128)),
4973
- fixes.value.length ? (openBlock(), createElementBlock("div", {
5102
+ class: normalizeClass(unref(ns).e("signature-active"))
5103
+ }, toDisplayString(part[0]), 3)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(part[0]), 1)], 64))], 64);
5104
+ }), 128))], 2), signature.value.result.info ? (openBlock(), createElementBlock("div", {
4974
5105
  key: 0,
4975
- class: normalizeClass(unref(ns).e("fixes"))
4976
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(fixes.value, (fix, i) => {
5106
+ class: normalizeClass(unref(ns).e("signature-info"))
5107
+ }, [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), {
5108
+ key: 1,
5109
+ render: signature.value.result.info
5110
+ }, null, 8, ["render"]))], 2)) : createCommentVNode("", true)], 46, _hoisted_13)) : createCommentVNode("", true),
5111
+ (openBlock(true), createElementBlock(Fragment, null, renderList(handles.value, (handle) => {
5112
+ return openBlock(), createElementBlock("div", {
5113
+ key: handle.kind,
5114
+ class: normalizeClass([unref(ns).e("handle"), unref(ns).is(handle.kind, true)]),
5115
+ style: normalizeStyle({ transform: `translate(${handle.left}px, ${handle.top}px)` }),
5116
+ "aria-hidden": "true",
5117
+ onPointerdown: ($event) => onHandleDown($event, handle.kind)
5118
+ }, null, 46, _hoisted_14);
5119
+ }), 128)),
5120
+ magnifier.value ? (openBlock(), createElementBlock("div", {
5121
+ key: 3,
5122
+ class: normalizeClass(unref(ns).e("magnifier")),
5123
+ style: normalizeStyle(magnifier.value.style),
5124
+ "aria-hidden": "true"
5125
+ }, [createElementVNode("div", {
5126
+ class: normalizeClass(unref(ns).e("magnifier-text")),
5127
+ style: normalizeStyle([magnifier.value.textStyle, { paddingLeft: `${magnifier.value.indent}px` }])
5128
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(magnifier.value.parts, (part, i) => {
5129
+ return openBlock(), createElementBlock(Fragment, { key: i }, [part[3] !== void 0 ? (openBlock(), createElementBlock("span", {
5130
+ key: 0,
5131
+ class: normalizeClass(unref(ns).e("inline")),
5132
+ style: normalizeStyle({ width: `${widthOf(magnifier.value.inlines[part[3]])}px` })
5133
+ }, [createVNode(unref(render_part_default), { render: magnifier.value.inlines[part[3]].render }, null, 8, ["render"])], 6)) : part[1] ? (openBlock(), createElementBlock("span", {
5134
+ key: 1,
5135
+ class: normalizeClass(part[1]),
5136
+ title: part[2],
5137
+ style: normalizeStyle(part[4])
5138
+ }, toDisplayString(part[0]), 15, _hoisted_15)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [createTextVNode(toDisplayString(part[0]), 1)], 64))], 64);
5139
+ }), 128))], 6), createElementVNode("div", {
5140
+ class: normalizeClass(unref(ns).e("magnifier-caret")),
5141
+ style: normalizeStyle({ left: `${magnifier.value.caret - 1}px` })
5142
+ }, null, 6)], 6)) : createCommentVNode("", true),
5143
+ menuStyle.value ? (openBlock(), createElementBlock("div", {
5144
+ key: 4,
5145
+ ref_key: "menuEl",
5146
+ ref: menuEl,
5147
+ class: normalizeClass(unref(ns).e("menu")),
5148
+ role: "toolbar",
5149
+ "aria-label": unref(messages).editMenu,
5150
+ style: normalizeStyle(menuStyle.value),
5151
+ onPointerdown: _cache[17] || (_cache[17] = withModifiers(() => {}, ["stop", "prevent"]))
5152
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(menuItems.value, (item) => {
4977
5153
  return openBlock(), createElementBlock("button", {
4978
- key: i,
5154
+ key: item.key,
4979
5155
  type: "button",
4980
5156
  tabindex: "-1",
4981
- class: normalizeClass([unref(ns).e("fix"), unref(ns).is("active", i === problemBox.value.index)]),
4982
- "aria-current": i === problemBox.value.index || void 0,
4983
- onClick: ($event) => runFix(i)
4984
- }, toDisplayString(fix.action.label), 11, _hoisted_9);
4985
- }), 128))], 2)) : createCommentVNode("", true)
4986
- ], 46, _hoisted_8)) : createCommentVNode("", true),
4987
- completionStyle.value ? (openBlock(), createElementBlock("div", {
4988
- key: 1,
4989
- ref_key: "completionEl",
4990
- ref: completionEl,
4991
- class: normalizeClass(unref(ns).e("completions")),
4992
- style: normalizeStyle(completionStyle.value),
4993
- onPointerdown: _cache[14] || (_cache[14] = withModifiers(() => {}, ["stop", "prevent"])),
4994
- onPointermove: _cache[15] || (_cache[15] = withModifiers(() => {}, ["stop"]))
4995
- }, [createElementVNode("div", {
4996
- id: completionId,
4997
- ref_key: "completionList",
4998
- ref: completionList,
4999
- class: normalizeClass(unref(ns).e("completion-list")),
5000
- role: "listbox",
5001
- "aria-label": unref(messages).completions
5002
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(completion.value.items, (item, i) => {
5003
- return openBlock(), createElementBlock("div", {
5004
- id: `${completionId}-${i}`,
5005
- key: i,
5006
- role: "option",
5007
- "aria-selected": i === completion.value.index,
5008
- class: normalizeClass([unref(ns).e("completion"), unref(ns).is("active", i === completion.value.index)]),
5009
- onClick: ($event) => acceptCompletion(i)
5010
- }, [
5011
- (openBlock(), createBlock(resolveDynamicComponent(KIND_ICON[item.option.kind ?? "text"]), {
5012
- class: normalizeClass([unref(ns).e("completion-kind"), unref(ns).is(item.option.kind ?? "text", true)]),
5013
- "aria-hidden": "true"
5014
- }, null, 8, ["class"])),
5015
- createElementVNode("span", { class: normalizeClass(unref(ns).e("completion-label")) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(labelParts(item), (part, j) => {
5016
- return openBlock(), createElementBlock(Fragment, { key: j }, [part[1] ? (openBlock(), createElementBlock("mark", {
5017
- key: 0,
5018
- class: normalizeClass(unref(ns).e("completion-match"))
5019
- }, toDisplayString(part[0]), 3)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(part[0]), 1)], 64))], 64);
5020
- }), 128))], 2),
5021
- item.option.detail ? (openBlock(), createElementBlock("span", {
5022
- key: 0,
5023
- class: normalizeClass(unref(ns).e("completion-detail"))
5024
- }, toDisplayString(item.option.detail), 3)) : createCommentVNode("", true)
5025
- ], 10, _hoisted_11);
5026
- }), 128))], 10, _hoisted_10), completion.value.items[completion.value.index]?.option.info ? (openBlock(), createElementBlock("div", {
5027
- key: 0,
5028
- class: normalizeClass(unref(ns).e("completion-info"))
5029
- }, [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), {
5030
- key: 1,
5031
- render: completion.value.items[completion.value.index].option.info
5032
- }, null, 8, ["render"]))], 2)) : createCommentVNode("", true)], 38)) : createCommentVNode("", true),
5033
- signatureStyle.value ? (openBlock(), createElementBlock("div", {
5034
- key: 2,
5035
- ref_key: "signatureEl",
5036
- ref: signatureEl,
5037
- class: normalizeClass(unref(ns).e("signature")),
5038
- role: "note",
5039
- "aria-label": unref(messages).signature,
5040
- style: normalizeStyle(signatureStyle.value),
5041
- onPointerdown: _cache[16] || (_cache[16] = withModifiers(() => {}, ["stop", "prevent"]))
5042
- }, [createElementVNode("div", { class: normalizeClass(unref(ns).e("signature-label")) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(signatureParts.value, (part, i) => {
5043
- return openBlock(), createElementBlock(Fragment, { key: i }, [part[1] ? (openBlock(), createElementBlock("span", {
5044
- key: 0,
5045
- class: normalizeClass(unref(ns).e("signature-active"))
5046
- }, toDisplayString(part[0]), 3)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(part[0]), 1)], 64))], 64);
5047
- }), 128))], 2), signature.value.result.info ? (openBlock(), createElementBlock("div", {
5048
- key: 0,
5049
- class: normalizeClass(unref(ns).e("signature-info"))
5050
- }, [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), {
5051
- key: 1,
5052
- render: signature.value.result.info
5053
- }, null, 8, ["render"]))], 2)) : createCommentVNode("", true)], 46, _hoisted_12)) : createCommentVNode("", true),
5054
- (openBlock(true), createElementBlock(Fragment, null, renderList(handles.value, (handle) => {
5055
- return openBlock(), createElementBlock("div", {
5056
- key: handle.kind,
5057
- class: normalizeClass([unref(ns).e("handle"), unref(ns).is(handle.kind, true)]),
5058
- style: normalizeStyle({ transform: `translate(${handle.left}px, ${handle.top}px)` }),
5059
- "aria-hidden": "true",
5060
- onPointerdown: ($event) => onHandleDown($event, handle.kind)
5061
- }, null, 46, _hoisted_13);
5062
- }), 128)),
5063
- magnifier.value ? (openBlock(), createElementBlock("div", {
5064
- key: 3,
5065
- class: normalizeClass(unref(ns).e("magnifier")),
5066
- style: normalizeStyle(magnifier.value.style),
5067
- "aria-hidden": "true"
5068
- }, [createElementVNode("div", {
5069
- class: normalizeClass(unref(ns).e("magnifier-text")),
5070
- style: normalizeStyle([magnifier.value.textStyle, { paddingLeft: `${magnifier.value.indent}px` }])
5071
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(magnifier.value.parts, (part, i) => {
5072
- return openBlock(), createElementBlock(Fragment, { key: i }, [part[3] !== void 0 ? (openBlock(), createElementBlock("span", {
5073
- key: 0,
5074
- class: normalizeClass(unref(ns).e("inline")),
5075
- style: normalizeStyle({ width: `${widthOf(magnifier.value.inlines[part[3]])}px` })
5076
- }, [createVNode(unref(render_part_default), { render: magnifier.value.inlines[part[3]].render }, null, 8, ["render"])], 6)) : part[1] ? (openBlock(), createElementBlock("span", {
5077
- key: 1,
5078
- class: normalizeClass(part[1]),
5079
- title: part[2],
5080
- style: normalizeStyle(part[4])
5081
- }, toDisplayString(part[0]), 15, _hoisted_14)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [createTextVNode(toDisplayString(part[0]), 1)], 64))], 64);
5082
- }), 128))], 6), createElementVNode("div", {
5083
- class: normalizeClass(unref(ns).e("magnifier-caret")),
5084
- style: normalizeStyle({ left: `${magnifier.value.caret - 1}px` })
5085
- }, null, 6)], 6)) : createCommentVNode("", true),
5086
- menuStyle.value ? (openBlock(), createElementBlock("div", {
5087
- key: 4,
5088
- ref_key: "menuEl",
5089
- ref: menuEl,
5090
- class: normalizeClass(unref(ns).e("menu")),
5091
- role: "toolbar",
5092
- "aria-label": unref(messages).editMenu,
5093
- style: normalizeStyle(menuStyle.value),
5094
- onPointerdown: _cache[17] || (_cache[17] = withModifiers(() => {}, ["stop", "prevent"]))
5095
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(menuItems.value, (item) => {
5096
- return openBlock(), createElementBlock("button", {
5097
- key: item.key,
5098
- type: "button",
5099
- tabindex: "-1",
5100
- class: normalizeClass(unref(ns).e("menu-button")),
5101
- onClick: ($event) => item.run()
5102
- }, toDisplayString(item.label), 11, _hoisted_16);
5103
- }), 128))], 46, _hoisted_15)) : createCommentVNode("", true)
5104
- ], 6)], 8, ["to", "disabled"])),
5105
- createElementVNode("textarea", {
5106
- ref_key: "input",
5107
- ref: input,
5108
- class: normalizeClass(unref(ns).e("input")),
5109
- style: normalizeStyle({
5110
- top: `${inputBox.value.top}px`,
5111
- left: `${inputBox.value.left}px`,
5112
- height: `${inputBox.value.height}px`
5113
- }),
5114
- "aria-label": __props.ariaLabel,
5115
- "aria-placeholder": __props.placeholder || void 0,
5116
- "aria-autocomplete": hasCompletion.value ? "list" : void 0,
5117
- "aria-controls": completion.value ? completionId : void 0,
5118
- readonly: __props.readonly,
5119
- disabled: __props.disabled,
5120
- wrap: "off",
5121
- autocomplete: "off",
5122
- autocorrect: "off",
5123
- autocapitalize: "off",
5124
- spellcheck: "false",
5125
- enterkeyhint: "enter",
5126
- onKeydown,
5127
- onBeforeinput: onBeforeInput,
5128
- onInput,
5129
- onCompositionstart: onCompositionStart,
5130
- onCompositionend: onCompositionEnd,
5131
- onCopy,
5132
- onCut,
5133
- onPaste,
5134
- onFocus,
5135
- onBlur
5136
- }, null, 46, _hoisted_17),
5157
+ class: normalizeClass(unref(ns).e("menu-button")),
5158
+ onClick: ($event) => item.run()
5159
+ }, toDisplayString(item.label), 11, _hoisted_17);
5160
+ }), 128))], 46, _hoisted_16)) : createCommentVNode("", true)
5161
+ ], 6)], 8, ["to", "disabled"])),
5162
+ createElementVNode("textarea", {
5163
+ ref_key: "input",
5164
+ ref: input,
5165
+ class: normalizeClass(unref(ns).e("input")),
5166
+ style: normalizeStyle({
5167
+ top: `${inputBox.value.top}px`,
5168
+ left: `${inputBox.value.left}px`,
5169
+ height: `${inputBox.value.height}px`
5170
+ }),
5171
+ "aria-label": __props.ariaLabel,
5172
+ "aria-placeholder": __props.placeholder || void 0,
5173
+ "aria-autocomplete": hasCompletion.value ? "list" : void 0,
5174
+ "aria-controls": completion.value ? completionId : void 0,
5175
+ readonly: __props.readonly,
5176
+ disabled: __props.disabled,
5177
+ wrap: "off",
5178
+ autocomplete: "off",
5179
+ autocorrect: "off",
5180
+ autocapitalize: "off",
5181
+ spellcheck: "false",
5182
+ enterkeyhint: "enter",
5183
+ onKeydown,
5184
+ onBeforeinput: onBeforeInput,
5185
+ onInput,
5186
+ onCompositionstart: onCompositionStart,
5187
+ onCompositionend: onCompositionEnd,
5188
+ onCopy,
5189
+ onCut,
5190
+ onPaste,
5191
+ onFocus,
5192
+ onBlur
5193
+ }, null, 46, _hoisted_18)
5194
+ ], 34),
5137
5195
  shownWidgets.value.length ? (openBlock(), createElementBlock("div", {
5138
- key: 3,
5196
+ key: 1,
5139
5197
  class: normalizeClass(unref(ns).e("widgets")),
5140
- onPointerdown: _cache[18] || (_cache[18] = withModifiers(() => {}, ["stop"])),
5141
- onPointermove: _cache[19] || (_cache[19] = withModifiers(() => {}, ["stop"])),
5142
- onMousedown: _cache[20] || (_cache[20] = withModifiers(() => {}, ["stop"]))
5198
+ onPointerdown: _cache[22] || (_cache[22] = withModifiers(() => {}, ["stop"])),
5199
+ onPointermove: _cache[23] || (_cache[23] = withModifiers(() => {}, ["stop"])),
5200
+ onMousedown: _cache[24] || (_cache[24] = withModifiers(() => {}, ["stop"]))
5143
5201
  }, [(openBlock(true), createElementBlock(Fragment, null, renderList(shownWidgets.value, (widget) => {
5144
5202
  return openBlock(), createElementBlock("div", {
5145
5203
  key: widget.key,
5204
+ class: normalizeClass([unref(ns).e("widget-slot"), unref(ns).is("full-width", widget.fullWidth)]),
5205
+ style: normalizeStyle({ top: `${widget.top}px` })
5206
+ }, [createElementVNode("div", {
5146
5207
  ref_for: true,
5147
5208
  ref: (el) => observeWidget(el, widget.key),
5148
- class: normalizeClass(unref(ns).e("widget")),
5209
+ class: normalizeClass([unref(ns).e("widget"), unref(ns).is("full-width", widget.fullWidth)]),
5149
5210
  role: widget.label ? "group" : void 0,
5150
- "aria-label": widget.label,
5151
- style: normalizeStyle({
5152
- transform: `translate(${scrollLeft.value}px, ${widget.top}px)`,
5153
- width: `${Math.max(0, viewWidth.value - gutterWidth.value)}px`
5154
- })
5155
- }, [createVNode(unref(render_part_default), { render: widget.render }, null, 8, ["render"])], 14, _hoisted_18);
5211
+ "aria-label": widget.label
5212
+ }, [createVNode(unref(render_part_default), { render: widget.render }, null, 8, ["render"])], 10, _hoisted_19)], 6);
5156
5213
  }), 128))], 34)) : createCommentVNode("", true)
5157
- ], 34)], 6)], 34), minimapOn.value && minimap.value ? (openBlock(), createElementBlock("div", {
5214
+ ], 6)], 34), minimapOn.value && minimap.value ? (openBlock(), createElementBlock("div", {
5158
5215
  key: 0,
5159
5216
  class: normalizeClass(unref(ns).e("minimap")),
5160
5217
  "aria-hidden": "true",
@@ -5204,7 +5261,7 @@ var code_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
5204
5261
  onPointerdown: onKeysGripDown,
5205
5262
  onKeydown: onKeysGripKey,
5206
5263
  onMousedown: _cache[25] || (_cache[25] = withModifiers(() => {}, ["prevent"]))
5207
- }, [createVNode(unref(GripVerticalIcon))], 42, _hoisted_19), createVNode(code_keys_default, {
5264
+ }, [createVNode(unref(GripVerticalIcon))], 42, _hoisted_20), createVNode(code_keys_default, {
5208
5265
  editor: keysEditor,
5209
5266
  keys: keysList.value,
5210
5267
  messages: unref(messages)