toolbox-x 2.4.1 → 2.4.2
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/CHANGELOG.md +7 -0
- package/dist/{basics-DY7AX7D4.d.mts → basics-BuHQJCNG.d.mts} +1 -1
- package/dist/{basics-DlwGpXu-.d.cts → basics-CLwtIxap.d.cts} +1 -1
- package/dist/{case-CcoD-jFV.d.mts → case-BmB2aGyp.d.cts} +1 -1
- package/dist/{case-DMCkxWbW.d.cts → case-Ce8HJI8I.d.mts} +1 -1
- package/dist/change-case.d.cts +1 -1
- package/dist/change-case.d.mts +1 -1
- package/dist/dom/index.d.cts +2 -2
- package/dist/dom/index.d.mts +2 -2
- package/dist/{form-DIYoIS0E.d.mts → form-D_5I437n.d.mts} +1 -1
- package/dist/{form-DA-YShnM.d.cts → form-DhsFvo_D.d.cts} +1 -1
- package/dist/hash/index.d.cts +1 -1
- package/dist/hash/index.d.mts +1 -1
- package/dist/index.cjs +2 -4
- package/dist/index.d.cts +4 -4
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +2 -4
- package/dist/{query-BLsaWi3q.d.cts → query-BMtRmMSC.d.cts} +1 -1
- package/dist/{query-Bi_ofCBp.d.mts → query-C-r5ZbO-.d.mts} +1 -1
- package/dist/{string-EMT7czsU.d.cts → string-Ok_IMpHP.d.cts} +42 -21
- package/dist/{string-GQsmDdYa.d.mts → string-edtZyJHf.d.mts} +42 -21
- package/dist/types/form.d.cts +1 -1
- package/dist/types/form.d.mts +1 -1
- package/dist/types/string.d.cts +2 -2
- package/dist/types/string.d.mts +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@ All notable changes to **toolbox-x** will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
> Auto-generated from git history using [changelog-maker](https://github.com/nodejs/changelog-maker).
|
|
6
6
|
|
|
7
|
+
## [v2.4.2](https://github.com/nazmul-nhb/toolbox-x/releases/tag/v2.4.2) — 2026-06-17
|
|
8
|
+
|
|
9
|
+
[Compare changes](https://github.com/nazmul-nhb/toolbox-x/compare/v2.4.1...v2.4.2)
|
|
10
|
+
|
|
11
|
+
* \[[`9ce8196718`](https://github.com/nazmul-nhb/toolbox-x/commit/9ce8196718)] - 🔧 update(string-diff): updated type defs and docs for diff utils (Nazmul Hassan)
|
|
12
|
+
* \[[`6bd96bf45d`](https://github.com/nazmul-nhb/toolbox-x/commit/6bd96bf45d)] - 📚 docs: updated CHANGELOG.md for v2.4.1 (github-actions\[bot])
|
|
13
|
+
|
|
7
14
|
## [v2.4.1](https://github.com/nazmul-nhb/toolbox-x/releases/tag/v2.4.1) — 2026-06-17
|
|
8
15
|
|
|
9
16
|
[Compare changes](https://github.com/nazmul-nhb/toolbox-x/compare/v2.4.0...v2.4.1)
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import { F as PascalCase, G as TitleCase, H as SnakeCase, I as PascalSnakeCase, K as TrainCase, L as PathCase, N as KebabCase, V as SentenceCase, W as StringCaseOptions, g as CaseFormat, h as CapitalizeOptions, k as DotCase, m as CamelCase, u as $WidenEmpty, v as ConstantCase } from "./string-Ok_IMpHP.cjs";
|
|
18
18
|
|
|
19
19
|
//#region src/string/case.d.ts
|
|
20
20
|
/**
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import { F as PascalCase, G as TitleCase, H as SnakeCase, I as PascalSnakeCase, K as TrainCase, L as PathCase, N as KebabCase, V as SentenceCase, W as StringCaseOptions, g as CaseFormat, h as CapitalizeOptions, k as DotCase, m as CamelCase, u as $WidenEmpty, v as ConstantCase } from "./string-edtZyJHf.mjs";
|
|
18
18
|
|
|
19
19
|
//#region src/string/case.d.ts
|
|
20
20
|
/**
|
package/dist/change-case.d.cts
CHANGED
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { a as toDotCase, c as toPascalSnakeCase, d as toSnakeCase, f as toTitleCase, i as toConstantCase, l as toPathCase, n as convertStringCase, o as toKebabCase, p as toTrainCase, r as toCamelCase, s as toPascalCase, t as capitalizeString, u as toSentenceCase } from "./case-
|
|
17
|
+
import { a as toDotCase, c as toPascalSnakeCase, d as toSnakeCase, f as toTitleCase, i as toConstantCase, l as toPathCase, n as convertStringCase, o as toKebabCase, p as toTrainCase, r as toCamelCase, s as toPascalCase, t as capitalizeString, u as toSentenceCase } from "./case-BmB2aGyp.cjs";
|
|
18
18
|
export { capitalizeString, convertStringCase, toCamelCase, toConstantCase, toDotCase, toKebabCase, toPascalCase, toPascalSnakeCase, toPathCase, toSentenceCase, toSnakeCase, toTitleCase, toTrainCase };
|
package/dist/change-case.d.mts
CHANGED
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { a as toDotCase, c as toPascalSnakeCase, d as toSnakeCase, f as toTitleCase, i as toConstantCase, l as toPathCase, n as convertStringCase, o as toKebabCase, p as toTrainCase, r as toCamelCase, s as toPascalCase, t as capitalizeString, u as toSentenceCase } from "./case-
|
|
17
|
+
import { a as toDotCase, c as toPascalSnakeCase, d as toSnakeCase, f as toTitleCase, i as toConstantCase, l as toPathCase, n as convertStringCase, o as toKebabCase, p as toTrainCase, r as toCamelCase, s as toPascalCase, t as capitalizeString, u as toSentenceCase } from "./case-Ce8HJI8I.mjs";
|
|
18
18
|
export { capitalizeString, convertStringCase, toCamelCase, toConstantCase, toDotCase, toKebabCase, toPascalCase, toPascalSnakeCase, toPathCase, toSentenceCase, toSnakeCase, toTitleCase, toTrainCase };
|
package/dist/dom/index.d.cts
CHANGED
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { J as Deserializer, ft as Serializer, y as GenericObject } from "../object-DyVg8BFt.cjs";
|
|
18
|
-
import { a as updateQueryParam, i as parseQueryStringLiteral, n as getQueryParams, r as parseQueryString, t as generateQueryParams } from "../query-
|
|
19
|
-
import { a as OriginFileObj, i as FormDataConfigs, o as ParsedFormData, r as FileUpload, s as SerializedForm, t as CustomFile } from "../form-
|
|
18
|
+
import { a as updateQueryParam, i as parseQueryStringLiteral, n as getQueryParams, r as parseQueryString, t as generateQueryParams } from "../query-BMtRmMSC.cjs";
|
|
19
|
+
import { a as OriginFileObj, i as FormDataConfigs, o as ParsedFormData, r as FileUpload, s as SerializedForm, t as CustomFile } from "../form-DhsFvo_D.cjs";
|
|
20
20
|
|
|
21
21
|
//#region src/dom/storage.d.ts
|
|
22
22
|
/**
|
package/dist/dom/index.d.mts
CHANGED
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { J as Deserializer, ft as Serializer, y as GenericObject } from "../object-DyVg8BFt.mjs";
|
|
18
|
-
import { a as updateQueryParam, i as parseQueryStringLiteral, n as getQueryParams, r as parseQueryString, t as generateQueryParams } from "../query-
|
|
19
|
-
import { a as OriginFileObj, i as FormDataConfigs, o as ParsedFormData, r as FileUpload, s as SerializedForm, t as CustomFile } from "../form-
|
|
18
|
+
import { a as updateQueryParam, i as parseQueryStringLiteral, n as getQueryParams, r as parseQueryString, t as generateQueryParams } from "../query-C-r5ZbO-.mjs";
|
|
19
|
+
import { a as OriginFileObj, i as FormDataConfigs, o as ParsedFormData, r as FileUpload, s as SerializedForm, t as CustomFile } from "../form-D_5I437n.mjs";
|
|
20
20
|
|
|
21
21
|
//#region src/dom/storage.d.ts
|
|
22
22
|
/**
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { S as KeyForObject, T as NestedKeyString, ai as RequireExactly, at as NormalPrimitive, u as DotNotationKey, x as KeyForArray } from "./object-DyVg8BFt.mjs";
|
|
18
|
-
import {
|
|
18
|
+
import { R as QueryString } from "./string-edtZyJHf.mjs";
|
|
19
19
|
import { f as TypeOrArray } from "./array-CbAKXvhH.mjs";
|
|
20
20
|
|
|
21
21
|
//#region src/types/form.d.ts
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { S as KeyForObject, T as NestedKeyString, ai as RequireExactly, at as NormalPrimitive, u as DotNotationKey, x as KeyForArray } from "./object-DyVg8BFt.cjs";
|
|
18
|
-
import {
|
|
18
|
+
import { R as QueryString } from "./string-Ok_IMpHP.cjs";
|
|
19
19
|
import { f as TypeOrArray } from "./array-EVkwcL_k.cjs";
|
|
20
20
|
|
|
21
21
|
//#region src/types/form.d.ts
|
package/dist/hash/index.d.cts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import { nt as Maybe, y as GenericObject } from "../object-DyVg8BFt.cjs";
|
|
18
18
|
import { _ as VerifiedToken, d as SignetPayload, l as SignOptions, p as TokenString, s as DecodedToken, v as VerifyOptions } from "../hash-DHawpylk.cjs";
|
|
19
19
|
import { a as isUUIDv4, c as isUUIDv7, i as isUUIDv3, l as isUUIDv8, n as isUUIDv1, o as isUUIDv5, r as isUUIDv2, s as isUUIDv6, t as decodeUUID, u as uuid, w as isUUID } from "../uuid-CMNRM9NO.cjs";
|
|
20
|
-
import { t as generateRandomID } from "../basics-
|
|
20
|
+
import { t as generateRandomID } from "../basics-CLwtIxap.cjs";
|
|
21
21
|
|
|
22
22
|
//#region src/hash/Cipher.d.ts
|
|
23
23
|
/**
|
package/dist/hash/index.d.mts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import { nt as Maybe, y as GenericObject } from "../object-DyVg8BFt.mjs";
|
|
18
18
|
import { _ as VerifiedToken, d as SignetPayload, l as SignOptions, p as TokenString, s as DecodedToken, v as VerifyOptions } from "../hash-2mygGWLk.mjs";
|
|
19
19
|
import { a as isUUIDv4, c as isUUIDv7, i as isUUIDv3, l as isUUIDv8, n as isUUIDv1, o as isUUIDv5, r as isUUIDv2, s as isUUIDv6, t as decodeUUID, u as uuid, w as isUUID } from "../uuid-DvQsIl9p.mjs";
|
|
20
|
-
import { t as generateRandomID } from "../basics-
|
|
20
|
+
import { t as generateRandomID } from "../basics-BuHQJCNG.mjs";
|
|
21
21
|
|
|
22
22
|
//#region src/hash/Cipher.d.ts
|
|
23
23
|
/**
|
package/dist/index.cjs
CHANGED
|
@@ -274,10 +274,8 @@ function computeTextDiff(originalText, modifiedText) {
|
|
|
274
274
|
usedIndices.add(idx);
|
|
275
275
|
}
|
|
276
276
|
} else if (line.type !== "added" || !usedIndices.has(idx)) {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
usedIndices.add(idx);
|
|
280
|
-
}
|
|
277
|
+
processedLines.push(line);
|
|
278
|
+
usedIndices.add(idx);
|
|
281
279
|
}
|
|
282
280
|
}
|
|
283
281
|
let linesAdded = 0;
|
package/dist/index.d.cts
CHANGED
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { $n as NumberType, Bn as DecimalOptions, D as NumericDotKey, E as NestedPrimitiveKey, F as SanitizeOptions, I as SanitizedData, In as BnDigitResult, Ln as ConvertOptions, O as ObjectEntry, Q as FlattenPartial, Rn as ConvertedDecimal, Un as FrankFurterCurrency, V as BasicPrimitive, Xn as LocaleCode, Zn as LooseRomanNumeral, a as ConvertObjectOptions, ar as RomanCapital, c as DeepKeys, ci as Tuple, ct as Numeric, g as FlattenDotValue, ir as RangedNumbers, k as Objects, lt as OwnKeys, nr as RandomNumberOptions, nt as Maybe, o as ConvertedObject, p as ExpandAll, pi as Unit, rr as RangeOptions, s as CountryDetails, tr as PercentageOptions, u as DotNotationKey, ut as PartialOrRequired, v as FlattenLeafValue, w as MergeAll, y as GenericObject, z as Any, zn as CurrencyCode } from "./object-DyVg8BFt.cjs";
|
|
18
|
-
import {
|
|
19
|
-
import { n as convertStringCase, t as capitalizeString } from "./case-
|
|
20
|
-
import { i as parseQueryStringLiteral, r as parseQueryString, t as generateQueryParams } from "./query-
|
|
18
|
+
import { D as DiffResult, P as MaskOptions, _ as CharDiffResult, p as AnagramOptions } from "./string-Ok_IMpHP.cjs";
|
|
19
|
+
import { n as convertStringCase, t as capitalizeString } from "./case-BmB2aGyp.cjs";
|
|
20
|
+
import { i as parseQueryStringLiteral, r as parseQueryString, t as generateQueryParams } from "./query-BMtRmMSC.cjs";
|
|
21
21
|
import { c as OrderOption, l as SortByOption, n as FindOptions, s as OptionsConfig, t as FieldValue, u as SortNature } from "./array-EVkwcL_k.cjs";
|
|
22
22
|
import { C as shuffleArray, S as isInvalidOrEmptyArray, _ as findPrimeNumbers, a as deepParsePrimitives, b as flattenArray, c as getInstanceGetterNames, d as getStaticMethodNames, f as isDeepEqual, g as throttleAction, h as stripJsonEdgeGarbage, i as debounceAction, l as getInstanceMethodNames, m as stableStringify, n as countInstanceMethods, o as definePrototypeMethod, p as parseJSON, r as countStaticMethods, s as getClassDetails, t as convertArrayToString, u as getStaticGetterNames, v as isPrime, x as getLastArrayElement, y as filterArrayOfObjects } from "./index-D00Uqm9S.cjs";
|
|
23
|
-
import { n as trimString, r as truncateString, t as generateRandomID } from "./basics-
|
|
23
|
+
import { n as trimString, r as truncateString, t as generateRandomID } from "./basics-CLwtIxap.cjs";
|
|
24
24
|
|
|
25
25
|
//#region src/string/anagram.d.ts
|
|
26
26
|
/**
|
package/dist/index.d.mts
CHANGED
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { $n as NumberType, Bn as DecimalOptions, D as NumericDotKey, E as NestedPrimitiveKey, F as SanitizeOptions, I as SanitizedData, In as BnDigitResult, Ln as ConvertOptions, O as ObjectEntry, Q as FlattenPartial, Rn as ConvertedDecimal, Un as FrankFurterCurrency, V as BasicPrimitive, Xn as LocaleCode, Zn as LooseRomanNumeral, a as ConvertObjectOptions, ar as RomanCapital, c as DeepKeys, ci as Tuple, ct as Numeric, g as FlattenDotValue, ir as RangedNumbers, k as Objects, lt as OwnKeys, nr as RandomNumberOptions, nt as Maybe, o as ConvertedObject, p as ExpandAll, pi as Unit, rr as RangeOptions, s as CountryDetails, tr as PercentageOptions, u as DotNotationKey, ut as PartialOrRequired, v as FlattenLeafValue, w as MergeAll, y as GenericObject, z as Any, zn as CurrencyCode } from "./object-DyVg8BFt.mjs";
|
|
18
|
-
import {
|
|
19
|
-
import { n as convertStringCase, t as capitalizeString } from "./case-
|
|
20
|
-
import { i as parseQueryStringLiteral, r as parseQueryString, t as generateQueryParams } from "./query-
|
|
18
|
+
import { D as DiffResult, P as MaskOptions, _ as CharDiffResult, p as AnagramOptions } from "./string-edtZyJHf.mjs";
|
|
19
|
+
import { n as convertStringCase, t as capitalizeString } from "./case-Ce8HJI8I.mjs";
|
|
20
|
+
import { i as parseQueryStringLiteral, r as parseQueryString, t as generateQueryParams } from "./query-C-r5ZbO-.mjs";
|
|
21
21
|
import { c as OrderOption, l as SortByOption, n as FindOptions, s as OptionsConfig, t as FieldValue, u as SortNature } from "./array-CbAKXvhH.mjs";
|
|
22
22
|
import { C as shuffleArray, S as isInvalidOrEmptyArray, _ as findPrimeNumbers, a as deepParsePrimitives, b as flattenArray, c as getInstanceGetterNames, d as getStaticMethodNames, f as isDeepEqual, g as throttleAction, h as stripJsonEdgeGarbage, i as debounceAction, l as getInstanceMethodNames, m as stableStringify, n as countInstanceMethods, o as definePrototypeMethod, p as parseJSON, r as countStaticMethods, s as getClassDetails, t as convertArrayToString, u as getStaticGetterNames, v as isPrime, x as getLastArrayElement, y as filterArrayOfObjects } from "./index-BbBnKdBb.mjs";
|
|
23
|
-
import { n as trimString, r as truncateString, t as generateRandomID } from "./basics-
|
|
23
|
+
import { n as trimString, r as truncateString, t as generateRandomID } from "./basics-BuHQJCNG.mjs";
|
|
24
24
|
|
|
25
25
|
//#region src/string/anagram.d.ts
|
|
26
26
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -273,10 +273,8 @@ function computeTextDiff(originalText, modifiedText) {
|
|
|
273
273
|
usedIndices.add(idx);
|
|
274
274
|
}
|
|
275
275
|
} else if (line.type !== "added" || !usedIndices.has(idx)) {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
usedIndices.add(idx);
|
|
279
|
-
}
|
|
276
|
+
processedLines.push(line);
|
|
277
|
+
usedIndices.add(idx);
|
|
280
278
|
}
|
|
281
279
|
}
|
|
282
280
|
let linesAdded = 0;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { M as ParsedQueryGeneric, N as QueryObject, j as ParsedQuery } from "./object-DyVg8BFt.cjs";
|
|
18
|
-
import {
|
|
18
|
+
import { R as QueryString } from "./string-Ok_IMpHP.cjs";
|
|
19
19
|
|
|
20
20
|
//#region src/dom/query.d.ts
|
|
21
21
|
/**
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { M as ParsedQueryGeneric, N as QueryObject, j as ParsedQuery } from "./object-DyVg8BFt.mjs";
|
|
18
|
-
import {
|
|
18
|
+
import { R as QueryString } from "./string-edtZyJHf.mjs";
|
|
19
19
|
|
|
20
20
|
//#region src/dom/query.d.ts
|
|
21
21
|
/**
|
|
@@ -221,36 +221,57 @@ type IsAlphabet<T extends string> = T extends `${infer Head}${infer Tail}` ? Hea
|
|
|
221
221
|
type Alphabet<T extends string> = IsAlphabet<T> extends true ? T : never;
|
|
222
222
|
/** Types related to string diffing and similarity calculations. */
|
|
223
223
|
type DiffLineType = 'added' | 'removed' | 'unchanged' | 'modified';
|
|
224
|
-
/**
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
/** The content of the original line
|
|
229
|
-
original
|
|
230
|
-
/** The content of the modified line
|
|
231
|
-
modified
|
|
232
|
-
/** The line number in the original string (1-based)
|
|
233
|
-
originalLineNum
|
|
234
|
-
/** The line number in the modified string (1-based)
|
|
235
|
-
modifiedLineNum
|
|
224
|
+
/** Represents a single line's diff status between two strings, including the type of difference and the content of the line in both original and modified strings. */
|
|
225
|
+
type DiffLine = UnchangedOrModifiedDiffLine | AddedDiffLine | RemovedDiffLine;
|
|
226
|
+
/** Represents the details of a single line in the diff, including its content and line number. */
|
|
227
|
+
interface DiffLineDetails {
|
|
228
|
+
/** The content of the original line, omitted for `added` lines. */
|
|
229
|
+
original: string;
|
|
230
|
+
/** The content of the modified line, omitted for `removed` lines. */
|
|
231
|
+
modified: string;
|
|
232
|
+
/** The line number in the original string (1-based), omitted for `added` lines. */
|
|
233
|
+
originalLineNum: number;
|
|
234
|
+
/** The line number in the modified string (1-based), omitted for `removed` lines. */
|
|
235
|
+
modifiedLineNum: number;
|
|
236
|
+
}
|
|
237
|
+
/** Represents an unchanged or modified line, including both original and modified content and their respective line numbers. */
|
|
238
|
+
interface UnchangedOrModifiedDiffLine extends DiffLineDetails {
|
|
239
|
+
/** The type of difference, either `'unchanged'` or `'modified'`. */
|
|
240
|
+
type: 'unchanged' | 'modified';
|
|
241
|
+
}
|
|
242
|
+
/** Represents an added line, including only its content and line number in the modified string. */
|
|
243
|
+
interface AddedDiffLine extends Omit<DiffLineDetails, 'originalLineNum' | 'original'> {
|
|
244
|
+
/** The type of difference, fixed to `'added'`. */
|
|
245
|
+
type: 'added';
|
|
246
|
+
}
|
|
247
|
+
/** Represents a removed line, including only its content and line number in the original string. */
|
|
248
|
+
interface RemovedDiffLine extends Omit<DiffLineDetails, 'modifiedLineNum' | 'modified'> {
|
|
249
|
+
/** The type of difference, fixed to `'removed'`. */
|
|
250
|
+
type: 'removed';
|
|
251
|
+
}
|
|
252
|
+
/** Statistics summarizing the diff results, including counts of added, removed, changed, and unchanged lines. */
|
|
253
|
+
interface DiffStats {
|
|
254
|
+
/** Total number of lines that were added in the modified string compared to the original. */
|
|
255
|
+
linesAdded: number;
|
|
256
|
+
/** Total number of lines that were removed from the original string in the modified version. */
|
|
257
|
+
linesRemoved: number;
|
|
258
|
+
/** Total number of lines that were modified (changed content) between the original and modified strings. */
|
|
259
|
+
linesChanged: number;
|
|
260
|
+
/** Total number of lines that remained unchanged between the original and modified strings. */
|
|
261
|
+
linesUnchanged: number;
|
|
236
262
|
}
|
|
237
263
|
/** The result of a line-level diff operation, including an array of line differences and summary statistics. */
|
|
238
264
|
interface DiffResult {
|
|
239
265
|
/** An array of line differences, where each line is categorized as 'added', 'removed', 'unchanged', or 'modified'. */
|
|
240
266
|
lines: DiffLine[];
|
|
241
267
|
/** Statistics summarizing the diff results, including counts of added, removed, changed, and unchanged lines. */
|
|
242
|
-
stats:
|
|
243
|
-
/** Total number of lines that were added in the modified string compared to the original. */linesAdded: number; /** Total number of lines that were removed from the original string in the modified version. */
|
|
244
|
-
linesRemoved: number; /** Total number of lines that were modified (changed content) between the original and modified strings. */
|
|
245
|
-
linesChanged: number; /** Total number of lines that remained unchanged between the original and modified strings. */
|
|
246
|
-
linesUnchanged: number;
|
|
247
|
-
};
|
|
268
|
+
stats: DiffStats;
|
|
248
269
|
}
|
|
249
270
|
/** A single character annotated with a `highlighted` flag indicating whether it differs from the other string in a diff operation. */
|
|
250
271
|
interface HighlightedText {
|
|
251
|
-
/**
|
|
272
|
+
/** The text content of the character. */
|
|
252
273
|
text: string;
|
|
253
|
-
/** Whether the character is different from the other string. */
|
|
274
|
+
/** Whether the character is different from the other string in a diff operation. */
|
|
254
275
|
highlighted: boolean;
|
|
255
276
|
}
|
|
256
277
|
/** Result of a character-level diff, mapping each character in both strings to a `highlighted` flag. */
|
|
@@ -261,4 +282,4 @@ interface CharDiffResult {
|
|
|
261
282
|
modified: HighlightedText[];
|
|
262
283
|
}
|
|
263
284
|
//#endregion
|
|
264
|
-
export {
|
|
285
|
+
export { HighlightedText as A, RemovedDiffLine as B, CountryShortISO as C, DiffResult as D, DiffLineType as E, PascalCase as F, TitleCase as G, SnakeCase as H, PascalSnakeCase as I, UnchangedOrModifiedDiffLine as J, TrainCase as K, PathCase as L, IsAlphabet as M, KebabCase as N, DiffStats as O, MaskOptions as P, QueryString as R, CountryName as S, DiffLineDetails as T, SpecialCharacter as U, SentenceCase as V, StringCaseOptions as W, CharDiffResult as _, $NormalizeString as a, CountryCode as b, $TrimRight as c, AddedDiffLine as d, Alphabet as f, CaseFormat as g, CapitalizeOptions as h, $LowercaseWords as i, Includes as j, DotCase as k, $UppercaseWords as l, CamelCase as m, $EnsureString as n, $TitleCaseWords as o, AnagramOptions as p, Trim as q, $LowerCaseWord as r, $TrimLeft as s, $CapitalizeWords as t, $WidenEmpty as u, ConstantCase as v, DiffLine as w, CountryISO as x, Country as y, RandomIdOptions as z };
|
|
@@ -221,36 +221,57 @@ type IsAlphabet<T extends string> = T extends `${infer Head}${infer Tail}` ? Hea
|
|
|
221
221
|
type Alphabet<T extends string> = IsAlphabet<T> extends true ? T : never;
|
|
222
222
|
/** Types related to string diffing and similarity calculations. */
|
|
223
223
|
type DiffLineType = 'added' | 'removed' | 'unchanged' | 'modified';
|
|
224
|
-
/**
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
/** The content of the original line
|
|
229
|
-
original
|
|
230
|
-
/** The content of the modified line
|
|
231
|
-
modified
|
|
232
|
-
/** The line number in the original string (1-based)
|
|
233
|
-
originalLineNum
|
|
234
|
-
/** The line number in the modified string (1-based)
|
|
235
|
-
modifiedLineNum
|
|
224
|
+
/** Represents a single line's diff status between two strings, including the type of difference and the content of the line in both original and modified strings. */
|
|
225
|
+
type DiffLine = UnchangedOrModifiedDiffLine | AddedDiffLine | RemovedDiffLine;
|
|
226
|
+
/** Represents the details of a single line in the diff, including its content and line number. */
|
|
227
|
+
interface DiffLineDetails {
|
|
228
|
+
/** The content of the original line, omitted for `added` lines. */
|
|
229
|
+
original: string;
|
|
230
|
+
/** The content of the modified line, omitted for `removed` lines. */
|
|
231
|
+
modified: string;
|
|
232
|
+
/** The line number in the original string (1-based), omitted for `added` lines. */
|
|
233
|
+
originalLineNum: number;
|
|
234
|
+
/** The line number in the modified string (1-based), omitted for `removed` lines. */
|
|
235
|
+
modifiedLineNum: number;
|
|
236
|
+
}
|
|
237
|
+
/** Represents an unchanged or modified line, including both original and modified content and their respective line numbers. */
|
|
238
|
+
interface UnchangedOrModifiedDiffLine extends DiffLineDetails {
|
|
239
|
+
/** The type of difference, either `'unchanged'` or `'modified'`. */
|
|
240
|
+
type: 'unchanged' | 'modified';
|
|
241
|
+
}
|
|
242
|
+
/** Represents an added line, including only its content and line number in the modified string. */
|
|
243
|
+
interface AddedDiffLine extends Omit<DiffLineDetails, 'originalLineNum' | 'original'> {
|
|
244
|
+
/** The type of difference, fixed to `'added'`. */
|
|
245
|
+
type: 'added';
|
|
246
|
+
}
|
|
247
|
+
/** Represents a removed line, including only its content and line number in the original string. */
|
|
248
|
+
interface RemovedDiffLine extends Omit<DiffLineDetails, 'modifiedLineNum' | 'modified'> {
|
|
249
|
+
/** The type of difference, fixed to `'removed'`. */
|
|
250
|
+
type: 'removed';
|
|
251
|
+
}
|
|
252
|
+
/** Statistics summarizing the diff results, including counts of added, removed, changed, and unchanged lines. */
|
|
253
|
+
interface DiffStats {
|
|
254
|
+
/** Total number of lines that were added in the modified string compared to the original. */
|
|
255
|
+
linesAdded: number;
|
|
256
|
+
/** Total number of lines that were removed from the original string in the modified version. */
|
|
257
|
+
linesRemoved: number;
|
|
258
|
+
/** Total number of lines that were modified (changed content) between the original and modified strings. */
|
|
259
|
+
linesChanged: number;
|
|
260
|
+
/** Total number of lines that remained unchanged between the original and modified strings. */
|
|
261
|
+
linesUnchanged: number;
|
|
236
262
|
}
|
|
237
263
|
/** The result of a line-level diff operation, including an array of line differences and summary statistics. */
|
|
238
264
|
interface DiffResult {
|
|
239
265
|
/** An array of line differences, where each line is categorized as 'added', 'removed', 'unchanged', or 'modified'. */
|
|
240
266
|
lines: DiffLine[];
|
|
241
267
|
/** Statistics summarizing the diff results, including counts of added, removed, changed, and unchanged lines. */
|
|
242
|
-
stats:
|
|
243
|
-
/** Total number of lines that were added in the modified string compared to the original. */linesAdded: number; /** Total number of lines that were removed from the original string in the modified version. */
|
|
244
|
-
linesRemoved: number; /** Total number of lines that were modified (changed content) between the original and modified strings. */
|
|
245
|
-
linesChanged: number; /** Total number of lines that remained unchanged between the original and modified strings. */
|
|
246
|
-
linesUnchanged: number;
|
|
247
|
-
};
|
|
268
|
+
stats: DiffStats;
|
|
248
269
|
}
|
|
249
270
|
/** A single character annotated with a `highlighted` flag indicating whether it differs from the other string in a diff operation. */
|
|
250
271
|
interface HighlightedText {
|
|
251
|
-
/**
|
|
272
|
+
/** The text content of the character. */
|
|
252
273
|
text: string;
|
|
253
|
-
/** Whether the character is different from the other string. */
|
|
274
|
+
/** Whether the character is different from the other string in a diff operation. */
|
|
254
275
|
highlighted: boolean;
|
|
255
276
|
}
|
|
256
277
|
/** Result of a character-level diff, mapping each character in both strings to a `highlighted` flag. */
|
|
@@ -261,4 +282,4 @@ interface CharDiffResult {
|
|
|
261
282
|
modified: HighlightedText[];
|
|
262
283
|
}
|
|
263
284
|
//#endregion
|
|
264
|
-
export {
|
|
285
|
+
export { HighlightedText as A, RemovedDiffLine as B, CountryShortISO as C, DiffResult as D, DiffLineType as E, PascalCase as F, TitleCase as G, SnakeCase as H, PascalSnakeCase as I, UnchangedOrModifiedDiffLine as J, TrainCase as K, PathCase as L, IsAlphabet as M, KebabCase as N, DiffStats as O, MaskOptions as P, QueryString as R, CountryName as S, DiffLineDetails as T, SpecialCharacter as U, SentenceCase as V, StringCaseOptions as W, CharDiffResult as _, $NormalizeString as a, CountryCode as b, $TrimRight as c, AddedDiffLine as d, Alphabet as f, CaseFormat as g, CapitalizeOptions as h, $LowercaseWords as i, Includes as j, DotCase as k, $UppercaseWords as l, CamelCase as m, $EnsureString as n, $TitleCaseWords as o, AnagramOptions as p, Trim as q, $LowerCaseWord as r, $TrimLeft as s, $CapitalizeWords as t, $WidenEmpty as u, ConstantCase as v, DiffLine as w, CountryISO as x, Country as y, RandomIdOptions as z };
|
package/dist/types/form.d.cts
CHANGED
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { a as OriginFileObj, i as FormDataConfigs, n as FileError, o as ParsedFormData, r as FileUpload, s as SerializedForm, t as CustomFile } from "../form-
|
|
17
|
+
import { a as OriginFileObj, i as FormDataConfigs, n as FileError, o as ParsedFormData, r as FileUpload, s as SerializedForm, t as CustomFile } from "../form-DhsFvo_D.cjs";
|
|
18
18
|
export { CustomFile, FileError, FileUpload, FormDataConfigs, OriginFileObj, ParsedFormData, SerializedForm };
|
package/dist/types/form.d.mts
CHANGED
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { a as OriginFileObj, i as FormDataConfigs, n as FileError, o as ParsedFormData, r as FileUpload, s as SerializedForm, t as CustomFile } from "../form-
|
|
17
|
+
import { a as OriginFileObj, i as FormDataConfigs, n as FileError, o as ParsedFormData, r as FileUpload, s as SerializedForm, t as CustomFile } from "../form-D_5I437n.mjs";
|
|
18
18
|
export { CustomFile, FileError, FileUpload, FormDataConfigs, OriginFileObj, ParsedFormData, SerializedForm };
|
package/dist/types/string.d.cts
CHANGED
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { A as
|
|
18
|
-
export { $CapitalizeWords, $EnsureString, $LowerCaseWord, $LowercaseWords, $NormalizeString, $TitleCaseWords, $TrimLeft, $TrimRight, $UppercaseWords, $WidenEmpty, Alphabet, AnagramOptions, CamelCase, CapitalizeOptions, CaseFormat, CharDiffResult, ConstantCase, Country, CountryCode, CountryISO, CountryName, CountryShortISO, DiffLine, DiffLineType, DiffResult, DotCase, HighlightedText, Includes, IsAlphabet, KebabCase, MaskOptions, PascalCase, PascalSnakeCase, PathCase, QueryString, RandomIdOptions, SentenceCase, SnakeCase, SpecialCharacter, StringCaseOptions, TitleCase, TrainCase, Trim };
|
|
17
|
+
import { A as HighlightedText, B as RemovedDiffLine, C as CountryShortISO, D as DiffResult, E as DiffLineType, F as PascalCase, G as TitleCase, H as SnakeCase, I as PascalSnakeCase, J as UnchangedOrModifiedDiffLine, K as TrainCase, L as PathCase, M as IsAlphabet, N as KebabCase, O as DiffStats, P as MaskOptions, R as QueryString, S as CountryName, T as DiffLineDetails, U as SpecialCharacter, V as SentenceCase, W as StringCaseOptions, _ as CharDiffResult, a as $NormalizeString, b as CountryCode, c as $TrimRight, d as AddedDiffLine, f as Alphabet, g as CaseFormat, h as CapitalizeOptions, i as $LowercaseWords, j as Includes, k as DotCase, l as $UppercaseWords, m as CamelCase, n as $EnsureString, o as $TitleCaseWords, p as AnagramOptions, q as Trim, r as $LowerCaseWord, s as $TrimLeft, t as $CapitalizeWords, u as $WidenEmpty, v as ConstantCase, w as DiffLine, x as CountryISO, y as Country, z as RandomIdOptions } from "../string-Ok_IMpHP.cjs";
|
|
18
|
+
export { $CapitalizeWords, $EnsureString, $LowerCaseWord, $LowercaseWords, $NormalizeString, $TitleCaseWords, $TrimLeft, $TrimRight, $UppercaseWords, $WidenEmpty, AddedDiffLine, Alphabet, AnagramOptions, CamelCase, CapitalizeOptions, CaseFormat, CharDiffResult, ConstantCase, Country, CountryCode, CountryISO, CountryName, CountryShortISO, DiffLine, DiffLineDetails, DiffLineType, DiffResult, DiffStats, DotCase, HighlightedText, Includes, IsAlphabet, KebabCase, MaskOptions, PascalCase, PascalSnakeCase, PathCase, QueryString, RandomIdOptions, RemovedDiffLine, SentenceCase, SnakeCase, SpecialCharacter, StringCaseOptions, TitleCase, TrainCase, Trim, UnchangedOrModifiedDiffLine };
|
package/dist/types/string.d.mts
CHANGED
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { A as
|
|
18
|
-
export { $CapitalizeWords, $EnsureString, $LowerCaseWord, $LowercaseWords, $NormalizeString, $TitleCaseWords, $TrimLeft, $TrimRight, $UppercaseWords, $WidenEmpty, Alphabet, AnagramOptions, CamelCase, CapitalizeOptions, CaseFormat, CharDiffResult, ConstantCase, Country, CountryCode, CountryISO, CountryName, CountryShortISO, DiffLine, DiffLineType, DiffResult, DotCase, HighlightedText, Includes, IsAlphabet, KebabCase, MaskOptions, PascalCase, PascalSnakeCase, PathCase, QueryString, RandomIdOptions, SentenceCase, SnakeCase, SpecialCharacter, StringCaseOptions, TitleCase, TrainCase, Trim };
|
|
17
|
+
import { A as HighlightedText, B as RemovedDiffLine, C as CountryShortISO, D as DiffResult, E as DiffLineType, F as PascalCase, G as TitleCase, H as SnakeCase, I as PascalSnakeCase, J as UnchangedOrModifiedDiffLine, K as TrainCase, L as PathCase, M as IsAlphabet, N as KebabCase, O as DiffStats, P as MaskOptions, R as QueryString, S as CountryName, T as DiffLineDetails, U as SpecialCharacter, V as SentenceCase, W as StringCaseOptions, _ as CharDiffResult, a as $NormalizeString, b as CountryCode, c as $TrimRight, d as AddedDiffLine, f as Alphabet, g as CaseFormat, h as CapitalizeOptions, i as $LowercaseWords, j as Includes, k as DotCase, l as $UppercaseWords, m as CamelCase, n as $EnsureString, o as $TitleCaseWords, p as AnagramOptions, q as Trim, r as $LowerCaseWord, s as $TrimLeft, t as $CapitalizeWords, u as $WidenEmpty, v as ConstantCase, w as DiffLine, x as CountryISO, y as Country, z as RandomIdOptions } from "../string-edtZyJHf.mjs";
|
|
18
|
+
export { $CapitalizeWords, $EnsureString, $LowerCaseWord, $LowercaseWords, $NormalizeString, $TitleCaseWords, $TrimLeft, $TrimRight, $UppercaseWords, $WidenEmpty, AddedDiffLine, Alphabet, AnagramOptions, CamelCase, CapitalizeOptions, CaseFormat, CharDiffResult, ConstantCase, Country, CountryCode, CountryISO, CountryName, CountryShortISO, DiffLine, DiffLineDetails, DiffLineType, DiffResult, DiffStats, DotCase, HighlightedText, Includes, IsAlphabet, KebabCase, MaskOptions, PascalCase, PascalSnakeCase, PathCase, QueryString, RandomIdOptions, RemovedDiffLine, SentenceCase, SnakeCase, SpecialCharacter, StringCaseOptions, TitleCase, TrainCase, Trim, UnchangedOrModifiedDiffLine };
|
package/package.json
CHANGED