dsh-agent-plugins-market 0.14.0 → 0.14.1
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/client/client.js +50 -22
- package/client/client.js.map +1 -1
- package/package.json +32 -32
package/client/client.js
CHANGED
|
@@ -15972,7 +15972,7 @@ function keyName(event) {
|
|
|
15972
15972
|
return name;
|
|
15973
15973
|
}
|
|
15974
15974
|
//#endregion
|
|
15975
|
-
//#region node_modules/.pnpm/@codemirror+view@6.43.
|
|
15975
|
+
//#region node_modules/.pnpm/@codemirror+view@6.43.15/node_modules/@codemirror/view/dist/index.js
|
|
15976
15976
|
let nav = typeof navigator != "undefined" ? navigator : {
|
|
15977
15977
|
userAgent: "",
|
|
15978
15978
|
vendor: "",
|
|
@@ -16450,11 +16450,14 @@ function scrollRectIntoView(dom, rect, side, x, y, xMargin, yMargin, ltr) {
|
|
|
16450
16450
|
let doc = dom.ownerDocument, win = doc.defaultView || window;
|
|
16451
16451
|
for (let cur = dom, stop = false; cur && !stop;) if (isElt(cur)) {
|
|
16452
16452
|
let bounding, top = cur == doc.body;
|
|
16453
|
-
let scaleX = 1, scaleY = 1;
|
|
16453
|
+
let scaleX = 1, scaleY = 1, xScroll = true, yScroll = true;
|
|
16454
16454
|
if (top) bounding = windowRect(win);
|
|
16455
16455
|
else {
|
|
16456
|
-
|
|
16457
|
-
if (
|
|
16456
|
+
let style = getComputedStyle(cur);
|
|
16457
|
+
if (/^(fixed|sticky)$/.test(style.position)) stop = true;
|
|
16458
|
+
if (cur.scrollHeight <= cur.clientHeight || !/auto|scroll/.test(style.overflowY)) yScroll = false;
|
|
16459
|
+
if (cur.scrollWidth <= cur.clientWidth || !/auto|scroll/.test(style.overflowX)) xScroll = false;
|
|
16460
|
+
if (!xScroll && !yScroll) {
|
|
16458
16461
|
cur = cur.assignedSlot || cur.parentNode;
|
|
16459
16462
|
continue;
|
|
16460
16463
|
}
|
|
@@ -16468,7 +16471,8 @@ function scrollRectIntoView(dom, rect, side, x, y, xMargin, yMargin, ltr) {
|
|
|
16468
16471
|
};
|
|
16469
16472
|
}
|
|
16470
16473
|
let moveX = 0, moveY = 0;
|
|
16471
|
-
if (
|
|
16474
|
+
if (!yScroll);
|
|
16475
|
+
else if (y == "nearest") {
|
|
16472
16476
|
if (rect.top < bounding.top + yMargin) {
|
|
16473
16477
|
moveY = rect.top - (bounding.top + yMargin);
|
|
16474
16478
|
if (side > 0 && rect.bottom > bounding.bottom + moveY) moveY = rect.bottom - bounding.bottom + yMargin;
|
|
@@ -16480,7 +16484,8 @@ function scrollRectIntoView(dom, rect, side, x, y, xMargin, yMargin, ltr) {
|
|
|
16480
16484
|
let rectHeight = rect.bottom - rect.top, boundingHeight = bounding.bottom - bounding.top;
|
|
16481
16485
|
moveY = (y == "center" && rectHeight <= boundingHeight ? rect.top + rectHeight / 2 - boundingHeight / 2 : y == "start" || y == "center" && side < 0 ? rect.top - yMargin : rect.bottom - boundingHeight + yMargin) - bounding.top;
|
|
16482
16486
|
}
|
|
16483
|
-
if (
|
|
16487
|
+
if (!xScroll);
|
|
16488
|
+
else if (x == "nearest") {
|
|
16484
16489
|
if (rect.left < bounding.left + xMargin) {
|
|
16485
16490
|
moveX = rect.left - (bounding.left + xMargin);
|
|
16486
16491
|
if (side > 0 && rect.right > bounding.right + moveX) moveX = rect.right - bounding.right + xMargin;
|
|
@@ -16528,8 +16533,8 @@ function scrollableParents(dom, getX = true) {
|
|
|
16528
16533
|
let doc = dom.ownerDocument, x = null, y = null;
|
|
16529
16534
|
for (let cur = dom.parentNode; cur;) if (cur == doc.body || (!getX || x) && y) break;
|
|
16530
16535
|
else if (isElt(cur)) {
|
|
16531
|
-
if (!y && cur.scrollHeight > cur.clientHeight) y = cur;
|
|
16532
|
-
if (getX && !x && cur.scrollWidth > cur.clientWidth) x = cur;
|
|
16536
|
+
if (!y && cur.scrollHeight > cur.clientHeight && /scroll|auto/.test(getComputedStyle(cur).overflowY)) y = cur;
|
|
16537
|
+
if (getX && !x && cur.scrollWidth > cur.clientWidth && /scroll|auto/.test(getComputedStyle(cur).overflowX)) x = cur;
|
|
16533
16538
|
cur = cur.assignedSlot || cur.parentNode;
|
|
16534
16539
|
} else if (cur.nodeType == 11) cur = cur.host;
|
|
16535
16540
|
else break;
|
|
@@ -16996,7 +17001,6 @@ function autoDirection(text, from, to) {
|
|
|
16996
17001
|
if (type == 1) return LTR;
|
|
16997
17002
|
if (type == 2 || type == 4) return RTL;
|
|
16998
17003
|
}
|
|
16999
|
-
return LTR;
|
|
17000
17004
|
}
|
|
17001
17005
|
const clickAddsSelectionRange = /*@__PURE__*/ Facet.define();
|
|
17002
17006
|
const dragMovesSelection$1 = /*@__PURE__*/ Facet.define();
|
|
@@ -17171,7 +17175,6 @@ function getIsolatedRanges(view, line) {
|
|
|
17171
17175
|
let level = result;
|
|
17172
17176
|
for (let i = active.length - 1; i >= 0; i--, open--) {
|
|
17173
17177
|
let direction = active[i].spec.bidiIsolate, update;
|
|
17174
|
-
if (direction == null) direction = autoDirection(line.text, from, to);
|
|
17175
17178
|
if (open > 0 && level.length && (update = level[level.length - 1]).to == from && update.direction == direction) {
|
|
17176
17179
|
update.to = to;
|
|
17177
17180
|
level = update.inner;
|
|
@@ -17188,7 +17191,26 @@ function getIsolatedRanges(view, line) {
|
|
|
17188
17191
|
}
|
|
17189
17192
|
}
|
|
17190
17193
|
});
|
|
17191
|
-
return result;
|
|
17194
|
+
return resolveIsolates(line.text, result);
|
|
17195
|
+
}
|
|
17196
|
+
function resolveIsolates(text, isolates) {
|
|
17197
|
+
for (let i of isolates) {
|
|
17198
|
+
if (i.direction == null) {
|
|
17199
|
+
for (let pos = i.from, j = 0; pos < i.to; j++) {
|
|
17200
|
+
let nextInner = j < i.inner.length ? i.inner[j] : null;
|
|
17201
|
+
let dir = autoDirection(text, pos, nextInner ? nextInner.from : i.to);
|
|
17202
|
+
if (dir) {
|
|
17203
|
+
i.direction = dir;
|
|
17204
|
+
break;
|
|
17205
|
+
}
|
|
17206
|
+
if (!nextInner) break;
|
|
17207
|
+
pos = nextInner.to;
|
|
17208
|
+
}
|
|
17209
|
+
if (i.direction == null) i.direction = Direction.LTR;
|
|
17210
|
+
}
|
|
17211
|
+
resolveIsolates(text, i.inner);
|
|
17212
|
+
}
|
|
17213
|
+
return isolates;
|
|
17192
17214
|
}
|
|
17193
17215
|
const scrollMargins = /*@__PURE__*/ Facet.define();
|
|
17194
17216
|
function getScrollMargins(view) {
|
|
@@ -19001,13 +19023,13 @@ function moveToLineBoundary(view, start, forward, includeWrap) {
|
|
|
19001
19023
|
if (coords) {
|
|
19002
19024
|
let editorRect = view.dom.getBoundingClientRect();
|
|
19003
19025
|
let direction = view.textDirectionAt(block.from);
|
|
19004
|
-
let pos = view.
|
|
19026
|
+
let pos = view.posAndSideAtCoords({
|
|
19005
19027
|
x: forward == (direction == Direction.LTR) ? editorRect.right - 1 : editorRect.left + 1,
|
|
19006
19028
|
y: (coords.top + coords.bottom) / 2
|
|
19007
19029
|
});
|
|
19008
|
-
if (pos
|
|
19030
|
+
if (pos) return EditorSelection.cursor(pos.pos, pos.assoc);
|
|
19009
19031
|
}
|
|
19010
|
-
return EditorSelection.cursor(forward ? block.to : block.from, forward ?
|
|
19032
|
+
return EditorSelection.cursor(forward ? block.to : block.from, forward ? 1 : -1);
|
|
19011
19033
|
}
|
|
19012
19034
|
function moveByChar(view, start, forward, by) {
|
|
19013
19035
|
let line = view.state.doc.lineAt(start.head), spans = view.bidiSpans(line);
|
|
@@ -21142,7 +21164,7 @@ var ViewState = class {
|
|
|
21142
21164
|
}
|
|
21143
21165
|
updateScaler() {
|
|
21144
21166
|
let scaler = this.scaler;
|
|
21145
|
-
this.scaler = this.heightMap.height <= 7e6 ? IdScaler :
|
|
21167
|
+
this.scaler = this.heightMap.height <= 7e6 ? IdScaler : BigScaler.get(this.heightOracle, this.heightMap, this.viewports);
|
|
21146
21168
|
return scaler.eq(this.scaler) ? 0 : 2;
|
|
21147
21169
|
}
|
|
21148
21170
|
updateViewportLines() {
|
|
@@ -21434,7 +21456,7 @@ var ViewState = class {
|
|
|
21434
21456
|
return this.scrollParent == this.view.scrollDOM ? this.scrollParent.scrollTop * this.scaleY : (this.scrollParent ? this.scrollParent.getBoundingClientRect().top : 0) - this.view.contentDOM.getBoundingClientRect().top;
|
|
21435
21457
|
}
|
|
21436
21458
|
scrollAnchorAt(scrollOffset) {
|
|
21437
|
-
let block = this.lineBlockAtHeight(scrollOffset +
|
|
21459
|
+
let block = this.lineBlockAtHeight(scrollOffset + 12 - this.paddingTop);
|
|
21438
21460
|
return block.from >= this.viewport.from || this.viewportLines[0].top - scrollOffset > 200 ? block : this.viewportLines[0];
|
|
21439
21461
|
}
|
|
21440
21462
|
elementAtHeight(height) {
|
|
@@ -21523,9 +21545,13 @@ function staticDeco(state) {
|
|
|
21523
21545
|
return deco;
|
|
21524
21546
|
}
|
|
21525
21547
|
var BigScaler = class BigScaler {
|
|
21526
|
-
constructor(
|
|
21548
|
+
constructor(scale, viewports) {
|
|
21549
|
+
this.scale = scale;
|
|
21550
|
+
this.viewports = viewports;
|
|
21551
|
+
}
|
|
21552
|
+
static get(oracle, heightMap, viewports) {
|
|
21527
21553
|
let vpHeight = 0, base = 0, domBase = 0;
|
|
21528
|
-
|
|
21554
|
+
let vps = viewports.map(({ from, to }) => {
|
|
21529
21555
|
let top = heightMap.lineAt(from, QueryType.ByPos, oracle, 0, 0).top;
|
|
21530
21556
|
let bottom = heightMap.lineAt(to, QueryType.ByPos, oracle, 0, 0).bottom;
|
|
21531
21557
|
vpHeight += bottom - top;
|
|
@@ -21538,12 +21564,14 @@ var BigScaler = class BigScaler {
|
|
|
21538
21564
|
domBottom: 0
|
|
21539
21565
|
};
|
|
21540
21566
|
});
|
|
21541
|
-
|
|
21542
|
-
|
|
21543
|
-
|
|
21567
|
+
if (heightMap.height - vpHeight < 10) return IdScaler;
|
|
21568
|
+
let scale = (7e6 - vpHeight) / (heightMap.height - vpHeight);
|
|
21569
|
+
for (let obj of vps) {
|
|
21570
|
+
obj.domTop = domBase + (obj.top - base) * scale;
|
|
21544
21571
|
domBase = obj.domBottom = obj.domTop + (obj.bottom - obj.top);
|
|
21545
21572
|
base = obj.bottom;
|
|
21546
21573
|
}
|
|
21574
|
+
return new BigScaler(scale, vps);
|
|
21547
21575
|
}
|
|
21548
21576
|
toDOM(n) {
|
|
21549
21577
|
for (let i = 0, base = 0, domBase = 0;; i++) {
|
|
@@ -21906,7 +21934,7 @@ var DOMObserver = class {
|
|
|
21906
21934
|
if (this.intersecting) this.view.measure();
|
|
21907
21935
|
}
|
|
21908
21936
|
onScroll(e) {
|
|
21909
|
-
if (this.intersecting) this.flush(
|
|
21937
|
+
if (this.intersecting) this.flush(this.pendingRecords().length > 0);
|
|
21910
21938
|
if (this.editContext) this.view.requestMeasure(this.editContext.measureReq);
|
|
21911
21939
|
this.onScrollChanged(e);
|
|
21912
21940
|
}
|