@xivdyetools/core 2.7.0 → 4.0.1
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/README.md +85 -67
- package/dist/blending/blending.d.ts +22 -0
- package/dist/blending/blending.d.ts.map +1 -0
- package/dist/blending/blending.js +129 -0
- package/dist/blending/blending.js.map +1 -0
- package/dist/blending/conversions.d.ts +53 -0
- package/dist/blending/conversions.d.ts.map +1 -0
- package/dist/blending/conversions.js +256 -0
- package/dist/blending/conversions.js.map +1 -0
- package/dist/blending/index.d.ts +8 -0
- package/dist/blending/index.d.ts.map +1 -0
- package/dist/blending/index.js +3 -0
- package/dist/blending/index.js.map +1 -0
- package/dist/blending/types.d.ts +36 -0
- package/dist/blending/types.d.ts.map +1 -0
- package/dist/blending/types.js +21 -0
- package/dist/blending/types.js.map +1 -0
- package/dist/config/band-calibration.d.ts +68 -0
- package/dist/config/band-calibration.d.ts.map +1 -0
- package/dist/config/band-calibration.js +196 -0
- package/dist/config/band-calibration.js.map +1 -0
- package/dist/config/band-vocabulary.d.ts +82 -0
- package/dist/config/band-vocabulary.d.ts.map +1 -0
- package/dist/config/band-vocabulary.js +117 -0
- package/dist/config/band-vocabulary.js.map +1 -0
- package/dist/config/consolidated-ids.js +2 -2
- package/dist/config/consolidated-ids.js.map +1 -1
- package/dist/config/dye-vocabulary.d.ts +45 -0
- package/dist/config/dye-vocabulary.d.ts.map +1 -0
- package/dist/config/dye-vocabulary.js +58 -0
- package/dist/config/dye-vocabulary.js.map +1 -0
- package/dist/config/facewear.d.ts +24 -0
- package/dist/config/facewear.d.ts.map +1 -0
- package/dist/config/facewear.js +35 -0
- package/dist/config/facewear.js.map +1 -0
- package/dist/config/learn-links.d.ts +70 -0
- package/dist/config/learn-links.d.ts.map +1 -0
- package/dist/config/learn-links.js +171 -0
- package/dist/config/learn-links.js.map +1 -0
- package/dist/config/product-links.d.ts +44 -0
- package/dist/config/product-links.d.ts.map +1 -0
- package/dist/config/product-links.js +44 -0
- package/dist/config/product-links.js.map +1 -0
- package/dist/constants/index.d.ts +14 -1
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +38 -22
- package/dist/constants/index.js.map +1 -1
- package/dist/data/character_colors/race_specific/hair_colors.json +1 -1
- package/dist/data/character_colors/race_specific/skin_colors.json +1 -1
- package/dist/data/dyes.json +1127 -0
- package/dist/data/facewear_colors.json +57 -0
- package/dist/data/locales/de.json +4 -50
- package/dist/data/locales/en.json +4 -50
- package/dist/data/locales/fr.json +4 -50
- package/dist/data/locales/ja.json +4 -50
- package/dist/data/locales/ko.json +4 -50
- package/dist/data/locales/zh.json +4 -50
- package/dist/data/presets.json +59 -301
- package/dist/index.d.ts +156 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +114 -10
- package/dist/index.js.map +1 -1
- package/dist/services/APIService.d.ts +7 -61
- package/dist/services/APIService.d.ts.map +1 -1
- package/dist/services/APIService.js +43 -154
- package/dist/services/APIService.js.map +1 -1
- package/dist/services/CharacterColorService.d.ts +4 -36
- package/dist/services/CharacterColorService.d.ts.map +1 -1
- package/dist/services/CharacterColorService.js +16 -68
- package/dist/services/CharacterColorService.js.map +1 -1
- package/dist/services/ColorService.d.ts +55 -68
- package/dist/services/ColorService.d.ts.map +1 -1
- package/dist/services/ColorService.js +86 -94
- package/dist/services/ColorService.js.map +1 -1
- package/dist/services/DyeService.d.ts +10 -103
- package/dist/services/DyeService.d.ts.map +1 -1
- package/dist/services/DyeService.js +13 -156
- package/dist/services/DyeService.js.map +1 -1
- package/dist/services/LocalizationService.d.ts +1 -33
- package/dist/services/LocalizationService.d.ts.map +1 -1
- package/dist/services/LocalizationService.js +0 -44
- package/dist/services/LocalizationService.js.map +1 -1
- package/dist/services/PaletteService.d.ts +8 -9
- package/dist/services/PaletteService.d.ts.map +1 -1
- package/dist/services/PaletteService.js +2 -21
- package/dist/services/PaletteService.js.map +1 -1
- package/dist/services/PresetService.d.ts +2 -34
- package/dist/services/PresetService.d.ts.map +1 -1
- package/dist/services/PresetService.js +12 -59
- package/dist/services/PresetService.js.map +1 -1
- package/dist/services/chara/chara-models.d.ts +68 -0
- package/dist/services/chara/chara-models.d.ts.map +1 -0
- package/dist/services/chara/chara-models.js +87 -0
- package/dist/services/chara/chara-models.js.map +1 -0
- package/dist/services/chara/chara-parser.d.ts +95 -0
- package/dist/services/chara/chara-parser.d.ts.map +1 -0
- package/dist/services/chara/chara-parser.js +299 -0
- package/dist/services/chara/chara-parser.js.map +1 -0
- package/dist/services/chara/chara-resolver.d.ts +103 -0
- package/dist/services/chara/chara-resolver.d.ts.map +1 -0
- package/dist/services/chara/chara-resolver.js +233 -0
- package/dist/services/chara/chara-resolver.js.map +1 -0
- package/dist/services/color/ColorConverter.d.ts +107 -35
- package/dist/services/color/ColorConverter.d.ts.map +1 -1
- package/dist/services/color/ColorConverter.js +159 -48
- package/dist/services/color/ColorConverter.js.map +1 -1
- package/dist/services/color/ColorManipulator.d.ts +11 -0
- package/dist/services/color/ColorManipulator.d.ts.map +1 -1
- package/dist/services/color/ColorManipulator.js +14 -0
- package/dist/services/color/ColorManipulator.js.map +1 -1
- package/dist/services/color/ColorblindnessSimulator.d.ts +17 -0
- package/dist/services/color/ColorblindnessSimulator.d.ts.map +1 -1
- package/dist/services/color/ColorblindnessSimulator.js +53 -1
- package/dist/services/color/ColorblindnessSimulator.js.map +1 -1
- package/dist/services/color/SpectralMixer.d.ts +0 -34
- package/dist/services/color/SpectralMixer.d.ts.map +1 -1
- package/dist/services/color/SpectralMixer.js +0 -73
- package/dist/services/color/SpectralMixer.js.map +1 -1
- package/dist/services/dye/DyeDatabase.d.ts +0 -21
- package/dist/services/dye/DyeDatabase.d.ts.map +1 -1
- package/dist/services/dye/DyeDatabase.js +78 -103
- package/dist/services/dye/DyeDatabase.js.map +1 -1
- package/dist/services/dye/DyeSearch.d.ts +17 -31
- package/dist/services/dye/DyeSearch.d.ts.map +1 -1
- package/dist/services/dye/DyeSearch.js +31 -67
- package/dist/services/dye/DyeSearch.js.map +1 -1
- package/dist/services/dye/HarmonyGenerator.d.ts +11 -18
- package/dist/services/dye/HarmonyGenerator.d.ts.map +1 -1
- package/dist/services/dye/HarmonyGenerator.js +24 -35
- package/dist/services/dye/HarmonyGenerator.js.map +1 -1
- package/dist/services/localization/LocaleLoader.d.ts.map +1 -1
- package/dist/services/localization/LocaleLoader.js +0 -1
- package/dist/services/localization/LocaleLoader.js.map +1 -1
- package/dist/services/localization/TranslationProvider.d.ts +1 -42
- package/dist/services/localization/TranslationProvider.d.ts.map +1 -1
- package/dist/services/localization/TranslationProvider.js +4 -82
- package/dist/services/localization/TranslationProvider.js.map +1 -1
- package/dist/types/index.d.ts +39 -52
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +50 -10
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +35 -122
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +45 -422
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/kd-tree.d.ts +0 -4
- package/dist/utils/kd-tree.d.ts.map +1 -1
- package/dist/utils/kd-tree.js +0 -6
- package/dist/utils/kd-tree.js.map +1 -1
- package/package.json +19 -10
- package/dist/data/character_colors/index.json +0 -40
- package/dist/data/colors_xiv.json +0 -3538
- package/dist/version.d.ts +0 -11
- package/dist/version.d.ts.map +0 -1
- package/dist/version.js +0 -11
- package/dist/version.js.map +0 -1
package/dist/types/index.js
CHANGED
|
@@ -6,17 +6,57 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module types
|
|
8
8
|
*/
|
|
9
|
+
/** Suite display order: ΔE2000 · ΔEOK · ΔE76 · REDMEAN · RGB DIST · DISTINGUISH % */
|
|
10
|
+
export const MATCHING_METHODS = [
|
|
11
|
+
'ciede2000',
|
|
12
|
+
'oklab',
|
|
13
|
+
'cie76',
|
|
14
|
+
'redmean',
|
|
15
|
+
'rgb',
|
|
16
|
+
'distinguish',
|
|
17
|
+
];
|
|
18
|
+
/** ΔE2000 is the default everywhere — one answer to "what does CLOSE mean". */
|
|
19
|
+
export const DEFAULT_MATCHING_METHOD = 'ciede2000';
|
|
9
20
|
/**
|
|
10
|
-
*
|
|
21
|
+
* Method display tags (the short-key vocabulary; `ratio` included for the
|
|
22
|
+
* two tools that print it). Tags are identifiers — never localise them.
|
|
11
23
|
*/
|
|
12
|
-
export const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
matchSaturation: { kL: 0.5, kC: 2.0, kH: 0.8 },
|
|
24
|
+
export const MATCHING_METHOD_TAGS = {
|
|
25
|
+
ciede2000: 'ΔE2000',
|
|
26
|
+
oklab: 'ΔEOK',
|
|
27
|
+
cie76: 'ΔE76',
|
|
28
|
+
redmean: 'REDMEAN',
|
|
29
|
+
rgb: 'RGB DIST',
|
|
30
|
+
distinguish: 'DISTINGUISH %',
|
|
31
|
+
ratio: 'RATIO',
|
|
21
32
|
};
|
|
33
|
+
/**
|
|
34
|
+
* Retired v4 stored values → their 5.0 replacement. Both retired methods
|
|
35
|
+
* fold into the suite default (there is no perceptual successor that keeps
|
|
36
|
+
* their exact behaviour, and a silently different non-default would be
|
|
37
|
+
* worse than the default).
|
|
38
|
+
*/
|
|
39
|
+
export const LEGACY_MATCHING_METHOD_MAP = {
|
|
40
|
+
hyab: 'ciede2000',
|
|
41
|
+
'oklch-weighted': 'ciede2000',
|
|
42
|
+
// Pre-5.0 deep links used 'euclidean' informally for RGB distance
|
|
43
|
+
euclidean: 'rgb',
|
|
44
|
+
};
|
|
45
|
+
/** Type guard for the 5.0 vocabulary. */
|
|
46
|
+
export function isMatchingMethod(value) {
|
|
47
|
+
return typeof value === 'string' && MATCHING_METHODS.includes(value);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Normalize any stored/parsed method value (KV preference, localStorage,
|
|
51
|
+
* URL `algo` param, API body) into the 5.0 vocabulary: current values pass
|
|
52
|
+
* through, retired values map, anything else falls back to the default.
|
|
53
|
+
*/
|
|
54
|
+
export function normalizeMatchingMethod(value) {
|
|
55
|
+
if (isMatchingMethod(value))
|
|
56
|
+
return value;
|
|
57
|
+
if (typeof value === 'string' && value in LEGACY_MATCHING_METHOD_MAP) {
|
|
58
|
+
return LEGACY_MATCHING_METHOD_MAP[value];
|
|
59
|
+
}
|
|
60
|
+
return DEFAULT_MATCHING_METHOD;
|
|
61
|
+
}
|
|
22
62
|
//# sourceMappingURL=index.js.map
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA+BH,qFAAqF;AACrF,MAAM,CAAC,MAAM,gBAAgB,GAA8B;IACzD,WAAW;IACX,OAAO;IACP,OAAO;IACP,SAAS;IACT,KAAK;IACL,aAAa;CACd,CAAC;AAEF,+EAA+E;AAC/E,MAAM,CAAC,MAAM,uBAAuB,GAAmB,WAAW,CAAC;AAEnE;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAA6C;IAC5E,SAAS,EAAE,QAAQ;IACnB,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,MAAM;IACb,OAAO,EAAE,SAAS;IAClB,GAAG,EAAE,UAAU;IACf,WAAW,EAAE,eAAe;IAC5B,KAAK,EAAE,OAAO;CACf,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAmC;IACxE,IAAI,EAAE,WAAW;IACjB,gBAAgB,EAAE,WAAW;IAC7B,kEAAkE;IAClE,SAAS,EAAE,KAAK;CACjB,CAAC;AAEF,yCAAyC;AACzC,MAAM,UAAU,gBAAgB,CAAC,KAAc;IAC7C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAK,gBAAsC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC9F,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAAc;IACpD,IAAI,gBAAgB,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAC1C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,IAAI,0BAA0B,EAAE,CAAC;QACrE,OAAO,0BAA0B,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,uBAAuB,CAAC;AACjC,CAAC"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -74,94 +74,6 @@ export declare class LRUCache<K, V> {
|
|
|
74
74
|
*/
|
|
75
75
|
get size(): number;
|
|
76
76
|
}
|
|
77
|
-
/**
|
|
78
|
-
* Async-safe LRU cache with built-in request deduplication
|
|
79
|
-
*
|
|
80
|
-
* Unlike the synchronous LRUCache, this class is designed for async operations
|
|
81
|
-
* where multiple concurrent requests for the same key should share a single
|
|
82
|
-
* computation rather than triggering duplicate work.
|
|
83
|
-
*
|
|
84
|
-
* @example
|
|
85
|
-
* ```typescript
|
|
86
|
-
* const cache = new AsyncLRUCache<string, ApiResponse>(100);
|
|
87
|
-
*
|
|
88
|
-
* // Multiple concurrent calls with same key share one fetch
|
|
89
|
-
* const [result1, result2] = await Promise.all([
|
|
90
|
-
* cache.getOrCompute('user:123', () => fetchUser('123')),
|
|
91
|
-
* cache.getOrCompute('user:123', () => fetchUser('123')), // Reuses first call
|
|
92
|
-
* ]);
|
|
93
|
-
* // fetchUser was only called once!
|
|
94
|
-
* ```
|
|
95
|
-
*
|
|
96
|
-
* Implementation notes:
|
|
97
|
-
* - Uses separate Map for pending promises (request deduplication)
|
|
98
|
-
* - Promise is stored SYNCHRONOUSLY before any await (critical for race safety)
|
|
99
|
-
* - Handles errors gracefully - removes from pending but doesn't cache failures
|
|
100
|
-
* - LRU eviction when cache is full
|
|
101
|
-
*
|
|
102
|
-
* Per OPT-001: This addresses the concurrency limitation of the synchronous
|
|
103
|
-
* LRUCache for async contexts.
|
|
104
|
-
*/
|
|
105
|
-
export declare class AsyncLRUCache<K, V> {
|
|
106
|
-
private cache;
|
|
107
|
-
private pending;
|
|
108
|
-
private maxSize;
|
|
109
|
-
constructor(maxSize?: number);
|
|
110
|
-
/**
|
|
111
|
-
* Move an entry to the end of the Map (most recently used position).
|
|
112
|
-
*
|
|
113
|
-
* BUG-006: Extracted for clarity. These synchronous Map operations within
|
|
114
|
-
* a single microtask are atomic in JavaScript's event loop — no interleaving
|
|
115
|
-
* can occur between delete and set.
|
|
116
|
-
*/
|
|
117
|
-
private moveToEnd;
|
|
118
|
-
/**
|
|
119
|
-
* Get a value from cache, or compute it if not present
|
|
120
|
-
*
|
|
121
|
-
* This method handles request deduplication: if a computation for the same
|
|
122
|
-
* key is already in progress, subsequent calls will wait for that computation
|
|
123
|
-
* rather than starting a new one.
|
|
124
|
-
*
|
|
125
|
-
* @param key - The cache key
|
|
126
|
-
* @param compute - Async function to compute the value if not cached
|
|
127
|
-
* @returns Promise resolving to the cached or computed value
|
|
128
|
-
*
|
|
129
|
-
* @example
|
|
130
|
-
* ```typescript
|
|
131
|
-
* const value = await cache.getOrCompute(
|
|
132
|
-
* 'expensive-key',
|
|
133
|
-
* async () => await expensiveAsyncOperation()
|
|
134
|
-
* );
|
|
135
|
-
* ```
|
|
136
|
-
*/
|
|
137
|
-
getOrCompute(key: K, compute: () => Promise<V>): Promise<V>;
|
|
138
|
-
/**
|
|
139
|
-
* Get a value from the cache (sync check only)
|
|
140
|
-
*
|
|
141
|
-
* @param key - The key to look up
|
|
142
|
-
* @returns The cached value or undefined if not found
|
|
143
|
-
*/
|
|
144
|
-
get(key: K): V | undefined;
|
|
145
|
-
/**
|
|
146
|
-
* Set a value in the cache
|
|
147
|
-
*
|
|
148
|
-
* @param key - The key to store
|
|
149
|
-
* @param value - The value to cache
|
|
150
|
-
*/
|
|
151
|
-
set(key: K, value: V): void;
|
|
152
|
-
/**
|
|
153
|
-
* Clear all entries from the cache and pending operations
|
|
154
|
-
*/
|
|
155
|
-
clear(): void;
|
|
156
|
-
/**
|
|
157
|
-
* Get the current number of cached entries
|
|
158
|
-
*/
|
|
159
|
-
get size(): number;
|
|
160
|
-
/**
|
|
161
|
-
* Get the current number of pending operations
|
|
162
|
-
*/
|
|
163
|
-
get pendingSize(): number;
|
|
164
|
-
}
|
|
165
77
|
/**
|
|
166
78
|
* Validate a hexadecimal color string
|
|
167
79
|
*
|
|
@@ -185,40 +97,6 @@ export declare class AsyncLRUCache<K, V> {
|
|
|
185
97
|
* Security: Input length is validated before regex to prevent ReDoS
|
|
186
98
|
*/
|
|
187
99
|
export declare function isValidHexColor(hex: string): boolean;
|
|
188
|
-
/**
|
|
189
|
-
* Type guard: Check if a value is a plain object (not array, not null)
|
|
190
|
-
*
|
|
191
|
-
* @param value - Value to check
|
|
192
|
-
* @returns true if value is a plain object, false otherwise
|
|
193
|
-
*
|
|
194
|
-
* @example
|
|
195
|
-
* ```typescript
|
|
196
|
-
* isObject({ a: 1 }) // Returns true
|
|
197
|
-
* isObject({}) // Returns true
|
|
198
|
-
* isObject([]) // Returns false (array)
|
|
199
|
-
* isObject(null) // Returns false
|
|
200
|
-
* isObject(new Date()) // Returns true (object instance)
|
|
201
|
-
* ```
|
|
202
|
-
*/
|
|
203
|
-
export declare function isObject(value: unknown): value is Record<string, unknown>;
|
|
204
|
-
/**
|
|
205
|
-
* Type guard: Check if a value is null or undefined
|
|
206
|
-
*
|
|
207
|
-
* @param value - Value to check
|
|
208
|
-
* @returns true if value is null or undefined, false otherwise
|
|
209
|
-
*
|
|
210
|
-
* @example
|
|
211
|
-
* ```typescript
|
|
212
|
-
* isNullish(null) // Returns true
|
|
213
|
-
* isNullish(undefined) // Returns true
|
|
214
|
-
* isNullish(0) // Returns false
|
|
215
|
-
* isNullish('') // Returns false
|
|
216
|
-
* isNullish(false) // Returns false
|
|
217
|
-
* ```
|
|
218
|
-
*
|
|
219
|
-
* Note: More precise than falsy check - only null/undefined, not 0/false/''
|
|
220
|
-
*/
|
|
221
|
-
export declare function isNullish(value: unknown): value is null | undefined;
|
|
222
100
|
/**
|
|
223
101
|
* Sleep for a specified duration (async delay)
|
|
224
102
|
*
|
|
@@ -286,6 +164,41 @@ export declare function sleep(ms: number): Promise<void>;
|
|
|
286
164
|
* transient network issues to be recovered from.
|
|
287
165
|
*/
|
|
288
166
|
export declare function retry<T>(fn: () => Promise<T>, maxAttempts?: number, delayMs?: number, logger?: Logger, shouldRetry?: (error: unknown) => boolean): Promise<T>;
|
|
167
|
+
/**
|
|
168
|
+
* Three-character axis code for a localized dye name (the bot's 14C triangle
|
|
169
|
+
* and 13C·1 contrast plot).
|
|
170
|
+
*
|
|
171
|
+
* The order of operations is the whole point, and it is why this lives in
|
|
172
|
+
* core rather than being re-derived per generator:
|
|
173
|
+
*
|
|
174
|
+
* 1. **Uppercase before slicing.** `'ß'.toUpperCase()` is `'SS'` — two
|
|
175
|
+
* characters — so slicing first and uppercasing after silently yields a
|
|
176
|
+
* four-character code for German names.
|
|
177
|
+
* 2. **Strip punctuation.** `Ul'dahbrauner` must abbreviate to `ULD`, not
|
|
178
|
+
* `UL'` — an apostrophe carries no identifying signal in a 3-char code.
|
|
179
|
+
* 3. **CJK keeps its first three characters** and is not uppercased: those
|
|
180
|
+
* scripts have no case, and each glyph already carries a full word's
|
|
181
|
+
* worth of meaning.
|
|
182
|
+
*
|
|
183
|
+
* A code is deliberately **not** globally unique — the nine Metallics all
|
|
184
|
+
* abbreviate to `MET`, the Dark run to `DAR`, and every German
|
|
185
|
+
* `Schnee-`/`Schiefer-` name collides on `SCH`. That is accepted because a
|
|
186
|
+
* code never appears alone: the swatch pair sits on the same row, so colour
|
|
187
|
+
* disambiguates the letters and the letters disambiguate the colour.
|
|
188
|
+
*
|
|
189
|
+
* @param name - The dye name, already localized
|
|
190
|
+
* @param locale - Locale code; `ja`/`zh`/`ko` take the CJK path
|
|
191
|
+
* @returns A code of at most three characters
|
|
192
|
+
*
|
|
193
|
+
* @example
|
|
194
|
+
* ```typescript
|
|
195
|
+
* abbreviateDyeName("Ul'dahbrauner", 'de') // 'ULD'
|
|
196
|
+
* abbreviateDyeName('Rußschwarzer', 'de') // 'RUS' (ß → SS, then sliced)
|
|
197
|
+
* abbreviateDyeName('Metallic Gold', 'en') // 'MET'
|
|
198
|
+
* abbreviateDyeName('ダラガブレッド', 'ja') // 'ダラガ'
|
|
199
|
+
* ```
|
|
200
|
+
*/
|
|
201
|
+
export declare function abbreviateDyeName(name: string, locale: string): string;
|
|
289
202
|
/**
|
|
290
203
|
* Generate a simple checksum for data integrity checking
|
|
291
204
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAaH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAM1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,qBAAa,QAAQ,CAAC,CAAC,EAAE,CAAC;IACxB,OAAO,CAAC,KAAK,CAAY;IACzB,OAAO,CAAC,OAAO,CAAS;gBAEZ,OAAO,GAAE,MAAa;IAKlC;;;;;;;OAOG;IACH,OAAO,CAAC,SAAS;IAKjB;;;;;OAKG;IACH,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS;IAO1B;;;;;OAKG;IACH,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI;IAa3B;;OAEG;IACH,KAAK,IAAI,IAAI;IAIb;;OAEG;IACH,IAAI,IAAI,IAAI,MAAM,CAEjB;CACF;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAaH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAM1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,qBAAa,QAAQ,CAAC,CAAC,EAAE,CAAC;IACxB,OAAO,CAAC,KAAK,CAAY;IACzB,OAAO,CAAC,OAAO,CAAS;gBAEZ,OAAO,GAAE,MAAa;IAKlC;;;;;;;OAOG;IACH,OAAO,CAAC,SAAS;IAKjB;;;;;OAKG;IACH,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS;IAO1B;;;;;OAKG;IACH,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI;IAa3B;;OAEG;IACH,KAAK,IAAI,IAAI;IAIb;;OAEG;IACH,IAAI,IAAI,IAAI,MAAM,CAEjB;CACF;AAsED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAUpD;AA+ED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAG/C;AA6BD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAsB,KAAK,CAAC,CAAC,EAC3B,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,WAAW,GAAE,MAAU,EACvB,OAAO,GAAE,MAAa,EACtB,MAAM,CAAC,EAAE,MAAM,EAIf,WAAW,GAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAoB,GACpD,OAAO,CAAC,CAAC,CAAC,CA2BZ;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAMtE;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAStD"}
|