table 6.9.2 → 6.9.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/src/spanningCellManager.js +14 -6
- package/dist/src/spanningCellManager.js.map +1 -1
- package/dist/src/utils.js +93 -2
- package/dist/src/utils.js.map +1 -1
- package/dist/src/wrapString.d.ts +1 -2
- package/dist/src/wrapString.js +6 -4
- package/dist/src/wrapString.js.map +1 -1
- package/dist/src/wrapWord.js +14 -51
- package/dist/src/wrapWord.js.map +1 -1
- package/package.json +1 -1
|
@@ -14,20 +14,28 @@ const getContainingRange = (rangeConfig, context) => {
|
|
|
14
14
|
const width = (0, calculateSpanningCellWidth_1.calculateSpanningCellWidth)(rangeConfig, context);
|
|
15
15
|
const wrappedContent = (0, alignSpanningCell_1.wrapRangeContent)(rangeConfig, width, context);
|
|
16
16
|
const alignedContent = (0, alignSpanningCell_1.alignVerticalRangeContent)(rangeConfig, wrappedContent, context);
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Counts the horizontal borders drawn inside the spanning cell, from the one below its top row up to
|
|
19
|
+
* and including the given border; each of them takes up a line of the spanning cell content.
|
|
20
|
+
*/
|
|
21
|
+
const countDrawnHorizontalBorders = (lastBorderIndex) => {
|
|
18
22
|
const { topLeft } = rangeConfig;
|
|
19
23
|
const { drawHorizontalLine, rowHeights } = context;
|
|
20
|
-
|
|
21
|
-
const totalHiddenHorizontalBorderHeight = (0, utils_1.sequence)(topLeft.row + 1, rowIndex).filter((index) => {
|
|
24
|
+
return (0, utils_1.sequence)(topLeft.row + 1, lastBorderIndex).filter((index) => {
|
|
22
25
|
/* istanbul ignore next */
|
|
23
|
-
return
|
|
26
|
+
return drawHorizontalLine === null || drawHorizontalLine === void 0 ? void 0 : drawHorizontalLine(index, rowHeights.length);
|
|
24
27
|
}).length;
|
|
25
|
-
|
|
28
|
+
};
|
|
29
|
+
const getCellContent = (rowIndex) => {
|
|
30
|
+
const { topLeft } = rangeConfig;
|
|
31
|
+
const { rowHeights } = context;
|
|
32
|
+
const offset = (0, utils_1.sumArray)(rowHeights.slice(topLeft.row, rowIndex)) + countDrawnHorizontalBorders(rowIndex);
|
|
26
33
|
return alignedContent.slice(offset, offset + rowHeights[rowIndex]);
|
|
27
34
|
};
|
|
28
35
|
const getBorderContent = (borderIndex) => {
|
|
29
36
|
const { topLeft } = rangeConfig;
|
|
30
|
-
|
|
37
|
+
// The border being drawn is itself the next line, so only the borders above it count.
|
|
38
|
+
const offset = (0, utils_1.sumArray)(context.rowHeights.slice(topLeft.row, borderIndex)) + countDrawnHorizontalBorders(borderIndex - 1);
|
|
31
39
|
return alignedContent[offset];
|
|
32
40
|
};
|
|
33
41
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spanningCellManager.js","sourceRoot":"","sources":["../../src/spanningCellManager.ts"],"names":[],"mappings":";;;AAAA,2DAE6B;AAC7B,6EAEsC;AACtC,uDAE2B;AAa3B,mCAIiB;AAuBjB,MAAM,eAAe,GAAG,CAAC,IAAqB,EAAE,YAA2B,EAA2B,EAAE;IACtG,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,EAAE;QAC3C,OAAO,IAAA,qBAAa,EAAC,IAAI,EAAE,eAAe,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,WAAwB,EAAE,OAA4B,EAAmC,EAAE;IACrH,MAAM,KAAK,GAAG,IAAA,uDAA0B,EAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAE/D,MAAM,cAAc,GAAG,IAAA,oCAAgB,EAAC,WAAW,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IAErE,MAAM,cAAc,GAAG,IAAA,6CAAyB,EAAC,WAAW,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;IAEvF,MAAM,
|
|
1
|
+
{"version":3,"file":"spanningCellManager.js","sourceRoot":"","sources":["../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E,EAAC,GAAG,UAAU;gBAC3D,UAAU,EAAC,CAAC,EAAC;YAEf,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC;QACD,WAAW,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YAC5B,OAAO,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QAC3C,CAAC;QACD,UAAU;QACV,eAAe;QACf,aAAa,EAAE,CAAC,WAAqB,EAAE,EAAE;YACvC,UAAU,GAAG,WAAW,CAAC;QAC3B,CAAC;QACD,kBAAkB,EAAE,CAAC,gBAA0B,EAAE,EAAE;YACjD,eAAe,GAAG,IAAA,eAAO,EAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;gBAC/D,OAAO,KAAK,CAAC,IAAI,CAAC,EAAC,MAAM,EAAE,MAAM,EAAC,EAAE,GAAG,EAAE;oBACvC,OAAO,KAAK,CAAC;gBACf,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC,CAAC;QACN,CAAC,EAAC,CAAC;AACL,CAAC,CAAC;AA9CW,QAAA,yBAAyB,6BA8CpC"}
|
package/dist/src/utils.js
CHANGED
|
@@ -3,11 +3,99 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.isCellInRange = exports.areCellEqual = exports.calculateRangeCoordinate = exports.flatten = exports.extractTruncates = exports.sumArray = exports.sequence = exports.distributeUnevenly = exports.countSpaceSequence = exports.groupBySizes = exports.makeBorderConfig = exports.splitAnsi = exports.normalizeString = void 0;
|
|
6
|
+
exports.isCellInRange = exports.areCellEqual = exports.calculateRangeCoordinate = exports.flatten = exports.extractTruncates = exports.sumArray = exports.sequence = exports.distributeUnevenly = exports.countSpaceSequence = exports.groupBySizes = exports.makeBorderConfig = exports.splitAnsi = exports.normalizeString = exports.calculateSliceLength = exports.splitGraphemes = void 0;
|
|
7
7
|
const slice_ansi_1 = __importDefault(require("slice-ansi"));
|
|
8
8
|
const string_width_1 = __importDefault(require("string-width"));
|
|
9
9
|
const strip_ansi_1 = __importDefault(require("strip-ansi"));
|
|
10
10
|
const getBorderCharacters_1 = require("./getBorderCharacters");
|
|
11
|
+
/**
|
|
12
|
+
* A user-perceived character: a code point together with the combining marks, variation selectors,
|
|
13
|
+
* emoji modifiers and tag characters attached to it, including zero-width joiner emoji sequences;
|
|
14
|
+
* or a pair of regional indicators, which is rendered as a flag.
|
|
15
|
+
*/
|
|
16
|
+
const graphemeRegex = /\p{Regional_Indicator}{2}|[\s\S][\p{M}\p{Emoji_Modifier}\u{E0020}-\u{E007F}]*(?:\u200D[\s\S][\p{M}\p{Emoji_Modifier}\u{E0020}-\u{E007F}]*)*/gu;
|
|
17
|
+
const printableAsciiRegex = /^[\u0020-\u007E]+$/u;
|
|
18
|
+
/**
|
|
19
|
+
* slice-ansi positions are not terminal columns: it advances one position per code point and two for
|
|
20
|
+
* full-width BMP characters, but only one for astral characters such as emoji. Asking slice-ansi
|
|
21
|
+
* directly keeps the computed boundaries aligned with how it slices.
|
|
22
|
+
*/
|
|
23
|
+
const countSlicePositions = (grapheme) => {
|
|
24
|
+
let positions = 0;
|
|
25
|
+
for (const codePoint of grapheme) {
|
|
26
|
+
positions += (0, slice_ansi_1.default)(codePoint, 0, 1) === '' ? 2 : 1;
|
|
27
|
+
}
|
|
28
|
+
return positions;
|
|
29
|
+
};
|
|
30
|
+
const graphemeCache = new Map();
|
|
31
|
+
/**
|
|
32
|
+
* Measures a grapheme in terminal columns and in slice-ansi positions. Measurements are cached, and the
|
|
33
|
+
* cache is emptied whenever it grows large so that its memory use stays bounded.
|
|
34
|
+
*/
|
|
35
|
+
const measureGrapheme = (value) => {
|
|
36
|
+
let grapheme = graphemeCache.get(value);
|
|
37
|
+
if (!grapheme) {
|
|
38
|
+
if (graphemeCache.size >= 10000) {
|
|
39
|
+
graphemeCache.clear();
|
|
40
|
+
}
|
|
41
|
+
grapheme = {
|
|
42
|
+
positions: countSlicePositions(value),
|
|
43
|
+
value,
|
|
44
|
+
width: (0, string_width_1.default)(value),
|
|
45
|
+
};
|
|
46
|
+
graphemeCache.set(value, grapheme);
|
|
47
|
+
}
|
|
48
|
+
return grapheme;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Splits a string without ANSI escape codes into graphemes, measured in terminal columns and in
|
|
52
|
+
* slice-ansi positions.
|
|
53
|
+
*
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
56
|
+
const splitGraphemes = (subject) => {
|
|
57
|
+
var _a;
|
|
58
|
+
// Printable ASCII, the most common content, is one column and one slice-ansi position per character.
|
|
59
|
+
if (printableAsciiRegex.test(subject)) {
|
|
60
|
+
return Array.from(subject, (value) => {
|
|
61
|
+
return {
|
|
62
|
+
positions: 1,
|
|
63
|
+
value,
|
|
64
|
+
width: 1,
|
|
65
|
+
};
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
return ((_a = subject.match(graphemeRegex)) !== null && _a !== void 0 ? _a : []).map(measureGrapheme);
|
|
69
|
+
};
|
|
70
|
+
exports.splitGraphemes = splitGraphemes;
|
|
71
|
+
/**
|
|
72
|
+
* Calculates the slice-ansi length of the longest run of whole graphemes at the start of a string
|
|
73
|
+
* without ANSI escape codes that fits within the given width. At least one grapheme is included, so
|
|
74
|
+
* that callers always make progress.
|
|
75
|
+
*
|
|
76
|
+
* @internal
|
|
77
|
+
*/
|
|
78
|
+
const calculateSliceLength = (subject, maximumWidth) => {
|
|
79
|
+
// Printable ASCII is one column and one position per character. The character after the cut is
|
|
80
|
+
// checked as well, so that a combining mark or modifier is never separated from the one before it.
|
|
81
|
+
if (maximumWidth >= 1 && printableAsciiRegex.test(subject.slice(0, maximumWidth + 1))) {
|
|
82
|
+
return Math.min(subject.length, maximumWidth);
|
|
83
|
+
}
|
|
84
|
+
// A copy, so that this loop has its own lastIndex.
|
|
85
|
+
const regex = new RegExp(graphemeRegex);
|
|
86
|
+
let width = 0;
|
|
87
|
+
let positions = 0;
|
|
88
|
+
for (let match = regex.exec(subject); match; match = regex.exec(subject)) {
|
|
89
|
+
const grapheme = measureGrapheme(match[0]);
|
|
90
|
+
if (positions > 0 && width + grapheme.width > maximumWidth) {
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
width += grapheme.width;
|
|
94
|
+
positions += grapheme.positions;
|
|
95
|
+
}
|
|
96
|
+
return positions;
|
|
97
|
+
};
|
|
98
|
+
exports.calculateSliceLength = calculateSliceLength;
|
|
11
99
|
/**
|
|
12
100
|
* Converts Windows-style newline to Unix-style
|
|
13
101
|
*
|
|
@@ -23,7 +111,10 @@ exports.normalizeString = normalizeString;
|
|
|
23
111
|
* @internal
|
|
24
112
|
*/
|
|
25
113
|
const splitAnsi = (input) => {
|
|
26
|
-
|
|
114
|
+
// Line lengths in slice-ansi positions, which differ from display widths for emoji.
|
|
115
|
+
const lengths = (0, strip_ansi_1.default)(input).split('\n').map((line) => {
|
|
116
|
+
return (0, exports.calculateSliceLength)(line, Number.POSITIVE_INFINITY);
|
|
117
|
+
});
|
|
27
118
|
const result = [];
|
|
28
119
|
let startIndex = 0;
|
|
29
120
|
lengths.forEach((length) => {
|
package/dist/src/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA+B;AAC/B,gEAAuC;AACvC,4DAAmC;AACnC,+DAE+B;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA+B;AAC/B,gEAAuC;AACvC,4DAAmC;AACnC,+DAE+B;AAa/B;;;;GAIG;AACH,MAAM,aAAa,GAAG,+IAA+I,CAAC;AAEtK,MAAM,mBAAmB,GAAG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KAAK,CAAC,GAAG,KAAK,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,GAAG,KAAK,KAAK,CAAC,GAAG,CAAC;AAC5D,CAAC,CAAC;AAFW,QAAA,YAAY,gBAEvB;AAEK,MAAM,aAAa,GAAG,CAAC,IAAqB,EAAE,EAAC,OAAO,EAAE,WAAW,EAAkB,EAAW,EAAE;IACvG,OAAO,CACL,OAAO,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG;QACvB,IAAI,CAAC,GAAG,IAAI,WAAW,CAAC,GAAG;QAC3B,OAAO,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG;QACvB,IAAI,CAAC,GAAG,IAAI,WAAW,CAAC,GAAG,CAC5B,CAAC;AACJ,CAAC,CAAC;AAPW,QAAA,aAAa,iBAOxB"}
|
package/dist/src/wrapString.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Creates an array of strings split into groups
|
|
3
|
-
* This function works with strings that contain ASCII characters.
|
|
2
|
+
* Creates an array of strings split into groups of at most size terminal columns.
|
|
4
3
|
*
|
|
5
4
|
* wrapText is different from would-be "chunk" implementation
|
|
6
5
|
* in that whitespace characters that occur on a chunk size limit are trimmed.
|
package/dist/src/wrapString.js
CHANGED
|
@@ -6,9 +6,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.wrapString = void 0;
|
|
7
7
|
const slice_ansi_1 = __importDefault(require("slice-ansi"));
|
|
8
8
|
const string_width_1 = __importDefault(require("string-width"));
|
|
9
|
+
const strip_ansi_1 = __importDefault(require("strip-ansi"));
|
|
10
|
+
const utils_1 = require("./utils");
|
|
9
11
|
/**
|
|
10
|
-
* Creates an array of strings split into groups
|
|
11
|
-
* This function works with strings that contain ASCII characters.
|
|
12
|
+
* Creates an array of strings split into groups of at most size terminal columns.
|
|
12
13
|
*
|
|
13
14
|
* wrapText is different from would-be "chunk" implementation
|
|
14
15
|
* in that whitespace characters that occur on a chunk size limit are trimmed.
|
|
@@ -18,8 +19,9 @@ const wrapString = (subject, size) => {
|
|
|
18
19
|
let subjectSlice = subject;
|
|
19
20
|
const chunks = [];
|
|
20
21
|
do {
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
const chunkLength = (0, utils_1.calculateSliceLength)((0, strip_ansi_1.default)(subjectSlice), size);
|
|
23
|
+
chunks.push((0, slice_ansi_1.default)(subjectSlice, 0, chunkLength));
|
|
24
|
+
subjectSlice = (0, slice_ansi_1.default)(subjectSlice, chunkLength).trim();
|
|
23
25
|
} while ((0, string_width_1.default)(subjectSlice));
|
|
24
26
|
return chunks;
|
|
25
27
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrapString.js","sourceRoot":"","sources":["../../src/wrapString.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA+B;AAC/B,gEAAuC;
|
|
1
|
+
{"version":3,"file":"wrapString.js","sourceRoot":"","sources":["../../src/wrapString.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA+B;AAC/B,gEAAuC;AACvC,4DAAmC;AACnC,mCAEiB;AAEjB;;;;;;GAMG;AACI,MAAM,UAAU,GAAG,CAAC,OAAe,EAAE,IAAY,EAAY,EAAE;IACpE,IAAI,YAAY,GAAG,OAAO,CAAC;IAE3B,MAAM,MAAM,GAAa,EAAE,CAAC;IAE5B,GAAG;QACD,MAAM,WAAW,GAAG,IAAA,4BAAoB,EAAC,IAAA,oBAAS,EAAC,YAAY,CAAC,EAAE,IAAI,CAAC,CAAC;QAExE,MAAM,CAAC,IAAI,CAAC,IAAA,oBAAK,EAAC,YAAY,EAAE,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC;QAEjD,YAAY,GAAG,IAAA,oBAAK,EAAC,YAAY,EAAE,WAAW,CAAC,CAAC,IAAI,EAAE,CAAC;KACxD,QAAQ,IAAA,sBAAW,EAAC,YAAY,CAAC,EAAE;IAEpC,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAdW,QAAA,UAAU,cAcrB"}
|
package/dist/src/wrapWord.js
CHANGED
|
@@ -5,72 +5,35 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.wrapWord = void 0;
|
|
7
7
|
const slice_ansi_1 = __importDefault(require("slice-ansi"));
|
|
8
|
-
const string_width_1 = __importDefault(require("string-width"));
|
|
9
8
|
const strip_ansi_1 = __importDefault(require("strip-ansi"));
|
|
9
|
+
const utils_1 = require("./utils");
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* or a pair of regional indicators, which is rendered as a flag.
|
|
11
|
+
* Number of characters standing in for a grapheme in the wrapping expression: one per terminal column,
|
|
12
|
+
* and at least one.
|
|
14
13
|
*/
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
* slice-ansi positions are not terminal columns: it advances one position per code point and two for
|
|
18
|
-
* full-width BMP characters, but only one for astral characters such as emoji. Asking slice-ansi
|
|
19
|
-
* directly keeps the computed boundaries aligned with how it slices.
|
|
20
|
-
*/
|
|
21
|
-
const countSlicePositions = (grapheme) => {
|
|
22
|
-
let positions = 0;
|
|
23
|
-
for (const codePoint of grapheme) {
|
|
24
|
-
positions += (0, slice_ansi_1.default)(codePoint, 0, 1) === '' ? 2 : 1;
|
|
25
|
-
}
|
|
26
|
-
return positions;
|
|
27
|
-
};
|
|
28
|
-
const printableAsciiRegex = /^[\u0020-\u007E]+$/u;
|
|
29
|
-
const splitGraphemes = (subject) => {
|
|
30
|
-
var _a;
|
|
31
|
-
// Printable ASCII, the most common content, is one column and one slice-ansi position per character.
|
|
32
|
-
if (printableAsciiRegex.test(subject)) {
|
|
33
|
-
return Array.from(subject, (character) => {
|
|
34
|
-
return {
|
|
35
|
-
columns: character,
|
|
36
|
-
positions: 1,
|
|
37
|
-
};
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
const cache = new Map();
|
|
41
|
-
return ((_a = subject.match(graphemeRegex)) !== null && _a !== void 0 ? _a : []).map((grapheme) => {
|
|
42
|
-
let cached = cache.get(grapheme);
|
|
43
|
-
if (!cached) {
|
|
44
|
-
cached = {
|
|
45
|
-
// A single code unit stands for itself, so that whitespace, line terminators and break
|
|
46
|
-
// characters keep their meaning in the wrapping expression; it is repeated when it is wide.
|
|
47
|
-
columns: (grapheme.length === 1 ? grapheme : 'x').repeat(Math.max((0, string_width_1.default)(grapheme), 1)),
|
|
48
|
-
positions: countSlicePositions(grapheme),
|
|
49
|
-
};
|
|
50
|
-
cache.set(grapheme, cached);
|
|
51
|
-
}
|
|
52
|
-
return cached;
|
|
53
|
-
});
|
|
14
|
+
const countColumns = (grapheme) => {
|
|
15
|
+
return Math.max(grapheme.width, 1);
|
|
54
16
|
};
|
|
55
17
|
/**
|
|
56
18
|
* Finds the line boundaries by matching the wrapping expression against one character per terminal
|
|
57
19
|
* column, and reports each line length and the whitespace that follows it in slice-ansi positions.
|
|
58
20
|
*/
|
|
59
21
|
const calculateStringLengths = (input, size) => {
|
|
60
|
-
|
|
61
|
-
const graphemes = splitGraphemes((0, strip_ansi_1.default)(input));
|
|
22
|
+
const graphemes = (0, utils_1.splitGraphemes)((0, strip_ansi_1.default)(input));
|
|
62
23
|
const width = Math.max(size, 1);
|
|
63
24
|
// https://regex101.com/r/gY5kZ1/1
|
|
64
25
|
const re = new RegExp('(^.{1,' + String(width) + '}(\\s+|$))|(^.{1,' + String(Math.max(size - 1, 1)) + '}(\\\\|/|_|\\.|,|;|-))');
|
|
65
|
-
|
|
66
|
-
|
|
26
|
+
// A single code unit stands for itself, so that whitespace, line terminators and break characters keep
|
|
27
|
+
// their meaning in the wrapping expression; anything else becomes placeholder columns.
|
|
28
|
+
let subject = graphemes.map((grapheme) => {
|
|
29
|
+
return (grapheme.value.length === 1 ? grapheme.value : 'x').repeat(countColumns(grapheme));
|
|
67
30
|
}).join('');
|
|
68
31
|
let index = 0;
|
|
69
32
|
const consumePositions = (columns) => {
|
|
70
33
|
let positions = 0;
|
|
71
34
|
let remainingColumns = columns;
|
|
72
35
|
while (remainingColumns > 0 && index < graphemes.length) {
|
|
73
|
-
remainingColumns -= graphemes[index]
|
|
36
|
+
remainingColumns -= countColumns(graphemes[index]);
|
|
74
37
|
positions += graphemes[index].positions;
|
|
75
38
|
index += 1;
|
|
76
39
|
}
|
|
@@ -88,9 +51,9 @@ const calculateStringLengths = (input, size) => {
|
|
|
88
51
|
else {
|
|
89
52
|
// No break opportunity within reach: cut after as many whole graphemes as fit, but always take
|
|
90
53
|
// at least one so that wrapping makes progress.
|
|
91
|
-
lineColumns =
|
|
92
|
-
for (let next = index + 1; next < graphemes.length && lineColumns + graphemes[next]
|
|
93
|
-
lineColumns += graphemes[next]
|
|
54
|
+
lineColumns = index < graphemes.length ? countColumns(graphemes[index]) : 0;
|
|
55
|
+
for (let next = index + 1; next < graphemes.length && lineColumns + countColumns(graphemes[next]) <= width; next += 1) {
|
|
56
|
+
lineColumns += countColumns(graphemes[next]);
|
|
94
57
|
}
|
|
95
58
|
chunkColumns = lineColumns;
|
|
96
59
|
}
|
package/dist/src/wrapWord.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrapWord.js","sourceRoot":"","sources":["../../src/wrapWord.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"wrapWord.js","sourceRoot":"","sources":["../../src/wrapWord.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA+B;AAC/B,4DAAmC;AAInC,mCAEiB;AAEjB;;;GAGG;AACH,MAAM,YAAY,GAAG,CAAC,QAAkB,EAAU,EAAE;IAClD,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;AACrC,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,sBAAsB,GAAG,CAAC,KAAa,EAAE,IAAY,EAA0C,EAAE;IACrG,MAAM,SAAS,GAAG,IA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