@ai-ecoverse/slicc-spectrum 1.94.0 → 1.94.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/README.md +1 -1
- package/dist/{chunk-RYA3OPGE.js → chunk-2R4DLSKG.js} +15 -3
- package/dist/{chunk-RYA3OPGE.js.map → chunk-2R4DLSKG.js.map} +2 -2
- package/dist/slicc-dummy.js +1 -1
- package/dist/slicc-kernel-model.js +1 -1
- package/dist/slicc-ui.js +164 -128
- package/dist/slicc-ui.js.map +3 -3
- package/dist/types/app/settings.d.ts +1 -0
- package/package.json +1 -1
package/dist/slicc-ui.js
CHANGED
|
@@ -16214,11 +16214,11 @@ function getVisibleRowContext(state2, index) {
|
|
|
16214
16214
|
subtreeEndIndex: getVisibleRowSubtreeEndIndex(state2, selected.cursor, selected.index, totalVisibleCount)
|
|
16215
16215
|
};
|
|
16216
16216
|
}
|
|
16217
|
-
function getVisibleSlice(state2,
|
|
16217
|
+
function getVisibleSlice(state2, start2, end) {
|
|
16218
16218
|
const instrumentation = state2.instrumentation;
|
|
16219
16219
|
const totalVisibleCount = getVisibleCount(state2);
|
|
16220
|
-
if (totalVisibleCount <= 0 || end <
|
|
16221
|
-
const normalizedStart = Math.max(0, Math.min(
|
|
16220
|
+
if (totalVisibleCount <= 0 || end < start2) return [];
|
|
16221
|
+
const normalizedStart = Math.max(0, Math.min(start2, totalVisibleCount - 1));
|
|
16222
16222
|
const normalizedEnd = Math.max(normalizedStart, Math.min(end, totalVisibleCount - 1));
|
|
16223
16223
|
if (instrumentation == null) {
|
|
16224
16224
|
if (normalizedStart === 0) return collectVisibleRowsDFS(state2, normalizedEnd + 1);
|
|
@@ -16837,8 +16837,8 @@ var PathStore = class PathStore2 {
|
|
|
16837
16837
|
getVisibleCount() {
|
|
16838
16838
|
return withBenchmarkPhase(this.#state.instrumentation, "store.getVisibleCount", () => getVisibleCount(this.#state));
|
|
16839
16839
|
}
|
|
16840
|
-
getVisibleSlice(
|
|
16841
|
-
return withBenchmarkPhase(this.#state.instrumentation, "store.getVisibleSlice", () => getVisibleSlice(this.#state,
|
|
16840
|
+
getVisibleSlice(start2, end) {
|
|
16841
|
+
return withBenchmarkPhase(this.#state.instrumentation, "store.getVisibleSlice", () => getVisibleSlice(this.#state, start2, end));
|
|
16842
16842
|
}
|
|
16843
16843
|
getVisibleRowContext(index) {
|
|
16844
16844
|
return withBenchmarkPhase(this.#state.instrumentation, "store.getVisibleRowContext", () => getVisibleRowContext(this.#state, index));
|
|
@@ -17901,9 +17901,9 @@ var FileTreeController = class FileTreeController2 {
|
|
|
17901
17901
|
getVisibleCount() {
|
|
17902
17902
|
return this.#visibleCount;
|
|
17903
17903
|
}
|
|
17904
|
-
getVisibleRows(
|
|
17905
|
-
if (end <
|
|
17906
|
-
const boundedStart = Math.max(0,
|
|
17904
|
+
getVisibleRows(start2, end) {
|
|
17905
|
+
if (end < start2 || this.#visibleCount === 0) return [];
|
|
17906
|
+
const boundedStart = Math.max(0, start2);
|
|
17907
17907
|
const boundedEnd = Math.min(this.#visibleCount - 1, end);
|
|
17908
17908
|
if (boundedEnd < boundedStart) return [];
|
|
17909
17909
|
const boundedLength = boundedEnd - boundedStart + 1;
|
|
@@ -22208,8 +22208,8 @@ var FileTree = class {
|
|
|
22208
22208
|
getVisibleCount() {
|
|
22209
22209
|
return this.#controller.getVisibleCount();
|
|
22210
22210
|
}
|
|
22211
|
-
getVisibleRows(
|
|
22212
|
-
return this.#controller.getVisibleRows(
|
|
22211
|
+
getVisibleRows(start2, end) {
|
|
22212
|
+
return this.#controller.getVisibleRows(start2, end);
|
|
22213
22213
|
}
|
|
22214
22214
|
getSelectedPaths() {
|
|
22215
22215
|
return this.#controller.getSelectedPaths();
|
|
@@ -22534,14 +22534,14 @@ function inline2(text2) {
|
|
|
22534
22534
|
function cells(line) {
|
|
22535
22535
|
return line.trim().replace(/^\||\|$/g, "").split("|").map((cell) => cell.trim());
|
|
22536
22536
|
}
|
|
22537
|
-
function fence(lines,
|
|
22538
|
-
const lang = lines[
|
|
22539
|
-
let end =
|
|
22537
|
+
function fence(lines, start2) {
|
|
22538
|
+
const lang = lines[start2].slice(3).trim();
|
|
22539
|
+
let end = start2 + 1;
|
|
22540
22540
|
while (end < lines.length && !lines[end].startsWith("```")) end++;
|
|
22541
|
-
return [{ type: "code", lang, text: lines.slice(
|
|
22541
|
+
return [{ type: "code", lang, text: lines.slice(start2 + 1, end).join("\n") }, end + 1];
|
|
22542
22542
|
}
|
|
22543
|
-
function run(lines,
|
|
22544
|
-
let end =
|
|
22543
|
+
function run(lines, start2, test) {
|
|
22544
|
+
let end = start2;
|
|
22545
22545
|
while (end < lines.length && test(lines[end])) end++;
|
|
22546
22546
|
return end;
|
|
22547
22547
|
}
|
|
@@ -36623,9 +36623,9 @@ function scan2(words, cwds, whole) {
|
|
|
36623
36623
|
}
|
|
36624
36624
|
function reach2(command3, cwd) {
|
|
36625
36625
|
if (command3.length > 4096) return `${command3.slice(0, 40)}\u2026`;
|
|
36626
|
-
const
|
|
36627
|
-
if (protects(
|
|
36628
|
-
const cwds = /* @__PURE__ */ new Set([
|
|
36626
|
+
const start2 = absolute("/", cwd ?? "/");
|
|
36627
|
+
if (protects(start2, false)) return start2;
|
|
36628
|
+
const cwds = /* @__PURE__ */ new Set([start2]);
|
|
36629
36629
|
const text2 = unglob(ansi(command3.replace(/\\\n/g, "")));
|
|
36630
36630
|
const plain = text2.split(separators).map((segment2) => commas(segment2.split(/[\s<>=]+/).map((word) => word.replace(/['"\\]/g, ""))));
|
|
36631
36631
|
const aware = shield(text2).split(separators).map((segment2) => commas(quoted(unshield(segment2))));
|
|
@@ -36636,7 +36636,7 @@ function reach2(command3, cwd) {
|
|
|
36636
36636
|
if (hit) return hit;
|
|
36637
36637
|
}
|
|
36638
36638
|
const named2 = segments.flat().find((word) => !word.startsWith("/") && /fnox|secrets-policy/.test(word));
|
|
36639
|
-
if (named2) return absolute([...cwds].pop() ??
|
|
36639
|
+
if (named2) return absolute([...cwds].pop() ?? start2, named2);
|
|
36640
36640
|
const home2 = segments.flat().find((word) => /^~(?:[+-](?:\/|$)|.*\/\.\.(?:\/|$))/.test(word));
|
|
36641
36641
|
if (home2) return home2;
|
|
36642
36642
|
return segments.flat().some((word) => word.includes("$")) || text2.includes("`") ? text2.match(expansion)[0] : null;
|
|
@@ -39818,20 +39818,18 @@ var fieldStyles = i`
|
|
|
39818
39818
|
font-size: var(--swc-font-size-75);
|
|
39819
39819
|
color: var(--swc-neutral-subdued-content-color-default);
|
|
39820
39820
|
}
|
|
39821
|
-
.field input:not([type='checkbox'])
|
|
39822
|
-
.field select {
|
|
39821
|
+
.field input:not([type='checkbox']) {
|
|
39823
39822
|
box-sizing: border-box;
|
|
39824
39823
|
inline-size: 100%;
|
|
39825
39824
|
font: inherit;
|
|
39826
39825
|
min-height: var(--swc-component-height-100);
|
|
39827
39826
|
padding: 0 var(--swc-spacing-100);
|
|
39828
|
-
border: var(--swc-border-width-100) solid var(--swc-
|
|
39827
|
+
border: var(--swc-border-width-100) solid var(--swc-neutral-visual-color);
|
|
39829
39828
|
border-radius: var(--swc-corner-radius-small-default);
|
|
39830
39829
|
background: var(--swc-background-layer-2-color);
|
|
39831
39830
|
color: inherit;
|
|
39832
39831
|
}
|
|
39833
|
-
.field input[aria-invalid='true']
|
|
39834
|
-
.field select[aria-invalid='true'] {
|
|
39832
|
+
.field input[aria-invalid='true'] {
|
|
39835
39833
|
border-color: var(--swc-negative-border-color-default);
|
|
39836
39834
|
}
|
|
39837
39835
|
.field input[type='file'] {
|
|
@@ -39848,7 +39846,6 @@ var fieldStyles = i`
|
|
|
39848
39846
|
color: inherit;
|
|
39849
39847
|
}
|
|
39850
39848
|
.field input:focus-visible,
|
|
39851
|
-
.field select:focus-visible,
|
|
39852
39849
|
input[type='checkbox']:focus-visible {
|
|
39853
39850
|
outline: var(--swc-focus-indicator-thickness) solid var(--swc-focus-indicator-color);
|
|
39854
39851
|
outline-offset: var(--swc-focus-ring-gap);
|
|
@@ -41854,9 +41851,9 @@ function revealed(name, entries, now = Date.now(), more = false) {
|
|
|
41854
41851
|
);
|
|
41855
41852
|
if (!reveals.length) return null;
|
|
41856
41853
|
const [last] = reveals;
|
|
41857
|
-
const
|
|
41858
|
-
const today = reveals.filter((entry) => entry.at >=
|
|
41859
|
-
const partial = more && (entries[entries.length - 1]?.at ?? 0) >=
|
|
41854
|
+
const start2 = startOfDay(now);
|
|
41855
|
+
const today = reveals.filter((entry) => entry.at >= start2).length;
|
|
41856
|
+
const partial = more && (entries[entries.length - 1]?.at ?? 0) >= start2;
|
|
41860
41857
|
const when2 = today ? `${partial ? "at least " : ""}${today} ${today === 1 ? "time" : "times"} today` : since(last.at, now);
|
|
41861
41858
|
return b`Revealed to programs ${when2}, last by ${who(last)} with <code>${last.argv}</code>`;
|
|
41862
41859
|
}
|
|
@@ -43024,6 +43021,8 @@ function matchProviders(options, query) {
|
|
|
43024
43021
|
});
|
|
43025
43022
|
}
|
|
43026
43023
|
var popup = (account) => account.group === "mcp" && account.auth === "oauth";
|
|
43024
|
+
var start = (options, value) => options.some((option2) => option2.value === value) ? value : options[0]?.value ?? "";
|
|
43025
|
+
var nothingToChoose = "Nothing to choose from yet. You can connect without it.";
|
|
43027
43026
|
var secretNames = { "api-key": "API key", token: "token" };
|
|
43028
43027
|
var rejectedNames = { "api-key": "API key rejected", token: "Token rejected" };
|
|
43029
43028
|
var keptNames = { "api-key": "Key kept in the vault", token: "Token kept in the vault" };
|
|
@@ -43155,6 +43154,22 @@ var SliccSettings = class extends ThemedElement {
|
|
|
43155
43154
|
gap: var(--swc-spacing-200);
|
|
43156
43155
|
max-width: 420px;
|
|
43157
43156
|
}
|
|
43157
|
+
.key.stacked sp-textfield,
|
|
43158
|
+
.field sp-picker {
|
|
43159
|
+
width: 100%;
|
|
43160
|
+
}
|
|
43161
|
+
.field sp-field-label {
|
|
43162
|
+
margin: 0;
|
|
43163
|
+
padding-block: 0;
|
|
43164
|
+
}
|
|
43165
|
+
.sr {
|
|
43166
|
+
position: absolute;
|
|
43167
|
+
inline-size: 1px;
|
|
43168
|
+
block-size: 1px;
|
|
43169
|
+
overflow: hidden;
|
|
43170
|
+
clip-path: inset(50%);
|
|
43171
|
+
white-space: nowrap;
|
|
43172
|
+
}
|
|
43158
43173
|
.buttons,
|
|
43159
43174
|
.locked {
|
|
43160
43175
|
display: flex;
|
|
@@ -43545,7 +43560,11 @@ var SliccSettings = class extends ThemedElement {
|
|
|
43545
43560
|
const value = input.value.trim();
|
|
43546
43561
|
if (value) values[field.name] = value;
|
|
43547
43562
|
else if (field.required && field.options?.length !== 0) {
|
|
43548
|
-
this.#refuse(
|
|
43563
|
+
this.#refuse(
|
|
43564
|
+
account.id,
|
|
43565
|
+
field.name,
|
|
43566
|
+
field.options ? `Select a ${field.label.toLowerCase()}.` : `${field.label} can\u2019t be empty`
|
|
43567
|
+
);
|
|
43549
43568
|
return null;
|
|
43550
43569
|
}
|
|
43551
43570
|
}
|
|
@@ -43608,11 +43627,11 @@ var SliccSettings = class extends ThemedElement {
|
|
|
43608
43627
|
this.failure = null;
|
|
43609
43628
|
this.problem = null;
|
|
43610
43629
|
}
|
|
43611
|
-
#problem(account, field) {
|
|
43630
|
+
#problem(account, field, icon = true) {
|
|
43612
43631
|
const problem = this.problem;
|
|
43613
43632
|
if (problem?.id !== account.id || problem.field !== field) return A;
|
|
43614
43633
|
return b`<div class="problem" id="key-problem" role="alert">
|
|
43615
|
-
|
|
43634
|
+
${icon ? b`<swc-icon-alert-triangle size="s" aria-hidden="true"></swc-icon-alert-triangle>` : A}
|
|
43616
43635
|
<span>${problem.message}</span>
|
|
43617
43636
|
</div>`;
|
|
43618
43637
|
}
|
|
@@ -43624,11 +43643,16 @@ var SliccSettings = class extends ThemedElement {
|
|
|
43624
43643
|
}
|
|
43625
43644
|
#extra(account) {
|
|
43626
43645
|
return (account.fields ?? []).map(
|
|
43627
|
-
(field) => b`<
|
|
43628
|
-
|
|
43629
|
-
|
|
43630
|
-
|
|
43631
|
-
|
|
43646
|
+
(field) => field.options ? b`<div class="field">
|
|
43647
|
+
<sp-field-label for=${`field-${field.name}`} size="m">${field.label}</sp-field-label>${this.#control(account, field)}
|
|
43648
|
+
${field.options.length ? A : b`<p class="hint" data-empty=${field.name}>${nothingToChoose}</p>`}
|
|
43649
|
+
${field.help ? b`<p class="hint" id=${`help-${field.name}`}>${field.help}</p>` : A}
|
|
43650
|
+
${this.#problem(account, field.name, false)}
|
|
43651
|
+
</div>` : b`<label class="field">
|
|
43652
|
+
<span>${field.label}</span>${this.#control(account, field)}
|
|
43653
|
+
</label>
|
|
43654
|
+
${field.help ? b`<p class="hint" id=${`help-${field.name}`}>${field.help}</p>` : A}
|
|
43655
|
+
${this.#problem(account, field.name)}`
|
|
43632
43656
|
);
|
|
43633
43657
|
}
|
|
43634
43658
|
#describedBy(account, field) {
|
|
@@ -43638,16 +43662,21 @@ var SliccSettings = class extends ThemedElement {
|
|
|
43638
43662
|
}
|
|
43639
43663
|
#control(account, field) {
|
|
43640
43664
|
if (field.options) {
|
|
43641
|
-
const
|
|
43642
|
-
|
|
43665
|
+
const empty3 = !field.options.length;
|
|
43666
|
+
const described = this.problem?.id === account.id && this.problem.field === field.name;
|
|
43667
|
+
return b`<sp-picker
|
|
43668
|
+
size="m"
|
|
43643
43669
|
data-account-field=${field.name}
|
|
43644
|
-
|
|
43670
|
+
label=${empty3 ? "None available" : field.label}
|
|
43671
|
+
id=${`field-${field.name}`}
|
|
43672
|
+
value=${start(field.options, field.value)}
|
|
43673
|
+
?disabled=${empty3}
|
|
43674
|
+
?invalid=${described}
|
|
43645
43675
|
aria-required=${field.required ? "true" : A}
|
|
43646
|
-
aria-invalid=${this.#invalid(account, field.name)}
|
|
43647
|
-
aria-describedby=${this.#describedBy(account, field)}
|
|
43648
43676
|
>
|
|
43649
|
-
${field.options.map((option2) => b`<
|
|
43650
|
-
|
|
43677
|
+
${field.options.map((option2) => b`<sp-menu-item value=${option2.value}>${option2.label}</sp-menu-item>`)}
|
|
43678
|
+
${described || empty3 || field.help ? b`<span slot="description" class="sr">${described ? this.problem?.message : empty3 ? nothingToChoose : field.help}</span>` : A}
|
|
43679
|
+
</sp-picker>`;
|
|
43651
43680
|
}
|
|
43652
43681
|
return b`<input
|
|
43653
43682
|
type="text"
|
|
@@ -43674,7 +43703,7 @@ var SliccSettings = class extends ThemedElement {
|
|
|
43674
43703
|
}
|
|
43675
43704
|
#ready(account) {
|
|
43676
43705
|
if (!this.#offered()) return true;
|
|
43677
|
-
const required = (account.fields ?? []).filter((field) => field.required);
|
|
43706
|
+
const required = (account.fields ?? []).filter((field) => field.required && !field.options);
|
|
43678
43707
|
return ["value", ...required.map((field) => field.name)].every((name) => this.filled.has(name));
|
|
43679
43708
|
}
|
|
43680
43709
|
#fill(event2) {
|
|
@@ -43728,18 +43757,25 @@ var SliccSettings = class extends ThemedElement {
|
|
|
43728
43757
|
const busy = this.pending.has(account.id);
|
|
43729
43758
|
const extra = account.fields?.length || account.keyUrl;
|
|
43730
43759
|
return b`<form class=${extra ? "key stacked" : "key"} data-id=${account.id} @submit=${(event2) => this.#submit(event2, account)} @keydown=${(event2) => this.#submitOnEnter(event2)} @input=${(event2) => this.#fill(event2)}>
|
|
43731
|
-
|
|
43760
|
+
${extra ? b`<div class="field"><sp-field-label for="key-secret" size="m">${this.#secretLabel(account)}</sp-field-label>${this.#secret(account)}</div>` : this.#secret(account)}
|
|
43761
|
+
${this.#getKey(account)}
|
|
43762
|
+
${extra ? this.#extra(account) : A}
|
|
43763
|
+
${extra ? b`<div class="buttons">${this.#buttons(account, busy)}</div>` : this.#buttons(account, busy)}
|
|
43764
|
+
</form>`;
|
|
43765
|
+
}
|
|
43766
|
+
#secretLabel(account) {
|
|
43767
|
+
return `${account.provider} ${secretNames[account.secret ?? "api-key"]}`;
|
|
43768
|
+
}
|
|
43769
|
+
#secret(account) {
|
|
43770
|
+
return b`<sp-textfield
|
|
43732
43771
|
size="m"
|
|
43733
43772
|
type="password"
|
|
43734
43773
|
autocomplete="off"
|
|
43735
|
-
|
|
43774
|
+
id="key-secret"
|
|
43775
|
+
label=${this.#secretLabel(account)}
|
|
43736
43776
|
placeholder=${`Paste the ${secretNames[account.secret ?? "api-key"]}`}
|
|
43737
43777
|
@keydown=${(event2) => this.#enterKey(event2)}
|
|
43738
|
-
></sp-textfield
|
|
43739
|
-
${this.#getKey(account)}
|
|
43740
|
-
${extra ? this.#extra(account) : A}
|
|
43741
|
-
${extra ? b`<div class="buttons">${this.#buttons(account, busy)}</div>` : this.#buttons(account, busy)}
|
|
43742
|
-
</form>`;
|
|
43778
|
+
></sp-textfield>`;
|
|
43743
43779
|
}
|
|
43744
43780
|
#buttons(account, busy) {
|
|
43745
43781
|
return b`<swc-button size="m" variant="accent" data-action="save" ?pending=${busy} ?disabled=${!busy && !this.#ready(account)} @click=${(event2) => this.#send(event2)}>${this.#saveLabel(account)}</swc-button>
|
|
@@ -44204,11 +44240,11 @@ function closure(found, source) {
|
|
|
44204
44240
|
}
|
|
44205
44241
|
return used;
|
|
44206
44242
|
}
|
|
44207
|
-
function args(value,
|
|
44243
|
+
function args(value, start2) {
|
|
44208
44244
|
const parts2 = [];
|
|
44209
44245
|
let depth = 0;
|
|
44210
|
-
let from =
|
|
44211
|
-
let at =
|
|
44246
|
+
let from = start2;
|
|
44247
|
+
let at = start2;
|
|
44212
44248
|
for (; at < value.length; at++) {
|
|
44213
44249
|
const char = value[at];
|
|
44214
44250
|
if (char === "(") depth++;
|
|
@@ -53592,14 +53628,14 @@ function splitToken(token2, offsets) {
|
|
|
53592
53628
|
return tokens;
|
|
53593
53629
|
}
|
|
53594
53630
|
function findFirstBreakpointAfter(breakpoints, offset3) {
|
|
53595
|
-
let
|
|
53631
|
+
let start2 = 0;
|
|
53596
53632
|
let end = breakpoints.length;
|
|
53597
|
-
while (
|
|
53598
|
-
const middle =
|
|
53599
|
-
if (breakpoints[middle] <= offset3)
|
|
53633
|
+
while (start2 < end) {
|
|
53634
|
+
const middle = start2 + (end - start2 >> 1);
|
|
53635
|
+
if (breakpoints[middle] <= offset3) start2 = middle + 1;
|
|
53600
53636
|
else end = middle;
|
|
53601
53637
|
}
|
|
53602
|
-
return
|
|
53638
|
+
return start2;
|
|
53603
53639
|
}
|
|
53604
53640
|
function splitTokens(tokens, breakpoints) {
|
|
53605
53641
|
const sorted = [...breakpoints instanceof Set ? breakpoints : new Set(breakpoints)].sort((a23, b13) => a23 - b13);
|
|
@@ -53607,11 +53643,11 @@ function splitTokens(tokens, breakpoints) {
|
|
|
53607
53643
|
return tokens.map((line) => {
|
|
53608
53644
|
return line.flatMap((token2) => {
|
|
53609
53645
|
const tokenEnd = token2.offset + token2.content.length;
|
|
53610
|
-
const
|
|
53611
|
-
let end =
|
|
53646
|
+
const start2 = findFirstBreakpointAfter(sorted, token2.offset);
|
|
53647
|
+
let end = start2;
|
|
53612
53648
|
while (end < sorted.length && sorted[end] < tokenEnd) end++;
|
|
53613
|
-
if (
|
|
53614
|
-
const breakpointsInToken = sorted.slice(
|
|
53649
|
+
if (start2 === end) return token2;
|
|
53650
|
+
const breakpointsInToken = sorted.slice(start2, end);
|
|
53615
53651
|
for (let index = 0; index < breakpointsInToken.length; index++) breakpointsInToken[index] -= token2.offset;
|
|
53616
53652
|
return splitToken(token2, breakpointsInToken);
|
|
53617
53653
|
});
|
|
@@ -53717,17 +53753,17 @@ function transformerDecorations() {
|
|
|
53717
53753
|
const ctx = getContext(this);
|
|
53718
53754
|
const lines = [...codeEl.children].filter((i26) => i26.type === "element" && i26.tagName === "span");
|
|
53719
53755
|
if (lines.length !== ctx.converter.lines.length) throw new ShikiError2(`Number of lines in code element (${lines.length}) does not match the number of lines in the source (${ctx.converter.lines.length}). Failed to apply decorations.`);
|
|
53720
|
-
function applyLineSection(line,
|
|
53756
|
+
function applyLineSection(line, start2, end, decoration) {
|
|
53721
53757
|
const lineEl = lines[line];
|
|
53722
53758
|
let text2 = "";
|
|
53723
53759
|
let startIndex = -1;
|
|
53724
53760
|
let endIndex = -1;
|
|
53725
|
-
if (
|
|
53761
|
+
if (start2 === 0) startIndex = 0;
|
|
53726
53762
|
if (end === 0) endIndex = 0;
|
|
53727
53763
|
if (end === Number.POSITIVE_INFINITY) endIndex = lineEl.children.length;
|
|
53728
53764
|
if (startIndex === -1 || endIndex === -1) for (let i26 = 0; i26 < lineEl.children.length; i26++) {
|
|
53729
53765
|
text2 += stringify3(lineEl.children[i26]);
|
|
53730
|
-
if (startIndex === -1 && text2.length ===
|
|
53766
|
+
if (startIndex === -1 && text2.length === start2) startIndex = i26 + 1;
|
|
53731
53767
|
if (endIndex === -1 && text2.length === end) endIndex = i26 + 1;
|
|
53732
53768
|
}
|
|
53733
53769
|
if (startIndex === -1) throw new ShikiError2(`Failed to find start index for decoration ${JSON.stringify(decoration.start)}`);
|
|
@@ -53765,11 +53801,11 @@ function transformerDecorations() {
|
|
|
53765
53801
|
const lineApplies = [];
|
|
53766
53802
|
const sorted = ctx.decorations.sort((a23, b13) => b13.start.offset - a23.start.offset || a23.end.offset - b13.end.offset);
|
|
53767
53803
|
for (const decoration of sorted) {
|
|
53768
|
-
const { start, end } = decoration;
|
|
53769
|
-
if (
|
|
53770
|
-
else if (
|
|
53771
|
-
applyLineSection(
|
|
53772
|
-
for (let i26 =
|
|
53804
|
+
const { start: start2, end } = decoration;
|
|
53805
|
+
if (start2.line === end.line) applyLineSection(start2.line, start2.character, end.character, decoration);
|
|
53806
|
+
else if (start2.line < end.line) {
|
|
53807
|
+
applyLineSection(start2.line, start2.character, Number.POSITIVE_INFINITY, decoration);
|
|
53808
|
+
for (let i26 = start2.line + 1; i26 < end.line; i26++) lineApplies.unshift(() => applyLine(i26, decoration));
|
|
53773
53809
|
applyLineSection(end.line, 0, end.character, decoration);
|
|
53774
53810
|
}
|
|
53775
53811
|
}
|
|
@@ -56255,9 +56291,9 @@ var PosixClassMap = /* @__PURE__ */ new Map([
|
|
|
56255
56291
|
["word", r39`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],
|
|
56256
56292
|
["xdigit", r39`\p{AHex}`]
|
|
56257
56293
|
]);
|
|
56258
|
-
function range(
|
|
56294
|
+
function range(start2, end) {
|
|
56259
56295
|
const range22 = [];
|
|
56260
|
-
for (let i26 =
|
|
56296
|
+
for (let i26 = start2; i26 <= end; i26++) {
|
|
56261
56297
|
range22.push(i26);
|
|
56262
56298
|
}
|
|
56263
56299
|
return range22;
|
|
@@ -56266,8 +56302,8 @@ function titleEntry(codePoint) {
|
|
|
56266
56302
|
const char = cp(codePoint);
|
|
56267
56303
|
return [char.toLowerCase(), char];
|
|
56268
56304
|
}
|
|
56269
|
-
function titleRange(
|
|
56270
|
-
return range(
|
|
56305
|
+
function titleRange(start2, end) {
|
|
56306
|
+
return range(start2, end).map((codePoint) => titleEntry(codePoint));
|
|
56271
56307
|
}
|
|
56272
56308
|
var UnicodePropertiesWithSpecificCase = /* @__PURE__ */ new Set([
|
|
56273
56309
|
"Lower",
|
|
@@ -57497,15 +57533,15 @@ function getCharEscape(codePoint, { escDigit, inCharClass, useFlagV }) {
|
|
|
57497
57533
|
function getCodePointRangesFromChars(chars) {
|
|
57498
57534
|
const codePoints = chars.map((char) => char.codePointAt(0)).sort((a23, b13) => a23 - b13);
|
|
57499
57535
|
const values = [];
|
|
57500
|
-
let
|
|
57536
|
+
let start2 = null;
|
|
57501
57537
|
for (let i26 = 0; i26 < codePoints.length; i26++) {
|
|
57502
57538
|
if (codePoints[i26 + 1] === codePoints[i26] + 1) {
|
|
57503
|
-
|
|
57504
|
-
} else if (
|
|
57539
|
+
start2 ??= codePoints[i26];
|
|
57540
|
+
} else if (start2 === null) {
|
|
57505
57541
|
values.push(codePoints[i26]);
|
|
57506
57542
|
} else {
|
|
57507
|
-
values.push([
|
|
57508
|
-
|
|
57543
|
+
values.push([start2, codePoints[i26]]);
|
|
57544
|
+
start2 = null;
|
|
57509
57545
|
}
|
|
57510
57546
|
}
|
|
57511
57547
|
return values;
|
|
@@ -59149,7 +59185,7 @@ var InteractionManager = class {
|
|
|
59149
59185
|
return range3 == null ? void 0 : this.selectionEnds(range3);
|
|
59150
59186
|
}
|
|
59151
59187
|
selectionEnds(range3) {
|
|
59152
|
-
const
|
|
59188
|
+
const start2 = {
|
|
59153
59189
|
lineNumber: range3.start,
|
|
59154
59190
|
side: range3.side
|
|
59155
59191
|
};
|
|
@@ -59157,14 +59193,14 @@ var InteractionManager = class {
|
|
|
59157
59193
|
lineNumber: range3.end,
|
|
59158
59194
|
side: range3.endSide ?? range3.side
|
|
59159
59195
|
};
|
|
59160
|
-
const startIndex = this.selectionPointRowIndex(
|
|
59196
|
+
const startIndex = this.selectionPointRowIndex(start2);
|
|
59161
59197
|
const endIndex = this.selectionPointRowIndex(end);
|
|
59162
59198
|
if (startIndex == null || endIndex == null) return;
|
|
59163
59199
|
return startIndex > endIndex ? {
|
|
59164
59200
|
top: end,
|
|
59165
|
-
bottom:
|
|
59201
|
+
bottom: start2
|
|
59166
59202
|
} : {
|
|
59167
|
-
top:
|
|
59203
|
+
top: start2,
|
|
59168
59204
|
bottom: end
|
|
59169
59205
|
};
|
|
59170
59206
|
}
|
|
@@ -59482,9 +59518,9 @@ var InteractionManager = class {
|
|
|
59482
59518
|
buildSelectedLineRange(anchor, current) {
|
|
59483
59519
|
return this.buildSelectionRange(anchor.lineNumber, current.lineNumber, anchor.side, current.side);
|
|
59484
59520
|
}
|
|
59485
|
-
buildSelectionRange(
|
|
59521
|
+
buildSelectionRange(start2, end, side, endSide) {
|
|
59486
59522
|
return {
|
|
59487
|
-
start,
|
|
59523
|
+
start: start2,
|
|
59488
59524
|
end,
|
|
59489
59525
|
...side != null ? { side } : {},
|
|
59490
59526
|
...side !== endSide && endSide != null ? { endSide } : {}
|
|
@@ -61069,9 +61105,9 @@ function computeLineOffsets(contents) {
|
|
|
61069
61105
|
function linesFromFileContents(contents) {
|
|
61070
61106
|
const offsets = computeLineOffsets(contents);
|
|
61071
61107
|
return Array.from({ length: offsets.length }, (_9, i26) => {
|
|
61072
|
-
const
|
|
61108
|
+
const start2 = offsets[i26];
|
|
61073
61109
|
const end = offsets[i26 + 1] ?? contents.length;
|
|
61074
|
-
return contents.slice(
|
|
61110
|
+
return contents.slice(start2, end);
|
|
61075
61111
|
});
|
|
61076
61112
|
}
|
|
61077
61113
|
|
|
@@ -63360,11 +63396,11 @@ function cloneFileDiffMetadata(fileDiff) {
|
|
|
63360
63396
|
}
|
|
63361
63397
|
|
|
63362
63398
|
// node_modules/@pierre/diffs/dist/utils/getHunkSideBoundaries.js
|
|
63363
|
-
function getHunkSideStartBoundary(
|
|
63364
|
-
return
|
|
63399
|
+
function getHunkSideStartBoundary(start2, count2) {
|
|
63400
|
+
return start2 - (count2 === 0 ? 0 : 1);
|
|
63365
63401
|
}
|
|
63366
|
-
function getHunkSideEndBoundary(
|
|
63367
|
-
return getHunkSideStartBoundary(
|
|
63402
|
+
function getHunkSideEndBoundary(start2, count2) {
|
|
63403
|
+
return getHunkSideStartBoundary(start2, count2) + count2;
|
|
63368
63404
|
}
|
|
63369
63405
|
|
|
63370
63406
|
// node_modules/@pierre/diffs/dist/utils/composeCacheKey.js
|
|
@@ -65283,12 +65319,12 @@ function getNearestRenderableAdditionLine({ fileDiff, lineNumber, direction, exp
|
|
|
65283
65319
|
}
|
|
65284
65320
|
if (lineNumber >= modeledEnd) return lineNumber;
|
|
65285
65321
|
if (direction === "down") {
|
|
65286
|
-
for (const [
|
|
65322
|
+
for (const [start2, end] of ranges) if (end > lineNumber) return Math.max(start2, lineNumber);
|
|
65287
65323
|
return;
|
|
65288
65324
|
}
|
|
65289
65325
|
for (let index = ranges.length - 1; index >= 0; index--) {
|
|
65290
|
-
const [
|
|
65291
|
-
if (
|
|
65326
|
+
const [start2, end] = ranges[index];
|
|
65327
|
+
if (start2 <= lineNumber) return Math.min(end - 1, lineNumber);
|
|
65292
65328
|
}
|
|
65293
65329
|
}
|
|
65294
65330
|
|
|
@@ -65651,21 +65687,21 @@ function getContextLineIterationBounds(state2, count2, diffStyle) {
|
|
|
65651
65687
|
if (!state2.isWindowedHighlight || count2 <= 0) return [0, count2];
|
|
65652
65688
|
const ranges = [];
|
|
65653
65689
|
function pushRange(currentCount) {
|
|
65654
|
-
const
|
|
65690
|
+
const start3 = Math.max(0, state2.viewportStart - currentCount);
|
|
65655
65691
|
const end2 = Math.min(count2, state2.viewportEnd - currentCount);
|
|
65656
|
-
if (end2 >
|
|
65692
|
+
if (end2 > start3) ranges.push([start3, end2]);
|
|
65657
65693
|
}
|
|
65658
65694
|
if (diffStyle !== "split") pushRange(state2.unifiedCount);
|
|
65659
65695
|
if (diffStyle !== "unified") pushRange(state2.splitCount);
|
|
65660
65696
|
if (ranges.length === 0) return [0, 0];
|
|
65661
|
-
let
|
|
65697
|
+
let start2 = ranges[0][0];
|
|
65662
65698
|
let end = ranges[0][1];
|
|
65663
65699
|
for (let index = 1; index < ranges.length; index++) {
|
|
65664
65700
|
const range3 = ranges[index];
|
|
65665
|
-
|
|
65701
|
+
start2 = Math.min(start2, range3[0]);
|
|
65666
65702
|
end = Math.max(end, range3[1]);
|
|
65667
65703
|
}
|
|
65668
|
-
return [
|
|
65704
|
+
return [start2, end];
|
|
65669
65705
|
}
|
|
65670
65706
|
function walkContextLines(state2, count2, diffStyle, callback, onSkippedStart, shouldBreak) {
|
|
65671
65707
|
const [startIndex, endIndex] = getContextLineIterationBounds(state2, count2, diffStyle);
|
|
@@ -65693,10 +65729,10 @@ function getChangeIterationRanges(state2, content, diffStyle) {
|
|
|
65693
65729
|
const useSplit = diffStyle !== "unified";
|
|
65694
65730
|
const iterationSpace = diffStyle === "unified" ? "unified" : "split";
|
|
65695
65731
|
const iterationRanges = [];
|
|
65696
|
-
function getVisibleRange(
|
|
65697
|
-
if (
|
|
65698
|
-
const visibleStart = Math.max(0, state2.viewportStart -
|
|
65699
|
-
const visibleEnd = Math.min(count2, state2.viewportEnd -
|
|
65732
|
+
function getVisibleRange(start2, count2) {
|
|
65733
|
+
if (start2 + count2 <= state2.viewportStart || start2 >= state2.viewportEnd) return;
|
|
65734
|
+
const visibleStart = Math.max(0, state2.viewportStart - start2);
|
|
65735
|
+
const visibleEnd = Math.min(count2, state2.viewportEnd - start2);
|
|
65700
65736
|
return visibleEnd > visibleStart ? [visibleStart, visibleEnd] : void 0;
|
|
65701
65737
|
}
|
|
65702
65738
|
function mapRangeToIteration(range3, kind) {
|
|
@@ -65705,8 +65741,8 @@ function getChangeIterationRanges(state2, content, diffStyle) {
|
|
|
65705
65741
|
}
|
|
65706
65742
|
function pushRange(range3, kind) {
|
|
65707
65743
|
if (range3 == null) return;
|
|
65708
|
-
const [
|
|
65709
|
-
if (end >
|
|
65744
|
+
const [start2, end] = mapRangeToIteration(range3, kind);
|
|
65745
|
+
if (end > start2) iterationRanges.push([start2, end]);
|
|
65710
65746
|
}
|
|
65711
65747
|
if (useUnified) {
|
|
65712
65748
|
pushRange(getVisibleRange(state2.unifiedCount, content.deletions), "deletions");
|
|
@@ -65719,10 +65755,10 @@ function getChangeIterationRanges(state2, content, diffStyle) {
|
|
|
65719
65755
|
if (iterationRanges.length === 0) return iterationRanges;
|
|
65720
65756
|
iterationRanges.sort((a23, b13) => a23[0] - b13[0]);
|
|
65721
65757
|
const merged2 = [iterationRanges[0]];
|
|
65722
|
-
for (const [
|
|
65758
|
+
for (const [start2, end] of iterationRanges.slice(1)) {
|
|
65723
65759
|
const last = merged2[merged2.length - 1];
|
|
65724
|
-
if (
|
|
65725
|
-
else merged2.push([
|
|
65760
|
+
if (start2 <= last[1]) last[1] = Math.max(last[1], end);
|
|
65761
|
+
else merged2.push([start2, end]);
|
|
65726
65762
|
}
|
|
65727
65763
|
return merged2;
|
|
65728
65764
|
}
|
|
@@ -66306,17 +66342,17 @@ function normalizeEditorLines(lines) {
|
|
|
66306
66342
|
}
|
|
66307
66343
|
function findDivergenceCore(deletionLines, additionLines) {
|
|
66308
66344
|
const maxStart = Math.min(deletionLines.length, additionLines.length);
|
|
66309
|
-
let
|
|
66310
|
-
while (
|
|
66345
|
+
let start2 = 0;
|
|
66346
|
+
while (start2 < maxStart && deletionLines[start2] === additionLines[start2]) start2++;
|
|
66311
66347
|
let deletionEnd = deletionLines.length;
|
|
66312
66348
|
let additionEnd = additionLines.length;
|
|
66313
|
-
while (deletionEnd >
|
|
66349
|
+
while (deletionEnd > start2 && additionEnd > start2 && deletionLines[deletionEnd - 1] === additionLines[additionEnd - 1]) {
|
|
66314
66350
|
deletionEnd--;
|
|
66315
66351
|
additionEnd--;
|
|
66316
66352
|
}
|
|
66317
|
-
if (
|
|
66353
|
+
if (start2 === deletionEnd && start2 === additionEnd) return;
|
|
66318
66354
|
return {
|
|
66319
|
-
start,
|
|
66355
|
+
start: start2,
|
|
66320
66356
|
deletionEnd,
|
|
66321
66357
|
additionEnd
|
|
66322
66358
|
};
|
|
@@ -66354,8 +66390,8 @@ function applySessionChangedLines(diff, changedAdditionLineIndexes, parseDiffOpt
|
|
|
66354
66390
|
hunkIndex++;
|
|
66355
66391
|
}
|
|
66356
66392
|
const hunk = hunks[hunkIndex];
|
|
66357
|
-
const
|
|
66358
|
-
if (
|
|
66393
|
+
const start2 = hunk == null ? void 0 : getHunkAdditionStart(hunk);
|
|
66394
|
+
if (start2 == null || line < start2 || regionIndex != null && regionIndex !== hunkIndex) return rebuildSessionHunks(diff, parseDiffOptions, getPreviousAdditionLine);
|
|
66359
66395
|
regionIndex = hunkIndex;
|
|
66360
66396
|
}
|
|
66361
66397
|
if (regionIndex == null) return;
|
|
@@ -66451,10 +66487,10 @@ function rebuildExpansionFromAnchors(diff, anchors) {
|
|
|
66451
66487
|
if (gapEnd <= gapStart) return;
|
|
66452
66488
|
let fromStart = 0;
|
|
66453
66489
|
let fromEnd = 0;
|
|
66454
|
-
for (const [
|
|
66455
|
-
if (end <= gapStart ||
|
|
66456
|
-
if (
|
|
66457
|
-
if (end >= gapEnd) fromEnd = Math.max(fromEnd, gapEnd - Math.max(
|
|
66490
|
+
for (const [start2, end] of anchors) {
|
|
66491
|
+
if (end <= gapStart || start2 >= gapEnd) continue;
|
|
66492
|
+
if (start2 <= gapStart) fromStart = Math.max(fromStart, Math.min(end, gapEnd) - gapStart);
|
|
66493
|
+
if (end >= gapEnd) fromEnd = Math.max(fromEnd, gapEnd - Math.max(start2, gapStart));
|
|
66458
66494
|
}
|
|
66459
66495
|
if (fromStart > 0 || fromEnd > 0) rebuilt.set(key2, {
|
|
66460
66496
|
fromStart,
|
|
@@ -71425,7 +71461,7 @@ var Splitview = class {
|
|
|
71425
71461
|
for (const item2 of this.viewItems) item2.enabled = false;
|
|
71426
71462
|
const doc = (_sash$ownerDocument = sash.ownerDocument) !== null && _sash$ownerDocument !== void 0 ? _sash$ownerDocument : document;
|
|
71427
71463
|
const iframes = disableIframePointEvents(doc);
|
|
71428
|
-
const
|
|
71464
|
+
const start2 = this._orientation === "HORIZONTAL" ? event2.clientX : event2.clientY;
|
|
71429
71465
|
const sashIndex = firstIndex(this.sashes, (s19) => s19.container === sash);
|
|
71430
71466
|
const sizes = this.viewItems.map((x7) => x7.size);
|
|
71431
71467
|
let snapBefore;
|
|
@@ -71459,7 +71495,7 @@ var Splitview = class {
|
|
|
71459
71495
|
};
|
|
71460
71496
|
}
|
|
71461
71497
|
const onPointerMove = (event3) => {
|
|
71462
|
-
const delta = (this._orientation === "HORIZONTAL" ? event3.clientX : event3.clientY) -
|
|
71498
|
+
const delta = (this._orientation === "HORIZONTAL" ? event3.clientX : event3.clientY) - start2;
|
|
71463
71499
|
this.resize(sashIndex, delta, sizes, void 0, void 0, minDelta, maxDelta, snapBefore, snapAfter);
|
|
71464
71500
|
this.distributeEmptySpace();
|
|
71465
71501
|
this.layoutViews();
|
|
@@ -76057,11 +76093,11 @@ var BaseTabGroupIndicator = class {
|
|
|
76057
76093
|
*/
|
|
76058
76094
|
trackUnderlines() {
|
|
76059
76095
|
if (this._rafId !== null) cancelAnimationFrame(this._rafId);
|
|
76060
|
-
const
|
|
76096
|
+
const start2 = performance.now();
|
|
76061
76097
|
const duration = 250;
|
|
76062
76098
|
const tick = () => {
|
|
76063
76099
|
this._positionUnderlinesSync();
|
|
76064
|
-
if (performance.now() -
|
|
76100
|
+
if (performance.now() - start2 < duration) this._rafId = requestAnimationFrame(tick);
|
|
76065
76101
|
else this._rafId = null;
|
|
76066
76102
|
};
|
|
76067
76103
|
this._rafId = requestAnimationFrame(tick);
|
|
@@ -78326,12 +78362,12 @@ var Tabs = class extends CompositeDisposable {
|
|
|
78326
78362
|
_scrollTabIntoView(element2, isVertical) {
|
|
78327
78363
|
const parentElement = element2.parentElement;
|
|
78328
78364
|
if (!parentElement) return;
|
|
78329
|
-
const
|
|
78365
|
+
const start2 = isVertical ? element2.offsetTop : element2.offsetLeft;
|
|
78330
78366
|
const size4 = isVertical ? element2.offsetHeight : element2.offsetWidth;
|
|
78331
78367
|
const scrollStart = isVertical ? parentElement.scrollTop : parentElement.scrollLeft;
|
|
78332
78368
|
const clientSize = isVertical ? parentElement.clientHeight : parentElement.clientWidth;
|
|
78333
|
-
if (
|
|
78334
|
-
else parentElement.scrollLeft =
|
|
78369
|
+
if (start2 < scrollStart || start2 + size4 > scrollStart + clientSize) if (isVertical) parentElement.scrollTop = start2;
|
|
78370
|
+
else parentElement.scrollLeft = start2;
|
|
78335
78371
|
}
|
|
78336
78372
|
/**
|
|
78337
78373
|
* Activate a tab in response to a plain (non-shift) left pointerdown.
|