@dao42/d42paas-front 0.7.7 → 0.7.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DaoPaaS.es.js +496 -548
- package/dist/DaoPaaS.umd.js +401 -410
- 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;
|
|
@@ -44325,7 +44317,7 @@ class DaoPaaS {
|
|
|
44325
44317
|
get otstore() {
|
|
44326
44318
|
return oTStore.getState();
|
|
44327
44319
|
}
|
|
44328
|
-
get
|
|
44320
|
+
get socketIO() {
|
|
44329
44321
|
return useOT.getState().socket;
|
|
44330
44322
|
}
|
|
44331
44323
|
get playgroundStatus() {
|
|
@@ -44344,8 +44336,7 @@ class DaoPaaS {
|
|
|
44344
44336
|
if (this.mode === "tsdoc")
|
|
44345
44337
|
return;
|
|
44346
44338
|
const {
|
|
44347
|
-
setSocket
|
|
44348
|
-
socket: socket2
|
|
44339
|
+
setSocket
|
|
44349
44340
|
} = useOT.getState();
|
|
44350
44341
|
const initClassDIV = document.createElement("div");
|
|
44351
44342
|
initClassDIV.className = "init-class";
|
|
@@ -44385,7 +44376,7 @@ class DaoPaaS {
|
|
|
44385
44376
|
userId: args.userId
|
|
44386
44377
|
}));
|
|
44387
44378
|
PlaygroundInit(__spreadProps(__spreadValues(__spreadValues({}, this.userInfo), args), {
|
|
44388
|
-
io:
|
|
44379
|
+
io: useOT.getState().socket,
|
|
44389
44380
|
callback: () => {
|
|
44390
44381
|
if (this.components) {
|
|
44391
44382
|
this.mapRender(this.components);
|
|
@@ -44422,19 +44413,19 @@ class DaoPaaS {
|
|
|
44422
44413
|
}
|
|
44423
44414
|
activePlayground() {
|
|
44424
44415
|
var _a2;
|
|
44425
|
-
(_a2 =
|
|
44416
|
+
(_a2 = useOT.getState().socket) == null ? void 0 : _a2.emit("active");
|
|
44426
44417
|
}
|
|
44427
44418
|
runPlayground() {
|
|
44428
44419
|
var _a2;
|
|
44429
|
-
(_a2 =
|
|
44420
|
+
(_a2 = useOT.getState().socket) == null ? void 0 : _a2.emit("run");
|
|
44430
44421
|
}
|
|
44431
44422
|
stopPlayground() {
|
|
44432
44423
|
var _a2;
|
|
44433
|
-
(_a2 =
|
|
44424
|
+
(_a2 = useOT.getState().socket) == null ? void 0 : _a2.emit("stop");
|
|
44434
44425
|
}
|
|
44435
44426
|
onUploadFile(payload) {
|
|
44436
44427
|
var _a2;
|
|
44437
|
-
(_a2 =
|
|
44428
|
+
(_a2 = useOT.getState().socket) == null ? void 0 : _a2.emit("upload", payload);
|
|
44438
44429
|
}
|
|
44439
44430
|
switchLspServer(arg) {
|
|
44440
44431
|
this.otstore.setGlobalData({
|
|
@@ -44442,12 +44433,14 @@ class DaoPaaS {
|
|
|
44442
44433
|
});
|
|
44443
44434
|
}
|
|
44444
44435
|
record(setBoolean) {
|
|
44445
|
-
|
|
44436
|
+
const {
|
|
44437
|
+
socket: socket2
|
|
44438
|
+
} = useOT.getState();
|
|
44446
44439
|
if (setBoolean === "undefined") {
|
|
44447
44440
|
this.otstore.setGlobalData({
|
|
44448
44441
|
isRecording: !!setBoolean
|
|
44449
44442
|
});
|
|
44450
|
-
|
|
44443
|
+
socket2 == null ? void 0 : socket2.emit("globalData", {
|
|
44451
44444
|
isRecording: !!setBoolean
|
|
44452
44445
|
});
|
|
44453
44446
|
return;
|
|
@@ -44455,7 +44448,7 @@ class DaoPaaS {
|
|
|
44455
44448
|
this.otstore.setGlobalData({
|
|
44456
44449
|
isRecording: !!setBoolean
|
|
44457
44450
|
});
|
|
44458
|
-
|
|
44451
|
+
socket2 == null ? void 0 : socket2.emit("globalData", {
|
|
44459
44452
|
isRecording: !!setBoolean
|
|
44460
44453
|
});
|
|
44461
44454
|
}
|
|
@@ -45184,8 +45177,8 @@ var DragAndDropProvider = function(props2) {
|
|
|
45184
45177
|
var treeViableDragPositions = buildMapForTrees(environment.treeIds, function(treeId2) {
|
|
45185
45178
|
return getViableDragPositions(treeId2, items, treeLinearItems[treeId2]);
|
|
45186
45179
|
});
|
|
45187
|
-
var
|
|
45188
|
-
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);
|
|
45189
45182
|
setDraggingItems(items);
|
|
45190
45183
|
setLinearItems(treeLinearItems);
|
|
45191
45184
|
setViableDragPositions(treeViableDragPositions);
|
|
@@ -57097,13 +57090,13 @@ class SizeUtils {
|
|
|
57097
57090
|
}
|
|
57098
57091
|
}
|
|
57099
57092
|
class Dimension {
|
|
57100
|
-
constructor(
|
|
57101
|
-
this.width =
|
|
57102
|
-
this.height =
|
|
57093
|
+
constructor(width, height) {
|
|
57094
|
+
this.width = width;
|
|
57095
|
+
this.height = height;
|
|
57103
57096
|
}
|
|
57104
|
-
with(
|
|
57105
|
-
if (
|
|
57106
|
-
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);
|
|
57107
57100
|
} else {
|
|
57108
57101
|
return this;
|
|
57109
57102
|
}
|
|
@@ -57151,12 +57144,12 @@ function getTopLeftOffset(element) {
|
|
|
57151
57144
|
top
|
|
57152
57145
|
};
|
|
57153
57146
|
}
|
|
57154
|
-
function size(element,
|
|
57155
|
-
if (typeof
|
|
57156
|
-
element.style.width = `${
|
|
57147
|
+
function size(element, width, height) {
|
|
57148
|
+
if (typeof width === "number") {
|
|
57149
|
+
element.style.width = `${width}px`;
|
|
57157
57150
|
}
|
|
57158
|
-
if (typeof
|
|
57159
|
-
element.style.height = `${
|
|
57151
|
+
if (typeof height === "number") {
|
|
57152
|
+
element.style.height = `${height}px`;
|
|
57160
57153
|
}
|
|
57161
57154
|
}
|
|
57162
57155
|
function getDomNodePagePosition(domNode) {
|
|
@@ -67898,12 +67891,12 @@ function to4CharHex(n2) {
|
|
|
67898
67891
|
return n2.toString(16).toUpperCase().padStart(4, "0");
|
|
67899
67892
|
}
|
|
67900
67893
|
class Viewport {
|
|
67901
|
-
constructor(top, left,
|
|
67894
|
+
constructor(top, left, width, height) {
|
|
67902
67895
|
this._viewportBrand = void 0;
|
|
67903
67896
|
this.top = top | 0;
|
|
67904
67897
|
this.left = left | 0;
|
|
67905
|
-
this.width =
|
|
67906
|
-
this.height =
|
|
67898
|
+
this.width = width | 0;
|
|
67899
|
+
this.height = height | 0;
|
|
67907
67900
|
}
|
|
67908
67901
|
}
|
|
67909
67902
|
class MinimapLinesRenderingData {
|
|
@@ -69670,8 +69663,8 @@ class CommonEditorConfiguration extends Disposable {
|
|
|
69670
69663
|
}
|
|
69671
69664
|
return r2 ? r2 : 1;
|
|
69672
69665
|
}
|
|
69673
|
-
reserveHeight(
|
|
69674
|
-
this._reservedHeight =
|
|
69666
|
+
reserveHeight(height) {
|
|
69667
|
+
this._reservedHeight = height;
|
|
69675
69668
|
this._recomputeOptions();
|
|
69676
69669
|
}
|
|
69677
69670
|
}
|
|
@@ -73804,8 +73797,8 @@ class CharWidthRequest {
|
|
|
73804
73797
|
this.type = type;
|
|
73805
73798
|
this.width = 0;
|
|
73806
73799
|
}
|
|
73807
|
-
fulfill(
|
|
73808
|
-
this.width =
|
|
73800
|
+
fulfill(width) {
|
|
73801
|
+
this.width = width;
|
|
73809
73802
|
}
|
|
73810
73803
|
}
|
|
73811
73804
|
class DomCharWidthReader {
|
|
@@ -74242,18 +74235,18 @@ class FastDomNode {
|
|
|
74242
74235
|
this._maxWidth = maxWidth;
|
|
74243
74236
|
this.domNode.style.maxWidth = this._maxWidth + "px";
|
|
74244
74237
|
}
|
|
74245
|
-
setWidth(
|
|
74246
|
-
if (this._width ===
|
|
74238
|
+
setWidth(width) {
|
|
74239
|
+
if (this._width === width) {
|
|
74247
74240
|
return;
|
|
74248
74241
|
}
|
|
74249
|
-
this._width =
|
|
74242
|
+
this._width = width;
|
|
74250
74243
|
this.domNode.style.width = this._width + "px";
|
|
74251
74244
|
}
|
|
74252
|
-
setHeight(
|
|
74253
|
-
if (this._height ===
|
|
74245
|
+
setHeight(height) {
|
|
74246
|
+
if (this._height === height) {
|
|
74254
74247
|
return;
|
|
74255
74248
|
}
|
|
74256
|
-
this._height =
|
|
74249
|
+
this._height = height;
|
|
74257
74250
|
this.domNode.style.height = this._height + "px";
|
|
74258
74251
|
}
|
|
74259
74252
|
setTop(top) {
|
|
@@ -75512,11 +75505,11 @@ class ClientCoordinates {
|
|
|
75512
75505
|
}
|
|
75513
75506
|
}
|
|
75514
75507
|
class EditorPagePosition {
|
|
75515
|
-
constructor(x2, y2,
|
|
75508
|
+
constructor(x2, y2, width, height) {
|
|
75516
75509
|
this.x = x2;
|
|
75517
75510
|
this.y = y2;
|
|
75518
|
-
this.width =
|
|
75519
|
-
this.height =
|
|
75511
|
+
this.width = width;
|
|
75512
|
+
this.height = height;
|
|
75520
75513
|
this._editorPagePositionBrand = void 0;
|
|
75521
75514
|
}
|
|
75522
75515
|
}
|
|
@@ -75971,10 +75964,10 @@ class LineVisibleRanges {
|
|
|
75971
75964
|
}
|
|
75972
75965
|
}
|
|
75973
75966
|
class HorizontalRange {
|
|
75974
|
-
constructor(left,
|
|
75967
|
+
constructor(left, width) {
|
|
75975
75968
|
this._horizontalRangeBrand = void 0;
|
|
75976
75969
|
this.left = Math.round(left);
|
|
75977
|
-
this.width = Math.round(
|
|
75970
|
+
this.width = Math.round(width);
|
|
75978
75971
|
}
|
|
75979
75972
|
static from(ranges) {
|
|
75980
75973
|
const result = new Array(ranges.length);
|
|
@@ -75989,10 +75982,10 @@ class HorizontalRange {
|
|
|
75989
75982
|
}
|
|
75990
75983
|
}
|
|
75991
75984
|
class FloatHorizontalRange {
|
|
75992
|
-
constructor(left,
|
|
75985
|
+
constructor(left, width) {
|
|
75993
75986
|
this._floatHorizontalRangeBrand = void 0;
|
|
75994
75987
|
this.left = left;
|
|
75995
|
-
this.width =
|
|
75988
|
+
this.width = width;
|
|
75996
75989
|
}
|
|
75997
75990
|
toString() {
|
|
75998
75991
|
return `[${this.left},${this.width}]`;
|
|
@@ -82676,9 +82669,9 @@ function concat23Trees(items) {
|
|
|
82676
82669
|
return null;
|
|
82677
82670
|
}
|
|
82678
82671
|
const start = i2;
|
|
82679
|
-
const
|
|
82672
|
+
const height = items[start].listHeight;
|
|
82680
82673
|
i2++;
|
|
82681
|
-
while (i2 < items.length && items[i2].listHeight ===
|
|
82674
|
+
while (i2 < items.length && items[i2].listHeight === height) {
|
|
82682
82675
|
i2++;
|
|
82683
82676
|
}
|
|
82684
82677
|
if (i2 - start >= 2) {
|
|
@@ -87072,9 +87065,9 @@ class CharWidthReader {
|
|
|
87072
87065
|
const context = this._canvas.getContext("2d");
|
|
87073
87066
|
context.font = font;
|
|
87074
87067
|
const metrics = context.measureText(char2);
|
|
87075
|
-
const
|
|
87076
|
-
this._cache[cacheKey] =
|
|
87077
|
-
return
|
|
87068
|
+
const width = metrics.width;
|
|
87069
|
+
this._cache[cacheKey] = width;
|
|
87070
|
+
return width;
|
|
87078
87071
|
}
|
|
87079
87072
|
}
|
|
87080
87073
|
CharWidthReader._INSTANCE = null;
|
|
@@ -87130,9 +87123,9 @@ class MouseHandler extends ViewEventHandler {
|
|
|
87130
87123
|
}
|
|
87131
87124
|
onConfigurationChanged(e2) {
|
|
87132
87125
|
if (e2.hasChanged(130)) {
|
|
87133
|
-
const
|
|
87134
|
-
if (this._height !==
|
|
87135
|
-
this._height =
|
|
87126
|
+
const height = this._context.configuration.options.get(130).height;
|
|
87127
|
+
if (this._height !== height) {
|
|
87128
|
+
this._height = height;
|
|
87136
87129
|
this._mouseDownOperation.onHeightChanged();
|
|
87137
87130
|
}
|
|
87138
87131
|
}
|
|
@@ -88619,12 +88612,12 @@ class Margin extends ViewPart {
|
|
|
88619
88612
|
this._domNode.setContain("strict");
|
|
88620
88613
|
const adjustedScrollTop = ctx.scrollTop - ctx.bigNumbersDelta;
|
|
88621
88614
|
this._domNode.setTop(-adjustedScrollTop);
|
|
88622
|
-
const
|
|
88623
|
-
this._domNode.setHeight(
|
|
88615
|
+
const height = Math.min(ctx.scrollHeight, 1e6);
|
|
88616
|
+
this._domNode.setHeight(height);
|
|
88624
88617
|
this._domNode.setWidth(this._contentLeft);
|
|
88625
88618
|
this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft);
|
|
88626
88619
|
this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth);
|
|
88627
|
-
this._glyphMarginBackgroundDomNode.setHeight(
|
|
88620
|
+
this._glyphMarginBackgroundDomNode.setHeight(height);
|
|
88628
88621
|
}
|
|
88629
88622
|
}
|
|
88630
88623
|
Margin.CLASS_NAME = "glyph-margin";
|
|
@@ -88632,14 +88625,14 @@ Margin.OUTER_CLASS_NAME = "margin";
|
|
|
88632
88625
|
var mouseCursor = "";
|
|
88633
88626
|
const MOUSE_CURSOR_TEXT_CSS_CLASS_NAME = `monaco-mouse-cursor-text`;
|
|
88634
88627
|
class VisibleTextAreaData {
|
|
88635
|
-
constructor(top, left,
|
|
88628
|
+
constructor(top, left, width) {
|
|
88636
88629
|
this._visibleTextAreaBrand = void 0;
|
|
88637
88630
|
this.top = top;
|
|
88638
88631
|
this.left = left;
|
|
88639
|
-
this.width =
|
|
88632
|
+
this.width = width;
|
|
88640
88633
|
}
|
|
88641
|
-
setWidth(
|
|
88642
|
-
return new VisibleTextAreaData(this.top, this.left,
|
|
88634
|
+
setWidth(width) {
|
|
88635
|
+
return new VisibleTextAreaData(this.top, this.left, width);
|
|
88643
88636
|
}
|
|
88644
88637
|
}
|
|
88645
88638
|
const canUseZeroSizeTextarea = isFirefox;
|
|
@@ -89033,15 +89026,15 @@ class TextAreaHandler extends ViewPart {
|
|
|
89033
89026
|
} while (true);
|
|
89034
89027
|
return result;
|
|
89035
89028
|
}
|
|
89036
|
-
_renderInsideEditor(renderedPosition, top, left,
|
|
89029
|
+
_renderInsideEditor(renderedPosition, top, left, width, height) {
|
|
89037
89030
|
this._lastRenderPosition = renderedPosition;
|
|
89038
89031
|
const ta2 = this.textArea;
|
|
89039
89032
|
const tac = this.textAreaCover;
|
|
89040
89033
|
Configuration.applyFontInfo(ta2, this._fontInfo);
|
|
89041
89034
|
ta2.setTop(top);
|
|
89042
89035
|
ta2.setLeft(left);
|
|
89043
|
-
ta2.setWidth(
|
|
89044
|
-
ta2.setHeight(
|
|
89036
|
+
ta2.setWidth(width);
|
|
89037
|
+
ta2.setHeight(height);
|
|
89045
89038
|
tac.setTop(0);
|
|
89046
89039
|
tac.setLeft(0);
|
|
89047
89040
|
tac.setWidth(0);
|
|
@@ -94275,8 +94268,8 @@ class MarginViewOverlays extends ViewOverlays {
|
|
|
94275
94268
|
}
|
|
94276
94269
|
_viewOverlaysRender(ctx) {
|
|
94277
94270
|
super._viewOverlaysRender(ctx);
|
|
94278
|
-
const
|
|
94279
|
-
this.domNode.setHeight(
|
|
94271
|
+
const height = Math.min(ctx.scrollHeight, 1e6);
|
|
94272
|
+
this.domNode.setHeight(height);
|
|
94280
94273
|
this.domNode.setWidth(this._contentLeft);
|
|
94281
94274
|
}
|
|
94282
94275
|
}
|
|
@@ -94457,22 +94450,22 @@ class Widget$1 {
|
|
|
94457
94450
|
this._cachedDomNodeClientWidth = -1;
|
|
94458
94451
|
this._cachedDomNodeClientHeight = -1;
|
|
94459
94452
|
}
|
|
94460
|
-
_layoutBoxInViewport(topLeft, bottomLeft,
|
|
94453
|
+
_layoutBoxInViewport(topLeft, bottomLeft, width, height, ctx) {
|
|
94461
94454
|
const aboveLineTop = topLeft.top;
|
|
94462
94455
|
const heightAboveLine = aboveLineTop;
|
|
94463
94456
|
const underLineTop = bottomLeft.top + this._lineHeight;
|
|
94464
94457
|
const heightUnderLine = ctx.viewportHeight - underLineTop;
|
|
94465
|
-
const aboveTop = aboveLineTop -
|
|
94466
|
-
const fitsAbove = heightAboveLine >=
|
|
94458
|
+
const aboveTop = aboveLineTop - height;
|
|
94459
|
+
const fitsAbove = heightAboveLine >= height;
|
|
94467
94460
|
const belowTop = underLineTop;
|
|
94468
|
-
const fitsBelow = heightUnderLine >=
|
|
94461
|
+
const fitsBelow = heightUnderLine >= height;
|
|
94469
94462
|
let actualAboveLeft = topLeft.left;
|
|
94470
94463
|
let actualBelowLeft = bottomLeft.left;
|
|
94471
|
-
if (actualAboveLeft +
|
|
94472
|
-
actualAboveLeft = ctx.scrollLeft + ctx.viewportWidth -
|
|
94464
|
+
if (actualAboveLeft + width > ctx.scrollLeft + ctx.viewportWidth) {
|
|
94465
|
+
actualAboveLeft = ctx.scrollLeft + ctx.viewportWidth - width;
|
|
94473
94466
|
}
|
|
94474
|
-
if (actualBelowLeft +
|
|
94475
|
-
actualBelowLeft = ctx.scrollLeft + ctx.viewportWidth -
|
|
94467
|
+
if (actualBelowLeft + width > ctx.scrollLeft + ctx.viewportWidth) {
|
|
94468
|
+
actualBelowLeft = ctx.scrollLeft + ctx.viewportWidth - width;
|
|
94476
94469
|
}
|
|
94477
94470
|
if (actualAboveLeft < ctx.scrollLeft) {
|
|
94478
94471
|
actualAboveLeft = ctx.scrollLeft;
|
|
@@ -94489,12 +94482,12 @@ class Widget$1 {
|
|
|
94489
94482
|
belowLeft: actualBelowLeft
|
|
94490
94483
|
};
|
|
94491
94484
|
}
|
|
94492
|
-
_layoutHorizontalSegmentInPage(windowSize, domNodePosition, left,
|
|
94493
|
-
const MIN_LIMIT = Math.max(0, domNodePosition.left -
|
|
94494
|
-
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);
|
|
94495
94488
|
let absoluteLeft = domNodePosition.left + left - StandardWindow.scrollX;
|
|
94496
|
-
if (absoluteLeft +
|
|
94497
|
-
const delta = absoluteLeft - (MAX_LIMIT -
|
|
94489
|
+
if (absoluteLeft + width > MAX_LIMIT) {
|
|
94490
|
+
const delta = absoluteLeft - (MAX_LIMIT - width);
|
|
94498
94491
|
absoluteLeft -= delta;
|
|
94499
94492
|
left -= delta;
|
|
94500
94493
|
}
|
|
@@ -94505,19 +94498,19 @@ class Widget$1 {
|
|
|
94505
94498
|
}
|
|
94506
94499
|
return [left, absoluteLeft];
|
|
94507
94500
|
}
|
|
94508
|
-
_layoutBoxInPage(topLeft, bottomLeft,
|
|
94509
|
-
const aboveTop = topLeft.top -
|
|
94501
|
+
_layoutBoxInPage(topLeft, bottomLeft, width, height, ctx) {
|
|
94502
|
+
const aboveTop = topLeft.top - height;
|
|
94510
94503
|
const belowTop = bottomLeft.top + this._lineHeight;
|
|
94511
94504
|
const domNodePosition = getDomNodePagePosition(this._viewDomNode.domNode);
|
|
94512
94505
|
const absoluteAboveTop = domNodePosition.top + aboveTop - StandardWindow.scrollY;
|
|
94513
94506
|
const absoluteBelowTop = domNodePosition.top + belowTop - StandardWindow.scrollY;
|
|
94514
94507
|
const windowSize = getClientArea(document.body);
|
|
94515
|
-
const [aboveLeft, absoluteAboveLeft] = this._layoutHorizontalSegmentInPage(windowSize, domNodePosition, topLeft.left - ctx.scrollLeft + this._contentLeft,
|
|
94516
|
-
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);
|
|
94517
94510
|
const TOP_PADDING = 22;
|
|
94518
94511
|
const BOTTOM_PADDING = 22;
|
|
94519
94512
|
const fitsAbove = absoluteAboveTop >= TOP_PADDING;
|
|
94520
|
-
const fitsBelow = absoluteBelowTop +
|
|
94513
|
+
const fitsBelow = absoluteBelowTop + height <= windowSize.height - BOTTOM_PADDING;
|
|
94521
94514
|
if (this._fixedOverflowWidgets) {
|
|
94522
94515
|
return {
|
|
94523
94516
|
fitsAbove,
|
|
@@ -95208,17 +95201,17 @@ class AbstractScrollbar extends Widget {
|
|
|
95208
95201
|
this.domNode.domNode.appendChild(arrow.bgDomNode);
|
|
95209
95202
|
this.domNode.domNode.appendChild(arrow.domNode);
|
|
95210
95203
|
}
|
|
95211
|
-
_createSlider(top, left,
|
|
95204
|
+
_createSlider(top, left, width, height) {
|
|
95212
95205
|
this.slider = createFastDomNode(document.createElement("div"));
|
|
95213
95206
|
this.slider.setClassName("slider");
|
|
95214
95207
|
this.slider.setPosition("absolute");
|
|
95215
95208
|
this.slider.setTop(top);
|
|
95216
95209
|
this.slider.setLeft(left);
|
|
95217
|
-
if (typeof
|
|
95218
|
-
this.slider.setWidth(
|
|
95210
|
+
if (typeof width === "number") {
|
|
95211
|
+
this.slider.setWidth(width);
|
|
95219
95212
|
}
|
|
95220
|
-
if (typeof
|
|
95221
|
-
this.slider.setHeight(
|
|
95213
|
+
if (typeof height === "number") {
|
|
95214
|
+
this.slider.setHeight(height);
|
|
95222
95215
|
}
|
|
95223
95216
|
this.slider.setLayerHinting(true);
|
|
95224
95217
|
this.slider.setContain("strict");
|
|
@@ -95651,38 +95644,38 @@ class VerticalScrollbar extends AbstractScrollbar {
|
|
|
95651
95644
|
}
|
|
95652
95645
|
}
|
|
95653
95646
|
class ScrollState {
|
|
95654
|
-
constructor(
|
|
95647
|
+
constructor(width, scrollWidth, scrollLeft2, height, scrollHeight, scrollTop2) {
|
|
95655
95648
|
this._scrollStateBrand = void 0;
|
|
95656
|
-
|
|
95649
|
+
width = width | 0;
|
|
95657
95650
|
scrollWidth = scrollWidth | 0;
|
|
95658
95651
|
scrollLeft2 = scrollLeft2 | 0;
|
|
95659
|
-
|
|
95652
|
+
height = height | 0;
|
|
95660
95653
|
scrollHeight = scrollHeight | 0;
|
|
95661
95654
|
scrollTop2 = scrollTop2 | 0;
|
|
95662
95655
|
this.rawScrollLeft = scrollLeft2;
|
|
95663
95656
|
this.rawScrollTop = scrollTop2;
|
|
95664
|
-
if (
|
|
95665
|
-
|
|
95657
|
+
if (width < 0) {
|
|
95658
|
+
width = 0;
|
|
95666
95659
|
}
|
|
95667
|
-
if (scrollLeft2 +
|
|
95668
|
-
scrollLeft2 = scrollWidth -
|
|
95660
|
+
if (scrollLeft2 + width > scrollWidth) {
|
|
95661
|
+
scrollLeft2 = scrollWidth - width;
|
|
95669
95662
|
}
|
|
95670
95663
|
if (scrollLeft2 < 0) {
|
|
95671
95664
|
scrollLeft2 = 0;
|
|
95672
95665
|
}
|
|
95673
|
-
if (
|
|
95674
|
-
|
|
95666
|
+
if (height < 0) {
|
|
95667
|
+
height = 0;
|
|
95675
95668
|
}
|
|
95676
|
-
if (scrollTop2 +
|
|
95677
|
-
scrollTop2 = scrollHeight -
|
|
95669
|
+
if (scrollTop2 + height > scrollHeight) {
|
|
95670
|
+
scrollTop2 = scrollHeight - height;
|
|
95678
95671
|
}
|
|
95679
95672
|
if (scrollTop2 < 0) {
|
|
95680
95673
|
scrollTop2 = 0;
|
|
95681
95674
|
}
|
|
95682
|
-
this.width =
|
|
95675
|
+
this.width = width;
|
|
95683
95676
|
this.scrollWidth = scrollWidth;
|
|
95684
95677
|
this.scrollLeft = scrollLeft2;
|
|
95685
|
-
this.height =
|
|
95678
|
+
this.height = height;
|
|
95686
95679
|
this.scrollHeight = scrollHeight;
|
|
95687
95680
|
this.scrollTop = scrollTop2;
|
|
95688
95681
|
}
|
|
@@ -96639,8 +96632,8 @@ class GlyphMarginOverlay extends DedupOverlay {
|
|
|
96639
96632
|
const toRender = this._render(visibleStartLineNumber, visibleEndLineNumber, this._getDecorations(ctx));
|
|
96640
96633
|
const lineHeight = this._lineHeight.toString();
|
|
96641
96634
|
const left = this._glyphMarginLeft.toString();
|
|
96642
|
-
const
|
|
96643
|
-
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>';
|
|
96644
96637
|
const output = [];
|
|
96645
96638
|
for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {
|
|
96646
96639
|
const lineIndex = lineNumber - visibleStartLineNumber;
|
|
@@ -96753,8 +96746,8 @@ class IndentGuidesOverlay extends DynamicViewOverlay {
|
|
|
96753
96746
|
break;
|
|
96754
96747
|
}
|
|
96755
96748
|
const className = guide.horizontalLine ? guide.horizontalLine.top ? "horizontal-top" : "horizontal-bottom" : "vertical";
|
|
96756
|
-
const
|
|
96757
|
-
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>`;
|
|
96758
96751
|
}
|
|
96759
96752
|
output[lineIndex] = result;
|
|
96760
96753
|
}
|
|
@@ -97480,8 +97473,8 @@ class LinesDecorationsOverlay extends DedupOverlay {
|
|
|
97480
97473
|
const visibleEndLineNumber = ctx.visibleRange.endLineNumber;
|
|
97481
97474
|
const toRender = this._render(visibleStartLineNumber, visibleEndLineNumber, this._getDecorations(ctx));
|
|
97482
97475
|
const left = this._decorationsLeft.toString();
|
|
97483
|
-
const
|
|
97484
|
-
const common = '" style="left:' + left + "px;width:" +
|
|
97476
|
+
const width = this._decorationsWidth.toString();
|
|
97477
|
+
const common = '" style="left:' + left + "px;width:" + width + 'px;"></div>';
|
|
97485
97478
|
const output = [];
|
|
97486
97479
|
for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {
|
|
97487
97480
|
const lineIndex = lineNumber - visibleStartLineNumber;
|
|
@@ -97810,16 +97803,16 @@ class MinimapCharRendererFactory {
|
|
|
97810
97803
|
return new MinimapCharRenderer(charData, scale);
|
|
97811
97804
|
}
|
|
97812
97805
|
static _downsampleChar(source, sourceOffset, dest, destOffset, scale) {
|
|
97813
|
-
const
|
|
97814
|
-
const
|
|
97806
|
+
const width = 1 * scale;
|
|
97807
|
+
const height = 2 * scale;
|
|
97815
97808
|
let targetIndex = destOffset;
|
|
97816
97809
|
let brightest = 0;
|
|
97817
|
-
for (let y2 = 0; y2 <
|
|
97818
|
-
const sourceY1 = y2 /
|
|
97819
|
-
const sourceY2 = (y2 + 1) /
|
|
97820
|
-
for (let x2 = 0; x2 <
|
|
97821
|
-
const sourceX1 = x2 /
|
|
97822
|
-
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;
|
|
97823
97816
|
let value = 0;
|
|
97824
97817
|
let samples = 0;
|
|
97825
97818
|
for (let sy = sourceY1; sy < sourceY2; sy++) {
|
|
@@ -98869,9 +98862,9 @@ class InnerMinimap extends Disposable {
|
|
|
98869
98862
|
}
|
|
98870
98863
|
}
|
|
98871
98864
|
}
|
|
98872
|
-
renderDecorationOnLine(canvasContext, lineOffsetMap, decorationRange, decorationColor, layout2, lineNumber,
|
|
98865
|
+
renderDecorationOnLine(canvasContext, lineOffsetMap, decorationRange, decorationColor, layout2, lineNumber, height, lineHeight, tabSize, charWidth, canvasInnerWidth) {
|
|
98873
98866
|
const y2 = (lineNumber - layout2.startLineNumber) * lineHeight;
|
|
98874
|
-
if (y2 +
|
|
98867
|
+
if (y2 + height < 0 || y2 > this._model.options.canvasInnerHeight) {
|
|
98875
98868
|
return;
|
|
98876
98869
|
}
|
|
98877
98870
|
const { startLineNumber, endLineNumber } = decorationRange;
|
|
@@ -98879,7 +98872,7 @@ class InnerMinimap extends Disposable {
|
|
|
98879
98872
|
const endColumn = endLineNumber === lineNumber ? decorationRange.endColumn : this._model.getLineMaxColumn(lineNumber);
|
|
98880
98873
|
const x1 = this.getXOffsetForPosition(lineOffsetMap, lineNumber, startColumn, tabSize, charWidth, canvasInnerWidth);
|
|
98881
98874
|
const x2 = this.getXOffsetForPosition(lineOffsetMap, lineNumber, endColumn, tabSize, charWidth, canvasInnerWidth);
|
|
98882
|
-
this.renderDecoration(canvasContext, decorationColor, x1, y2, x2 - x1,
|
|
98875
|
+
this.renderDecoration(canvasContext, decorationColor, x1, y2, x2 - x1, height);
|
|
98883
98876
|
}
|
|
98884
98877
|
getXOffsetForPosition(lineOffsetMap, lineNumber, column2, tabSize, charWidth, canvasInnerWidth) {
|
|
98885
98878
|
if (column2 === 1) {
|
|
@@ -98912,9 +98905,9 @@ class InnerMinimap extends Disposable {
|
|
|
98912
98905
|
}
|
|
98913
98906
|
return canvasInnerWidth;
|
|
98914
98907
|
}
|
|
98915
|
-
renderDecoration(canvasContext, decorationColor, x2, y2,
|
|
98908
|
+
renderDecoration(canvasContext, decorationColor, x2, y2, width, height) {
|
|
98916
98909
|
canvasContext.fillStyle = decorationColor && decorationColor.toString() || "";
|
|
98917
|
-
canvasContext.fillRect(x2, y2,
|
|
98910
|
+
canvasContext.fillRect(x2, y2, width, height);
|
|
98918
98911
|
}
|
|
98919
98912
|
renderLines(layout2) {
|
|
98920
98913
|
const startLineNumber = layout2.startLineNumber;
|
|
@@ -99308,7 +99301,7 @@ class Settings {
|
|
|
99308
99301
|
];
|
|
99309
99302
|
} else {
|
|
99310
99303
|
const offset = canvasLeftOffset;
|
|
99311
|
-
const
|
|
99304
|
+
const width = remainingWidth;
|
|
99312
99305
|
return [
|
|
99313
99306
|
[
|
|
99314
99307
|
0,
|
|
@@ -99322,13 +99315,13 @@ class Settings {
|
|
|
99322
99315
|
],
|
|
99323
99316
|
[
|
|
99324
99317
|
0,
|
|
99325
|
-
|
|
99326
|
-
|
|
99327
|
-
|
|
99328
|
-
|
|
99329
|
-
|
|
99330
|
-
|
|
99331
|
-
|
|
99318
|
+
width,
|
|
99319
|
+
width,
|
|
99320
|
+
width,
|
|
99321
|
+
width,
|
|
99322
|
+
width,
|
|
99323
|
+
width,
|
|
99324
|
+
width
|
|
99332
99325
|
]
|
|
99333
99326
|
];
|
|
99334
99327
|
}
|
|
@@ -99450,8 +99443,8 @@ class DecorationsOverviewRuler extends ViewPart {
|
|
|
99450
99443
|
const endLineNumber = decorationGroupData[3 * i2 + 2];
|
|
99451
99444
|
let y1 = viewLayout.getVerticalOffsetForLineNumber(startLineNumber) * heightRatio | 0;
|
|
99452
99445
|
let y2 = (viewLayout.getVerticalOffsetForLineNumber(endLineNumber) + lineHeight) * heightRatio | 0;
|
|
99453
|
-
const
|
|
99454
|
-
if (
|
|
99446
|
+
const height = y2 - y1;
|
|
99447
|
+
if (height < minDecorationHeight) {
|
|
99455
99448
|
let yCenter = (y1 + y2) / 2 | 0;
|
|
99456
99449
|
if (yCenter < halfMinDecorationHeight) {
|
|
99457
99450
|
yCenter = halfMinDecorationHeight;
|
|
@@ -99601,11 +99594,11 @@ class OverviewZoneManager {
|
|
|
99601
99594
|
getCanvasWidth() {
|
|
99602
99595
|
return this._domWidth * this._pixelRatio;
|
|
99603
99596
|
}
|
|
99604
|
-
setDOMWidth(
|
|
99605
|
-
if (this._domWidth ===
|
|
99597
|
+
setDOMWidth(width) {
|
|
99598
|
+
if (this._domWidth === width) {
|
|
99606
99599
|
return false;
|
|
99607
99600
|
}
|
|
99608
|
-
this._domWidth =
|
|
99601
|
+
this._domWidth = width;
|
|
99609
99602
|
this._colorZonesInvalid = true;
|
|
99610
99603
|
return true;
|
|
99611
99604
|
}
|
|
@@ -99615,11 +99608,11 @@ class OverviewZoneManager {
|
|
|
99615
99608
|
getCanvasHeight() {
|
|
99616
99609
|
return this._domHeight * this._pixelRatio;
|
|
99617
99610
|
}
|
|
99618
|
-
setDOMHeight(
|
|
99619
|
-
if (this._domHeight ===
|
|
99611
|
+
setDOMHeight(height) {
|
|
99612
|
+
if (this._domHeight === height) {
|
|
99620
99613
|
return false;
|
|
99621
99614
|
}
|
|
99622
|
-
this._domHeight =
|
|
99615
|
+
this._domHeight = height;
|
|
99623
99616
|
this._colorZonesInvalid = true;
|
|
99624
99617
|
return true;
|
|
99625
99618
|
}
|
|
@@ -99758,18 +99751,18 @@ class OverviewRuler extends ViewEventHandler {
|
|
|
99758
99751
|
if (this._zoneManager.getOuterHeight() === 0) {
|
|
99759
99752
|
return false;
|
|
99760
99753
|
}
|
|
99761
|
-
const
|
|
99762
|
-
const
|
|
99754
|
+
const width = this._zoneManager.getCanvasWidth();
|
|
99755
|
+
const height = this._zoneManager.getCanvasHeight();
|
|
99763
99756
|
const colorZones = this._zoneManager.resolveColorZones();
|
|
99764
99757
|
const id2Color = this._zoneManager.getId2Color();
|
|
99765
99758
|
const ctx = this._domNode.domNode.getContext("2d");
|
|
99766
|
-
ctx.clearRect(0, 0,
|
|
99759
|
+
ctx.clearRect(0, 0, width, height);
|
|
99767
99760
|
if (colorZones.length > 0) {
|
|
99768
|
-
this._renderOneLane(ctx, colorZones, id2Color,
|
|
99761
|
+
this._renderOneLane(ctx, colorZones, id2Color, width);
|
|
99769
99762
|
}
|
|
99770
99763
|
return true;
|
|
99771
99764
|
}
|
|
99772
|
-
_renderOneLane(ctx, colorZones, id2Color,
|
|
99765
|
+
_renderOneLane(ctx, colorZones, id2Color, width) {
|
|
99773
99766
|
let currentColorId = 0;
|
|
99774
99767
|
let currentFrom = 0;
|
|
99775
99768
|
let currentTo = 0;
|
|
@@ -99778,7 +99771,7 @@ class OverviewRuler extends ViewEventHandler {
|
|
|
99778
99771
|
const zoneFrom = zone.from;
|
|
99779
99772
|
const zoneTo = zone.to;
|
|
99780
99773
|
if (zoneColorId !== currentColorId) {
|
|
99781
|
-
ctx.fillRect(0, currentFrom,
|
|
99774
|
+
ctx.fillRect(0, currentFrom, width, currentTo - currentFrom);
|
|
99782
99775
|
currentColorId = zoneColorId;
|
|
99783
99776
|
ctx.fillStyle = id2Color[currentColorId];
|
|
99784
99777
|
currentFrom = zoneFrom;
|
|
@@ -99787,13 +99780,13 @@ class OverviewRuler extends ViewEventHandler {
|
|
|
99787
99780
|
if (currentTo >= zoneFrom) {
|
|
99788
99781
|
currentTo = Math.max(currentTo, zoneTo);
|
|
99789
99782
|
} else {
|
|
99790
|
-
ctx.fillRect(0, currentFrom,
|
|
99783
|
+
ctx.fillRect(0, currentFrom, width, currentTo - currentFrom);
|
|
99791
99784
|
currentFrom = zoneFrom;
|
|
99792
99785
|
currentTo = zoneTo;
|
|
99793
99786
|
}
|
|
99794
99787
|
}
|
|
99795
99788
|
}
|
|
99796
|
-
ctx.fillRect(0, currentFrom,
|
|
99789
|
+
ctx.fillRect(0, currentFrom, width, currentTo - currentFrom);
|
|
99797
99790
|
}
|
|
99798
99791
|
}
|
|
99799
99792
|
var rulers = "";
|
|
@@ -100097,8 +100090,8 @@ class SelectionsOverlay extends DynamicViewOverlay {
|
|
|
100097
100090
|
}
|
|
100098
100091
|
return linesVisibleRanges;
|
|
100099
100092
|
}
|
|
100100
|
-
_createSelectionPiece(top,
|
|
100101
|
-
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>';
|
|
100102
100095
|
}
|
|
100103
100096
|
_actualRenderOneSelection(output2, visibleStartLineNumber, hasMultipleSelections, visibleRanges) {
|
|
100104
100097
|
if (visibleRanges.length === 0) {
|
|
@@ -100227,11 +100220,11 @@ function abs(n2) {
|
|
|
100227
100220
|
}
|
|
100228
100221
|
var viewCursors = "";
|
|
100229
100222
|
class ViewCursorRenderData {
|
|
100230
|
-
constructor(top, left,
|
|
100223
|
+
constructor(top, left, width, height, textContent, textContentClassName) {
|
|
100231
100224
|
this.top = top;
|
|
100232
100225
|
this.left = left;
|
|
100233
|
-
this.width =
|
|
100234
|
-
this.height =
|
|
100226
|
+
this.width = width;
|
|
100227
|
+
this.height = height;
|
|
100235
100228
|
this.textContent = textContent;
|
|
100236
100229
|
this.textContentClassName = textContentClassName;
|
|
100237
100230
|
}
|
|
@@ -100296,23 +100289,23 @@ class ViewCursor {
|
|
|
100296
100289
|
if (!visibleRange || visibleRange.outsideRenderedLine) {
|
|
100297
100290
|
return null;
|
|
100298
100291
|
}
|
|
100299
|
-
let
|
|
100292
|
+
let width2;
|
|
100300
100293
|
if (this._cursorStyle === TextEditorCursorStyle$1.Line) {
|
|
100301
|
-
|
|
100302
|
-
if (
|
|
100294
|
+
width2 = computeScreenAwareSize(this._lineCursorWidth > 0 ? this._lineCursorWidth : 2);
|
|
100295
|
+
if (width2 > 2) {
|
|
100303
100296
|
const lineContent2 = this._context.model.getLineContent(this._position.lineNumber);
|
|
100304
100297
|
const nextCharLength$12 = nextCharLength(lineContent2, this._position.column - 1);
|
|
100305
100298
|
textContent = lineContent2.substr(this._position.column - 1, nextCharLength$12);
|
|
100306
100299
|
}
|
|
100307
100300
|
} else {
|
|
100308
|
-
|
|
100301
|
+
width2 = computeScreenAwareSize(1);
|
|
100309
100302
|
}
|
|
100310
100303
|
let left = visibleRange.left;
|
|
100311
|
-
if (
|
|
100304
|
+
if (width2 >= 2 && left >= 1) {
|
|
100312
100305
|
left -= 1;
|
|
100313
100306
|
}
|
|
100314
100307
|
const top2 = ctx.getVerticalOffsetForLineNumber(this._position.lineNumber) - ctx.bigNumbersDelta;
|
|
100315
|
-
return new ViewCursorRenderData(top2, left,
|
|
100308
|
+
return new ViewCursorRenderData(top2, left, width2, this._lineHeight, textContent, "");
|
|
100316
100309
|
}
|
|
100317
100310
|
const lineContent = this._context.model.getLineContent(this._position.lineNumber);
|
|
100318
100311
|
const nextCharLength$1 = nextCharLength(lineContent, this._position.column - 1);
|
|
@@ -100325,7 +100318,7 @@ class ViewCursor {
|
|
|
100325
100318
|
return null;
|
|
100326
100319
|
}
|
|
100327
100320
|
const range3 = firstVisibleRangeForCharacter.ranges[0];
|
|
100328
|
-
const
|
|
100321
|
+
const width = range3.width < 1 ? this._typicalHalfwidthCharacterWidth : range3.width;
|
|
100329
100322
|
let textContentClassName = "";
|
|
100330
100323
|
if (this._cursorStyle === TextEditorCursorStyle$1.Block) {
|
|
100331
100324
|
const lineData = this._context.model.getViewLineData(this._position.lineNumber);
|
|
@@ -100334,12 +100327,12 @@ class ViewCursor {
|
|
|
100334
100327
|
textContentClassName = lineData.tokens.getClassName(tokenIndex);
|
|
100335
100328
|
}
|
|
100336
100329
|
let top = ctx.getVerticalOffsetForLineNumber(this._position.lineNumber) - ctx.bigNumbersDelta;
|
|
100337
|
-
let
|
|
100330
|
+
let height = this._lineHeight;
|
|
100338
100331
|
if (this._cursorStyle === TextEditorCursorStyle$1.Underline || this._cursorStyle === TextEditorCursorStyle$1.UnderlineThin) {
|
|
100339
100332
|
top += this._lineHeight - 2;
|
|
100340
|
-
|
|
100333
|
+
height = 2;
|
|
100341
100334
|
}
|
|
100342
|
-
return new ViewCursorRenderData(top, range3.left,
|
|
100335
|
+
return new ViewCursorRenderData(top, range3.left, width, height, textContent, textContentClassName);
|
|
100343
100336
|
}
|
|
100344
100337
|
prepareRender(ctx) {
|
|
100345
100338
|
this._renderData = this._prepareRender(ctx);
|
|
@@ -100891,10 +100884,10 @@ class ViewZones extends ViewPart {
|
|
|
100891
100884
|
}
|
|
100892
100885
|
return 0;
|
|
100893
100886
|
}
|
|
100894
|
-
_safeCallOnComputedHeight(zone,
|
|
100887
|
+
_safeCallOnComputedHeight(zone, height) {
|
|
100895
100888
|
if (typeof zone.onComputedHeight === "function") {
|
|
100896
100889
|
try {
|
|
100897
|
-
zone.onComputedHeight(
|
|
100890
|
+
zone.onComputedHeight(height);
|
|
100898
100891
|
} catch (e2) {
|
|
100899
100892
|
onUnexpectedError(e2);
|
|
100900
100893
|
}
|
|
@@ -102952,11 +102945,11 @@ class PendingChanges {
|
|
|
102952
102945
|
}
|
|
102953
102946
|
}
|
|
102954
102947
|
class EditorWhitespace {
|
|
102955
|
-
constructor(id2, afterLineNumber, ordinal,
|
|
102948
|
+
constructor(id2, afterLineNumber, ordinal, height, minWidth) {
|
|
102956
102949
|
this.id = id2;
|
|
102957
102950
|
this.afterLineNumber = afterLineNumber;
|
|
102958
102951
|
this.ordinal = ordinal;
|
|
102959
|
-
this.height =
|
|
102952
|
+
this.height = height;
|
|
102960
102953
|
this.minWidth = minWidth;
|
|
102961
102954
|
this.prefixSum = 0;
|
|
102962
102955
|
}
|
|
@@ -103460,7 +103453,7 @@ class LinesLayout {
|
|
|
103460
103453
|
let result = [];
|
|
103461
103454
|
for (let i2 = startIndex; i2 <= endIndex; i2++) {
|
|
103462
103455
|
const top = this.getVerticalOffsetForWhitespaceIndex(i2);
|
|
103463
|
-
const
|
|
103456
|
+
const height = this.getHeightForWhitespaceIndex(i2);
|
|
103464
103457
|
if (top >= verticalOffset2) {
|
|
103465
103458
|
break;
|
|
103466
103459
|
}
|
|
@@ -103468,7 +103461,7 @@ class LinesLayout {
|
|
|
103468
103461
|
id: this.getIdForWhitespaceIndex(i2),
|
|
103469
103462
|
afterLineNumber: this.getAfterLineNumberForWhitespaceIndex(i2),
|
|
103470
103463
|
verticalOffset: top,
|
|
103471
|
-
height
|
|
103464
|
+
height
|
|
103472
103465
|
});
|
|
103473
103466
|
}
|
|
103474
103467
|
return result;
|
|
@@ -103500,29 +103493,29 @@ class LinesLayout {
|
|
|
103500
103493
|
LinesLayout.INSTANCE_COUNT = 0;
|
|
103501
103494
|
const SMOOTH_SCROLLING_TIME = 125;
|
|
103502
103495
|
class EditorScrollDimensions {
|
|
103503
|
-
constructor(
|
|
103504
|
-
|
|
103496
|
+
constructor(width, contentWidth, height, contentHeight) {
|
|
103497
|
+
width = width | 0;
|
|
103505
103498
|
contentWidth = contentWidth | 0;
|
|
103506
|
-
|
|
103499
|
+
height = height | 0;
|
|
103507
103500
|
contentHeight = contentHeight | 0;
|
|
103508
|
-
if (
|
|
103509
|
-
|
|
103501
|
+
if (width < 0) {
|
|
103502
|
+
width = 0;
|
|
103510
103503
|
}
|
|
103511
103504
|
if (contentWidth < 0) {
|
|
103512
103505
|
contentWidth = 0;
|
|
103513
103506
|
}
|
|
103514
|
-
if (
|
|
103515
|
-
|
|
103507
|
+
if (height < 0) {
|
|
103508
|
+
height = 0;
|
|
103516
103509
|
}
|
|
103517
103510
|
if (contentHeight < 0) {
|
|
103518
103511
|
contentHeight = 0;
|
|
103519
103512
|
}
|
|
103520
|
-
this.width =
|
|
103513
|
+
this.width = width;
|
|
103521
103514
|
this.contentWidth = contentWidth;
|
|
103522
|
-
this.scrollWidth = Math.max(
|
|
103523
|
-
this.height =
|
|
103515
|
+
this.scrollWidth = Math.max(width, contentWidth);
|
|
103516
|
+
this.height = height;
|
|
103524
103517
|
this.contentHeight = contentHeight;
|
|
103525
|
-
this.scrollHeight = Math.max(
|
|
103518
|
+
this.scrollHeight = Math.max(height, contentHeight);
|
|
103526
103519
|
}
|
|
103527
103520
|
equals(other) {
|
|
103528
103521
|
return this.width === other.width && this.contentWidth === other.contentWidth && this.height === other.height && this.contentHeight === other.contentHeight;
|
|
@@ -103618,11 +103611,11 @@ class ViewLayout extends Disposable {
|
|
|
103618
103611
|
}
|
|
103619
103612
|
if (e2.hasChanged(130)) {
|
|
103620
103613
|
const layoutInfo = options.get(130);
|
|
103621
|
-
const
|
|
103622
|
-
const
|
|
103614
|
+
const width = layoutInfo.contentWidth;
|
|
103615
|
+
const height = layoutInfo.height;
|
|
103623
103616
|
const scrollDimensions = this._scrollable.getScrollDimensions();
|
|
103624
103617
|
const contentWidth = scrollDimensions.contentWidth;
|
|
103625
|
-
this._scrollable.setScrollDimensions(new EditorScrollDimensions(
|
|
103618
|
+
this._scrollable.setScrollDimensions(new EditorScrollDimensions(width, scrollDimensions.contentWidth, height, this._getContentHeight(width, height, contentWidth)));
|
|
103626
103619
|
} else {
|
|
103627
103620
|
this._updateHeight();
|
|
103628
103621
|
}
|
|
@@ -103639,33 +103632,33 @@ class ViewLayout extends Disposable {
|
|
|
103639
103632
|
onLinesInserted(fromLineNumber, toLineNumber) {
|
|
103640
103633
|
this._linesLayout.onLinesInserted(fromLineNumber, toLineNumber);
|
|
103641
103634
|
}
|
|
103642
|
-
_getHorizontalScrollbarHeight(
|
|
103635
|
+
_getHorizontalScrollbarHeight(width, scrollWidth) {
|
|
103643
103636
|
const options = this._configuration.options;
|
|
103644
103637
|
const scrollbar = options.get(91);
|
|
103645
103638
|
if (scrollbar.horizontal === 2) {
|
|
103646
103639
|
return 0;
|
|
103647
103640
|
}
|
|
103648
|
-
if (
|
|
103641
|
+
if (width >= scrollWidth) {
|
|
103649
103642
|
return 0;
|
|
103650
103643
|
}
|
|
103651
103644
|
return scrollbar.horizontalScrollbarSize;
|
|
103652
103645
|
}
|
|
103653
|
-
_getContentHeight(
|
|
103646
|
+
_getContentHeight(width, height, contentWidth) {
|
|
103654
103647
|
const options = this._configuration.options;
|
|
103655
103648
|
let result = this._linesLayout.getLinesTotalHeight();
|
|
103656
103649
|
if (options.get(93)) {
|
|
103657
|
-
result += Math.max(0,
|
|
103650
|
+
result += Math.max(0, height - options.get(58) - options.get(74).bottom);
|
|
103658
103651
|
} else {
|
|
103659
|
-
result += this._getHorizontalScrollbarHeight(
|
|
103652
|
+
result += this._getHorizontalScrollbarHeight(width, contentWidth);
|
|
103660
103653
|
}
|
|
103661
103654
|
return result;
|
|
103662
103655
|
}
|
|
103663
103656
|
_updateHeight() {
|
|
103664
103657
|
const scrollDimensions = this._scrollable.getScrollDimensions();
|
|
103665
|
-
const
|
|
103666
|
-
const
|
|
103658
|
+
const width = scrollDimensions.width;
|
|
103659
|
+
const height = scrollDimensions.height;
|
|
103667
103660
|
const contentWidth = scrollDimensions.contentWidth;
|
|
103668
|
-
this._scrollable.setScrollDimensions(new EditorScrollDimensions(
|
|
103661
|
+
this._scrollable.setScrollDimensions(new EditorScrollDimensions(width, scrollDimensions.contentWidth, height, this._getContentHeight(width, height, contentWidth)));
|
|
103669
103662
|
}
|
|
103670
103663
|
getCurrentViewport() {
|
|
103671
103664
|
const scrollDimensions = this._scrollable.getScrollDimensions();
|
|
@@ -106609,7 +106602,7 @@ function createLineBreaks(requests, fontInfo, tabSize, firstLineBreakColumn, wra
|
|
|
106609
106602
|
const lineContent = LineInjectedText.applyInjectedText(requests[i2], injectedTextsPerLine[i2]);
|
|
106610
106603
|
let firstNonWhitespaceIndex$1 = 0;
|
|
106611
106604
|
let wrappedTextIndentLength = 0;
|
|
106612
|
-
let
|
|
106605
|
+
let width = overallWidth;
|
|
106613
106606
|
if (wrappingIndent !== 0) {
|
|
106614
106607
|
firstNonWhitespaceIndex$1 = firstNonWhitespaceIndex(lineContent);
|
|
106615
106608
|
if (firstNonWhitespaceIndex$1 === -1) {
|
|
@@ -106624,12 +106617,12 @@ function createLineBreaks(requests, fontInfo, tabSize, firstLineBreakColumn, wra
|
|
|
106624
106617
|
firstNonWhitespaceIndex$1 = 0;
|
|
106625
106618
|
wrappedTextIndentLength = 0;
|
|
106626
106619
|
} else {
|
|
106627
|
-
|
|
106620
|
+
width = overallWidth - indentWidth;
|
|
106628
106621
|
}
|
|
106629
106622
|
}
|
|
106630
106623
|
}
|
|
106631
106624
|
const renderLineContent = lineContent.substr(firstNonWhitespaceIndex$1);
|
|
106632
|
-
const tmp = renderLine(renderLineContent, wrappedTextIndentLength, tabSize,
|
|
106625
|
+
const tmp = renderLine(renderLineContent, wrappedTextIndentLength, tabSize, width, sb2, additionalIndentLength);
|
|
106633
106626
|
firstNonWhitespaceIndices[i2] = firstNonWhitespaceIndex$1;
|
|
106634
106627
|
wrappedTextIndentLengths[i2] = wrappedTextIndentLength;
|
|
106635
106628
|
renderLineContents[i2] = renderLineContent;
|
|
@@ -106680,7 +106673,7 @@ function createLineBreaks(requests, fontInfo, tabSize, firstLineBreakColumn, wra
|
|
|
106680
106673
|
document.body.removeChild(containerDomNode);
|
|
106681
106674
|
return result;
|
|
106682
106675
|
}
|
|
106683
|
-
function renderLine(lineContent, initialVisibleColumn, tabSize,
|
|
106676
|
+
function renderLine(lineContent, initialVisibleColumn, tabSize, width, sb2, wrappingIndentLength) {
|
|
106684
106677
|
if (wrappingIndentLength !== 0) {
|
|
106685
106678
|
let hangingOffset = String(wrappingIndentLength);
|
|
106686
106679
|
sb2.appendASCIIString('<div style="text-indent: -');
|
|
@@ -106691,7 +106684,7 @@ function renderLine(lineContent, initialVisibleColumn, tabSize, width2, sb2, wra
|
|
|
106691
106684
|
} else {
|
|
106692
106685
|
sb2.appendASCIIString('<div style="width:');
|
|
106693
106686
|
}
|
|
106694
|
-
sb2.appendASCIIString(String(
|
|
106687
|
+
sb2.appendASCIIString(String(width));
|
|
106695
106688
|
sb2.appendASCIIString('px;">');
|
|
106696
106689
|
const len = lineContent.length;
|
|
106697
106690
|
let visibleColumn = initialVisibleColumn;
|
|
@@ -109845,16 +109838,16 @@ let DiffReview = class DiffReview2 extends Disposable {
|
|
|
109845
109838
|
isVisible() {
|
|
109846
109839
|
return this._isVisible;
|
|
109847
109840
|
}
|
|
109848
|
-
layout(top,
|
|
109849
|
-
this._width =
|
|
109841
|
+
layout(top, width, height) {
|
|
109842
|
+
this._width = width;
|
|
109850
109843
|
this.shadow.setTop(top - 6);
|
|
109851
|
-
this.shadow.setWidth(
|
|
109844
|
+
this.shadow.setWidth(width);
|
|
109852
109845
|
this.shadow.setHeight(this._isVisible ? 6 : 0);
|
|
109853
109846
|
this.domNode.setTop(top);
|
|
109854
|
-
this.domNode.setWidth(
|
|
109855
|
-
this.domNode.setHeight(
|
|
109856
|
-
this._content.setHeight(
|
|
109857
|
-
this._content.setWidth(
|
|
109847
|
+
this.domNode.setWidth(width);
|
|
109848
|
+
this.domNode.setHeight(height);
|
|
109849
|
+
this._content.setHeight(height);
|
|
109850
|
+
this._content.setWidth(width);
|
|
109858
109851
|
if (this._isVisible) {
|
|
109859
109852
|
this.actionBarContainer.setAttribute("aria-hidden", "false");
|
|
109860
109853
|
this.actionBarContainer.setDisplay("block");
|
|
@@ -110085,7 +110078,7 @@ let DiffReview = class DiffReview2 extends Disposable {
|
|
|
110085
110078
|
this._content.domNode.appendChild(container);
|
|
110086
110079
|
this.scrollbar.scanDomNode();
|
|
110087
110080
|
}
|
|
110088
|
-
static _renderSection(dest, diffEntry, modLine, lineHeight,
|
|
110081
|
+
static _renderSection(dest, diffEntry, modLine, lineHeight, width, originalOptions, originalModel, originalModelOpts, modifiedOptions, modifiedModel, modifiedModelOpts, languageIdCodec) {
|
|
110089
110082
|
const type = diffEntry.getType();
|
|
110090
110083
|
let rowClassName = "diff-review-row";
|
|
110091
110084
|
let lineNumbersExtraClassName = "";
|
|
@@ -110116,7 +110109,7 @@ let DiffReview = class DiffReview2 extends Disposable {
|
|
|
110116
110109
|
const originalLine = originalLineStart === 0 ? 0 : originalLineStart + i2;
|
|
110117
110110
|
const modifiedLine = modifiedLineStart === 0 ? 0 : modifiedLineStart + i2;
|
|
110118
110111
|
const row = document.createElement("div");
|
|
110119
|
-
row.style.minWidth =
|
|
110112
|
+
row.style.minWidth = width + "px";
|
|
110120
110113
|
row.className = rowClassName;
|
|
110121
110114
|
row.setAttribute("role", "listitem");
|
|
110122
110115
|
if (modifiedLine !== 0) {
|
|
@@ -110394,10 +110387,10 @@ class InlineDiffMargin extends Disposable {
|
|
|
110394
110387
|
});
|
|
110395
110388
|
};
|
|
110396
110389
|
this._register(addStandardDisposableListener(this._diffActions, "mousedown", (e2) => {
|
|
110397
|
-
const { top, height
|
|
110390
|
+
const { top, height } = getDomNodePagePosition(this._diffActions);
|
|
110398
110391
|
let pad = Math.floor(lineHeight / 3);
|
|
110399
110392
|
e2.preventDefault();
|
|
110400
|
-
showContextMenu(e2.posx, top +
|
|
110393
|
+
showContextMenu(e2.posx, top + height + pad);
|
|
110401
110394
|
}));
|
|
110402
110395
|
this._register(editor2.onMouseMove((e2) => {
|
|
110403
110396
|
if (e2.target.type === 8 || e2.target.type === 5) {
|
|
@@ -110762,11 +110755,11 @@ let DiffEditorWidget = class DiffEditorWidget2 extends Disposable {
|
|
|
110762
110755
|
this._register(editor2.onDidFocusEditorWidget(() => isInDiffLeftEditorKey.set(true)));
|
|
110763
110756
|
this._register(editor2.onDidBlurEditorWidget(() => isInDiffLeftEditorKey.set(false)));
|
|
110764
110757
|
this._register(editor2.onDidContentSizeChange((e2) => {
|
|
110765
|
-
const
|
|
110766
|
-
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());
|
|
110767
110760
|
this._onDidContentSizeChange.fire({
|
|
110768
|
-
contentHeight:
|
|
110769
|
-
contentWidth:
|
|
110761
|
+
contentHeight: height,
|
|
110762
|
+
contentWidth: width,
|
|
110770
110763
|
contentHeightChanged: e2.contentHeightChanged,
|
|
110771
110764
|
contentWidthChanged: e2.contentWidthChanged
|
|
110772
110765
|
});
|
|
@@ -110823,11 +110816,11 @@ let DiffEditorWidget = class DiffEditorWidget2 extends Disposable {
|
|
|
110823
110816
|
this._register(editor2.onDidFocusEditorWidget(() => isInDiffRightEditorKey.set(true)));
|
|
110824
110817
|
this._register(editor2.onDidBlurEditorWidget(() => isInDiffRightEditorKey.set(false)));
|
|
110825
110818
|
this._register(editor2.onDidContentSizeChange((e2) => {
|
|
110826
|
-
const
|
|
110827
|
-
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());
|
|
110828
110821
|
this._onDidContentSizeChange.fire({
|
|
110829
|
-
contentHeight:
|
|
110830
|
-
contentWidth:
|
|
110822
|
+
contentHeight: height,
|
|
110823
|
+
contentWidth: width,
|
|
110831
110824
|
contentHeightChanged: e2.contentHeightChanged,
|
|
110832
110825
|
contentWidthChanged: e2.contentWidthChanged
|
|
110833
110826
|
});
|
|
@@ -111068,7 +111061,7 @@ let DiffEditorWidget = class DiffEditorWidget2 extends Disposable {
|
|
|
111068
111061
|
if (!this._originalOverviewRuler || !this._modifiedOverviewRuler) {
|
|
111069
111062
|
return;
|
|
111070
111063
|
}
|
|
111071
|
-
const
|
|
111064
|
+
const height = this._elementSizeObserver.getHeight();
|
|
111072
111065
|
const reviewHeight = this._getReviewHeight();
|
|
111073
111066
|
const freeSpace = DiffEditorWidget2.ENTIRE_DIFF_OVERVIEW_WIDTH - 2 * DiffEditorWidget2.ONE_OVERVIEW_WIDTH;
|
|
111074
111067
|
const layoutInfo = this._modifiedEditor.getLayoutInfo();
|
|
@@ -111077,13 +111070,13 @@ let DiffEditorWidget = class DiffEditorWidget2 extends Disposable {
|
|
|
111077
111070
|
top: 0,
|
|
111078
111071
|
width: DiffEditorWidget2.ONE_OVERVIEW_WIDTH,
|
|
111079
111072
|
right: freeSpace + DiffEditorWidget2.ONE_OVERVIEW_WIDTH,
|
|
111080
|
-
height:
|
|
111073
|
+
height: height - reviewHeight
|
|
111081
111074
|
});
|
|
111082
111075
|
this._modifiedOverviewRuler.setLayout({
|
|
111083
111076
|
top: 0,
|
|
111084
111077
|
right: 0,
|
|
111085
111078
|
width: DiffEditorWidget2.ONE_OVERVIEW_WIDTH,
|
|
111086
|
-
height:
|
|
111079
|
+
height: height - reviewHeight
|
|
111087
111080
|
});
|
|
111088
111081
|
}
|
|
111089
111082
|
}
|
|
@@ -111216,26 +111209,26 @@ let DiffEditorWidget = class DiffEditorWidget2 extends Disposable {
|
|
|
111216
111209
|
this._doLayout();
|
|
111217
111210
|
}
|
|
111218
111211
|
_doLayout() {
|
|
111219
|
-
const
|
|
111220
|
-
const
|
|
111212
|
+
const width = this._elementSizeObserver.getWidth();
|
|
111213
|
+
const height = this._elementSizeObserver.getHeight();
|
|
111221
111214
|
const reviewHeight = this._getReviewHeight();
|
|
111222
111215
|
const splitPoint = this._strategy.layout();
|
|
111223
111216
|
this._originalDomNode.style.width = splitPoint + "px";
|
|
111224
111217
|
this._originalDomNode.style.left = "0px";
|
|
111225
|
-
this._modifiedDomNode.style.width =
|
|
111218
|
+
this._modifiedDomNode.style.width = width - splitPoint + "px";
|
|
111226
111219
|
this._modifiedDomNode.style.left = splitPoint + "px";
|
|
111227
111220
|
this._overviewDomElement.style.top = "0px";
|
|
111228
|
-
this._overviewDomElement.style.height =
|
|
111221
|
+
this._overviewDomElement.style.height = height - reviewHeight + "px";
|
|
111229
111222
|
this._overviewDomElement.style.width = DiffEditorWidget2.ENTIRE_DIFF_OVERVIEW_WIDTH + "px";
|
|
111230
|
-
this._overviewDomElement.style.left =
|
|
111223
|
+
this._overviewDomElement.style.left = width - DiffEditorWidget2.ENTIRE_DIFF_OVERVIEW_WIDTH + "px";
|
|
111231
111224
|
this._overviewViewportDomElement.setWidth(DiffEditorWidget2.ENTIRE_DIFF_OVERVIEW_WIDTH);
|
|
111232
111225
|
this._overviewViewportDomElement.setHeight(30);
|
|
111233
|
-
this._originalEditor.layout({ width: splitPoint, height:
|
|
111234
|
-
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 });
|
|
111235
111228
|
if (this._originalOverviewRuler || this._modifiedOverviewRuler) {
|
|
111236
111229
|
this._layoutOverviewRulers();
|
|
111237
111230
|
}
|
|
111238
|
-
this._reviewPane.layout(
|
|
111231
|
+
this._reviewPane.layout(height - reviewHeight, width, reviewHeight);
|
|
111239
111232
|
this._layoutOverviewViewport();
|
|
111240
111233
|
}
|
|
111241
111234
|
_layoutOverviewViewport() {
|
|
@@ -118561,9 +118554,9 @@ class ListView {
|
|
|
118561
118554
|
indexAfter(position2) {
|
|
118562
118555
|
return this.rangeMap.indexAfter(position2);
|
|
118563
118556
|
}
|
|
118564
|
-
layout(
|
|
118557
|
+
layout(height, width) {
|
|
118565
118558
|
let scrollDimensions = {
|
|
118566
|
-
height: typeof
|
|
118559
|
+
height: typeof height === "number" ? height : getContentHeight(this.domNode)
|
|
118567
118560
|
};
|
|
118568
118561
|
if (this.scrollableElementUpdateDisposable) {
|
|
118569
118562
|
this.scrollableElementUpdateDisposable.dispose();
|
|
@@ -118571,15 +118564,15 @@ class ListView {
|
|
|
118571
118564
|
scrollDimensions.scrollHeight = this.scrollHeight;
|
|
118572
118565
|
}
|
|
118573
118566
|
this.scrollableElement.setScrollDimensions(scrollDimensions);
|
|
118574
|
-
if (typeof
|
|
118575
|
-
this.renderWidth =
|
|
118567
|
+
if (typeof width !== "undefined") {
|
|
118568
|
+
this.renderWidth = width;
|
|
118576
118569
|
if (this.supportDynamicHeights) {
|
|
118577
118570
|
this._rerender(this.scrollTop, this.renderHeight);
|
|
118578
118571
|
}
|
|
118579
118572
|
}
|
|
118580
118573
|
if (this.horizontalScrolling) {
|
|
118581
118574
|
this.scrollableElement.setScrollDimensions({
|
|
118582
|
-
width: typeof
|
|
118575
|
+
width: typeof width === "number" ? width : getContentWidth(this.domNode)
|
|
118583
118576
|
});
|
|
118584
118577
|
}
|
|
118585
118578
|
}
|
|
@@ -119928,17 +119921,17 @@ class PipelineRenderer {
|
|
|
119928
119921
|
renderTemplate(container) {
|
|
119929
119922
|
return this.renderers.map((r2) => r2.renderTemplate(container));
|
|
119930
119923
|
}
|
|
119931
|
-
renderElement(element, index2, templateData,
|
|
119924
|
+
renderElement(element, index2, templateData, height) {
|
|
119932
119925
|
let i2 = 0;
|
|
119933
119926
|
for (const renderer of this.renderers) {
|
|
119934
|
-
renderer.renderElement(element, index2, templateData[i2++],
|
|
119927
|
+
renderer.renderElement(element, index2, templateData[i2++], height);
|
|
119935
119928
|
}
|
|
119936
119929
|
}
|
|
119937
|
-
disposeElement(element, index2, templateData,
|
|
119930
|
+
disposeElement(element, index2, templateData, height) {
|
|
119938
119931
|
let i2 = 0;
|
|
119939
119932
|
for (const renderer of this.renderers) {
|
|
119940
119933
|
if (renderer.disposeElement) {
|
|
119941
|
-
renderer.disposeElement(element, index2, templateData[i2],
|
|
119934
|
+
renderer.disposeElement(element, index2, templateData[i2], height);
|
|
119942
119935
|
}
|
|
119943
119936
|
i2 += 1;
|
|
119944
119937
|
}
|
|
@@ -120192,8 +120185,8 @@ class List {
|
|
|
120192
120185
|
domFocus() {
|
|
120193
120186
|
this.view.domNode.focus({ preventScroll: true });
|
|
120194
120187
|
}
|
|
120195
|
-
layout(
|
|
120196
|
-
this.view.layout(
|
|
120188
|
+
layout(height, width) {
|
|
120189
|
+
this.view.layout(height, width);
|
|
120197
120190
|
}
|
|
120198
120191
|
setSelection(indexes, browserEvent) {
|
|
120199
120192
|
for (const index2 of indexes) {
|
|
@@ -120461,7 +120454,7 @@ class PagedRenderer {
|
|
|
120461
120454
|
const data = this.renderer.renderTemplate(container);
|
|
120462
120455
|
return { data, disposable: Disposable.None };
|
|
120463
120456
|
}
|
|
120464
|
-
renderElement(index2, _2, data,
|
|
120457
|
+
renderElement(index2, _2, data, height) {
|
|
120465
120458
|
if (data.disposable) {
|
|
120466
120459
|
data.disposable.dispose();
|
|
120467
120460
|
}
|
|
@@ -120470,13 +120463,13 @@ class PagedRenderer {
|
|
|
120470
120463
|
}
|
|
120471
120464
|
const model = this.modelProvider();
|
|
120472
120465
|
if (model.isResolved(index2)) {
|
|
120473
|
-
return this.renderer.renderElement(model.get(index2), index2, data.data,
|
|
120466
|
+
return this.renderer.renderElement(model.get(index2), index2, data.data, height);
|
|
120474
120467
|
}
|
|
120475
120468
|
const cts = new CancellationTokenSource$1();
|
|
120476
120469
|
const promise = model.resolve(index2, cts.token);
|
|
120477
120470
|
data.disposable = { dispose: () => cts.cancel() };
|
|
120478
120471
|
this.renderer.renderPlaceholder(index2, data.data);
|
|
120479
|
-
promise.then((entry) => this.renderer.renderElement(entry, index2, data.data,
|
|
120472
|
+
promise.then((entry) => this.renderer.renderElement(entry, index2, data.data, height));
|
|
120480
120473
|
}
|
|
120481
120474
|
disposeTemplate(data) {
|
|
120482
120475
|
if (data.disposable) {
|
|
@@ -121221,21 +121214,21 @@ class TableListRenderer {
|
|
|
121221
121214
|
this.renderedTemplates.add(result);
|
|
121222
121215
|
return result;
|
|
121223
121216
|
}
|
|
121224
|
-
renderElement(element, index2, templateData,
|
|
121217
|
+
renderElement(element, index2, templateData, height) {
|
|
121225
121218
|
for (let i2 = 0; i2 < this.columns.length; i2++) {
|
|
121226
121219
|
const column2 = this.columns[i2];
|
|
121227
121220
|
const cell = column2.project(element);
|
|
121228
121221
|
const renderer = this.renderers[i2];
|
|
121229
|
-
renderer.renderElement(cell, index2, templateData.cellTemplateData[i2],
|
|
121222
|
+
renderer.renderElement(cell, index2, templateData.cellTemplateData[i2], height);
|
|
121230
121223
|
}
|
|
121231
121224
|
}
|
|
121232
|
-
disposeElement(element, index2, templateData,
|
|
121225
|
+
disposeElement(element, index2, templateData, height) {
|
|
121233
121226
|
for (let i2 = 0; i2 < this.columns.length; i2++) {
|
|
121234
121227
|
const renderer = this.renderers[i2];
|
|
121235
121228
|
if (renderer.disposeElement) {
|
|
121236
121229
|
const column2 = this.columns[i2];
|
|
121237
121230
|
const cell = column2.project(element);
|
|
121238
|
-
renderer.disposeElement(cell, index2, templateData.cellTemplateData[i2],
|
|
121231
|
+
renderer.disposeElement(cell, index2, templateData.cellTemplateData[i2], height);
|
|
121239
121232
|
}
|
|
121240
121233
|
}
|
|
121241
121234
|
}
|
|
@@ -122048,9 +122041,9 @@ class ComposedTreeDelegate {
|
|
|
122048
122041
|
hasDynamicHeight(element) {
|
|
122049
122042
|
return !!this.delegate.hasDynamicHeight && this.delegate.hasDynamicHeight(element.element);
|
|
122050
122043
|
}
|
|
122051
|
-
setDynamicHeight(element,
|
|
122044
|
+
setDynamicHeight(element, height) {
|
|
122052
122045
|
if (this.delegate.setDynamicHeight) {
|
|
122053
|
-
this.delegate.setDynamicHeight(element.element,
|
|
122046
|
+
this.delegate.setDynamicHeight(element.element, height);
|
|
122054
122047
|
}
|
|
122055
122048
|
}
|
|
122056
122049
|
}
|
|
@@ -122119,26 +122112,26 @@ class TreeRenderer {
|
|
|
122119
122112
|
const templateData = this.renderer.renderTemplate(contents);
|
|
122120
122113
|
return { container, indent, twistie, indentGuidesDisposable: Disposable.None, templateData };
|
|
122121
122114
|
}
|
|
122122
|
-
renderElement(node2, index2, templateData,
|
|
122123
|
-
if (typeof
|
|
122124
|
-
this.renderedNodes.set(node2, { templateData, height
|
|
122115
|
+
renderElement(node2, index2, templateData, height) {
|
|
122116
|
+
if (typeof height === "number") {
|
|
122117
|
+
this.renderedNodes.set(node2, { templateData, height });
|
|
122125
122118
|
this.renderedElements.set(node2.element, node2);
|
|
122126
122119
|
}
|
|
122127
122120
|
const indent = TreeRenderer.DefaultIndent + (node2.depth - 1) * this.indent;
|
|
122128
122121
|
templateData.twistie.style.paddingLeft = `${indent}px`;
|
|
122129
122122
|
templateData.indent.style.width = `${indent + this.indent - 16}px`;
|
|
122130
122123
|
this.renderTwistie(node2, templateData);
|
|
122131
|
-
if (typeof
|
|
122124
|
+
if (typeof height === "number") {
|
|
122132
122125
|
this.renderIndentGuides(node2, templateData);
|
|
122133
122126
|
}
|
|
122134
|
-
this.renderer.renderElement(node2, index2, templateData.templateData,
|
|
122127
|
+
this.renderer.renderElement(node2, index2, templateData.templateData, height);
|
|
122135
122128
|
}
|
|
122136
|
-
disposeElement(node2, index2, templateData,
|
|
122129
|
+
disposeElement(node2, index2, templateData, height) {
|
|
122137
122130
|
templateData.indentGuidesDisposable.dispose();
|
|
122138
122131
|
if (this.renderer.disposeElement) {
|
|
122139
|
-
this.renderer.disposeElement(node2, index2, templateData.templateData,
|
|
122132
|
+
this.renderer.disposeElement(node2, index2, templateData.templateData, height);
|
|
122140
122133
|
}
|
|
122141
|
-
if (typeof
|
|
122134
|
+
if (typeof height === "number") {
|
|
122142
122135
|
this.renderedNodes.delete(node2);
|
|
122143
122136
|
this.renderedElements.delete(node2.element);
|
|
122144
122137
|
}
|
|
@@ -122460,7 +122453,7 @@ class TypeFilterController {
|
|
|
122460
122453
|
const { left } = getDomNodePagePosition(container);
|
|
122461
122454
|
const containerWidth = container.clientWidth;
|
|
122462
122455
|
const midContainerWidth = containerWidth / 2;
|
|
122463
|
-
const
|
|
122456
|
+
const width = this.domNode.clientWidth;
|
|
122464
122457
|
const disposables2 = new DisposableStore();
|
|
122465
122458
|
let positionClassName = this.positionClassName;
|
|
122466
122459
|
const updatePosition = () => {
|
|
@@ -122471,7 +122464,7 @@ class TypeFilterController {
|
|
|
122471
122464
|
break;
|
|
122472
122465
|
case "ne":
|
|
122473
122466
|
this.domNode.style.top = `4px`;
|
|
122474
|
-
this.domNode.style.left = `${containerWidth -
|
|
122467
|
+
this.domNode.style.left = `${containerWidth - width - 6}px`;
|
|
122475
122468
|
break;
|
|
122476
122469
|
}
|
|
122477
122470
|
};
|
|
@@ -122896,8 +122889,8 @@ class AbstractTree {
|
|
|
122896
122889
|
domFocus() {
|
|
122897
122890
|
this.view.domFocus();
|
|
122898
122891
|
}
|
|
122899
|
-
layout(
|
|
122900
|
-
this.view.layout(
|
|
122892
|
+
layout(height, width) {
|
|
122893
|
+
this.view.layout(height, width);
|
|
122901
122894
|
}
|
|
122902
122895
|
style(styles2) {
|
|
122903
122896
|
const suffix = `.${this.view.domId}`;
|
|
@@ -123449,8 +123442,8 @@ function mapList(nodeMapper, list2) {
|
|
|
123449
123442
|
splice(start, deleteCount, toInsert) {
|
|
123450
123443
|
list2.splice(start, deleteCount, toInsert.map((node2) => nodeMapper.map(node2)));
|
|
123451
123444
|
},
|
|
123452
|
-
updateElementHeight(index2,
|
|
123453
|
-
list2.updateElementHeight(index2,
|
|
123445
|
+
updateElementHeight(index2, height) {
|
|
123446
|
+
list2.updateElementHeight(index2, height);
|
|
123454
123447
|
}
|
|
123455
123448
|
};
|
|
123456
123449
|
}
|
|
@@ -123598,24 +123591,24 @@ class CompressibleRenderer {
|
|
|
123598
123591
|
const data = this.renderer.renderTemplate(container);
|
|
123599
123592
|
return { compressedTreeNode: void 0, data };
|
|
123600
123593
|
}
|
|
123601
|
-
renderElement(node2, index2, templateData,
|
|
123594
|
+
renderElement(node2, index2, templateData, height) {
|
|
123602
123595
|
const compressedTreeNode = this.compressedTreeNodeProvider.getCompressedTreeNode(node2.element);
|
|
123603
123596
|
if (compressedTreeNode.element.elements.length === 1) {
|
|
123604
123597
|
templateData.compressedTreeNode = void 0;
|
|
123605
|
-
this.renderer.renderElement(node2, index2, templateData.data,
|
|
123598
|
+
this.renderer.renderElement(node2, index2, templateData.data, height);
|
|
123606
123599
|
} else {
|
|
123607
123600
|
templateData.compressedTreeNode = compressedTreeNode;
|
|
123608
|
-
this.renderer.renderCompressedElements(compressedTreeNode, index2, templateData.data,
|
|
123601
|
+
this.renderer.renderCompressedElements(compressedTreeNode, index2, templateData.data, height);
|
|
123609
123602
|
}
|
|
123610
123603
|
}
|
|
123611
|
-
disposeElement(node2, index2, templateData,
|
|
123604
|
+
disposeElement(node2, index2, templateData, height) {
|
|
123612
123605
|
if (templateData.compressedTreeNode) {
|
|
123613
123606
|
if (this.renderer.disposeCompressedElements) {
|
|
123614
|
-
this.renderer.disposeCompressedElements(templateData.compressedTreeNode, index2, templateData.data,
|
|
123607
|
+
this.renderer.disposeCompressedElements(templateData.compressedTreeNode, index2, templateData.data, height);
|
|
123615
123608
|
}
|
|
123616
123609
|
} else {
|
|
123617
123610
|
if (this.renderer.disposeElement) {
|
|
123618
|
-
this.renderer.disposeElement(node2, index2, templateData.data,
|
|
123611
|
+
this.renderer.disposeElement(node2, index2, templateData.data, height);
|
|
123619
123612
|
}
|
|
123620
123613
|
}
|
|
123621
123614
|
}
|
|
@@ -123757,8 +123750,8 @@ class AsyncDataTreeRenderer {
|
|
|
123757
123750
|
const templateData = this.renderer.renderTemplate(container);
|
|
123758
123751
|
return { templateData };
|
|
123759
123752
|
}
|
|
123760
|
-
renderElement(node2, index2, templateData,
|
|
123761
|
-
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);
|
|
123762
123755
|
}
|
|
123763
123756
|
renderTwistie(element, twistieElement) {
|
|
123764
123757
|
if (element.slow) {
|
|
@@ -123769,9 +123762,9 @@ class AsyncDataTreeRenderer {
|
|
|
123769
123762
|
return false;
|
|
123770
123763
|
}
|
|
123771
123764
|
}
|
|
123772
|
-
disposeElement(node2, index2, templateData,
|
|
123765
|
+
disposeElement(node2, index2, templateData, height) {
|
|
123773
123766
|
if (this.renderer.disposeElement) {
|
|
123774
|
-
this.renderer.disposeElement(this.nodeMapper.map(node2), index2, templateData.templateData,
|
|
123767
|
+
this.renderer.disposeElement(this.nodeMapper.map(node2), index2, templateData.templateData, height);
|
|
123775
123768
|
}
|
|
123776
123769
|
}
|
|
123777
123770
|
disposeTemplate(templateData) {
|
|
@@ -123955,8 +123948,8 @@ class AsyncDataTree {
|
|
|
123955
123948
|
domFocus() {
|
|
123956
123949
|
this.tree.domFocus();
|
|
123957
123950
|
}
|
|
123958
|
-
layout(
|
|
123959
|
-
this.tree.layout(
|
|
123951
|
+
layout(height, width) {
|
|
123952
|
+
this.tree.layout(height, width);
|
|
123960
123953
|
}
|
|
123961
123954
|
style(styles2) {
|
|
123962
123955
|
this.tree.style(styles2);
|
|
@@ -124346,11 +124339,11 @@ class CompressibleAsyncDataTreeRenderer {
|
|
|
124346
124339
|
const templateData = this.renderer.renderTemplate(container);
|
|
124347
124340
|
return { templateData };
|
|
124348
124341
|
}
|
|
124349
|
-
renderElement(node2, index2, templateData,
|
|
124350
|
-
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);
|
|
124351
124344
|
}
|
|
124352
|
-
renderCompressedElements(node2, index2, templateData,
|
|
124353
|
-
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);
|
|
124354
124347
|
}
|
|
124355
124348
|
renderTwistie(element, twistieElement) {
|
|
124356
124349
|
if (element.slow) {
|
|
@@ -124361,14 +124354,14 @@ class CompressibleAsyncDataTreeRenderer {
|
|
|
124361
124354
|
return false;
|
|
124362
124355
|
}
|
|
124363
124356
|
}
|
|
124364
|
-
disposeElement(node2, index2, templateData,
|
|
124357
|
+
disposeElement(node2, index2, templateData, height) {
|
|
124365
124358
|
if (this.renderer.disposeElement) {
|
|
124366
|
-
this.renderer.disposeElement(this.nodeMapper.map(node2), index2, templateData.templateData,
|
|
124359
|
+
this.renderer.disposeElement(this.nodeMapper.map(node2), index2, templateData.templateData, height);
|
|
124367
124360
|
}
|
|
124368
124361
|
}
|
|
124369
|
-
disposeCompressedElements(node2, index2, templateData,
|
|
124362
|
+
disposeCompressedElements(node2, index2, templateData, height) {
|
|
124370
124363
|
if (this.renderer.disposeCompressedElements) {
|
|
124371
|
-
this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(node2), index2, templateData.templateData,
|
|
124364
|
+
this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(node2), index2, templateData.templateData, height);
|
|
124372
124365
|
}
|
|
124373
124366
|
}
|
|
124374
124367
|
disposeTemplate(templateData) {
|
|
@@ -128238,7 +128231,7 @@ class InputBox extends Widget {
|
|
|
128238
128231
|
get width() {
|
|
128239
128232
|
return getTotalWidth(this.input);
|
|
128240
128233
|
}
|
|
128241
|
-
set width(
|
|
128234
|
+
set width(width) {
|
|
128242
128235
|
if (this.options.flexibleHeight && this.options.flexibleWidth) {
|
|
128243
128236
|
let horizontalPadding = 0;
|
|
128244
128237
|
if (this.mirror) {
|
|
@@ -128246,12 +128239,12 @@ class InputBox extends Widget {
|
|
|
128246
128239
|
const paddingRight = parseFloat(this.mirror.style.paddingRight || "") || 0;
|
|
128247
128240
|
horizontalPadding = paddingLeft + paddingRight;
|
|
128248
128241
|
}
|
|
128249
|
-
this.input.style.width =
|
|
128242
|
+
this.input.style.width = width - horizontalPadding + "px";
|
|
128250
128243
|
} else {
|
|
128251
|
-
this.input.style.width =
|
|
128244
|
+
this.input.style.width = width + "px";
|
|
128252
128245
|
}
|
|
128253
128246
|
if (this.mirror) {
|
|
128254
|
-
this.mirror.style.width =
|
|
128247
|
+
this.mirror.style.width = width + "px";
|
|
128255
128248
|
}
|
|
128256
128249
|
}
|
|
128257
128250
|
set paddingRight(paddingRight) {
|
|
@@ -128265,9 +128258,9 @@ class InputBox extends Widget {
|
|
|
128265
128258
|
return;
|
|
128266
128259
|
}
|
|
128267
128260
|
const scrollHeight = this.cachedContentHeight;
|
|
128268
|
-
const
|
|
128261
|
+
const height = this.cachedHeight;
|
|
128269
128262
|
const scrollTop2 = this.input.scrollTop;
|
|
128270
|
-
this.scrollableElement.setScrollDimensions({ scrollHeight, height
|
|
128263
|
+
this.scrollableElement.setScrollDimensions({ scrollHeight, height });
|
|
128271
128264
|
this.scrollableElement.setScrollPosition({ scrollTop: scrollTop2 });
|
|
128272
128265
|
}
|
|
128273
128266
|
showMessage(message, force) {
|
|
@@ -128788,15 +128781,15 @@ function parseHrefAndDimensions(href) {
|
|
|
128788
128781
|
if (parameters) {
|
|
128789
128782
|
const heightFromParams = /height=(\d+)/.exec(parameters);
|
|
128790
128783
|
const widthFromParams = /width=(\d+)/.exec(parameters);
|
|
128791
|
-
const
|
|
128792
|
-
const
|
|
128793
|
-
const widthIsFinite = isFinite(parseInt(
|
|
128794
|
-
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));
|
|
128795
128788
|
if (widthIsFinite) {
|
|
128796
|
-
dimensions.push(`width="${
|
|
128789
|
+
dimensions.push(`width="${width}"`);
|
|
128797
128790
|
}
|
|
128798
128791
|
if (heightIsFinite) {
|
|
128799
|
-
dimensions.push(`height="${
|
|
128792
|
+
dimensions.push(`height="${height}"`);
|
|
128800
128793
|
}
|
|
128801
128794
|
}
|
|
128802
128795
|
return { href, dimensions };
|
|
@@ -131109,9 +131102,9 @@ class QuickInputController extends Disposable {
|
|
|
131109
131102
|
if (this.ui) {
|
|
131110
131103
|
this.ui.container.style.top = `${this.titleBarOffset}px`;
|
|
131111
131104
|
const style = this.ui.container.style;
|
|
131112
|
-
const
|
|
131113
|
-
style.width =
|
|
131114
|
-
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";
|
|
131115
131108
|
this.ui.inputBox.layout();
|
|
131116
131109
|
this.ui.list.layout(this.dimension && this.dimension.height * 0.4);
|
|
131117
131110
|
}
|
|
@@ -136762,7 +136755,7 @@ let LightBulbWidget = class LightBulbWidget2 extends Disposable {
|
|
|
136762
136755
|
}
|
|
136763
136756
|
this._editor.focus();
|
|
136764
136757
|
e2.preventDefault();
|
|
136765
|
-
const { top, height
|
|
136758
|
+
const { top, height } = getDomNodePagePosition(this._domNode);
|
|
136766
136759
|
const lineHeight = this._editor.getOption(58);
|
|
136767
136760
|
let pad = Math.floor(lineHeight / 3);
|
|
136768
136761
|
if (this.state.widgetPosition.position !== null && this.state.widgetPosition.position.lineNumber < this.state.editorPosition.lineNumber) {
|
|
@@ -136770,7 +136763,7 @@ let LightBulbWidget = class LightBulbWidget2 extends Disposable {
|
|
|
136770
136763
|
}
|
|
136771
136764
|
this._onClick.fire({
|
|
136772
136765
|
x: e2.posx,
|
|
136773
|
-
y: top +
|
|
136766
|
+
y: top + height + pad,
|
|
136774
136767
|
actions: this.state.actions,
|
|
136775
136768
|
trigger: this.state.trigger
|
|
136776
136769
|
});
|
|
@@ -137834,11 +137827,11 @@ class CodeLensViewZone {
|
|
|
137834
137827
|
this.suppressMouseDown = true;
|
|
137835
137828
|
this.domNode = document.createElement("div");
|
|
137836
137829
|
}
|
|
137837
|
-
onComputedHeight(
|
|
137830
|
+
onComputedHeight(height) {
|
|
137838
137831
|
if (this._lastHeight === void 0) {
|
|
137839
|
-
this._lastHeight =
|
|
137840
|
-
} else if (this._lastHeight !==
|
|
137841
|
-
this._lastHeight =
|
|
137832
|
+
this._lastHeight = height;
|
|
137833
|
+
} else if (this._lastHeight !== height) {
|
|
137834
|
+
this._lastHeight = height;
|
|
137842
137835
|
this._onHeight();
|
|
137843
137836
|
}
|
|
137844
137837
|
}
|
|
@@ -138003,8 +137996,8 @@ class CodeLensWidget {
|
|
|
138003
137996
|
}, (id2) => this._decorationIds[i2] = id2);
|
|
138004
137997
|
});
|
|
138005
137998
|
}
|
|
138006
|
-
updateHeight(
|
|
138007
|
-
this._viewZone.heightInPx =
|
|
137999
|
+
updateHeight(height, viewZoneChangeAccessor) {
|
|
138000
|
+
this._viewZone.heightInPx = height;
|
|
138008
138001
|
viewZoneChangeAccessor.layoutZone(this._viewZoneId);
|
|
138009
138002
|
if (this._contentWidget) {
|
|
138010
138003
|
this._editor.layoutContentWidget(this._contentWidget);
|
|
@@ -138924,8 +138917,8 @@ class ViewZoneDelegate {
|
|
|
138924
138917
|
onDomNodeTop(top) {
|
|
138925
138918
|
this._onDomNodeTop(top);
|
|
138926
138919
|
}
|
|
138927
|
-
onComputedHeight(
|
|
138928
|
-
this._onComputedHeight(
|
|
138920
|
+
onComputedHeight(height) {
|
|
138921
|
+
this._onComputedHeight(height);
|
|
138929
138922
|
}
|
|
138930
138923
|
}
|
|
138931
138924
|
class OverlayWidgetDelegate {
|
|
@@ -139001,10 +138994,10 @@ class ZoneWidget {
|
|
|
139001
138994
|
this.domNode.setAttribute("role", "presentation");
|
|
139002
138995
|
}
|
|
139003
138996
|
this._disposables.add(this.editor.onDidLayoutChange((info) => {
|
|
139004
|
-
const
|
|
139005
|
-
this.domNode.style.width =
|
|
138997
|
+
const width = this._getWidth(info);
|
|
138998
|
+
this.domNode.style.width = width + "px";
|
|
139006
138999
|
this.domNode.style.left = this._getLeft(info) + "px";
|
|
139007
|
-
this._onWidth(
|
|
139000
|
+
this._onWidth(width);
|
|
139008
139001
|
}));
|
|
139009
139002
|
}
|
|
139010
139003
|
dispose() {
|
|
@@ -139072,10 +139065,10 @@ class ZoneWidget {
|
|
|
139072
139065
|
_onViewZoneTop(top) {
|
|
139073
139066
|
this.domNode.style.top = top + "px";
|
|
139074
139067
|
}
|
|
139075
|
-
_onViewZoneHeight(
|
|
139076
|
-
this.domNode.style.height = `${
|
|
139068
|
+
_onViewZoneHeight(height) {
|
|
139069
|
+
this.domNode.style.height = `${height}px`;
|
|
139077
139070
|
if (this.container) {
|
|
139078
|
-
let containerHeight =
|
|
139071
|
+
let containerHeight = height - this._decoratingElementsHeight();
|
|
139079
139072
|
this.container.style.height = `${containerHeight}px`;
|
|
139080
139073
|
const layoutInfo = this.editor.getLayoutInfo();
|
|
139081
139074
|
this._doLayout(containerHeight, this._getWidth(layoutInfo));
|
|
@@ -139139,8 +139132,8 @@ class ZoneWidget {
|
|
|
139139
139132
|
_showImpl(where, heightInLines) {
|
|
139140
139133
|
const position2 = where.getStartPosition();
|
|
139141
139134
|
const layoutInfo = this.editor.getLayoutInfo();
|
|
139142
|
-
const
|
|
139143
|
-
this.domNode.style.width = `${
|
|
139135
|
+
const width = this._getWidth(layoutInfo);
|
|
139136
|
+
this.domNode.style.width = `${width}px`;
|
|
139144
139137
|
this.domNode.style.left = this._getLeft(layoutInfo) + "px";
|
|
139145
139138
|
const viewZoneDomNode = document.createElement("div");
|
|
139146
139139
|
viewZoneDomNode.style.overflow = "hidden";
|
|
@@ -139166,15 +139159,15 @@ class ZoneWidget {
|
|
|
139166
139159
|
this._overlayWidget = null;
|
|
139167
139160
|
}
|
|
139168
139161
|
this.domNode.style.top = "-1000px";
|
|
139169
|
-
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));
|
|
139170
139163
|
this._viewZone.id = accessor.addZone(this._viewZone);
|
|
139171
139164
|
this._overlayWidget = new OverlayWidgetDelegate(WIDGET_ID + this._viewZone.id, this.domNode);
|
|
139172
139165
|
this.editor.addOverlayWidget(this._overlayWidget);
|
|
139173
139166
|
});
|
|
139174
139167
|
if (this.container && this.options.showFrame) {
|
|
139175
|
-
const
|
|
139176
|
-
this.container.style.borderTopWidth =
|
|
139177
|
-
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";
|
|
139178
139171
|
}
|
|
139179
139172
|
let containerHeight = heightInLines * lineHeight - this._decoratingElementsHeight();
|
|
139180
139173
|
if (this.container) {
|
|
@@ -139182,7 +139175,7 @@ class ZoneWidget {
|
|
|
139182
139175
|
this.container.style.height = containerHeight + "px";
|
|
139183
139176
|
this.container.style.overflow = "hidden";
|
|
139184
139177
|
}
|
|
139185
|
-
this._doLayout(containerHeight,
|
|
139178
|
+
this._doLayout(containerHeight, width);
|
|
139186
139179
|
if (!this.options.keepEditorSelection) {
|
|
139187
139180
|
this.editor.setSelection(where);
|
|
139188
139181
|
}
|
|
@@ -140788,8 +140781,8 @@ let ReferenceWidget = class ReferenceWidget2 extends PeekViewWidget {
|
|
|
140788
140781
|
element: this._previewContainer,
|
|
140789
140782
|
minimumSize: 200,
|
|
140790
140783
|
maximumSize: Number.MAX_VALUE,
|
|
140791
|
-
layout: (
|
|
140792
|
-
this._preview.layout({ height: this._dim.height, width
|
|
140784
|
+
layout: (width) => {
|
|
140785
|
+
this._preview.layout({ height: this._dim.height, width });
|
|
140793
140786
|
}
|
|
140794
140787
|
}, Sizing.Distribute);
|
|
140795
140788
|
this._splitView.addView({
|
|
@@ -140797,10 +140790,10 @@ let ReferenceWidget = class ReferenceWidget2 extends PeekViewWidget {
|
|
|
140797
140790
|
element: this._treeContainer,
|
|
140798
140791
|
minimumSize: 100,
|
|
140799
140792
|
maximumSize: Number.MAX_VALUE,
|
|
140800
|
-
layout: (
|
|
140793
|
+
layout: (width) => {
|
|
140801
140794
|
this._treeContainer.style.height = `${this._dim.height}px`;
|
|
140802
|
-
this._treeContainer.style.width = `${
|
|
140803
|
-
this._tree.layout(this._dim.height,
|
|
140795
|
+
this._treeContainer.style.width = `${width}px`;
|
|
140796
|
+
this._tree.layout(this._dim.height, width);
|
|
140804
140797
|
}
|
|
140805
140798
|
}, Sizing.Distribute);
|
|
140806
140799
|
this._disposables.add(this._splitView.onDidSashChange(() => {
|
|
@@ -140827,9 +140820,9 @@ let ReferenceWidget = class ReferenceWidget2 extends PeekViewWidget {
|
|
|
140827
140820
|
});
|
|
140828
140821
|
hide(this._treeContainer);
|
|
140829
140822
|
}
|
|
140830
|
-
_onWidth(
|
|
140823
|
+
_onWidth(width) {
|
|
140831
140824
|
if (this._dim) {
|
|
140832
|
-
this._doLayoutBody(this._dim.height,
|
|
140825
|
+
this._doLayoutBody(this._dim.height, width);
|
|
140833
140826
|
}
|
|
140834
140827
|
}
|
|
140835
140828
|
_doLayoutBody(heightInPixel, widthInPixel) {
|
|
@@ -147054,10 +147047,10 @@ class MessageWidget {
|
|
|
147054
147047
|
const scrollHeight = fontInfo.lineHeight * this._lines;
|
|
147055
147048
|
this._scrollable.setScrollDimensions({ scrollWidth, scrollHeight });
|
|
147056
147049
|
}
|
|
147057
|
-
layout(
|
|
147058
|
-
this._scrollable.getDomNode().style.height = `${
|
|
147059
|
-
this._scrollable.getDomNode().style.width = `${
|
|
147060
|
-
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 });
|
|
147061
147054
|
}
|
|
147062
147055
|
getHeightInLines() {
|
|
147063
147056
|
return Math.min(17, this._lines);
|
|
@@ -152260,15 +152253,15 @@ class ResizableHTMLElement {
|
|
|
152260
152253
|
this._southSash.state = south ? 3 : 0;
|
|
152261
152254
|
this._westSash.state = west ? 3 : 0;
|
|
152262
152255
|
}
|
|
152263
|
-
layout(
|
|
152256
|
+
layout(height = this.size.height, width = this.size.width) {
|
|
152264
152257
|
const { height: minHeight, width: minWidth } = this._minSize;
|
|
152265
152258
|
const { height: maxHeight, width: maxWidth } = this._maxSize;
|
|
152266
|
-
|
|
152267
|
-
|
|
152268
|
-
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);
|
|
152269
152262
|
if (!Dimension.equals(newSize, this._size)) {
|
|
152270
|
-
this.domNode.style.height =
|
|
152271
|
-
this.domNode.style.width =
|
|
152263
|
+
this.domNode.style.height = height + "px";
|
|
152264
|
+
this.domNode.style.width = width + "px";
|
|
152272
152265
|
this._size = newSize;
|
|
152273
152266
|
this._northSash.layout();
|
|
152274
152267
|
this._eastSash.layout();
|
|
@@ -152468,11 +152461,11 @@ let SuggestDetailsWidget = class SuggestDetailsWidget2 {
|
|
|
152468
152461
|
get size() {
|
|
152469
152462
|
return this._size;
|
|
152470
152463
|
}
|
|
152471
|
-
layout(
|
|
152472
|
-
const newSize = new Dimension(
|
|
152464
|
+
layout(width, height) {
|
|
152465
|
+
const newSize = new Dimension(width, height);
|
|
152473
152466
|
if (!Dimension.equals(newSize, this._size)) {
|
|
152474
152467
|
this._size = newSize;
|
|
152475
|
-
size(this.domNode,
|
|
152468
|
+
size(this.domNode, width, height);
|
|
152476
152469
|
}
|
|
152477
152470
|
this._scrollbar.scanDomNode();
|
|
152478
152471
|
}
|
|
@@ -152494,8 +152487,8 @@ let SuggestDetailsWidget = class SuggestDetailsWidget2 {
|
|
|
152494
152487
|
pageUp() {
|
|
152495
152488
|
this.scrollUp(80);
|
|
152496
152489
|
}
|
|
152497
|
-
set borderWidth(
|
|
152498
|
-
this._borderWidth =
|
|
152490
|
+
set borderWidth(width) {
|
|
152491
|
+
this._borderWidth = width;
|
|
152499
152492
|
}
|
|
152500
152493
|
get borderWidth() {
|
|
152501
152494
|
return this._borderWidth;
|
|
@@ -152605,18 +152598,18 @@ class SuggestDetailsOverlay {
|
|
|
152605
152598
|
const defaultMinSize = new Dimension(220, 2 * info.lineHeight);
|
|
152606
152599
|
const defaultTop = anchorBox.top;
|
|
152607
152600
|
const eastPlacement = function() {
|
|
152608
|
-
const
|
|
152601
|
+
const width = bodyBox.width - (anchorBox.left + anchorBox.width + info.borderWidth + info.horizontalPadding);
|
|
152609
152602
|
const left = -info.borderWidth + anchorBox.left + anchorBox.width;
|
|
152610
|
-
const maxSizeTop = new Dimension(
|
|
152603
|
+
const maxSizeTop = new Dimension(width, bodyBox.height - anchorBox.top - info.borderHeight - info.verticalPadding);
|
|
152611
152604
|
const maxSizeBottom = maxSizeTop.with(void 0, anchorBox.top + anchorBox.height - info.borderHeight - info.verticalPadding);
|
|
152612
|
-
return { top: defaultTop, left, fit:
|
|
152605
|
+
return { top: defaultTop, left, fit: width - size2.width, maxSizeTop, maxSizeBottom, minSize: defaultMinSize.with(Math.min(width, defaultMinSize.width)) };
|
|
152613
152606
|
}();
|
|
152614
152607
|
const westPlacement = function() {
|
|
152615
|
-
const
|
|
152608
|
+
const width = anchorBox.left - info.borderWidth - info.horizontalPadding;
|
|
152616
152609
|
const left = Math.max(info.horizontalPadding, anchorBox.left - size2.width - info.borderWidth);
|
|
152617
|
-
const maxSizeTop = new Dimension(
|
|
152610
|
+
const maxSizeTop = new Dimension(width, bodyBox.height - anchorBox.top - info.borderHeight - info.verticalPadding);
|
|
152618
152611
|
const maxSizeBottom = maxSizeTop.with(void 0, anchorBox.top + anchorBox.height - info.borderHeight - info.verticalPadding);
|
|
152619
|
-
return { top: defaultTop, left, fit:
|
|
152612
|
+
return { top: defaultTop, left, fit: width - size2.width, maxSizeTop, maxSizeBottom, minSize: defaultMinSize.with(Math.min(width, defaultMinSize.width)) };
|
|
152620
152613
|
}();
|
|
152621
152614
|
const southPacement = function() {
|
|
152622
152615
|
const left = anchorBox.left;
|
|
@@ -152628,14 +152621,14 @@ class SuggestDetailsOverlay {
|
|
|
152628
152621
|
const placement = (_a2 = placements.find((p2) => p2.fit >= 0)) !== null && _a2 !== void 0 ? _a2 : placements.sort((a, b2) => b2.fit - a.fit)[0];
|
|
152629
152622
|
const bottom = anchorBox.top + anchorBox.height - info.borderHeight;
|
|
152630
152623
|
let alignAtTop;
|
|
152631
|
-
let
|
|
152624
|
+
let height = size2.height;
|
|
152632
152625
|
const maxHeight = Math.max(placement.maxSizeTop.height, placement.maxSizeBottom.height);
|
|
152633
|
-
if (
|
|
152634
|
-
|
|
152626
|
+
if (height > maxHeight) {
|
|
152627
|
+
height = maxHeight;
|
|
152635
152628
|
}
|
|
152636
152629
|
let maxSize;
|
|
152637
152630
|
if (preferAlignAtTop) {
|
|
152638
|
-
if (
|
|
152631
|
+
if (height <= placement.maxSizeTop.height) {
|
|
152639
152632
|
alignAtTop = true;
|
|
152640
152633
|
maxSize = placement.maxSizeTop;
|
|
152641
152634
|
} else {
|
|
@@ -152643,7 +152636,7 @@ class SuggestDetailsOverlay {
|
|
|
152643
152636
|
maxSize = placement.maxSizeBottom;
|
|
152644
152637
|
}
|
|
152645
152638
|
} else {
|
|
152646
|
-
if (
|
|
152639
|
+
if (height <= placement.maxSizeBottom.height) {
|
|
152647
152640
|
alignAtTop = false;
|
|
152648
152641
|
maxSize = placement.maxSizeBottom;
|
|
152649
152642
|
} else {
|
|
@@ -152651,12 +152644,12 @@ class SuggestDetailsOverlay {
|
|
|
152651
152644
|
maxSize = placement.maxSizeTop;
|
|
152652
152645
|
}
|
|
152653
152646
|
}
|
|
152654
|
-
this._applyTopLeft({ left: placement.left, top: alignAtTop ? placement.top : bottom -
|
|
152647
|
+
this._applyTopLeft({ left: placement.left, top: alignAtTop ? placement.top : bottom - height });
|
|
152655
152648
|
this.getDomNode().style.position = "fixed";
|
|
152656
152649
|
this._resizable.enableSashes(!alignAtTop, placement === eastPlacement, alignAtTop, placement !== eastPlacement);
|
|
152657
152650
|
this._resizable.minSize = placement.minSize;
|
|
152658
152651
|
this._resizable.maxSize = maxSize;
|
|
152659
|
-
this._resizable.layout(
|
|
152652
|
+
this._resizable.layout(height, Math.min(maxSize.width, size2.width));
|
|
152660
152653
|
this.widget.layout(this._resizable.size.width, this._resizable.size.height);
|
|
152661
152654
|
}
|
|
152662
152655
|
_applyTopLeft(topLeft) {
|
|
@@ -153034,14 +153027,14 @@ let SuggestWidget = class SuggestWidget2 {
|
|
|
153034
153027
|
if (state2) {
|
|
153035
153028
|
const { itemHeight, defaultSize } = this.getLayoutInfo();
|
|
153036
153029
|
const threshold = Math.round(itemHeight / 2);
|
|
153037
|
-
let { width
|
|
153038
|
-
if (!state2.persistHeight || Math.abs(state2.currentSize.height -
|
|
153039
|
-
|
|
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;
|
|
153040
153033
|
}
|
|
153041
|
-
if (!state2.persistWidth || Math.abs(state2.currentSize.width -
|
|
153042
|
-
|
|
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;
|
|
153043
153036
|
}
|
|
153044
|
-
this._persistedSize.store(new Dimension(
|
|
153037
|
+
this._persistedSize.store(new Dimension(width, height));
|
|
153045
153038
|
}
|
|
153046
153039
|
this._contentWidget.unlockPreference();
|
|
153047
153040
|
state2 = void 0;
|
|
@@ -153491,21 +153484,21 @@ let SuggestWidget = class SuggestWidget2 {
|
|
|
153491
153484
|
if (!size2) {
|
|
153492
153485
|
size2 = info.defaultSize;
|
|
153493
153486
|
}
|
|
153494
|
-
let
|
|
153495
|
-
let
|
|
153487
|
+
let height = size2.height;
|
|
153488
|
+
let width = size2.width;
|
|
153496
153489
|
this._status.element.style.lineHeight = `${info.itemHeight}px`;
|
|
153497
153490
|
if (this._state === 2 || this._state === 1) {
|
|
153498
|
-
|
|
153499
|
-
|
|
153491
|
+
height = info.itemHeight + info.borderHeight;
|
|
153492
|
+
width = info.defaultSize.width / 2;
|
|
153500
153493
|
this.element.enableSashes(false, false, false, false);
|
|
153501
|
-
this.element.minSize = this.element.maxSize = new Dimension(
|
|
153494
|
+
this.element.minSize = this.element.maxSize = new Dimension(width, height);
|
|
153502
153495
|
this._contentWidget.setPreference(2);
|
|
153503
153496
|
} else {
|
|
153504
153497
|
const maxWidth = bodyBox.width - info.borderHeight - 2 * info.horizontalPadding;
|
|
153505
|
-
if (
|
|
153506
|
-
|
|
153498
|
+
if (width > maxWidth) {
|
|
153499
|
+
width = maxWidth;
|
|
153507
153500
|
}
|
|
153508
|
-
const preferredWidth = this._completionModel ? this._completionModel.stats.pLabelLen * info.typicalHalfwidthCharacterWidth :
|
|
153501
|
+
const preferredWidth = this._completionModel ? this._completionModel.stats.pLabelLen * info.typicalHalfwidthCharacterWidth : width;
|
|
153509
153502
|
const fullHeight = info.statusBarHeight + this._list.contentHeight + info.borderHeight;
|
|
153510
153503
|
const minHeight = info.itemHeight + info.statusBarHeight;
|
|
153511
153504
|
const editorBox = getDomNodePagePosition(this.editor.getDomNode());
|
|
@@ -153515,17 +153508,17 @@ let SuggestWidget = class SuggestWidget2 {
|
|
|
153515
153508
|
const availableSpaceAbove = editorBox.top + cursorBox.top - info.verticalPadding;
|
|
153516
153509
|
const maxHeightAbove = Math.min(availableSpaceAbove, fullHeight);
|
|
153517
153510
|
let maxHeight = Math.min(Math.max(maxHeightAbove, maxHeightBelow) + info.borderHeight, fullHeight);
|
|
153518
|
-
if (
|
|
153519
|
-
|
|
153511
|
+
if (height === ((_a2 = this._cappedHeight) === null || _a2 === void 0 ? void 0 : _a2.capped)) {
|
|
153512
|
+
height = this._cappedHeight.wanted;
|
|
153520
153513
|
}
|
|
153521
|
-
if (
|
|
153522
|
-
|
|
153514
|
+
if (height < minHeight) {
|
|
153515
|
+
height = minHeight;
|
|
153523
153516
|
}
|
|
153524
|
-
if (
|
|
153525
|
-
|
|
153517
|
+
if (height > maxHeight) {
|
|
153518
|
+
height = maxHeight;
|
|
153526
153519
|
}
|
|
153527
153520
|
const forceRenderingAboveRequiredSpace = 150;
|
|
153528
|
-
if (
|
|
153521
|
+
if (height > maxHeightBelow || this._forceRenderingAbove && availableSpaceAbove > forceRenderingAboveRequiredSpace) {
|
|
153529
153522
|
this._contentWidget.setPreference(1);
|
|
153530
153523
|
this.element.enableSashes(true, true, false, false);
|
|
153531
153524
|
maxHeight = maxHeightAbove;
|
|
@@ -153537,18 +153530,18 @@ let SuggestWidget = class SuggestWidget2 {
|
|
|
153537
153530
|
this.element.preferredSize = new Dimension(preferredWidth, info.defaultSize.height);
|
|
153538
153531
|
this.element.maxSize = new Dimension(maxWidth, maxHeight);
|
|
153539
153532
|
this.element.minSize = new Dimension(220, minHeight);
|
|
153540
|
-
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;
|
|
153541
153534
|
}
|
|
153542
|
-
this._resize(
|
|
153535
|
+
this._resize(width, height);
|
|
153543
153536
|
}
|
|
153544
|
-
_resize(
|
|
153537
|
+
_resize(width, height) {
|
|
153545
153538
|
const { width: maxWidth, height: maxHeight } = this.element.maxSize;
|
|
153546
|
-
|
|
153547
|
-
|
|
153539
|
+
width = Math.min(maxWidth, width);
|
|
153540
|
+
height = Math.min(maxHeight, height);
|
|
153548
153541
|
const { statusBarHeight } = this.getLayoutInfo();
|
|
153549
|
-
this._list.layout(
|
|
153550
|
-
this._listElement.style.height = `${
|
|
153551
|
-
this.element.layout(
|
|
153542
|
+
this._list.layout(height - statusBarHeight, width);
|
|
153543
|
+
this._listElement.style.height = `${height - statusBarHeight}px`;
|
|
153544
|
+
this.element.layout(height, width);
|
|
153552
153545
|
this._contentWidget.layout();
|
|
153553
153546
|
this._positionDetails();
|
|
153554
153547
|
}
|
|
@@ -153647,9 +153640,9 @@ class SuggestContentWidget {
|
|
|
153647
153640
|
};
|
|
153648
153641
|
}
|
|
153649
153642
|
beforeRender() {
|
|
153650
|
-
const { height
|
|
153643
|
+
const { height, width } = this._widget.element.size;
|
|
153651
153644
|
const { borderWidth, horizontalPadding } = this._widget.getLayoutInfo();
|
|
153652
|
-
return new Dimension(
|
|
153645
|
+
return new Dimension(width + 2 * borderWidth + horizontalPadding, height + 2 * borderWidth);
|
|
153653
153646
|
}
|
|
153654
153647
|
afterRender(position2) {
|
|
153655
153648
|
this._widget._afterRender(position2);
|
|
@@ -156651,11 +156644,11 @@ let ModesContentHoverWidget = class ModesContentHoverWidget2 extends Widget {
|
|
|
156651
156644
|
this._hover.onContentsChanged();
|
|
156652
156645
|
}
|
|
156653
156646
|
layout() {
|
|
156654
|
-
const
|
|
156647
|
+
const height = Math.max(this._editor.getLayoutInfo().height / 4, 250);
|
|
156655
156648
|
const { fontSize, lineHeight } = this._editor.getOption(43);
|
|
156656
156649
|
this._hover.contentsDomNode.style.fontSize = `${fontSize}px`;
|
|
156657
156650
|
this._hover.contentsDomNode.style.lineHeight = `${lineHeight / fontSize}`;
|
|
156658
|
-
this._hover.contentsDomNode.style.maxHeight = `${
|
|
156651
|
+
this._hover.contentsDomNode.style.maxHeight = `${height}px`;
|
|
156659
156652
|
this._hover.contentsDomNode.style.maxWidth = `${Math.max(this._editor.getLayoutInfo().width * 0.66, 500)}px`;
|
|
156660
156653
|
}
|
|
156661
156654
|
onModelDecorationsChanged() {
|
|
@@ -158433,8 +158426,8 @@ class FindDecorations {
|
|
|
158433
158426
|
if (findMatches.length > 1e3) {
|
|
158434
158427
|
findMatchesOptions = FindDecorations._FIND_MATCH_NO_OVERVIEW_DECORATION;
|
|
158435
158428
|
const lineCount = this._editor.getModel().getLineCount();
|
|
158436
|
-
const
|
|
158437
|
-
const approxPixelsPerLine =
|
|
158429
|
+
const height = this._editor.getLayoutInfo().height;
|
|
158430
|
+
const approxPixelsPerLine = height / lineCount;
|
|
158438
158431
|
const mergeLinesDelta = Math.max(2, Math.ceil(3 / approxPixelsPerLine));
|
|
158439
158432
|
let prevStartLineNumber = findMatches[0].range.startLineNumber;
|
|
158440
158433
|
let prevEndLineNumber = findMatches[0].range.endLineNumber;
|
|
@@ -161401,15 +161394,15 @@ class FindWidget extends Widget {
|
|
|
161401
161394
|
}));
|
|
161402
161395
|
this._register(this._resizeSash.onDidChange((evt) => {
|
|
161403
161396
|
this._resized = true;
|
|
161404
|
-
let
|
|
161405
|
-
if (
|
|
161397
|
+
let width = originalWidth + evt.startX - evt.currentX;
|
|
161398
|
+
if (width < FIND_WIDGET_INITIAL_WIDTH) {
|
|
161406
161399
|
return;
|
|
161407
161400
|
}
|
|
161408
161401
|
const maxWidth = parseFloat(getComputedStyle$1(this._domNode).maxWidth) || 0;
|
|
161409
|
-
if (
|
|
161402
|
+
if (width > maxWidth) {
|
|
161410
161403
|
return;
|
|
161411
161404
|
}
|
|
161412
|
-
this._domNode.style.width = `${
|
|
161405
|
+
this._domNode.style.width = `${width}px`;
|
|
161413
161406
|
if (this._isReplaceVisible) {
|
|
161414
161407
|
this._replaceInput.width = getTotalWidth(this._findInput.domNode);
|
|
161415
161408
|
}
|
|
@@ -161421,13 +161414,13 @@ class FindWidget extends Widget {
|
|
|
161421
161414
|
if (currentWidth < FIND_WIDGET_INITIAL_WIDTH) {
|
|
161422
161415
|
return;
|
|
161423
161416
|
}
|
|
161424
|
-
let
|
|
161417
|
+
let width = FIND_WIDGET_INITIAL_WIDTH;
|
|
161425
161418
|
if (!this._resized || currentWidth === FIND_WIDGET_INITIAL_WIDTH) {
|
|
161426
161419
|
const layoutInfo = this._codeEditor.getLayoutInfo();
|
|
161427
|
-
|
|
161420
|
+
width = layoutInfo.width - 28 - layoutInfo.minimap.minimapWidth - 15;
|
|
161428
161421
|
this._resized = true;
|
|
161429
161422
|
}
|
|
161430
|
-
this._domNode.style.width = `${
|
|
161423
|
+
this._domNode.style.width = `${width}px`;
|
|
161431
161424
|
if (this._isReplaceVisible) {
|
|
161432
161425
|
this._replaceInput.width = getTotalWidth(this._findInput.domNode);
|
|
161433
161426
|
}
|
|
@@ -169753,8 +169746,8 @@ let ParameterHintsWidget = class ParameterHintsWidget2 extends Disposable {
|
|
|
169753
169746
|
if (!this.domNodes) {
|
|
169754
169747
|
return;
|
|
169755
169748
|
}
|
|
169756
|
-
const
|
|
169757
|
-
const maxHeight = `${
|
|
169749
|
+
const height = Math.max(this.editor.getLayoutInfo().height / 4, 250);
|
|
169750
|
+
const maxHeight = `${height}px`;
|
|
169758
169751
|
this.domNodes.element.style.maxHeight = maxHeight;
|
|
169759
169752
|
const wrapper = this.domNodes.element.getElementsByClassName("phwrapper");
|
|
169760
169753
|
if (wrapper.length) {
|
|
@@ -174350,7 +174343,7 @@ const EditorLayout = newStyled.div`
|
|
|
174350
174343
|
}
|
|
174351
174344
|
|
|
174352
174345
|
.active {
|
|
174353
|
-
background: #
|
|
174346
|
+
background: #005391;
|
|
174354
174347
|
box-shadow: 0px 1px 0px 0 #333;
|
|
174355
174348
|
/* border-left: 1px solid rgb(42 96 231);
|
|
174356
174349
|
border-right: 1px solid rgb(42 96 231); */
|
|
@@ -190300,6 +190293,9 @@ const Editor = ({
|
|
|
190300
190293
|
}, [userList]);
|
|
190301
190294
|
react.exports.useEffect(() => {
|
|
190302
190295
|
console.log(CRDTInfo2);
|
|
190296
|
+
console.log(docFile);
|
|
190297
|
+
if (/\/$/.test(docFile == null ? void 0 : docFile.path))
|
|
190298
|
+
return;
|
|
190303
190299
|
updateModel(file);
|
|
190304
190300
|
}, [docFile]);
|
|
190305
190301
|
return /* @__PURE__ */ jsx(FollowLayout, {
|
|
@@ -190315,7 +190311,7 @@ const Editor = ({
|
|
|
190315
190311
|
onClick: () => {
|
|
190316
190312
|
switchModel(f2.model);
|
|
190317
190313
|
},
|
|
190318
|
-
children: f2.label.
|
|
190314
|
+
children: f2.label.split("/").slice(-1)[0]
|
|
190319
190315
|
}, index2))
|
|
190320
190316
|
}) : null, /* @__PURE__ */ jsx(ContentLayout, {
|
|
190321
190317
|
ref: divEl,
|
|
@@ -197704,6 +197700,7 @@ const TerminalComponent = (_h2) => {
|
|
|
197704
197700
|
const {
|
|
197705
197701
|
CRDTInfo: CRDTInfo2
|
|
197706
197702
|
} = oTStore((state2) => state2);
|
|
197703
|
+
const socket2 = useOT((state2) => state2.socket);
|
|
197707
197704
|
const initTerminalText = (terminal2, text2) => {
|
|
197708
197705
|
terminal2.write("\r\n");
|
|
197709
197706
|
terminal2.clear();
|
|
@@ -197787,6 +197784,41 @@ const TerminalComponent = (_h2) => {
|
|
|
197787
197784
|
}
|
|
197788
197785
|
}
|
|
197789
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]);
|
|
197790
197822
|
return /* @__PURE__ */ jsx(FollowLayout, {
|
|
197791
197823
|
name: "terminal",
|
|
197792
197824
|
children: /* @__PURE__ */ jsx("div", {
|
|
@@ -198147,7 +198179,7 @@ function SkeletonTheme(_n) {
|
|
|
198147
198179
|
return React.createElement(SkeletonThemeContext.Provider, { value: styleOptions }, children);
|
|
198148
198180
|
}
|
|
198149
198181
|
const defaultEnableAnimation = true;
|
|
198150
|
-
function styleOptionsToCssProperties({ baseColor, highlightColor, width
|
|
198182
|
+
function styleOptionsToCssProperties({ baseColor, highlightColor, width, height, borderRadius, circle, direction, duration, enableAnimation = defaultEnableAnimation }) {
|
|
198151
198183
|
const style = {};
|
|
198152
198184
|
if (direction === "rtl")
|
|
198153
198185
|
style["--animation-direction"] = "reverse";
|
|
@@ -198155,10 +198187,10 @@ function styleOptionsToCssProperties({ baseColor, highlightColor, width: width2,
|
|
|
198155
198187
|
style["--animation-duration"] = `${duration}s`;
|
|
198156
198188
|
if (!enableAnimation)
|
|
198157
198189
|
style["--pseudo-element-display"] = "none";
|
|
198158
|
-
if (typeof
|
|
198159
|
-
style.width =
|
|
198160
|
-
if (typeof
|
|
198161
|
-
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;
|
|
198162
198194
|
if (typeof borderRadius === "string" || typeof borderRadius === "number")
|
|
198163
198195
|
style.borderRadius = borderRadius;
|
|
198164
198196
|
if (circle)
|
|
@@ -198356,90 +198388,6 @@ const ToolBar = (_r) => {
|
|
|
198356
198388
|
})]
|
|
198357
198389
|
});
|
|
198358
198390
|
};
|
|
198359
|
-
const width = "20";
|
|
198360
|
-
const height = "20";
|
|
198361
|
-
const MultiPlayerCursorLayout = newStyled.svg`
|
|
198362
|
-
position: fixed;
|
|
198363
|
-
left: 0;
|
|
198364
|
-
top: 0;
|
|
198365
|
-
|
|
198366
|
-
width: ${(props2) => props2.width}px;
|
|
198367
|
-
height: ${(props2) => props2.height}px;
|
|
198368
|
-
z-index: 9;
|
|
198369
|
-
transition: all 0.3s;
|
|
198370
|
-
`;
|
|
198371
|
-
const MultiPlayerCursor = () => {
|
|
198372
|
-
const [users, setUsers] = react.exports.useState(null);
|
|
198373
|
-
const CRDTInfo2 = oTStore((state2) => state2.CRDTInfo);
|
|
198374
|
-
const throttled = lodash$2.exports.throttle((a) => {
|
|
198375
|
-
var _a2, _b2;
|
|
198376
|
-
(_b2 = (_a2 = useOT.getState()) == null ? void 0 : _a2.socket) == null ? void 0 : _b2.emit("extraSync", JSON.stringify(a));
|
|
198377
|
-
}, 300);
|
|
198378
|
-
react.exports.useEffect(() => {
|
|
198379
|
-
const {
|
|
198380
|
-
userList
|
|
198381
|
-
} = userListStore.getState();
|
|
198382
|
-
setUsers(userList.map((_user) => {
|
|
198383
|
-
if (_user.uuid === CRDTInfo2.userInfo.uuid) {
|
|
198384
|
-
_user.cursor = CRDTInfo2.extend;
|
|
198385
|
-
}
|
|
198386
|
-
return _user;
|
|
198387
|
-
}));
|
|
198388
|
-
}, [CRDTInfo2]);
|
|
198389
|
-
react.exports.useEffect(() => {
|
|
198390
|
-
const {
|
|
198391
|
-
userInfo
|
|
198392
|
-
} = userStore.getState();
|
|
198393
|
-
window.addEventListener("mousemove", (evt) => {
|
|
198394
|
-
const {
|
|
198395
|
-
globalData
|
|
198396
|
-
} = oTStore.getState();
|
|
198397
|
-
if (!globalData.syncCursor)
|
|
198398
|
-
return;
|
|
198399
|
-
const crdt = {
|
|
198400
|
-
timestamp: Date.now(),
|
|
198401
|
-
userInfo: lodash$2.exports.pick(userInfo, "uuid", "role"),
|
|
198402
|
-
extend: {
|
|
198403
|
-
type: "mousemove",
|
|
198404
|
-
left: evt.clientX.toFixed(3),
|
|
198405
|
-
top: evt.clientY.toFixed(3),
|
|
198406
|
-
width: window.innerWidth,
|
|
198407
|
-
height: window.innerHeight
|
|
198408
|
-
}
|
|
198409
|
-
};
|
|
198410
|
-
throttled(crdt);
|
|
198411
|
-
}, false);
|
|
198412
|
-
}, []);
|
|
198413
|
-
return /* @__PURE__ */ jsx(Fragment, {
|
|
198414
|
-
children: oTStore.getState().globalData.syncCursor && (users == null ? void 0 : users.map((item, index2) => {
|
|
198415
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
|
198416
|
-
return !IsMe(item) ? /* @__PURE__ */ jsxs(MultiPlayerCursorLayout, {
|
|
198417
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
198418
|
-
width,
|
|
198419
|
-
height,
|
|
198420
|
-
viewBox: "0 0 1024 1024",
|
|
198421
|
-
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}`,
|
|
198422
|
-
version: "1.1",
|
|
198423
|
-
"p-id": "4512",
|
|
198424
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
198425
|
-
color: item.color,
|
|
198426
|
-
style: {
|
|
198427
|
-
left: `${Number((_d2 = item.cursor) == null ? void 0 : _d2.left) * window.innerWidth / ((_e2 = item.cursor) == null ? void 0 : _e2.width)}px`,
|
|
198428
|
-
top: `${Number((_f2 = item.cursor) == null ? void 0 : _f2.top) * window.innerHeight / ((_g2 = item.cursor) == null ? void 0 : _g2.height)}px`
|
|
198429
|
-
},
|
|
198430
|
-
children: [/* @__PURE__ */ jsx("defs", {
|
|
198431
|
-
children: /* @__PURE__ */ jsx("style", {
|
|
198432
|
-
type: "text/css"
|
|
198433
|
-
})
|
|
198434
|
-
}), /* @__PURE__ */ jsx("path", {
|
|
198435
|
-
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",
|
|
198436
|
-
fill: item.color,
|
|
198437
|
-
"p-id": "4513"
|
|
198438
|
-
})]
|
|
198439
|
-
}, index2) : null;
|
|
198440
|
-
}))
|
|
198441
|
-
});
|
|
198442
|
-
};
|
|
198443
198391
|
var LanguageIcon;
|
|
198444
198392
|
(function(LanguageIcon2) {
|
|
198445
198393
|
LanguageIcon2["js"] = "javascript";
|
|
@@ -198569,7 +198517,7 @@ const Index = (props2) => {
|
|
|
198569
198517
|
return /* @__PURE__ */ jsx(Fragment, {
|
|
198570
198518
|
children: /* @__PURE__ */ jsxs(MainLayout, {
|
|
198571
198519
|
className: "flex flex-col",
|
|
198572
|
-
children: [/* @__PURE__ */ jsx(
|
|
198520
|
+
children: [/* @__PURE__ */ jsx(HeaderComponent, {}), /* @__PURE__ */ jsxs(ContainerLayout, {
|
|
198573
198521
|
className: "flex flex-1 mt-2.5 flex-row",
|
|
198574
198522
|
children: [/* @__PURE__ */ jsx("section", {
|
|
198575
198523
|
className: "flex flex-row",
|