@xivdyetools/core 1.14.0 → 1.15.0
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/data/character_colors/index.json +40 -0
- package/dist/data/character_colors/race_specific/hair_colors.json +55394 -0
- package/dist/data/character_colors/race_specific/skin_colors.json +55394 -0
- package/dist/data/character_colors/shared/eye_colors.json +1730 -0
- package/dist/data/character_colors/shared/face_paint_dark.json +866 -0
- package/dist/data/character_colors/shared/face_paint_light.json +866 -0
- package/dist/data/character_colors/shared/highlight_colors.json +1730 -0
- package/dist/data/character_colors/shared/lip_colors_dark.json +866 -0
- package/dist/data/character_colors/shared/lip_colors_light.json +866 -0
- package/dist/data/character_colors/shared/tattoo_colors.json +1730 -0
- package/dist/data/locales/de.json +1 -1
- package/dist/data/locales/en.json +1 -1
- package/dist/data/locales/fr.json +1 -1
- package/dist/data/locales/ja.json +1 -1
- package/dist/data/locales/ko.json +1 -1
- package/dist/data/locales/zh.json +1 -1
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -1
- package/dist/services/CharacterColorService.d.ts +46 -6
- package/dist/services/CharacterColorService.d.ts.map +1 -1
- package/dist/services/CharacterColorService.js +123 -26
- package/dist/services/CharacterColorService.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,20 @@ export { RGB_MIN, RGB_MAX, HUE_MIN, HUE_MAX, SATURATION_MIN, SATURATION_MAX, VAL
|
|
|
18
18
|
export { clamp, lerp, round, distance, unique, groupBy, sortByProperty, filterNulls, isValidHexColor, isValidRGB, isValidHSV, isString, isNumber, isArray, isObject, isNullish, sleep, retry, isAbortError, generateChecksum, } from './utils/index.js';
|
|
19
19
|
export { default as dyeDatabase } from './data/colors_xiv.json';
|
|
20
20
|
export { default as presetData } from './data/presets.json';
|
|
21
|
+
export { default as characterColorMeta } from './data/character_colors/index.json';
|
|
22
|
+
export { default as eyeColorsData } from './data/character_colors/shared/eye_colors.json';
|
|
23
|
+
export { default as highlightColorsData } from './data/character_colors/shared/highlight_colors.json';
|
|
24
|
+
export { default as lipColorsDarkData } from './data/character_colors/shared/lip_colors_dark.json';
|
|
25
|
+
export { default as lipColorsLightData } from './data/character_colors/shared/lip_colors_light.json';
|
|
26
|
+
export { default as tattooColorsData } from './data/character_colors/shared/tattoo_colors.json';
|
|
27
|
+
export { default as facePaintDarkData } from './data/character_colors/shared/face_paint_dark.json';
|
|
28
|
+
export { default as facePaintLightData } from './data/character_colors/shared/face_paint_light.json';
|
|
29
|
+
export { default as hairColorsData } from './data/character_colors/race_specific/hair_colors.json';
|
|
30
|
+
export { default as skinColorsData } from './data/character_colors/race_specific/skin_colors.json';
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated Use the CharacterColorService instead, or import individual
|
|
33
|
+
* color data exports (eyeColorsData, hairColorsData, etc.) for tree-shaking.
|
|
34
|
+
*/
|
|
21
35
|
export { default as characterColorData } from './data/character_colors.json';
|
|
22
36
|
export { VERSION } from './version.js';
|
|
23
37
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC1E,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE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GED
|
@@ -19,6 +19,21 @@ export { clamp, lerp, round, distance, unique, groupBy, sortByProperty, filterNu
|
|
|
19
19
|
// Data (for browser environments - to be injected)
|
|
20
20
|
export { default as dyeDatabase } from './data/colors_xiv.json' with { type: 'json' };
|
|
21
21
|
export { default as presetData } from './data/presets.json' with { type: 'json' };
|
|
22
|
+
// Character color data - individual exports for tree-shaking
|
|
23
|
+
export { default as characterColorMeta } from './data/character_colors/index.json' with { type: 'json' };
|
|
24
|
+
export { default as eyeColorsData } from './data/character_colors/shared/eye_colors.json' with { type: 'json' };
|
|
25
|
+
export { default as highlightColorsData } from './data/character_colors/shared/highlight_colors.json' with { type: 'json' };
|
|
26
|
+
export { default as lipColorsDarkData } from './data/character_colors/shared/lip_colors_dark.json' with { type: 'json' };
|
|
27
|
+
export { default as lipColorsLightData } from './data/character_colors/shared/lip_colors_light.json' with { type: 'json' };
|
|
28
|
+
export { default as tattooColorsData } from './data/character_colors/shared/tattoo_colors.json' with { type: 'json' };
|
|
29
|
+
export { default as facePaintDarkData } from './data/character_colors/shared/face_paint_dark.json' with { type: 'json' };
|
|
30
|
+
export { default as facePaintLightData } from './data/character_colors/shared/face_paint_light.json' with { type: 'json' };
|
|
31
|
+
export { default as hairColorsData } from './data/character_colors/race_specific/hair_colors.json' with { type: 'json' };
|
|
32
|
+
export { default as skinColorsData } from './data/character_colors/race_specific/skin_colors.json' with { type: 'json' };
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated Use the CharacterColorService instead, or import individual
|
|
35
|
+
* color data exports (eyeColorsData, hairColorsData, etc.) for tree-shaking.
|
|
36
|
+
*/
|
|
22
37
|
export { default as characterColorData } from './data/character_colors.json' with { type: 'json' };
|
|
23
38
|
// Version (auto-generated from package.json during build)
|
|
24
39
|
export { VERSION } from './version.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,WAAW;AAC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E,MAAM,sDAAsD,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC3H,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,wDAAwD,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACzH,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,wDAAwD,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAEzH;;;GAGG;AACH,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,8BAA8B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAEnG,0DAA0D;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
* Service for accessing FFXIV character customization colors and
|
|
5
5
|
* finding matching dyes for hair, eye, skin tones etc.
|
|
6
6
|
*
|
|
7
|
+
* Uses hybrid loading: shared colors are loaded eagerly (sync),
|
|
8
|
+
* race-specific colors are loaded lazily on demand (async).
|
|
9
|
+
*
|
|
7
10
|
* @module services/CharacterColorService
|
|
8
11
|
* @example
|
|
9
12
|
* ```typescript
|
|
@@ -12,9 +15,12 @@
|
|
|
12
15
|
* const characterColors = new CharacterColorService();
|
|
13
16
|
* const dyeService = new DyeService(dyeDatabase);
|
|
14
17
|
*
|
|
15
|
-
* // Get all eye colors
|
|
18
|
+
* // Get all eye colors (sync)
|
|
16
19
|
* const eyeColors = characterColors.getEyeColors();
|
|
17
20
|
*
|
|
21
|
+
* // Get hair colors for a specific race (async)
|
|
22
|
+
* const hairColors = await characterColors.getHairColors('Midlander', 'Male');
|
|
23
|
+
*
|
|
18
24
|
* // Find closest dyes to an eye color
|
|
19
25
|
* const matches = characterColors.findClosestDyes(eyeColors[47], dyeService, 3);
|
|
20
26
|
* ```
|
|
@@ -35,9 +41,16 @@ export interface CharacterMatchOptions {
|
|
|
35
41
|
}
|
|
36
42
|
/**
|
|
37
43
|
* Service for accessing FFXIV character customization colors
|
|
44
|
+
*
|
|
45
|
+
* Shared colors (eye, lip, tattoo, etc.) are loaded synchronously at import time.
|
|
46
|
+
* Race-specific colors (hair, skin) are loaded lazily on first access.
|
|
38
47
|
*/
|
|
39
48
|
export declare class CharacterColorService {
|
|
40
|
-
private
|
|
49
|
+
private sharedData;
|
|
50
|
+
private hairColorsData;
|
|
51
|
+
private skinColorsData;
|
|
52
|
+
private hairColorsLoading;
|
|
53
|
+
private skinColorsLoading;
|
|
41
54
|
constructor();
|
|
42
55
|
/**
|
|
43
56
|
* Get all eye colors (192 colors)
|
|
@@ -71,18 +84,45 @@ export declare class CharacterColorService {
|
|
|
71
84
|
* Get shared colors by category
|
|
72
85
|
*/
|
|
73
86
|
getSharedColors(category: SharedColorCategory): CharacterColor[];
|
|
87
|
+
/**
|
|
88
|
+
* Load hair colors data lazily
|
|
89
|
+
*/
|
|
90
|
+
private loadHairColors;
|
|
91
|
+
/**
|
|
92
|
+
* Load skin colors data lazily
|
|
93
|
+
*/
|
|
94
|
+
private loadSkinColors;
|
|
74
95
|
/**
|
|
75
96
|
* Get hair colors for a specific subrace and gender (192 colors each)
|
|
97
|
+
*
|
|
98
|
+
* @param subrace - The character subrace (e.g., 'Midlander', 'Highlander')
|
|
99
|
+
* @param gender - The character gender ('Male' or 'Female')
|
|
100
|
+
* @returns Promise resolving to array of hair colors
|
|
76
101
|
*/
|
|
77
|
-
getHairColors(subrace: SubRace, gender: Gender): CharacterColor[]
|
|
102
|
+
getHairColors(subrace: SubRace, gender: Gender): Promise<CharacterColor[]>;
|
|
78
103
|
/**
|
|
79
104
|
* Get skin colors for a specific subrace and gender (192 colors each)
|
|
105
|
+
*
|
|
106
|
+
* @param subrace - The character subrace (e.g., 'Midlander', 'Highlander')
|
|
107
|
+
* @param gender - The character gender ('Male' or 'Female')
|
|
108
|
+
* @returns Promise resolving to array of skin colors
|
|
80
109
|
*/
|
|
81
|
-
getSkinColors(subrace: SubRace, gender: Gender): CharacterColor[]
|
|
110
|
+
getSkinColors(subrace: SubRace, gender: Gender): Promise<CharacterColor[]>;
|
|
82
111
|
/**
|
|
83
112
|
* Get race-specific colors by category
|
|
113
|
+
*
|
|
114
|
+
* @param category - 'hairColors' or 'skinColors'
|
|
115
|
+
* @param subrace - The character subrace
|
|
116
|
+
* @param gender - The character gender
|
|
117
|
+
* @returns Promise resolving to array of colors
|
|
118
|
+
*/
|
|
119
|
+
getRaceSpecificColors(category: RaceSpecificColorCategory, subrace: SubRace, gender: Gender): Promise<CharacterColor[]>;
|
|
120
|
+
/**
|
|
121
|
+
* Preload all race-specific data for faster subsequent access.
|
|
122
|
+
* Call this early (e.g., on app init) to avoid latency when
|
|
123
|
+
* the user first selects a race.
|
|
84
124
|
*/
|
|
85
|
-
|
|
125
|
+
preloadRaceData(): Promise<void>;
|
|
86
126
|
/**
|
|
87
127
|
* Calculate color distance using the specified matching method.
|
|
88
128
|
* Converts RGB to hex for perceptual methods that require it.
|
|
@@ -128,7 +168,7 @@ export declare class CharacterColorService {
|
|
|
128
168
|
/**
|
|
129
169
|
* Get a specific color by index from a race-specific category
|
|
130
170
|
*/
|
|
131
|
-
getRaceSpecificColorByIndex(category: RaceSpecificColorCategory, subrace: SubRace, gender: Gender, index: number): CharacterColor | null
|
|
171
|
+
getRaceSpecificColorByIndex(category: RaceSpecificColorCategory, subrace: SubRace, gender: Gender, index: number): Promise<CharacterColor | null>;
|
|
132
172
|
/**
|
|
133
173
|
* Get all available subraces
|
|
134
174
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CharacterColorService.d.ts","sourceRoot":"","sources":["../../src/services/CharacterColorService.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"CharacterColorService.d.ts","sourceRoot":"","sources":["../../src/services/CharacterColorService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB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C,cAAc,EAAE,CAAC;IAKhF;;;;;;;OAOG;IACG,qBAAqB,CACzB,QAAQ,EAAE,yBAAyB,EACnC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,cAAc,EAAE,CAAC;IAQ5B;;;;OAIG;IACG,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;IAQtC;;;OAGG;IACH,OAAO,CAAC,2BAA2B;IA+BnC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,eAAe,CACb,KAAK,EAAE,cAAc,EACrB,UAAU,EAAE,UAAU,EACtB,cAAc,GAAE,MAAM,GAAG,qBAAyB,GACjD,mBAAmB,EAAE;IAkCxB;;OAEG;IACH,cAAc,CAAC,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,GAAG,mBAAmB,GAAG,IAAI;IAKzF;;OAEG;IACH,sBAAsB,CACpB,KAAK,EAAE,cAAc,EACrB,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,MAAM,GAClB,mBAAmB,EAAE;IA2BxB;;OAEG;IACH,qBAAqB,CAAC,QAAQ,EAAE,mBAAmB,EAAE,KAAK,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI;IAK1F;;OAEG;IACG,2BAA2B,CAC/B,QAAQ,EAAE,yBAAyB,EACnC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;IASjC;;OAEG;IACH,oBAAoB,IAAI,OAAO,EAAE;IAIjC;;OAEG;IACH,UAAU,IAAI,MAAM;IAIpB;;OAEG;IACH,cAAc,IAAI,MAAM;IAQxB;;OAEG;IACH,OAAO,CAAC,iBAAiB;CAM1B"}
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
* Service for accessing FFXIV character customization colors and
|
|
5
5
|
* finding matching dyes for hair, eye, skin tones etc.
|
|
6
6
|
*
|
|
7
|
+
* Uses hybrid loading: shared colors are loaded eagerly (sync),
|
|
8
|
+
* race-specific colors are loaded lazily on demand (async).
|
|
9
|
+
*
|
|
7
10
|
* @module services/CharacterColorService
|
|
8
11
|
* @example
|
|
9
12
|
* ```typescript
|
|
@@ -12,94 +15,189 @@
|
|
|
12
15
|
* const characterColors = new CharacterColorService();
|
|
13
16
|
* const dyeService = new DyeService(dyeDatabase);
|
|
14
17
|
*
|
|
15
|
-
* // Get all eye colors
|
|
18
|
+
* // Get all eye colors (sync)
|
|
16
19
|
* const eyeColors = characterColors.getEyeColors();
|
|
17
20
|
*
|
|
21
|
+
* // Get hair colors for a specific race (async)
|
|
22
|
+
* const hairColors = await characterColors.getHairColors('Midlander', 'Male');
|
|
23
|
+
*
|
|
18
24
|
* // Find closest dyes to an eye color
|
|
19
25
|
* const matches = characterColors.findClosestDyes(eyeColors[47], dyeService, 3);
|
|
20
26
|
* ```
|
|
21
27
|
*/
|
|
22
28
|
import { ColorConverter } from './color/ColorConverter.js';
|
|
23
|
-
//
|
|
24
|
-
|
|
29
|
+
// =============================================================================
|
|
30
|
+
// Eager imports for shared colors (always needed, loaded at build time)
|
|
31
|
+
// =============================================================================
|
|
32
|
+
import colorMeta from '../data/character_colors/index.json';
|
|
33
|
+
import eyeColorsData from '../data/character_colors/shared/eye_colors.json';
|
|
34
|
+
import highlightColorsData from '../data/character_colors/shared/highlight_colors.json';
|
|
35
|
+
import lipColorsDarkData from '../data/character_colors/shared/lip_colors_dark.json';
|
|
36
|
+
import lipColorsLightData from '../data/character_colors/shared/lip_colors_light.json';
|
|
37
|
+
import tattooColorsData from '../data/character_colors/shared/tattoo_colors.json';
|
|
38
|
+
import facePaintDarkData from '../data/character_colors/shared/face_paint_dark.json';
|
|
39
|
+
import facePaintLightData from '../data/character_colors/shared/face_paint_light.json';
|
|
25
40
|
/**
|
|
26
41
|
* Service for accessing FFXIV character customization colors
|
|
42
|
+
*
|
|
43
|
+
* Shared colors (eye, lip, tattoo, etc.) are loaded synchronously at import time.
|
|
44
|
+
* Race-specific colors (hair, skin) are loaded lazily on first access.
|
|
27
45
|
*/
|
|
28
46
|
export class CharacterColorService {
|
|
29
47
|
constructor() {
|
|
30
|
-
|
|
48
|
+
// Shared data loaded eagerly (sync access)
|
|
49
|
+
this.sharedData = {
|
|
50
|
+
eyeColors: eyeColorsData,
|
|
51
|
+
highlightColors: highlightColorsData,
|
|
52
|
+
lipColorsDark: lipColorsDarkData,
|
|
53
|
+
lipColorsLight: lipColorsLightData,
|
|
54
|
+
tattooColors: tattooColorsData,
|
|
55
|
+
facePaintColorsDark: facePaintDarkData,
|
|
56
|
+
facePaintColorsLight: facePaintLightData,
|
|
57
|
+
};
|
|
58
|
+
// Race-specific data loaded lazily (async access)
|
|
59
|
+
this.hairColorsData = null;
|
|
60
|
+
this.skinColorsData = null;
|
|
61
|
+
// Loading promises for deduplication
|
|
62
|
+
this.hairColorsLoading = null;
|
|
63
|
+
this.skinColorsLoading = null;
|
|
64
|
+
// No initialization needed - shared data is already imported
|
|
31
65
|
}
|
|
32
66
|
// ==========================================================================
|
|
33
|
-
// Shared Colors (Race-Agnostic)
|
|
67
|
+
// Shared Colors (Race-Agnostic) - Synchronous API
|
|
34
68
|
// ==========================================================================
|
|
35
69
|
/**
|
|
36
70
|
* Get all eye colors (192 colors)
|
|
37
71
|
*/
|
|
38
72
|
getEyeColors() {
|
|
39
|
-
return this.
|
|
73
|
+
return this.sharedData.eyeColors || [];
|
|
40
74
|
}
|
|
41
75
|
/**
|
|
42
76
|
* Get all hair highlight colors (192 colors)
|
|
43
77
|
*/
|
|
44
78
|
getHighlightColors() {
|
|
45
|
-
return this.
|
|
79
|
+
return this.sharedData.highlightColors || [];
|
|
46
80
|
}
|
|
47
81
|
/**
|
|
48
82
|
* Get all dark lip colors (96 colors)
|
|
49
83
|
*/
|
|
50
84
|
getLipColorsDark() {
|
|
51
|
-
return this.
|
|
85
|
+
return this.sharedData.lipColorsDark || [];
|
|
52
86
|
}
|
|
53
87
|
/**
|
|
54
88
|
* Get all light lip colors (96 colors)
|
|
55
89
|
*/
|
|
56
90
|
getLipColorsLight() {
|
|
57
|
-
return this.
|
|
91
|
+
return this.sharedData.lipColorsLight || [];
|
|
58
92
|
}
|
|
59
93
|
/**
|
|
60
94
|
* Get all tattoo/limbal ring colors (192 colors)
|
|
61
95
|
*/
|
|
62
96
|
getTattooColors() {
|
|
63
|
-
return this.
|
|
97
|
+
return this.sharedData.tattooColors || [];
|
|
64
98
|
}
|
|
65
99
|
/**
|
|
66
100
|
* Get all dark face paint colors (96 colors)
|
|
67
101
|
*/
|
|
68
102
|
getFacePaintColorsDark() {
|
|
69
|
-
return this.
|
|
103
|
+
return this.sharedData.facePaintColorsDark || [];
|
|
70
104
|
}
|
|
71
105
|
/**
|
|
72
106
|
* Get all light face paint colors (96 colors)
|
|
73
107
|
*/
|
|
74
108
|
getFacePaintColorsLight() {
|
|
75
|
-
return this.
|
|
109
|
+
return this.sharedData.facePaintColorsLight || [];
|
|
76
110
|
}
|
|
77
111
|
/**
|
|
78
112
|
* Get shared colors by category
|
|
79
113
|
*/
|
|
80
114
|
getSharedColors(category) {
|
|
81
|
-
return this.
|
|
115
|
+
return this.sharedData[category] || [];
|
|
82
116
|
}
|
|
83
117
|
// ==========================================================================
|
|
84
|
-
// Race-Specific Colors
|
|
118
|
+
// Race-Specific Colors - Asynchronous API (lazy loaded)
|
|
85
119
|
// ==========================================================================
|
|
120
|
+
/**
|
|
121
|
+
* Load hair colors data lazily
|
|
122
|
+
*/
|
|
123
|
+
async loadHairColors() {
|
|
124
|
+
if (this.hairColorsData) {
|
|
125
|
+
return this.hairColorsData;
|
|
126
|
+
}
|
|
127
|
+
// Deduplicate concurrent loads
|
|
128
|
+
if (!this.hairColorsLoading) {
|
|
129
|
+
this.hairColorsLoading = import('../data/character_colors/race_specific/hair_colors.json')
|
|
130
|
+
.then((module) => {
|
|
131
|
+
this.hairColorsData = module.default;
|
|
132
|
+
this.hairColorsLoading = null;
|
|
133
|
+
return this.hairColorsData;
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
return this.hairColorsLoading;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Load skin colors data lazily
|
|
140
|
+
*/
|
|
141
|
+
async loadSkinColors() {
|
|
142
|
+
if (this.skinColorsData) {
|
|
143
|
+
return this.skinColorsData;
|
|
144
|
+
}
|
|
145
|
+
// Deduplicate concurrent loads
|
|
146
|
+
if (!this.skinColorsLoading) {
|
|
147
|
+
this.skinColorsLoading = import('../data/character_colors/race_specific/skin_colors.json')
|
|
148
|
+
.then((module) => {
|
|
149
|
+
this.skinColorsData = module.default;
|
|
150
|
+
this.skinColorsLoading = null;
|
|
151
|
+
return this.skinColorsData;
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
return this.skinColorsLoading;
|
|
155
|
+
}
|
|
86
156
|
/**
|
|
87
157
|
* Get hair colors for a specific subrace and gender (192 colors each)
|
|
158
|
+
*
|
|
159
|
+
* @param subrace - The character subrace (e.g., 'Midlander', 'Highlander')
|
|
160
|
+
* @param gender - The character gender ('Male' or 'Female')
|
|
161
|
+
* @returns Promise resolving to array of hair colors
|
|
88
162
|
*/
|
|
89
|
-
getHairColors(subrace, gender) {
|
|
90
|
-
|
|
163
|
+
async getHairColors(subrace, gender) {
|
|
164
|
+
const data = await this.loadHairColors();
|
|
165
|
+
return data?.[subrace]?.[gender] || [];
|
|
91
166
|
}
|
|
92
167
|
/**
|
|
93
168
|
* Get skin colors for a specific subrace and gender (192 colors each)
|
|
169
|
+
*
|
|
170
|
+
* @param subrace - The character subrace (e.g., 'Midlander', 'Highlander')
|
|
171
|
+
* @param gender - The character gender ('Male' or 'Female')
|
|
172
|
+
* @returns Promise resolving to array of skin colors
|
|
94
173
|
*/
|
|
95
|
-
getSkinColors(subrace, gender) {
|
|
96
|
-
|
|
174
|
+
async getSkinColors(subrace, gender) {
|
|
175
|
+
const data = await this.loadSkinColors();
|
|
176
|
+
return data?.[subrace]?.[gender] || [];
|
|
97
177
|
}
|
|
98
178
|
/**
|
|
99
179
|
* Get race-specific colors by category
|
|
180
|
+
*
|
|
181
|
+
* @param category - 'hairColors' or 'skinColors'
|
|
182
|
+
* @param subrace - The character subrace
|
|
183
|
+
* @param gender - The character gender
|
|
184
|
+
* @returns Promise resolving to array of colors
|
|
185
|
+
*/
|
|
186
|
+
async getRaceSpecificColors(category, subrace, gender) {
|
|
187
|
+
if (category === 'hairColors') {
|
|
188
|
+
return this.getHairColors(subrace, gender);
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
return this.getSkinColors(subrace, gender);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Preload all race-specific data for faster subsequent access.
|
|
196
|
+
* Call this early (e.g., on app init) to avoid latency when
|
|
197
|
+
* the user first selects a race.
|
|
100
198
|
*/
|
|
101
|
-
|
|
102
|
-
|
|
199
|
+
async preloadRaceData() {
|
|
200
|
+
await Promise.all([this.loadHairColors(), this.loadSkinColors()]);
|
|
103
201
|
}
|
|
104
202
|
// ==========================================================================
|
|
105
203
|
// Color Matching
|
|
@@ -219,8 +317,8 @@ export class CharacterColorService {
|
|
|
219
317
|
/**
|
|
220
318
|
* Get a specific color by index from a race-specific category
|
|
221
319
|
*/
|
|
222
|
-
getRaceSpecificColorByIndex(category, subrace, gender, index) {
|
|
223
|
-
const colors = this.getRaceSpecificColors(category, subrace, gender);
|
|
320
|
+
async getRaceSpecificColorByIndex(category, subrace, gender, index) {
|
|
321
|
+
const colors = await this.getRaceSpecificColors(category, subrace, gender);
|
|
224
322
|
return colors.find((c) => c.index === index) || null;
|
|
225
323
|
}
|
|
226
324
|
// ==========================================================================
|
|
@@ -230,20 +328,19 @@ export class CharacterColorService {
|
|
|
230
328
|
* Get all available subraces
|
|
231
329
|
*/
|
|
232
330
|
getAvailableSubraces() {
|
|
233
|
-
|
|
234
|
-
return Object.keys(hairColors);
|
|
331
|
+
return colorMeta.subraces;
|
|
235
332
|
}
|
|
236
333
|
/**
|
|
237
334
|
* Get the data version
|
|
238
335
|
*/
|
|
239
336
|
getVersion() {
|
|
240
|
-
return
|
|
337
|
+
return colorMeta.meta.version;
|
|
241
338
|
}
|
|
242
339
|
/**
|
|
243
340
|
* Get grid column count (always 8)
|
|
244
341
|
*/
|
|
245
342
|
getGridColumns() {
|
|
246
|
-
return
|
|
343
|
+
return colorMeta.meta.gridColumns;
|
|
247
344
|
}
|
|
248
345
|
// ==========================================================================
|
|
249
346
|
// Private Helpers
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CharacterColorService.js","sourceRoot":"","sources":["../../src/services/CharacterColorService.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"CharacterColorService.js","sourceRoot":"","sources":["../../src/services/CharacterColorService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAYH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAc3D,gFAAgF;AAChF,wEAAwE;AACxE,gFAAgF;AAChF,OAAO,SAAS,MAAM,qCAAqC,CAAC;AAC5D,OAAO,aAAa,MAAM,iDAAiD,CAAC;AAC5E,OAAO,mBAAmB,MAAM,uDAAuD,CAAC;AACxF,OAAO,iBAAiB,MAAM,sDAAsD,CAAC;AACrF,OAAO,kBAAkB,MAAM,uDAAuD,CAAC;AACvF,OAAO,gBAAgB,MAAM,oDAAoD,CAAC;AAClF,OAAO,iBAAiB,MAAM,sDAAsD,CAAC;AACrF,OAAO,kBAAkB,MAAM,uDAAuD,CAAC;AAOvF;;;;;GAKG;AACH,MAAM,OAAO,qBAAqB;IAoBhC;QAnBA,2CAA2C;QACnC,eAAU,GAAqC;YACrD,SAAS,EAAE,aAAiC;YAC5C,eAAe,EAAE,mBAAuC;YACxD,aAAa,EAAE,iBAAqC;YACpD,cAAc,EAAE,kBAAsC;YACtD,YAAY,EAAE,gBAAoC;YAClD,mBAAmB,EAAE,iBAAqC;YAC1D,oBAAoB,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AAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;IAChD,CAAC;CACF"}
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xivdyetools/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0",
|
|
4
4
|
"description": "Core color algorithms and dye database for XIV Dye Tools",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -86,4 +86,4 @@
|
|
|
86
86
|
"prettier --write"
|
|
87
87
|
]
|
|
88
88
|
}
|
|
89
|
-
}
|
|
89
|
+
}
|