@dao42/d42paas-front 0.7.8 → 0.7.12
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/DaoPaaS.es.js +485 -538
- package/dist/DaoPaaS.umd.js +392 -401
- package/package.json +1 -1
package/dist/DaoPaaS.es.js
CHANGED
|
@@ -16815,8 +16815,8 @@ var formatDistance$1 = formatDistance;
|
|
|
16815
16815
|
function buildFormatLongFn(args) {
|
|
16816
16816
|
return function() {
|
|
16817
16817
|
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
16818
|
-
var
|
|
16819
|
-
var format2 = args.formats[
|
|
16818
|
+
var width = options.width ? String(options.width) : args.defaultWidth;
|
|
16819
|
+
var format2 = args.formats[width] || args.formats[args.defaultWidth];
|
|
16820
16820
|
return format2;
|
|
16821
16821
|
};
|
|
16822
16822
|
}
|
|
@@ -16872,8 +16872,8 @@ function buildLocalizeFn(args) {
|
|
|
16872
16872
|
var valuesArray;
|
|
16873
16873
|
if (context === "formatting" && args.formattingValues) {
|
|
16874
16874
|
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
16875
|
-
var
|
|
16876
|
-
valuesArray = args.formattingValues[
|
|
16875
|
+
var width = options.width ? String(options.width) : defaultWidth;
|
|
16876
|
+
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
16877
16877
|
} else {
|
|
16878
16878
|
var _defaultWidth = args.defaultWidth;
|
|
16879
16879
|
var _width = options.width ? String(options.width) : args.defaultWidth;
|
|
@@ -17015,14 +17015,14 @@ var localize$2 = localize$1;
|
|
|
17015
17015
|
function buildMatchFn(args) {
|
|
17016
17016
|
return function(string3) {
|
|
17017
17017
|
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
17018
|
-
var
|
|
17019
|
-
var matchPattern =
|
|
17018
|
+
var width = options.width;
|
|
17019
|
+
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
17020
17020
|
var matchResult = string3.match(matchPattern);
|
|
17021
17021
|
if (!matchResult) {
|
|
17022
17022
|
return null;
|
|
17023
17023
|
}
|
|
17024
17024
|
var matchedString = matchResult[0];
|
|
17025
|
-
var parsePatterns =
|
|
17025
|
+
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
17026
17026
|
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function(pattern2) {
|
|
17027
17027
|
return pattern2.test(matchedString);
|
|
17028
17028
|
}) : findKey(parsePatterns, function(pattern2) {
|
|
@@ -20365,7 +20365,7 @@ insertCss$1.exports.insertCss = insertCss;
|
|
|
20365
20365
|
}
|
|
20366
20366
|
var Icon3 = /* @__PURE__ */ _react["default"].forwardRef(function(props2, ref) {
|
|
20367
20367
|
var _classNames;
|
|
20368
|
-
var Component = props2.as, spin = props2.spin, pulse = props2.pulse, flip = props2.flip, fill2 = props2.fill, className = props2.className, rotate = props2.rotate, children = props2.children, viewBox = props2.viewBox,
|
|
20368
|
+
var Component = props2.as, spin = props2.spin, pulse = props2.pulse, flip = props2.flip, fill2 = props2.fill, className = props2.className, rotate = props2.rotate, children = props2.children, viewBox = props2.viewBox, width = props2.width, height = props2.height, style = props2.style, rest2 = (0, _objectWithoutPropertiesLoose2["default"])(props2, ["as", "spin", "pulse", "flip", "fill", "className", "rotate", "children", "viewBox", "width", "height", "style"]);
|
|
20369
20369
|
var _useClassNames = (0, _utils.useClassNames)(), componentClassName = _useClassNames[0], addPrefix = _useClassNames[1];
|
|
20370
20370
|
var classes = (0, _classnames2["default"])(className, componentClassName, (_classNames = {}, _classNames[addPrefix("spin")] = spin, _classNames[addPrefix("pulse")] = pulse, _classNames[addPrefix("flip-" + flip)] = !!flip, _classNames));
|
|
20371
20371
|
var rotateStyles = {
|
|
@@ -20374,8 +20374,8 @@ insertCss$1.exports.insertCss = insertCss;
|
|
|
20374
20374
|
};
|
|
20375
20375
|
(0, _utils.useInsertStyles)();
|
|
20376
20376
|
var svgProps = filterProps({
|
|
20377
|
-
width
|
|
20378
|
-
height
|
|
20377
|
+
width,
|
|
20378
|
+
height,
|
|
20379
20379
|
fill: fill2,
|
|
20380
20380
|
viewBox,
|
|
20381
20381
|
className: classes,
|
|
@@ -21709,11 +21709,11 @@ var ResizeObserverSize = function() {
|
|
|
21709
21709
|
return ResizeObserverSize2;
|
|
21710
21710
|
}();
|
|
21711
21711
|
var DOMRectReadOnly = function() {
|
|
21712
|
-
function DOMRectReadOnly2(x2, y2,
|
|
21712
|
+
function DOMRectReadOnly2(x2, y2, width, height) {
|
|
21713
21713
|
this.x = x2;
|
|
21714
21714
|
this.y = y2;
|
|
21715
|
-
this.width =
|
|
21716
|
-
this.height =
|
|
21715
|
+
this.width = width;
|
|
21716
|
+
this.height = height;
|
|
21717
21717
|
this.top = this.y;
|
|
21718
21718
|
this.left = this.x;
|
|
21719
21719
|
this.bottom = this.top + this.height;
|
|
@@ -21721,8 +21721,8 @@ var DOMRectReadOnly = function() {
|
|
|
21721
21721
|
return freeze$1(this);
|
|
21722
21722
|
}
|
|
21723
21723
|
DOMRectReadOnly2.prototype.toJSON = function() {
|
|
21724
|
-
var _a2 = this, x2 = _a2.x, y2 = _a2.y, top = _a2.top, right = _a2.right, bottom = _a2.bottom, left = _a2.left,
|
|
21725
|
-
return { x: x2, y: y2, top, right, bottom, left, width
|
|
21724
|
+
var _a2 = this, x2 = _a2.x, y2 = _a2.y, top = _a2.top, right = _a2.right, bottom = _a2.bottom, left = _a2.left, width = _a2.width, height = _a2.height;
|
|
21725
|
+
return { x: x2, y: y2, top, right, bottom, left, width, height };
|
|
21726
21726
|
};
|
|
21727
21727
|
DOMRectReadOnly2.fromRect = function(rectangle) {
|
|
21728
21728
|
return new DOMRectReadOnly2(rectangle.x, rectangle.y, rectangle.width, rectangle.height);
|
|
@@ -21734,8 +21734,8 @@ var isSVG = function(target) {
|
|
|
21734
21734
|
};
|
|
21735
21735
|
var isHidden = function(target) {
|
|
21736
21736
|
if (isSVG(target)) {
|
|
21737
|
-
var _a2 = target.getBBox(),
|
|
21738
|
-
return !
|
|
21737
|
+
var _a2 = target.getBBox(), width = _a2.width, height = _a2.height;
|
|
21738
|
+
return !width && !height;
|
|
21739
21739
|
}
|
|
21740
21740
|
var _b2 = target, offsetWidth = _b2.offsetWidth, offsetHeight = _b2.offsetHeight;
|
|
21741
21741
|
return !(offsetWidth || offsetHeight || target.getClientRects().length);
|
|
@@ -22637,25 +22637,25 @@ var AutoPlacement = {
|
|
|
22637
22637
|
bottom: "End"
|
|
22638
22638
|
};
|
|
22639
22639
|
function getContainerDimensions(containerNode) {
|
|
22640
|
-
var
|
|
22641
|
-
var
|
|
22640
|
+
var width;
|
|
22641
|
+
var height;
|
|
22642
22642
|
var scrollX;
|
|
22643
22643
|
var scrollY;
|
|
22644
22644
|
if (containerNode.tagName === "BODY") {
|
|
22645
|
-
|
|
22646
|
-
|
|
22645
|
+
width = window.innerWidth;
|
|
22646
|
+
height = window.innerHeight;
|
|
22647
22647
|
scrollY = scrollTop(ownerDocument(containerNode).documentElement) || scrollTop(containerNode);
|
|
22648
22648
|
scrollX = scrollLeft(ownerDocument(containerNode).documentElement) || scrollLeft(containerNode);
|
|
22649
22649
|
} else {
|
|
22650
22650
|
var _ref2 = getOffset(containerNode);
|
|
22651
|
-
|
|
22652
|
-
|
|
22651
|
+
width = _ref2.width;
|
|
22652
|
+
height = _ref2.height;
|
|
22653
22653
|
scrollY = scrollTop(containerNode);
|
|
22654
22654
|
scrollX = scrollLeft(containerNode);
|
|
22655
22655
|
}
|
|
22656
22656
|
return {
|
|
22657
|
-
width
|
|
22658
|
-
height
|
|
22657
|
+
width,
|
|
22658
|
+
height,
|
|
22659
22659
|
scrollX,
|
|
22660
22660
|
scrollY
|
|
22661
22661
|
};
|
|
@@ -22718,11 +22718,11 @@ var positionUtils = function(props2) {
|
|
|
22718
22718
|
return offset;
|
|
22719
22719
|
},
|
|
22720
22720
|
calcAutoPlacement: function calcAutoPlacement(targetOffset, container, overlay) {
|
|
22721
|
-
var _getContainerDimensio3 = getContainerDimensions(container),
|
|
22721
|
+
var _getContainerDimensio3 = getContainerDimensions(container), width = _getContainerDimensio3.width, height = _getContainerDimensio3.height, scrollX = _getContainerDimensio3.scrollX, scrollY = _getContainerDimensio3.scrollY;
|
|
22722
22722
|
var left = targetOffset.left - scrollX - overlay.width;
|
|
22723
22723
|
var top = targetOffset.top - scrollY - overlay.height;
|
|
22724
|
-
var right =
|
|
22725
|
-
var bottom =
|
|
22724
|
+
var right = width - targetOffset.left - targetOffset.width + scrollX - overlay.width;
|
|
22725
|
+
var bottom = height - targetOffset.top - targetOffset.height + scrollY - overlay.height;
|
|
22726
22726
|
var horizontal = [{
|
|
22727
22727
|
key: "left",
|
|
22728
22728
|
value: left
|
|
@@ -25744,14 +25744,14 @@ Drawer.propTypes = {
|
|
|
25744
25744
|
};
|
|
25745
25745
|
var Drawer$1 = Drawer;
|
|
25746
25746
|
var PlaceholderGraph = /* @__PURE__ */ React.forwardRef(function(props2, ref) {
|
|
25747
|
-
var _props$as = props2.as, Component = _props$as === void 0 ? "div" : _props$as, className = props2.className,
|
|
25747
|
+
var _props$as = props2.as, Component = _props$as === void 0 ? "div" : _props$as, className = props2.className, width = props2.width, _props$height = props2.height, height = _props$height === void 0 ? 200 : _props$height, style = props2.style, active = props2.active, _props$classPrefix = props2.classPrefix, classPrefix = _props$classPrefix === void 0 ? "placeholder" : _props$classPrefix, rest2 = _objectWithoutPropertiesLoose$4(props2, ["as", "className", "width", "height", "style", "active", "classPrefix"]);
|
|
25748
25748
|
var _useClassNames = useClassNames(classPrefix), merge2 = _useClassNames.merge, withClassPrefix = _useClassNames.withClassPrefix;
|
|
25749
25749
|
var classes = merge2(className, withClassPrefix("graph", {
|
|
25750
25750
|
active
|
|
25751
25751
|
}));
|
|
25752
25752
|
var styles2 = _extends$1({
|
|
25753
|
-
width:
|
|
25754
|
-
height
|
|
25753
|
+
width: width || "100%",
|
|
25754
|
+
height
|
|
25755
25755
|
}, style);
|
|
25756
25756
|
return /* @__PURE__ */ React.createElement(Component, _extends$1({}, rest2, {
|
|
25757
25757
|
ref,
|
|
@@ -28482,14 +28482,6 @@ const PlaygroundInit = (arg) => {
|
|
|
28482
28482
|
}
|
|
28483
28483
|
}
|
|
28484
28484
|
});
|
|
28485
|
-
io.on("terminal", (d2) => {
|
|
28486
|
-
const _d2 = JSON.parse(d2);
|
|
28487
|
-
setCRDTInfo2(_d2);
|
|
28488
|
-
setAsyncType("terminal");
|
|
28489
|
-
setReplaySource(__spreadProps(__spreadValues({}, _d2), {
|
|
28490
|
-
event: "terminal"
|
|
28491
|
-
}));
|
|
28492
|
-
});
|
|
28493
28485
|
io.on("saveFile", (d2) => {
|
|
28494
28486
|
JSON.parse(d2);
|
|
28495
28487
|
});
|
|
@@ -36768,12 +36760,12 @@ function RangeSlider({
|
|
|
36768
36760
|
}) => {
|
|
36769
36761
|
if (first3) {
|
|
36770
36762
|
const {
|
|
36771
|
-
width
|
|
36763
|
+
width,
|
|
36772
36764
|
left
|
|
36773
36765
|
} = ref.current.getBoundingClientRect();
|
|
36774
|
-
rangeWidth.current =
|
|
36766
|
+
rangeWidth.current = width - parseFloat(scrubberWidth);
|
|
36775
36767
|
const targetIsScrub = (event === null || event === void 0 ? void 0 : event.target) === scrubberRef.current;
|
|
36776
|
-
memo = targetIsScrub ? value : invertedRange((x2 - left) /
|
|
36768
|
+
memo = targetIsScrub ? value : invertedRange((x2 - left) / width, min, max);
|
|
36777
36769
|
}
|
|
36778
36770
|
const newValue = memo + invertedRange(mx / rangeWidth.current, 0, max - min);
|
|
36779
36771
|
onDrag(sanitizeStep$1(newValue, {
|
|
@@ -39451,9 +39443,9 @@ function useToggle(toggled) {
|
|
|
39451
39443
|
once: true
|
|
39452
39444
|
});
|
|
39453
39445
|
const {
|
|
39454
|
-
height
|
|
39446
|
+
height
|
|
39455
39447
|
} = contentRef.current.getBoundingClientRect();
|
|
39456
|
-
ref.style.height =
|
|
39448
|
+
ref.style.height = height + "px";
|
|
39457
39449
|
if (!toggled) {
|
|
39458
39450
|
ref.style.overflow = "hidden";
|
|
39459
39451
|
timeout2 = window.setTimeout(() => ref.style.height = "0px", 50);
|
|
@@ -39500,9 +39492,9 @@ function usePopin(margin = 3) {
|
|
|
39500
39492
|
left
|
|
39501
39493
|
} = popinRef.current.getBoundingClientRect();
|
|
39502
39494
|
const {
|
|
39503
|
-
height
|
|
39495
|
+
height
|
|
39504
39496
|
} = wrapperRef.current.getBoundingClientRect();
|
|
39505
|
-
const direction = bottom +
|
|
39497
|
+
const direction = bottom + height > window.innerHeight - 40 ? "up" : "down";
|
|
39506
39498
|
wrapperRef.current.style.position = "fixed";
|
|
39507
39499
|
wrapperRef.current.style.zIndex = "10000";
|
|
39508
39500
|
wrapperRef.current.style.left = left + "px";
|
|
@@ -39849,11 +39841,11 @@ function Joystick({
|
|
|
39849
39841
|
const {
|
|
39850
39842
|
top,
|
|
39851
39843
|
left,
|
|
39852
|
-
width
|
|
39853
|
-
height
|
|
39844
|
+
width,
|
|
39845
|
+
height
|
|
39854
39846
|
} = joystickeRef.current.getBoundingClientRect();
|
|
39855
|
-
playgroundRef.current.style.left = left +
|
|
39856
|
-
playgroundRef.current.style.top = top +
|
|
39847
|
+
playgroundRef.current.style.left = left + width / 2 + "px";
|
|
39848
|
+
playgroundRef.current.style.top = top + height / 2 + "px";
|
|
39857
39849
|
}
|
|
39858
39850
|
}, [joystickShown]);
|
|
39859
39851
|
const {
|
|
@@ -40309,12 +40301,12 @@ function IntervalSlider(_ref2) {
|
|
|
40309
40301
|
}) => {
|
|
40310
40302
|
if (first3) {
|
|
40311
40303
|
const {
|
|
40312
|
-
width
|
|
40304
|
+
width,
|
|
40313
40305
|
left
|
|
40314
40306
|
} = ref.current.getBoundingClientRect();
|
|
40315
|
-
rangeWidth.current =
|
|
40307
|
+
rangeWidth.current = width - parseFloat(scrubberWidth);
|
|
40316
40308
|
const targetIsScrub = (event === null || event === void 0 ? void 0 : event.target) === minScrubberRef.current || (event === null || event === void 0 ? void 0 : event.target) === maxScrubberRef.current;
|
|
40317
|
-
_memo.pos = invertedRange((x2 - left) /
|
|
40309
|
+
_memo.pos = invertedRange((x2 - left) / width, min, max);
|
|
40318
40310
|
const delta = Math.abs(_memo.pos - value.min) - Math.abs(_memo.pos - value.max);
|
|
40319
40311
|
_memo.key = delta < 0 || delta === 0 && _memo.pos <= value.min ? "min" : "max";
|
|
40320
40312
|
if (targetIsScrub)
|
|
@@ -40829,24 +40821,24 @@ const MonitorCanvas = react.exports.forwardRef(function({
|
|
|
40829
40821
|
if (!_canvas)
|
|
40830
40822
|
return;
|
|
40831
40823
|
const {
|
|
40832
|
-
width
|
|
40833
|
-
height
|
|
40824
|
+
width,
|
|
40825
|
+
height
|
|
40834
40826
|
} = _canvas;
|
|
40835
40827
|
const path = new Path2D();
|
|
40836
|
-
const interval2 =
|
|
40837
|
-
const verticalPadding =
|
|
40828
|
+
const interval2 = width / POINTS;
|
|
40829
|
+
const verticalPadding = height * 0.05;
|
|
40838
40830
|
for (let i2 = 0; i2 < points.current.length; i2++) {
|
|
40839
40831
|
const p2 = range$1(points.current[i2], min.current, max.current);
|
|
40840
40832
|
const x2 = interval2 * i2;
|
|
40841
|
-
const y2 =
|
|
40833
|
+
const y2 = height - p2 * (height - verticalPadding * 2) - verticalPadding;
|
|
40842
40834
|
path.lineTo(x2, y2);
|
|
40843
40835
|
}
|
|
40844
|
-
_ctx.clearRect(0, 0,
|
|
40836
|
+
_ctx.clearRect(0, 0, width, height);
|
|
40845
40837
|
const gradientPath = new Path2D(path);
|
|
40846
|
-
gradientPath.lineTo(interval2 * (points.current.length + 1),
|
|
40847
|
-
gradientPath.lineTo(0,
|
|
40838
|
+
gradientPath.lineTo(interval2 * (points.current.length + 1), height);
|
|
40839
|
+
gradientPath.lineTo(0, height);
|
|
40848
40840
|
gradientPath.lineTo(0, 0);
|
|
40849
|
-
const gradient = _ctx.createLinearGradient(0, 0, 0,
|
|
40841
|
+
const gradient = _ctx.createLinearGradient(0, 0, 0, height);
|
|
40850
40842
|
gradient.addColorStop(0, gradientTop);
|
|
40851
40843
|
gradient.addColorStop(1, gradientBottom);
|
|
40852
40844
|
_ctx.fillStyle = gradient;
|
|
@@ -44098,9 +44090,9 @@ const CmdKey = () => {
|
|
|
44098
44090
|
(_b2 = (_a2 = useOT.getState()) == null ? void 0 : _a2.socket) == null ? void 0 : _b2.emit("active");
|
|
44099
44091
|
}
|
|
44100
44092
|
}, {
|
|
44101
|
-
id: "
|
|
44093
|
+
id: "containerStop",
|
|
44102
44094
|
title: "\u505C\u6B62\u5BB9\u5668",
|
|
44103
|
-
hotkey: "
|
|
44095
|
+
hotkey: "cs",
|
|
44104
44096
|
mdIcon: "input",
|
|
44105
44097
|
handler: () => {
|
|
44106
44098
|
var _a2, _b2;
|
|
@@ -45185,8 +45177,8 @@ var DragAndDropProvider = function(props2) {
|
|
|
45185
45177
|
var treeViableDragPositions = buildMapForTrees(environment.treeIds, function(treeId2) {
|
|
45186
45178
|
return getViableDragPositions(treeId2, items, treeLinearItems[treeId2]);
|
|
45187
45179
|
});
|
|
45188
|
-
var
|
|
45189
|
-
setItemHeight(
|
|
45180
|
+
var height = (_b3 = (_a3 = document.querySelector('[data-rct-tree="' + treeId + '"] [data-rct-item-container="true"]')) === null || _a3 === void 0 ? void 0 : _a3.offsetHeight) !== null && _b3 !== void 0 ? _b3 : 5;
|
|
45181
|
+
setItemHeight(height);
|
|
45190
45182
|
setDraggingItems(items);
|
|
45191
45183
|
setLinearItems(treeLinearItems);
|
|
45192
45184
|
setViableDragPositions(treeViableDragPositions);
|
|
@@ -57098,13 +57090,13 @@ class SizeUtils {
|
|
|
57098
57090
|
}
|
|
57099
57091
|
}
|
|
57100
57092
|
class Dimension {
|
|
57101
|
-
constructor(
|
|
57102
|
-
this.width =
|
|
57103
|
-
this.height =
|
|
57093
|
+
constructor(width, height) {
|
|
57094
|
+
this.width = width;
|
|
57095
|
+
this.height = height;
|
|
57104
57096
|
}
|
|
57105
|
-
with(
|
|
57106
|
-
if (
|
|
57107
|
-
return new Dimension(
|
|
57097
|
+
with(width = this.width, height = this.height) {
|
|
57098
|
+
if (width !== this.width || height !== this.height) {
|
|
57099
|
+
return new Dimension(width, height);
|
|
57108
57100
|
} else {
|
|
57109
57101
|
return this;
|
|
57110
57102
|
}
|
|
@@ -57152,12 +57144,12 @@ function getTopLeftOffset(element) {
|
|
|
57152
57144
|
top
|
|
57153
57145
|
};
|
|
57154
57146
|
}
|
|
57155
|
-
function size(element,
|
|
57156
|
-
if (typeof
|
|
57157
|
-
element.style.width = `${
|
|
57147
|
+
function size(element, width, height) {
|
|
57148
|
+
if (typeof width === "number") {
|
|
57149
|
+
element.style.width = `${width}px`;
|
|
57158
57150
|
}
|
|
57159
|
-
if (typeof
|
|
57160
|
-
element.style.height = `${
|
|
57151
|
+
if (typeof height === "number") {
|
|
57152
|
+
element.style.height = `${height}px`;
|
|
57161
57153
|
}
|
|
57162
57154
|
}
|
|
57163
57155
|
function getDomNodePagePosition(domNode) {
|
|
@@ -67899,12 +67891,12 @@ function to4CharHex(n2) {
|
|
|
67899
67891
|
return n2.toString(16).toUpperCase().padStart(4, "0");
|
|
67900
67892
|
}
|
|
67901
67893
|
class Viewport {
|
|
67902
|
-
constructor(top, left,
|
|
67894
|
+
constructor(top, left, width, height) {
|
|
67903
67895
|
this._viewportBrand = void 0;
|
|
67904
67896
|
this.top = top | 0;
|
|
67905
67897
|
this.left = left | 0;
|
|
67906
|
-
this.width =
|
|
67907
|
-
this.height =
|
|
67898
|
+
this.width = width | 0;
|
|
67899
|
+
this.height = height | 0;
|
|
67908
67900
|
}
|
|
67909
67901
|
}
|
|
67910
67902
|
class MinimapLinesRenderingData {
|
|
@@ -69671,8 +69663,8 @@ class CommonEditorConfiguration extends Disposable {
|
|
|
69671
69663
|
}
|
|
69672
69664
|
return r2 ? r2 : 1;
|
|
69673
69665
|
}
|
|
69674
|
-
reserveHeight(
|
|
69675
|
-
this._reservedHeight =
|
|
69666
|
+
reserveHeight(height) {
|
|
69667
|
+
this._reservedHeight = height;
|
|
69676
69668
|
this._recomputeOptions();
|
|
69677
69669
|
}
|
|
69678
69670
|
}
|
|
@@ -73805,8 +73797,8 @@ class CharWidthRequest {
|
|
|
73805
73797
|
this.type = type;
|
|
73806
73798
|
this.width = 0;
|
|
73807
73799
|
}
|
|
73808
|
-
fulfill(
|
|
73809
|
-
this.width =
|
|
73800
|
+
fulfill(width) {
|
|
73801
|
+
this.width = width;
|
|
73810
73802
|
}
|
|
73811
73803
|
}
|
|
73812
73804
|
class DomCharWidthReader {
|
|
@@ -74243,18 +74235,18 @@ class FastDomNode {
|
|
|
74243
74235
|
this._maxWidth = maxWidth;
|
|
74244
74236
|
this.domNode.style.maxWidth = this._maxWidth + "px";
|
|
74245
74237
|
}
|
|
74246
|
-
setWidth(
|
|
74247
|
-
if (this._width ===
|
|
74238
|
+
setWidth(width) {
|
|
74239
|
+
if (this._width === width) {
|
|
74248
74240
|
return;
|
|
74249
74241
|
}
|
|
74250
|
-
this._width =
|
|
74242
|
+
this._width = width;
|
|
74251
74243
|
this.domNode.style.width = this._width + "px";
|
|
74252
74244
|
}
|
|
74253
|
-
setHeight(
|
|
74254
|
-
if (this._height ===
|
|
74245
|
+
setHeight(height) {
|
|
74246
|
+
if (this._height === height) {
|
|
74255
74247
|
return;
|
|
74256
74248
|
}
|
|
74257
|
-
this._height =
|
|
74249
|
+
this._height = height;
|
|
74258
74250
|
this.domNode.style.height = this._height + "px";
|
|
74259
74251
|
}
|
|
74260
74252
|
setTop(top) {
|
|
@@ -75513,11 +75505,11 @@ class ClientCoordinates {
|
|
|
75513
75505
|
}
|
|
75514
75506
|
}
|
|
75515
75507
|
class EditorPagePosition {
|
|
75516
|
-
constructor(x2, y2,
|
|
75508
|
+
constructor(x2, y2, width, height) {
|
|
75517
75509
|
this.x = x2;
|
|
75518
75510
|
this.y = y2;
|
|
75519
|
-
this.width =
|
|
75520
|
-
this.height =
|
|
75511
|
+
this.width = width;
|
|
75512
|
+
this.height = height;
|
|
75521
75513
|
this._editorPagePositionBrand = void 0;
|
|
75522
75514
|
}
|
|
75523
75515
|
}
|
|
@@ -75972,10 +75964,10 @@ class LineVisibleRanges {
|
|
|
75972
75964
|
}
|
|
75973
75965
|
}
|
|
75974
75966
|
class HorizontalRange {
|
|
75975
|
-
constructor(left,
|
|
75967
|
+
constructor(left, width) {
|
|
75976
75968
|
this._horizontalRangeBrand = void 0;
|
|
75977
75969
|
this.left = Math.round(left);
|
|
75978
|
-
this.width = Math.round(
|
|
75970
|
+
this.width = Math.round(width);
|
|
75979
75971
|
}
|
|
75980
75972
|
static from(ranges) {
|
|
75981
75973
|
const result = new Array(ranges.length);
|
|
@@ -75990,10 +75982,10 @@ class HorizontalRange {
|
|
|
75990
75982
|
}
|
|
75991
75983
|
}
|
|
75992
75984
|
class FloatHorizontalRange {
|
|
75993
|
-
constructor(left,
|
|
75985
|
+
constructor(left, width) {
|
|
75994
75986
|
this._floatHorizontalRangeBrand = void 0;
|
|
75995
75987
|
this.left = left;
|
|
75996
|
-
this.width =
|
|
75988
|
+
this.width = width;
|
|
75997
75989
|
}
|
|
75998
75990
|
toString() {
|
|
75999
75991
|
return `[${this.left},${this.width}]`;
|
|
@@ -82677,9 +82669,9 @@ function concat23Trees(items) {
|
|
|
82677
82669
|
return null;
|
|
82678
82670
|
}
|
|
82679
82671
|
const start = i2;
|
|
82680
|
-
const
|
|
82672
|
+
const height = items[start].listHeight;
|
|
82681
82673
|
i2++;
|
|
82682
|
-
while (i2 < items.length && items[i2].listHeight ===
|
|
82674
|
+
while (i2 < items.length && items[i2].listHeight === height) {
|
|
82683
82675
|
i2++;
|
|
82684
82676
|
}
|
|
82685
82677
|
if (i2 - start >= 2) {
|
|
@@ -87073,9 +87065,9 @@ class CharWidthReader {
|
|
|
87073
87065
|
const context = this._canvas.getContext("2d");
|
|
87074
87066
|
context.font = font;
|
|
87075
87067
|
const metrics = context.measureText(char2);
|
|
87076
|
-
const
|
|
87077
|
-
this._cache[cacheKey] =
|
|
87078
|
-
return
|
|
87068
|
+
const width = metrics.width;
|
|
87069
|
+
this._cache[cacheKey] = width;
|
|
87070
|
+
return width;
|
|
87079
87071
|
}
|
|
87080
87072
|
}
|
|
87081
87073
|
CharWidthReader._INSTANCE = null;
|
|
@@ -87131,9 +87123,9 @@ class MouseHandler extends ViewEventHandler {
|
|
|
87131
87123
|
}
|
|
87132
87124
|
onConfigurationChanged(e2) {
|
|
87133
87125
|
if (e2.hasChanged(130)) {
|
|
87134
|
-
const
|
|
87135
|
-
if (this._height !==
|
|
87136
|
-
this._height =
|
|
87126
|
+
const height = this._context.configuration.options.get(130).height;
|
|
87127
|
+
if (this._height !== height) {
|
|
87128
|
+
this._height = height;
|
|
87137
87129
|
this._mouseDownOperation.onHeightChanged();
|
|
87138
87130
|
}
|
|
87139
87131
|
}
|
|
@@ -88620,12 +88612,12 @@ class Margin extends ViewPart {
|
|
|
88620
88612
|
this._domNode.setContain("strict");
|
|
88621
88613
|
const adjustedScrollTop = ctx.scrollTop - ctx.bigNumbersDelta;
|
|
88622
88614
|
this._domNode.setTop(-adjustedScrollTop);
|
|
88623
|
-
const
|
|
88624
|
-
this._domNode.setHeight(
|
|
88615
|
+
const height = Math.min(ctx.scrollHeight, 1e6);
|
|
88616
|
+
this._domNode.setHeight(height);
|
|
88625
88617
|
this._domNode.setWidth(this._contentLeft);
|
|
88626
88618
|
this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft);
|
|
88627
88619
|
this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth);
|
|
88628
|
-
this._glyphMarginBackgroundDomNode.setHeight(
|
|
88620
|
+
this._glyphMarginBackgroundDomNode.setHeight(height);
|
|
88629
88621
|
}
|
|
88630
88622
|
}
|
|
88631
88623
|
Margin.CLASS_NAME = "glyph-margin";
|
|
@@ -88633,14 +88625,14 @@ Margin.OUTER_CLASS_NAME = "margin";
|
|
|
88633
88625
|
var mouseCursor = "";
|
|
88634
88626
|
const MOUSE_CURSOR_TEXT_CSS_CLASS_NAME = `monaco-mouse-cursor-text`;
|
|
88635
88627
|
class VisibleTextAreaData {
|
|
88636
|
-
constructor(top, left,
|
|
88628
|
+
constructor(top, left, width) {
|
|
88637
88629
|
this._visibleTextAreaBrand = void 0;
|
|
88638
88630
|
this.top = top;
|
|
88639
88631
|
this.left = left;
|
|
88640
|
-
this.width =
|
|
88632
|
+
this.width = width;
|
|
88641
88633
|
}
|
|
88642
|
-
setWidth(
|
|
88643
|
-
return new VisibleTextAreaData(this.top, this.left,
|
|
88634
|
+
setWidth(width) {
|
|
88635
|
+
return new VisibleTextAreaData(this.top, this.left, width);
|
|
88644
88636
|
}
|
|
88645
88637
|
}
|
|
88646
88638
|
const canUseZeroSizeTextarea = isFirefox;
|
|
@@ -89034,15 +89026,15 @@ class TextAreaHandler extends ViewPart {
|
|
|
89034
89026
|
} while (true);
|
|
89035
89027
|
return result;
|
|
89036
89028
|
}
|
|
89037
|
-
_renderInsideEditor(renderedPosition, top, left,
|
|
89029
|
+
_renderInsideEditor(renderedPosition, top, left, width, height) {
|
|
89038
89030
|
this._lastRenderPosition = renderedPosition;
|
|
89039
89031
|
const ta2 = this.textArea;
|
|
89040
89032
|
const tac = this.textAreaCover;
|
|
89041
89033
|
Configuration.applyFontInfo(ta2, this._fontInfo);
|
|
89042
89034
|
ta2.setTop(top);
|
|
89043
89035
|
ta2.setLeft(left);
|
|
89044
|
-
ta2.setWidth(
|
|
89045
|
-
ta2.setHeight(
|
|
89036
|
+
ta2.setWidth(width);
|
|
89037
|
+
ta2.setHeight(height);
|
|
89046
89038
|
tac.setTop(0);
|
|
89047
89039
|
tac.setLeft(0);
|
|
89048
89040
|
tac.setWidth(0);
|
|
@@ -94276,8 +94268,8 @@ class MarginViewOverlays extends ViewOverlays {
|
|
|
94276
94268
|
}
|
|
94277
94269
|
_viewOverlaysRender(ctx) {
|
|
94278
94270
|
super._viewOverlaysRender(ctx);
|
|
94279
|
-
const
|
|
94280
|
-
this.domNode.setHeight(
|
|
94271
|
+
const height = Math.min(ctx.scrollHeight, 1e6);
|
|
94272
|
+
this.domNode.setHeight(height);
|
|
94281
94273
|
this.domNode.setWidth(this._contentLeft);
|
|
94282
94274
|
}
|
|
94283
94275
|
}
|
|
@@ -94458,22 +94450,22 @@ class Widget$1 {
|
|
|
94458
94450
|
this._cachedDomNodeClientWidth = -1;
|
|
94459
94451
|
this._cachedDomNodeClientHeight = -1;
|
|
94460
94452
|
}
|
|
94461
|
-
_layoutBoxInViewport(topLeft, bottomLeft,
|
|
94453
|
+
_layoutBoxInViewport(topLeft, bottomLeft, width, height, ctx) {
|
|
94462
94454
|
const aboveLineTop = topLeft.top;
|
|
94463
94455
|
const heightAboveLine = aboveLineTop;
|
|
94464
94456
|
const underLineTop = bottomLeft.top + this._lineHeight;
|
|
94465
94457
|
const heightUnderLine = ctx.viewportHeight - underLineTop;
|
|
94466
|
-
const aboveTop = aboveLineTop -
|
|
94467
|
-
const fitsAbove = heightAboveLine >=
|
|
94458
|
+
const aboveTop = aboveLineTop - height;
|
|
94459
|
+
const fitsAbove = heightAboveLine >= height;
|
|
94468
94460
|
const belowTop = underLineTop;
|
|
94469
|
-
const fitsBelow = heightUnderLine >=
|
|
94461
|
+
const fitsBelow = heightUnderLine >= height;
|
|
94470
94462
|
let actualAboveLeft = topLeft.left;
|
|
94471
94463
|
let actualBelowLeft = bottomLeft.left;
|
|
94472
|
-
if (actualAboveLeft +
|
|
94473
|
-
actualAboveLeft = ctx.scrollLeft + ctx.viewportWidth -
|
|
94464
|
+
if (actualAboveLeft + width > ctx.scrollLeft + ctx.viewportWidth) {
|
|
94465
|
+
actualAboveLeft = ctx.scrollLeft + ctx.viewportWidth - width;
|
|
94474
94466
|
}
|
|
94475
|
-
if (actualBelowLeft +
|
|
94476
|
-
actualBelowLeft = ctx.scrollLeft + ctx.viewportWidth -
|
|
94467
|
+
if (actualBelowLeft + width > ctx.scrollLeft + ctx.viewportWidth) {
|
|
94468
|
+
actualBelowLeft = ctx.scrollLeft + ctx.viewportWidth - width;
|
|
94477
94469
|
}
|
|
94478
94470
|
if (actualAboveLeft < ctx.scrollLeft) {
|
|
94479
94471
|
actualAboveLeft = ctx.scrollLeft;
|
|
@@ -94490,12 +94482,12 @@ class Widget$1 {
|
|
|
94490
94482
|
belowLeft: actualBelowLeft
|
|
94491
94483
|
};
|
|
94492
94484
|
}
|
|
94493
|
-
_layoutHorizontalSegmentInPage(windowSize, domNodePosition, left,
|
|
94494
|
-
const MIN_LIMIT = Math.max(0, domNodePosition.left -
|
|
94495
|
-
const MAX_LIMIT = Math.min(domNodePosition.left + domNodePosition.width +
|
|
94485
|
+
_layoutHorizontalSegmentInPage(windowSize, domNodePosition, left, width) {
|
|
94486
|
+
const MIN_LIMIT = Math.max(0, domNodePosition.left - width);
|
|
94487
|
+
const MAX_LIMIT = Math.min(domNodePosition.left + domNodePosition.width + width, windowSize.width);
|
|
94496
94488
|
let absoluteLeft = domNodePosition.left + left - StandardWindow.scrollX;
|
|
94497
|
-
if (absoluteLeft +
|
|
94498
|
-
const delta = absoluteLeft - (MAX_LIMIT -
|
|
94489
|
+
if (absoluteLeft + width > MAX_LIMIT) {
|
|
94490
|
+
const delta = absoluteLeft - (MAX_LIMIT - width);
|
|
94499
94491
|
absoluteLeft -= delta;
|
|
94500
94492
|
left -= delta;
|
|
94501
94493
|
}
|
|
@@ -94506,19 +94498,19 @@ class Widget$1 {
|
|
|
94506
94498
|
}
|
|
94507
94499
|
return [left, absoluteLeft];
|
|
94508
94500
|
}
|
|
94509
|
-
_layoutBoxInPage(topLeft, bottomLeft,
|
|
94510
|
-
const aboveTop = topLeft.top -
|
|
94501
|
+
_layoutBoxInPage(topLeft, bottomLeft, width, height, ctx) {
|
|
94502
|
+
const aboveTop = topLeft.top - height;
|
|
94511
94503
|
const belowTop = bottomLeft.top + this._lineHeight;
|
|
94512
94504
|
const domNodePosition = getDomNodePagePosition(this._viewDomNode.domNode);
|
|
94513
94505
|
const absoluteAboveTop = domNodePosition.top + aboveTop - StandardWindow.scrollY;
|
|
94514
94506
|
const absoluteBelowTop = domNodePosition.top + belowTop - StandardWindow.scrollY;
|
|
94515
94507
|
const windowSize = getClientArea(document.body);
|
|
94516
|
-
const [aboveLeft, absoluteAboveLeft] = this._layoutHorizontalSegmentInPage(windowSize, domNodePosition, topLeft.left - ctx.scrollLeft + this._contentLeft,
|
|
94517
|
-
const [belowLeft, absoluteBelowLeft] = this._layoutHorizontalSegmentInPage(windowSize, domNodePosition, bottomLeft.left - ctx.scrollLeft + this._contentLeft,
|
|
94508
|
+
const [aboveLeft, absoluteAboveLeft] = this._layoutHorizontalSegmentInPage(windowSize, domNodePosition, topLeft.left - ctx.scrollLeft + this._contentLeft, width);
|
|
94509
|
+
const [belowLeft, absoluteBelowLeft] = this._layoutHorizontalSegmentInPage(windowSize, domNodePosition, bottomLeft.left - ctx.scrollLeft + this._contentLeft, width);
|
|
94518
94510
|
const TOP_PADDING = 22;
|
|
94519
94511
|
const BOTTOM_PADDING = 22;
|
|
94520
94512
|
const fitsAbove = absoluteAboveTop >= TOP_PADDING;
|
|
94521
|
-
const fitsBelow = absoluteBelowTop +
|
|
94513
|
+
const fitsBelow = absoluteBelowTop + height <= windowSize.height - BOTTOM_PADDING;
|
|
94522
94514
|
if (this._fixedOverflowWidgets) {
|
|
94523
94515
|
return {
|
|
94524
94516
|
fitsAbove,
|
|
@@ -95209,17 +95201,17 @@ class AbstractScrollbar extends Widget {
|
|
|
95209
95201
|
this.domNode.domNode.appendChild(arrow.bgDomNode);
|
|
95210
95202
|
this.domNode.domNode.appendChild(arrow.domNode);
|
|
95211
95203
|
}
|
|
95212
|
-
_createSlider(top, left,
|
|
95204
|
+
_createSlider(top, left, width, height) {
|
|
95213
95205
|
this.slider = createFastDomNode(document.createElement("div"));
|
|
95214
95206
|
this.slider.setClassName("slider");
|
|
95215
95207
|
this.slider.setPosition("absolute");
|
|
95216
95208
|
this.slider.setTop(top);
|
|
95217
95209
|
this.slider.setLeft(left);
|
|
95218
|
-
if (typeof
|
|
95219
|
-
this.slider.setWidth(
|
|
95210
|
+
if (typeof width === "number") {
|
|
95211
|
+
this.slider.setWidth(width);
|
|
95220
95212
|
}
|
|
95221
|
-
if (typeof
|
|
95222
|
-
this.slider.setHeight(
|
|
95213
|
+
if (typeof height === "number") {
|
|
95214
|
+
this.slider.setHeight(height);
|
|
95223
95215
|
}
|
|
95224
95216
|
this.slider.setLayerHinting(true);
|
|
95225
95217
|
this.slider.setContain("strict");
|
|
@@ -95652,38 +95644,38 @@ class VerticalScrollbar extends AbstractScrollbar {
|
|
|
95652
95644
|
}
|
|
95653
95645
|
}
|
|
95654
95646
|
class ScrollState {
|
|
95655
|
-
constructor(
|
|
95647
|
+
constructor(width, scrollWidth, scrollLeft2, height, scrollHeight, scrollTop2) {
|
|
95656
95648
|
this._scrollStateBrand = void 0;
|
|
95657
|
-
|
|
95649
|
+
width = width | 0;
|
|
95658
95650
|
scrollWidth = scrollWidth | 0;
|
|
95659
95651
|
scrollLeft2 = scrollLeft2 | 0;
|
|
95660
|
-
|
|
95652
|
+
height = height | 0;
|
|
95661
95653
|
scrollHeight = scrollHeight | 0;
|
|
95662
95654
|
scrollTop2 = scrollTop2 | 0;
|
|
95663
95655
|
this.rawScrollLeft = scrollLeft2;
|
|
95664
95656
|
this.rawScrollTop = scrollTop2;
|
|
95665
|
-
if (
|
|
95666
|
-
|
|
95657
|
+
if (width < 0) {
|
|
95658
|
+
width = 0;
|
|
95667
95659
|
}
|
|
95668
|
-
if (scrollLeft2 +
|
|
95669
|
-
scrollLeft2 = scrollWidth -
|
|
95660
|
+
if (scrollLeft2 + width > scrollWidth) {
|
|
95661
|
+
scrollLeft2 = scrollWidth - width;
|
|
95670
95662
|
}
|
|
95671
95663
|
if (scrollLeft2 < 0) {
|
|
95672
95664
|
scrollLeft2 = 0;
|
|
95673
95665
|
}
|
|
95674
|
-
if (
|
|
95675
|
-
|
|
95666
|
+
if (height < 0) {
|
|
95667
|
+
height = 0;
|
|
95676
95668
|
}
|
|
95677
|
-
if (scrollTop2 +
|
|
95678
|
-
scrollTop2 = scrollHeight -
|
|
95669
|
+
if (scrollTop2 + height > scrollHeight) {
|
|
95670
|
+
scrollTop2 = scrollHeight - height;
|
|
95679
95671
|
}
|
|
95680
95672
|
if (scrollTop2 < 0) {
|
|
95681
95673
|
scrollTop2 = 0;
|
|
95682
95674
|
}
|
|
95683
|
-
this.width =
|
|
95675
|
+
this.width = width;
|
|
95684
95676
|
this.scrollWidth = scrollWidth;
|
|
95685
95677
|
this.scrollLeft = scrollLeft2;
|
|
95686
|
-
this.height =
|
|
95678
|
+
this.height = height;
|
|
95687
95679
|
this.scrollHeight = scrollHeight;
|
|
95688
95680
|
this.scrollTop = scrollTop2;
|
|
95689
95681
|
}
|
|
@@ -96640,8 +96632,8 @@ class GlyphMarginOverlay extends DedupOverlay {
|
|
|
96640
96632
|
const toRender = this._render(visibleStartLineNumber, visibleEndLineNumber, this._getDecorations(ctx));
|
|
96641
96633
|
const lineHeight = this._lineHeight.toString();
|
|
96642
96634
|
const left = this._glyphMarginLeft.toString();
|
|
96643
|
-
const
|
|
96644
|
-
const common = '" style="left:' + left + "px;width:" +
|
|
96635
|
+
const width = this._glyphMarginWidth.toString();
|
|
96636
|
+
const common = '" style="left:' + left + "px;width:" + width + "px;height:" + lineHeight + 'px;"></div>';
|
|
96645
96637
|
const output = [];
|
|
96646
96638
|
for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {
|
|
96647
96639
|
const lineIndex = lineNumber - visibleStartLineNumber;
|
|
@@ -96754,8 +96746,8 @@ class IndentGuidesOverlay extends DynamicViewOverlay {
|
|
|
96754
96746
|
break;
|
|
96755
96747
|
}
|
|
96756
96748
|
const className = guide.horizontalLine ? guide.horizontalLine.top ? "horizontal-top" : "horizontal-bottom" : "vertical";
|
|
96757
|
-
const
|
|
96758
|
-
result += `<div class="core-guide ${guide.className} ${className}" style="left:${left}px;height:${lineHeight}px;width:${
|
|
96749
|
+
const width = guide.horizontalLine ? ((_d2 = (_c2 = ctx.visibleRangeForPosition(new Position$5(lineNumber, guide.horizontalLine.endColumn))) === null || _c2 === void 0 ? void 0 : _c2.left) !== null && _d2 !== void 0 ? _d2 : left + this._spaceWidth) - left : this._spaceWidth;
|
|
96750
|
+
result += `<div class="core-guide ${guide.className} ${className}" style="left:${left}px;height:${lineHeight}px;width:${width}px"></div>`;
|
|
96759
96751
|
}
|
|
96760
96752
|
output[lineIndex] = result;
|
|
96761
96753
|
}
|
|
@@ -97481,8 +97473,8 @@ class LinesDecorationsOverlay extends DedupOverlay {
|
|
|
97481
97473
|
const visibleEndLineNumber = ctx.visibleRange.endLineNumber;
|
|
97482
97474
|
const toRender = this._render(visibleStartLineNumber, visibleEndLineNumber, this._getDecorations(ctx));
|
|
97483
97475
|
const left = this._decorationsLeft.toString();
|
|
97484
|
-
const
|
|
97485
|
-
const common = '" style="left:' + left + "px;width:" +
|
|
97476
|
+
const width = this._decorationsWidth.toString();
|
|
97477
|
+
const common = '" style="left:' + left + "px;width:" + width + 'px;"></div>';
|
|
97486
97478
|
const output = [];
|
|
97487
97479
|
for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {
|
|
97488
97480
|
const lineIndex = lineNumber - visibleStartLineNumber;
|
|
@@ -97811,16 +97803,16 @@ class MinimapCharRendererFactory {
|
|
|
97811
97803
|
return new MinimapCharRenderer(charData, scale);
|
|
97812
97804
|
}
|
|
97813
97805
|
static _downsampleChar(source, sourceOffset, dest, destOffset, scale) {
|
|
97814
|
-
const
|
|
97815
|
-
const
|
|
97806
|
+
const width = 1 * scale;
|
|
97807
|
+
const height = 2 * scale;
|
|
97816
97808
|
let targetIndex = destOffset;
|
|
97817
97809
|
let brightest = 0;
|
|
97818
|
-
for (let y2 = 0; y2 <
|
|
97819
|
-
const sourceY1 = y2 /
|
|
97820
|
-
const sourceY2 = (y2 + 1) /
|
|
97821
|
-
for (let x2 = 0; x2 <
|
|
97822
|
-
const sourceX1 = x2 /
|
|
97823
|
-
const sourceX2 = (x2 + 1) /
|
|
97810
|
+
for (let y2 = 0; y2 < height; y2++) {
|
|
97811
|
+
const sourceY1 = y2 / height * 16;
|
|
97812
|
+
const sourceY2 = (y2 + 1) / height * 16;
|
|
97813
|
+
for (let x2 = 0; x2 < width; x2++) {
|
|
97814
|
+
const sourceX1 = x2 / width * 10;
|
|
97815
|
+
const sourceX2 = (x2 + 1) / width * 10;
|
|
97824
97816
|
let value = 0;
|
|
97825
97817
|
let samples = 0;
|
|
97826
97818
|
for (let sy = sourceY1; sy < sourceY2; sy++) {
|
|
@@ -98870,9 +98862,9 @@ class InnerMinimap extends Disposable {
|
|
|
98870
98862
|
}
|
|
98871
98863
|
}
|
|
98872
98864
|
}
|
|
98873
|
-
renderDecorationOnLine(canvasContext, lineOffsetMap, decorationRange, decorationColor, layout2, lineNumber,
|
|
98865
|
+
renderDecorationOnLine(canvasContext, lineOffsetMap, decorationRange, decorationColor, layout2, lineNumber, height, lineHeight, tabSize, charWidth, canvasInnerWidth) {
|
|
98874
98866
|
const y2 = (lineNumber - layout2.startLineNumber) * lineHeight;
|
|
98875
|
-
if (y2 +
|
|
98867
|
+
if (y2 + height < 0 || y2 > this._model.options.canvasInnerHeight) {
|
|
98876
98868
|
return;
|
|
98877
98869
|
}
|
|
98878
98870
|
const { startLineNumber, endLineNumber } = decorationRange;
|
|
@@ -98880,7 +98872,7 @@ class InnerMinimap extends Disposable {
|
|
|
98880
98872
|
const endColumn = endLineNumber === lineNumber ? decorationRange.endColumn : this._model.getLineMaxColumn(lineNumber);
|
|
98881
98873
|
const x1 = this.getXOffsetForPosition(lineOffsetMap, lineNumber, startColumn, tabSize, charWidth, canvasInnerWidth);
|
|
98882
98874
|
const x2 = this.getXOffsetForPosition(lineOffsetMap, lineNumber, endColumn, tabSize, charWidth, canvasInnerWidth);
|
|
98883
|
-
this.renderDecoration(canvasContext, decorationColor, x1, y2, x2 - x1,
|
|
98875
|
+
this.renderDecoration(canvasContext, decorationColor, x1, y2, x2 - x1, height);
|
|
98884
98876
|
}
|
|
98885
98877
|
getXOffsetForPosition(lineOffsetMap, lineNumber, column2, tabSize, charWidth, canvasInnerWidth) {
|
|
98886
98878
|
if (column2 === 1) {
|
|
@@ -98913,9 +98905,9 @@ class InnerMinimap extends Disposable {
|
|
|
98913
98905
|
}
|
|
98914
98906
|
return canvasInnerWidth;
|
|
98915
98907
|
}
|
|
98916
|
-
renderDecoration(canvasContext, decorationColor, x2, y2,
|
|
98908
|
+
renderDecoration(canvasContext, decorationColor, x2, y2, width, height) {
|
|
98917
98909
|
canvasContext.fillStyle = decorationColor && decorationColor.toString() || "";
|
|
98918
|
-
canvasContext.fillRect(x2, y2,
|
|
98910
|
+
canvasContext.fillRect(x2, y2, width, height);
|
|
98919
98911
|
}
|
|
98920
98912
|
renderLines(layout2) {
|
|
98921
98913
|
const startLineNumber = layout2.startLineNumber;
|
|
@@ -99309,7 +99301,7 @@ class Settings {
|
|
|
99309
99301
|
];
|
|
99310
99302
|
} else {
|
|
99311
99303
|
const offset = canvasLeftOffset;
|
|
99312
|
-
const
|
|
99304
|
+
const width = remainingWidth;
|
|
99313
99305
|
return [
|
|
99314
99306
|
[
|
|
99315
99307
|
0,
|
|
@@ -99323,13 +99315,13 @@ class Settings {
|
|
|
99323
99315
|
],
|
|
99324
99316
|
[
|
|
99325
99317
|
0,
|
|
99326
|
-
|
|
99327
|
-
|
|
99328
|
-
|
|
99329
|
-
|
|
99330
|
-
|
|
99331
|
-
|
|
99332
|
-
|
|
99318
|
+
width,
|
|
99319
|
+
width,
|
|
99320
|
+
width,
|
|
99321
|
+
width,
|
|
99322
|
+
width,
|
|
99323
|
+
width,
|
|
99324
|
+
width
|
|
99333
99325
|
]
|
|
99334
99326
|
];
|
|
99335
99327
|
}
|
|
@@ -99451,8 +99443,8 @@ class DecorationsOverviewRuler extends ViewPart {
|
|
|
99451
99443
|
const endLineNumber = decorationGroupData[3 * i2 + 2];
|
|
99452
99444
|
let y1 = viewLayout.getVerticalOffsetForLineNumber(startLineNumber) * heightRatio | 0;
|
|
99453
99445
|
let y2 = (viewLayout.getVerticalOffsetForLineNumber(endLineNumber) + lineHeight) * heightRatio | 0;
|
|
99454
|
-
const
|
|
99455
|
-
if (
|
|
99446
|
+
const height = y2 - y1;
|
|
99447
|
+
if (height < minDecorationHeight) {
|
|
99456
99448
|
let yCenter = (y1 + y2) / 2 | 0;
|
|
99457
99449
|
if (yCenter < halfMinDecorationHeight) {
|
|
99458
99450
|
yCenter = halfMinDecorationHeight;
|
|
@@ -99602,11 +99594,11 @@ class OverviewZoneManager {
|
|
|
99602
99594
|
getCanvasWidth() {
|
|
99603
99595
|
return this._domWidth * this._pixelRatio;
|
|
99604
99596
|
}
|
|
99605
|
-
setDOMWidth(
|
|
99606
|
-
if (this._domWidth ===
|
|
99597
|
+
setDOMWidth(width) {
|
|
99598
|
+
if (this._domWidth === width) {
|
|
99607
99599
|
return false;
|
|
99608
99600
|
}
|
|
99609
|
-
this._domWidth =
|
|
99601
|
+
this._domWidth = width;
|
|
99610
99602
|
this._colorZonesInvalid = true;
|
|
99611
99603
|
return true;
|
|
99612
99604
|
}
|
|
@@ -99616,11 +99608,11 @@ class OverviewZoneManager {
|
|
|
99616
99608
|
getCanvasHeight() {
|
|
99617
99609
|
return this._domHeight * this._pixelRatio;
|
|
99618
99610
|
}
|
|
99619
|
-
setDOMHeight(
|
|
99620
|
-
if (this._domHeight ===
|
|
99611
|
+
setDOMHeight(height) {
|
|
99612
|
+
if (this._domHeight === height) {
|
|
99621
99613
|
return false;
|
|
99622
99614
|
}
|
|
99623
|
-
this._domHeight =
|
|
99615
|
+
this._domHeight = height;
|
|
99624
99616
|
this._colorZonesInvalid = true;
|
|
99625
99617
|
return true;
|
|
99626
99618
|
}
|
|
@@ -99759,18 +99751,18 @@ class OverviewRuler extends ViewEventHandler {
|
|
|
99759
99751
|
if (this._zoneManager.getOuterHeight() === 0) {
|
|
99760
99752
|
return false;
|
|
99761
99753
|
}
|
|
99762
|
-
const
|
|
99763
|
-
const
|
|
99754
|
+
const width = this._zoneManager.getCanvasWidth();
|
|
99755
|
+
const height = this._zoneManager.getCanvasHeight();
|
|
99764
99756
|
const colorZones = this._zoneManager.resolveColorZones();
|
|
99765
99757
|
const id2Color = this._zoneManager.getId2Color();
|
|
99766
99758
|
const ctx = this._domNode.domNode.getContext("2d");
|
|
99767
|
-
ctx.clearRect(0, 0,
|
|
99759
|
+
ctx.clearRect(0, 0, width, height);
|
|
99768
99760
|
if (colorZones.length > 0) {
|
|
99769
|
-
this._renderOneLane(ctx, colorZones, id2Color,
|
|
99761
|
+
this._renderOneLane(ctx, colorZones, id2Color, width);
|
|
99770
99762
|
}
|
|
99771
99763
|
return true;
|
|
99772
99764
|
}
|
|
99773
|
-
_renderOneLane(ctx, colorZones, id2Color,
|
|
99765
|
+
_renderOneLane(ctx, colorZones, id2Color, width) {
|
|
99774
99766
|
let currentColorId = 0;
|
|
99775
99767
|
let currentFrom = 0;
|
|
99776
99768
|
let currentTo = 0;
|
|
@@ -99779,7 +99771,7 @@ class OverviewRuler extends ViewEventHandler {
|
|
|
99779
99771
|
const zoneFrom = zone.from;
|
|
99780
99772
|
const zoneTo = zone.to;
|
|
99781
99773
|
if (zoneColorId !== currentColorId) {
|
|
99782
|
-
ctx.fillRect(0, currentFrom,
|
|
99774
|
+
ctx.fillRect(0, currentFrom, width, currentTo - currentFrom);
|
|
99783
99775
|
currentColorId = zoneColorId;
|
|
99784
99776
|
ctx.fillStyle = id2Color[currentColorId];
|
|
99785
99777
|
currentFrom = zoneFrom;
|
|
@@ -99788,13 +99780,13 @@ class OverviewRuler extends ViewEventHandler {
|
|
|
99788
99780
|
if (currentTo >= zoneFrom) {
|
|
99789
99781
|
currentTo = Math.max(currentTo, zoneTo);
|
|
99790
99782
|
} else {
|
|
99791
|
-
ctx.fillRect(0, currentFrom,
|
|
99783
|
+
ctx.fillRect(0, currentFrom, width, currentTo - currentFrom);
|
|
99792
99784
|
currentFrom = zoneFrom;
|
|
99793
99785
|
currentTo = zoneTo;
|
|
99794
99786
|
}
|
|
99795
99787
|
}
|
|
99796
99788
|
}
|
|
99797
|
-
ctx.fillRect(0, currentFrom,
|
|
99789
|
+
ctx.fillRect(0, currentFrom, width, currentTo - currentFrom);
|
|
99798
99790
|
}
|
|
99799
99791
|
}
|
|
99800
99792
|
var rulers = "";
|
|
@@ -100098,8 +100090,8 @@ class SelectionsOverlay extends DynamicViewOverlay {
|
|
|
100098
100090
|
}
|
|
100099
100091
|
return linesVisibleRanges;
|
|
100100
100092
|
}
|
|
100101
|
-
_createSelectionPiece(top,
|
|
100102
|
-
return '<div class="cslr ' + className + '" style="top:' + top.toString() + "px;left:" + left.toString() + "px;width:" +
|
|
100093
|
+
_createSelectionPiece(top, height, className, left, width) {
|
|
100094
|
+
return '<div class="cslr ' + className + '" style="top:' + top.toString() + "px;left:" + left.toString() + "px;width:" + width.toString() + "px;height:" + height + 'px;"></div>';
|
|
100103
100095
|
}
|
|
100104
100096
|
_actualRenderOneSelection(output2, visibleStartLineNumber, hasMultipleSelections, visibleRanges) {
|
|
100105
100097
|
if (visibleRanges.length === 0) {
|
|
@@ -100228,11 +100220,11 @@ function abs(n2) {
|
|
|
100228
100220
|
}
|
|
100229
100221
|
var viewCursors = "";
|
|
100230
100222
|
class ViewCursorRenderData {
|
|
100231
|
-
constructor(top, left,
|
|
100223
|
+
constructor(top, left, width, height, textContent, textContentClassName) {
|
|
100232
100224
|
this.top = top;
|
|
100233
100225
|
this.left = left;
|
|
100234
|
-
this.width =
|
|
100235
|
-
this.height =
|
|
100226
|
+
this.width = width;
|
|
100227
|
+
this.height = height;
|
|
100236
100228
|
this.textContent = textContent;
|
|
100237
100229
|
this.textContentClassName = textContentClassName;
|
|
100238
100230
|
}
|
|
@@ -100297,23 +100289,23 @@ class ViewCursor {
|
|
|
100297
100289
|
if (!visibleRange || visibleRange.outsideRenderedLine) {
|
|
100298
100290
|
return null;
|
|
100299
100291
|
}
|
|
100300
|
-
let
|
|
100292
|
+
let width2;
|
|
100301
100293
|
if (this._cursorStyle === TextEditorCursorStyle$1.Line) {
|
|
100302
|
-
|
|
100303
|
-
if (
|
|
100294
|
+
width2 = computeScreenAwareSize(this._lineCursorWidth > 0 ? this._lineCursorWidth : 2);
|
|
100295
|
+
if (width2 > 2) {
|
|
100304
100296
|
const lineContent2 = this._context.model.getLineContent(this._position.lineNumber);
|
|
100305
100297
|
const nextCharLength$12 = nextCharLength(lineContent2, this._position.column - 1);
|
|
100306
100298
|
textContent = lineContent2.substr(this._position.column - 1, nextCharLength$12);
|
|
100307
100299
|
}
|
|
100308
100300
|
} else {
|
|
100309
|
-
|
|
100301
|
+
width2 = computeScreenAwareSize(1);
|
|
100310
100302
|
}
|
|
100311
100303
|
let left = visibleRange.left;
|
|
100312
|
-
if (
|
|
100304
|
+
if (width2 >= 2 && left >= 1) {
|
|
100313
100305
|
left -= 1;
|
|
100314
100306
|
}
|
|
100315
100307
|
const top2 = ctx.getVerticalOffsetForLineNumber(this._position.lineNumber) - ctx.bigNumbersDelta;
|
|
100316
|
-
return new ViewCursorRenderData(top2, left,
|
|
100308
|
+
return new ViewCursorRenderData(top2, left, width2, this._lineHeight, textContent, "");
|
|
100317
100309
|
}
|
|
100318
100310
|
const lineContent = this._context.model.getLineContent(this._position.lineNumber);
|
|
100319
100311
|
const nextCharLength$1 = nextCharLength(lineContent, this._position.column - 1);
|
|
@@ -100326,7 +100318,7 @@ class ViewCursor {
|
|
|
100326
100318
|
return null;
|
|
100327
100319
|
}
|
|
100328
100320
|
const range3 = firstVisibleRangeForCharacter.ranges[0];
|
|
100329
|
-
const
|
|
100321
|
+
const width = range3.width < 1 ? this._typicalHalfwidthCharacterWidth : range3.width;
|
|
100330
100322
|
let textContentClassName = "";
|
|
100331
100323
|
if (this._cursorStyle === TextEditorCursorStyle$1.Block) {
|
|
100332
100324
|
const lineData = this._context.model.getViewLineData(this._position.lineNumber);
|
|
@@ -100335,12 +100327,12 @@ class ViewCursor {
|
|
|
100335
100327
|
textContentClassName = lineData.tokens.getClassName(tokenIndex);
|
|
100336
100328
|
}
|
|
100337
100329
|
let top = ctx.getVerticalOffsetForLineNumber(this._position.lineNumber) - ctx.bigNumbersDelta;
|
|
100338
|
-
let
|
|
100330
|
+
let height = this._lineHeight;
|
|
100339
100331
|
if (this._cursorStyle === TextEditorCursorStyle$1.Underline || this._cursorStyle === TextEditorCursorStyle$1.UnderlineThin) {
|
|
100340
100332
|
top += this._lineHeight - 2;
|
|
100341
|
-
|
|
100333
|
+
height = 2;
|
|
100342
100334
|
}
|
|
100343
|
-
return new ViewCursorRenderData(top, range3.left,
|
|
100335
|
+
return new ViewCursorRenderData(top, range3.left, width, height, textContent, textContentClassName);
|
|
100344
100336
|
}
|
|
100345
100337
|
prepareRender(ctx) {
|
|
100346
100338
|
this._renderData = this._prepareRender(ctx);
|
|
@@ -100892,10 +100884,10 @@ class ViewZones extends ViewPart {
|
|
|
100892
100884
|
}
|
|
100893
100885
|
return 0;
|
|
100894
100886
|
}
|
|
100895
|
-
_safeCallOnComputedHeight(zone,
|
|
100887
|
+
_safeCallOnComputedHeight(zone, height) {
|
|
100896
100888
|
if (typeof zone.onComputedHeight === "function") {
|
|
100897
100889
|
try {
|
|
100898
|
-
zone.onComputedHeight(
|
|
100890
|
+
zone.onComputedHeight(height);
|
|
100899
100891
|
} catch (e2) {
|
|
100900
100892
|
onUnexpectedError(e2);
|
|
100901
100893
|
}
|
|
@@ -102953,11 +102945,11 @@ class PendingChanges {
|
|
|
102953
102945
|
}
|
|
102954
102946
|
}
|
|
102955
102947
|
class EditorWhitespace {
|
|
102956
|
-
constructor(id2, afterLineNumber, ordinal,
|
|
102948
|
+
constructor(id2, afterLineNumber, ordinal, height, minWidth) {
|
|
102957
102949
|
this.id = id2;
|
|
102958
102950
|
this.afterLineNumber = afterLineNumber;
|
|
102959
102951
|
this.ordinal = ordinal;
|
|
102960
|
-
this.height =
|
|
102952
|
+
this.height = height;
|
|
102961
102953
|
this.minWidth = minWidth;
|
|
102962
102954
|
this.prefixSum = 0;
|
|
102963
102955
|
}
|
|
@@ -103461,7 +103453,7 @@ class LinesLayout {
|
|
|
103461
103453
|
let result = [];
|
|
103462
103454
|
for (let i2 = startIndex; i2 <= endIndex; i2++) {
|
|
103463
103455
|
const top = this.getVerticalOffsetForWhitespaceIndex(i2);
|
|
103464
|
-
const
|
|
103456
|
+
const height = this.getHeightForWhitespaceIndex(i2);
|
|
103465
103457
|
if (top >= verticalOffset2) {
|
|
103466
103458
|
break;
|
|
103467
103459
|
}
|
|
@@ -103469,7 +103461,7 @@ class LinesLayout {
|
|
|
103469
103461
|
id: this.getIdForWhitespaceIndex(i2),
|
|
103470
103462
|
afterLineNumber: this.getAfterLineNumberForWhitespaceIndex(i2),
|
|
103471
103463
|
verticalOffset: top,
|
|
103472
|
-
height
|
|
103464
|
+
height
|
|
103473
103465
|
});
|
|
103474
103466
|
}
|
|
103475
103467
|
return result;
|
|
@@ -103501,29 +103493,29 @@ class LinesLayout {
|
|
|
103501
103493
|
LinesLayout.INSTANCE_COUNT = 0;
|
|
103502
103494
|
const SMOOTH_SCROLLING_TIME = 125;
|
|
103503
103495
|
class EditorScrollDimensions {
|
|
103504
|
-
constructor(
|
|
103505
|
-
|
|
103496
|
+
constructor(width, contentWidth, height, contentHeight) {
|
|
103497
|
+
width = width | 0;
|
|
103506
103498
|
contentWidth = contentWidth | 0;
|
|
103507
|
-
|
|
103499
|
+
height = height | 0;
|
|
103508
103500
|
contentHeight = contentHeight | 0;
|
|
103509
|
-
if (
|
|
103510
|
-
|
|
103501
|
+
if (width < 0) {
|
|
103502
|
+
width = 0;
|
|
103511
103503
|
}
|
|
103512
103504
|
if (contentWidth < 0) {
|
|
103513
103505
|
contentWidth = 0;
|
|
103514
103506
|
}
|
|
103515
|
-
if (
|
|
103516
|
-
|
|
103507
|
+
if (height < 0) {
|
|
103508
|
+
height = 0;
|
|
103517
103509
|
}
|
|
103518
103510
|
if (contentHeight < 0) {
|
|
103519
103511
|
contentHeight = 0;
|
|
103520
103512
|
}
|
|
103521
|
-
this.width =
|
|
103513
|
+
this.width = width;
|
|
103522
103514
|
this.contentWidth = contentWidth;
|
|
103523
|
-
this.scrollWidth = Math.max(
|
|
103524
|
-
this.height =
|
|
103515
|
+
this.scrollWidth = Math.max(width, contentWidth);
|
|
103516
|
+
this.height = height;
|
|
103525
103517
|
this.contentHeight = contentHeight;
|
|
103526
|
-
this.scrollHeight = Math.max(
|
|
103518
|
+
this.scrollHeight = Math.max(height, contentHeight);
|
|
103527
103519
|
}
|
|
103528
103520
|
equals(other) {
|
|
103529
103521
|
return this.width === other.width && this.contentWidth === other.contentWidth && this.height === other.height && this.contentHeight === other.contentHeight;
|
|
@@ -103619,11 +103611,11 @@ class ViewLayout extends Disposable {
|
|
|
103619
103611
|
}
|
|
103620
103612
|
if (e2.hasChanged(130)) {
|
|
103621
103613
|
const layoutInfo = options.get(130);
|
|
103622
|
-
const
|
|
103623
|
-
const
|
|
103614
|
+
const width = layoutInfo.contentWidth;
|
|
103615
|
+
const height = layoutInfo.height;
|
|
103624
103616
|
const scrollDimensions = this._scrollable.getScrollDimensions();
|
|
103625
103617
|
const contentWidth = scrollDimensions.contentWidth;
|
|
103626
|
-
this._scrollable.setScrollDimensions(new EditorScrollDimensions(
|
|
103618
|
+
this._scrollable.setScrollDimensions(new EditorScrollDimensions(width, scrollDimensions.contentWidth, height, this._getContentHeight(width, height, contentWidth)));
|
|
103627
103619
|
} else {
|
|
103628
103620
|
this._updateHeight();
|
|
103629
103621
|
}
|
|
@@ -103640,33 +103632,33 @@ class ViewLayout extends Disposable {
|
|
|
103640
103632
|
onLinesInserted(fromLineNumber, toLineNumber) {
|
|
103641
103633
|
this._linesLayout.onLinesInserted(fromLineNumber, toLineNumber);
|
|
103642
103634
|
}
|
|
103643
|
-
_getHorizontalScrollbarHeight(
|
|
103635
|
+
_getHorizontalScrollbarHeight(width, scrollWidth) {
|
|
103644
103636
|
const options = this._configuration.options;
|
|
103645
103637
|
const scrollbar = options.get(91);
|
|
103646
103638
|
if (scrollbar.horizontal === 2) {
|
|
103647
103639
|
return 0;
|
|
103648
103640
|
}
|
|
103649
|
-
if (
|
|
103641
|
+
if (width >= scrollWidth) {
|
|
103650
103642
|
return 0;
|
|
103651
103643
|
}
|
|
103652
103644
|
return scrollbar.horizontalScrollbarSize;
|
|
103653
103645
|
}
|
|
103654
|
-
_getContentHeight(
|
|
103646
|
+
_getContentHeight(width, height, contentWidth) {
|
|
103655
103647
|
const options = this._configuration.options;
|
|
103656
103648
|
let result = this._linesLayout.getLinesTotalHeight();
|
|
103657
103649
|
if (options.get(93)) {
|
|
103658
|
-
result += Math.max(0,
|
|
103650
|
+
result += Math.max(0, height - options.get(58) - options.get(74).bottom);
|
|
103659
103651
|
} else {
|
|
103660
|
-
result += this._getHorizontalScrollbarHeight(
|
|
103652
|
+
result += this._getHorizontalScrollbarHeight(width, contentWidth);
|
|
103661
103653
|
}
|
|
103662
103654
|
return result;
|
|
103663
103655
|
}
|
|
103664
103656
|
_updateHeight() {
|
|
103665
103657
|
const scrollDimensions = this._scrollable.getScrollDimensions();
|
|
103666
|
-
const
|
|
103667
|
-
const
|
|
103658
|
+
const width = scrollDimensions.width;
|
|
103659
|
+
const height = scrollDimensions.height;
|
|
103668
103660
|
const contentWidth = scrollDimensions.contentWidth;
|
|
103669
|
-
this._scrollable.setScrollDimensions(new EditorScrollDimensions(
|
|
103661
|
+
this._scrollable.setScrollDimensions(new EditorScrollDimensions(width, scrollDimensions.contentWidth, height, this._getContentHeight(width, height, contentWidth)));
|
|
103670
103662
|
}
|
|
103671
103663
|
getCurrentViewport() {
|
|
103672
103664
|
const scrollDimensions = this._scrollable.getScrollDimensions();
|
|
@@ -106610,7 +106602,7 @@ function createLineBreaks(requests, fontInfo, tabSize, firstLineBreakColumn, wra
|
|
|
106610
106602
|
const lineContent = LineInjectedText.applyInjectedText(requests[i2], injectedTextsPerLine[i2]);
|
|
106611
106603
|
let firstNonWhitespaceIndex$1 = 0;
|
|
106612
106604
|
let wrappedTextIndentLength = 0;
|
|
106613
|
-
let
|
|
106605
|
+
let width = overallWidth;
|
|
106614
106606
|
if (wrappingIndent !== 0) {
|
|
106615
106607
|
firstNonWhitespaceIndex$1 = firstNonWhitespaceIndex(lineContent);
|
|
106616
106608
|
if (firstNonWhitespaceIndex$1 === -1) {
|
|
@@ -106625,12 +106617,12 @@ function createLineBreaks(requests, fontInfo, tabSize, firstLineBreakColumn, wra
|
|
|
106625
106617
|
firstNonWhitespaceIndex$1 = 0;
|
|
106626
106618
|
wrappedTextIndentLength = 0;
|
|
106627
106619
|
} else {
|
|
106628
|
-
|
|
106620
|
+
width = overallWidth - indentWidth;
|
|
106629
106621
|
}
|
|
106630
106622
|
}
|
|
106631
106623
|
}
|
|
106632
106624
|
const renderLineContent = lineContent.substr(firstNonWhitespaceIndex$1);
|
|
106633
|
-
const tmp = renderLine(renderLineContent, wrappedTextIndentLength, tabSize,
|
|
106625
|
+
const tmp = renderLine(renderLineContent, wrappedTextIndentLength, tabSize, width, sb2, additionalIndentLength);
|
|
106634
106626
|
firstNonWhitespaceIndices[i2] = firstNonWhitespaceIndex$1;
|
|
106635
106627
|
wrappedTextIndentLengths[i2] = wrappedTextIndentLength;
|
|
106636
106628
|
renderLineContents[i2] = renderLineContent;
|
|
@@ -106681,7 +106673,7 @@ function createLineBreaks(requests, fontInfo, tabSize, firstLineBreakColumn, wra
|
|
|
106681
106673
|
document.body.removeChild(containerDomNode);
|
|
106682
106674
|
return result;
|
|
106683
106675
|
}
|
|
106684
|
-
function renderLine(lineContent, initialVisibleColumn, tabSize,
|
|
106676
|
+
function renderLine(lineContent, initialVisibleColumn, tabSize, width, sb2, wrappingIndentLength) {
|
|
106685
106677
|
if (wrappingIndentLength !== 0) {
|
|
106686
106678
|
let hangingOffset = String(wrappingIndentLength);
|
|
106687
106679
|
sb2.appendASCIIString('<div style="text-indent: -');
|
|
@@ -106692,7 +106684,7 @@ function renderLine(lineContent, initialVisibleColumn, tabSize, width2, sb2, wra
|
|
|
106692
106684
|
} else {
|
|
106693
106685
|
sb2.appendASCIIString('<div style="width:');
|
|
106694
106686
|
}
|
|
106695
|
-
sb2.appendASCIIString(String(
|
|
106687
|
+
sb2.appendASCIIString(String(width));
|
|
106696
106688
|
sb2.appendASCIIString('px;">');
|
|
106697
106689
|
const len = lineContent.length;
|
|
106698
106690
|
let visibleColumn = initialVisibleColumn;
|
|
@@ -109846,16 +109838,16 @@ let DiffReview = class DiffReview2 extends Disposable {
|
|
|
109846
109838
|
isVisible() {
|
|
109847
109839
|
return this._isVisible;
|
|
109848
109840
|
}
|
|
109849
|
-
layout(top,
|
|
109850
|
-
this._width =
|
|
109841
|
+
layout(top, width, height) {
|
|
109842
|
+
this._width = width;
|
|
109851
109843
|
this.shadow.setTop(top - 6);
|
|
109852
|
-
this.shadow.setWidth(
|
|
109844
|
+
this.shadow.setWidth(width);
|
|
109853
109845
|
this.shadow.setHeight(this._isVisible ? 6 : 0);
|
|
109854
109846
|
this.domNode.setTop(top);
|
|
109855
|
-
this.domNode.setWidth(
|
|
109856
|
-
this.domNode.setHeight(
|
|
109857
|
-
this._content.setHeight(
|
|
109858
|
-
this._content.setWidth(
|
|
109847
|
+
this.domNode.setWidth(width);
|
|
109848
|
+
this.domNode.setHeight(height);
|
|
109849
|
+
this._content.setHeight(height);
|
|
109850
|
+
this._content.setWidth(width);
|
|
109859
109851
|
if (this._isVisible) {
|
|
109860
109852
|
this.actionBarContainer.setAttribute("aria-hidden", "false");
|
|
109861
109853
|
this.actionBarContainer.setDisplay("block");
|
|
@@ -110086,7 +110078,7 @@ let DiffReview = class DiffReview2 extends Disposable {
|
|
|
110086
110078
|
this._content.domNode.appendChild(container);
|
|
110087
110079
|
this.scrollbar.scanDomNode();
|
|
110088
110080
|
}
|
|
110089
|
-
static _renderSection(dest, diffEntry, modLine, lineHeight,
|
|
110081
|
+
static _renderSection(dest, diffEntry, modLine, lineHeight, width, originalOptions, originalModel, originalModelOpts, modifiedOptions, modifiedModel, modifiedModelOpts, languageIdCodec) {
|
|
110090
110082
|
const type = diffEntry.getType();
|
|
110091
110083
|
let rowClassName = "diff-review-row";
|
|
110092
110084
|
let lineNumbersExtraClassName = "";
|
|
@@ -110117,7 +110109,7 @@ let DiffReview = class DiffReview2 extends Disposable {
|
|
|
110117
110109
|
const originalLine = originalLineStart === 0 ? 0 : originalLineStart + i2;
|
|
110118
110110
|
const modifiedLine = modifiedLineStart === 0 ? 0 : modifiedLineStart + i2;
|
|
110119
110111
|
const row = document.createElement("div");
|
|
110120
|
-
row.style.minWidth =
|
|
110112
|
+
row.style.minWidth = width + "px";
|
|
110121
110113
|
row.className = rowClassName;
|
|
110122
110114
|
row.setAttribute("role", "listitem");
|
|
110123
110115
|
if (modifiedLine !== 0) {
|
|
@@ -110395,10 +110387,10 @@ class InlineDiffMargin extends Disposable {
|
|
|
110395
110387
|
});
|
|
110396
110388
|
};
|
|
110397
110389
|
this._register(addStandardDisposableListener(this._diffActions, "mousedown", (e2) => {
|
|
110398
|
-
const { top, height
|
|
110390
|
+
const { top, height } = getDomNodePagePosition(this._diffActions);
|
|
110399
110391
|
let pad = Math.floor(lineHeight / 3);
|
|
110400
110392
|
e2.preventDefault();
|
|
110401
|
-
showContextMenu(e2.posx, top +
|
|
110393
|
+
showContextMenu(e2.posx, top + height + pad);
|
|
110402
110394
|
}));
|
|
110403
110395
|
this._register(editor2.onMouseMove((e2) => {
|
|
110404
110396
|
if (e2.target.type === 8 || e2.target.type === 5) {
|
|
@@ -110763,11 +110755,11 @@ let DiffEditorWidget = class DiffEditorWidget2 extends Disposable {
|
|
|
110763
110755
|
this._register(editor2.onDidFocusEditorWidget(() => isInDiffLeftEditorKey.set(true)));
|
|
110764
110756
|
this._register(editor2.onDidBlurEditorWidget(() => isInDiffLeftEditorKey.set(false)));
|
|
110765
110757
|
this._register(editor2.onDidContentSizeChange((e2) => {
|
|
110766
|
-
const
|
|
110767
|
-
const
|
|
110758
|
+
const width = this._originalEditor.getContentWidth() + this._modifiedEditor.getContentWidth() + DiffEditorWidget2.ONE_OVERVIEW_WIDTH;
|
|
110759
|
+
const height = Math.max(this._modifiedEditor.getContentHeight(), this._originalEditor.getContentHeight());
|
|
110768
110760
|
this._onDidContentSizeChange.fire({
|
|
110769
|
-
contentHeight:
|
|
110770
|
-
contentWidth:
|
|
110761
|
+
contentHeight: height,
|
|
110762
|
+
contentWidth: width,
|
|
110771
110763
|
contentHeightChanged: e2.contentHeightChanged,
|
|
110772
110764
|
contentWidthChanged: e2.contentWidthChanged
|
|
110773
110765
|
});
|
|
@@ -110824,11 +110816,11 @@ let DiffEditorWidget = class DiffEditorWidget2 extends Disposable {
|
|
|
110824
110816
|
this._register(editor2.onDidFocusEditorWidget(() => isInDiffRightEditorKey.set(true)));
|
|
110825
110817
|
this._register(editor2.onDidBlurEditorWidget(() => isInDiffRightEditorKey.set(false)));
|
|
110826
110818
|
this._register(editor2.onDidContentSizeChange((e2) => {
|
|
110827
|
-
const
|
|
110828
|
-
const
|
|
110819
|
+
const width = this._originalEditor.getContentWidth() + this._modifiedEditor.getContentWidth() + DiffEditorWidget2.ONE_OVERVIEW_WIDTH;
|
|
110820
|
+
const height = Math.max(this._modifiedEditor.getContentHeight(), this._originalEditor.getContentHeight());
|
|
110829
110821
|
this._onDidContentSizeChange.fire({
|
|
110830
|
-
contentHeight:
|
|
110831
|
-
contentWidth:
|
|
110822
|
+
contentHeight: height,
|
|
110823
|
+
contentWidth: width,
|
|
110832
110824
|
contentHeightChanged: e2.contentHeightChanged,
|
|
110833
110825
|
contentWidthChanged: e2.contentWidthChanged
|
|
110834
110826
|
});
|
|
@@ -111069,7 +111061,7 @@ let DiffEditorWidget = class DiffEditorWidget2 extends Disposable {
|
|
|
111069
111061
|
if (!this._originalOverviewRuler || !this._modifiedOverviewRuler) {
|
|
111070
111062
|
return;
|
|
111071
111063
|
}
|
|
111072
|
-
const
|
|
111064
|
+
const height = this._elementSizeObserver.getHeight();
|
|
111073
111065
|
const reviewHeight = this._getReviewHeight();
|
|
111074
111066
|
const freeSpace = DiffEditorWidget2.ENTIRE_DIFF_OVERVIEW_WIDTH - 2 * DiffEditorWidget2.ONE_OVERVIEW_WIDTH;
|
|
111075
111067
|
const layoutInfo = this._modifiedEditor.getLayoutInfo();
|
|
@@ -111078,13 +111070,13 @@ let DiffEditorWidget = class DiffEditorWidget2 extends Disposable {
|
|
|
111078
111070
|
top: 0,
|
|
111079
111071
|
width: DiffEditorWidget2.ONE_OVERVIEW_WIDTH,
|
|
111080
111072
|
right: freeSpace + DiffEditorWidget2.ONE_OVERVIEW_WIDTH,
|
|
111081
|
-
height:
|
|
111073
|
+
height: height - reviewHeight
|
|
111082
111074
|
});
|
|
111083
111075
|
this._modifiedOverviewRuler.setLayout({
|
|
111084
111076
|
top: 0,
|
|
111085
111077
|
right: 0,
|
|
111086
111078
|
width: DiffEditorWidget2.ONE_OVERVIEW_WIDTH,
|
|
111087
|
-
height:
|
|
111079
|
+
height: height - reviewHeight
|
|
111088
111080
|
});
|
|
111089
111081
|
}
|
|
111090
111082
|
}
|
|
@@ -111217,26 +111209,26 @@ let DiffEditorWidget = class DiffEditorWidget2 extends Disposable {
|
|
|
111217
111209
|
this._doLayout();
|
|
111218
111210
|
}
|
|
111219
111211
|
_doLayout() {
|
|
111220
|
-
const
|
|
111221
|
-
const
|
|
111212
|
+
const width = this._elementSizeObserver.getWidth();
|
|
111213
|
+
const height = this._elementSizeObserver.getHeight();
|
|
111222
111214
|
const reviewHeight = this._getReviewHeight();
|
|
111223
111215
|
const splitPoint = this._strategy.layout();
|
|
111224
111216
|
this._originalDomNode.style.width = splitPoint + "px";
|
|
111225
111217
|
this._originalDomNode.style.left = "0px";
|
|
111226
|
-
this._modifiedDomNode.style.width =
|
|
111218
|
+
this._modifiedDomNode.style.width = width - splitPoint + "px";
|
|
111227
111219
|
this._modifiedDomNode.style.left = splitPoint + "px";
|
|
111228
111220
|
this._overviewDomElement.style.top = "0px";
|
|
111229
|
-
this._overviewDomElement.style.height =
|
|
111221
|
+
this._overviewDomElement.style.height = height - reviewHeight + "px";
|
|
111230
111222
|
this._overviewDomElement.style.width = DiffEditorWidget2.ENTIRE_DIFF_OVERVIEW_WIDTH + "px";
|
|
111231
|
-
this._overviewDomElement.style.left =
|
|
111223
|
+
this._overviewDomElement.style.left = width - DiffEditorWidget2.ENTIRE_DIFF_OVERVIEW_WIDTH + "px";
|
|
111232
111224
|
this._overviewViewportDomElement.setWidth(DiffEditorWidget2.ENTIRE_DIFF_OVERVIEW_WIDTH);
|
|
111233
111225
|
this._overviewViewportDomElement.setHeight(30);
|
|
111234
|
-
this._originalEditor.layout({ width: splitPoint, height:
|
|
111235
|
-
this._modifiedEditor.layout({ width:
|
|
111226
|
+
this._originalEditor.layout({ width: splitPoint, height: height - reviewHeight });
|
|
111227
|
+
this._modifiedEditor.layout({ width: width - splitPoint - (this._options.renderOverviewRuler ? DiffEditorWidget2.ENTIRE_DIFF_OVERVIEW_WIDTH : 0), height: height - reviewHeight });
|
|
111236
111228
|
if (this._originalOverviewRuler || this._modifiedOverviewRuler) {
|
|
111237
111229
|
this._layoutOverviewRulers();
|
|
111238
111230
|
}
|
|
111239
|
-
this._reviewPane.layout(
|
|
111231
|
+
this._reviewPane.layout(height - reviewHeight, width, reviewHeight);
|
|
111240
111232
|
this._layoutOverviewViewport();
|
|
111241
111233
|
}
|
|
111242
111234
|
_layoutOverviewViewport() {
|
|
@@ -118562,9 +118554,9 @@ class ListView {
|
|
|
118562
118554
|
indexAfter(position2) {
|
|
118563
118555
|
return this.rangeMap.indexAfter(position2);
|
|
118564
118556
|
}
|
|
118565
|
-
layout(
|
|
118557
|
+
layout(height, width) {
|
|
118566
118558
|
let scrollDimensions = {
|
|
118567
|
-
height: typeof
|
|
118559
|
+
height: typeof height === "number" ? height : getContentHeight(this.domNode)
|
|
118568
118560
|
};
|
|
118569
118561
|
if (this.scrollableElementUpdateDisposable) {
|
|
118570
118562
|
this.scrollableElementUpdateDisposable.dispose();
|
|
@@ -118572,15 +118564,15 @@ class ListView {
|
|
|
118572
118564
|
scrollDimensions.scrollHeight = this.scrollHeight;
|
|
118573
118565
|
}
|
|
118574
118566
|
this.scrollableElement.setScrollDimensions(scrollDimensions);
|
|
118575
|
-
if (typeof
|
|
118576
|
-
this.renderWidth =
|
|
118567
|
+
if (typeof width !== "undefined") {
|
|
118568
|
+
this.renderWidth = width;
|
|
118577
118569
|
if (this.supportDynamicHeights) {
|
|
118578
118570
|
this._rerender(this.scrollTop, this.renderHeight);
|
|
118579
118571
|
}
|
|
118580
118572
|
}
|
|
118581
118573
|
if (this.horizontalScrolling) {
|
|
118582
118574
|
this.scrollableElement.setScrollDimensions({
|
|
118583
|
-
width: typeof
|
|
118575
|
+
width: typeof width === "number" ? width : getContentWidth(this.domNode)
|
|
118584
118576
|
});
|
|
118585
118577
|
}
|
|
118586
118578
|
}
|
|
@@ -119929,17 +119921,17 @@ class PipelineRenderer {
|
|
|
119929
119921
|
renderTemplate(container) {
|
|
119930
119922
|
return this.renderers.map((r2) => r2.renderTemplate(container));
|
|
119931
119923
|
}
|
|
119932
|
-
renderElement(element, index2, templateData,
|
|
119924
|
+
renderElement(element, index2, templateData, height) {
|
|
119933
119925
|
let i2 = 0;
|
|
119934
119926
|
for (const renderer of this.renderers) {
|
|
119935
|
-
renderer.renderElement(element, index2, templateData[i2++],
|
|
119927
|
+
renderer.renderElement(element, index2, templateData[i2++], height);
|
|
119936
119928
|
}
|
|
119937
119929
|
}
|
|
119938
|
-
disposeElement(element, index2, templateData,
|
|
119930
|
+
disposeElement(element, index2, templateData, height) {
|
|
119939
119931
|
let i2 = 0;
|
|
119940
119932
|
for (const renderer of this.renderers) {
|
|
119941
119933
|
if (renderer.disposeElement) {
|
|
119942
|
-
renderer.disposeElement(element, index2, templateData[i2],
|
|
119934
|
+
renderer.disposeElement(element, index2, templateData[i2], height);
|
|
119943
119935
|
}
|
|
119944
119936
|
i2 += 1;
|
|
119945
119937
|
}
|
|
@@ -120193,8 +120185,8 @@ class List {
|
|
|
120193
120185
|
domFocus() {
|
|
120194
120186
|
this.view.domNode.focus({ preventScroll: true });
|
|
120195
120187
|
}
|
|
120196
|
-
layout(
|
|
120197
|
-
this.view.layout(
|
|
120188
|
+
layout(height, width) {
|
|
120189
|
+
this.view.layout(height, width);
|
|
120198
120190
|
}
|
|
120199
120191
|
setSelection(indexes, browserEvent) {
|
|
120200
120192
|
for (const index2 of indexes) {
|
|
@@ -120462,7 +120454,7 @@ class PagedRenderer {
|
|
|
120462
120454
|
const data = this.renderer.renderTemplate(container);
|
|
120463
120455
|
return { data, disposable: Disposable.None };
|
|
120464
120456
|
}
|
|
120465
|
-
renderElement(index2, _2, data,
|
|
120457
|
+
renderElement(index2, _2, data, height) {
|
|
120466
120458
|
if (data.disposable) {
|
|
120467
120459
|
data.disposable.dispose();
|
|
120468
120460
|
}
|
|
@@ -120471,13 +120463,13 @@ class PagedRenderer {
|
|
|
120471
120463
|
}
|
|
120472
120464
|
const model = this.modelProvider();
|
|
120473
120465
|
if (model.isResolved(index2)) {
|
|
120474
|
-
return this.renderer.renderElement(model.get(index2), index2, data.data,
|
|
120466
|
+
return this.renderer.renderElement(model.get(index2), index2, data.data, height);
|
|
120475
120467
|
}
|
|
120476
120468
|
const cts = new CancellationTokenSource$1();
|
|
120477
120469
|
const promise = model.resolve(index2, cts.token);
|
|
120478
120470
|
data.disposable = { dispose: () => cts.cancel() };
|
|
120479
120471
|
this.renderer.renderPlaceholder(index2, data.data);
|
|
120480
|
-
promise.then((entry) => this.renderer.renderElement(entry, index2, data.data,
|
|
120472
|
+
promise.then((entry) => this.renderer.renderElement(entry, index2, data.data, height));
|
|
120481
120473
|
}
|
|
120482
120474
|
disposeTemplate(data) {
|
|
120483
120475
|
if (data.disposable) {
|
|
@@ -121222,21 +121214,21 @@ class TableListRenderer {
|
|
|
121222
121214
|
this.renderedTemplates.add(result);
|
|
121223
121215
|
return result;
|
|
121224
121216
|
}
|
|
121225
|
-
renderElement(element, index2, templateData,
|
|
121217
|
+
renderElement(element, index2, templateData, height) {
|
|
121226
121218
|
for (let i2 = 0; i2 < this.columns.length; i2++) {
|
|
121227
121219
|
const column2 = this.columns[i2];
|
|
121228
121220
|
const cell = column2.project(element);
|
|
121229
121221
|
const renderer = this.renderers[i2];
|
|
121230
|
-
renderer.renderElement(cell, index2, templateData.cellTemplateData[i2],
|
|
121222
|
+
renderer.renderElement(cell, index2, templateData.cellTemplateData[i2], height);
|
|
121231
121223
|
}
|
|
121232
121224
|
}
|
|
121233
|
-
disposeElement(element, index2, templateData,
|
|
121225
|
+
disposeElement(element, index2, templateData, height) {
|
|
121234
121226
|
for (let i2 = 0; i2 < this.columns.length; i2++) {
|
|
121235
121227
|
const renderer = this.renderers[i2];
|
|
121236
121228
|
if (renderer.disposeElement) {
|
|
121237
121229
|
const column2 = this.columns[i2];
|
|
121238
121230
|
const cell = column2.project(element);
|
|
121239
|
-
renderer.disposeElement(cell, index2, templateData.cellTemplateData[i2],
|
|
121231
|
+
renderer.disposeElement(cell, index2, templateData.cellTemplateData[i2], height);
|
|
121240
121232
|
}
|
|
121241
121233
|
}
|
|
121242
121234
|
}
|
|
@@ -122049,9 +122041,9 @@ class ComposedTreeDelegate {
|
|
|
122049
122041
|
hasDynamicHeight(element) {
|
|
122050
122042
|
return !!this.delegate.hasDynamicHeight && this.delegate.hasDynamicHeight(element.element);
|
|
122051
122043
|
}
|
|
122052
|
-
setDynamicHeight(element,
|
|
122044
|
+
setDynamicHeight(element, height) {
|
|
122053
122045
|
if (this.delegate.setDynamicHeight) {
|
|
122054
|
-
this.delegate.setDynamicHeight(element.element,
|
|
122046
|
+
this.delegate.setDynamicHeight(element.element, height);
|
|
122055
122047
|
}
|
|
122056
122048
|
}
|
|
122057
122049
|
}
|
|
@@ -122120,26 +122112,26 @@ class TreeRenderer {
|
|
|
122120
122112
|
const templateData = this.renderer.renderTemplate(contents);
|
|
122121
122113
|
return { container, indent, twistie, indentGuidesDisposable: Disposable.None, templateData };
|
|
122122
122114
|
}
|
|
122123
|
-
renderElement(node2, index2, templateData,
|
|
122124
|
-
if (typeof
|
|
122125
|
-
this.renderedNodes.set(node2, { templateData, height
|
|
122115
|
+
renderElement(node2, index2, templateData, height) {
|
|
122116
|
+
if (typeof height === "number") {
|
|
122117
|
+
this.renderedNodes.set(node2, { templateData, height });
|
|
122126
122118
|
this.renderedElements.set(node2.element, node2);
|
|
122127
122119
|
}
|
|
122128
122120
|
const indent = TreeRenderer.DefaultIndent + (node2.depth - 1) * this.indent;
|
|
122129
122121
|
templateData.twistie.style.paddingLeft = `${indent}px`;
|
|
122130
122122
|
templateData.indent.style.width = `${indent + this.indent - 16}px`;
|
|
122131
122123
|
this.renderTwistie(node2, templateData);
|
|
122132
|
-
if (typeof
|
|
122124
|
+
if (typeof height === "number") {
|
|
122133
122125
|
this.renderIndentGuides(node2, templateData);
|
|
122134
122126
|
}
|
|
122135
|
-
this.renderer.renderElement(node2, index2, templateData.templateData,
|
|
122127
|
+
this.renderer.renderElement(node2, index2, templateData.templateData, height);
|
|
122136
122128
|
}
|
|
122137
|
-
disposeElement(node2, index2, templateData,
|
|
122129
|
+
disposeElement(node2, index2, templateData, height) {
|
|
122138
122130
|
templateData.indentGuidesDisposable.dispose();
|
|
122139
122131
|
if (this.renderer.disposeElement) {
|
|
122140
|
-
this.renderer.disposeElement(node2, index2, templateData.templateData,
|
|
122132
|
+
this.renderer.disposeElement(node2, index2, templateData.templateData, height);
|
|
122141
122133
|
}
|
|
122142
|
-
if (typeof
|
|
122134
|
+
if (typeof height === "number") {
|
|
122143
122135
|
this.renderedNodes.delete(node2);
|
|
122144
122136
|
this.renderedElements.delete(node2.element);
|
|
122145
122137
|
}
|
|
@@ -122461,7 +122453,7 @@ class TypeFilterController {
|
|
|
122461
122453
|
const { left } = getDomNodePagePosition(container);
|
|
122462
122454
|
const containerWidth = container.clientWidth;
|
|
122463
122455
|
const midContainerWidth = containerWidth / 2;
|
|
122464
|
-
const
|
|
122456
|
+
const width = this.domNode.clientWidth;
|
|
122465
122457
|
const disposables2 = new DisposableStore();
|
|
122466
122458
|
let positionClassName = this.positionClassName;
|
|
122467
122459
|
const updatePosition = () => {
|
|
@@ -122472,7 +122464,7 @@ class TypeFilterController {
|
|
|
122472
122464
|
break;
|
|
122473
122465
|
case "ne":
|
|
122474
122466
|
this.domNode.style.top = `4px`;
|
|
122475
|
-
this.domNode.style.left = `${containerWidth -
|
|
122467
|
+
this.domNode.style.left = `${containerWidth - width - 6}px`;
|
|
122476
122468
|
break;
|
|
122477
122469
|
}
|
|
122478
122470
|
};
|
|
@@ -122897,8 +122889,8 @@ class AbstractTree {
|
|
|
122897
122889
|
domFocus() {
|
|
122898
122890
|
this.view.domFocus();
|
|
122899
122891
|
}
|
|
122900
|
-
layout(
|
|
122901
|
-
this.view.layout(
|
|
122892
|
+
layout(height, width) {
|
|
122893
|
+
this.view.layout(height, width);
|
|
122902
122894
|
}
|
|
122903
122895
|
style(styles2) {
|
|
122904
122896
|
const suffix = `.${this.view.domId}`;
|
|
@@ -123450,8 +123442,8 @@ function mapList(nodeMapper, list2) {
|
|
|
123450
123442
|
splice(start, deleteCount, toInsert) {
|
|
123451
123443
|
list2.splice(start, deleteCount, toInsert.map((node2) => nodeMapper.map(node2)));
|
|
123452
123444
|
},
|
|
123453
|
-
updateElementHeight(index2,
|
|
123454
|
-
list2.updateElementHeight(index2,
|
|
123445
|
+
updateElementHeight(index2, height) {
|
|
123446
|
+
list2.updateElementHeight(index2, height);
|
|
123455
123447
|
}
|
|
123456
123448
|
};
|
|
123457
123449
|
}
|
|
@@ -123599,24 +123591,24 @@ class CompressibleRenderer {
|
|
|
123599
123591
|
const data = this.renderer.renderTemplate(container);
|
|
123600
123592
|
return { compressedTreeNode: void 0, data };
|
|
123601
123593
|
}
|
|
123602
|
-
renderElement(node2, index2, templateData,
|
|
123594
|
+
renderElement(node2, index2, templateData, height) {
|
|
123603
123595
|
const compressedTreeNode = this.compressedTreeNodeProvider.getCompressedTreeNode(node2.element);
|
|
123604
123596
|
if (compressedTreeNode.element.elements.length === 1) {
|
|
123605
123597
|
templateData.compressedTreeNode = void 0;
|
|
123606
|
-
this.renderer.renderElement(node2, index2, templateData.data,
|
|
123598
|
+
this.renderer.renderElement(node2, index2, templateData.data, height);
|
|
123607
123599
|
} else {
|
|
123608
123600
|
templateData.compressedTreeNode = compressedTreeNode;
|
|
123609
|
-
this.renderer.renderCompressedElements(compressedTreeNode, index2, templateData.data,
|
|
123601
|
+
this.renderer.renderCompressedElements(compressedTreeNode, index2, templateData.data, height);
|
|
123610
123602
|
}
|
|
123611
123603
|
}
|
|
123612
|
-
disposeElement(node2, index2, templateData,
|
|
123604
|
+
disposeElement(node2, index2, templateData, height) {
|
|
123613
123605
|
if (templateData.compressedTreeNode) {
|
|
123614
123606
|
if (this.renderer.disposeCompressedElements) {
|
|
123615
|
-
this.renderer.disposeCompressedElements(templateData.compressedTreeNode, index2, templateData.data,
|
|
123607
|
+
this.renderer.disposeCompressedElements(templateData.compressedTreeNode, index2, templateData.data, height);
|
|
123616
123608
|
}
|
|
123617
123609
|
} else {
|
|
123618
123610
|
if (this.renderer.disposeElement) {
|
|
123619
|
-
this.renderer.disposeElement(node2, index2, templateData.data,
|
|
123611
|
+
this.renderer.disposeElement(node2, index2, templateData.data, height);
|
|
123620
123612
|
}
|
|
123621
123613
|
}
|
|
123622
123614
|
}
|
|
@@ -123758,8 +123750,8 @@ class AsyncDataTreeRenderer {
|
|
|
123758
123750
|
const templateData = this.renderer.renderTemplate(container);
|
|
123759
123751
|
return { templateData };
|
|
123760
123752
|
}
|
|
123761
|
-
renderElement(node2, index2, templateData,
|
|
123762
|
-
this.renderer.renderElement(this.nodeMapper.map(node2), index2, templateData.templateData,
|
|
123753
|
+
renderElement(node2, index2, templateData, height) {
|
|
123754
|
+
this.renderer.renderElement(this.nodeMapper.map(node2), index2, templateData.templateData, height);
|
|
123763
123755
|
}
|
|
123764
123756
|
renderTwistie(element, twistieElement) {
|
|
123765
123757
|
if (element.slow) {
|
|
@@ -123770,9 +123762,9 @@ class AsyncDataTreeRenderer {
|
|
|
123770
123762
|
return false;
|
|
123771
123763
|
}
|
|
123772
123764
|
}
|
|
123773
|
-
disposeElement(node2, index2, templateData,
|
|
123765
|
+
disposeElement(node2, index2, templateData, height) {
|
|
123774
123766
|
if (this.renderer.disposeElement) {
|
|
123775
|
-
this.renderer.disposeElement(this.nodeMapper.map(node2), index2, templateData.templateData,
|
|
123767
|
+
this.renderer.disposeElement(this.nodeMapper.map(node2), index2, templateData.templateData, height);
|
|
123776
123768
|
}
|
|
123777
123769
|
}
|
|
123778
123770
|
disposeTemplate(templateData) {
|
|
@@ -123956,8 +123948,8 @@ class AsyncDataTree {
|
|
|
123956
123948
|
domFocus() {
|
|
123957
123949
|
this.tree.domFocus();
|
|
123958
123950
|
}
|
|
123959
|
-
layout(
|
|
123960
|
-
this.tree.layout(
|
|
123951
|
+
layout(height, width) {
|
|
123952
|
+
this.tree.layout(height, width);
|
|
123961
123953
|
}
|
|
123962
123954
|
style(styles2) {
|
|
123963
123955
|
this.tree.style(styles2);
|
|
@@ -124347,11 +124339,11 @@ class CompressibleAsyncDataTreeRenderer {
|
|
|
124347
124339
|
const templateData = this.renderer.renderTemplate(container);
|
|
124348
124340
|
return { templateData };
|
|
124349
124341
|
}
|
|
124350
|
-
renderElement(node2, index2, templateData,
|
|
124351
|
-
this.renderer.renderElement(this.nodeMapper.map(node2), index2, templateData.templateData,
|
|
124342
|
+
renderElement(node2, index2, templateData, height) {
|
|
124343
|
+
this.renderer.renderElement(this.nodeMapper.map(node2), index2, templateData.templateData, height);
|
|
124352
124344
|
}
|
|
124353
|
-
renderCompressedElements(node2, index2, templateData,
|
|
124354
|
-
this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(node2), index2, templateData.templateData,
|
|
124345
|
+
renderCompressedElements(node2, index2, templateData, height) {
|
|
124346
|
+
this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(node2), index2, templateData.templateData, height);
|
|
124355
124347
|
}
|
|
124356
124348
|
renderTwistie(element, twistieElement) {
|
|
124357
124349
|
if (element.slow) {
|
|
@@ -124362,14 +124354,14 @@ class CompressibleAsyncDataTreeRenderer {
|
|
|
124362
124354
|
return false;
|
|
124363
124355
|
}
|
|
124364
124356
|
}
|
|
124365
|
-
disposeElement(node2, index2, templateData,
|
|
124357
|
+
disposeElement(node2, index2, templateData, height) {
|
|
124366
124358
|
if (this.renderer.disposeElement) {
|
|
124367
|
-
this.renderer.disposeElement(this.nodeMapper.map(node2), index2, templateData.templateData,
|
|
124359
|
+
this.renderer.disposeElement(this.nodeMapper.map(node2), index2, templateData.templateData, height);
|
|
124368
124360
|
}
|
|
124369
124361
|
}
|
|
124370
|
-
disposeCompressedElements(node2, index2, templateData,
|
|
124362
|
+
disposeCompressedElements(node2, index2, templateData, height) {
|
|
124371
124363
|
if (this.renderer.disposeCompressedElements) {
|
|
124372
|
-
this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(node2), index2, templateData.templateData,
|
|
124364
|
+
this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(node2), index2, templateData.templateData, height);
|
|
124373
124365
|
}
|
|
124374
124366
|
}
|
|
124375
124367
|
disposeTemplate(templateData) {
|
|
@@ -128239,7 +128231,7 @@ class InputBox extends Widget {
|
|
|
128239
128231
|
get width() {
|
|
128240
128232
|
return getTotalWidth(this.input);
|
|
128241
128233
|
}
|
|
128242
|
-
set width(
|
|
128234
|
+
set width(width) {
|
|
128243
128235
|
if (this.options.flexibleHeight && this.options.flexibleWidth) {
|
|
128244
128236
|
let horizontalPadding = 0;
|
|
128245
128237
|
if (this.mirror) {
|
|
@@ -128247,12 +128239,12 @@ class InputBox extends Widget {
|
|
|
128247
128239
|
const paddingRight = parseFloat(this.mirror.style.paddingRight || "") || 0;
|
|
128248
128240
|
horizontalPadding = paddingLeft + paddingRight;
|
|
128249
128241
|
}
|
|
128250
|
-
this.input.style.width =
|
|
128242
|
+
this.input.style.width = width - horizontalPadding + "px";
|
|
128251
128243
|
} else {
|
|
128252
|
-
this.input.style.width =
|
|
128244
|
+
this.input.style.width = width + "px";
|
|
128253
128245
|
}
|
|
128254
128246
|
if (this.mirror) {
|
|
128255
|
-
this.mirror.style.width =
|
|
128247
|
+
this.mirror.style.width = width + "px";
|
|
128256
128248
|
}
|
|
128257
128249
|
}
|
|
128258
128250
|
set paddingRight(paddingRight) {
|
|
@@ -128266,9 +128258,9 @@ class InputBox extends Widget {
|
|
|
128266
128258
|
return;
|
|
128267
128259
|
}
|
|
128268
128260
|
const scrollHeight = this.cachedContentHeight;
|
|
128269
|
-
const
|
|
128261
|
+
const height = this.cachedHeight;
|
|
128270
128262
|
const scrollTop2 = this.input.scrollTop;
|
|
128271
|
-
this.scrollableElement.setScrollDimensions({ scrollHeight, height
|
|
128263
|
+
this.scrollableElement.setScrollDimensions({ scrollHeight, height });
|
|
128272
128264
|
this.scrollableElement.setScrollPosition({ scrollTop: scrollTop2 });
|
|
128273
128265
|
}
|
|
128274
128266
|
showMessage(message, force) {
|
|
@@ -128789,15 +128781,15 @@ function parseHrefAndDimensions(href) {
|
|
|
128789
128781
|
if (parameters) {
|
|
128790
128782
|
const heightFromParams = /height=(\d+)/.exec(parameters);
|
|
128791
128783
|
const widthFromParams = /width=(\d+)/.exec(parameters);
|
|
128792
|
-
const
|
|
128793
|
-
const
|
|
128794
|
-
const widthIsFinite = isFinite(parseInt(
|
|
128795
|
-
const heightIsFinite = isFinite(parseInt(
|
|
128784
|
+
const height = heightFromParams ? heightFromParams[1] : "";
|
|
128785
|
+
const width = widthFromParams ? widthFromParams[1] : "";
|
|
128786
|
+
const widthIsFinite = isFinite(parseInt(width));
|
|
128787
|
+
const heightIsFinite = isFinite(parseInt(height));
|
|
128796
128788
|
if (widthIsFinite) {
|
|
128797
|
-
dimensions.push(`width="${
|
|
128789
|
+
dimensions.push(`width="${width}"`);
|
|
128798
128790
|
}
|
|
128799
128791
|
if (heightIsFinite) {
|
|
128800
|
-
dimensions.push(`height="${
|
|
128792
|
+
dimensions.push(`height="${height}"`);
|
|
128801
128793
|
}
|
|
128802
128794
|
}
|
|
128803
128795
|
return { href, dimensions };
|
|
@@ -131110,9 +131102,9 @@ class QuickInputController extends Disposable {
|
|
|
131110
131102
|
if (this.ui) {
|
|
131111
131103
|
this.ui.container.style.top = `${this.titleBarOffset}px`;
|
|
131112
131104
|
const style = this.ui.container.style;
|
|
131113
|
-
const
|
|
131114
|
-
style.width =
|
|
131115
|
-
style.marginLeft = "-" +
|
|
131105
|
+
const width = Math.min(this.dimension.width * 0.62, QuickInputController.MAX_WIDTH);
|
|
131106
|
+
style.width = width + "px";
|
|
131107
|
+
style.marginLeft = "-" + width / 2 + "px";
|
|
131116
131108
|
this.ui.inputBox.layout();
|
|
131117
131109
|
this.ui.list.layout(this.dimension && this.dimension.height * 0.4);
|
|
131118
131110
|
}
|
|
@@ -136763,7 +136755,7 @@ let LightBulbWidget = class LightBulbWidget2 extends Disposable {
|
|
|
136763
136755
|
}
|
|
136764
136756
|
this._editor.focus();
|
|
136765
136757
|
e2.preventDefault();
|
|
136766
|
-
const { top, height
|
|
136758
|
+
const { top, height } = getDomNodePagePosition(this._domNode);
|
|
136767
136759
|
const lineHeight = this._editor.getOption(58);
|
|
136768
136760
|
let pad = Math.floor(lineHeight / 3);
|
|
136769
136761
|
if (this.state.widgetPosition.position !== null && this.state.widgetPosition.position.lineNumber < this.state.editorPosition.lineNumber) {
|
|
@@ -136771,7 +136763,7 @@ let LightBulbWidget = class LightBulbWidget2 extends Disposable {
|
|
|
136771
136763
|
}
|
|
136772
136764
|
this._onClick.fire({
|
|
136773
136765
|
x: e2.posx,
|
|
136774
|
-
y: top +
|
|
136766
|
+
y: top + height + pad,
|
|
136775
136767
|
actions: this.state.actions,
|
|
136776
136768
|
trigger: this.state.trigger
|
|
136777
136769
|
});
|
|
@@ -137835,11 +137827,11 @@ class CodeLensViewZone {
|
|
|
137835
137827
|
this.suppressMouseDown = true;
|
|
137836
137828
|
this.domNode = document.createElement("div");
|
|
137837
137829
|
}
|
|
137838
|
-
onComputedHeight(
|
|
137830
|
+
onComputedHeight(height) {
|
|
137839
137831
|
if (this._lastHeight === void 0) {
|
|
137840
|
-
this._lastHeight =
|
|
137841
|
-
} else if (this._lastHeight !==
|
|
137842
|
-
this._lastHeight =
|
|
137832
|
+
this._lastHeight = height;
|
|
137833
|
+
} else if (this._lastHeight !== height) {
|
|
137834
|
+
this._lastHeight = height;
|
|
137843
137835
|
this._onHeight();
|
|
137844
137836
|
}
|
|
137845
137837
|
}
|
|
@@ -138004,8 +137996,8 @@ class CodeLensWidget {
|
|
|
138004
137996
|
}, (id2) => this._decorationIds[i2] = id2);
|
|
138005
137997
|
});
|
|
138006
137998
|
}
|
|
138007
|
-
updateHeight(
|
|
138008
|
-
this._viewZone.heightInPx =
|
|
137999
|
+
updateHeight(height, viewZoneChangeAccessor) {
|
|
138000
|
+
this._viewZone.heightInPx = height;
|
|
138009
138001
|
viewZoneChangeAccessor.layoutZone(this._viewZoneId);
|
|
138010
138002
|
if (this._contentWidget) {
|
|
138011
138003
|
this._editor.layoutContentWidget(this._contentWidget);
|
|
@@ -138925,8 +138917,8 @@ class ViewZoneDelegate {
|
|
|
138925
138917
|
onDomNodeTop(top) {
|
|
138926
138918
|
this._onDomNodeTop(top);
|
|
138927
138919
|
}
|
|
138928
|
-
onComputedHeight(
|
|
138929
|
-
this._onComputedHeight(
|
|
138920
|
+
onComputedHeight(height) {
|
|
138921
|
+
this._onComputedHeight(height);
|
|
138930
138922
|
}
|
|
138931
138923
|
}
|
|
138932
138924
|
class OverlayWidgetDelegate {
|
|
@@ -139002,10 +138994,10 @@ class ZoneWidget {
|
|
|
139002
138994
|
this.domNode.setAttribute("role", "presentation");
|
|
139003
138995
|
}
|
|
139004
138996
|
this._disposables.add(this.editor.onDidLayoutChange((info) => {
|
|
139005
|
-
const
|
|
139006
|
-
this.domNode.style.width =
|
|
138997
|
+
const width = this._getWidth(info);
|
|
138998
|
+
this.domNode.style.width = width + "px";
|
|
139007
138999
|
this.domNode.style.left = this._getLeft(info) + "px";
|
|
139008
|
-
this._onWidth(
|
|
139000
|
+
this._onWidth(width);
|
|
139009
139001
|
}));
|
|
139010
139002
|
}
|
|
139011
139003
|
dispose() {
|
|
@@ -139073,10 +139065,10 @@ class ZoneWidget {
|
|
|
139073
139065
|
_onViewZoneTop(top) {
|
|
139074
139066
|
this.domNode.style.top = top + "px";
|
|
139075
139067
|
}
|
|
139076
|
-
_onViewZoneHeight(
|
|
139077
|
-
this.domNode.style.height = `${
|
|
139068
|
+
_onViewZoneHeight(height) {
|
|
139069
|
+
this.domNode.style.height = `${height}px`;
|
|
139078
139070
|
if (this.container) {
|
|
139079
|
-
let containerHeight =
|
|
139071
|
+
let containerHeight = height - this._decoratingElementsHeight();
|
|
139080
139072
|
this.container.style.height = `${containerHeight}px`;
|
|
139081
139073
|
const layoutInfo = this.editor.getLayoutInfo();
|
|
139082
139074
|
this._doLayout(containerHeight, this._getWidth(layoutInfo));
|
|
@@ -139140,8 +139132,8 @@ class ZoneWidget {
|
|
|
139140
139132
|
_showImpl(where, heightInLines) {
|
|
139141
139133
|
const position2 = where.getStartPosition();
|
|
139142
139134
|
const layoutInfo = this.editor.getLayoutInfo();
|
|
139143
|
-
const
|
|
139144
|
-
this.domNode.style.width = `${
|
|
139135
|
+
const width = this._getWidth(layoutInfo);
|
|
139136
|
+
this.domNode.style.width = `${width}px`;
|
|
139145
139137
|
this.domNode.style.left = this._getLeft(layoutInfo) + "px";
|
|
139146
139138
|
const viewZoneDomNode = document.createElement("div");
|
|
139147
139139
|
viewZoneDomNode.style.overflow = "hidden";
|
|
@@ -139167,15 +139159,15 @@ class ZoneWidget {
|
|
|
139167
139159
|
this._overlayWidget = null;
|
|
139168
139160
|
}
|
|
139169
139161
|
this.domNode.style.top = "-1000px";
|
|
139170
|
-
this._viewZone = new ViewZoneDelegate(viewZoneDomNode, position2.lineNumber, position2.column, heightInLines, (top) => this._onViewZoneTop(top), (
|
|
139162
|
+
this._viewZone = new ViewZoneDelegate(viewZoneDomNode, position2.lineNumber, position2.column, heightInLines, (top) => this._onViewZoneTop(top), (height) => this._onViewZoneHeight(height));
|
|
139171
139163
|
this._viewZone.id = accessor.addZone(this._viewZone);
|
|
139172
139164
|
this._overlayWidget = new OverlayWidgetDelegate(WIDGET_ID + this._viewZone.id, this.domNode);
|
|
139173
139165
|
this.editor.addOverlayWidget(this._overlayWidget);
|
|
139174
139166
|
});
|
|
139175
139167
|
if (this.container && this.options.showFrame) {
|
|
139176
|
-
const
|
|
139177
|
-
this.container.style.borderTopWidth =
|
|
139178
|
-
this.container.style.borderBottomWidth =
|
|
139168
|
+
const width2 = this.options.frameWidth ? this.options.frameWidth : frameThickness;
|
|
139169
|
+
this.container.style.borderTopWidth = width2 + "px";
|
|
139170
|
+
this.container.style.borderBottomWidth = width2 + "px";
|
|
139179
139171
|
}
|
|
139180
139172
|
let containerHeight = heightInLines * lineHeight - this._decoratingElementsHeight();
|
|
139181
139173
|
if (this.container) {
|
|
@@ -139183,7 +139175,7 @@ class ZoneWidget {
|
|
|
139183
139175
|
this.container.style.height = containerHeight + "px";
|
|
139184
139176
|
this.container.style.overflow = "hidden";
|
|
139185
139177
|
}
|
|
139186
|
-
this._doLayout(containerHeight,
|
|
139178
|
+
this._doLayout(containerHeight, width);
|
|
139187
139179
|
if (!this.options.keepEditorSelection) {
|
|
139188
139180
|
this.editor.setSelection(where);
|
|
139189
139181
|
}
|
|
@@ -140789,8 +140781,8 @@ let ReferenceWidget = class ReferenceWidget2 extends PeekViewWidget {
|
|
|
140789
140781
|
element: this._previewContainer,
|
|
140790
140782
|
minimumSize: 200,
|
|
140791
140783
|
maximumSize: Number.MAX_VALUE,
|
|
140792
|
-
layout: (
|
|
140793
|
-
this._preview.layout({ height: this._dim.height, width
|
|
140784
|
+
layout: (width) => {
|
|
140785
|
+
this._preview.layout({ height: this._dim.height, width });
|
|
140794
140786
|
}
|
|
140795
140787
|
}, Sizing.Distribute);
|
|
140796
140788
|
this._splitView.addView({
|
|
@@ -140798,10 +140790,10 @@ let ReferenceWidget = class ReferenceWidget2 extends PeekViewWidget {
|
|
|
140798
140790
|
element: this._treeContainer,
|
|
140799
140791
|
minimumSize: 100,
|
|
140800
140792
|
maximumSize: Number.MAX_VALUE,
|
|
140801
|
-
layout: (
|
|
140793
|
+
layout: (width) => {
|
|
140802
140794
|
this._treeContainer.style.height = `${this._dim.height}px`;
|
|
140803
|
-
this._treeContainer.style.width = `${
|
|
140804
|
-
this._tree.layout(this._dim.height,
|
|
140795
|
+
this._treeContainer.style.width = `${width}px`;
|
|
140796
|
+
this._tree.layout(this._dim.height, width);
|
|
140805
140797
|
}
|
|
140806
140798
|
}, Sizing.Distribute);
|
|
140807
140799
|
this._disposables.add(this._splitView.onDidSashChange(() => {
|
|
@@ -140828,9 +140820,9 @@ let ReferenceWidget = class ReferenceWidget2 extends PeekViewWidget {
|
|
|
140828
140820
|
});
|
|
140829
140821
|
hide(this._treeContainer);
|
|
140830
140822
|
}
|
|
140831
|
-
_onWidth(
|
|
140823
|
+
_onWidth(width) {
|
|
140832
140824
|
if (this._dim) {
|
|
140833
|
-
this._doLayoutBody(this._dim.height,
|
|
140825
|
+
this._doLayoutBody(this._dim.height, width);
|
|
140834
140826
|
}
|
|
140835
140827
|
}
|
|
140836
140828
|
_doLayoutBody(heightInPixel, widthInPixel) {
|
|
@@ -147055,10 +147047,10 @@ class MessageWidget {
|
|
|
147055
147047
|
const scrollHeight = fontInfo.lineHeight * this._lines;
|
|
147056
147048
|
this._scrollable.setScrollDimensions({ scrollWidth, scrollHeight });
|
|
147057
147049
|
}
|
|
147058
|
-
layout(
|
|
147059
|
-
this._scrollable.getDomNode().style.height = `${
|
|
147060
|
-
this._scrollable.getDomNode().style.width = `${
|
|
147061
|
-
this._scrollable.setScrollDimensions({ width
|
|
147050
|
+
layout(height, width) {
|
|
147051
|
+
this._scrollable.getDomNode().style.height = `${height}px`;
|
|
147052
|
+
this._scrollable.getDomNode().style.width = `${width}px`;
|
|
147053
|
+
this._scrollable.setScrollDimensions({ width, height });
|
|
147062
147054
|
}
|
|
147063
147055
|
getHeightInLines() {
|
|
147064
147056
|
return Math.min(17, this._lines);
|
|
@@ -152261,15 +152253,15 @@ class ResizableHTMLElement {
|
|
|
152261
152253
|
this._southSash.state = south ? 3 : 0;
|
|
152262
152254
|
this._westSash.state = west ? 3 : 0;
|
|
152263
152255
|
}
|
|
152264
|
-
layout(
|
|
152256
|
+
layout(height = this.size.height, width = this.size.width) {
|
|
152265
152257
|
const { height: minHeight, width: minWidth } = this._minSize;
|
|
152266
152258
|
const { height: maxHeight, width: maxWidth } = this._maxSize;
|
|
152267
|
-
|
|
152268
|
-
|
|
152269
|
-
const newSize = new Dimension(
|
|
152259
|
+
height = Math.max(minHeight, Math.min(maxHeight, height));
|
|
152260
|
+
width = Math.max(minWidth, Math.min(maxWidth, width));
|
|
152261
|
+
const newSize = new Dimension(width, height);
|
|
152270
152262
|
if (!Dimension.equals(newSize, this._size)) {
|
|
152271
|
-
this.domNode.style.height =
|
|
152272
|
-
this.domNode.style.width =
|
|
152263
|
+
this.domNode.style.height = height + "px";
|
|
152264
|
+
this.domNode.style.width = width + "px";
|
|
152273
152265
|
this._size = newSize;
|
|
152274
152266
|
this._northSash.layout();
|
|
152275
152267
|
this._eastSash.layout();
|
|
@@ -152469,11 +152461,11 @@ let SuggestDetailsWidget = class SuggestDetailsWidget2 {
|
|
|
152469
152461
|
get size() {
|
|
152470
152462
|
return this._size;
|
|
152471
152463
|
}
|
|
152472
|
-
layout(
|
|
152473
|
-
const newSize = new Dimension(
|
|
152464
|
+
layout(width, height) {
|
|
152465
|
+
const newSize = new Dimension(width, height);
|
|
152474
152466
|
if (!Dimension.equals(newSize, this._size)) {
|
|
152475
152467
|
this._size = newSize;
|
|
152476
|
-
size(this.domNode,
|
|
152468
|
+
size(this.domNode, width, height);
|
|
152477
152469
|
}
|
|
152478
152470
|
this._scrollbar.scanDomNode();
|
|
152479
152471
|
}
|
|
@@ -152495,8 +152487,8 @@ let SuggestDetailsWidget = class SuggestDetailsWidget2 {
|
|
|
152495
152487
|
pageUp() {
|
|
152496
152488
|
this.scrollUp(80);
|
|
152497
152489
|
}
|
|
152498
|
-
set borderWidth(
|
|
152499
|
-
this._borderWidth =
|
|
152490
|
+
set borderWidth(width) {
|
|
152491
|
+
this._borderWidth = width;
|
|
152500
152492
|
}
|
|
152501
152493
|
get borderWidth() {
|
|
152502
152494
|
return this._borderWidth;
|
|
@@ -152606,18 +152598,18 @@ class SuggestDetailsOverlay {
|
|
|
152606
152598
|
const defaultMinSize = new Dimension(220, 2 * info.lineHeight);
|
|
152607
152599
|
const defaultTop = anchorBox.top;
|
|
152608
152600
|
const eastPlacement = function() {
|
|
152609
|
-
const
|
|
152601
|
+
const width = bodyBox.width - (anchorBox.left + anchorBox.width + info.borderWidth + info.horizontalPadding);
|
|
152610
152602
|
const left = -info.borderWidth + anchorBox.left + anchorBox.width;
|
|
152611
|
-
const maxSizeTop = new Dimension(
|
|
152603
|
+
const maxSizeTop = new Dimension(width, bodyBox.height - anchorBox.top - info.borderHeight - info.verticalPadding);
|
|
152612
152604
|
const maxSizeBottom = maxSizeTop.with(void 0, anchorBox.top + anchorBox.height - info.borderHeight - info.verticalPadding);
|
|
152613
|
-
return { top: defaultTop, left, fit:
|
|
152605
|
+
return { top: defaultTop, left, fit: width - size2.width, maxSizeTop, maxSizeBottom, minSize: defaultMinSize.with(Math.min(width, defaultMinSize.width)) };
|
|
152614
152606
|
}();
|
|
152615
152607
|
const westPlacement = function() {
|
|
152616
|
-
const
|
|
152608
|
+
const width = anchorBox.left - info.borderWidth - info.horizontalPadding;
|
|
152617
152609
|
const left = Math.max(info.horizontalPadding, anchorBox.left - size2.width - info.borderWidth);
|
|
152618
|
-
const maxSizeTop = new Dimension(
|
|
152610
|
+
const maxSizeTop = new Dimension(width, bodyBox.height - anchorBox.top - info.borderHeight - info.verticalPadding);
|
|
152619
152611
|
const maxSizeBottom = maxSizeTop.with(void 0, anchorBox.top + anchorBox.height - info.borderHeight - info.verticalPadding);
|
|
152620
|
-
return { top: defaultTop, left, fit:
|
|
152612
|
+
return { top: defaultTop, left, fit: width - size2.width, maxSizeTop, maxSizeBottom, minSize: defaultMinSize.with(Math.min(width, defaultMinSize.width)) };
|
|
152621
152613
|
}();
|
|
152622
152614
|
const southPacement = function() {
|
|
152623
152615
|
const left = anchorBox.left;
|
|
@@ -152629,14 +152621,14 @@ class SuggestDetailsOverlay {
|
|
|
152629
152621
|
const placement = (_a2 = placements.find((p2) => p2.fit >= 0)) !== null && _a2 !== void 0 ? _a2 : placements.sort((a, b2) => b2.fit - a.fit)[0];
|
|
152630
152622
|
const bottom = anchorBox.top + anchorBox.height - info.borderHeight;
|
|
152631
152623
|
let alignAtTop;
|
|
152632
|
-
let
|
|
152624
|
+
let height = size2.height;
|
|
152633
152625
|
const maxHeight = Math.max(placement.maxSizeTop.height, placement.maxSizeBottom.height);
|
|
152634
|
-
if (
|
|
152635
|
-
|
|
152626
|
+
if (height > maxHeight) {
|
|
152627
|
+
height = maxHeight;
|
|
152636
152628
|
}
|
|
152637
152629
|
let maxSize;
|
|
152638
152630
|
if (preferAlignAtTop) {
|
|
152639
|
-
if (
|
|
152631
|
+
if (height <= placement.maxSizeTop.height) {
|
|
152640
152632
|
alignAtTop = true;
|
|
152641
152633
|
maxSize = placement.maxSizeTop;
|
|
152642
152634
|
} else {
|
|
@@ -152644,7 +152636,7 @@ class SuggestDetailsOverlay {
|
|
|
152644
152636
|
maxSize = placement.maxSizeBottom;
|
|
152645
152637
|
}
|
|
152646
152638
|
} else {
|
|
152647
|
-
if (
|
|
152639
|
+
if (height <= placement.maxSizeBottom.height) {
|
|
152648
152640
|
alignAtTop = false;
|
|
152649
152641
|
maxSize = placement.maxSizeBottom;
|
|
152650
152642
|
} else {
|
|
@@ -152652,12 +152644,12 @@ class SuggestDetailsOverlay {
|
|
|
152652
152644
|
maxSize = placement.maxSizeTop;
|
|
152653
152645
|
}
|
|
152654
152646
|
}
|
|
152655
|
-
this._applyTopLeft({ left: placement.left, top: alignAtTop ? placement.top : bottom -
|
|
152647
|
+
this._applyTopLeft({ left: placement.left, top: alignAtTop ? placement.top : bottom - height });
|
|
152656
152648
|
this.getDomNode().style.position = "fixed";
|
|
152657
152649
|
this._resizable.enableSashes(!alignAtTop, placement === eastPlacement, alignAtTop, placement !== eastPlacement);
|
|
152658
152650
|
this._resizable.minSize = placement.minSize;
|
|
152659
152651
|
this._resizable.maxSize = maxSize;
|
|
152660
|
-
this._resizable.layout(
|
|
152652
|
+
this._resizable.layout(height, Math.min(maxSize.width, size2.width));
|
|
152661
152653
|
this.widget.layout(this._resizable.size.width, this._resizable.size.height);
|
|
152662
152654
|
}
|
|
152663
152655
|
_applyTopLeft(topLeft) {
|
|
@@ -153035,14 +153027,14 @@ let SuggestWidget = class SuggestWidget2 {
|
|
|
153035
153027
|
if (state2) {
|
|
153036
153028
|
const { itemHeight, defaultSize } = this.getLayoutInfo();
|
|
153037
153029
|
const threshold = Math.round(itemHeight / 2);
|
|
153038
|
-
let { width
|
|
153039
|
-
if (!state2.persistHeight || Math.abs(state2.currentSize.height -
|
|
153040
|
-
|
|
153030
|
+
let { width, height } = this.element.size;
|
|
153031
|
+
if (!state2.persistHeight || Math.abs(state2.currentSize.height - height) <= threshold) {
|
|
153032
|
+
height = (_b2 = (_a2 = state2.persistedSize) === null || _a2 === void 0 ? void 0 : _a2.height) !== null && _b2 !== void 0 ? _b2 : defaultSize.height;
|
|
153041
153033
|
}
|
|
153042
|
-
if (!state2.persistWidth || Math.abs(state2.currentSize.width -
|
|
153043
|
-
|
|
153034
|
+
if (!state2.persistWidth || Math.abs(state2.currentSize.width - width) <= threshold) {
|
|
153035
|
+
width = (_d2 = (_c2 = state2.persistedSize) === null || _c2 === void 0 ? void 0 : _c2.width) !== null && _d2 !== void 0 ? _d2 : defaultSize.width;
|
|
153044
153036
|
}
|
|
153045
|
-
this._persistedSize.store(new Dimension(
|
|
153037
|
+
this._persistedSize.store(new Dimension(width, height));
|
|
153046
153038
|
}
|
|
153047
153039
|
this._contentWidget.unlockPreference();
|
|
153048
153040
|
state2 = void 0;
|
|
@@ -153492,21 +153484,21 @@ let SuggestWidget = class SuggestWidget2 {
|
|
|
153492
153484
|
if (!size2) {
|
|
153493
153485
|
size2 = info.defaultSize;
|
|
153494
153486
|
}
|
|
153495
|
-
let
|
|
153496
|
-
let
|
|
153487
|
+
let height = size2.height;
|
|
153488
|
+
let width = size2.width;
|
|
153497
153489
|
this._status.element.style.lineHeight = `${info.itemHeight}px`;
|
|
153498
153490
|
if (this._state === 2 || this._state === 1) {
|
|
153499
|
-
|
|
153500
|
-
|
|
153491
|
+
height = info.itemHeight + info.borderHeight;
|
|
153492
|
+
width = info.defaultSize.width / 2;
|
|
153501
153493
|
this.element.enableSashes(false, false, false, false);
|
|
153502
|
-
this.element.minSize = this.element.maxSize = new Dimension(
|
|
153494
|
+
this.element.minSize = this.element.maxSize = new Dimension(width, height);
|
|
153503
153495
|
this._contentWidget.setPreference(2);
|
|
153504
153496
|
} else {
|
|
153505
153497
|
const maxWidth = bodyBox.width - info.borderHeight - 2 * info.horizontalPadding;
|
|
153506
|
-
if (
|
|
153507
|
-
|
|
153498
|
+
if (width > maxWidth) {
|
|
153499
|
+
width = maxWidth;
|
|
153508
153500
|
}
|
|
153509
|
-
const preferredWidth = this._completionModel ? this._completionModel.stats.pLabelLen * info.typicalHalfwidthCharacterWidth :
|
|
153501
|
+
const preferredWidth = this._completionModel ? this._completionModel.stats.pLabelLen * info.typicalHalfwidthCharacterWidth : width;
|
|
153510
153502
|
const fullHeight = info.statusBarHeight + this._list.contentHeight + info.borderHeight;
|
|
153511
153503
|
const minHeight = info.itemHeight + info.statusBarHeight;
|
|
153512
153504
|
const editorBox = getDomNodePagePosition(this.editor.getDomNode());
|
|
@@ -153516,17 +153508,17 @@ let SuggestWidget = class SuggestWidget2 {
|
|
|
153516
153508
|
const availableSpaceAbove = editorBox.top + cursorBox.top - info.verticalPadding;
|
|
153517
153509
|
const maxHeightAbove = Math.min(availableSpaceAbove, fullHeight);
|
|
153518
153510
|
let maxHeight = Math.min(Math.max(maxHeightAbove, maxHeightBelow) + info.borderHeight, fullHeight);
|
|
153519
|
-
if (
|
|
153520
|
-
|
|
153511
|
+
if (height === ((_a2 = this._cappedHeight) === null || _a2 === void 0 ? void 0 : _a2.capped)) {
|
|
153512
|
+
height = this._cappedHeight.wanted;
|
|
153521
153513
|
}
|
|
153522
|
-
if (
|
|
153523
|
-
|
|
153514
|
+
if (height < minHeight) {
|
|
153515
|
+
height = minHeight;
|
|
153524
153516
|
}
|
|
153525
|
-
if (
|
|
153526
|
-
|
|
153517
|
+
if (height > maxHeight) {
|
|
153518
|
+
height = maxHeight;
|
|
153527
153519
|
}
|
|
153528
153520
|
const forceRenderingAboveRequiredSpace = 150;
|
|
153529
|
-
if (
|
|
153521
|
+
if (height > maxHeightBelow || this._forceRenderingAbove && availableSpaceAbove > forceRenderingAboveRequiredSpace) {
|
|
153530
153522
|
this._contentWidget.setPreference(1);
|
|
153531
153523
|
this.element.enableSashes(true, true, false, false);
|
|
153532
153524
|
maxHeight = maxHeightAbove;
|
|
@@ -153538,18 +153530,18 @@ let SuggestWidget = class SuggestWidget2 {
|
|
|
153538
153530
|
this.element.preferredSize = new Dimension(preferredWidth, info.defaultSize.height);
|
|
153539
153531
|
this.element.maxSize = new Dimension(maxWidth, maxHeight);
|
|
153540
153532
|
this.element.minSize = new Dimension(220, minHeight);
|
|
153541
|
-
this._cappedHeight =
|
|
153533
|
+
this._cappedHeight = height === fullHeight ? { wanted: (_c2 = (_b2 = this._cappedHeight) === null || _b2 === void 0 ? void 0 : _b2.wanted) !== null && _c2 !== void 0 ? _c2 : size2.height, capped: height } : void 0;
|
|
153542
153534
|
}
|
|
153543
|
-
this._resize(
|
|
153535
|
+
this._resize(width, height);
|
|
153544
153536
|
}
|
|
153545
|
-
_resize(
|
|
153537
|
+
_resize(width, height) {
|
|
153546
153538
|
const { width: maxWidth, height: maxHeight } = this.element.maxSize;
|
|
153547
|
-
|
|
153548
|
-
|
|
153539
|
+
width = Math.min(maxWidth, width);
|
|
153540
|
+
height = Math.min(maxHeight, height);
|
|
153549
153541
|
const { statusBarHeight } = this.getLayoutInfo();
|
|
153550
|
-
this._list.layout(
|
|
153551
|
-
this._listElement.style.height = `${
|
|
153552
|
-
this.element.layout(
|
|
153542
|
+
this._list.layout(height - statusBarHeight, width);
|
|
153543
|
+
this._listElement.style.height = `${height - statusBarHeight}px`;
|
|
153544
|
+
this.element.layout(height, width);
|
|
153553
153545
|
this._contentWidget.layout();
|
|
153554
153546
|
this._positionDetails();
|
|
153555
153547
|
}
|
|
@@ -153648,9 +153640,9 @@ class SuggestContentWidget {
|
|
|
153648
153640
|
};
|
|
153649
153641
|
}
|
|
153650
153642
|
beforeRender() {
|
|
153651
|
-
const { height
|
|
153643
|
+
const { height, width } = this._widget.element.size;
|
|
153652
153644
|
const { borderWidth, horizontalPadding } = this._widget.getLayoutInfo();
|
|
153653
|
-
return new Dimension(
|
|
153645
|
+
return new Dimension(width + 2 * borderWidth + horizontalPadding, height + 2 * borderWidth);
|
|
153654
153646
|
}
|
|
153655
153647
|
afterRender(position2) {
|
|
153656
153648
|
this._widget._afterRender(position2);
|
|
@@ -156652,11 +156644,11 @@ let ModesContentHoverWidget = class ModesContentHoverWidget2 extends Widget {
|
|
|
156652
156644
|
this._hover.onContentsChanged();
|
|
156653
156645
|
}
|
|
156654
156646
|
layout() {
|
|
156655
|
-
const
|
|
156647
|
+
const height = Math.max(this._editor.getLayoutInfo().height / 4, 250);
|
|
156656
156648
|
const { fontSize, lineHeight } = this._editor.getOption(43);
|
|
156657
156649
|
this._hover.contentsDomNode.style.fontSize = `${fontSize}px`;
|
|
156658
156650
|
this._hover.contentsDomNode.style.lineHeight = `${lineHeight / fontSize}`;
|
|
156659
|
-
this._hover.contentsDomNode.style.maxHeight = `${
|
|
156651
|
+
this._hover.contentsDomNode.style.maxHeight = `${height}px`;
|
|
156660
156652
|
this._hover.contentsDomNode.style.maxWidth = `${Math.max(this._editor.getLayoutInfo().width * 0.66, 500)}px`;
|
|
156661
156653
|
}
|
|
156662
156654
|
onModelDecorationsChanged() {
|
|
@@ -158434,8 +158426,8 @@ class FindDecorations {
|
|
|
158434
158426
|
if (findMatches.length > 1e3) {
|
|
158435
158427
|
findMatchesOptions = FindDecorations._FIND_MATCH_NO_OVERVIEW_DECORATION;
|
|
158436
158428
|
const lineCount = this._editor.getModel().getLineCount();
|
|
158437
|
-
const
|
|
158438
|
-
const approxPixelsPerLine =
|
|
158429
|
+
const height = this._editor.getLayoutInfo().height;
|
|
158430
|
+
const approxPixelsPerLine = height / lineCount;
|
|
158439
158431
|
const mergeLinesDelta = Math.max(2, Math.ceil(3 / approxPixelsPerLine));
|
|
158440
158432
|
let prevStartLineNumber = findMatches[0].range.startLineNumber;
|
|
158441
158433
|
let prevEndLineNumber = findMatches[0].range.endLineNumber;
|
|
@@ -161402,15 +161394,15 @@ class FindWidget extends Widget {
|
|
|
161402
161394
|
}));
|
|
161403
161395
|
this._register(this._resizeSash.onDidChange((evt) => {
|
|
161404
161396
|
this._resized = true;
|
|
161405
|
-
let
|
|
161406
|
-
if (
|
|
161397
|
+
let width = originalWidth + evt.startX - evt.currentX;
|
|
161398
|
+
if (width < FIND_WIDGET_INITIAL_WIDTH) {
|
|
161407
161399
|
return;
|
|
161408
161400
|
}
|
|
161409
161401
|
const maxWidth = parseFloat(getComputedStyle$1(this._domNode).maxWidth) || 0;
|
|
161410
|
-
if (
|
|
161402
|
+
if (width > maxWidth) {
|
|
161411
161403
|
return;
|
|
161412
161404
|
}
|
|
161413
|
-
this._domNode.style.width = `${
|
|
161405
|
+
this._domNode.style.width = `${width}px`;
|
|
161414
161406
|
if (this._isReplaceVisible) {
|
|
161415
161407
|
this._replaceInput.width = getTotalWidth(this._findInput.domNode);
|
|
161416
161408
|
}
|
|
@@ -161422,13 +161414,13 @@ class FindWidget extends Widget {
|
|
|
161422
161414
|
if (currentWidth < FIND_WIDGET_INITIAL_WIDTH) {
|
|
161423
161415
|
return;
|
|
161424
161416
|
}
|
|
161425
|
-
let
|
|
161417
|
+
let width = FIND_WIDGET_INITIAL_WIDTH;
|
|
161426
161418
|
if (!this._resized || currentWidth === FIND_WIDGET_INITIAL_WIDTH) {
|
|
161427
161419
|
const layoutInfo = this._codeEditor.getLayoutInfo();
|
|
161428
|
-
|
|
161420
|
+
width = layoutInfo.width - 28 - layoutInfo.minimap.minimapWidth - 15;
|
|
161429
161421
|
this._resized = true;
|
|
161430
161422
|
}
|
|
161431
|
-
this._domNode.style.width = `${
|
|
161423
|
+
this._domNode.style.width = `${width}px`;
|
|
161432
161424
|
if (this._isReplaceVisible) {
|
|
161433
161425
|
this._replaceInput.width = getTotalWidth(this._findInput.domNode);
|
|
161434
161426
|
}
|
|
@@ -169754,8 +169746,8 @@ let ParameterHintsWidget = class ParameterHintsWidget2 extends Disposable {
|
|
|
169754
169746
|
if (!this.domNodes) {
|
|
169755
169747
|
return;
|
|
169756
169748
|
}
|
|
169757
|
-
const
|
|
169758
|
-
const maxHeight = `${
|
|
169749
|
+
const height = Math.max(this.editor.getLayoutInfo().height / 4, 250);
|
|
169750
|
+
const maxHeight = `${height}px`;
|
|
169759
169751
|
this.domNodes.element.style.maxHeight = maxHeight;
|
|
169760
169752
|
const wrapper = this.domNodes.element.getElementsByClassName("phwrapper");
|
|
169761
169753
|
if (wrapper.length) {
|
|
@@ -174351,7 +174343,7 @@ const EditorLayout = newStyled.div`
|
|
|
174351
174343
|
}
|
|
174352
174344
|
|
|
174353
174345
|
.active {
|
|
174354
|
-
background: #
|
|
174346
|
+
background: #005391;
|
|
174355
174347
|
box-shadow: 0px 1px 0px 0 #333;
|
|
174356
174348
|
/* border-left: 1px solid rgb(42 96 231);
|
|
174357
174349
|
border-right: 1px solid rgb(42 96 231); */
|
|
@@ -189850,7 +189842,7 @@ class EditorData {
|
|
|
189850
189842
|
language: language2,
|
|
189851
189843
|
APP_DIR: APP_DIR2
|
|
189852
189844
|
}, callback, cover = false) {
|
|
189853
|
-
let gotModel = editor$1.getModels().find((x2) =>
|
|
189845
|
+
let gotModel = editor$1.getModels().find((x2) => x2.uri.path.includes(path));
|
|
189854
189846
|
if (!gotModel && !!cover) {
|
|
189855
189847
|
gotModel = editor$1.createModel(value, language2, Uri.parse(`file://${APP_DIR2}${path}`));
|
|
189856
189848
|
this.setFileTreeStack([
|
|
@@ -190301,6 +190293,9 @@ const Editor = ({
|
|
|
190301
190293
|
}, [userList]);
|
|
190302
190294
|
react.exports.useEffect(() => {
|
|
190303
190295
|
console.log(CRDTInfo2);
|
|
190296
|
+
console.log(docFile);
|
|
190297
|
+
if (/\/$/.test(docFile == null ? void 0 : docFile.path))
|
|
190298
|
+
return;
|
|
190304
190299
|
updateModel(file);
|
|
190305
190300
|
}, [docFile]);
|
|
190306
190301
|
return /* @__PURE__ */ jsx(FollowLayout, {
|
|
@@ -190316,7 +190311,7 @@ const Editor = ({
|
|
|
190316
190311
|
onClick: () => {
|
|
190317
190312
|
switchModel(f2.model);
|
|
190318
190313
|
},
|
|
190319
|
-
children: f2.label.
|
|
190314
|
+
children: f2.label.split("/").slice(-1)[0]
|
|
190320
190315
|
}, index2))
|
|
190321
190316
|
}) : null, /* @__PURE__ */ jsx(ContentLayout, {
|
|
190322
190317
|
ref: divEl,
|
|
@@ -197705,6 +197700,7 @@ const TerminalComponent = (_h2) => {
|
|
|
197705
197700
|
const {
|
|
197706
197701
|
CRDTInfo: CRDTInfo2
|
|
197707
197702
|
} = oTStore((state2) => state2);
|
|
197703
|
+
const socket2 = useOT((state2) => state2.socket);
|
|
197708
197704
|
const initTerminalText = (terminal2, text2) => {
|
|
197709
197705
|
terminal2.write("\r\n");
|
|
197710
197706
|
terminal2.clear();
|
|
@@ -197788,6 +197784,41 @@ const TerminalComponent = (_h2) => {
|
|
|
197788
197784
|
}
|
|
197789
197785
|
}
|
|
197790
197786
|
}, [CRDTInfo2.terminal]);
|
|
197787
|
+
react.exports.useEffect(() => {
|
|
197788
|
+
socket2 == null ? void 0 : socket2.on("terminal", (d2) => {
|
|
197789
|
+
var _a2, _b2, _c2, _d2;
|
|
197790
|
+
const CRDTInfo22 = JSON.parse(d2);
|
|
197791
|
+
const crdt = CRDTInfo22.terminal;
|
|
197792
|
+
if (terminal && crdt) {
|
|
197793
|
+
if (((_a2 = crdt == null ? void 0 : crdt.doc) == null ? void 0 : _a2.action) === "Get") {
|
|
197794
|
+
initTerminalText(terminal, ((_b2 = crdt == null ? void 0 : crdt.doc) == null ? void 0 : _b2.value) || "");
|
|
197795
|
+
return;
|
|
197796
|
+
}
|
|
197797
|
+
writeText(terminal, ((_c2 = crdt == null ? void 0 : crdt.doc) == null ? void 0 : _c2.value) || "");
|
|
197798
|
+
const helperContainer = (_d2 = terminal == null ? void 0 : terminal._core) == null ? void 0 : _d2._helperContainer;
|
|
197799
|
+
const childNode = helperContainer == null ? void 0 : helperContainer.firstChild;
|
|
197800
|
+
userLabel.style.top = childNode.style.top;
|
|
197801
|
+
userLabel.style.left = childNode.style.left;
|
|
197802
|
+
helperContainer == null ? void 0 : helperContainer.appendChild(userLabel);
|
|
197803
|
+
const timer = setTimeout(() => {
|
|
197804
|
+
helperContainer == null ? void 0 : helperContainer.removeChild(userLabel);
|
|
197805
|
+
terminal.setOption("theme", __spreadProps(__spreadValues({}, terminal.getOption("theme")), {
|
|
197806
|
+
cursor: "#ffffff"
|
|
197807
|
+
}));
|
|
197808
|
+
}, 6e3);
|
|
197809
|
+
return () => {
|
|
197810
|
+
try {
|
|
197811
|
+
helperContainer == null ? void 0 : helperContainer.removeChild(userLabel);
|
|
197812
|
+
} catch (_2) {
|
|
197813
|
+
}
|
|
197814
|
+
terminal.setOption("theme", __spreadProps(__spreadValues({}, terminal.getOption("theme")), {
|
|
197815
|
+
cursor: "#ffffff"
|
|
197816
|
+
}));
|
|
197817
|
+
clearTimeout(timer);
|
|
197818
|
+
};
|
|
197819
|
+
}
|
|
197820
|
+
});
|
|
197821
|
+
}, [socket2]);
|
|
197791
197822
|
return /* @__PURE__ */ jsx(FollowLayout, {
|
|
197792
197823
|
name: "terminal",
|
|
197793
197824
|
children: /* @__PURE__ */ jsx("div", {
|
|
@@ -198148,7 +198179,7 @@ function SkeletonTheme(_n) {
|
|
|
198148
198179
|
return React.createElement(SkeletonThemeContext.Provider, { value: styleOptions }, children);
|
|
198149
198180
|
}
|
|
198150
198181
|
const defaultEnableAnimation = true;
|
|
198151
|
-
function styleOptionsToCssProperties({ baseColor, highlightColor, width
|
|
198182
|
+
function styleOptionsToCssProperties({ baseColor, highlightColor, width, height, borderRadius, circle, direction, duration, enableAnimation = defaultEnableAnimation }) {
|
|
198152
198183
|
const style = {};
|
|
198153
198184
|
if (direction === "rtl")
|
|
198154
198185
|
style["--animation-direction"] = "reverse";
|
|
@@ -198156,10 +198187,10 @@ function styleOptionsToCssProperties({ baseColor, highlightColor, width: width2,
|
|
|
198156
198187
|
style["--animation-duration"] = `${duration}s`;
|
|
198157
198188
|
if (!enableAnimation)
|
|
198158
198189
|
style["--pseudo-element-display"] = "none";
|
|
198159
|
-
if (typeof
|
|
198160
|
-
style.width =
|
|
198161
|
-
if (typeof
|
|
198162
|
-
style.height =
|
|
198190
|
+
if (typeof width === "string" || typeof width === "number")
|
|
198191
|
+
style.width = width;
|
|
198192
|
+
if (typeof height === "string" || typeof height === "number")
|
|
198193
|
+
style.height = height;
|
|
198163
198194
|
if (typeof borderRadius === "string" || typeof borderRadius === "number")
|
|
198164
198195
|
style.borderRadius = borderRadius;
|
|
198165
198196
|
if (circle)
|
|
@@ -198357,90 +198388,6 @@ const ToolBar = (_r) => {
|
|
|
198357
198388
|
})]
|
|
198358
198389
|
});
|
|
198359
198390
|
};
|
|
198360
|
-
const width = "20";
|
|
198361
|
-
const height = "20";
|
|
198362
|
-
const MultiPlayerCursorLayout = newStyled.svg`
|
|
198363
|
-
position: fixed;
|
|
198364
|
-
left: 0;
|
|
198365
|
-
top: 0;
|
|
198366
|
-
|
|
198367
|
-
width: ${(props2) => props2.width}px;
|
|
198368
|
-
height: ${(props2) => props2.height}px;
|
|
198369
|
-
z-index: 9;
|
|
198370
|
-
transition: all 0.3s;
|
|
198371
|
-
`;
|
|
198372
|
-
const MultiPlayerCursor = () => {
|
|
198373
|
-
const [users, setUsers] = react.exports.useState(null);
|
|
198374
|
-
const CRDTInfo2 = oTStore((state2) => state2.CRDTInfo);
|
|
198375
|
-
const throttled = lodash$2.exports.throttle((a) => {
|
|
198376
|
-
var _a2, _b2;
|
|
198377
|
-
(_b2 = (_a2 = useOT.getState()) == null ? void 0 : _a2.socket) == null ? void 0 : _b2.emit("extraSync", JSON.stringify(a));
|
|
198378
|
-
}, 300);
|
|
198379
|
-
react.exports.useEffect(() => {
|
|
198380
|
-
const {
|
|
198381
|
-
userList
|
|
198382
|
-
} = userListStore.getState();
|
|
198383
|
-
setUsers(userList.map((_user) => {
|
|
198384
|
-
if (_user.uuid === CRDTInfo2.userInfo.uuid) {
|
|
198385
|
-
_user.cursor = CRDTInfo2.extend;
|
|
198386
|
-
}
|
|
198387
|
-
return _user;
|
|
198388
|
-
}));
|
|
198389
|
-
}, [CRDTInfo2]);
|
|
198390
|
-
react.exports.useEffect(() => {
|
|
198391
|
-
const {
|
|
198392
|
-
userInfo
|
|
198393
|
-
} = userStore.getState();
|
|
198394
|
-
window.addEventListener("mousemove", (evt) => {
|
|
198395
|
-
const {
|
|
198396
|
-
globalData
|
|
198397
|
-
} = oTStore.getState();
|
|
198398
|
-
if (!globalData.syncCursor)
|
|
198399
|
-
return;
|
|
198400
|
-
const crdt = {
|
|
198401
|
-
timestamp: Date.now(),
|
|
198402
|
-
userInfo: lodash$2.exports.pick(userInfo, "uuid", "role"),
|
|
198403
|
-
extend: {
|
|
198404
|
-
type: "mousemove",
|
|
198405
|
-
left: evt.clientX.toFixed(3),
|
|
198406
|
-
top: evt.clientY.toFixed(3),
|
|
198407
|
-
width: window.innerWidth,
|
|
198408
|
-
height: window.innerHeight
|
|
198409
|
-
}
|
|
198410
|
-
};
|
|
198411
|
-
throttled(crdt);
|
|
198412
|
-
}, false);
|
|
198413
|
-
}, []);
|
|
198414
|
-
return /* @__PURE__ */ jsx(Fragment, {
|
|
198415
|
-
children: oTStore.getState().globalData.syncCursor && (users == null ? void 0 : users.map((item, index2) => {
|
|
198416
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
|
198417
|
-
return !IsMe(item) ? /* @__PURE__ */ jsxs(MultiPlayerCursorLayout, {
|
|
198418
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
198419
|
-
width,
|
|
198420
|
-
height,
|
|
198421
|
-
viewBox: "0 0 1024 1024",
|
|
198422
|
-
className: `multi-player ${Number((_a2 = item.cursor) == null ? void 0 : _a2.top) * window.innerHeight / ((_b2 = item.cursor) == null ? void 0 : _b2.height)}///${(_c2 = item.cursor) == null ? void 0 : _c2.top}`,
|
|
198423
|
-
version: "1.1",
|
|
198424
|
-
"p-id": "4512",
|
|
198425
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
198426
|
-
color: item.color,
|
|
198427
|
-
style: {
|
|
198428
|
-
left: `${Number((_d2 = item.cursor) == null ? void 0 : _d2.left) * window.innerWidth / ((_e2 = item.cursor) == null ? void 0 : _e2.width)}px`,
|
|
198429
|
-
top: `${Number((_f2 = item.cursor) == null ? void 0 : _f2.top) * window.innerHeight / ((_g2 = item.cursor) == null ? void 0 : _g2.height)}px`
|
|
198430
|
-
},
|
|
198431
|
-
children: [/* @__PURE__ */ jsx("defs", {
|
|
198432
|
-
children: /* @__PURE__ */ jsx("style", {
|
|
198433
|
-
type: "text/css"
|
|
198434
|
-
})
|
|
198435
|
-
}), /* @__PURE__ */ jsx("path", {
|
|
198436
|
-
d: "M370.048 97.706667L815.786667 403.285333c90.410667 61.994667 66.176 201.472-39.808 229.376l-167.893334 44.202667 123.648 214.101333a32 32 0 1 1-55.466666 32l-123.605334-214.101333-122.24 123.306667c-77.141333 77.824-210.048 29.013333-218.538666-80.213334l-41.813334-538.88C161.706667 105.941333 281.344 36.864 370.048 97.706667z m-36.181333 52.736C290.986667 121.088 233.813333 152.32 233.642667 202.709333l0.213333 5.461334 41.813333 538.88c4.138667 52.693333 66.048 77.226667 105.045334 44.032l4.266666-3.925334 121.002667-122.112a192 192 0 0 1 76.544-47.274666l10.922667-3.242667 166.272-43.733333c51.072-13.44 64.170667-78.762667 24.490666-111.232l-4.608-3.413334L333.866667 150.4z",
|
|
198437
|
-
fill: item.color,
|
|
198438
|
-
"p-id": "4513"
|
|
198439
|
-
})]
|
|
198440
|
-
}, index2) : null;
|
|
198441
|
-
}))
|
|
198442
|
-
});
|
|
198443
|
-
};
|
|
198444
198391
|
var LanguageIcon;
|
|
198445
198392
|
(function(LanguageIcon2) {
|
|
198446
198393
|
LanguageIcon2["js"] = "javascript";
|
|
@@ -198570,7 +198517,7 @@ const Index = (props2) => {
|
|
|
198570
198517
|
return /* @__PURE__ */ jsx(Fragment, {
|
|
198571
198518
|
children: /* @__PURE__ */ jsxs(MainLayout, {
|
|
198572
198519
|
className: "flex flex-col",
|
|
198573
|
-
children: [/* @__PURE__ */ jsx(
|
|
198520
|
+
children: [/* @__PURE__ */ jsx(HeaderComponent, {}), /* @__PURE__ */ jsxs(ContainerLayout, {
|
|
198574
198521
|
className: "flex flex-1 mt-2.5 flex-row",
|
|
198575
198522
|
children: [/* @__PURE__ */ jsx("section", {
|
|
198576
198523
|
className: "flex flex-row",
|