@camstack/types 1.2.571 → 1.2.573

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.
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Shared text ranking for the admin global search and `deviceManager.search`.
3
+ *
4
+ * One ascending scale. Lower is better; `null` is no match. Exact levels
5
+ * (0–5) are tried before either fuzzy level (6–7), so a fuzzy hit cannot
6
+ * outrank an exact one. Identifiers match on equality only — a device id is
7
+ * a fact, not a spelling, and "108" must never fuzzy-match device 102.
8
+ *
9
+ * Fuzzy runs on the label first. Keywords are fuzzied only when the label
10
+ * itself did not match, so an item that already matched keeps its rank.
11
+ */
12
+ /** Case- and diacritic-insensitive. "Perche" and "Perché" compare equal. */
13
+ export declare function normalizeSearchText(value: string): string;
14
+ /** What {@link searchRank} matches. Keywords are substring-then-fuzzy; identifiers are exact. */
15
+ export interface SearchRankFields {
16
+ readonly label: string;
17
+ readonly keywords?: readonly string[];
18
+ readonly identifiers?: readonly string[];
19
+ }
20
+ /**
21
+ * Rank `rawQuery` against one record. `null` when nothing matches, including
22
+ * a blank query. Keywords are fuzzied only when the label produced no rank,
23
+ * so a label hit is never demoted or promoted by a keyword.
24
+ */
25
+ export declare function searchRank(rawQuery: string, fields: SearchRankFields): number | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.2.571",
3
+ "version": "1.2.573",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",