@magicx-eng/ai-autocomplete-vanilla 0.74.1 → 0.74.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/dist/index.d.mts +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -3387,6 +3387,12 @@ declare function productsFromCustomFields(report: CustomFieldsReport | null | un
|
|
|
3387
3387
|
interface TextPart {
|
|
3388
3388
|
text: string;
|
|
3389
3389
|
bold: boolean;
|
|
3390
|
+
/**
|
|
3391
|
+
* Set on the last bold part when the typed text ends inside it: an IME is
|
|
3392
|
+
* composing that syllable and has typed only its first jamo (녀 of 년).
|
|
3393
|
+
* Renderers draw it fainter than the rest of the match.
|
|
3394
|
+
*/
|
|
3395
|
+
partial?: true;
|
|
3390
3396
|
}
|
|
3391
3397
|
/** The word being typed: the text after the last whitespace. */
|
|
3392
3398
|
declare function typedFragment(text: string): string;
|
|
@@ -3396,6 +3402,8 @@ interface PhraseMatch {
|
|
|
3396
3402
|
/** The covered span of the option text. */
|
|
3397
3403
|
start: number;
|
|
3398
3404
|
end: number;
|
|
3405
|
+
/** Where the partly typed last character starts, or `end` when it is typed in full. */
|
|
3406
|
+
partialStart: number;
|
|
3399
3407
|
}
|
|
3400
3408
|
/**
|
|
3401
3409
|
* The longest run of the typed words, ending at the last one, that reads as a
|
|
@@ -3408,7 +3416,8 @@ declare function matchTypedPhrase(optionText: string, typedText: string): Phrase
|
|
|
3408
3416
|
* Splits an option's text so what the typed text matches can be drawn in bold:
|
|
3409
3417
|
* the phrase `matchTypedPhrase` finds when it spans several words, else the
|
|
3410
3418
|
* start of every word that begins with the last typed word. Case- and
|
|
3411
|
-
* accent-insensitive.
|
|
3419
|
+
* accent-insensitive. A last character the typed text spells only the start
|
|
3420
|
+
* of is its own part, marked `partial`. The parts always join back into `text`.
|
|
3412
3421
|
*/
|
|
3413
3422
|
declare function highlightParts(text: string, typedText: string | undefined): TextPart[];
|
|
3414
3423
|
|
package/dist/index.d.ts
CHANGED
|
@@ -3387,6 +3387,12 @@ declare function productsFromCustomFields(report: CustomFieldsReport | null | un
|
|
|
3387
3387
|
interface TextPart {
|
|
3388
3388
|
text: string;
|
|
3389
3389
|
bold: boolean;
|
|
3390
|
+
/**
|
|
3391
|
+
* Set on the last bold part when the typed text ends inside it: an IME is
|
|
3392
|
+
* composing that syllable and has typed only its first jamo (녀 of 년).
|
|
3393
|
+
* Renderers draw it fainter than the rest of the match.
|
|
3394
|
+
*/
|
|
3395
|
+
partial?: true;
|
|
3390
3396
|
}
|
|
3391
3397
|
/** The word being typed: the text after the last whitespace. */
|
|
3392
3398
|
declare function typedFragment(text: string): string;
|
|
@@ -3396,6 +3402,8 @@ interface PhraseMatch {
|
|
|
3396
3402
|
/** The covered span of the option text. */
|
|
3397
3403
|
start: number;
|
|
3398
3404
|
end: number;
|
|
3405
|
+
/** Where the partly typed last character starts, or `end` when it is typed in full. */
|
|
3406
|
+
partialStart: number;
|
|
3399
3407
|
}
|
|
3400
3408
|
/**
|
|
3401
3409
|
* The longest run of the typed words, ending at the last one, that reads as a
|
|
@@ -3408,7 +3416,8 @@ declare function matchTypedPhrase(optionText: string, typedText: string): Phrase
|
|
|
3408
3416
|
* Splits an option's text so what the typed text matches can be drawn in bold:
|
|
3409
3417
|
* the phrase `matchTypedPhrase` finds when it spans several words, else the
|
|
3410
3418
|
* start of every word that begins with the last typed word. Case- and
|
|
3411
|
-
* accent-insensitive.
|
|
3419
|
+
* accent-insensitive. A last character the typed text spells only the start
|
|
3420
|
+
* of is its own part, marked `partial`. The parts always join back into `text`.
|
|
3412
3421
|
*/
|
|
3413
3422
|
declare function highlightParts(text: string, typedText: string | undefined): TextPart[];
|
|
3414
3423
|
|