@pierre/diffs 1.0.2 → 1.0.4
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/managers/LineSelectionManager.js +8 -8
- package/dist/managers/LineSelectionManager.js.map +1 -1
- package/dist/managers/MouseEventManager.d.ts +5 -5
- package/dist/managers/MouseEventManager.d.ts.map +1 -1
- package/dist/managers/MouseEventManager.js +6 -6
- package/dist/managers/MouseEventManager.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/parseDiffFromFile.d.ts +2 -1
- package/dist/utils/parseDiffFromFile.d.ts.map +1 -1
- package/dist/utils/parseDiffFromFile.js +2 -2
- package/dist/utils/parseDiffFromFile.js.map +1 -1
- package/dist/utils/renderDiffWithHighlighter.js +4 -4
- package/dist/utils/renderDiffWithHighlighter.js.map +1 -1
- package/dist/worker/worker-portable.js +11 -11
- package/dist/worker/worker-portable.js.map +1 -1
- package/dist/worker/worker.js +4 -4
- package/dist/worker/worker.js.map +1 -1
- package/package.json +4 -4
|
@@ -3442,7 +3442,7 @@ function toRegExpDetails(pattern, options) {
|
|
|
3442
3442
|
}
|
|
3443
3443
|
|
|
3444
3444
|
//#endregion
|
|
3445
|
-
//#region ../../node_modules/.bun/@shikijs+engine-javascript@3.
|
|
3445
|
+
//#region ../../node_modules/.bun/@shikijs+engine-javascript@3.20.0/node_modules/@shikijs/engine-javascript/dist/shared/engine-javascript.hzpS1_41.mjs
|
|
3446
3446
|
const MAX = 4294967295;
|
|
3447
3447
|
var JavaScriptScanner = class {
|
|
3448
3448
|
constructor(patterns, options = {}) {
|
|
@@ -3531,7 +3531,7 @@ var JavaScriptScanner = class {
|
|
|
3531
3531
|
};
|
|
3532
3532
|
|
|
3533
3533
|
//#endregion
|
|
3534
|
-
//#region ../../node_modules/.bun/@shikijs+engine-javascript@3.
|
|
3534
|
+
//#region ../../node_modules/.bun/@shikijs+engine-javascript@3.20.0/node_modules/@shikijs/engine-javascript/dist/engine-compile.mjs
|
|
3535
3535
|
function defaultJavaScriptRegexConstructor(pattern, options) {
|
|
3536
3536
|
return toRegExp(pattern, {
|
|
3537
3537
|
global: true,
|
|
@@ -3564,7 +3564,7 @@ function createJavaScriptRegexEngine(options = {}) {
|
|
|
3564
3564
|
}
|
|
3565
3565
|
|
|
3566
3566
|
//#endregion
|
|
3567
|
-
//#region ../../node_modules/.bun/@shikijs+engine-javascript@3.
|
|
3567
|
+
//#region ../../node_modules/.bun/@shikijs+engine-javascript@3.20.0/node_modules/@shikijs/engine-javascript/dist/engine-raw.mjs
|
|
3568
3568
|
function createJavaScriptRawEngine() {
|
|
3569
3569
|
const options = {
|
|
3570
3570
|
cache: /* @__PURE__ */ new Map(),
|
|
@@ -3583,7 +3583,7 @@ function createJavaScriptRawEngine() {
|
|
|
3583
3583
|
}
|
|
3584
3584
|
|
|
3585
3585
|
//#endregion
|
|
3586
|
-
//#region ../../node_modules/.bun/@shikijs+types@3.
|
|
3586
|
+
//#region ../../node_modules/.bun/@shikijs+types@3.20.0/node_modules/@shikijs/types/dist/index.mjs
|
|
3587
3587
|
var ShikiError = class extends Error {
|
|
3588
3588
|
constructor(message) {
|
|
3589
3589
|
super(message);
|
|
@@ -9498,7 +9498,7 @@ function all(parent) {
|
|
|
9498
9498
|
}
|
|
9499
9499
|
|
|
9500
9500
|
//#endregion
|
|
9501
|
-
//#region ../../node_modules/.bun/@shikijs+core@3.
|
|
9501
|
+
//#region ../../node_modules/.bun/@shikijs+core@3.20.0/node_modules/@shikijs/core/dist/index.mjs
|
|
9502
9502
|
function resolveColorReplacements(theme, options) {
|
|
9503
9503
|
const replacements = typeof theme === "string" ? {} : { ...theme.colorReplacements };
|
|
9504
9504
|
const themeName = typeof theme === "string" ? theme : theme.name;
|
|
@@ -10354,7 +10354,7 @@ function getLastGrammarState(...args) {
|
|
|
10354
10354
|
}
|
|
10355
10355
|
function tokenizeWithTheme(code, grammar, theme, colorMap, options) {
|
|
10356
10356
|
const result = _tokenizeWithTheme(code, grammar, theme, colorMap, options);
|
|
10357
|
-
const grammarState = new GrammarState(
|
|
10357
|
+
const grammarState = new GrammarState(result.stateStack, grammar.name, theme.name);
|
|
10358
10358
|
setLastGrammarStateToMap(result.tokens, grammarState);
|
|
10359
10359
|
return result.tokens;
|
|
10360
10360
|
}
|
|
@@ -13098,7 +13098,7 @@ function cleanLastNewline(contents) {
|
|
|
13098
13098
|
}
|
|
13099
13099
|
|
|
13100
13100
|
//#endregion
|
|
13101
|
-
//#region ../../node_modules/.bun/@shikijs+transformers@3.
|
|
13101
|
+
//#region ../../node_modules/.bun/@shikijs+transformers@3.20.0/node_modules/@shikijs/transformers/dist/index.mjs
|
|
13102
13102
|
const matchers = [
|
|
13103
13103
|
[/^(<!--)(.+)(-->)$/, false],
|
|
13104
13104
|
[/^(\/\*)(.+)(\*\/)$/, false],
|
|
@@ -14663,8 +14663,8 @@ function processLines({ hunks, oldLines, newLines, splitLineIndex = 0, unifiedLi
|
|
|
14663
14663
|
}
|
|
14664
14664
|
}
|
|
14665
14665
|
return {
|
|
14666
|
-
oldContent
|
|
14667
|
-
newContent
|
|
14666
|
+
oldContent,
|
|
14667
|
+
newContent,
|
|
14668
14668
|
oldInfo,
|
|
14669
14669
|
newInfo,
|
|
14670
14670
|
oldDecorations,
|
|
@@ -14703,7 +14703,7 @@ function renderTwoFiles({ oldFile, newFile, oldInfo, newInfo, highlighter: highl
|
|
|
14703
14703
|
hastConfig.lang = oldLang;
|
|
14704
14704
|
state.lineInfo = oldInfo;
|
|
14705
14705
|
hastConfig.decorations = oldDecorations;
|
|
14706
|
-
return getLineNodes(highlighter$1.codeToHast(oldFile.contents, hastConfig));
|
|
14706
|
+
return getLineNodes(highlighter$1.codeToHast(cleanLastNewline(oldFile.contents), hastConfig));
|
|
14707
14707
|
})();
|
|
14708
14708
|
const newLines = (() => {
|
|
14709
14709
|
if (newFile.contents === "") {
|
|
@@ -14712,7 +14712,7 @@ function renderTwoFiles({ oldFile, newFile, oldInfo, newInfo, highlighter: highl
|
|
|
14712
14712
|
hastConfig.lang = newLang;
|
|
14713
14713
|
hastConfig.decorations = newDecorations;
|
|
14714
14714
|
state.lineInfo = newInfo;
|
|
14715
|
-
return getLineNodes(highlighter$1.codeToHast(newFile.contents, hastConfig));
|
|
14715
|
+
return getLineNodes(highlighter$1.codeToHast(cleanLastNewline(newFile.contents), hastConfig));
|
|
14716
14716
|
})();
|
|
14717
14717
|
return {
|
|
14718
14718
|
oldLines,
|