@pierre/diffs 1.3.0-beta.1 → 1.3.0-beta.3
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/components/CodeView.d.ts +4 -0
- package/dist/components/CodeView.d.ts.map +1 -1
- package/dist/components/CodeView.js +38 -0
- package/dist/components/CodeView.js.map +1 -1
- package/dist/components/File.d.ts.map +1 -1
- package/dist/components/File.js +9 -9
- package/dist/components/File.js.map +1 -1
- package/dist/components/FileDiff.d.ts.map +1 -1
- package/dist/components/FileDiff.js +3 -2
- package/dist/components/FileDiff.js.map +1 -1
- package/dist/components/VirtualizedFile.js +6 -1
- package/dist/components/VirtualizedFile.js.map +1 -1
- package/dist/components/VirtualizedFileDiff.js +22 -42
- package/dist/components/VirtualizedFileDiff.js.map +1 -1
- package/dist/components/Virtualizer.js +5 -3
- package/dist/components/Virtualizer.js.map +1 -1
- package/dist/editor/editor.d.ts +7 -1
- package/dist/editor/editor.d.ts.map +1 -1
- package/dist/editor/editor.js +550 -405
- package/dist/editor/editor.js.map +1 -1
- package/dist/editor/editor2.js +6 -0
- package/dist/editor/editor2.js.map +1 -0
- package/dist/editor/pieceTable.d.ts +1 -1
- package/dist/editor/pieceTable.d.ts.map +1 -1
- package/dist/editor/pieceTable.js +2 -22
- package/dist/editor/pieceTable.js.map +1 -1
- package/dist/editor/quickEdit.js +2 -4
- package/dist/editor/quickEdit.js.map +1 -1
- package/dist/editor/searchPanel.d.ts +6 -7
- package/dist/editor/searchPanel.d.ts.map +1 -1
- package/dist/editor/searchPanel.js +102 -137
- package/dist/editor/searchPanel.js.map +1 -1
- package/dist/editor/selection.js +8 -2
- package/dist/editor/selection.js.map +1 -1
- package/dist/editor/sprite.d.ts +7 -0
- package/dist/editor/sprite.d.ts.map +1 -0
- package/dist/editor/sprite.js +38 -0
- package/dist/editor/sprite.js.map +1 -0
- package/dist/editor/textDocument.d.ts +1 -1
- package/dist/editor/textDocument.d.ts.map +1 -1
- package/dist/editor/textDocument.js +2 -2
- package/dist/editor/textDocument.js.map +1 -1
- package/dist/editor/textMeasure.js +3 -3
- package/dist/editor/textMeasure.js.map +1 -1
- package/dist/editor/tokenzier.d.ts +6 -2
- package/dist/editor/tokenzier.d.ts.map +1 -1
- package/dist/editor/tokenzier.js +127 -85
- package/dist/editor/tokenzier.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/react/index.d.ts +2 -2
- package/dist/react/jsx.d.ts +1 -0
- package/dist/react/jsx.d.ts.map +1 -1
- package/dist/react/types.js +1 -0
- package/dist/renderers/DiffHunksRenderer.js +5 -9
- package/dist/renderers/DiffHunksRenderer.js.map +1 -1
- package/dist/ssr/index.d.ts +2 -2
- package/dist/style.js +1 -1
- package/dist/style.js.map +1 -1
- package/dist/types.d.ts +13 -12
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/computeEstimatedDiffHeights.js +9 -20
- package/dist/utils/computeEstimatedDiffHeights.js.map +1 -1
- package/dist/utils/iterateOverDiff.js +147 -182
- package/dist/utils/iterateOverDiff.js.map +1 -1
- package/dist/utils/virtualDiffLayout.d.ts +23 -2
- package/dist/utils/virtualDiffLayout.d.ts.map +1 -1
- package/dist/utils/virtualDiffLayout.js +41 -1
- package/dist/utils/virtualDiffLayout.js.map +1 -1
- package/dist/worker/WorkerPoolManager.js +1 -1
- package/dist/worker/WorkerPoolManager.js.map +1 -1
- package/dist/worker/{wasm-D4DU5jgR.js → wasm-BaDzIkIn.js} +2 -2
- package/dist/worker/wasm-BaDzIkIn.js.map +1 -0
- package/dist/worker/worker-portable.js +294 -292
- package/dist/worker/worker-portable.js.map +1 -1
- package/dist/worker/worker.js +179 -181
- package/dist/worker/worker.js.map +1 -1
- package/package.json +22 -21
- package/dist/editor/css.d.ts +0 -6
- package/dist/editor/css.d.ts.map +0 -1
- package/dist/editor/css.js +0 -218
- package/dist/editor/css.js.map +0 -1
- package/dist/worker/wasm-D4DU5jgR.js.map +0 -1
|
@@ -10,7 +10,7 @@ var __export = (all$1) => {
|
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
//#endregion
|
|
13
|
-
//#region ../../node_modules/shiki/dist/chunk-CtajNgzt.mjs
|
|
13
|
+
//#region ../../node_modules/.bun/shiki@4.0.2/node_modules/shiki/dist/chunk-CtajNgzt.mjs
|
|
14
14
|
var __defProp$1 = Object.defineProperty;
|
|
15
15
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
16
16
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -45,7 +45,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
45
45
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
46
46
|
|
|
47
47
|
//#endregion
|
|
48
|
-
//#region ../../node_modules/@shikijs/types/dist/index.mjs
|
|
48
|
+
//#region ../../node_modules/.bun/@shikijs+types@4.0.2/node_modules/@shikijs/types/dist/index.mjs
|
|
49
49
|
var ShikiError$1 = class extends Error {
|
|
50
50
|
constructor(message) {
|
|
51
51
|
super(message);
|
|
@@ -54,7 +54,7 @@ var ShikiError$1 = class extends Error {
|
|
|
54
54
|
};
|
|
55
55
|
|
|
56
56
|
//#endregion
|
|
57
|
-
//#region ../../node_modules/@shikijs/vscode-textmate/dist/index.js
|
|
57
|
+
//#region ../../node_modules/.bun/@shikijs+vscode-textmate@10.0.2/node_modules/@shikijs/vscode-textmate/dist/index.js
|
|
58
58
|
function clone(something) {
|
|
59
59
|
return doClone(something);
|
|
60
60
|
}
|
|
@@ -2911,7 +2911,7 @@ var Registry = class {
|
|
|
2911
2911
|
var INITIAL = StateStackImpl.NULL;
|
|
2912
2912
|
|
|
2913
2913
|
//#endregion
|
|
2914
|
-
//#region ../../node_modules/@shikijs/primitive/dist/index.mjs
|
|
2914
|
+
//#region ../../node_modules/.bun/@shikijs+primitive@4.0.2/node_modules/@shikijs/primitive/dist/index.mjs
|
|
2915
2915
|
function resolveColorReplacements(theme, options) {
|
|
2916
2916
|
const replacements = typeof theme === "string" ? {} : { ...theme.colorReplacements };
|
|
2917
2917
|
const themeName = typeof theme === "string" ? theme : theme.name;
|
|
@@ -3710,7 +3710,7 @@ function alignThemesTokenization(...themes) {
|
|
|
3710
3710
|
}
|
|
3711
3711
|
|
|
3712
3712
|
//#endregion
|
|
3713
|
-
//#region ../../node_modules/html-void-elements/index.js
|
|
3713
|
+
//#region ../../node_modules/.bun/html-void-elements@3.0.0/node_modules/html-void-elements/index.js
|
|
3714
3714
|
/**
|
|
3715
3715
|
* List of HTML void tag names.
|
|
3716
3716
|
*
|
|
@@ -3740,7 +3740,7 @@ const htmlVoidElements = [
|
|
|
3740
3740
|
];
|
|
3741
3741
|
|
|
3742
3742
|
//#endregion
|
|
3743
|
-
//#region ../../node_modules/property-information/lib/util/schema.js
|
|
3743
|
+
//#region ../../node_modules/.bun/property-information@7.1.0/node_modules/property-information/lib/util/schema.js
|
|
3744
3744
|
/**
|
|
3745
3745
|
* @import {Schema as SchemaType, Space} from 'property-information'
|
|
3746
3746
|
*/
|
|
@@ -3769,7 +3769,7 @@ Schema.prototype.property = {};
|
|
|
3769
3769
|
Schema.prototype.space = undefined;
|
|
3770
3770
|
|
|
3771
3771
|
//#endregion
|
|
3772
|
-
//#region ../../node_modules/property-information/lib/util/merge.js
|
|
3772
|
+
//#region ../../node_modules/.bun/property-information@7.1.0/node_modules/property-information/lib/util/merge.js
|
|
3773
3773
|
/**
|
|
3774
3774
|
* @param {ReadonlyArray<Schema>} definitions
|
|
3775
3775
|
* Definitions.
|
|
@@ -3791,7 +3791,7 @@ function merge(definitions, space) {
|
|
|
3791
3791
|
}
|
|
3792
3792
|
|
|
3793
3793
|
//#endregion
|
|
3794
|
-
//#region ../../node_modules/property-information/lib/normalize.js
|
|
3794
|
+
//#region ../../node_modules/.bun/property-information@7.1.0/node_modules/property-information/lib/normalize.js
|
|
3795
3795
|
/**
|
|
3796
3796
|
* Get the cleaned case insensitive form of an attribute or property.
|
|
3797
3797
|
*
|
|
@@ -3806,7 +3806,7 @@ function normalize(value) {
|
|
|
3806
3806
|
}
|
|
3807
3807
|
|
|
3808
3808
|
//#endregion
|
|
3809
|
-
//#region ../../node_modules/property-information/lib/util/info.js
|
|
3809
|
+
//#region ../../node_modules/.bun/property-information@7.1.0/node_modules/property-information/lib/util/info.js
|
|
3810
3810
|
/**
|
|
3811
3811
|
* @import {Info as InfoType} from 'property-information'
|
|
3812
3812
|
*/
|
|
@@ -3839,7 +3839,7 @@ Info.prototype.spaceSeparated = false;
|
|
|
3839
3839
|
Info.prototype.space = undefined;
|
|
3840
3840
|
|
|
3841
3841
|
//#endregion
|
|
3842
|
-
//#region ../../node_modules/property-information/lib/util/types.js
|
|
3842
|
+
//#region ../../node_modules/.bun/property-information@7.1.0/node_modules/property-information/lib/util/types.js
|
|
3843
3843
|
var types_exports = /* @__PURE__ */ __export({
|
|
3844
3844
|
boolean: () => boolean,
|
|
3845
3845
|
booleanish: () => booleanish,
|
|
@@ -3862,7 +3862,7 @@ function increment() {
|
|
|
3862
3862
|
}
|
|
3863
3863
|
|
|
3864
3864
|
//#endregion
|
|
3865
|
-
//#region ../../node_modules/property-information/lib/util/defined-info.js
|
|
3865
|
+
//#region ../../node_modules/.bun/property-information@7.1.0/node_modules/property-information/lib/util/defined-info.js
|
|
3866
3866
|
const checks = Object.keys(types_exports);
|
|
3867
3867
|
var DefinedInfo = class extends Info {
|
|
3868
3868
|
/**
|
|
@@ -3910,7 +3910,7 @@ function mark(values, key$1, value) {
|
|
|
3910
3910
|
}
|
|
3911
3911
|
|
|
3912
3912
|
//#endregion
|
|
3913
|
-
//#region ../../node_modules/property-information/lib/util/create.js
|
|
3913
|
+
//#region ../../node_modules/.bun/property-information@7.1.0/node_modules/property-information/lib/util/create.js
|
|
3914
3914
|
/**
|
|
3915
3915
|
* @param {Definition} definition
|
|
3916
3916
|
* Definition.
|
|
@@ -3935,7 +3935,7 @@ function create(definition) {
|
|
|
3935
3935
|
}
|
|
3936
3936
|
|
|
3937
3937
|
//#endregion
|
|
3938
|
-
//#region ../../node_modules/property-information/lib/aria.js
|
|
3938
|
+
//#region ../../node_modules/.bun/property-information@7.1.0/node_modules/property-information/lib/aria.js
|
|
3939
3939
|
const aria = create({
|
|
3940
3940
|
properties: {
|
|
3941
3941
|
ariaActiveDescendant: null,
|
|
@@ -3994,7 +3994,7 @@ const aria = create({
|
|
|
3994
3994
|
});
|
|
3995
3995
|
|
|
3996
3996
|
//#endregion
|
|
3997
|
-
//#region ../../node_modules/property-information/lib/util/case-sensitive-transform.js
|
|
3997
|
+
//#region ../../node_modules/.bun/property-information@7.1.0/node_modules/property-information/lib/util/case-sensitive-transform.js
|
|
3998
3998
|
/**
|
|
3999
3999
|
* @param {Record<string, string>} attributes
|
|
4000
4000
|
* Attributes.
|
|
@@ -4008,7 +4008,7 @@ function caseSensitiveTransform(attributes, attribute) {
|
|
|
4008
4008
|
}
|
|
4009
4009
|
|
|
4010
4010
|
//#endregion
|
|
4011
|
-
//#region ../../node_modules/property-information/lib/util/case-insensitive-transform.js
|
|
4011
|
+
//#region ../../node_modules/.bun/property-information@7.1.0/node_modules/property-information/lib/util/case-insensitive-transform.js
|
|
4012
4012
|
/**
|
|
4013
4013
|
* @param {Record<string, string>} attributes
|
|
4014
4014
|
* Attributes.
|
|
@@ -4022,7 +4022,7 @@ function caseInsensitiveTransform(attributes, property) {
|
|
|
4022
4022
|
}
|
|
4023
4023
|
|
|
4024
4024
|
//#endregion
|
|
4025
|
-
//#region ../../node_modules/property-information/lib/html.js
|
|
4025
|
+
//#region ../../node_modules/.bun/property-information@7.1.0/node_modules/property-information/lib/html.js
|
|
4026
4026
|
const html$3 = create({
|
|
4027
4027
|
attributes: {
|
|
4028
4028
|
acceptcharset: "accept-charset",
|
|
@@ -4335,7 +4335,7 @@ const html$3 = create({
|
|
|
4335
4335
|
});
|
|
4336
4336
|
|
|
4337
4337
|
//#endregion
|
|
4338
|
-
//#region ../../node_modules/property-information/lib/svg.js
|
|
4338
|
+
//#region ../../node_modules/.bun/property-information@7.1.0/node_modules/property-information/lib/svg.js
|
|
4339
4339
|
const svg$1 = create({
|
|
4340
4340
|
attributes: {
|
|
4341
4341
|
accentHeight: "accent-height",
|
|
@@ -4894,7 +4894,7 @@ const svg$1 = create({
|
|
|
4894
4894
|
});
|
|
4895
4895
|
|
|
4896
4896
|
//#endregion
|
|
4897
|
-
//#region ../../node_modules/property-information/lib/xlink.js
|
|
4897
|
+
//#region ../../node_modules/.bun/property-information@7.1.0/node_modules/property-information/lib/xlink.js
|
|
4898
4898
|
const xlink = create({
|
|
4899
4899
|
properties: {
|
|
4900
4900
|
xLinkActuate: null,
|
|
@@ -4912,7 +4912,7 @@ const xlink = create({
|
|
|
4912
4912
|
});
|
|
4913
4913
|
|
|
4914
4914
|
//#endregion
|
|
4915
|
-
//#region ../../node_modules/property-information/lib/xmlns.js
|
|
4915
|
+
//#region ../../node_modules/.bun/property-information@7.1.0/node_modules/property-information/lib/xmlns.js
|
|
4916
4916
|
const xmlns = create({
|
|
4917
4917
|
attributes: { xmlnsxlink: "xmlns:xlink" },
|
|
4918
4918
|
properties: {
|
|
@@ -4924,7 +4924,7 @@ const xmlns = create({
|
|
|
4924
4924
|
});
|
|
4925
4925
|
|
|
4926
4926
|
//#endregion
|
|
4927
|
-
//#region ../../node_modules/property-information/lib/xml.js
|
|
4927
|
+
//#region ../../node_modules/.bun/property-information@7.1.0/node_modules/property-information/lib/xml.js
|
|
4928
4928
|
const xml = create({
|
|
4929
4929
|
properties: {
|
|
4930
4930
|
xmlBase: null,
|
|
@@ -4938,7 +4938,7 @@ const xml = create({
|
|
|
4938
4938
|
});
|
|
4939
4939
|
|
|
4940
4940
|
//#endregion
|
|
4941
|
-
//#region ../../node_modules/property-information/lib/hast-to-react.js
|
|
4941
|
+
//#region ../../node_modules/.bun/property-information@7.1.0/node_modules/property-information/lib/hast-to-react.js
|
|
4942
4942
|
/**
|
|
4943
4943
|
* Special cases for React (`Record<string, string>`).
|
|
4944
4944
|
*
|
|
@@ -4971,7 +4971,7 @@ const hastToReact = {
|
|
|
4971
4971
|
};
|
|
4972
4972
|
|
|
4973
4973
|
//#endregion
|
|
4974
|
-
//#region ../../node_modules/property-information/lib/find.js
|
|
4974
|
+
//#region ../../node_modules/.bun/property-information@7.1.0/node_modules/property-information/lib/find.js
|
|
4975
4975
|
const cap = /[A-Z]/g;
|
|
4976
4976
|
const dash = /-[a-z]/g;
|
|
4977
4977
|
const valid = /^data[-\w.:]+$/i;
|
|
@@ -5050,7 +5050,7 @@ function camelcase($0) {
|
|
|
5050
5050
|
}
|
|
5051
5051
|
|
|
5052
5052
|
//#endregion
|
|
5053
|
-
//#region ../../node_modules/property-information/index.js
|
|
5053
|
+
//#region ../../node_modules/.bun/property-information@7.1.0/node_modules/property-information/index.js
|
|
5054
5054
|
const html = merge([
|
|
5055
5055
|
aria,
|
|
5056
5056
|
html$3,
|
|
@@ -5067,7 +5067,7 @@ const svg = merge([
|
|
|
5067
5067
|
], "svg");
|
|
5068
5068
|
|
|
5069
5069
|
//#endregion
|
|
5070
|
-
//#region ../../node_modules/zwitch/index.js
|
|
5070
|
+
//#region ../../node_modules/.bun/zwitch@2.0.4/node_modules/zwitch/index.js
|
|
5071
5071
|
/**
|
|
5072
5072
|
* @callback Handler
|
|
5073
5073
|
* Handle a value, with a certain ID field set to a certain value.
|
|
@@ -5175,7 +5175,7 @@ function zwitch(key$1, options) {
|
|
|
5175
5175
|
}
|
|
5176
5176
|
|
|
5177
5177
|
//#endregion
|
|
5178
|
-
//#region ../../node_modules/stringify-entities/lib/core.js
|
|
5178
|
+
//#region ../../node_modules/.bun/stringify-entities@4.0.4/node_modules/stringify-entities/lib/core.js
|
|
5179
5179
|
/**
|
|
5180
5180
|
* @typedef CoreOptions
|
|
5181
5181
|
* @property {ReadonlyArray<string>} [subset=[]]
|
|
@@ -5257,7 +5257,7 @@ function charactersToExpression(subset) {
|
|
|
5257
5257
|
}
|
|
5258
5258
|
|
|
5259
5259
|
//#endregion
|
|
5260
|
-
//#region ../../node_modules/stringify-entities/lib/util/to-hexadecimal.js
|
|
5260
|
+
//#region ../../node_modules/.bun/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-hexadecimal.js
|
|
5261
5261
|
const hexadecimalRegex = /[\dA-Fa-f]/;
|
|
5262
5262
|
/**
|
|
5263
5263
|
* Configurable ways to encode characters as hexadecimal references.
|
|
@@ -5273,7 +5273,7 @@ function toHexadecimal(code, next, omit) {
|
|
|
5273
5273
|
}
|
|
5274
5274
|
|
|
5275
5275
|
//#endregion
|
|
5276
|
-
//#region ../../node_modules/stringify-entities/lib/util/to-decimal.js
|
|
5276
|
+
//#region ../../node_modules/.bun/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-decimal.js
|
|
5277
5277
|
const decimalRegex = /\d/;
|
|
5278
5278
|
/**
|
|
5279
5279
|
* Configurable ways to encode characters as decimal references.
|
|
@@ -5289,7 +5289,7 @@ function toDecimal(code, next, omit) {
|
|
|
5289
5289
|
}
|
|
5290
5290
|
|
|
5291
5291
|
//#endregion
|
|
5292
|
-
//#region ../../node_modules/character-entities-legacy/index.js
|
|
5292
|
+
//#region ../../node_modules/.bun/character-entities-legacy@3.0.0/node_modules/character-entities-legacy/index.js
|
|
5293
5293
|
/**
|
|
5294
5294
|
* List of legacy HTML named character references that don’t need a trailing semicolon.
|
|
5295
5295
|
*
|
|
@@ -5405,7 +5405,7 @@ const characterEntitiesLegacy = [
|
|
|
5405
5405
|
];
|
|
5406
5406
|
|
|
5407
5407
|
//#endregion
|
|
5408
|
-
//#region ../../node_modules/character-entities-html4/index.js
|
|
5408
|
+
//#region ../../node_modules/.bun/character-entities-html4@2.1.0/node_modules/character-entities-html4/index.js
|
|
5409
5409
|
/**
|
|
5410
5410
|
* Map of named character references from HTML 4.
|
|
5411
5411
|
*
|
|
@@ -5667,7 +5667,7 @@ const characterEntitiesHtml4 = {
|
|
|
5667
5667
|
};
|
|
5668
5668
|
|
|
5669
5669
|
//#endregion
|
|
5670
|
-
//#region ../../node_modules/stringify-entities/lib/constant/dangerous.js
|
|
5670
|
+
//#region ../../node_modules/.bun/stringify-entities@4.0.4/node_modules/stringify-entities/lib/constant/dangerous.js
|
|
5671
5671
|
/**
|
|
5672
5672
|
* List of legacy (that don’t need a trailing `;`) named references which could,
|
|
5673
5673
|
* depending on what follows them, turn into a different meaning
|
|
@@ -5686,7 +5686,7 @@ const dangerous = [
|
|
|
5686
5686
|
];
|
|
5687
5687
|
|
|
5688
5688
|
//#endregion
|
|
5689
|
-
//#region ../../node_modules/stringify-entities/lib/util/to-named.js
|
|
5689
|
+
//#region ../../node_modules/.bun/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-named.js
|
|
5690
5690
|
const own$1 = {}.hasOwnProperty;
|
|
5691
5691
|
/**
|
|
5692
5692
|
* `characterEntitiesHtml4` but inverted.
|
|
@@ -5725,7 +5725,7 @@ function toNamed(code, next, omit, attribute) {
|
|
|
5725
5725
|
}
|
|
5726
5726
|
|
|
5727
5727
|
//#endregion
|
|
5728
|
-
//#region ../../node_modules/stringify-entities/lib/util/format-smart.js
|
|
5728
|
+
//#region ../../node_modules/.bun/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/format-smart.js
|
|
5729
5729
|
/**
|
|
5730
5730
|
* Configurable ways to encode a character yielding pretty or small results.
|
|
5731
5731
|
*
|
|
@@ -5751,7 +5751,7 @@ function formatSmart(code, next, options) {
|
|
|
5751
5751
|
}
|
|
5752
5752
|
|
|
5753
5753
|
//#endregion
|
|
5754
|
-
//#region ../../node_modules/stringify-entities/lib/util/format-basic.js
|
|
5754
|
+
//#region ../../node_modules/.bun/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/format-basic.js
|
|
5755
5755
|
/**
|
|
5756
5756
|
* The smallest way to encode a character.
|
|
5757
5757
|
*
|
|
@@ -5763,7 +5763,7 @@ function formatBasic(code) {
|
|
|
5763
5763
|
}
|
|
5764
5764
|
|
|
5765
5765
|
//#endregion
|
|
5766
|
-
//#region ../../node_modules/stringify-entities/lib/index.js
|
|
5766
|
+
//#region ../../node_modules/.bun/stringify-entities@4.0.4/node_modules/stringify-entities/lib/index.js
|
|
5767
5767
|
/**
|
|
5768
5768
|
* Encode special characters in `value`.
|
|
5769
5769
|
*
|
|
@@ -5792,7 +5792,7 @@ function stringifyEntitiesLight(value, options) {
|
|
|
5792
5792
|
}
|
|
5793
5793
|
|
|
5794
5794
|
//#endregion
|
|
5795
|
-
//#region ../../node_modules/hast-util-to-html/lib/handle/comment.js
|
|
5795
|
+
//#region ../../node_modules/.bun/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/comment.js
|
|
5796
5796
|
const htmlCommentRegex = /^>|^->|<!--|-->|--!>|<!-$/g;
|
|
5797
5797
|
const bogusCommentEntitySubset = [">"];
|
|
5798
5798
|
const commentEntitySubset = ["<", ">"];
|
|
@@ -5821,7 +5821,7 @@ function comment(node, _1, _2, state) {
|
|
|
5821
5821
|
}
|
|
5822
5822
|
|
|
5823
5823
|
//#endregion
|
|
5824
|
-
//#region ../../node_modules/hast-util-to-html/lib/handle/doctype.js
|
|
5824
|
+
//#region ../../node_modules/.bun/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/doctype.js
|
|
5825
5825
|
/**
|
|
5826
5826
|
* @import {Doctype, Parents} from 'hast'
|
|
5827
5827
|
* @import {State} from '../index.js'
|
|
@@ -5845,7 +5845,7 @@ function doctype(_1, _2, _3, state) {
|
|
|
5845
5845
|
}
|
|
5846
5846
|
|
|
5847
5847
|
//#endregion
|
|
5848
|
-
//#region ../../node_modules/ccount/index.js
|
|
5848
|
+
//#region ../../node_modules/.bun/ccount@2.0.1/node_modules/ccount/index.js
|
|
5849
5849
|
/**
|
|
5850
5850
|
* Count how often a character (or substring) is used in a string.
|
|
5851
5851
|
*
|
|
@@ -5871,7 +5871,7 @@ function ccount(value, character) {
|
|
|
5871
5871
|
}
|
|
5872
5872
|
|
|
5873
5873
|
//#endregion
|
|
5874
|
-
//#region ../../node_modules/comma-separated-tokens/index.js
|
|
5874
|
+
//#region ../../node_modules/.bun/comma-separated-tokens@2.0.3/node_modules/comma-separated-tokens/index.js
|
|
5875
5875
|
/**
|
|
5876
5876
|
* @typedef Options
|
|
5877
5877
|
* Configuration for `stringify`.
|
|
@@ -5931,7 +5931,7 @@ function stringify$1(values, options) {
|
|
|
5931
5931
|
}
|
|
5932
5932
|
|
|
5933
5933
|
//#endregion
|
|
5934
|
-
//#region ../../node_modules/space-separated-tokens/index.js
|
|
5934
|
+
//#region ../../node_modules/.bun/space-separated-tokens@2.0.2/node_modules/space-separated-tokens/index.js
|
|
5935
5935
|
/**
|
|
5936
5936
|
* Parse space-separated tokens to an array of strings.
|
|
5937
5937
|
*
|
|
@@ -5957,7 +5957,7 @@ function stringify$2(values) {
|
|
|
5957
5957
|
}
|
|
5958
5958
|
|
|
5959
5959
|
//#endregion
|
|
5960
|
-
//#region ../../node_modules/hast-util-whitespace/lib/index.js
|
|
5960
|
+
//#region ../../node_modules/.bun/hast-util-whitespace@3.0.0/node_modules/hast-util-whitespace/lib/index.js
|
|
5961
5961
|
/**
|
|
5962
5962
|
* @typedef {import('hast').Nodes} Nodes
|
|
5963
5963
|
*/
|
|
@@ -5985,7 +5985,7 @@ function empty(value) {
|
|
|
5985
5985
|
}
|
|
5986
5986
|
|
|
5987
5987
|
//#endregion
|
|
5988
|
-
//#region ../../node_modules/hast-util-to-html/lib/omission/util/siblings.js
|
|
5988
|
+
//#region ../../node_modules/.bun/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/util/siblings.js
|
|
5989
5989
|
const siblingAfter = siblings(1);
|
|
5990
5990
|
const siblingBefore = siblings(-1);
|
|
5991
5991
|
/** @type {Array<RootContent>} */
|
|
@@ -6026,7 +6026,7 @@ function siblings(increment$1) {
|
|
|
6026
6026
|
}
|
|
6027
6027
|
|
|
6028
6028
|
//#endregion
|
|
6029
|
-
//#region ../../node_modules/hast-util-to-html/lib/omission/omission.js
|
|
6029
|
+
//#region ../../node_modules/.bun/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/omission.js
|
|
6030
6030
|
/**
|
|
6031
6031
|
* @import {Element, Parents} from 'hast'
|
|
6032
6032
|
*/
|
|
@@ -6066,7 +6066,7 @@ function omission(handlers) {
|
|
|
6066
6066
|
}
|
|
6067
6067
|
|
|
6068
6068
|
//#endregion
|
|
6069
|
-
//#region ../../node_modules/hast-util-to-html/lib/omission/closing.js
|
|
6069
|
+
//#region ../../node_modules/.bun/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/closing.js
|
|
6070
6070
|
const closing = omission({
|
|
6071
6071
|
body: body$1,
|
|
6072
6072
|
caption: headOrColgroupOrCaption,
|
|
@@ -6329,7 +6329,7 @@ function cells(_$2, index, parent) {
|
|
|
6329
6329
|
}
|
|
6330
6330
|
|
|
6331
6331
|
//#endregion
|
|
6332
|
-
//#region ../../node_modules/hast-util-to-html/lib/omission/opening.js
|
|
6332
|
+
//#region ../../node_modules/.bun/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/opening.js
|
|
6333
6333
|
const opening = omission({
|
|
6334
6334
|
body,
|
|
6335
6335
|
colgroup,
|
|
@@ -6426,7 +6426,7 @@ function tbody(node, index, parent) {
|
|
|
6426
6426
|
}
|
|
6427
6427
|
|
|
6428
6428
|
//#endregion
|
|
6429
|
-
//#region ../../node_modules/hast-util-to-html/lib/handle/element.js
|
|
6429
|
+
//#region ../../node_modules/.bun/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/element.js
|
|
6430
6430
|
/**
|
|
6431
6431
|
* Maps of subsets.
|
|
6432
6432
|
*
|
|
@@ -6559,7 +6559,7 @@ function serializeAttribute(state, key$1, value) {
|
|
|
6559
6559
|
}
|
|
6560
6560
|
|
|
6561
6561
|
//#endregion
|
|
6562
|
-
//#region ../../node_modules/hast-util-to-html/lib/handle/text.js
|
|
6562
|
+
//#region ../../node_modules/.bun/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/text.js
|
|
6563
6563
|
const textEntitySubset = ["<", "&"];
|
|
6564
6564
|
/**
|
|
6565
6565
|
* Serialize a text node.
|
|
@@ -6580,7 +6580,7 @@ function text(node, _$2, parent, state) {
|
|
|
6580
6580
|
}
|
|
6581
6581
|
|
|
6582
6582
|
//#endregion
|
|
6583
|
-
//#region ../../node_modules/hast-util-to-html/lib/handle/raw.js
|
|
6583
|
+
//#region ../../node_modules/.bun/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/raw.js
|
|
6584
6584
|
/**
|
|
6585
6585
|
* Serialize a raw node.
|
|
6586
6586
|
*
|
|
@@ -6600,7 +6600,7 @@ function raw(node, index, parent, state) {
|
|
|
6600
6600
|
}
|
|
6601
6601
|
|
|
6602
6602
|
//#endregion
|
|
6603
|
-
//#region ../../node_modules/hast-util-to-html/lib/handle/root.js
|
|
6603
|
+
//#region ../../node_modules/.bun/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/root.js
|
|
6604
6604
|
/**
|
|
6605
6605
|
* @import {Parents, Root} from 'hast'
|
|
6606
6606
|
* @import {State} from '../index.js'
|
|
@@ -6624,7 +6624,7 @@ function root(node, _1, _2, state) {
|
|
|
6624
6624
|
}
|
|
6625
6625
|
|
|
6626
6626
|
//#endregion
|
|
6627
|
-
//#region ../../node_modules/hast-util-to-html/lib/handle/index.js
|
|
6627
|
+
//#region ../../node_modules/.bun/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/index.js
|
|
6628
6628
|
/**
|
|
6629
6629
|
* @type {(node: Nodes, index: number | undefined, parent: Parents | undefined, state: State) => string}
|
|
6630
6630
|
*/
|
|
@@ -6665,7 +6665,7 @@ function unknown(node_) {
|
|
|
6665
6665
|
}
|
|
6666
6666
|
|
|
6667
6667
|
//#endregion
|
|
6668
|
-
//#region ../../node_modules/hast-util-to-html/lib/index.js
|
|
6668
|
+
//#region ../../node_modules/.bun/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/index.js
|
|
6669
6669
|
/** @type {Options} */
|
|
6670
6670
|
const emptyOptions = {};
|
|
6671
6671
|
/** @type {CharacterReferences} */
|
|
@@ -6759,7 +6759,7 @@ function all(parent) {
|
|
|
6759
6759
|
}
|
|
6760
6760
|
|
|
6761
6761
|
//#endregion
|
|
6762
|
-
//#region ../../node_modules/@shikijs/core/dist/index.mjs
|
|
6762
|
+
//#region ../../node_modules/.bun/@shikijs+core@4.0.2/node_modules/@shikijs/core/dist/index.mjs
|
|
6763
6763
|
/**
|
|
6764
6764
|
* Utility to append class to a hast node
|
|
6765
6765
|
*
|
|
@@ -8126,7 +8126,7 @@ function createCssVariablesTheme(options = {}) {
|
|
|
8126
8126
|
}
|
|
8127
8127
|
|
|
8128
8128
|
//#endregion
|
|
8129
|
-
//#region ../../node_modules/@shikijs/engine-javascript/dist/scanner-BFcBmQR1.mjs
|
|
8129
|
+
//#region ../../node_modules/.bun/@shikijs+engine-javascript@4.0.2/node_modules/@shikijs/engine-javascript/dist/scanner-BFcBmQR1.mjs
|
|
8130
8130
|
const MAX = 4294967295;
|
|
8131
8131
|
var JavaScriptScanner = class {
|
|
8132
8132
|
regexps;
|
|
@@ -8201,7 +8201,7 @@ var JavaScriptScanner = class {
|
|
|
8201
8201
|
};
|
|
8202
8202
|
|
|
8203
8203
|
//#endregion
|
|
8204
|
-
//#region ../../node_modules/oniguruma-parser/dist/utils.js
|
|
8204
|
+
//#region ../../node_modules/.bun/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/utils.js
|
|
8205
8205
|
function r$2(e) {
|
|
8206
8206
|
if ([...e].length !== 1) throw new Error(`Expected "${e}" to be a single code point`);
|
|
8207
8207
|
return e.codePointAt(0);
|
|
@@ -8231,7 +8231,7 @@ function u(e, t) {
|
|
|
8231
8231
|
}
|
|
8232
8232
|
|
|
8233
8233
|
//#endregion
|
|
8234
|
-
//#region ../../node_modules/oniguruma-parser/dist/tokenizer/tokenize.js
|
|
8234
|
+
//#region ../../node_modules/.bun/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/tokenizer/tokenize.js
|
|
8235
8235
|
const m$1 = o$1`\[\^?`, b$1 = `c.? | C(?:-.?)?|${o$1`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${o$1`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${o$1`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${o$1`o\{[^\}]*\}?`}|${o$1`\d{1,3}`}`, y$1 = /[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/, C$1 = new RegExp(o$1`
|
|
8236
8236
|
\\ (?:
|
|
8237
8237
|
${b$1}
|
|
@@ -8728,7 +8728,7 @@ function te$1(e) {
|
|
|
8728
8728
|
}
|
|
8729
8729
|
|
|
8730
8730
|
//#endregion
|
|
8731
|
-
//#region ../../node_modules/oniguruma-parser/dist/parser/node-utils.js
|
|
8731
|
+
//#region ../../node_modules/.bun/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/parser/node-utils.js
|
|
8732
8732
|
function o(e, t) {
|
|
8733
8733
|
if (!Array.isArray(e.body)) throw new Error("Expected node with body array");
|
|
8734
8734
|
if (e.body.length !== 1) return !1;
|
|
@@ -8761,7 +8761,7 @@ const y = new Set([
|
|
|
8761
8761
|
]);
|
|
8762
8762
|
|
|
8763
8763
|
//#endregion
|
|
8764
|
-
//#region ../../node_modules/oniguruma-parser/dist/parser/parse.js
|
|
8764
|
+
//#region ../../node_modules/.bun/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/parser/parse.js
|
|
8765
8765
|
function J(e, r$3 = {}) {
|
|
8766
8766
|
const n = {
|
|
8767
8767
|
flags: "",
|
|
@@ -9182,7 +9182,7 @@ function D(e) {
|
|
|
9182
9182
|
}
|
|
9183
9183
|
|
|
9184
9184
|
//#endregion
|
|
9185
|
-
//#region ../../node_modules/oniguruma-parser/dist/traverser/traverse.js
|
|
9185
|
+
//#region ../../node_modules/.bun/oniguruma-parser@0.12.1/node_modules/oniguruma-parser/dist/traverser/traverse.js
|
|
9186
9186
|
function S(a$1, v$1, N = null) {
|
|
9187
9187
|
function u$1(e, s$1) {
|
|
9188
9188
|
for (let t = 0; t < e.length; t++) {
|
|
@@ -9270,7 +9270,7 @@ function l(a$1) {
|
|
|
9270
9270
|
}
|
|
9271
9271
|
|
|
9272
9272
|
//#endregion
|
|
9273
|
-
//#region ../../node_modules/regex/src/utils-internals.js
|
|
9273
|
+
//#region ../../node_modules/.bun/regex@6.1.0/node_modules/regex/src/utils-internals.js
|
|
9274
9274
|
const noncapturingDelim = String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;
|
|
9275
9275
|
/**
|
|
9276
9276
|
Updates the array in place by incrementing each value greater than or equal to the threshold.
|
|
@@ -9296,7 +9296,7 @@ function spliceStr(str, pos, oldValue, newValue) {
|
|
|
9296
9296
|
}
|
|
9297
9297
|
|
|
9298
9298
|
//#endregion
|
|
9299
|
-
//#region ../../node_modules/regex-utilities/src/index.js
|
|
9299
|
+
//#region ../../node_modules/.bun/regex-utilities@2.3.0/node_modules/regex-utilities/src/index.js
|
|
9300
9300
|
const Context = Object.freeze({
|
|
9301
9301
|
DEFAULT: "DEFAULT",
|
|
9302
9302
|
CHAR_CLASS: "CHAR_CLASS"
|
|
@@ -9458,7 +9458,7 @@ function getGroupContents(expression, contentsStartPos) {
|
|
|
9458
9458
|
}
|
|
9459
9459
|
|
|
9460
9460
|
//#endregion
|
|
9461
|
-
//#region ../../node_modules/regex/src/atomic.js
|
|
9461
|
+
//#region ../../node_modules/.bun/regex@6.1.0/node_modules/regex/src/atomic.js
|
|
9462
9462
|
/**
|
|
9463
9463
|
@import {PluginData, PluginResult} from './regex.js';
|
|
9464
9464
|
*/
|
|
@@ -9634,7 +9634,7 @@ function possessive(expression) {
|
|
|
9634
9634
|
}
|
|
9635
9635
|
|
|
9636
9636
|
//#endregion
|
|
9637
|
-
//#region ../../node_modules/regex/src/subclass.js
|
|
9637
|
+
//#region ../../node_modules/.bun/regex@6.1.0/node_modules/regex/src/subclass.js
|
|
9638
9638
|
/**
|
|
9639
9639
|
Works the same as JavaScript's native `RegExp` constructor in all contexts, but automatically
|
|
9640
9640
|
adjusts subpattern matches and indices (with flag `d`) to account for captures added as part of
|
|
@@ -9724,7 +9724,7 @@ function createCaptureMap$1(hiddenCaptures) {
|
|
|
9724
9724
|
}
|
|
9725
9725
|
|
|
9726
9726
|
//#endregion
|
|
9727
|
-
//#region ../../node_modules/regex-recursion/src/index.js
|
|
9727
|
+
//#region ../../node_modules/.bun/regex-recursion@6.0.2/node_modules/regex-recursion/src/index.js
|
|
9728
9728
|
const r$1 = String.raw;
|
|
9729
9729
|
const gRToken = r$1`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`;
|
|
9730
9730
|
const recursiveToken = r$1`\(\?R=(?<rDepth>[^\)]+)\)|${gRToken}`;
|
|
@@ -9981,7 +9981,7 @@ function mapCaptureTransfers(captureTransfers, left, reps, numCapturesAddedInExp
|
|
|
9981
9981
|
}
|
|
9982
9982
|
|
|
9983
9983
|
//#endregion
|
|
9984
|
-
//#region ../../node_modules/oniguruma-to-es/dist/esm/index.js
|
|
9984
|
+
//#region ../../node_modules/.bun/oniguruma-to-es@4.3.4/node_modules/oniguruma-to-es/dist/esm/index.js
|
|
9985
9985
|
var cp = String.fromCodePoint;
|
|
9986
9986
|
var r = String.raw;
|
|
9987
9987
|
var envFlags = {
|
|
@@ -11636,7 +11636,7 @@ function toRegExpDetails(pattern, options) {
|
|
|
11636
11636
|
}
|
|
11637
11637
|
|
|
11638
11638
|
//#endregion
|
|
11639
|
-
//#region ../../node_modules/@shikijs/engine-javascript/dist/engine-compile.mjs
|
|
11639
|
+
//#region ../../node_modules/.bun/@shikijs+engine-javascript@4.0.2/node_modules/@shikijs/engine-javascript/dist/engine-compile.mjs
|
|
11640
11640
|
/**
|
|
11641
11641
|
* The default regex constructor for the JavaScript RegExp engine.
|
|
11642
11642
|
*/
|
|
@@ -11680,7 +11680,7 @@ function createJavaScriptRegexEngine(options = {}) {
|
|
|
11680
11680
|
}
|
|
11681
11681
|
|
|
11682
11682
|
//#endregion
|
|
11683
|
-
//#region ../../node_modules/@shikijs/engine-javascript/dist/engine-raw.mjs
|
|
11683
|
+
//#region ../../node_modules/.bun/@shikijs+engine-javascript@4.0.2/node_modules/@shikijs/engine-javascript/dist/engine-raw.mjs
|
|
11684
11684
|
/**
|
|
11685
11685
|
* Raw JavaScript regex engine that only supports precompiled grammars.
|
|
11686
11686
|
*
|
|
@@ -11706,7 +11706,7 @@ function createJavaScriptRawEngine() {
|
|
|
11706
11706
|
}
|
|
11707
11707
|
|
|
11708
11708
|
//#endregion
|
|
11709
|
-
//#region ../../node_modules/@shikijs/engine-oniguruma/dist/index.mjs
|
|
11709
|
+
//#region ../../node_modules/.bun/@shikijs+engine-oniguruma@4.0.2/node_modules/@shikijs/engine-oniguruma/dist/index.mjs
|
|
11710
11710
|
var dist_exports = /* @__PURE__ */ __export({
|
|
11711
11711
|
createOnigurumaEngine: () => createOnigurumaEngine,
|
|
11712
11712
|
getDefaultWasmLoader: () => getDefaultWasmLoader,
|
|
@@ -12130,7 +12130,7 @@ async function createOnigurumaEngine(options) {
|
|
|
12130
12130
|
}
|
|
12131
12131
|
|
|
12132
12132
|
//#endregion
|
|
12133
|
-
//#region ../../node_modules/shiki/dist/engine-oniguruma.mjs
|
|
12133
|
+
//#region ../../node_modules/.bun/shiki@4.0.2/node_modules/shiki/dist/engine-oniguruma.mjs
|
|
12134
12134
|
var engine_oniguruma_exports = /* @__PURE__ */ __exportAll({});
|
|
12135
12135
|
__reExport(engine_oniguruma_exports, dist_exports);
|
|
12136
12136
|
|
|
@@ -12668,7 +12668,7 @@ function getCustomExtensionsMap() {
|
|
|
12668
12668
|
}
|
|
12669
12669
|
|
|
12670
12670
|
//#endregion
|
|
12671
|
-
//#region ../../node_modules/diff/libesm/diff/base.js
|
|
12671
|
+
//#region ../../node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/diff/base.js
|
|
12672
12672
|
var Diff = class {
|
|
12673
12673
|
diff(oldStr, newStr, options = {}) {
|
|
12674
12674
|
let callback;
|
|
@@ -12892,7 +12892,7 @@ var Diff = class {
|
|
|
12892
12892
|
};
|
|
12893
12893
|
|
|
12894
12894
|
//#endregion
|
|
12895
|
-
//#region ../../node_modules/diff/libesm/diff/character.js
|
|
12895
|
+
//#region ../../node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/diff/character.js
|
|
12896
12896
|
var CharacterDiff = class extends Diff {};
|
|
12897
12897
|
const characterDiff = new CharacterDiff();
|
|
12898
12898
|
function diffChars(oldStr, newStr, options) {
|
|
@@ -12900,7 +12900,7 @@ function diffChars(oldStr, newStr, options) {
|
|
|
12900
12900
|
}
|
|
12901
12901
|
|
|
12902
12902
|
//#endregion
|
|
12903
|
-
//#region ../../node_modules/diff/libesm/util/string.js
|
|
12903
|
+
//#region ../../node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/util/string.js
|
|
12904
12904
|
function longestCommonPrefix(str1, str2) {
|
|
12905
12905
|
let i$2;
|
|
12906
12906
|
for (i$2 = 0; i$2 < str1.length && i$2 < str2.length; i$2++) {
|
|
@@ -13009,7 +13009,7 @@ function leadingWs(string) {
|
|
|
13009
13009
|
}
|
|
13010
13010
|
|
|
13011
13011
|
//#endregion
|
|
13012
|
-
//#region ../../node_modules/diff/libesm/diff/word.js
|
|
13012
|
+
//#region ../../node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/diff/word.js
|
|
13013
13013
|
const extendedWordChars = "a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}";
|
|
13014
13014
|
const tokenizeIncludingWhitespace = new RegExp(`[${extendedWordChars}]+|\\s+|[^${extendedWordChars}]`, "ug");
|
|
13015
13015
|
var WordDiff = class extends Diff {
|
|
@@ -13163,7 +13163,7 @@ function diffWordsWithSpace(oldStr, newStr, options) {
|
|
|
13163
13163
|
}
|
|
13164
13164
|
|
|
13165
13165
|
//#endregion
|
|
13166
|
-
//#region ../../node_modules/diff/libesm/util/params.js
|
|
13166
|
+
//#region ../../node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/util/params.js
|
|
13167
13167
|
function generateOptions(options, defaults) {
|
|
13168
13168
|
if (typeof options === "function") {
|
|
13169
13169
|
defaults.callback = options;
|
|
@@ -13179,7 +13179,7 @@ function generateOptions(options, defaults) {
|
|
|
13179
13179
|
}
|
|
13180
13180
|
|
|
13181
13181
|
//#endregion
|
|
13182
|
-
//#region ../../node_modules/diff/libesm/diff/line.js
|
|
13182
|
+
//#region ../../node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/diff/line.js
|
|
13183
13183
|
var LineDiff = class extends Diff {
|
|
13184
13184
|
constructor() {
|
|
13185
13185
|
super(...arguments);
|
|
@@ -13232,7 +13232,7 @@ function tokenize(value, options) {
|
|
|
13232
13232
|
}
|
|
13233
13233
|
|
|
13234
13234
|
//#endregion
|
|
13235
|
-
//#region ../../node_modules/diff/libesm/diff/sentence.js
|
|
13235
|
+
//#region ../../node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/diff/sentence.js
|
|
13236
13236
|
function isSentenceEndPunct(char) {
|
|
13237
13237
|
return char == "." || char == "!" || char == "?";
|
|
13238
13238
|
}
|
|
@@ -13265,7 +13265,7 @@ function diffSentences(oldStr, newStr, options) {
|
|
|
13265
13265
|
}
|
|
13266
13266
|
|
|
13267
13267
|
//#endregion
|
|
13268
|
-
//#region ../../node_modules/diff/libesm/diff/css.js
|
|
13268
|
+
//#region ../../node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/diff/css.js
|
|
13269
13269
|
var CssDiff = class extends Diff {
|
|
13270
13270
|
tokenize(value) {
|
|
13271
13271
|
return value.split(/([{}:;,]|\s+)/);
|
|
@@ -13277,7 +13277,7 @@ function diffCss(oldStr, newStr, options) {
|
|
|
13277
13277
|
}
|
|
13278
13278
|
|
|
13279
13279
|
//#endregion
|
|
13280
|
-
//#region ../../node_modules/diff/libesm/diff/json.js
|
|
13280
|
+
//#region ../../node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/diff/json.js
|
|
13281
13281
|
var JsonDiff = class extends Diff {
|
|
13282
13282
|
constructor() {
|
|
13283
13283
|
super(...arguments);
|
|
@@ -13351,7 +13351,7 @@ function canonicalize(obj, stack, replacementStack, replacer, key$1) {
|
|
|
13351
13351
|
}
|
|
13352
13352
|
|
|
13353
13353
|
//#endregion
|
|
13354
|
-
//#region ../../node_modules/diff/libesm/diff/array.js
|
|
13354
|
+
//#region ../../node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/diff/array.js
|
|
13355
13355
|
var ArrayDiff = class extends Diff {
|
|
13356
13356
|
tokenize(value) {
|
|
13357
13357
|
return value.slice();
|
|
@@ -13369,7 +13369,7 @@ function diffArrays(oldArr, newArr, options) {
|
|
|
13369
13369
|
}
|
|
13370
13370
|
|
|
13371
13371
|
//#endregion
|
|
13372
|
-
//#region ../../node_modules/diff/libesm/patch/line-endings.js
|
|
13372
|
+
//#region ../../node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/patch/line-endings.js
|
|
13373
13373
|
function unixToWin(patch) {
|
|
13374
13374
|
if (Array.isArray(patch)) {
|
|
13375
13375
|
return patch.map((p$1) => unixToWin(p$1));
|
|
@@ -13409,7 +13409,7 @@ function isWin(patch) {
|
|
|
13409
13409
|
}
|
|
13410
13410
|
|
|
13411
13411
|
//#endregion
|
|
13412
|
-
//#region ../../node_modules/diff/libesm/patch/parse.js
|
|
13412
|
+
//#region ../../node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/patch/parse.js
|
|
13413
13413
|
/**
|
|
13414
13414
|
* Parses a patch into structured data, in the same structure returned by `structuredPatch`.
|
|
13415
13415
|
*
|
|
@@ -13520,7 +13520,7 @@ function parsePatch(uniDiff) {
|
|
|
13520
13520
|
}
|
|
13521
13521
|
|
|
13522
13522
|
//#endregion
|
|
13523
|
-
//#region ../../node_modules/diff/libesm/util/distance-iterator.js
|
|
13523
|
+
//#region ../../node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/util/distance-iterator.js
|
|
13524
13524
|
function distance_iterator_default(start, minLine, maxLine) {
|
|
13525
13525
|
let wantForward = true, backwardExhausted = false, forwardExhausted = false, localOffset = 1;
|
|
13526
13526
|
return function iterator() {
|
|
@@ -13550,7 +13550,7 @@ function distance_iterator_default(start, minLine, maxLine) {
|
|
|
13550
13550
|
}
|
|
13551
13551
|
|
|
13552
13552
|
//#endregion
|
|
13553
|
-
//#region ../../node_modules/diff/libesm/patch/apply.js
|
|
13553
|
+
//#region ../../node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/patch/apply.js
|
|
13554
13554
|
/**
|
|
13555
13555
|
* attempts to apply a unified diff patch.
|
|
13556
13556
|
*
|
|
@@ -13769,7 +13769,7 @@ function applyPatches(uniDiff, options) {
|
|
|
13769
13769
|
}
|
|
13770
13770
|
|
|
13771
13771
|
//#endregion
|
|
13772
|
-
//#region ../../node_modules/diff/libesm/patch/reverse.js
|
|
13772
|
+
//#region ../../node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/patch/reverse.js
|
|
13773
13773
|
function reversePatch(structuredPatch$1) {
|
|
13774
13774
|
if (Array.isArray(structuredPatch$1)) {
|
|
13775
13775
|
return structuredPatch$1.map((patch) => reversePatch(patch)).reverse();
|
|
@@ -13800,7 +13800,7 @@ function reversePatch(structuredPatch$1) {
|
|
|
13800
13800
|
}
|
|
13801
13801
|
|
|
13802
13802
|
//#endregion
|
|
13803
|
-
//#region ../../node_modules/diff/libesm/patch/create.js
|
|
13803
|
+
//#region ../../node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/patch/create.js
|
|
13804
13804
|
const INCLUDE_HEADERS = {
|
|
13805
13805
|
includeIndex: true,
|
|
13806
13806
|
includeUnderline: true,
|
|
@@ -14004,7 +14004,7 @@ function splitLines(text$1) {
|
|
|
14004
14004
|
}
|
|
14005
14005
|
|
|
14006
14006
|
//#endregion
|
|
14007
|
-
//#region ../../node_modules/diff/libesm/convert/dmp.js
|
|
14007
|
+
//#region ../../node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/convert/dmp.js
|
|
14008
14008
|
/**
|
|
14009
14009
|
* converts a list of change objects to the format returned by Google's [diff-match-patch](https://github.com/google/diff-match-patch) library
|
|
14010
14010
|
*/
|
|
@@ -14026,7 +14026,7 @@ function convertChangesToDMP(changes) {
|
|
|
14026
14026
|
}
|
|
14027
14027
|
|
|
14028
14028
|
//#endregion
|
|
14029
|
-
//#region ../../node_modules/diff/libesm/convert/xml.js
|
|
14029
|
+
//#region ../../node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/convert/xml.js
|
|
14030
14030
|
/**
|
|
14031
14031
|
* converts a list of change objects to a serialized XML format
|
|
14032
14032
|
*/
|
|
@@ -14071,7 +14071,7 @@ function cleanLastNewline(contents) {
|
|
|
14071
14071
|
}
|
|
14072
14072
|
|
|
14073
14073
|
//#endregion
|
|
14074
|
-
//#region ../../node_modules/@shikijs/transformers/dist/index.mjs
|
|
14074
|
+
//#region ../../node_modules/.bun/@shikijs+transformers@4.0.2/node_modules/@shikijs/transformers/dist/index.mjs
|
|
14075
14075
|
/**
|
|
14076
14076
|
* some comment formats have to be located at the end of line
|
|
14077
14077
|
* hence we can skip matching them for other tokens
|
|
@@ -15191,6 +15191,60 @@ function getExpandedRegion({ isPartial, rangeSize, expandedHunks, hunkIndex, col
|
|
|
15191
15191
|
renderAll
|
|
15192
15192
|
};
|
|
15193
15193
|
}
|
|
15194
|
+
function hasTrailingContext(fileDiff) {
|
|
15195
|
+
const lastHunk = fileDiff.hunks[fileDiff.hunks.length - 1];
|
|
15196
|
+
if (lastHunk == null || fileDiff.isPartial || fileDiff.additionLines.length === 0 || fileDiff.deletionLines.length === 0) {
|
|
15197
|
+
return false;
|
|
15198
|
+
}
|
|
15199
|
+
const additionRemaining = fileDiff.additionLines.length - (lastHunk.additionLineIndex + lastHunk.additionCount);
|
|
15200
|
+
const deletionRemaining = fileDiff.deletionLines.length - (lastHunk.deletionLineIndex + lastHunk.deletionCount);
|
|
15201
|
+
return additionRemaining > 0 || deletionRemaining > 0;
|
|
15202
|
+
}
|
|
15203
|
+
function getTrailingContextRangeSize({ fileDiff, errorPrefix }) {
|
|
15204
|
+
const lastHunk = fileDiff.hunks[fileDiff.hunks.length - 1];
|
|
15205
|
+
if (lastHunk == null || fileDiff.isPartial || fileDiff.additionLines.length === 0 || fileDiff.deletionLines.length === 0) {
|
|
15206
|
+
return 0;
|
|
15207
|
+
}
|
|
15208
|
+
const additionRemaining = fileDiff.additionLines.length - (lastHunk.additionLineIndex + lastHunk.additionCount);
|
|
15209
|
+
const deletionRemaining = fileDiff.deletionLines.length - (lastHunk.deletionLineIndex + lastHunk.deletionCount);
|
|
15210
|
+
if (additionRemaining <= 0 && deletionRemaining <= 0) {
|
|
15211
|
+
return 0;
|
|
15212
|
+
}
|
|
15213
|
+
if (additionRemaining !== deletionRemaining) {
|
|
15214
|
+
throw new Error(`${errorPrefix}: trailing context mismatch (additions=${additionRemaining}, deletions=${deletionRemaining}) for ${fileDiff.name}`);
|
|
15215
|
+
}
|
|
15216
|
+
return Math.min(additionRemaining, deletionRemaining);
|
|
15217
|
+
}
|
|
15218
|
+
function getTrailingExpandedRegion({ fileDiff, hunkIndex, expandedHunks, collapsedContextThreshold, errorPrefix }) {
|
|
15219
|
+
if (hunkIndex !== fileDiff.hunks.length - 1) {
|
|
15220
|
+
return undefined;
|
|
15221
|
+
}
|
|
15222
|
+
const trailingRangeSize = getTrailingContextRangeSize({
|
|
15223
|
+
fileDiff,
|
|
15224
|
+
errorPrefix
|
|
15225
|
+
});
|
|
15226
|
+
if (trailingRangeSize <= 0) {
|
|
15227
|
+
return undefined;
|
|
15228
|
+
}
|
|
15229
|
+
if (expandedHunks === true || trailingRangeSize <= collapsedContextThreshold) {
|
|
15230
|
+
return {
|
|
15231
|
+
fromStart: trailingRangeSize,
|
|
15232
|
+
fromEnd: 0,
|
|
15233
|
+
rangeSize: trailingRangeSize,
|
|
15234
|
+
collapsedLines: 0,
|
|
15235
|
+
renderAll: true
|
|
15236
|
+
};
|
|
15237
|
+
}
|
|
15238
|
+
const region = expandedHunks?.get(fileDiff.hunks.length);
|
|
15239
|
+
const fromStart = Math.min(Math.max(region?.fromStart ?? 0, 0), trailingRangeSize);
|
|
15240
|
+
return {
|
|
15241
|
+
fromStart,
|
|
15242
|
+
fromEnd: 0,
|
|
15243
|
+
rangeSize: trailingRangeSize,
|
|
15244
|
+
collapsedLines: trailingRangeSize - fromStart,
|
|
15245
|
+
renderAll: fromStart >= trailingRangeSize
|
|
15246
|
+
};
|
|
15247
|
+
}
|
|
15194
15248
|
function getHunkSeparatorHeight({ type, metrics }) {
|
|
15195
15249
|
return metrics.hunkSeparatorHeight ?? getDefaultHunkSeparatorHeight(type);
|
|
15196
15250
|
}
|
|
@@ -15265,12 +15319,12 @@ function iterateOverDiff({ diff, diffStyle, startingLine = 0, totalLines = Infin
|
|
|
15265
15319
|
collapsedContextThreshold
|
|
15266
15320
|
});
|
|
15267
15321
|
const state = {
|
|
15268
|
-
finalHunk: diff.hunks.at(-1),
|
|
15269
15322
|
viewportStart: startingLine,
|
|
15270
15323
|
viewportEnd: startingLine + totalLines,
|
|
15271
15324
|
isWindowedHighlight: startingLine > 0 || totalLines < Infinity,
|
|
15272
15325
|
splitCount: iterationStart.splitCount,
|
|
15273
15326
|
unifiedCount: iterationStart.unifiedCount,
|
|
15327
|
+
finalHunkIndex: diff.hunks.length - 1,
|
|
15274
15328
|
shouldBreak() {
|
|
15275
15329
|
if (!state.isWindowedHighlight) {
|
|
15276
15330
|
return false;
|
|
@@ -15355,24 +15409,13 @@ function iterateOverDiff({ diff, diffStyle, startingLine = 0, totalLines = Infin
|
|
|
15355
15409
|
hunkIndex,
|
|
15356
15410
|
collapsedContextThreshold
|
|
15357
15411
|
});
|
|
15358
|
-
const trailingRegion =
|
|
15359
|
-
|
|
15360
|
-
|
|
15361
|
-
|
|
15362
|
-
|
|
15363
|
-
|
|
15364
|
-
|
|
15365
|
-
throw new Error(`iterateOverDiff: trailing context mismatch (additions=${additionRemaining}, deletions=${deletionRemaining}) for ${diff.name}`);
|
|
15366
|
-
}
|
|
15367
|
-
const trailingRangeSize = Math.min(additionRemaining, deletionRemaining);
|
|
15368
|
-
return getExpandedRegion({
|
|
15369
|
-
isPartial: diff.isPartial,
|
|
15370
|
-
rangeSize: trailingRangeSize,
|
|
15371
|
-
expandedHunks,
|
|
15372
|
-
hunkIndex: diff.hunks.length,
|
|
15373
|
-
collapsedContextThreshold
|
|
15374
|
-
});
|
|
15375
|
-
})();
|
|
15412
|
+
const trailingRegion = hunkIndex === state.finalHunkIndex ? getTrailingExpandedRegion({
|
|
15413
|
+
fileDiff: diff,
|
|
15414
|
+
hunkIndex,
|
|
15415
|
+
expandedHunks,
|
|
15416
|
+
collapsedContextThreshold,
|
|
15417
|
+
errorPrefix: "iterateOverDiff"
|
|
15418
|
+
}) : undefined;
|
|
15376
15419
|
const expandedLineCount = leadingRegion.fromStart + leadingRegion.fromEnd;
|
|
15377
15420
|
function getTrailingCollapsedAfter(unifiedLineIndex$1, splitLineIndex$1) {
|
|
15378
15421
|
if (trailingRegion == null || trailingRegion.collapsedLines <= 0 || trailingRegion.fromStart + trailingRegion.fromEnd > 0) {
|
|
@@ -15383,13 +15426,13 @@ function iterateOverDiff({ diff, diffStyle, startingLine = 0, totalLines = Infin
|
|
|
15383
15426
|
}
|
|
15384
15427
|
return splitLineIndex$1 === hunk.splitLineStart + hunk.splitLineCount - 1 ? trailingRegion.collapsedLines : 0;
|
|
15385
15428
|
}
|
|
15386
|
-
|
|
15387
|
-
|
|
15429
|
+
let consumedCollapsed = leadingRegion.collapsedLines === 0;
|
|
15430
|
+
function consumePendingCollapsed() {
|
|
15431
|
+
if (consumedCollapsed) {
|
|
15388
15432
|
return 0;
|
|
15389
15433
|
}
|
|
15390
|
-
|
|
15391
|
-
leadingRegion.collapsedLines
|
|
15392
|
-
return value;
|
|
15434
|
+
consumedCollapsed = true;
|
|
15435
|
+
return leadingRegion.collapsedLines;
|
|
15393
15436
|
}
|
|
15394
15437
|
if (!state.shouldSkip(expandedLineCount, expandedLineCount)) {
|
|
15395
15438
|
let unifiedLineIndex$1 = hunk.unifiedLineStart - leadingRegion.rangeSize;
|
|
@@ -15398,44 +15441,30 @@ function iterateOverDiff({ diff, diffStyle, startingLine = 0, totalLines = Infin
|
|
|
15398
15441
|
let additionLineIndex$1 = hunk.additionLineIndex - leadingRegion.rangeSize;
|
|
15399
15442
|
let deletionLineNumber$1 = hunk.deletionStart - leadingRegion.rangeSize;
|
|
15400
15443
|
let additionLineNumber$1 = hunk.additionStart - leadingRegion.rangeSize;
|
|
15401
|
-
|
|
15402
|
-
|
|
15403
|
-
|
|
15404
|
-
|
|
15405
|
-
|
|
15406
|
-
|
|
15407
|
-
|
|
15408
|
-
|
|
15409
|
-
|
|
15410
|
-
|
|
15411
|
-
|
|
15412
|
-
|
|
15413
|
-
|
|
15414
|
-
|
|
15415
|
-
|
|
15416
|
-
|
|
15417
|
-
|
|
15418
|
-
|
|
15419
|
-
|
|
15420
|
-
|
|
15421
|
-
noEOFCR: false,
|
|
15422
|
-
unifiedLineIndex: unifiedLineIndex$1 + index,
|
|
15423
|
-
splitLineIndex: splitLineIndex$1 + index
|
|
15424
|
-
},
|
|
15425
|
-
additionLine: {
|
|
15426
|
-
unifiedLineIndex: unifiedLineIndex$1 + index,
|
|
15427
|
-
splitLineIndex: splitLineIndex$1 + index,
|
|
15428
|
-
lineIndex: additionLineIndex$1 + index,
|
|
15429
|
-
lineNumber: additionLineNumber$1 + index,
|
|
15430
|
-
noEOFCR: false
|
|
15431
|
-
}
|
|
15432
|
-
})) {
|
|
15433
|
-
break hunkIterator;
|
|
15444
|
+
if (walkContextLines(state, leadingRegion.fromStart, diffStyle, (index) => {
|
|
15445
|
+
return state.emit({
|
|
15446
|
+
hunkIndex,
|
|
15447
|
+
hunk,
|
|
15448
|
+
collapsedBefore: 0,
|
|
15449
|
+
collapsedAfter: 0,
|
|
15450
|
+
type: "context-expanded",
|
|
15451
|
+
deletionLine: {
|
|
15452
|
+
lineNumber: deletionLineNumber$1 + index,
|
|
15453
|
+
lineIndex: deletionLineIndex$1 + index,
|
|
15454
|
+
noEOFCR: false,
|
|
15455
|
+
unifiedLineIndex: unifiedLineIndex$1 + index,
|
|
15456
|
+
splitLineIndex: splitLineIndex$1 + index
|
|
15457
|
+
},
|
|
15458
|
+
additionLine: {
|
|
15459
|
+
unifiedLineIndex: unifiedLineIndex$1 + index,
|
|
15460
|
+
splitLineIndex: splitLineIndex$1 + index,
|
|
15461
|
+
lineIndex: additionLineIndex$1 + index,
|
|
15462
|
+
lineNumber: additionLineNumber$1 + index,
|
|
15463
|
+
noEOFCR: false
|
|
15434
15464
|
}
|
|
15435
|
-
}
|
|
15436
|
-
|
|
15437
|
-
|
|
15438
|
-
index++;
|
|
15465
|
+
});
|
|
15466
|
+
})) {
|
|
15467
|
+
break hunkIterator;
|
|
15439
15468
|
}
|
|
15440
15469
|
unifiedLineIndex$1 = hunk.unifiedLineStart - leadingRegion.fromEnd;
|
|
15441
15470
|
splitLineIndex$1 = hunk.splitLineStart - leadingRegion.fromEnd;
|
|
@@ -15443,48 +15472,36 @@ function iterateOverDiff({ diff, diffStyle, startingLine = 0, totalLines = Infin
|
|
|
15443
15472
|
additionLineIndex$1 = hunk.additionLineIndex - leadingRegion.fromEnd;
|
|
15444
15473
|
deletionLineNumber$1 = hunk.deletionStart - leadingRegion.fromEnd;
|
|
15445
15474
|
additionLineNumber$1 = hunk.additionStart - leadingRegion.fromEnd;
|
|
15446
|
-
|
|
15447
|
-
|
|
15448
|
-
|
|
15449
|
-
|
|
15450
|
-
|
|
15451
|
-
|
|
15452
|
-
|
|
15453
|
-
|
|
15454
|
-
|
|
15455
|
-
|
|
15456
|
-
|
|
15457
|
-
|
|
15458
|
-
|
|
15459
|
-
|
|
15460
|
-
|
|
15461
|
-
|
|
15462
|
-
|
|
15463
|
-
|
|
15464
|
-
|
|
15465
|
-
|
|
15466
|
-
noEOFCR: false,
|
|
15467
|
-
unifiedLineIndex: unifiedLineIndex$1 + index,
|
|
15468
|
-
splitLineIndex: splitLineIndex$1 + index
|
|
15469
|
-
},
|
|
15470
|
-
additionLine: {
|
|
15471
|
-
unifiedLineIndex: unifiedLineIndex$1 + index,
|
|
15472
|
-
splitLineIndex: splitLineIndex$1 + index,
|
|
15473
|
-
lineIndex: additionLineIndex$1 + index,
|
|
15474
|
-
lineNumber: additionLineNumber$1 + index,
|
|
15475
|
-
noEOFCR: false
|
|
15476
|
-
}
|
|
15477
|
-
})) {
|
|
15478
|
-
break hunkIterator;
|
|
15475
|
+
if (walkContextLines(state, leadingRegion.fromEnd, diffStyle, (index) => {
|
|
15476
|
+
return state.emit({
|
|
15477
|
+
hunkIndex,
|
|
15478
|
+
hunk,
|
|
15479
|
+
collapsedBefore: consumePendingCollapsed(),
|
|
15480
|
+
collapsedAfter: 0,
|
|
15481
|
+
type: "context-expanded",
|
|
15482
|
+
deletionLine: {
|
|
15483
|
+
lineNumber: deletionLineNumber$1 + index,
|
|
15484
|
+
lineIndex: deletionLineIndex$1 + index,
|
|
15485
|
+
noEOFCR: false,
|
|
15486
|
+
unifiedLineIndex: unifiedLineIndex$1 + index,
|
|
15487
|
+
splitLineIndex: splitLineIndex$1 + index
|
|
15488
|
+
},
|
|
15489
|
+
additionLine: {
|
|
15490
|
+
unifiedLineIndex: unifiedLineIndex$1 + index,
|
|
15491
|
+
splitLineIndex: splitLineIndex$1 + index,
|
|
15492
|
+
lineIndex: additionLineIndex$1 + index,
|
|
15493
|
+
lineNumber: additionLineNumber$1 + index,
|
|
15494
|
+
noEOFCR: false
|
|
15479
15495
|
}
|
|
15480
|
-
}
|
|
15481
|
-
|
|
15482
|
-
|
|
15483
|
-
|
|
15496
|
+
});
|
|
15497
|
+
}, () => {
|
|
15498
|
+
consumePendingCollapsed();
|
|
15499
|
+
})) {
|
|
15500
|
+
break hunkIterator;
|
|
15484
15501
|
}
|
|
15485
15502
|
} else {
|
|
15486
15503
|
state.incrementCounts(expandedLineCount, expandedLineCount);
|
|
15487
|
-
|
|
15504
|
+
consumePendingCollapsed();
|
|
15488
15505
|
}
|
|
15489
15506
|
let unifiedLineIndex = hunk.unifiedLineStart;
|
|
15490
15507
|
let splitLineIndex = hunk.splitLineStart;
|
|
@@ -15500,51 +15517,39 @@ function iterateOverDiff({ diff, diffStyle, startingLine = 0, totalLines = Infin
|
|
|
15500
15517
|
const isLastContent = content === lastContent;
|
|
15501
15518
|
if (content.type === "context") {
|
|
15502
15519
|
if (!state.shouldSkip(content.lines, content.lines)) {
|
|
15503
|
-
|
|
15504
|
-
|
|
15505
|
-
|
|
15506
|
-
|
|
15507
|
-
|
|
15508
|
-
|
|
15509
|
-
|
|
15510
|
-
|
|
15511
|
-
|
|
15512
|
-
|
|
15513
|
-
|
|
15514
|
-
|
|
15515
|
-
|
|
15516
|
-
|
|
15517
|
-
|
|
15518
|
-
|
|
15519
|
-
|
|
15520
|
-
|
|
15521
|
-
|
|
15522
|
-
|
|
15523
|
-
|
|
15524
|
-
|
|
15525
|
-
|
|
15526
|
-
noEOFCR: isLastLine && hunk.noEOFCRDeletions,
|
|
15527
|
-
unifiedLineIndex: unifiedRowIndex,
|
|
15528
|
-
splitLineIndex: splitRowIndex
|
|
15529
|
-
},
|
|
15530
|
-
additionLine: {
|
|
15531
|
-
unifiedLineIndex: unifiedRowIndex,
|
|
15532
|
-
splitLineIndex: splitRowIndex,
|
|
15533
|
-
lineIndex: additionLineIndex + index,
|
|
15534
|
-
lineNumber: additionLineNumber + index,
|
|
15535
|
-
noEOFCR: isLastLine && hunk.noEOFCRAdditions
|
|
15536
|
-
}
|
|
15537
|
-
})) {
|
|
15538
|
-
break hunkIterator;
|
|
15520
|
+
if (walkContextLines(state, content.lines, diffStyle, (index) => {
|
|
15521
|
+
const isLastLine = isLastContent && index === content.lines - 1;
|
|
15522
|
+
const unifiedRowIndex = unifiedLineIndex + index;
|
|
15523
|
+
const splitRowIndex = splitLineIndex + index;
|
|
15524
|
+
return state.emit({
|
|
15525
|
+
hunkIndex,
|
|
15526
|
+
hunk,
|
|
15527
|
+
collapsedBefore: consumePendingCollapsed(),
|
|
15528
|
+
collapsedAfter: getTrailingCollapsedAfter(unifiedRowIndex, splitRowIndex),
|
|
15529
|
+
type: "context",
|
|
15530
|
+
deletionLine: {
|
|
15531
|
+
lineNumber: deletionLineNumber + index,
|
|
15532
|
+
lineIndex: deletionLineIndex + index,
|
|
15533
|
+
noEOFCR: isLastLine && hunk.noEOFCRDeletions,
|
|
15534
|
+
unifiedLineIndex: unifiedRowIndex,
|
|
15535
|
+
splitLineIndex: splitRowIndex
|
|
15536
|
+
},
|
|
15537
|
+
additionLine: {
|
|
15538
|
+
unifiedLineIndex: unifiedRowIndex,
|
|
15539
|
+
splitLineIndex: splitRowIndex,
|
|
15540
|
+
lineIndex: additionLineIndex + index,
|
|
15541
|
+
lineNumber: additionLineNumber + index,
|
|
15542
|
+
noEOFCR: isLastLine && hunk.noEOFCRAdditions
|
|
15539
15543
|
}
|
|
15540
|
-
}
|
|
15541
|
-
|
|
15542
|
-
|
|
15543
|
-
|
|
15544
|
+
});
|
|
15545
|
+
}, () => {
|
|
15546
|
+
consumePendingCollapsed();
|
|
15547
|
+
})) {
|
|
15548
|
+
break hunkIterator;
|
|
15544
15549
|
}
|
|
15545
15550
|
} else {
|
|
15546
15551
|
state.incrementCounts(content.lines, content.lines);
|
|
15547
|
-
|
|
15552
|
+
consumePendingCollapsed();
|
|
15548
15553
|
}
|
|
15549
15554
|
unifiedLineIndex += content.lines;
|
|
15550
15555
|
splitLineIndex += content.lines;
|
|
@@ -15558,6 +15563,10 @@ function iterateOverDiff({ diff, diffStyle, startingLine = 0, totalLines = Infin
|
|
|
15558
15563
|
const shouldSkipChange = state.shouldSkip(unifiedCount, splitCount);
|
|
15559
15564
|
if (!shouldSkipChange) {
|
|
15560
15565
|
const iterationRanges = getChangeIterationRanges(state, content, diffStyle);
|
|
15566
|
+
const firstRangeStart = iterationRanges[0]?.[0] ?? 0;
|
|
15567
|
+
if (firstRangeStart > 0) {
|
|
15568
|
+
consumePendingCollapsed();
|
|
15569
|
+
}
|
|
15561
15570
|
for (const [rangeStart, rangeEnd] of iterationRanges) {
|
|
15562
15571
|
for (let index = rangeStart; index < rangeEnd; index++) {
|
|
15563
15572
|
const unifiedRowIndex = unifiedLineIndex + index;
|
|
@@ -15566,7 +15575,7 @@ function iterateOverDiff({ diff, diffStyle, startingLine = 0, totalLines = Infin
|
|
|
15566
15575
|
if (state.emit(getChangeLineData({
|
|
15567
15576
|
hunkIndex,
|
|
15568
15577
|
hunk,
|
|
15569
|
-
collapsedBefore:
|
|
15578
|
+
collapsedBefore: consumePendingCollapsed(),
|
|
15570
15579
|
collapsedAfter,
|
|
15571
15580
|
diffStyle,
|
|
15572
15581
|
index,
|
|
@@ -15586,7 +15595,7 @@ function iterateOverDiff({ diff, diffStyle, startingLine = 0, totalLines = Infin
|
|
|
15586
15595
|
}
|
|
15587
15596
|
}
|
|
15588
15597
|
}
|
|
15589
|
-
|
|
15598
|
+
consumePendingCollapsed();
|
|
15590
15599
|
state.incrementCounts(unifiedCount, splitCount);
|
|
15591
15600
|
unifiedLineIndex += unifiedCount;
|
|
15592
15601
|
splitLineIndex += splitCount;
|
|
@@ -15599,48 +15608,31 @@ function iterateOverDiff({ diff, diffStyle, startingLine = 0, totalLines = Infin
|
|
|
15599
15608
|
if (trailingRegion != null) {
|
|
15600
15609
|
const { collapsedLines, fromStart, fromEnd } = trailingRegion;
|
|
15601
15610
|
const len = fromStart + fromEnd;
|
|
15602
|
-
|
|
15603
|
-
|
|
15604
|
-
state.
|
|
15605
|
-
|
|
15606
|
-
|
|
15607
|
-
|
|
15608
|
-
|
|
15609
|
-
|
|
15610
|
-
|
|
15611
|
-
|
|
15612
|
-
|
|
15613
|
-
|
|
15614
|
-
|
|
15615
|
-
|
|
15616
|
-
|
|
15617
|
-
|
|
15618
|
-
|
|
15619
|
-
|
|
15620
|
-
|
|
15621
|
-
|
|
15622
|
-
|
|
15623
|
-
deletionLine: {
|
|
15624
|
-
lineNumber: deletionLineNumber + index,
|
|
15625
|
-
lineIndex: deletionLineIndex + index,
|
|
15626
|
-
noEOFCR: false,
|
|
15627
|
-
unifiedLineIndex: unifiedLineIndex + index,
|
|
15628
|
-
splitLineIndex: splitLineIndex + index
|
|
15629
|
-
},
|
|
15630
|
-
additionLine: {
|
|
15631
|
-
unifiedLineIndex: unifiedLineIndex + index,
|
|
15632
|
-
splitLineIndex: splitLineIndex + index,
|
|
15633
|
-
lineIndex: additionLineIndex + index,
|
|
15634
|
-
lineNumber: additionLineNumber + index,
|
|
15635
|
-
noEOFCR: false
|
|
15636
|
-
}
|
|
15637
|
-
})) {
|
|
15638
|
-
break hunkIterator;
|
|
15611
|
+
if (walkContextLines(state, len, diffStyle, (index) => {
|
|
15612
|
+
const isLastLine = index === len - 1;
|
|
15613
|
+
return state.emit({
|
|
15614
|
+
hunkIndex: diff.hunks.length,
|
|
15615
|
+
hunk: undefined,
|
|
15616
|
+
collapsedBefore: 0,
|
|
15617
|
+
collapsedAfter: isLastLine ? collapsedLines : 0,
|
|
15618
|
+
type: "context-expanded",
|
|
15619
|
+
deletionLine: {
|
|
15620
|
+
lineNumber: deletionLineNumber + index,
|
|
15621
|
+
lineIndex: deletionLineIndex + index,
|
|
15622
|
+
noEOFCR: false,
|
|
15623
|
+
unifiedLineIndex: unifiedLineIndex + index,
|
|
15624
|
+
splitLineIndex: splitLineIndex + index
|
|
15625
|
+
},
|
|
15626
|
+
additionLine: {
|
|
15627
|
+
unifiedLineIndex: unifiedLineIndex + index,
|
|
15628
|
+
splitLineIndex: splitLineIndex + index,
|
|
15629
|
+
lineIndex: additionLineIndex + index,
|
|
15630
|
+
lineNumber: additionLineNumber + index,
|
|
15631
|
+
noEOFCR: false
|
|
15639
15632
|
}
|
|
15640
|
-
}
|
|
15641
|
-
|
|
15642
|
-
|
|
15643
|
-
index++;
|
|
15633
|
+
});
|
|
15634
|
+
}, undefined, () => state.shouldBreak())) {
|
|
15635
|
+
break hunkIterator;
|
|
15644
15636
|
}
|
|
15645
15637
|
}
|
|
15646
15638
|
}
|
|
@@ -15719,15 +15711,14 @@ function getHunkPrefixCounts({ diff, expandedHunks, collapsedContextThreshold })
|
|
|
15719
15711
|
const leadingCount = leadingRegion.fromStart + leadingRegion.fromEnd;
|
|
15720
15712
|
splitCount += leadingCount + hunk.splitLineCount;
|
|
15721
15713
|
unifiedCount += leadingCount + hunk.unifiedLineCount;
|
|
15722
|
-
|
|
15723
|
-
|
|
15724
|
-
|
|
15725
|
-
|
|
15726
|
-
|
|
15727
|
-
|
|
15728
|
-
|
|
15729
|
-
|
|
15730
|
-
});
|
|
15714
|
+
const trailingRegion = index === finalHunkIndex ? getTrailingExpandedRegion({
|
|
15715
|
+
fileDiff: diff,
|
|
15716
|
+
hunkIndex: index,
|
|
15717
|
+
expandedHunks,
|
|
15718
|
+
collapsedContextThreshold,
|
|
15719
|
+
errorPrefix: "iterateOverDiff"
|
|
15720
|
+
}) : undefined;
|
|
15721
|
+
if (trailingRegion != null) {
|
|
15731
15722
|
const trailingCount = trailingRegion.fromStart + trailingRegion.fromEnd;
|
|
15732
15723
|
splitCount += trailingCount;
|
|
15733
15724
|
unifiedCount += trailingCount;
|
|
@@ -15739,7 +15730,7 @@ function getHunkPrefixCounts({ diff, expandedHunks, collapsedContextThreshold })
|
|
|
15739
15730
|
}
|
|
15740
15731
|
return prefixCounts;
|
|
15741
15732
|
}
|
|
15742
|
-
function
|
|
15733
|
+
function getContextLineIterationBounds(state, count, diffStyle) {
|
|
15743
15734
|
if (!state.isWindowedHighlight || count <= 0) {
|
|
15744
15735
|
return [0, count];
|
|
15745
15736
|
}
|
|
@@ -15769,20 +15760,31 @@ function getEqualLineIterationRange(state, count, diffStyle) {
|
|
|
15769
15760
|
}
|
|
15770
15761
|
return [start, end];
|
|
15771
15762
|
}
|
|
15772
|
-
function
|
|
15773
|
-
const
|
|
15774
|
-
|
|
15775
|
-
|
|
15776
|
-
|
|
15763
|
+
function walkContextLines(state, count, diffStyle, callback, onSkippedStart, shouldBreak) {
|
|
15764
|
+
const [startIndex, endIndex] = getContextLineIterationBounds(state, count, diffStyle);
|
|
15765
|
+
if (startIndex > 0) {
|
|
15766
|
+
state.incrementCounts(startIndex, startIndex);
|
|
15767
|
+
onSkippedStart?.();
|
|
15777
15768
|
}
|
|
15778
|
-
|
|
15779
|
-
|
|
15780
|
-
|
|
15781
|
-
|
|
15782
|
-
|
|
15783
|
-
|
|
15769
|
+
let index = startIndex;
|
|
15770
|
+
while (index < count) {
|
|
15771
|
+
if (shouldBreak?.() === true) {
|
|
15772
|
+
return true;
|
|
15773
|
+
}
|
|
15774
|
+
if (index >= endIndex) {
|
|
15775
|
+
state.incrementCounts(count - index, count - index);
|
|
15776
|
+
break;
|
|
15777
|
+
}
|
|
15778
|
+
if (state.isInWindow(0, 0)) {
|
|
15779
|
+
if (callback(index) === true) {
|
|
15780
|
+
return true;
|
|
15781
|
+
}
|
|
15782
|
+
} else {
|
|
15783
|
+
state.incrementCounts(1, 1);
|
|
15784
|
+
}
|
|
15785
|
+
index++;
|
|
15784
15786
|
}
|
|
15785
|
-
return
|
|
15787
|
+
return false;
|
|
15786
15788
|
}
|
|
15787
15789
|
function getChangeIterationRanges(state, content, diffStyle) {
|
|
15788
15790
|
if (!state.isWindowedHighlight) {
|
|
@@ -16424,7 +16426,7 @@ function getHighlighter(preferredHighlighter = "shiki-js") {
|
|
|
16424
16426
|
highlighter ??= createHighlighterCore({
|
|
16425
16427
|
themes: [],
|
|
16426
16428
|
langs: [],
|
|
16427
|
-
engine: preferredHighlighter === "shiki-wasm" ? createOnigurumaEngine(import("./wasm-
|
|
16429
|
+
engine: preferredHighlighter === "shiki-wasm" ? createOnigurumaEngine(import("./wasm-BaDzIkIn.js")) : createJavaScriptRegexEngine()
|
|
16428
16430
|
});
|
|
16429
16431
|
return highlighter;
|
|
16430
16432
|
}
|