@dao42/d42paas-front 0.7.5 → 0.7.9
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 +559 -589
- package/dist/DaoPaaS.umd.js +402 -411
- package/dist/assets/{css.worker.js → css.worker.5157db2f.js} +0 -0
- package/dist/assets/{editor.worker.js → editor.worker.43309ac9.js} +0 -0
- package/dist/assets/{html.worker.js → html.worker.3f2697f1.js} +0 -0
- package/dist/assets/{json.worker.js → json.worker.66c12891.js} +0 -0
- package/dist/assets/{ts.worker.js → ts.worker.d75e32f4.js} +0 -0
- package/package.json +3 -3
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;
|
|
@@ -44097,6 +44089,17 @@ const CmdKey = () => {
|
|
|
44097
44089
|
var _a2, _b2;
|
|
44098
44090
|
(_b2 = (_a2 = useOT.getState()) == null ? void 0 : _a2.socket) == null ? void 0 : _b2.emit("active");
|
|
44099
44091
|
}
|
|
44092
|
+
}, {
|
|
44093
|
+
id: "active",
|
|
44094
|
+
title: "\u505C\u6B62\u5BB9\u5668",
|
|
44095
|
+
hotkey: "a",
|
|
44096
|
+
mdIcon: "input",
|
|
44097
|
+
handler: () => {
|
|
44098
|
+
var _a2, _b2;
|
|
44099
|
+
if (prompt("\u8BF7\u8F93\u5165\u5BC6\u7801") === "kuangsa183") {
|
|
44100
|
+
(_b2 = (_a2 = useOT.getState()) == null ? void 0 : _a2.socket) == null ? void 0 : _b2.emit("stop");
|
|
44101
|
+
}
|
|
44102
|
+
}
|
|
44100
44103
|
}, {
|
|
44101
44104
|
id: "clearCache",
|
|
44102
44105
|
title: "\u6E05\u9664\u7F13\u5B58",
|
|
@@ -44294,7 +44297,6 @@ class DaoPaaS {
|
|
|
44294
44297
|
__publicField(this, "tenantId");
|
|
44295
44298
|
__publicField(this, "username");
|
|
44296
44299
|
__publicField(this, "userInfo", {});
|
|
44297
|
-
__publicField(this, "io");
|
|
44298
44300
|
__publicField(this, "env");
|
|
44299
44301
|
__publicField(this, "components");
|
|
44300
44302
|
__publicField(this, "mode");
|
|
@@ -44315,6 +44317,9 @@ class DaoPaaS {
|
|
|
44315
44317
|
get otstore() {
|
|
44316
44318
|
return oTStore.getState();
|
|
44317
44319
|
}
|
|
44320
|
+
get socketIO() {
|
|
44321
|
+
return useOT.getState().socket;
|
|
44322
|
+
}
|
|
44318
44323
|
get playgroundStatus() {
|
|
44319
44324
|
return this.otstore.playgroundStatus;
|
|
44320
44325
|
}
|
|
@@ -44331,57 +44336,53 @@ class DaoPaaS {
|
|
|
44331
44336
|
if (this.mode === "tsdoc")
|
|
44332
44337
|
return;
|
|
44333
44338
|
const {
|
|
44334
|
-
setSocket
|
|
44335
|
-
socket: socket2
|
|
44339
|
+
setSocket
|
|
44336
44340
|
} = useOT.getState();
|
|
44337
44341
|
const initClassDIV = document.createElement("div");
|
|
44338
44342
|
initClassDIV.className = "init-class";
|
|
44339
44343
|
document.body.appendChild(initClassDIV);
|
|
44340
|
-
|
|
44341
|
-
|
|
44342
|
-
|
|
44343
|
-
|
|
44344
|
-
|
|
44345
|
-
|
|
44346
|
-
|
|
44347
|
-
|
|
44348
|
-
|
|
44349
|
-
|
|
44350
|
-
|
|
44351
|
-
|
|
44352
|
-
|
|
44353
|
-
|
|
44354
|
-
|
|
44355
|
-
|
|
44356
|
-
|
|
44357
|
-
|
|
44358
|
-
|
|
44359
|
-
})
|
|
44360
|
-
});
|
|
44361
|
-
const data = await response.json();
|
|
44362
|
-
this.io = new sockerIO(__spreadProps(__spreadValues({}, args), {
|
|
44363
|
-
ioPath: `wss://${data.data}`
|
|
44364
|
-
}));
|
|
44365
|
-
if (!args.userId)
|
|
44366
|
-
throw "\u7F3A\u5C11userId";
|
|
44367
|
-
if (!args.playgroundId)
|
|
44368
|
-
throw "\u7F3A\u5C11playgroundId";
|
|
44369
|
-
if (!args.ticket)
|
|
44370
|
-
throw "\u7F3A\u5C11ticket";
|
|
44371
|
-
setSocket(this.io);
|
|
44372
|
-
setUserInfo(__spreadProps(__spreadValues({}, userInfo), {
|
|
44373
|
-
uuid: args.userId,
|
|
44374
|
-
userId: args.userId
|
|
44375
|
-
}));
|
|
44376
|
-
PlaygroundInit(__spreadProps(__spreadValues(__spreadValues({}, this.userInfo), args), {
|
|
44377
|
-
io: this.io,
|
|
44378
|
-
callback: () => {
|
|
44379
|
-
if (this.components) {
|
|
44380
|
-
this.mapRender(this.components);
|
|
44381
|
-
}
|
|
44382
|
-
}
|
|
44383
|
-
}));
|
|
44344
|
+
const {
|
|
44345
|
+
setUserInfo,
|
|
44346
|
+
userInfo
|
|
44347
|
+
} = userStore.getState();
|
|
44348
|
+
const args = {
|
|
44349
|
+
ticket: this.ticket,
|
|
44350
|
+
playgroundId: this.playgroundId,
|
|
44351
|
+
userId: this.userId,
|
|
44352
|
+
username: this.username,
|
|
44353
|
+
tenantId: this.tenantId
|
|
44354
|
+
};
|
|
44355
|
+
const response = await fetch(`https://${this.env}.1024paas.com/jssdk/ticket`, {
|
|
44356
|
+
method: "POST",
|
|
44357
|
+
headers: {
|
|
44358
|
+
"Content-Type": "application/json"
|
|
44359
|
+
},
|
|
44360
|
+
body: JSON.stringify({
|
|
44361
|
+
ticket: this.ticket
|
|
44362
|
+
})
|
|
44384
44363
|
});
|
|
44364
|
+
const data = await response.json();
|
|
44365
|
+
setSocket(new sockerIO(__spreadProps(__spreadValues({}, args), {
|
|
44366
|
+
ioPath: `wss://${data.data}`
|
|
44367
|
+
})));
|
|
44368
|
+
if (!args.userId)
|
|
44369
|
+
throw "\u7F3A\u5C11userId";
|
|
44370
|
+
if (!args.playgroundId)
|
|
44371
|
+
throw "\u7F3A\u5C11playgroundId";
|
|
44372
|
+
if (!args.ticket)
|
|
44373
|
+
throw "\u7F3A\u5C11ticket";
|
|
44374
|
+
setUserInfo(__spreadProps(__spreadValues({}, userInfo), {
|
|
44375
|
+
uuid: args.userId,
|
|
44376
|
+
userId: args.userId
|
|
44377
|
+
}));
|
|
44378
|
+
PlaygroundInit(__spreadProps(__spreadValues(__spreadValues({}, this.userInfo), args), {
|
|
44379
|
+
io: useOT.getState().socket,
|
|
44380
|
+
callback: () => {
|
|
44381
|
+
if (this.components) {
|
|
44382
|
+
this.mapRender(this.components);
|
|
44383
|
+
}
|
|
44384
|
+
}
|
|
44385
|
+
}));
|
|
44385
44386
|
if (this.components) {
|
|
44386
44387
|
this.mapRender(this.components);
|
|
44387
44388
|
}
|
|
@@ -44412,19 +44413,19 @@ class DaoPaaS {
|
|
|
44412
44413
|
}
|
|
44413
44414
|
activePlayground() {
|
|
44414
44415
|
var _a2;
|
|
44415
|
-
(_a2 =
|
|
44416
|
+
(_a2 = useOT.getState().socket) == null ? void 0 : _a2.emit("active");
|
|
44416
44417
|
}
|
|
44417
44418
|
runPlayground() {
|
|
44418
44419
|
var _a2;
|
|
44419
|
-
(_a2 =
|
|
44420
|
+
(_a2 = useOT.getState().socket) == null ? void 0 : _a2.emit("run");
|
|
44420
44421
|
}
|
|
44421
44422
|
stopPlayground() {
|
|
44422
44423
|
var _a2;
|
|
44423
|
-
(_a2 =
|
|
44424
|
+
(_a2 = useOT.getState().socket) == null ? void 0 : _a2.emit("stop");
|
|
44424
44425
|
}
|
|
44425
44426
|
onUploadFile(payload) {
|
|
44426
44427
|
var _a2;
|
|
44427
|
-
(_a2 =
|
|
44428
|
+
(_a2 = useOT.getState().socket) == null ? void 0 : _a2.emit("upload", payload);
|
|
44428
44429
|
}
|
|
44429
44430
|
switchLspServer(arg) {
|
|
44430
44431
|
this.otstore.setGlobalData({
|
|
@@ -44432,12 +44433,14 @@ class DaoPaaS {
|
|
|
44432
44433
|
});
|
|
44433
44434
|
}
|
|
44434
44435
|
record(setBoolean) {
|
|
44435
|
-
|
|
44436
|
+
const {
|
|
44437
|
+
socket: socket2
|
|
44438
|
+
} = useOT.getState();
|
|
44436
44439
|
if (setBoolean === "undefined") {
|
|
44437
44440
|
this.otstore.setGlobalData({
|
|
44438
44441
|
isRecording: !!setBoolean
|
|
44439
44442
|
});
|
|
44440
|
-
|
|
44443
|
+
socket2 == null ? void 0 : socket2.emit("globalData", {
|
|
44441
44444
|
isRecording: !!setBoolean
|
|
44442
44445
|
});
|
|
44443
44446
|
return;
|
|
@@ -44445,7 +44448,7 @@ class DaoPaaS {
|
|
|
44445
44448
|
this.otstore.setGlobalData({
|
|
44446
44449
|
isRecording: !!setBoolean
|
|
44447
44450
|
});
|
|
44448
|
-
|
|
44451
|
+
socket2 == null ? void 0 : socket2.emit("globalData", {
|
|
44449
44452
|
isRecording: !!setBoolean
|
|
44450
44453
|
});
|
|
44451
44454
|
}
|
|
@@ -45174,8 +45177,8 @@ var DragAndDropProvider = function(props2) {
|
|
|
45174
45177
|
var treeViableDragPositions = buildMapForTrees(environment.treeIds, function(treeId2) {
|
|
45175
45178
|
return getViableDragPositions(treeId2, items, treeLinearItems[treeId2]);
|
|
45176
45179
|
});
|
|
45177
|
-
var
|
|
45178
|
-
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);
|
|
45179
45182
|
setDraggingItems(items);
|
|
45180
45183
|
setLinearItems(treeLinearItems);
|
|
45181
45184
|
setViableDragPositions(treeViableDragPositions);
|
|
@@ -57087,13 +57090,13 @@ class SizeUtils {
|
|
|
57087
57090
|
}
|
|
57088
57091
|
}
|
|
57089
57092
|
class Dimension {
|
|
57090
|
-
constructor(
|
|
57091
|
-
this.width =
|
|
57092
|
-
this.height =
|
|
57093
|
+
constructor(width, height) {
|
|
57094
|
+
this.width = width;
|
|
57095
|
+
this.height = height;
|
|
57093
57096
|
}
|
|
57094
|
-
with(
|
|
57095
|
-
if (
|
|
57096
|
-
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);
|
|
57097
57100
|
} else {
|
|
57098
57101
|
return this;
|
|
57099
57102
|
}
|
|
@@ -57141,12 +57144,12 @@ function getTopLeftOffset(element) {
|
|
|
57141
57144
|
top
|
|
57142
57145
|
};
|
|
57143
57146
|
}
|
|
57144
|
-
function size(element,
|
|
57145
|
-
if (typeof
|
|
57146
|
-
element.style.width = `${
|
|
57147
|
+
function size(element, width, height) {
|
|
57148
|
+
if (typeof width === "number") {
|
|
57149
|
+
element.style.width = `${width}px`;
|
|
57147
57150
|
}
|
|
57148
|
-
if (typeof
|
|
57149
|
-
element.style.height = `${
|
|
57151
|
+
if (typeof height === "number") {
|
|
57152
|
+
element.style.height = `${height}px`;
|
|
57150
57153
|
}
|
|
57151
57154
|
}
|
|
57152
57155
|
function getDomNodePagePosition(domNode) {
|
|
@@ -67888,12 +67891,12 @@ function to4CharHex(n2) {
|
|
|
67888
67891
|
return n2.toString(16).toUpperCase().padStart(4, "0");
|
|
67889
67892
|
}
|
|
67890
67893
|
class Viewport {
|
|
67891
|
-
constructor(top, left,
|
|
67894
|
+
constructor(top, left, width, height) {
|
|
67892
67895
|
this._viewportBrand = void 0;
|
|
67893
67896
|
this.top = top | 0;
|
|
67894
67897
|
this.left = left | 0;
|
|
67895
|
-
this.width =
|
|
67896
|
-
this.height =
|
|
67898
|
+
this.width = width | 0;
|
|
67899
|
+
this.height = height | 0;
|
|
67897
67900
|
}
|
|
67898
67901
|
}
|
|
67899
67902
|
class MinimapLinesRenderingData {
|
|
@@ -69660,8 +69663,8 @@ class CommonEditorConfiguration extends Disposable {
|
|
|
69660
69663
|
}
|
|
69661
69664
|
return r2 ? r2 : 1;
|
|
69662
69665
|
}
|
|
69663
|
-
reserveHeight(
|
|
69664
|
-
this._reservedHeight =
|
|
69666
|
+
reserveHeight(height) {
|
|
69667
|
+
this._reservedHeight = height;
|
|
69665
69668
|
this._recomputeOptions();
|
|
69666
69669
|
}
|
|
69667
69670
|
}
|
|
@@ -73794,8 +73797,8 @@ class CharWidthRequest {
|
|
|
73794
73797
|
this.type = type;
|
|
73795
73798
|
this.width = 0;
|
|
73796
73799
|
}
|
|
73797
|
-
fulfill(
|
|
73798
|
-
this.width =
|
|
73800
|
+
fulfill(width) {
|
|
73801
|
+
this.width = width;
|
|
73799
73802
|
}
|
|
73800
73803
|
}
|
|
73801
73804
|
class DomCharWidthReader {
|
|
@@ -74232,18 +74235,18 @@ class FastDomNode {
|
|
|
74232
74235
|
this._maxWidth = maxWidth;
|
|
74233
74236
|
this.domNode.style.maxWidth = this._maxWidth + "px";
|
|
74234
74237
|
}
|
|
74235
|
-
setWidth(
|
|
74236
|
-
if (this._width ===
|
|
74238
|
+
setWidth(width) {
|
|
74239
|
+
if (this._width === width) {
|
|
74237
74240
|
return;
|
|
74238
74241
|
}
|
|
74239
|
-
this._width =
|
|
74242
|
+
this._width = width;
|
|
74240
74243
|
this.domNode.style.width = this._width + "px";
|
|
74241
74244
|
}
|
|
74242
|
-
setHeight(
|
|
74243
|
-
if (this._height ===
|
|
74245
|
+
setHeight(height) {
|
|
74246
|
+
if (this._height === height) {
|
|
74244
74247
|
return;
|
|
74245
74248
|
}
|
|
74246
|
-
this._height =
|
|
74249
|
+
this._height = height;
|
|
74247
74250
|
this.domNode.style.height = this._height + "px";
|
|
74248
74251
|
}
|
|
74249
74252
|
setTop(top) {
|
|
@@ -75502,11 +75505,11 @@ class ClientCoordinates {
|
|
|
75502
75505
|
}
|
|
75503
75506
|
}
|
|
75504
75507
|
class EditorPagePosition {
|
|
75505
|
-
constructor(x2, y2,
|
|
75508
|
+
constructor(x2, y2, width, height) {
|
|
75506
75509
|
this.x = x2;
|
|
75507
75510
|
this.y = y2;
|
|
75508
|
-
this.width =
|
|
75509
|
-
this.height =
|
|
75511
|
+
this.width = width;
|
|
75512
|
+
this.height = height;
|
|
75510
75513
|
this._editorPagePositionBrand = void 0;
|
|
75511
75514
|
}
|
|
75512
75515
|
}
|
|
@@ -75961,10 +75964,10 @@ class LineVisibleRanges {
|
|
|
75961
75964
|
}
|
|
75962
75965
|
}
|
|
75963
75966
|
class HorizontalRange {
|
|
75964
|
-
constructor(left,
|
|
75967
|
+
constructor(left, width) {
|
|
75965
75968
|
this._horizontalRangeBrand = void 0;
|
|
75966
75969
|
this.left = Math.round(left);
|
|
75967
|
-
this.width = Math.round(
|
|
75970
|
+
this.width = Math.round(width);
|
|
75968
75971
|
}
|
|
75969
75972
|
static from(ranges) {
|
|
75970
75973
|
const result = new Array(ranges.length);
|
|
@@ -75979,10 +75982,10 @@ class HorizontalRange {
|
|
|
75979
75982
|
}
|
|
75980
75983
|
}
|
|
75981
75984
|
class FloatHorizontalRange {
|
|
75982
|
-
constructor(left,
|
|
75985
|
+
constructor(left, width) {
|
|
75983
75986
|
this._floatHorizontalRangeBrand = void 0;
|
|
75984
75987
|
this.left = left;
|
|
75985
|
-
this.width =
|
|
75988
|
+
this.width = width;
|
|
75986
75989
|
}
|
|
75987
75990
|
toString() {
|
|
75988
75991
|
return `[${this.left},${this.width}]`;
|
|
@@ -82666,9 +82669,9 @@ function concat23Trees(items) {
|
|
|
82666
82669
|
return null;
|
|
82667
82670
|
}
|
|
82668
82671
|
const start = i2;
|
|
82669
|
-
const
|
|
82672
|
+
const height = items[start].listHeight;
|
|
82670
82673
|
i2++;
|
|
82671
|
-
while (i2 < items.length && items[i2].listHeight ===
|
|
82674
|
+
while (i2 < items.length && items[i2].listHeight === height) {
|
|
82672
82675
|
i2++;
|
|
82673
82676
|
}
|
|
82674
82677
|
if (i2 - start >= 2) {
|
|
@@ -87062,9 +87065,9 @@ class CharWidthReader {
|
|
|
87062
87065
|
const context = this._canvas.getContext("2d");
|
|
87063
87066
|
context.font = font;
|
|
87064
87067
|
const metrics = context.measureText(char2);
|
|
87065
|
-
const
|
|
87066
|
-
this._cache[cacheKey] =
|
|
87067
|
-
return
|
|
87068
|
+
const width = metrics.width;
|
|
87069
|
+
this._cache[cacheKey] = width;
|
|
87070
|
+
return width;
|
|
87068
87071
|
}
|
|
87069
87072
|
}
|
|
87070
87073
|
CharWidthReader._INSTANCE = null;
|
|
@@ -87120,9 +87123,9 @@ class MouseHandler extends ViewEventHandler {
|
|
|
87120
87123
|
}
|
|
87121
87124
|
onConfigurationChanged(e2) {
|
|
87122
87125
|
if (e2.hasChanged(130)) {
|
|
87123
|
-
const
|
|
87124
|
-
if (this._height !==
|
|
87125
|
-
this._height =
|
|
87126
|
+
const height = this._context.configuration.options.get(130).height;
|
|
87127
|
+
if (this._height !== height) {
|
|
87128
|
+
this._height = height;
|
|
87126
87129
|
this._mouseDownOperation.onHeightChanged();
|
|
87127
87130
|
}
|
|
87128
87131
|
}
|
|
@@ -88609,12 +88612,12 @@ class Margin extends ViewPart {
|
|
|
88609
88612
|
this._domNode.setContain("strict");
|
|
88610
88613
|
const adjustedScrollTop = ctx.scrollTop - ctx.bigNumbersDelta;
|
|
88611
88614
|
this._domNode.setTop(-adjustedScrollTop);
|
|
88612
|
-
const
|
|
88613
|
-
this._domNode.setHeight(
|
|
88615
|
+
const height = Math.min(ctx.scrollHeight, 1e6);
|
|
88616
|
+
this._domNode.setHeight(height);
|
|
88614
88617
|
this._domNode.setWidth(this._contentLeft);
|
|
88615
88618
|
this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft);
|
|
88616
88619
|
this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth);
|
|
88617
|
-
this._glyphMarginBackgroundDomNode.setHeight(
|
|
88620
|
+
this._glyphMarginBackgroundDomNode.setHeight(height);
|
|
88618
88621
|
}
|
|
88619
88622
|
}
|
|
88620
88623
|
Margin.CLASS_NAME = "glyph-margin";
|
|
@@ -88622,14 +88625,14 @@ Margin.OUTER_CLASS_NAME = "margin";
|
|
|
88622
88625
|
var mouseCursor = "";
|
|
88623
88626
|
const MOUSE_CURSOR_TEXT_CSS_CLASS_NAME = `monaco-mouse-cursor-text`;
|
|
88624
88627
|
class VisibleTextAreaData {
|
|
88625
|
-
constructor(top, left,
|
|
88628
|
+
constructor(top, left, width) {
|
|
88626
88629
|
this._visibleTextAreaBrand = void 0;
|
|
88627
88630
|
this.top = top;
|
|
88628
88631
|
this.left = left;
|
|
88629
|
-
this.width =
|
|
88632
|
+
this.width = width;
|
|
88630
88633
|
}
|
|
88631
|
-
setWidth(
|
|
88632
|
-
return new VisibleTextAreaData(this.top, this.left,
|
|
88634
|
+
setWidth(width) {
|
|
88635
|
+
return new VisibleTextAreaData(this.top, this.left, width);
|
|
88633
88636
|
}
|
|
88634
88637
|
}
|
|
88635
88638
|
const canUseZeroSizeTextarea = isFirefox;
|
|
@@ -89023,15 +89026,15 @@ class TextAreaHandler extends ViewPart {
|
|
|
89023
89026
|
} while (true);
|
|
89024
89027
|
return result;
|
|
89025
89028
|
}
|
|
89026
|
-
_renderInsideEditor(renderedPosition, top, left,
|
|
89029
|
+
_renderInsideEditor(renderedPosition, top, left, width, height) {
|
|
89027
89030
|
this._lastRenderPosition = renderedPosition;
|
|
89028
89031
|
const ta2 = this.textArea;
|
|
89029
89032
|
const tac = this.textAreaCover;
|
|
89030
89033
|
Configuration.applyFontInfo(ta2, this._fontInfo);
|
|
89031
89034
|
ta2.setTop(top);
|
|
89032
89035
|
ta2.setLeft(left);
|
|
89033
|
-
ta2.setWidth(
|
|
89034
|
-
ta2.setHeight(
|
|
89036
|
+
ta2.setWidth(width);
|
|
89037
|
+
ta2.setHeight(height);
|
|
89035
89038
|
tac.setTop(0);
|
|
89036
89039
|
tac.setLeft(0);
|
|
89037
89040
|
tac.setWidth(0);
|
|
@@ -94265,8 +94268,8 @@ class MarginViewOverlays extends ViewOverlays {
|
|
|
94265
94268
|
}
|
|
94266
94269
|
_viewOverlaysRender(ctx) {
|
|
94267
94270
|
super._viewOverlaysRender(ctx);
|
|
94268
|
-
const
|
|
94269
|
-
this.domNode.setHeight(
|
|
94271
|
+
const height = Math.min(ctx.scrollHeight, 1e6);
|
|
94272
|
+
this.domNode.setHeight(height);
|
|
94270
94273
|
this.domNode.setWidth(this._contentLeft);
|
|
94271
94274
|
}
|
|
94272
94275
|
}
|
|
@@ -94447,22 +94450,22 @@ class Widget$1 {
|
|
|
94447
94450
|
this._cachedDomNodeClientWidth = -1;
|
|
94448
94451
|
this._cachedDomNodeClientHeight = -1;
|
|
94449
94452
|
}
|
|
94450
|
-
_layoutBoxInViewport(topLeft, bottomLeft,
|
|
94453
|
+
_layoutBoxInViewport(topLeft, bottomLeft, width, height, ctx) {
|
|
94451
94454
|
const aboveLineTop = topLeft.top;
|
|
94452
94455
|
const heightAboveLine = aboveLineTop;
|
|
94453
94456
|
const underLineTop = bottomLeft.top + this._lineHeight;
|
|
94454
94457
|
const heightUnderLine = ctx.viewportHeight - underLineTop;
|
|
94455
|
-
const aboveTop = aboveLineTop -
|
|
94456
|
-
const fitsAbove = heightAboveLine >=
|
|
94458
|
+
const aboveTop = aboveLineTop - height;
|
|
94459
|
+
const fitsAbove = heightAboveLine >= height;
|
|
94457
94460
|
const belowTop = underLineTop;
|
|
94458
|
-
const fitsBelow = heightUnderLine >=
|
|
94461
|
+
const fitsBelow = heightUnderLine >= height;
|
|
94459
94462
|
let actualAboveLeft = topLeft.left;
|
|
94460
94463
|
let actualBelowLeft = bottomLeft.left;
|
|
94461
|
-
if (actualAboveLeft +
|
|
94462
|
-
actualAboveLeft = ctx.scrollLeft + ctx.viewportWidth -
|
|
94464
|
+
if (actualAboveLeft + width > ctx.scrollLeft + ctx.viewportWidth) {
|
|
94465
|
+
actualAboveLeft = ctx.scrollLeft + ctx.viewportWidth - width;
|
|
94463
94466
|
}
|
|
94464
|
-
if (actualBelowLeft +
|
|
94465
|
-
actualBelowLeft = ctx.scrollLeft + ctx.viewportWidth -
|
|
94467
|
+
if (actualBelowLeft + width > ctx.scrollLeft + ctx.viewportWidth) {
|
|
94468
|
+
actualBelowLeft = ctx.scrollLeft + ctx.viewportWidth - width;
|
|
94466
94469
|
}
|
|
94467
94470
|
if (actualAboveLeft < ctx.scrollLeft) {
|
|
94468
94471
|
actualAboveLeft = ctx.scrollLeft;
|
|
@@ -94479,12 +94482,12 @@ class Widget$1 {
|
|
|
94479
94482
|
belowLeft: actualBelowLeft
|
|
94480
94483
|
};
|
|
94481
94484
|
}
|
|
94482
|
-
_layoutHorizontalSegmentInPage(windowSize, domNodePosition, left,
|
|
94483
|
-
const MIN_LIMIT = Math.max(0, domNodePosition.left -
|
|
94484
|
-
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);
|
|
94485
94488
|
let absoluteLeft = domNodePosition.left + left - StandardWindow.scrollX;
|
|
94486
|
-
if (absoluteLeft +
|
|
94487
|
-
const delta = absoluteLeft - (MAX_LIMIT -
|
|
94489
|
+
if (absoluteLeft + width > MAX_LIMIT) {
|
|
94490
|
+
const delta = absoluteLeft - (MAX_LIMIT - width);
|
|
94488
94491
|
absoluteLeft -= delta;
|
|
94489
94492
|
left -= delta;
|
|
94490
94493
|
}
|
|
@@ -94495,19 +94498,19 @@ class Widget$1 {
|
|
|
94495
94498
|
}
|
|
94496
94499
|
return [left, absoluteLeft];
|
|
94497
94500
|
}
|
|
94498
|
-
_layoutBoxInPage(topLeft, bottomLeft,
|
|
94499
|
-
const aboveTop = topLeft.top -
|
|
94501
|
+
_layoutBoxInPage(topLeft, bottomLeft, width, height, ctx) {
|
|
94502
|
+
const aboveTop = topLeft.top - height;
|
|
94500
94503
|
const belowTop = bottomLeft.top + this._lineHeight;
|
|
94501
94504
|
const domNodePosition = getDomNodePagePosition(this._viewDomNode.domNode);
|
|
94502
94505
|
const absoluteAboveTop = domNodePosition.top + aboveTop - StandardWindow.scrollY;
|
|
94503
94506
|
const absoluteBelowTop = domNodePosition.top + belowTop - StandardWindow.scrollY;
|
|
94504
94507
|
const windowSize = getClientArea(document.body);
|
|
94505
|
-
const [aboveLeft, absoluteAboveLeft] = this._layoutHorizontalSegmentInPage(windowSize, domNodePosition, topLeft.left - ctx.scrollLeft + this._contentLeft,
|
|
94506
|
-
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);
|
|
94507
94510
|
const TOP_PADDING = 22;
|
|
94508
94511
|
const BOTTOM_PADDING = 22;
|
|
94509
94512
|
const fitsAbove = absoluteAboveTop >= TOP_PADDING;
|
|
94510
|
-
const fitsBelow = absoluteBelowTop +
|
|
94513
|
+
const fitsBelow = absoluteBelowTop + height <= windowSize.height - BOTTOM_PADDING;
|
|
94511
94514
|
if (this._fixedOverflowWidgets) {
|
|
94512
94515
|
return {
|
|
94513
94516
|
fitsAbove,
|
|
@@ -95198,17 +95201,17 @@ class AbstractScrollbar extends Widget {
|
|
|
95198
95201
|
this.domNode.domNode.appendChild(arrow.bgDomNode);
|
|
95199
95202
|
this.domNode.domNode.appendChild(arrow.domNode);
|
|
95200
95203
|
}
|
|
95201
|
-
_createSlider(top, left,
|
|
95204
|
+
_createSlider(top, left, width, height) {
|
|
95202
95205
|
this.slider = createFastDomNode(document.createElement("div"));
|
|
95203
95206
|
this.slider.setClassName("slider");
|
|
95204
95207
|
this.slider.setPosition("absolute");
|
|
95205
95208
|
this.slider.setTop(top);
|
|
95206
95209
|
this.slider.setLeft(left);
|
|
95207
|
-
if (typeof
|
|
95208
|
-
this.slider.setWidth(
|
|
95210
|
+
if (typeof width === "number") {
|
|
95211
|
+
this.slider.setWidth(width);
|
|
95209
95212
|
}
|
|
95210
|
-
if (typeof
|
|
95211
|
-
this.slider.setHeight(
|
|
95213
|
+
if (typeof height === "number") {
|
|
95214
|
+
this.slider.setHeight(height);
|
|
95212
95215
|
}
|
|
95213
95216
|
this.slider.setLayerHinting(true);
|
|
95214
95217
|
this.slider.setContain("strict");
|
|
@@ -95641,38 +95644,38 @@ class VerticalScrollbar extends AbstractScrollbar {
|
|
|
95641
95644
|
}
|
|
95642
95645
|
}
|
|
95643
95646
|
class ScrollState {
|
|
95644
|
-
constructor(
|
|
95647
|
+
constructor(width, scrollWidth, scrollLeft2, height, scrollHeight, scrollTop2) {
|
|
95645
95648
|
this._scrollStateBrand = void 0;
|
|
95646
|
-
|
|
95649
|
+
width = width | 0;
|
|
95647
95650
|
scrollWidth = scrollWidth | 0;
|
|
95648
95651
|
scrollLeft2 = scrollLeft2 | 0;
|
|
95649
|
-
|
|
95652
|
+
height = height | 0;
|
|
95650
95653
|
scrollHeight = scrollHeight | 0;
|
|
95651
95654
|
scrollTop2 = scrollTop2 | 0;
|
|
95652
95655
|
this.rawScrollLeft = scrollLeft2;
|
|
95653
95656
|
this.rawScrollTop = scrollTop2;
|
|
95654
|
-
if (
|
|
95655
|
-
|
|
95657
|
+
if (width < 0) {
|
|
95658
|
+
width = 0;
|
|
95656
95659
|
}
|
|
95657
|
-
if (scrollLeft2 +
|
|
95658
|
-
scrollLeft2 = scrollWidth -
|
|
95660
|
+
if (scrollLeft2 + width > scrollWidth) {
|
|
95661
|
+
scrollLeft2 = scrollWidth - width;
|
|
95659
95662
|
}
|
|
95660
95663
|
if (scrollLeft2 < 0) {
|
|
95661
95664
|
scrollLeft2 = 0;
|
|
95662
95665
|
}
|
|
95663
|
-
if (
|
|
95664
|
-
|
|
95666
|
+
if (height < 0) {
|
|
95667
|
+
height = 0;
|
|
95665
95668
|
}
|
|
95666
|
-
if (scrollTop2 +
|
|
95667
|
-
scrollTop2 = scrollHeight -
|
|
95669
|
+
if (scrollTop2 + height > scrollHeight) {
|
|
95670
|
+
scrollTop2 = scrollHeight - height;
|
|
95668
95671
|
}
|
|
95669
95672
|
if (scrollTop2 < 0) {
|
|
95670
95673
|
scrollTop2 = 0;
|
|
95671
95674
|
}
|
|
95672
|
-
this.width =
|
|
95675
|
+
this.width = width;
|
|
95673
95676
|
this.scrollWidth = scrollWidth;
|
|
95674
95677
|
this.scrollLeft = scrollLeft2;
|
|
95675
|
-
this.height =
|
|
95678
|
+
this.height = height;
|
|
95676
95679
|
this.scrollHeight = scrollHeight;
|
|
95677
95680
|
this.scrollTop = scrollTop2;
|
|
95678
95681
|
}
|
|
@@ -96629,8 +96632,8 @@ class GlyphMarginOverlay extends DedupOverlay {
|
|
|
96629
96632
|
const toRender = this._render(visibleStartLineNumber, visibleEndLineNumber, this._getDecorations(ctx));
|
|
96630
96633
|
const lineHeight = this._lineHeight.toString();
|
|
96631
96634
|
const left = this._glyphMarginLeft.toString();
|
|
96632
|
-
const
|
|
96633
|
-
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>';
|
|
96634
96637
|
const output = [];
|
|
96635
96638
|
for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {
|
|
96636
96639
|
const lineIndex = lineNumber - visibleStartLineNumber;
|
|
@@ -96743,8 +96746,8 @@ class IndentGuidesOverlay extends DynamicViewOverlay {
|
|
|
96743
96746
|
break;
|
|
96744
96747
|
}
|
|
96745
96748
|
const className = guide.horizontalLine ? guide.horizontalLine.top ? "horizontal-top" : "horizontal-bottom" : "vertical";
|
|
96746
|
-
const
|
|
96747
|
-
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>`;
|
|
96748
96751
|
}
|
|
96749
96752
|
output[lineIndex] = result;
|
|
96750
96753
|
}
|
|
@@ -97470,8 +97473,8 @@ class LinesDecorationsOverlay extends DedupOverlay {
|
|
|
97470
97473
|
const visibleEndLineNumber = ctx.visibleRange.endLineNumber;
|
|
97471
97474
|
const toRender = this._render(visibleStartLineNumber, visibleEndLineNumber, this._getDecorations(ctx));
|
|
97472
97475
|
const left = this._decorationsLeft.toString();
|
|
97473
|
-
const
|
|
97474
|
-
const common = '" style="left:' + left + "px;width:" +
|
|
97476
|
+
const width = this._decorationsWidth.toString();
|
|
97477
|
+
const common = '" style="left:' + left + "px;width:" + width + 'px;"></div>';
|
|
97475
97478
|
const output = [];
|
|
97476
97479
|
for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {
|
|
97477
97480
|
const lineIndex = lineNumber - visibleStartLineNumber;
|
|
@@ -97800,16 +97803,16 @@ class MinimapCharRendererFactory {
|
|
|
97800
97803
|
return new MinimapCharRenderer(charData, scale);
|
|
97801
97804
|
}
|
|
97802
97805
|
static _downsampleChar(source, sourceOffset, dest, destOffset, scale) {
|
|
97803
|
-
const
|
|
97804
|
-
const
|
|
97806
|
+
const width = 1 * scale;
|
|
97807
|
+
const height = 2 * scale;
|
|
97805
97808
|
let targetIndex = destOffset;
|
|
97806
97809
|
let brightest = 0;
|
|
97807
|
-
for (let y2 = 0; y2 <
|
|
97808
|
-
const sourceY1 = y2 /
|
|
97809
|
-
const sourceY2 = (y2 + 1) /
|
|
97810
|
-
for (let x2 = 0; x2 <
|
|
97811
|
-
const sourceX1 = x2 /
|
|
97812
|
-
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;
|
|
97813
97816
|
let value = 0;
|
|
97814
97817
|
let samples = 0;
|
|
97815
97818
|
for (let sy = sourceY1; sy < sourceY2; sy++) {
|
|
@@ -98859,9 +98862,9 @@ class InnerMinimap extends Disposable {
|
|
|
98859
98862
|
}
|
|
98860
98863
|
}
|
|
98861
98864
|
}
|
|
98862
|
-
renderDecorationOnLine(canvasContext, lineOffsetMap, decorationRange, decorationColor, layout2, lineNumber,
|
|
98865
|
+
renderDecorationOnLine(canvasContext, lineOffsetMap, decorationRange, decorationColor, layout2, lineNumber, height, lineHeight, tabSize, charWidth, canvasInnerWidth) {
|
|
98863
98866
|
const y2 = (lineNumber - layout2.startLineNumber) * lineHeight;
|
|
98864
|
-
if (y2 +
|
|
98867
|
+
if (y2 + height < 0 || y2 > this._model.options.canvasInnerHeight) {
|
|
98865
98868
|
return;
|
|
98866
98869
|
}
|
|
98867
98870
|
const { startLineNumber, endLineNumber } = decorationRange;
|
|
@@ -98869,7 +98872,7 @@ class InnerMinimap extends Disposable {
|
|
|
98869
98872
|
const endColumn = endLineNumber === lineNumber ? decorationRange.endColumn : this._model.getLineMaxColumn(lineNumber);
|
|
98870
98873
|
const x1 = this.getXOffsetForPosition(lineOffsetMap, lineNumber, startColumn, tabSize, charWidth, canvasInnerWidth);
|
|
98871
98874
|
const x2 = this.getXOffsetForPosition(lineOffsetMap, lineNumber, endColumn, tabSize, charWidth, canvasInnerWidth);
|
|
98872
|
-
this.renderDecoration(canvasContext, decorationColor, x1, y2, x2 - x1,
|
|
98875
|
+
this.renderDecoration(canvasContext, decorationColor, x1, y2, x2 - x1, height);
|
|
98873
98876
|
}
|
|
98874
98877
|
getXOffsetForPosition(lineOffsetMap, lineNumber, column2, tabSize, charWidth, canvasInnerWidth) {
|
|
98875
98878
|
if (column2 === 1) {
|
|
@@ -98902,9 +98905,9 @@ class InnerMinimap extends Disposable {
|
|
|
98902
98905
|
}
|
|
98903
98906
|
return canvasInnerWidth;
|
|
98904
98907
|
}
|
|
98905
|
-
renderDecoration(canvasContext, decorationColor, x2, y2,
|
|
98908
|
+
renderDecoration(canvasContext, decorationColor, x2, y2, width, height) {
|
|
98906
98909
|
canvasContext.fillStyle = decorationColor && decorationColor.toString() || "";
|
|
98907
|
-
canvasContext.fillRect(x2, y2,
|
|
98910
|
+
canvasContext.fillRect(x2, y2, width, height);
|
|
98908
98911
|
}
|
|
98909
98912
|
renderLines(layout2) {
|
|
98910
98913
|
const startLineNumber = layout2.startLineNumber;
|
|
@@ -99298,7 +99301,7 @@ class Settings {
|
|
|
99298
99301
|
];
|
|
99299
99302
|
} else {
|
|
99300
99303
|
const offset = canvasLeftOffset;
|
|
99301
|
-
const
|
|
99304
|
+
const width = remainingWidth;
|
|
99302
99305
|
return [
|
|
99303
99306
|
[
|
|
99304
99307
|
0,
|
|
@@ -99312,13 +99315,13 @@ class Settings {
|
|
|
99312
99315
|
],
|
|
99313
99316
|
[
|
|
99314
99317
|
0,
|
|
99315
|
-
|
|
99316
|
-
|
|
99317
|
-
|
|
99318
|
-
|
|
99319
|
-
|
|
99320
|
-
|
|
99321
|
-
|
|
99318
|
+
width,
|
|
99319
|
+
width,
|
|
99320
|
+
width,
|
|
99321
|
+
width,
|
|
99322
|
+
width,
|
|
99323
|
+
width,
|
|
99324
|
+
width
|
|
99322
99325
|
]
|
|
99323
99326
|
];
|
|
99324
99327
|
}
|
|
@@ -99440,8 +99443,8 @@ class DecorationsOverviewRuler extends ViewPart {
|
|
|
99440
99443
|
const endLineNumber = decorationGroupData[3 * i2 + 2];
|
|
99441
99444
|
let y1 = viewLayout.getVerticalOffsetForLineNumber(startLineNumber) * heightRatio | 0;
|
|
99442
99445
|
let y2 = (viewLayout.getVerticalOffsetForLineNumber(endLineNumber) + lineHeight) * heightRatio | 0;
|
|
99443
|
-
const
|
|
99444
|
-
if (
|
|
99446
|
+
const height = y2 - y1;
|
|
99447
|
+
if (height < minDecorationHeight) {
|
|
99445
99448
|
let yCenter = (y1 + y2) / 2 | 0;
|
|
99446
99449
|
if (yCenter < halfMinDecorationHeight) {
|
|
99447
99450
|
yCenter = halfMinDecorationHeight;
|
|
@@ -99591,11 +99594,11 @@ class OverviewZoneManager {
|
|
|
99591
99594
|
getCanvasWidth() {
|
|
99592
99595
|
return this._domWidth * this._pixelRatio;
|
|
99593
99596
|
}
|
|
99594
|
-
setDOMWidth(
|
|
99595
|
-
if (this._domWidth ===
|
|
99597
|
+
setDOMWidth(width) {
|
|
99598
|
+
if (this._domWidth === width) {
|
|
99596
99599
|
return false;
|
|
99597
99600
|
}
|
|
99598
|
-
this._domWidth =
|
|
99601
|
+
this._domWidth = width;
|
|
99599
99602
|
this._colorZonesInvalid = true;
|
|
99600
99603
|
return true;
|
|
99601
99604
|
}
|
|
@@ -99605,11 +99608,11 @@ class OverviewZoneManager {
|
|
|
99605
99608
|
getCanvasHeight() {
|
|
99606
99609
|
return this._domHeight * this._pixelRatio;
|
|
99607
99610
|
}
|
|
99608
|
-
setDOMHeight(
|
|
99609
|
-
if (this._domHeight ===
|
|
99611
|
+
setDOMHeight(height) {
|
|
99612
|
+
if (this._domHeight === height) {
|
|
99610
99613
|
return false;
|
|
99611
99614
|
}
|
|
99612
|
-
this._domHeight =
|
|
99615
|
+
this._domHeight = height;
|
|
99613
99616
|
this._colorZonesInvalid = true;
|
|
99614
99617
|
return true;
|
|
99615
99618
|
}
|
|
@@ -99748,18 +99751,18 @@ class OverviewRuler extends ViewEventHandler {
|
|
|
99748
99751
|
if (this._zoneManager.getOuterHeight() === 0) {
|
|
99749
99752
|
return false;
|
|
99750
99753
|
}
|
|
99751
|
-
const
|
|
99752
|
-
const
|
|
99754
|
+
const width = this._zoneManager.getCanvasWidth();
|
|
99755
|
+
const height = this._zoneManager.getCanvasHeight();
|
|
99753
99756
|
const colorZones = this._zoneManager.resolveColorZones();
|
|
99754
99757
|
const id2Color = this._zoneManager.getId2Color();
|
|
99755
99758
|
const ctx = this._domNode.domNode.getContext("2d");
|
|
99756
|
-
ctx.clearRect(0, 0,
|
|
99759
|
+
ctx.clearRect(0, 0, width, height);
|
|
99757
99760
|
if (colorZones.length > 0) {
|
|
99758
|
-
this._renderOneLane(ctx, colorZones, id2Color,
|
|
99761
|
+
this._renderOneLane(ctx, colorZones, id2Color, width);
|
|
99759
99762
|
}
|
|
99760
99763
|
return true;
|
|
99761
99764
|
}
|
|
99762
|
-
_renderOneLane(ctx, colorZones, id2Color,
|
|
99765
|
+
_renderOneLane(ctx, colorZones, id2Color, width) {
|
|
99763
99766
|
let currentColorId = 0;
|
|
99764
99767
|
let currentFrom = 0;
|
|
99765
99768
|
let currentTo = 0;
|
|
@@ -99768,7 +99771,7 @@ class OverviewRuler extends ViewEventHandler {
|
|
|
99768
99771
|
const zoneFrom = zone.from;
|
|
99769
99772
|
const zoneTo = zone.to;
|
|
99770
99773
|
if (zoneColorId !== currentColorId) {
|
|
99771
|
-
ctx.fillRect(0, currentFrom,
|
|
99774
|
+
ctx.fillRect(0, currentFrom, width, currentTo - currentFrom);
|
|
99772
99775
|
currentColorId = zoneColorId;
|
|
99773
99776
|
ctx.fillStyle = id2Color[currentColorId];
|
|
99774
99777
|
currentFrom = zoneFrom;
|
|
@@ -99777,13 +99780,13 @@ class OverviewRuler extends ViewEventHandler {
|
|
|
99777
99780
|
if (currentTo >= zoneFrom) {
|
|
99778
99781
|
currentTo = Math.max(currentTo, zoneTo);
|
|
99779
99782
|
} else {
|
|
99780
|
-
ctx.fillRect(0, currentFrom,
|
|
99783
|
+
ctx.fillRect(0, currentFrom, width, currentTo - currentFrom);
|
|
99781
99784
|
currentFrom = zoneFrom;
|
|
99782
99785
|
currentTo = zoneTo;
|
|
99783
99786
|
}
|
|
99784
99787
|
}
|
|
99785
99788
|
}
|
|
99786
|
-
ctx.fillRect(0, currentFrom,
|
|
99789
|
+
ctx.fillRect(0, currentFrom, width, currentTo - currentFrom);
|
|
99787
99790
|
}
|
|
99788
99791
|
}
|
|
99789
99792
|
var rulers = "";
|
|
@@ -100087,8 +100090,8 @@ class SelectionsOverlay extends DynamicViewOverlay {
|
|
|
100087
100090
|
}
|
|
100088
100091
|
return linesVisibleRanges;
|
|
100089
100092
|
}
|
|
100090
|
-
_createSelectionPiece(top,
|
|
100091
|
-
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>';
|
|
100092
100095
|
}
|
|
100093
100096
|
_actualRenderOneSelection(output2, visibleStartLineNumber, hasMultipleSelections, visibleRanges) {
|
|
100094
100097
|
if (visibleRanges.length === 0) {
|
|
@@ -100217,11 +100220,11 @@ function abs(n2) {
|
|
|
100217
100220
|
}
|
|
100218
100221
|
var viewCursors = "";
|
|
100219
100222
|
class ViewCursorRenderData {
|
|
100220
|
-
constructor(top, left,
|
|
100223
|
+
constructor(top, left, width, height, textContent, textContentClassName) {
|
|
100221
100224
|
this.top = top;
|
|
100222
100225
|
this.left = left;
|
|
100223
|
-
this.width =
|
|
100224
|
-
this.height =
|
|
100226
|
+
this.width = width;
|
|
100227
|
+
this.height = height;
|
|
100225
100228
|
this.textContent = textContent;
|
|
100226
100229
|
this.textContentClassName = textContentClassName;
|
|
100227
100230
|
}
|
|
@@ -100286,23 +100289,23 @@ class ViewCursor {
|
|
|
100286
100289
|
if (!visibleRange || visibleRange.outsideRenderedLine) {
|
|
100287
100290
|
return null;
|
|
100288
100291
|
}
|
|
100289
|
-
let
|
|
100292
|
+
let width2;
|
|
100290
100293
|
if (this._cursorStyle === TextEditorCursorStyle$1.Line) {
|
|
100291
|
-
|
|
100292
|
-
if (
|
|
100294
|
+
width2 = computeScreenAwareSize(this._lineCursorWidth > 0 ? this._lineCursorWidth : 2);
|
|
100295
|
+
if (width2 > 2) {
|
|
100293
100296
|
const lineContent2 = this._context.model.getLineContent(this._position.lineNumber);
|
|
100294
100297
|
const nextCharLength$12 = nextCharLength(lineContent2, this._position.column - 1);
|
|
100295
100298
|
textContent = lineContent2.substr(this._position.column - 1, nextCharLength$12);
|
|
100296
100299
|
}
|
|
100297
100300
|
} else {
|
|
100298
|
-
|
|
100301
|
+
width2 = computeScreenAwareSize(1);
|
|
100299
100302
|
}
|
|
100300
100303
|
let left = visibleRange.left;
|
|
100301
|
-
if (
|
|
100304
|
+
if (width2 >= 2 && left >= 1) {
|
|
100302
100305
|
left -= 1;
|
|
100303
100306
|
}
|
|
100304
100307
|
const top2 = ctx.getVerticalOffsetForLineNumber(this._position.lineNumber) - ctx.bigNumbersDelta;
|
|
100305
|
-
return new ViewCursorRenderData(top2, left,
|
|
100308
|
+
return new ViewCursorRenderData(top2, left, width2, this._lineHeight, textContent, "");
|
|
100306
100309
|
}
|
|
100307
100310
|
const lineContent = this._context.model.getLineContent(this._position.lineNumber);
|
|
100308
100311
|
const nextCharLength$1 = nextCharLength(lineContent, this._position.column - 1);
|
|
@@ -100315,7 +100318,7 @@ class ViewCursor {
|
|
|
100315
100318
|
return null;
|
|
100316
100319
|
}
|
|
100317
100320
|
const range3 = firstVisibleRangeForCharacter.ranges[0];
|
|
100318
|
-
const
|
|
100321
|
+
const width = range3.width < 1 ? this._typicalHalfwidthCharacterWidth : range3.width;
|
|
100319
100322
|
let textContentClassName = "";
|
|
100320
100323
|
if (this._cursorStyle === TextEditorCursorStyle$1.Block) {
|
|
100321
100324
|
const lineData = this._context.model.getViewLineData(this._position.lineNumber);
|
|
@@ -100324,12 +100327,12 @@ class ViewCursor {
|
|
|
100324
100327
|
textContentClassName = lineData.tokens.getClassName(tokenIndex);
|
|
100325
100328
|
}
|
|
100326
100329
|
let top = ctx.getVerticalOffsetForLineNumber(this._position.lineNumber) - ctx.bigNumbersDelta;
|
|
100327
|
-
let
|
|
100330
|
+
let height = this._lineHeight;
|
|
100328
100331
|
if (this._cursorStyle === TextEditorCursorStyle$1.Underline || this._cursorStyle === TextEditorCursorStyle$1.UnderlineThin) {
|
|
100329
100332
|
top += this._lineHeight - 2;
|
|
100330
|
-
|
|
100333
|
+
height = 2;
|
|
100331
100334
|
}
|
|
100332
|
-
return new ViewCursorRenderData(top, range3.left,
|
|
100335
|
+
return new ViewCursorRenderData(top, range3.left, width, height, textContent, textContentClassName);
|
|
100333
100336
|
}
|
|
100334
100337
|
prepareRender(ctx) {
|
|
100335
100338
|
this._renderData = this._prepareRender(ctx);
|
|
@@ -100881,10 +100884,10 @@ class ViewZones extends ViewPart {
|
|
|
100881
100884
|
}
|
|
100882
100885
|
return 0;
|
|
100883
100886
|
}
|
|
100884
|
-
_safeCallOnComputedHeight(zone,
|
|
100887
|
+
_safeCallOnComputedHeight(zone, height) {
|
|
100885
100888
|
if (typeof zone.onComputedHeight === "function") {
|
|
100886
100889
|
try {
|
|
100887
|
-
zone.onComputedHeight(
|
|
100890
|
+
zone.onComputedHeight(height);
|
|
100888
100891
|
} catch (e2) {
|
|
100889
100892
|
onUnexpectedError(e2);
|
|
100890
100893
|
}
|
|
@@ -102942,11 +102945,11 @@ class PendingChanges {
|
|
|
102942
102945
|
}
|
|
102943
102946
|
}
|
|
102944
102947
|
class EditorWhitespace {
|
|
102945
|
-
constructor(id2, afterLineNumber, ordinal,
|
|
102948
|
+
constructor(id2, afterLineNumber, ordinal, height, minWidth) {
|
|
102946
102949
|
this.id = id2;
|
|
102947
102950
|
this.afterLineNumber = afterLineNumber;
|
|
102948
102951
|
this.ordinal = ordinal;
|
|
102949
|
-
this.height =
|
|
102952
|
+
this.height = height;
|
|
102950
102953
|
this.minWidth = minWidth;
|
|
102951
102954
|
this.prefixSum = 0;
|
|
102952
102955
|
}
|
|
@@ -103450,7 +103453,7 @@ class LinesLayout {
|
|
|
103450
103453
|
let result = [];
|
|
103451
103454
|
for (let i2 = startIndex; i2 <= endIndex; i2++) {
|
|
103452
103455
|
const top = this.getVerticalOffsetForWhitespaceIndex(i2);
|
|
103453
|
-
const
|
|
103456
|
+
const height = this.getHeightForWhitespaceIndex(i2);
|
|
103454
103457
|
if (top >= verticalOffset2) {
|
|
103455
103458
|
break;
|
|
103456
103459
|
}
|
|
@@ -103458,7 +103461,7 @@ class LinesLayout {
|
|
|
103458
103461
|
id: this.getIdForWhitespaceIndex(i2),
|
|
103459
103462
|
afterLineNumber: this.getAfterLineNumberForWhitespaceIndex(i2),
|
|
103460
103463
|
verticalOffset: top,
|
|
103461
|
-
height
|
|
103464
|
+
height
|
|
103462
103465
|
});
|
|
103463
103466
|
}
|
|
103464
103467
|
return result;
|
|
@@ -103490,29 +103493,29 @@ class LinesLayout {
|
|
|
103490
103493
|
LinesLayout.INSTANCE_COUNT = 0;
|
|
103491
103494
|
const SMOOTH_SCROLLING_TIME = 125;
|
|
103492
103495
|
class EditorScrollDimensions {
|
|
103493
|
-
constructor(
|
|
103494
|
-
|
|
103496
|
+
constructor(width, contentWidth, height, contentHeight) {
|
|
103497
|
+
width = width | 0;
|
|
103495
103498
|
contentWidth = contentWidth | 0;
|
|
103496
|
-
|
|
103499
|
+
height = height | 0;
|
|
103497
103500
|
contentHeight = contentHeight | 0;
|
|
103498
|
-
if (
|
|
103499
|
-
|
|
103501
|
+
if (width < 0) {
|
|
103502
|
+
width = 0;
|
|
103500
103503
|
}
|
|
103501
103504
|
if (contentWidth < 0) {
|
|
103502
103505
|
contentWidth = 0;
|
|
103503
103506
|
}
|
|
103504
|
-
if (
|
|
103505
|
-
|
|
103507
|
+
if (height < 0) {
|
|
103508
|
+
height = 0;
|
|
103506
103509
|
}
|
|
103507
103510
|
if (contentHeight < 0) {
|
|
103508
103511
|
contentHeight = 0;
|
|
103509
103512
|
}
|
|
103510
|
-
this.width =
|
|
103513
|
+
this.width = width;
|
|
103511
103514
|
this.contentWidth = contentWidth;
|
|
103512
|
-
this.scrollWidth = Math.max(
|
|
103513
|
-
this.height =
|
|
103515
|
+
this.scrollWidth = Math.max(width, contentWidth);
|
|
103516
|
+
this.height = height;
|
|
103514
103517
|
this.contentHeight = contentHeight;
|
|
103515
|
-
this.scrollHeight = Math.max(
|
|
103518
|
+
this.scrollHeight = Math.max(height, contentHeight);
|
|
103516
103519
|
}
|
|
103517
103520
|
equals(other) {
|
|
103518
103521
|
return this.width === other.width && this.contentWidth === other.contentWidth && this.height === other.height && this.contentHeight === other.contentHeight;
|
|
@@ -103608,11 +103611,11 @@ class ViewLayout extends Disposable {
|
|
|
103608
103611
|
}
|
|
103609
103612
|
if (e2.hasChanged(130)) {
|
|
103610
103613
|
const layoutInfo = options.get(130);
|
|
103611
|
-
const
|
|
103612
|
-
const
|
|
103614
|
+
const width = layoutInfo.contentWidth;
|
|
103615
|
+
const height = layoutInfo.height;
|
|
103613
103616
|
const scrollDimensions = this._scrollable.getScrollDimensions();
|
|
103614
103617
|
const contentWidth = scrollDimensions.contentWidth;
|
|
103615
|
-
this._scrollable.setScrollDimensions(new EditorScrollDimensions(
|
|
103618
|
+
this._scrollable.setScrollDimensions(new EditorScrollDimensions(width, scrollDimensions.contentWidth, height, this._getContentHeight(width, height, contentWidth)));
|
|
103616
103619
|
} else {
|
|
103617
103620
|
this._updateHeight();
|
|
103618
103621
|
}
|
|
@@ -103629,33 +103632,33 @@ class ViewLayout extends Disposable {
|
|
|
103629
103632
|
onLinesInserted(fromLineNumber, toLineNumber) {
|
|
103630
103633
|
this._linesLayout.onLinesInserted(fromLineNumber, toLineNumber);
|
|
103631
103634
|
}
|
|
103632
|
-
_getHorizontalScrollbarHeight(
|
|
103635
|
+
_getHorizontalScrollbarHeight(width, scrollWidth) {
|
|
103633
103636
|
const options = this._configuration.options;
|
|
103634
103637
|
const scrollbar = options.get(91);
|
|
103635
103638
|
if (scrollbar.horizontal === 2) {
|
|
103636
103639
|
return 0;
|
|
103637
103640
|
}
|
|
103638
|
-
if (
|
|
103641
|
+
if (width >= scrollWidth) {
|
|
103639
103642
|
return 0;
|
|
103640
103643
|
}
|
|
103641
103644
|
return scrollbar.horizontalScrollbarSize;
|
|
103642
103645
|
}
|
|
103643
|
-
_getContentHeight(
|
|
103646
|
+
_getContentHeight(width, height, contentWidth) {
|
|
103644
103647
|
const options = this._configuration.options;
|
|
103645
103648
|
let result = this._linesLayout.getLinesTotalHeight();
|
|
103646
103649
|
if (options.get(93)) {
|
|
103647
|
-
result += Math.max(0,
|
|
103650
|
+
result += Math.max(0, height - options.get(58) - options.get(74).bottom);
|
|
103648
103651
|
} else {
|
|
103649
|
-
result += this._getHorizontalScrollbarHeight(
|
|
103652
|
+
result += this._getHorizontalScrollbarHeight(width, contentWidth);
|
|
103650
103653
|
}
|
|
103651
103654
|
return result;
|
|
103652
103655
|
}
|
|
103653
103656
|
_updateHeight() {
|
|
103654
103657
|
const scrollDimensions = this._scrollable.getScrollDimensions();
|
|
103655
|
-
const
|
|
103656
|
-
const
|
|
103658
|
+
const width = scrollDimensions.width;
|
|
103659
|
+
const height = scrollDimensions.height;
|
|
103657
103660
|
const contentWidth = scrollDimensions.contentWidth;
|
|
103658
|
-
this._scrollable.setScrollDimensions(new EditorScrollDimensions(
|
|
103661
|
+
this._scrollable.setScrollDimensions(new EditorScrollDimensions(width, scrollDimensions.contentWidth, height, this._getContentHeight(width, height, contentWidth)));
|
|
103659
103662
|
}
|
|
103660
103663
|
getCurrentViewport() {
|
|
103661
103664
|
const scrollDimensions = this._scrollable.getScrollDimensions();
|
|
@@ -106599,7 +106602,7 @@ function createLineBreaks(requests, fontInfo, tabSize, firstLineBreakColumn, wra
|
|
|
106599
106602
|
const lineContent = LineInjectedText.applyInjectedText(requests[i2], injectedTextsPerLine[i2]);
|
|
106600
106603
|
let firstNonWhitespaceIndex$1 = 0;
|
|
106601
106604
|
let wrappedTextIndentLength = 0;
|
|
106602
|
-
let
|
|
106605
|
+
let width = overallWidth;
|
|
106603
106606
|
if (wrappingIndent !== 0) {
|
|
106604
106607
|
firstNonWhitespaceIndex$1 = firstNonWhitespaceIndex(lineContent);
|
|
106605
106608
|
if (firstNonWhitespaceIndex$1 === -1) {
|
|
@@ -106614,12 +106617,12 @@ function createLineBreaks(requests, fontInfo, tabSize, firstLineBreakColumn, wra
|
|
|
106614
106617
|
firstNonWhitespaceIndex$1 = 0;
|
|
106615
106618
|
wrappedTextIndentLength = 0;
|
|
106616
106619
|
} else {
|
|
106617
|
-
|
|
106620
|
+
width = overallWidth - indentWidth;
|
|
106618
106621
|
}
|
|
106619
106622
|
}
|
|
106620
106623
|
}
|
|
106621
106624
|
const renderLineContent = lineContent.substr(firstNonWhitespaceIndex$1);
|
|
106622
|
-
const tmp = renderLine(renderLineContent, wrappedTextIndentLength, tabSize,
|
|
106625
|
+
const tmp = renderLine(renderLineContent, wrappedTextIndentLength, tabSize, width, sb2, additionalIndentLength);
|
|
106623
106626
|
firstNonWhitespaceIndices[i2] = firstNonWhitespaceIndex$1;
|
|
106624
106627
|
wrappedTextIndentLengths[i2] = wrappedTextIndentLength;
|
|
106625
106628
|
renderLineContents[i2] = renderLineContent;
|
|
@@ -106670,7 +106673,7 @@ function createLineBreaks(requests, fontInfo, tabSize, firstLineBreakColumn, wra
|
|
|
106670
106673
|
document.body.removeChild(containerDomNode);
|
|
106671
106674
|
return result;
|
|
106672
106675
|
}
|
|
106673
|
-
function renderLine(lineContent, initialVisibleColumn, tabSize,
|
|
106676
|
+
function renderLine(lineContent, initialVisibleColumn, tabSize, width, sb2, wrappingIndentLength) {
|
|
106674
106677
|
if (wrappingIndentLength !== 0) {
|
|
106675
106678
|
let hangingOffset = String(wrappingIndentLength);
|
|
106676
106679
|
sb2.appendASCIIString('<div style="text-indent: -');
|
|
@@ -106681,7 +106684,7 @@ function renderLine(lineContent, initialVisibleColumn, tabSize, width2, sb2, wra
|
|
|
106681
106684
|
} else {
|
|
106682
106685
|
sb2.appendASCIIString('<div style="width:');
|
|
106683
106686
|
}
|
|
106684
|
-
sb2.appendASCIIString(String(
|
|
106687
|
+
sb2.appendASCIIString(String(width));
|
|
106685
106688
|
sb2.appendASCIIString('px;">');
|
|
106686
106689
|
const len = lineContent.length;
|
|
106687
106690
|
let visibleColumn = initialVisibleColumn;
|
|
@@ -109835,16 +109838,16 @@ let DiffReview = class DiffReview2 extends Disposable {
|
|
|
109835
109838
|
isVisible() {
|
|
109836
109839
|
return this._isVisible;
|
|
109837
109840
|
}
|
|
109838
|
-
layout(top,
|
|
109839
|
-
this._width =
|
|
109841
|
+
layout(top, width, height) {
|
|
109842
|
+
this._width = width;
|
|
109840
109843
|
this.shadow.setTop(top - 6);
|
|
109841
|
-
this.shadow.setWidth(
|
|
109844
|
+
this.shadow.setWidth(width);
|
|
109842
109845
|
this.shadow.setHeight(this._isVisible ? 6 : 0);
|
|
109843
109846
|
this.domNode.setTop(top);
|
|
109844
|
-
this.domNode.setWidth(
|
|
109845
|
-
this.domNode.setHeight(
|
|
109846
|
-
this._content.setHeight(
|
|
109847
|
-
this._content.setWidth(
|
|
109847
|
+
this.domNode.setWidth(width);
|
|
109848
|
+
this.domNode.setHeight(height);
|
|
109849
|
+
this._content.setHeight(height);
|
|
109850
|
+
this._content.setWidth(width);
|
|
109848
109851
|
if (this._isVisible) {
|
|
109849
109852
|
this.actionBarContainer.setAttribute("aria-hidden", "false");
|
|
109850
109853
|
this.actionBarContainer.setDisplay("block");
|
|
@@ -110075,7 +110078,7 @@ let DiffReview = class DiffReview2 extends Disposable {
|
|
|
110075
110078
|
this._content.domNode.appendChild(container);
|
|
110076
110079
|
this.scrollbar.scanDomNode();
|
|
110077
110080
|
}
|
|
110078
|
-
static _renderSection(dest, diffEntry, modLine, lineHeight,
|
|
110081
|
+
static _renderSection(dest, diffEntry, modLine, lineHeight, width, originalOptions, originalModel, originalModelOpts, modifiedOptions, modifiedModel, modifiedModelOpts, languageIdCodec) {
|
|
110079
110082
|
const type = diffEntry.getType();
|
|
110080
110083
|
let rowClassName = "diff-review-row";
|
|
110081
110084
|
let lineNumbersExtraClassName = "";
|
|
@@ -110106,7 +110109,7 @@ let DiffReview = class DiffReview2 extends Disposable {
|
|
|
110106
110109
|
const originalLine = originalLineStart === 0 ? 0 : originalLineStart + i2;
|
|
110107
110110
|
const modifiedLine = modifiedLineStart === 0 ? 0 : modifiedLineStart + i2;
|
|
110108
110111
|
const row = document.createElement("div");
|
|
110109
|
-
row.style.minWidth =
|
|
110112
|
+
row.style.minWidth = width + "px";
|
|
110110
110113
|
row.className = rowClassName;
|
|
110111
110114
|
row.setAttribute("role", "listitem");
|
|
110112
110115
|
if (modifiedLine !== 0) {
|
|
@@ -110384,10 +110387,10 @@ class InlineDiffMargin extends Disposable {
|
|
|
110384
110387
|
});
|
|
110385
110388
|
};
|
|
110386
110389
|
this._register(addStandardDisposableListener(this._diffActions, "mousedown", (e2) => {
|
|
110387
|
-
const { top, height
|
|
110390
|
+
const { top, height } = getDomNodePagePosition(this._diffActions);
|
|
110388
110391
|
let pad = Math.floor(lineHeight / 3);
|
|
110389
110392
|
e2.preventDefault();
|
|
110390
|
-
showContextMenu(e2.posx, top +
|
|
110393
|
+
showContextMenu(e2.posx, top + height + pad);
|
|
110391
110394
|
}));
|
|
110392
110395
|
this._register(editor2.onMouseMove((e2) => {
|
|
110393
110396
|
if (e2.target.type === 8 || e2.target.type === 5) {
|
|
@@ -110752,11 +110755,11 @@ let DiffEditorWidget = class DiffEditorWidget2 extends Disposable {
|
|
|
110752
110755
|
this._register(editor2.onDidFocusEditorWidget(() => isInDiffLeftEditorKey.set(true)));
|
|
110753
110756
|
this._register(editor2.onDidBlurEditorWidget(() => isInDiffLeftEditorKey.set(false)));
|
|
110754
110757
|
this._register(editor2.onDidContentSizeChange((e2) => {
|
|
110755
|
-
const
|
|
110756
|
-
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());
|
|
110757
110760
|
this._onDidContentSizeChange.fire({
|
|
110758
|
-
contentHeight:
|
|
110759
|
-
contentWidth:
|
|
110761
|
+
contentHeight: height,
|
|
110762
|
+
contentWidth: width,
|
|
110760
110763
|
contentHeightChanged: e2.contentHeightChanged,
|
|
110761
110764
|
contentWidthChanged: e2.contentWidthChanged
|
|
110762
110765
|
});
|
|
@@ -110813,11 +110816,11 @@ let DiffEditorWidget = class DiffEditorWidget2 extends Disposable {
|
|
|
110813
110816
|
this._register(editor2.onDidFocusEditorWidget(() => isInDiffRightEditorKey.set(true)));
|
|
110814
110817
|
this._register(editor2.onDidBlurEditorWidget(() => isInDiffRightEditorKey.set(false)));
|
|
110815
110818
|
this._register(editor2.onDidContentSizeChange((e2) => {
|
|
110816
|
-
const
|
|
110817
|
-
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());
|
|
110818
110821
|
this._onDidContentSizeChange.fire({
|
|
110819
|
-
contentHeight:
|
|
110820
|
-
contentWidth:
|
|
110822
|
+
contentHeight: height,
|
|
110823
|
+
contentWidth: width,
|
|
110821
110824
|
contentHeightChanged: e2.contentHeightChanged,
|
|
110822
110825
|
contentWidthChanged: e2.contentWidthChanged
|
|
110823
110826
|
});
|
|
@@ -111058,7 +111061,7 @@ let DiffEditorWidget = class DiffEditorWidget2 extends Disposable {
|
|
|
111058
111061
|
if (!this._originalOverviewRuler || !this._modifiedOverviewRuler) {
|
|
111059
111062
|
return;
|
|
111060
111063
|
}
|
|
111061
|
-
const
|
|
111064
|
+
const height = this._elementSizeObserver.getHeight();
|
|
111062
111065
|
const reviewHeight = this._getReviewHeight();
|
|
111063
111066
|
const freeSpace = DiffEditorWidget2.ENTIRE_DIFF_OVERVIEW_WIDTH - 2 * DiffEditorWidget2.ONE_OVERVIEW_WIDTH;
|
|
111064
111067
|
const layoutInfo = this._modifiedEditor.getLayoutInfo();
|
|
@@ -111067,13 +111070,13 @@ let DiffEditorWidget = class DiffEditorWidget2 extends Disposable {
|
|
|
111067
111070
|
top: 0,
|
|
111068
111071
|
width: DiffEditorWidget2.ONE_OVERVIEW_WIDTH,
|
|
111069
111072
|
right: freeSpace + DiffEditorWidget2.ONE_OVERVIEW_WIDTH,
|
|
111070
|
-
height:
|
|
111073
|
+
height: height - reviewHeight
|
|
111071
111074
|
});
|
|
111072
111075
|
this._modifiedOverviewRuler.setLayout({
|
|
111073
111076
|
top: 0,
|
|
111074
111077
|
right: 0,
|
|
111075
111078
|
width: DiffEditorWidget2.ONE_OVERVIEW_WIDTH,
|
|
111076
|
-
height:
|
|
111079
|
+
height: height - reviewHeight
|
|
111077
111080
|
});
|
|
111078
111081
|
}
|
|
111079
111082
|
}
|
|
@@ -111206,26 +111209,26 @@ let DiffEditorWidget = class DiffEditorWidget2 extends Disposable {
|
|
|
111206
111209
|
this._doLayout();
|
|
111207
111210
|
}
|
|
111208
111211
|
_doLayout() {
|
|
111209
|
-
const
|
|
111210
|
-
const
|
|
111212
|
+
const width = this._elementSizeObserver.getWidth();
|
|
111213
|
+
const height = this._elementSizeObserver.getHeight();
|
|
111211
111214
|
const reviewHeight = this._getReviewHeight();
|
|
111212
111215
|
const splitPoint = this._strategy.layout();
|
|
111213
111216
|
this._originalDomNode.style.width = splitPoint + "px";
|
|
111214
111217
|
this._originalDomNode.style.left = "0px";
|
|
111215
|
-
this._modifiedDomNode.style.width =
|
|
111218
|
+
this._modifiedDomNode.style.width = width - splitPoint + "px";
|
|
111216
111219
|
this._modifiedDomNode.style.left = splitPoint + "px";
|
|
111217
111220
|
this._overviewDomElement.style.top = "0px";
|
|
111218
|
-
this._overviewDomElement.style.height =
|
|
111221
|
+
this._overviewDomElement.style.height = height - reviewHeight + "px";
|
|
111219
111222
|
this._overviewDomElement.style.width = DiffEditorWidget2.ENTIRE_DIFF_OVERVIEW_WIDTH + "px";
|
|
111220
|
-
this._overviewDomElement.style.left =
|
|
111223
|
+
this._overviewDomElement.style.left = width - DiffEditorWidget2.ENTIRE_DIFF_OVERVIEW_WIDTH + "px";
|
|
111221
111224
|
this._overviewViewportDomElement.setWidth(DiffEditorWidget2.ENTIRE_DIFF_OVERVIEW_WIDTH);
|
|
111222
111225
|
this._overviewViewportDomElement.setHeight(30);
|
|
111223
|
-
this._originalEditor.layout({ width: splitPoint, height:
|
|
111224
|
-
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 });
|
|
111225
111228
|
if (this._originalOverviewRuler || this._modifiedOverviewRuler) {
|
|
111226
111229
|
this._layoutOverviewRulers();
|
|
111227
111230
|
}
|
|
111228
|
-
this._reviewPane.layout(
|
|
111231
|
+
this._reviewPane.layout(height - reviewHeight, width, reviewHeight);
|
|
111229
111232
|
this._layoutOverviewViewport();
|
|
111230
111233
|
}
|
|
111231
111234
|
_layoutOverviewViewport() {
|
|
@@ -118551,9 +118554,9 @@ class ListView {
|
|
|
118551
118554
|
indexAfter(position2) {
|
|
118552
118555
|
return this.rangeMap.indexAfter(position2);
|
|
118553
118556
|
}
|
|
118554
|
-
layout(
|
|
118557
|
+
layout(height, width) {
|
|
118555
118558
|
let scrollDimensions = {
|
|
118556
|
-
height: typeof
|
|
118559
|
+
height: typeof height === "number" ? height : getContentHeight(this.domNode)
|
|
118557
118560
|
};
|
|
118558
118561
|
if (this.scrollableElementUpdateDisposable) {
|
|
118559
118562
|
this.scrollableElementUpdateDisposable.dispose();
|
|
@@ -118561,15 +118564,15 @@ class ListView {
|
|
|
118561
118564
|
scrollDimensions.scrollHeight = this.scrollHeight;
|
|
118562
118565
|
}
|
|
118563
118566
|
this.scrollableElement.setScrollDimensions(scrollDimensions);
|
|
118564
|
-
if (typeof
|
|
118565
|
-
this.renderWidth =
|
|
118567
|
+
if (typeof width !== "undefined") {
|
|
118568
|
+
this.renderWidth = width;
|
|
118566
118569
|
if (this.supportDynamicHeights) {
|
|
118567
118570
|
this._rerender(this.scrollTop, this.renderHeight);
|
|
118568
118571
|
}
|
|
118569
118572
|
}
|
|
118570
118573
|
if (this.horizontalScrolling) {
|
|
118571
118574
|
this.scrollableElement.setScrollDimensions({
|
|
118572
|
-
width: typeof
|
|
118575
|
+
width: typeof width === "number" ? width : getContentWidth(this.domNode)
|
|
118573
118576
|
});
|
|
118574
118577
|
}
|
|
118575
118578
|
}
|
|
@@ -119918,17 +119921,17 @@ class PipelineRenderer {
|
|
|
119918
119921
|
renderTemplate(container) {
|
|
119919
119922
|
return this.renderers.map((r2) => r2.renderTemplate(container));
|
|
119920
119923
|
}
|
|
119921
|
-
renderElement(element, index2, templateData,
|
|
119924
|
+
renderElement(element, index2, templateData, height) {
|
|
119922
119925
|
let i2 = 0;
|
|
119923
119926
|
for (const renderer of this.renderers) {
|
|
119924
|
-
renderer.renderElement(element, index2, templateData[i2++],
|
|
119927
|
+
renderer.renderElement(element, index2, templateData[i2++], height);
|
|
119925
119928
|
}
|
|
119926
119929
|
}
|
|
119927
|
-
disposeElement(element, index2, templateData,
|
|
119930
|
+
disposeElement(element, index2, templateData, height) {
|
|
119928
119931
|
let i2 = 0;
|
|
119929
119932
|
for (const renderer of this.renderers) {
|
|
119930
119933
|
if (renderer.disposeElement) {
|
|
119931
|
-
renderer.disposeElement(element, index2, templateData[i2],
|
|
119934
|
+
renderer.disposeElement(element, index2, templateData[i2], height);
|
|
119932
119935
|
}
|
|
119933
119936
|
i2 += 1;
|
|
119934
119937
|
}
|
|
@@ -120182,8 +120185,8 @@ class List {
|
|
|
120182
120185
|
domFocus() {
|
|
120183
120186
|
this.view.domNode.focus({ preventScroll: true });
|
|
120184
120187
|
}
|
|
120185
|
-
layout(
|
|
120186
|
-
this.view.layout(
|
|
120188
|
+
layout(height, width) {
|
|
120189
|
+
this.view.layout(height, width);
|
|
120187
120190
|
}
|
|
120188
120191
|
setSelection(indexes, browserEvent) {
|
|
120189
120192
|
for (const index2 of indexes) {
|
|
@@ -120451,7 +120454,7 @@ class PagedRenderer {
|
|
|
120451
120454
|
const data = this.renderer.renderTemplate(container);
|
|
120452
120455
|
return { data, disposable: Disposable.None };
|
|
120453
120456
|
}
|
|
120454
|
-
renderElement(index2, _2, data,
|
|
120457
|
+
renderElement(index2, _2, data, height) {
|
|
120455
120458
|
if (data.disposable) {
|
|
120456
120459
|
data.disposable.dispose();
|
|
120457
120460
|
}
|
|
@@ -120460,13 +120463,13 @@ class PagedRenderer {
|
|
|
120460
120463
|
}
|
|
120461
120464
|
const model = this.modelProvider();
|
|
120462
120465
|
if (model.isResolved(index2)) {
|
|
120463
|
-
return this.renderer.renderElement(model.get(index2), index2, data.data,
|
|
120466
|
+
return this.renderer.renderElement(model.get(index2), index2, data.data, height);
|
|
120464
120467
|
}
|
|
120465
120468
|
const cts = new CancellationTokenSource$1();
|
|
120466
120469
|
const promise = model.resolve(index2, cts.token);
|
|
120467
120470
|
data.disposable = { dispose: () => cts.cancel() };
|
|
120468
120471
|
this.renderer.renderPlaceholder(index2, data.data);
|
|
120469
|
-
promise.then((entry) => this.renderer.renderElement(entry, index2, data.data,
|
|
120472
|
+
promise.then((entry) => this.renderer.renderElement(entry, index2, data.data, height));
|
|
120470
120473
|
}
|
|
120471
120474
|
disposeTemplate(data) {
|
|
120472
120475
|
if (data.disposable) {
|
|
@@ -121211,21 +121214,21 @@ class TableListRenderer {
|
|
|
121211
121214
|
this.renderedTemplates.add(result);
|
|
121212
121215
|
return result;
|
|
121213
121216
|
}
|
|
121214
|
-
renderElement(element, index2, templateData,
|
|
121217
|
+
renderElement(element, index2, templateData, height) {
|
|
121215
121218
|
for (let i2 = 0; i2 < this.columns.length; i2++) {
|
|
121216
121219
|
const column2 = this.columns[i2];
|
|
121217
121220
|
const cell = column2.project(element);
|
|
121218
121221
|
const renderer = this.renderers[i2];
|
|
121219
|
-
renderer.renderElement(cell, index2, templateData.cellTemplateData[i2],
|
|
121222
|
+
renderer.renderElement(cell, index2, templateData.cellTemplateData[i2], height);
|
|
121220
121223
|
}
|
|
121221
121224
|
}
|
|
121222
|
-
disposeElement(element, index2, templateData,
|
|
121225
|
+
disposeElement(element, index2, templateData, height) {
|
|
121223
121226
|
for (let i2 = 0; i2 < this.columns.length; i2++) {
|
|
121224
121227
|
const renderer = this.renderers[i2];
|
|
121225
121228
|
if (renderer.disposeElement) {
|
|
121226
121229
|
const column2 = this.columns[i2];
|
|
121227
121230
|
const cell = column2.project(element);
|
|
121228
|
-
renderer.disposeElement(cell, index2, templateData.cellTemplateData[i2],
|
|
121231
|
+
renderer.disposeElement(cell, index2, templateData.cellTemplateData[i2], height);
|
|
121229
121232
|
}
|
|
121230
121233
|
}
|
|
121231
121234
|
}
|
|
@@ -122038,9 +122041,9 @@ class ComposedTreeDelegate {
|
|
|
122038
122041
|
hasDynamicHeight(element) {
|
|
122039
122042
|
return !!this.delegate.hasDynamicHeight && this.delegate.hasDynamicHeight(element.element);
|
|
122040
122043
|
}
|
|
122041
|
-
setDynamicHeight(element,
|
|
122044
|
+
setDynamicHeight(element, height) {
|
|
122042
122045
|
if (this.delegate.setDynamicHeight) {
|
|
122043
|
-
this.delegate.setDynamicHeight(element.element,
|
|
122046
|
+
this.delegate.setDynamicHeight(element.element, height);
|
|
122044
122047
|
}
|
|
122045
122048
|
}
|
|
122046
122049
|
}
|
|
@@ -122109,26 +122112,26 @@ class TreeRenderer {
|
|
|
122109
122112
|
const templateData = this.renderer.renderTemplate(contents);
|
|
122110
122113
|
return { container, indent, twistie, indentGuidesDisposable: Disposable.None, templateData };
|
|
122111
122114
|
}
|
|
122112
|
-
renderElement(node2, index2, templateData,
|
|
122113
|
-
if (typeof
|
|
122114
|
-
this.renderedNodes.set(node2, { templateData, height
|
|
122115
|
+
renderElement(node2, index2, templateData, height) {
|
|
122116
|
+
if (typeof height === "number") {
|
|
122117
|
+
this.renderedNodes.set(node2, { templateData, height });
|
|
122115
122118
|
this.renderedElements.set(node2.element, node2);
|
|
122116
122119
|
}
|
|
122117
122120
|
const indent = TreeRenderer.DefaultIndent + (node2.depth - 1) * this.indent;
|
|
122118
122121
|
templateData.twistie.style.paddingLeft = `${indent}px`;
|
|
122119
122122
|
templateData.indent.style.width = `${indent + this.indent - 16}px`;
|
|
122120
122123
|
this.renderTwistie(node2, templateData);
|
|
122121
|
-
if (typeof
|
|
122124
|
+
if (typeof height === "number") {
|
|
122122
122125
|
this.renderIndentGuides(node2, templateData);
|
|
122123
122126
|
}
|
|
122124
|
-
this.renderer.renderElement(node2, index2, templateData.templateData,
|
|
122127
|
+
this.renderer.renderElement(node2, index2, templateData.templateData, height);
|
|
122125
122128
|
}
|
|
122126
|
-
disposeElement(node2, index2, templateData,
|
|
122129
|
+
disposeElement(node2, index2, templateData, height) {
|
|
122127
122130
|
templateData.indentGuidesDisposable.dispose();
|
|
122128
122131
|
if (this.renderer.disposeElement) {
|
|
122129
|
-
this.renderer.disposeElement(node2, index2, templateData.templateData,
|
|
122132
|
+
this.renderer.disposeElement(node2, index2, templateData.templateData, height);
|
|
122130
122133
|
}
|
|
122131
|
-
if (typeof
|
|
122134
|
+
if (typeof height === "number") {
|
|
122132
122135
|
this.renderedNodes.delete(node2);
|
|
122133
122136
|
this.renderedElements.delete(node2.element);
|
|
122134
122137
|
}
|
|
@@ -122450,7 +122453,7 @@ class TypeFilterController {
|
|
|
122450
122453
|
const { left } = getDomNodePagePosition(container);
|
|
122451
122454
|
const containerWidth = container.clientWidth;
|
|
122452
122455
|
const midContainerWidth = containerWidth / 2;
|
|
122453
|
-
const
|
|
122456
|
+
const width = this.domNode.clientWidth;
|
|
122454
122457
|
const disposables2 = new DisposableStore();
|
|
122455
122458
|
let positionClassName = this.positionClassName;
|
|
122456
122459
|
const updatePosition = () => {
|
|
@@ -122461,7 +122464,7 @@ class TypeFilterController {
|
|
|
122461
122464
|
break;
|
|
122462
122465
|
case "ne":
|
|
122463
122466
|
this.domNode.style.top = `4px`;
|
|
122464
|
-
this.domNode.style.left = `${containerWidth -
|
|
122467
|
+
this.domNode.style.left = `${containerWidth - width - 6}px`;
|
|
122465
122468
|
break;
|
|
122466
122469
|
}
|
|
122467
122470
|
};
|
|
@@ -122886,8 +122889,8 @@ class AbstractTree {
|
|
|
122886
122889
|
domFocus() {
|
|
122887
122890
|
this.view.domFocus();
|
|
122888
122891
|
}
|
|
122889
|
-
layout(
|
|
122890
|
-
this.view.layout(
|
|
122892
|
+
layout(height, width) {
|
|
122893
|
+
this.view.layout(height, width);
|
|
122891
122894
|
}
|
|
122892
122895
|
style(styles2) {
|
|
122893
122896
|
const suffix = `.${this.view.domId}`;
|
|
@@ -123439,8 +123442,8 @@ function mapList(nodeMapper, list2) {
|
|
|
123439
123442
|
splice(start, deleteCount, toInsert) {
|
|
123440
123443
|
list2.splice(start, deleteCount, toInsert.map((node2) => nodeMapper.map(node2)));
|
|
123441
123444
|
},
|
|
123442
|
-
updateElementHeight(index2,
|
|
123443
|
-
list2.updateElementHeight(index2,
|
|
123445
|
+
updateElementHeight(index2, height) {
|
|
123446
|
+
list2.updateElementHeight(index2, height);
|
|
123444
123447
|
}
|
|
123445
123448
|
};
|
|
123446
123449
|
}
|
|
@@ -123588,24 +123591,24 @@ class CompressibleRenderer {
|
|
|
123588
123591
|
const data = this.renderer.renderTemplate(container);
|
|
123589
123592
|
return { compressedTreeNode: void 0, data };
|
|
123590
123593
|
}
|
|
123591
|
-
renderElement(node2, index2, templateData,
|
|
123594
|
+
renderElement(node2, index2, templateData, height) {
|
|
123592
123595
|
const compressedTreeNode = this.compressedTreeNodeProvider.getCompressedTreeNode(node2.element);
|
|
123593
123596
|
if (compressedTreeNode.element.elements.length === 1) {
|
|
123594
123597
|
templateData.compressedTreeNode = void 0;
|
|
123595
|
-
this.renderer.renderElement(node2, index2, templateData.data,
|
|
123598
|
+
this.renderer.renderElement(node2, index2, templateData.data, height);
|
|
123596
123599
|
} else {
|
|
123597
123600
|
templateData.compressedTreeNode = compressedTreeNode;
|
|
123598
|
-
this.renderer.renderCompressedElements(compressedTreeNode, index2, templateData.data,
|
|
123601
|
+
this.renderer.renderCompressedElements(compressedTreeNode, index2, templateData.data, height);
|
|
123599
123602
|
}
|
|
123600
123603
|
}
|
|
123601
|
-
disposeElement(node2, index2, templateData,
|
|
123604
|
+
disposeElement(node2, index2, templateData, height) {
|
|
123602
123605
|
if (templateData.compressedTreeNode) {
|
|
123603
123606
|
if (this.renderer.disposeCompressedElements) {
|
|
123604
|
-
this.renderer.disposeCompressedElements(templateData.compressedTreeNode, index2, templateData.data,
|
|
123607
|
+
this.renderer.disposeCompressedElements(templateData.compressedTreeNode, index2, templateData.data, height);
|
|
123605
123608
|
}
|
|
123606
123609
|
} else {
|
|
123607
123610
|
if (this.renderer.disposeElement) {
|
|
123608
|
-
this.renderer.disposeElement(node2, index2, templateData.data,
|
|
123611
|
+
this.renderer.disposeElement(node2, index2, templateData.data, height);
|
|
123609
123612
|
}
|
|
123610
123613
|
}
|
|
123611
123614
|
}
|
|
@@ -123747,8 +123750,8 @@ class AsyncDataTreeRenderer {
|
|
|
123747
123750
|
const templateData = this.renderer.renderTemplate(container);
|
|
123748
123751
|
return { templateData };
|
|
123749
123752
|
}
|
|
123750
|
-
renderElement(node2, index2, templateData,
|
|
123751
|
-
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);
|
|
123752
123755
|
}
|
|
123753
123756
|
renderTwistie(element, twistieElement) {
|
|
123754
123757
|
if (element.slow) {
|
|
@@ -123759,9 +123762,9 @@ class AsyncDataTreeRenderer {
|
|
|
123759
123762
|
return false;
|
|
123760
123763
|
}
|
|
123761
123764
|
}
|
|
123762
|
-
disposeElement(node2, index2, templateData,
|
|
123765
|
+
disposeElement(node2, index2, templateData, height) {
|
|
123763
123766
|
if (this.renderer.disposeElement) {
|
|
123764
|
-
this.renderer.disposeElement(this.nodeMapper.map(node2), index2, templateData.templateData,
|
|
123767
|
+
this.renderer.disposeElement(this.nodeMapper.map(node2), index2, templateData.templateData, height);
|
|
123765
123768
|
}
|
|
123766
123769
|
}
|
|
123767
123770
|
disposeTemplate(templateData) {
|
|
@@ -123945,8 +123948,8 @@ class AsyncDataTree {
|
|
|
123945
123948
|
domFocus() {
|
|
123946
123949
|
this.tree.domFocus();
|
|
123947
123950
|
}
|
|
123948
|
-
layout(
|
|
123949
|
-
this.tree.layout(
|
|
123951
|
+
layout(height, width) {
|
|
123952
|
+
this.tree.layout(height, width);
|
|
123950
123953
|
}
|
|
123951
123954
|
style(styles2) {
|
|
123952
123955
|
this.tree.style(styles2);
|
|
@@ -124336,11 +124339,11 @@ class CompressibleAsyncDataTreeRenderer {
|
|
|
124336
124339
|
const templateData = this.renderer.renderTemplate(container);
|
|
124337
124340
|
return { templateData };
|
|
124338
124341
|
}
|
|
124339
|
-
renderElement(node2, index2, templateData,
|
|
124340
|
-
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);
|
|
124341
124344
|
}
|
|
124342
|
-
renderCompressedElements(node2, index2, templateData,
|
|
124343
|
-
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);
|
|
124344
124347
|
}
|
|
124345
124348
|
renderTwistie(element, twistieElement) {
|
|
124346
124349
|
if (element.slow) {
|
|
@@ -124351,14 +124354,14 @@ class CompressibleAsyncDataTreeRenderer {
|
|
|
124351
124354
|
return false;
|
|
124352
124355
|
}
|
|
124353
124356
|
}
|
|
124354
|
-
disposeElement(node2, index2, templateData,
|
|
124357
|
+
disposeElement(node2, index2, templateData, height) {
|
|
124355
124358
|
if (this.renderer.disposeElement) {
|
|
124356
|
-
this.renderer.disposeElement(this.nodeMapper.map(node2), index2, templateData.templateData,
|
|
124359
|
+
this.renderer.disposeElement(this.nodeMapper.map(node2), index2, templateData.templateData, height);
|
|
124357
124360
|
}
|
|
124358
124361
|
}
|
|
124359
|
-
disposeCompressedElements(node2, index2, templateData,
|
|
124362
|
+
disposeCompressedElements(node2, index2, templateData, height) {
|
|
124360
124363
|
if (this.renderer.disposeCompressedElements) {
|
|
124361
|
-
this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(node2), index2, templateData.templateData,
|
|
124364
|
+
this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(node2), index2, templateData.templateData, height);
|
|
124362
124365
|
}
|
|
124363
124366
|
}
|
|
124364
124367
|
disposeTemplate(templateData) {
|
|
@@ -128228,7 +128231,7 @@ class InputBox extends Widget {
|
|
|
128228
128231
|
get width() {
|
|
128229
128232
|
return getTotalWidth(this.input);
|
|
128230
128233
|
}
|
|
128231
|
-
set width(
|
|
128234
|
+
set width(width) {
|
|
128232
128235
|
if (this.options.flexibleHeight && this.options.flexibleWidth) {
|
|
128233
128236
|
let horizontalPadding = 0;
|
|
128234
128237
|
if (this.mirror) {
|
|
@@ -128236,12 +128239,12 @@ class InputBox extends Widget {
|
|
|
128236
128239
|
const paddingRight = parseFloat(this.mirror.style.paddingRight || "") || 0;
|
|
128237
128240
|
horizontalPadding = paddingLeft + paddingRight;
|
|
128238
128241
|
}
|
|
128239
|
-
this.input.style.width =
|
|
128242
|
+
this.input.style.width = width - horizontalPadding + "px";
|
|
128240
128243
|
} else {
|
|
128241
|
-
this.input.style.width =
|
|
128244
|
+
this.input.style.width = width + "px";
|
|
128242
128245
|
}
|
|
128243
128246
|
if (this.mirror) {
|
|
128244
|
-
this.mirror.style.width =
|
|
128247
|
+
this.mirror.style.width = width + "px";
|
|
128245
128248
|
}
|
|
128246
128249
|
}
|
|
128247
128250
|
set paddingRight(paddingRight) {
|
|
@@ -128255,9 +128258,9 @@ class InputBox extends Widget {
|
|
|
128255
128258
|
return;
|
|
128256
128259
|
}
|
|
128257
128260
|
const scrollHeight = this.cachedContentHeight;
|
|
128258
|
-
const
|
|
128261
|
+
const height = this.cachedHeight;
|
|
128259
128262
|
const scrollTop2 = this.input.scrollTop;
|
|
128260
|
-
this.scrollableElement.setScrollDimensions({ scrollHeight, height
|
|
128263
|
+
this.scrollableElement.setScrollDimensions({ scrollHeight, height });
|
|
128261
128264
|
this.scrollableElement.setScrollPosition({ scrollTop: scrollTop2 });
|
|
128262
128265
|
}
|
|
128263
128266
|
showMessage(message, force) {
|
|
@@ -128778,15 +128781,15 @@ function parseHrefAndDimensions(href) {
|
|
|
128778
128781
|
if (parameters) {
|
|
128779
128782
|
const heightFromParams = /height=(\d+)/.exec(parameters);
|
|
128780
128783
|
const widthFromParams = /width=(\d+)/.exec(parameters);
|
|
128781
|
-
const
|
|
128782
|
-
const
|
|
128783
|
-
const widthIsFinite = isFinite(parseInt(
|
|
128784
|
-
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));
|
|
128785
128788
|
if (widthIsFinite) {
|
|
128786
|
-
dimensions.push(`width="${
|
|
128789
|
+
dimensions.push(`width="${width}"`);
|
|
128787
128790
|
}
|
|
128788
128791
|
if (heightIsFinite) {
|
|
128789
|
-
dimensions.push(`height="${
|
|
128792
|
+
dimensions.push(`height="${height}"`);
|
|
128790
128793
|
}
|
|
128791
128794
|
}
|
|
128792
128795
|
return { href, dimensions };
|
|
@@ -131099,9 +131102,9 @@ class QuickInputController extends Disposable {
|
|
|
131099
131102
|
if (this.ui) {
|
|
131100
131103
|
this.ui.container.style.top = `${this.titleBarOffset}px`;
|
|
131101
131104
|
const style = this.ui.container.style;
|
|
131102
|
-
const
|
|
131103
|
-
style.width =
|
|
131104
|
-
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";
|
|
131105
131108
|
this.ui.inputBox.layout();
|
|
131106
131109
|
this.ui.list.layout(this.dimension && this.dimension.height * 0.4);
|
|
131107
131110
|
}
|
|
@@ -136752,7 +136755,7 @@ let LightBulbWidget = class LightBulbWidget2 extends Disposable {
|
|
|
136752
136755
|
}
|
|
136753
136756
|
this._editor.focus();
|
|
136754
136757
|
e2.preventDefault();
|
|
136755
|
-
const { top, height
|
|
136758
|
+
const { top, height } = getDomNodePagePosition(this._domNode);
|
|
136756
136759
|
const lineHeight = this._editor.getOption(58);
|
|
136757
136760
|
let pad = Math.floor(lineHeight / 3);
|
|
136758
136761
|
if (this.state.widgetPosition.position !== null && this.state.widgetPosition.position.lineNumber < this.state.editorPosition.lineNumber) {
|
|
@@ -136760,7 +136763,7 @@ let LightBulbWidget = class LightBulbWidget2 extends Disposable {
|
|
|
136760
136763
|
}
|
|
136761
136764
|
this._onClick.fire({
|
|
136762
136765
|
x: e2.posx,
|
|
136763
|
-
y: top +
|
|
136766
|
+
y: top + height + pad,
|
|
136764
136767
|
actions: this.state.actions,
|
|
136765
136768
|
trigger: this.state.trigger
|
|
136766
136769
|
});
|
|
@@ -137824,11 +137827,11 @@ class CodeLensViewZone {
|
|
|
137824
137827
|
this.suppressMouseDown = true;
|
|
137825
137828
|
this.domNode = document.createElement("div");
|
|
137826
137829
|
}
|
|
137827
|
-
onComputedHeight(
|
|
137830
|
+
onComputedHeight(height) {
|
|
137828
137831
|
if (this._lastHeight === void 0) {
|
|
137829
|
-
this._lastHeight =
|
|
137830
|
-
} else if (this._lastHeight !==
|
|
137831
|
-
this._lastHeight =
|
|
137832
|
+
this._lastHeight = height;
|
|
137833
|
+
} else if (this._lastHeight !== height) {
|
|
137834
|
+
this._lastHeight = height;
|
|
137832
137835
|
this._onHeight();
|
|
137833
137836
|
}
|
|
137834
137837
|
}
|
|
@@ -137993,8 +137996,8 @@ class CodeLensWidget {
|
|
|
137993
137996
|
}, (id2) => this._decorationIds[i2] = id2);
|
|
137994
137997
|
});
|
|
137995
137998
|
}
|
|
137996
|
-
updateHeight(
|
|
137997
|
-
this._viewZone.heightInPx =
|
|
137999
|
+
updateHeight(height, viewZoneChangeAccessor) {
|
|
138000
|
+
this._viewZone.heightInPx = height;
|
|
137998
138001
|
viewZoneChangeAccessor.layoutZone(this._viewZoneId);
|
|
137999
138002
|
if (this._contentWidget) {
|
|
138000
138003
|
this._editor.layoutContentWidget(this._contentWidget);
|
|
@@ -138914,8 +138917,8 @@ class ViewZoneDelegate {
|
|
|
138914
138917
|
onDomNodeTop(top) {
|
|
138915
138918
|
this._onDomNodeTop(top);
|
|
138916
138919
|
}
|
|
138917
|
-
onComputedHeight(
|
|
138918
|
-
this._onComputedHeight(
|
|
138920
|
+
onComputedHeight(height) {
|
|
138921
|
+
this._onComputedHeight(height);
|
|
138919
138922
|
}
|
|
138920
138923
|
}
|
|
138921
138924
|
class OverlayWidgetDelegate {
|
|
@@ -138991,10 +138994,10 @@ class ZoneWidget {
|
|
|
138991
138994
|
this.domNode.setAttribute("role", "presentation");
|
|
138992
138995
|
}
|
|
138993
138996
|
this._disposables.add(this.editor.onDidLayoutChange((info) => {
|
|
138994
|
-
const
|
|
138995
|
-
this.domNode.style.width =
|
|
138997
|
+
const width = this._getWidth(info);
|
|
138998
|
+
this.domNode.style.width = width + "px";
|
|
138996
138999
|
this.domNode.style.left = this._getLeft(info) + "px";
|
|
138997
|
-
this._onWidth(
|
|
139000
|
+
this._onWidth(width);
|
|
138998
139001
|
}));
|
|
138999
139002
|
}
|
|
139000
139003
|
dispose() {
|
|
@@ -139062,10 +139065,10 @@ class ZoneWidget {
|
|
|
139062
139065
|
_onViewZoneTop(top) {
|
|
139063
139066
|
this.domNode.style.top = top + "px";
|
|
139064
139067
|
}
|
|
139065
|
-
_onViewZoneHeight(
|
|
139066
|
-
this.domNode.style.height = `${
|
|
139068
|
+
_onViewZoneHeight(height) {
|
|
139069
|
+
this.domNode.style.height = `${height}px`;
|
|
139067
139070
|
if (this.container) {
|
|
139068
|
-
let containerHeight =
|
|
139071
|
+
let containerHeight = height - this._decoratingElementsHeight();
|
|
139069
139072
|
this.container.style.height = `${containerHeight}px`;
|
|
139070
139073
|
const layoutInfo = this.editor.getLayoutInfo();
|
|
139071
139074
|
this._doLayout(containerHeight, this._getWidth(layoutInfo));
|
|
@@ -139129,8 +139132,8 @@ class ZoneWidget {
|
|
|
139129
139132
|
_showImpl(where, heightInLines) {
|
|
139130
139133
|
const position2 = where.getStartPosition();
|
|
139131
139134
|
const layoutInfo = this.editor.getLayoutInfo();
|
|
139132
|
-
const
|
|
139133
|
-
this.domNode.style.width = `${
|
|
139135
|
+
const width = this._getWidth(layoutInfo);
|
|
139136
|
+
this.domNode.style.width = `${width}px`;
|
|
139134
139137
|
this.domNode.style.left = this._getLeft(layoutInfo) + "px";
|
|
139135
139138
|
const viewZoneDomNode = document.createElement("div");
|
|
139136
139139
|
viewZoneDomNode.style.overflow = "hidden";
|
|
@@ -139156,15 +139159,15 @@ class ZoneWidget {
|
|
|
139156
139159
|
this._overlayWidget = null;
|
|
139157
139160
|
}
|
|
139158
139161
|
this.domNode.style.top = "-1000px";
|
|
139159
|
-
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));
|
|
139160
139163
|
this._viewZone.id = accessor.addZone(this._viewZone);
|
|
139161
139164
|
this._overlayWidget = new OverlayWidgetDelegate(WIDGET_ID + this._viewZone.id, this.domNode);
|
|
139162
139165
|
this.editor.addOverlayWidget(this._overlayWidget);
|
|
139163
139166
|
});
|
|
139164
139167
|
if (this.container && this.options.showFrame) {
|
|
139165
|
-
const
|
|
139166
|
-
this.container.style.borderTopWidth =
|
|
139167
|
-
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";
|
|
139168
139171
|
}
|
|
139169
139172
|
let containerHeight = heightInLines * lineHeight - this._decoratingElementsHeight();
|
|
139170
139173
|
if (this.container) {
|
|
@@ -139172,7 +139175,7 @@ class ZoneWidget {
|
|
|
139172
139175
|
this.container.style.height = containerHeight + "px";
|
|
139173
139176
|
this.container.style.overflow = "hidden";
|
|
139174
139177
|
}
|
|
139175
|
-
this._doLayout(containerHeight,
|
|
139178
|
+
this._doLayout(containerHeight, width);
|
|
139176
139179
|
if (!this.options.keepEditorSelection) {
|
|
139177
139180
|
this.editor.setSelection(where);
|
|
139178
139181
|
}
|
|
@@ -140778,8 +140781,8 @@ let ReferenceWidget = class ReferenceWidget2 extends PeekViewWidget {
|
|
|
140778
140781
|
element: this._previewContainer,
|
|
140779
140782
|
minimumSize: 200,
|
|
140780
140783
|
maximumSize: Number.MAX_VALUE,
|
|
140781
|
-
layout: (
|
|
140782
|
-
this._preview.layout({ height: this._dim.height, width
|
|
140784
|
+
layout: (width) => {
|
|
140785
|
+
this._preview.layout({ height: this._dim.height, width });
|
|
140783
140786
|
}
|
|
140784
140787
|
}, Sizing.Distribute);
|
|
140785
140788
|
this._splitView.addView({
|
|
@@ -140787,10 +140790,10 @@ let ReferenceWidget = class ReferenceWidget2 extends PeekViewWidget {
|
|
|
140787
140790
|
element: this._treeContainer,
|
|
140788
140791
|
minimumSize: 100,
|
|
140789
140792
|
maximumSize: Number.MAX_VALUE,
|
|
140790
|
-
layout: (
|
|
140793
|
+
layout: (width) => {
|
|
140791
140794
|
this._treeContainer.style.height = `${this._dim.height}px`;
|
|
140792
|
-
this._treeContainer.style.width = `${
|
|
140793
|
-
this._tree.layout(this._dim.height,
|
|
140795
|
+
this._treeContainer.style.width = `${width}px`;
|
|
140796
|
+
this._tree.layout(this._dim.height, width);
|
|
140794
140797
|
}
|
|
140795
140798
|
}, Sizing.Distribute);
|
|
140796
140799
|
this._disposables.add(this._splitView.onDidSashChange(() => {
|
|
@@ -140817,9 +140820,9 @@ let ReferenceWidget = class ReferenceWidget2 extends PeekViewWidget {
|
|
|
140817
140820
|
});
|
|
140818
140821
|
hide(this._treeContainer);
|
|
140819
140822
|
}
|
|
140820
|
-
_onWidth(
|
|
140823
|
+
_onWidth(width) {
|
|
140821
140824
|
if (this._dim) {
|
|
140822
|
-
this._doLayoutBody(this._dim.height,
|
|
140825
|
+
this._doLayoutBody(this._dim.height, width);
|
|
140823
140826
|
}
|
|
140824
140827
|
}
|
|
140825
140828
|
_doLayoutBody(heightInPixel, widthInPixel) {
|
|
@@ -147044,10 +147047,10 @@ class MessageWidget {
|
|
|
147044
147047
|
const scrollHeight = fontInfo.lineHeight * this._lines;
|
|
147045
147048
|
this._scrollable.setScrollDimensions({ scrollWidth, scrollHeight });
|
|
147046
147049
|
}
|
|
147047
|
-
layout(
|
|
147048
|
-
this._scrollable.getDomNode().style.height = `${
|
|
147049
|
-
this._scrollable.getDomNode().style.width = `${
|
|
147050
|
-
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 });
|
|
147051
147054
|
}
|
|
147052
147055
|
getHeightInLines() {
|
|
147053
147056
|
return Math.min(17, this._lines);
|
|
@@ -152250,15 +152253,15 @@ class ResizableHTMLElement {
|
|
|
152250
152253
|
this._southSash.state = south ? 3 : 0;
|
|
152251
152254
|
this._westSash.state = west ? 3 : 0;
|
|
152252
152255
|
}
|
|
152253
|
-
layout(
|
|
152256
|
+
layout(height = this.size.height, width = this.size.width) {
|
|
152254
152257
|
const { height: minHeight, width: minWidth } = this._minSize;
|
|
152255
152258
|
const { height: maxHeight, width: maxWidth } = this._maxSize;
|
|
152256
|
-
|
|
152257
|
-
|
|
152258
|
-
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);
|
|
152259
152262
|
if (!Dimension.equals(newSize, this._size)) {
|
|
152260
|
-
this.domNode.style.height =
|
|
152261
|
-
this.domNode.style.width =
|
|
152263
|
+
this.domNode.style.height = height + "px";
|
|
152264
|
+
this.domNode.style.width = width + "px";
|
|
152262
152265
|
this._size = newSize;
|
|
152263
152266
|
this._northSash.layout();
|
|
152264
152267
|
this._eastSash.layout();
|
|
@@ -152458,11 +152461,11 @@ let SuggestDetailsWidget = class SuggestDetailsWidget2 {
|
|
|
152458
152461
|
get size() {
|
|
152459
152462
|
return this._size;
|
|
152460
152463
|
}
|
|
152461
|
-
layout(
|
|
152462
|
-
const newSize = new Dimension(
|
|
152464
|
+
layout(width, height) {
|
|
152465
|
+
const newSize = new Dimension(width, height);
|
|
152463
152466
|
if (!Dimension.equals(newSize, this._size)) {
|
|
152464
152467
|
this._size = newSize;
|
|
152465
|
-
size(this.domNode,
|
|
152468
|
+
size(this.domNode, width, height);
|
|
152466
152469
|
}
|
|
152467
152470
|
this._scrollbar.scanDomNode();
|
|
152468
152471
|
}
|
|
@@ -152484,8 +152487,8 @@ let SuggestDetailsWidget = class SuggestDetailsWidget2 {
|
|
|
152484
152487
|
pageUp() {
|
|
152485
152488
|
this.scrollUp(80);
|
|
152486
152489
|
}
|
|
152487
|
-
set borderWidth(
|
|
152488
|
-
this._borderWidth =
|
|
152490
|
+
set borderWidth(width) {
|
|
152491
|
+
this._borderWidth = width;
|
|
152489
152492
|
}
|
|
152490
152493
|
get borderWidth() {
|
|
152491
152494
|
return this._borderWidth;
|
|
@@ -152595,18 +152598,18 @@ class SuggestDetailsOverlay {
|
|
|
152595
152598
|
const defaultMinSize = new Dimension(220, 2 * info.lineHeight);
|
|
152596
152599
|
const defaultTop = anchorBox.top;
|
|
152597
152600
|
const eastPlacement = function() {
|
|
152598
|
-
const
|
|
152601
|
+
const width = bodyBox.width - (anchorBox.left + anchorBox.width + info.borderWidth + info.horizontalPadding);
|
|
152599
152602
|
const left = -info.borderWidth + anchorBox.left + anchorBox.width;
|
|
152600
|
-
const maxSizeTop = new Dimension(
|
|
152603
|
+
const maxSizeTop = new Dimension(width, bodyBox.height - anchorBox.top - info.borderHeight - info.verticalPadding);
|
|
152601
152604
|
const maxSizeBottom = maxSizeTop.with(void 0, anchorBox.top + anchorBox.height - info.borderHeight - info.verticalPadding);
|
|
152602
|
-
return { top: defaultTop, left, fit:
|
|
152605
|
+
return { top: defaultTop, left, fit: width - size2.width, maxSizeTop, maxSizeBottom, minSize: defaultMinSize.with(Math.min(width, defaultMinSize.width)) };
|
|
152603
152606
|
}();
|
|
152604
152607
|
const westPlacement = function() {
|
|
152605
|
-
const
|
|
152608
|
+
const width = anchorBox.left - info.borderWidth - info.horizontalPadding;
|
|
152606
152609
|
const left = Math.max(info.horizontalPadding, anchorBox.left - size2.width - info.borderWidth);
|
|
152607
|
-
const maxSizeTop = new Dimension(
|
|
152610
|
+
const maxSizeTop = new Dimension(width, bodyBox.height - anchorBox.top - info.borderHeight - info.verticalPadding);
|
|
152608
152611
|
const maxSizeBottom = maxSizeTop.with(void 0, anchorBox.top + anchorBox.height - info.borderHeight - info.verticalPadding);
|
|
152609
|
-
return { top: defaultTop, left, fit:
|
|
152612
|
+
return { top: defaultTop, left, fit: width - size2.width, maxSizeTop, maxSizeBottom, minSize: defaultMinSize.with(Math.min(width, defaultMinSize.width)) };
|
|
152610
152613
|
}();
|
|
152611
152614
|
const southPacement = function() {
|
|
152612
152615
|
const left = anchorBox.left;
|
|
@@ -152618,14 +152621,14 @@ class SuggestDetailsOverlay {
|
|
|
152618
152621
|
const placement = (_a2 = placements.find((p2) => p2.fit >= 0)) !== null && _a2 !== void 0 ? _a2 : placements.sort((a, b2) => b2.fit - a.fit)[0];
|
|
152619
152622
|
const bottom = anchorBox.top + anchorBox.height - info.borderHeight;
|
|
152620
152623
|
let alignAtTop;
|
|
152621
|
-
let
|
|
152624
|
+
let height = size2.height;
|
|
152622
152625
|
const maxHeight = Math.max(placement.maxSizeTop.height, placement.maxSizeBottom.height);
|
|
152623
|
-
if (
|
|
152624
|
-
|
|
152626
|
+
if (height > maxHeight) {
|
|
152627
|
+
height = maxHeight;
|
|
152625
152628
|
}
|
|
152626
152629
|
let maxSize;
|
|
152627
152630
|
if (preferAlignAtTop) {
|
|
152628
|
-
if (
|
|
152631
|
+
if (height <= placement.maxSizeTop.height) {
|
|
152629
152632
|
alignAtTop = true;
|
|
152630
152633
|
maxSize = placement.maxSizeTop;
|
|
152631
152634
|
} else {
|
|
@@ -152633,7 +152636,7 @@ class SuggestDetailsOverlay {
|
|
|
152633
152636
|
maxSize = placement.maxSizeBottom;
|
|
152634
152637
|
}
|
|
152635
152638
|
} else {
|
|
152636
|
-
if (
|
|
152639
|
+
if (height <= placement.maxSizeBottom.height) {
|
|
152637
152640
|
alignAtTop = false;
|
|
152638
152641
|
maxSize = placement.maxSizeBottom;
|
|
152639
152642
|
} else {
|
|
@@ -152641,12 +152644,12 @@ class SuggestDetailsOverlay {
|
|
|
152641
152644
|
maxSize = placement.maxSizeTop;
|
|
152642
152645
|
}
|
|
152643
152646
|
}
|
|
152644
|
-
this._applyTopLeft({ left: placement.left, top: alignAtTop ? placement.top : bottom -
|
|
152647
|
+
this._applyTopLeft({ left: placement.left, top: alignAtTop ? placement.top : bottom - height });
|
|
152645
152648
|
this.getDomNode().style.position = "fixed";
|
|
152646
152649
|
this._resizable.enableSashes(!alignAtTop, placement === eastPlacement, alignAtTop, placement !== eastPlacement);
|
|
152647
152650
|
this._resizable.minSize = placement.minSize;
|
|
152648
152651
|
this._resizable.maxSize = maxSize;
|
|
152649
|
-
this._resizable.layout(
|
|
152652
|
+
this._resizable.layout(height, Math.min(maxSize.width, size2.width));
|
|
152650
152653
|
this.widget.layout(this._resizable.size.width, this._resizable.size.height);
|
|
152651
152654
|
}
|
|
152652
152655
|
_applyTopLeft(topLeft) {
|
|
@@ -153024,14 +153027,14 @@ let SuggestWidget = class SuggestWidget2 {
|
|
|
153024
153027
|
if (state2) {
|
|
153025
153028
|
const { itemHeight, defaultSize } = this.getLayoutInfo();
|
|
153026
153029
|
const threshold = Math.round(itemHeight / 2);
|
|
153027
|
-
let { width
|
|
153028
|
-
if (!state2.persistHeight || Math.abs(state2.currentSize.height -
|
|
153029
|
-
|
|
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;
|
|
153030
153033
|
}
|
|
153031
|
-
if (!state2.persistWidth || Math.abs(state2.currentSize.width -
|
|
153032
|
-
|
|
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;
|
|
153033
153036
|
}
|
|
153034
|
-
this._persistedSize.store(new Dimension(
|
|
153037
|
+
this._persistedSize.store(new Dimension(width, height));
|
|
153035
153038
|
}
|
|
153036
153039
|
this._contentWidget.unlockPreference();
|
|
153037
153040
|
state2 = void 0;
|
|
@@ -153481,21 +153484,21 @@ let SuggestWidget = class SuggestWidget2 {
|
|
|
153481
153484
|
if (!size2) {
|
|
153482
153485
|
size2 = info.defaultSize;
|
|
153483
153486
|
}
|
|
153484
|
-
let
|
|
153485
|
-
let
|
|
153487
|
+
let height = size2.height;
|
|
153488
|
+
let width = size2.width;
|
|
153486
153489
|
this._status.element.style.lineHeight = `${info.itemHeight}px`;
|
|
153487
153490
|
if (this._state === 2 || this._state === 1) {
|
|
153488
|
-
|
|
153489
|
-
|
|
153491
|
+
height = info.itemHeight + info.borderHeight;
|
|
153492
|
+
width = info.defaultSize.width / 2;
|
|
153490
153493
|
this.element.enableSashes(false, false, false, false);
|
|
153491
|
-
this.element.minSize = this.element.maxSize = new Dimension(
|
|
153494
|
+
this.element.minSize = this.element.maxSize = new Dimension(width, height);
|
|
153492
153495
|
this._contentWidget.setPreference(2);
|
|
153493
153496
|
} else {
|
|
153494
153497
|
const maxWidth = bodyBox.width - info.borderHeight - 2 * info.horizontalPadding;
|
|
153495
|
-
if (
|
|
153496
|
-
|
|
153498
|
+
if (width > maxWidth) {
|
|
153499
|
+
width = maxWidth;
|
|
153497
153500
|
}
|
|
153498
|
-
const preferredWidth = this._completionModel ? this._completionModel.stats.pLabelLen * info.typicalHalfwidthCharacterWidth :
|
|
153501
|
+
const preferredWidth = this._completionModel ? this._completionModel.stats.pLabelLen * info.typicalHalfwidthCharacterWidth : width;
|
|
153499
153502
|
const fullHeight = info.statusBarHeight + this._list.contentHeight + info.borderHeight;
|
|
153500
153503
|
const minHeight = info.itemHeight + info.statusBarHeight;
|
|
153501
153504
|
const editorBox = getDomNodePagePosition(this.editor.getDomNode());
|
|
@@ -153505,17 +153508,17 @@ let SuggestWidget = class SuggestWidget2 {
|
|
|
153505
153508
|
const availableSpaceAbove = editorBox.top + cursorBox.top - info.verticalPadding;
|
|
153506
153509
|
const maxHeightAbove = Math.min(availableSpaceAbove, fullHeight);
|
|
153507
153510
|
let maxHeight = Math.min(Math.max(maxHeightAbove, maxHeightBelow) + info.borderHeight, fullHeight);
|
|
153508
|
-
if (
|
|
153509
|
-
|
|
153511
|
+
if (height === ((_a2 = this._cappedHeight) === null || _a2 === void 0 ? void 0 : _a2.capped)) {
|
|
153512
|
+
height = this._cappedHeight.wanted;
|
|
153510
153513
|
}
|
|
153511
|
-
if (
|
|
153512
|
-
|
|
153514
|
+
if (height < minHeight) {
|
|
153515
|
+
height = minHeight;
|
|
153513
153516
|
}
|
|
153514
|
-
if (
|
|
153515
|
-
|
|
153517
|
+
if (height > maxHeight) {
|
|
153518
|
+
height = maxHeight;
|
|
153516
153519
|
}
|
|
153517
153520
|
const forceRenderingAboveRequiredSpace = 150;
|
|
153518
|
-
if (
|
|
153521
|
+
if (height > maxHeightBelow || this._forceRenderingAbove && availableSpaceAbove > forceRenderingAboveRequiredSpace) {
|
|
153519
153522
|
this._contentWidget.setPreference(1);
|
|
153520
153523
|
this.element.enableSashes(true, true, false, false);
|
|
153521
153524
|
maxHeight = maxHeightAbove;
|
|
@@ -153527,18 +153530,18 @@ let SuggestWidget = class SuggestWidget2 {
|
|
|
153527
153530
|
this.element.preferredSize = new Dimension(preferredWidth, info.defaultSize.height);
|
|
153528
153531
|
this.element.maxSize = new Dimension(maxWidth, maxHeight);
|
|
153529
153532
|
this.element.minSize = new Dimension(220, minHeight);
|
|
153530
|
-
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;
|
|
153531
153534
|
}
|
|
153532
|
-
this._resize(
|
|
153535
|
+
this._resize(width, height);
|
|
153533
153536
|
}
|
|
153534
|
-
_resize(
|
|
153537
|
+
_resize(width, height) {
|
|
153535
153538
|
const { width: maxWidth, height: maxHeight } = this.element.maxSize;
|
|
153536
|
-
|
|
153537
|
-
|
|
153539
|
+
width = Math.min(maxWidth, width);
|
|
153540
|
+
height = Math.min(maxHeight, height);
|
|
153538
153541
|
const { statusBarHeight } = this.getLayoutInfo();
|
|
153539
|
-
this._list.layout(
|
|
153540
|
-
this._listElement.style.height = `${
|
|
153541
|
-
this.element.layout(
|
|
153542
|
+
this._list.layout(height - statusBarHeight, width);
|
|
153543
|
+
this._listElement.style.height = `${height - statusBarHeight}px`;
|
|
153544
|
+
this.element.layout(height, width);
|
|
153542
153545
|
this._contentWidget.layout();
|
|
153543
153546
|
this._positionDetails();
|
|
153544
153547
|
}
|
|
@@ -153637,9 +153640,9 @@ class SuggestContentWidget {
|
|
|
153637
153640
|
};
|
|
153638
153641
|
}
|
|
153639
153642
|
beforeRender() {
|
|
153640
|
-
const { height
|
|
153643
|
+
const { height, width } = this._widget.element.size;
|
|
153641
153644
|
const { borderWidth, horizontalPadding } = this._widget.getLayoutInfo();
|
|
153642
|
-
return new Dimension(
|
|
153645
|
+
return new Dimension(width + 2 * borderWidth + horizontalPadding, height + 2 * borderWidth);
|
|
153643
153646
|
}
|
|
153644
153647
|
afterRender(position2) {
|
|
153645
153648
|
this._widget._afterRender(position2);
|
|
@@ -156641,11 +156644,11 @@ let ModesContentHoverWidget = class ModesContentHoverWidget2 extends Widget {
|
|
|
156641
156644
|
this._hover.onContentsChanged();
|
|
156642
156645
|
}
|
|
156643
156646
|
layout() {
|
|
156644
|
-
const
|
|
156647
|
+
const height = Math.max(this._editor.getLayoutInfo().height / 4, 250);
|
|
156645
156648
|
const { fontSize, lineHeight } = this._editor.getOption(43);
|
|
156646
156649
|
this._hover.contentsDomNode.style.fontSize = `${fontSize}px`;
|
|
156647
156650
|
this._hover.contentsDomNode.style.lineHeight = `${lineHeight / fontSize}`;
|
|
156648
|
-
this._hover.contentsDomNode.style.maxHeight = `${
|
|
156651
|
+
this._hover.contentsDomNode.style.maxHeight = `${height}px`;
|
|
156649
156652
|
this._hover.contentsDomNode.style.maxWidth = `${Math.max(this._editor.getLayoutInfo().width * 0.66, 500)}px`;
|
|
156650
156653
|
}
|
|
156651
156654
|
onModelDecorationsChanged() {
|
|
@@ -158423,8 +158426,8 @@ class FindDecorations {
|
|
|
158423
158426
|
if (findMatches.length > 1e3) {
|
|
158424
158427
|
findMatchesOptions = FindDecorations._FIND_MATCH_NO_OVERVIEW_DECORATION;
|
|
158425
158428
|
const lineCount = this._editor.getModel().getLineCount();
|
|
158426
|
-
const
|
|
158427
|
-
const approxPixelsPerLine =
|
|
158429
|
+
const height = this._editor.getLayoutInfo().height;
|
|
158430
|
+
const approxPixelsPerLine = height / lineCount;
|
|
158428
158431
|
const mergeLinesDelta = Math.max(2, Math.ceil(3 / approxPixelsPerLine));
|
|
158429
158432
|
let prevStartLineNumber = findMatches[0].range.startLineNumber;
|
|
158430
158433
|
let prevEndLineNumber = findMatches[0].range.endLineNumber;
|
|
@@ -161391,15 +161394,15 @@ class FindWidget extends Widget {
|
|
|
161391
161394
|
}));
|
|
161392
161395
|
this._register(this._resizeSash.onDidChange((evt) => {
|
|
161393
161396
|
this._resized = true;
|
|
161394
|
-
let
|
|
161395
|
-
if (
|
|
161397
|
+
let width = originalWidth + evt.startX - evt.currentX;
|
|
161398
|
+
if (width < FIND_WIDGET_INITIAL_WIDTH) {
|
|
161396
161399
|
return;
|
|
161397
161400
|
}
|
|
161398
161401
|
const maxWidth = parseFloat(getComputedStyle$1(this._domNode).maxWidth) || 0;
|
|
161399
|
-
if (
|
|
161402
|
+
if (width > maxWidth) {
|
|
161400
161403
|
return;
|
|
161401
161404
|
}
|
|
161402
|
-
this._domNode.style.width = `${
|
|
161405
|
+
this._domNode.style.width = `${width}px`;
|
|
161403
161406
|
if (this._isReplaceVisible) {
|
|
161404
161407
|
this._replaceInput.width = getTotalWidth(this._findInput.domNode);
|
|
161405
161408
|
}
|
|
@@ -161411,13 +161414,13 @@ class FindWidget extends Widget {
|
|
|
161411
161414
|
if (currentWidth < FIND_WIDGET_INITIAL_WIDTH) {
|
|
161412
161415
|
return;
|
|
161413
161416
|
}
|
|
161414
|
-
let
|
|
161417
|
+
let width = FIND_WIDGET_INITIAL_WIDTH;
|
|
161415
161418
|
if (!this._resized || currentWidth === FIND_WIDGET_INITIAL_WIDTH) {
|
|
161416
161419
|
const layoutInfo = this._codeEditor.getLayoutInfo();
|
|
161417
|
-
|
|
161420
|
+
width = layoutInfo.width - 28 - layoutInfo.minimap.minimapWidth - 15;
|
|
161418
161421
|
this._resized = true;
|
|
161419
161422
|
}
|
|
161420
|
-
this._domNode.style.width = `${
|
|
161423
|
+
this._domNode.style.width = `${width}px`;
|
|
161421
161424
|
if (this._isReplaceVisible) {
|
|
161422
161425
|
this._replaceInput.width = getTotalWidth(this._findInput.domNode);
|
|
161423
161426
|
}
|
|
@@ -169743,8 +169746,8 @@ let ParameterHintsWidget = class ParameterHintsWidget2 extends Disposable {
|
|
|
169743
169746
|
if (!this.domNodes) {
|
|
169744
169747
|
return;
|
|
169745
169748
|
}
|
|
169746
|
-
const
|
|
169747
|
-
const maxHeight = `${
|
|
169749
|
+
const height = Math.max(this.editor.getLayoutInfo().height / 4, 250);
|
|
169750
|
+
const maxHeight = `${height}px`;
|
|
169748
169751
|
this.domNodes.element.style.maxHeight = maxHeight;
|
|
169749
169752
|
const wrapper = this.domNodes.element.getElementsByClassName("phwrapper");
|
|
169750
169753
|
if (wrapper.length) {
|
|
@@ -174340,7 +174343,7 @@ const EditorLayout = newStyled.div`
|
|
|
174340
174343
|
}
|
|
174341
174344
|
|
|
174342
174345
|
.active {
|
|
174343
|
-
background: #
|
|
174346
|
+
background: #005391;
|
|
174344
174347
|
box-shadow: 0px 1px 0px 0 #333;
|
|
174345
174348
|
/* border-left: 1px solid rgb(42 96 231);
|
|
174346
174349
|
border-right: 1px solid rgb(42 96 231); */
|
|
@@ -190290,6 +190293,9 @@ const Editor = ({
|
|
|
190290
190293
|
}, [userList]);
|
|
190291
190294
|
react.exports.useEffect(() => {
|
|
190292
190295
|
console.log(CRDTInfo2);
|
|
190296
|
+
console.log(docFile);
|
|
190297
|
+
if (/\/$/.test(docFile == null ? void 0 : docFile.path))
|
|
190298
|
+
return;
|
|
190293
190299
|
updateModel(file);
|
|
190294
190300
|
}, [docFile]);
|
|
190295
190301
|
return /* @__PURE__ */ jsx(FollowLayout, {
|
|
@@ -190305,7 +190311,7 @@ const Editor = ({
|
|
|
190305
190311
|
onClick: () => {
|
|
190306
190312
|
switchModel(f2.model);
|
|
190307
190313
|
},
|
|
190308
|
-
children: f2.label.
|
|
190314
|
+
children: f2.label.split("/").slice(-1)[0]
|
|
190309
190315
|
}, index2))
|
|
190310
190316
|
}) : null, /* @__PURE__ */ jsx(ContentLayout, {
|
|
190311
190317
|
ref: divEl,
|
|
@@ -197694,6 +197700,7 @@ const TerminalComponent = (_h2) => {
|
|
|
197694
197700
|
const {
|
|
197695
197701
|
CRDTInfo: CRDTInfo2
|
|
197696
197702
|
} = oTStore((state2) => state2);
|
|
197703
|
+
const socket2 = useOT((state2) => state2.socket);
|
|
197697
197704
|
const initTerminalText = (terminal2, text2) => {
|
|
197698
197705
|
terminal2.write("\r\n");
|
|
197699
197706
|
terminal2.clear();
|
|
@@ -197777,6 +197784,53 @@ const TerminalComponent = (_h2) => {
|
|
|
197777
197784
|
}
|
|
197778
197785
|
}
|
|
197779
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
|
+
if (!CRDTInfo22.userInfo.uuid)
|
|
197799
|
+
return;
|
|
197800
|
+
const postUser = userListStore.getState().userList.find(({
|
|
197801
|
+
uuid: uuid2
|
|
197802
|
+
}) => uuid2 === CRDTInfo22.userInfo.uuid);
|
|
197803
|
+
if (postUser && !IsMe(CRDTInfo22.userInfo)) {
|
|
197804
|
+
const helperContainer = (_d2 = terminal == null ? void 0 : terminal._core) == null ? void 0 : _d2._helperContainer;
|
|
197805
|
+
const childNode = helperContainer == null ? void 0 : helperContainer.firstChild;
|
|
197806
|
+
userLabel.innerText = postUser.username;
|
|
197807
|
+
userLabel.style.backgroundColor = postUser.color;
|
|
197808
|
+
userLabel.style.top = childNode.style.top;
|
|
197809
|
+
userLabel.style.left = childNode.style.left;
|
|
197810
|
+
helperContainer == null ? void 0 : helperContainer.appendChild(userLabel);
|
|
197811
|
+
terminal.setOption("theme", __spreadProps(__spreadValues({}, terminal.getOption("theme")), {
|
|
197812
|
+
cursor: postUser.color
|
|
197813
|
+
}));
|
|
197814
|
+
const timer = setTimeout(() => {
|
|
197815
|
+
helperContainer == null ? void 0 : helperContainer.removeChild(userLabel);
|
|
197816
|
+
terminal.setOption("theme", __spreadProps(__spreadValues({}, terminal.getOption("theme")), {
|
|
197817
|
+
cursor: "#ffffff"
|
|
197818
|
+
}));
|
|
197819
|
+
}, 6e3);
|
|
197820
|
+
return () => {
|
|
197821
|
+
try {
|
|
197822
|
+
helperContainer == null ? void 0 : helperContainer.removeChild(userLabel);
|
|
197823
|
+
} catch (_2) {
|
|
197824
|
+
}
|
|
197825
|
+
terminal.setOption("theme", __spreadProps(__spreadValues({}, terminal.getOption("theme")), {
|
|
197826
|
+
cursor: "#ffffff"
|
|
197827
|
+
}));
|
|
197828
|
+
clearTimeout(timer);
|
|
197829
|
+
};
|
|
197830
|
+
}
|
|
197831
|
+
}
|
|
197832
|
+
});
|
|
197833
|
+
}, [socket2]);
|
|
197780
197834
|
return /* @__PURE__ */ jsx(FollowLayout, {
|
|
197781
197835
|
name: "terminal",
|
|
197782
197836
|
children: /* @__PURE__ */ jsx("div", {
|
|
@@ -198137,7 +198191,7 @@ function SkeletonTheme(_n) {
|
|
|
198137
198191
|
return React.createElement(SkeletonThemeContext.Provider, { value: styleOptions }, children);
|
|
198138
198192
|
}
|
|
198139
198193
|
const defaultEnableAnimation = true;
|
|
198140
|
-
function styleOptionsToCssProperties({ baseColor, highlightColor, width
|
|
198194
|
+
function styleOptionsToCssProperties({ baseColor, highlightColor, width, height, borderRadius, circle, direction, duration, enableAnimation = defaultEnableAnimation }) {
|
|
198141
198195
|
const style = {};
|
|
198142
198196
|
if (direction === "rtl")
|
|
198143
198197
|
style["--animation-direction"] = "reverse";
|
|
@@ -198145,10 +198199,10 @@ function styleOptionsToCssProperties({ baseColor, highlightColor, width: width2,
|
|
|
198145
198199
|
style["--animation-duration"] = `${duration}s`;
|
|
198146
198200
|
if (!enableAnimation)
|
|
198147
198201
|
style["--pseudo-element-display"] = "none";
|
|
198148
|
-
if (typeof
|
|
198149
|
-
style.width =
|
|
198150
|
-
if (typeof
|
|
198151
|
-
style.height =
|
|
198202
|
+
if (typeof width === "string" || typeof width === "number")
|
|
198203
|
+
style.width = width;
|
|
198204
|
+
if (typeof height === "string" || typeof height === "number")
|
|
198205
|
+
style.height = height;
|
|
198152
198206
|
if (typeof borderRadius === "string" || typeof borderRadius === "number")
|
|
198153
198207
|
style.borderRadius = borderRadius;
|
|
198154
198208
|
if (circle)
|
|
@@ -198346,90 +198400,6 @@ const ToolBar = (_r) => {
|
|
|
198346
198400
|
})]
|
|
198347
198401
|
});
|
|
198348
198402
|
};
|
|
198349
|
-
const width = "20";
|
|
198350
|
-
const height = "20";
|
|
198351
|
-
const MultiPlayerCursorLayout = newStyled.svg`
|
|
198352
|
-
position: fixed;
|
|
198353
|
-
left: 0;
|
|
198354
|
-
top: 0;
|
|
198355
|
-
|
|
198356
|
-
width: ${(props2) => props2.width}px;
|
|
198357
|
-
height: ${(props2) => props2.height}px;
|
|
198358
|
-
z-index: 9;
|
|
198359
|
-
transition: all 0.3s;
|
|
198360
|
-
`;
|
|
198361
|
-
const MultiPlayerCursor = () => {
|
|
198362
|
-
const [users, setUsers] = react.exports.useState(null);
|
|
198363
|
-
const CRDTInfo2 = oTStore((state2) => state2.CRDTInfo);
|
|
198364
|
-
const throttled = lodash$2.exports.throttle((a) => {
|
|
198365
|
-
var _a2, _b2;
|
|
198366
|
-
(_b2 = (_a2 = useOT.getState()) == null ? void 0 : _a2.socket) == null ? void 0 : _b2.emit("extraSync", JSON.stringify(a));
|
|
198367
|
-
}, 300);
|
|
198368
|
-
react.exports.useEffect(() => {
|
|
198369
|
-
const {
|
|
198370
|
-
userList
|
|
198371
|
-
} = userListStore.getState();
|
|
198372
|
-
setUsers(userList.map((_user) => {
|
|
198373
|
-
if (_user.uuid === CRDTInfo2.userInfo.uuid) {
|
|
198374
|
-
_user.cursor = CRDTInfo2.extend;
|
|
198375
|
-
}
|
|
198376
|
-
return _user;
|
|
198377
|
-
}));
|
|
198378
|
-
}, [CRDTInfo2]);
|
|
198379
|
-
react.exports.useEffect(() => {
|
|
198380
|
-
const {
|
|
198381
|
-
userInfo
|
|
198382
|
-
} = userStore.getState();
|
|
198383
|
-
window.addEventListener("mousemove", (evt) => {
|
|
198384
|
-
const {
|
|
198385
|
-
globalData
|
|
198386
|
-
} = oTStore.getState();
|
|
198387
|
-
if (!globalData.syncCursor)
|
|
198388
|
-
return;
|
|
198389
|
-
const crdt = {
|
|
198390
|
-
timestamp: Date.now(),
|
|
198391
|
-
userInfo: lodash$2.exports.pick(userInfo, "uuid", "role"),
|
|
198392
|
-
extend: {
|
|
198393
|
-
type: "mousemove",
|
|
198394
|
-
left: evt.clientX.toFixed(3),
|
|
198395
|
-
top: evt.clientY.toFixed(3),
|
|
198396
|
-
width: window.innerWidth,
|
|
198397
|
-
height: window.innerHeight
|
|
198398
|
-
}
|
|
198399
|
-
};
|
|
198400
|
-
throttled(crdt);
|
|
198401
|
-
}, false);
|
|
198402
|
-
}, []);
|
|
198403
|
-
return /* @__PURE__ */ jsx(Fragment, {
|
|
198404
|
-
children: oTStore.getState().globalData.syncCursor && (users == null ? void 0 : users.map((item, index2) => {
|
|
198405
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
|
198406
|
-
return !IsMe(item) ? /* @__PURE__ */ jsxs(MultiPlayerCursorLayout, {
|
|
198407
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
198408
|
-
width,
|
|
198409
|
-
height,
|
|
198410
|
-
viewBox: "0 0 1024 1024",
|
|
198411
|
-
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}`,
|
|
198412
|
-
version: "1.1",
|
|
198413
|
-
"p-id": "4512",
|
|
198414
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
198415
|
-
color: item.color,
|
|
198416
|
-
style: {
|
|
198417
|
-
left: `${Number((_d2 = item.cursor) == null ? void 0 : _d2.left) * window.innerWidth / ((_e2 = item.cursor) == null ? void 0 : _e2.width)}px`,
|
|
198418
|
-
top: `${Number((_f2 = item.cursor) == null ? void 0 : _f2.top) * window.innerHeight / ((_g2 = item.cursor) == null ? void 0 : _g2.height)}px`
|
|
198419
|
-
},
|
|
198420
|
-
children: [/* @__PURE__ */ jsx("defs", {
|
|
198421
|
-
children: /* @__PURE__ */ jsx("style", {
|
|
198422
|
-
type: "text/css"
|
|
198423
|
-
})
|
|
198424
|
-
}), /* @__PURE__ */ jsx("path", {
|
|
198425
|
-
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",
|
|
198426
|
-
fill: item.color,
|
|
198427
|
-
"p-id": "4513"
|
|
198428
|
-
})]
|
|
198429
|
-
}, index2) : null;
|
|
198430
|
-
}))
|
|
198431
|
-
});
|
|
198432
|
-
};
|
|
198433
198403
|
var LanguageIcon;
|
|
198434
198404
|
(function(LanguageIcon2) {
|
|
198435
198405
|
LanguageIcon2["js"] = "javascript";
|
|
@@ -198559,7 +198529,7 @@ const Index = (props2) => {
|
|
|
198559
198529
|
return /* @__PURE__ */ jsx(Fragment, {
|
|
198560
198530
|
children: /* @__PURE__ */ jsxs(MainLayout, {
|
|
198561
198531
|
className: "flex flex-col",
|
|
198562
|
-
children: [/* @__PURE__ */ jsx(
|
|
198532
|
+
children: [/* @__PURE__ */ jsx(HeaderComponent, {}), /* @__PURE__ */ jsxs(ContainerLayout, {
|
|
198563
198533
|
className: "flex flex-1 mt-2.5 flex-row",
|
|
198564
198534
|
children: [/* @__PURE__ */ jsx("section", {
|
|
198565
198535
|
className: "flex flex-row",
|