@xivdyetools/core 1.3.7 → 1.4.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.
@@ -2,7 +2,7 @@
2
2
  "locale": "de",
3
3
  "meta": {
4
4
  "version": "1.0.0",
5
- "generated": "2025-12-15T00:47:58.324Z",
5
+ "generated": "2025-12-15T19:42:36.533Z",
6
6
  "dyeCount": 125
7
7
  },
8
8
  "labels": {
@@ -2,7 +2,7 @@
2
2
  "locale": "en",
3
3
  "meta": {
4
4
  "version": "1.0.0",
5
- "generated": "2025-12-15T00:47:58.322Z",
5
+ "generated": "2025-12-15T19:42:36.531Z",
6
6
  "dyeCount": 125
7
7
  },
8
8
  "labels": {
@@ -2,7 +2,7 @@
2
2
  "locale": "fr",
3
3
  "meta": {
4
4
  "version": "1.0.0",
5
- "generated": "2025-12-15T00:47:58.324Z",
5
+ "generated": "2025-12-15T19:42:36.534Z",
6
6
  "dyeCount": 125
7
7
  },
8
8
  "labels": {
@@ -2,7 +2,7 @@
2
2
  "locale": "ja",
3
3
  "meta": {
4
4
  "version": "1.0.0",
5
- "generated": "2025-12-15T00:47:58.323Z",
5
+ "generated": "2025-12-15T19:42:36.532Z",
6
6
  "dyeCount": 125
7
7
  },
8
8
  "labels": {
@@ -1,409 +1,82 @@
1
1
  /**
2
2
  * @xivdyetools/core - Shared Type Definitions
3
3
  *
4
- * Type definitions for color science and FFXIV dyes
4
+ * Type definitions for color science and FFXIV dyes.
5
+ *
6
+ * NOTE: These types are now re-exported from @xivdyetools/types for consistency
7
+ * across the xivdyetools ecosystem. For new projects, consider importing
8
+ * directly from @xivdyetools/types.
5
9
  *
6
10
  * @module types
7
11
  */
8
- export type { Logger } from './logger.js';
9
- export { NoOpLogger, ConsoleLogger } from './logger.js';
10
- /**
11
- * RGB color representation
12
- * @example { r: 255, g: 0, b: 0 } // Red
13
- */
14
- export interface RGB {
15
- r: number;
16
- g: number;
17
- b: number;
18
- }
19
- /**
20
- * HSV color representation (Hue, Saturation, Value)
21
- * @example { h: 0, s: 100, v: 100 } // Bright red
22
- */
23
- export interface HSV {
24
- h: number;
25
- s: number;
26
- v: number;
27
- }
28
- /**
29
- * Hexadecimal color string (branded type for type safety)
30
- * Per R-1: Branded types prevent type confusion
31
- * @example "#FF0000"
32
- */
33
- export type HexColor = string & {
34
- readonly __brand: 'HexColor';
35
- };
36
- /**
37
- * Helper to create branded HexColor type with validation
38
- * Per R-1: Validates hex format before creating branded type
39
- * @throws {Error} If hex format is invalid
40
- */
41
- export declare function createHexColor(hex: string): HexColor;
42
- /**
43
- * Dye ID (branded type for type safety)
44
- * Per R-1: Prevents accidental mixing with other numbers
45
- */
46
- export type DyeId = number & {
47
- readonly __brand: 'DyeId';
48
- };
49
- /**
50
- * Helper to create branded DyeId type with validation
51
- * Per R-1: Validates dye ID is in valid range (1-200)
52
- */
53
- export declare function createDyeId(id: number): DyeId | null;
54
- /**
55
- * Hue value (0-360 degrees, branded type)
56
- * Per R-1: Prevents mixing with other angle values
57
- */
58
- export type Hue = number & {
59
- readonly __brand: 'Hue';
60
- };
61
- /**
62
- * Helper to create branded Hue type with normalization
63
- * Per R-1: Normalizes hue to 0-360 range
64
- */
65
- export declare function createHue(hue: number): Hue;
66
- /**
67
- * Saturation value (0-100 percent, branded type)
68
- * Per R-1: Prevents mixing with other percentage values
69
- */
70
- export type Saturation = number & {
71
- readonly __brand: 'Saturation';
72
- };
73
- /**
74
- * Helper to create branded Saturation type with clamping
75
- * Per R-1: Clamps saturation to 0-100 range
76
- */
77
- export declare function createSaturation(saturation: number): Saturation;
78
- /**
79
- * Vision types supported by accessibility checker
80
- */
81
- export type VisionType = 'normal' | 'deuteranopia' | 'protanopia' | 'tritanopia' | 'achromatopsia';
82
- /**
83
- * 3x3 transformation matrix for colorblindness simulation
84
- * [row][column] indexing for RGB to RGB transformation
85
- */
86
- export type Matrix3x3 = [
87
- [
88
- number,
89
- number,
90
- number
91
- ],
92
- [
93
- number,
94
- number,
95
- number
96
- ],
97
- [
98
- number,
99
- number,
100
- number
101
- ]
102
- ];
103
- /**
104
- * Colorblindness transformation matrices (Brettel 1997)
105
- */
106
- export interface ColorblindMatrices {
107
- deuteranopia: Matrix3x3;
108
- protanopia: Matrix3x3;
109
- tritanopia: Matrix3x3;
110
- achromatopsia: Matrix3x3;
111
- }
112
- /**
113
- * FFXIV dye object with color and metadata
114
- */
115
- export interface Dye {
116
- itemID: number;
117
- id: number;
118
- name: string;
119
- hex: string;
120
- rgb: RGB;
121
- hsv: HSV;
122
- category: string;
123
- acquisition: string;
124
- cost: number;
125
- isMetallic: boolean;
126
- isPastel: boolean;
127
- isDark: boolean;
128
- isCosmic: boolean;
129
- }
130
- /**
131
- * Localized dye with optional translated name
132
- */
133
- export interface LocalizedDye extends Dye {
134
- localizedName?: string;
135
- }
136
- /**
137
- * Supported locale codes
138
- */
139
- export type LocaleCode = 'en' | 'ja' | 'de' | 'fr' | 'ko' | 'zh';
140
- /**
141
- * Translation keys for UI labels
142
- */
143
- export type TranslationKey = 'dye' | 'dark' | 'metallic' | 'pastel' | 'cosmic' | 'cosmicExploration' | 'cosmicFortunes';
144
- /**
145
- * Harmony type keys
146
- */
147
- export type HarmonyTypeKey = 'complementary' | 'analogous' | 'triadic' | 'splitComplementary' | 'tetradic' | 'square' | 'monochromatic' | 'compound' | 'shades';
148
- /**
149
- * FFXIV Job keys for localization
150
- */
151
- export type JobKey = 'paladin' | 'warrior' | 'darkKnight' | 'gunbreaker' | 'whiteMage' | 'scholar' | 'astrologian' | 'sage' | 'monk' | 'dragoon' | 'ninja' | 'samurai' | 'reaper' | 'viper' | 'bard' | 'machinist' | 'dancer' | 'blackMage' | 'summoner' | 'redMage' | 'pictomancer' | 'blueMage';
152
- /**
153
- * FFXIV Grand Company keys for localization
154
- */
155
- export type GrandCompanyKey = 'maelstrom' | 'twinAdder' | 'immortalFlames';
156
- /**
157
- * Locale data structure matching generated JSON files
158
- */
159
- export interface LocaleData {
160
- locale: LocaleCode;
161
- meta: {
162
- version: string;
163
- generated: string;
164
- dyeCount: number;
165
- };
166
- labels: Record<TranslationKey, string>;
167
- dyeNames: Record<string, string>;
168
- categories: Record<string, string>;
169
- acquisitions: Record<string, string>;
170
- metallicDyeIds: number[];
171
- harmonyTypes: Record<HarmonyTypeKey, string>;
172
- visionTypes: Record<VisionType, string>;
173
- jobNames: Record<JobKey, string>;
174
- grandCompanyNames: Record<GrandCompanyKey, string>;
175
- }
176
- /**
177
- * Locale preference for resolving user's preferred language
178
- * Priority: explicit > guild > system > fallback
179
- */
180
- export interface LocalePreference {
181
- /** Explicit user selection (highest priority) */
182
- explicit?: LocaleCode;
183
- /** Guild/server preference (Discord only) */
184
- guild?: string;
185
- /** User's system language */
186
- system?: string;
187
- /** Fallback locale (always 'en') */
188
- fallback: LocaleCode;
189
- }
190
- /**
191
- * Universalis API response for item prices
192
- */
193
- export interface PriceData {
194
- itemID: number;
195
- currentAverage: number;
196
- currentMinPrice: number;
197
- currentMaxPrice: number;
198
- lastUpdate: number;
199
- }
200
- /**
201
- * Cached API data with TTL and integrity checking
202
- */
203
- export interface CachedData<T> {
204
- data: T;
205
- timestamp: number;
206
- ttl: number;
207
- version?: string;
208
- checksum?: string;
209
- }
210
- /**
211
- * Preset palette category identifiers
212
- */
213
- export type PresetCategory = 'jobs' | 'grand-companies' | 'seasons' | 'events' | 'aesthetics' | 'community';
214
12
  /**
215
- * Metadata for a preset category
13
+ * @deprecated Import directly from '@xivdyetools/logger/library' instead.
14
+ * These re-exports will be removed in the next major version.
216
15
  */
217
- export interface CategoryMeta {
218
- /** Category identifier */
219
- id?: string;
220
- /** Display name (localized) */
221
- name: string;
222
- /** Category description */
223
- description: string;
224
- /** Optional icon/emoji */
225
- icon?: string;
226
- }
16
+ export type { Logger } from '@xivdyetools/logger/library';
227
17
  /**
228
- * A preset color palette
18
+ * @deprecated Import directly from '@xivdyetools/logger/library' instead.
19
+ * These re-exports will be removed in the next major version.
229
20
  */
230
- export interface PresetPalette {
231
- /** Unique identifier (e.g., "job-rdm", "season-autumn") */
232
- id: string;
233
- /** Display name (e.g., "Red Mage") */
234
- name: string;
235
- /** Category this preset belongs to */
236
- category: PresetCategory;
237
- /** Brief description of the palette */
238
- description: string;
239
- /** Array of dye itemIDs (3-5 dyes) */
240
- dyes: number[];
241
- /** Searchable tags */
242
- tags: string[];
243
- /** Credit for community submissions */
244
- author?: string;
245
- /** Version for future updates */
246
- version?: string;
247
- }
21
+ export { NoOpLogger, ConsoleLogger } from '@xivdyetools/logger/library';
248
22
  /**
249
- * Preset with resolved Dye objects
23
+ * @deprecated Import directly from '@xivdyetools/types' instead.
24
+ * These re-exports will be removed in the next major version.
250
25
  */
251
- export interface ResolvedPreset extends PresetPalette {
252
- /** Full Dye objects for each dye ID */
253
- resolvedDyes: (Dye | null)[];
254
- }
26
+ export type { RGB, HSV, HexColor, DyeId, Hue, Saturation } from '@xivdyetools/types';
255
27
  /**
256
- * Full preset data structure
28
+ * @deprecated Import directly from '@xivdyetools/types' instead.
29
+ * These re-exports will be removed in the next major version.
257
30
  */
258
- export interface PresetData {
259
- /** Data format version */
260
- version: string;
261
- /** Last update timestamp */
262
- lastUpdated: string;
263
- /** Category metadata */
264
- categories: Record<PresetCategory, CategoryMeta>;
265
- /** All preset palettes */
266
- palettes: PresetPalette[];
267
- }
31
+ export { createHexColor, createDyeId, createHue, createSaturation } from '@xivdyetools/types';
268
32
  /**
269
- * Status of a community preset submission
33
+ * @deprecated Import directly from '@xivdyetools/types' instead.
34
+ * These re-exports will be removed in the next major version.
270
35
  */
271
- export type PresetStatus = 'pending' | 'approved' | 'rejected' | 'flagged';
36
+ export type { VisionType, Matrix3x3, ColorblindMatrices } from '@xivdyetools/types';
272
37
  /**
273
- * Community preset with voting and moderation data
274
- * Extended version of PresetPalette for API responses
38
+ * @deprecated Import directly from '@xivdyetools/types' instead.
39
+ * These re-exports will be removed in the next major version.
275
40
  */
276
- export interface CommunityPreset {
277
- /** Unique identifier (UUID) */
278
- id: string;
279
- /** Display name */
280
- name: string;
281
- /** Brief description */
282
- description: string;
283
- /** Category this preset belongs to */
284
- category_id: PresetCategory;
285
- /** Array of dye item IDs (2-5 dyes) */
286
- dyes: number[];
287
- /** Searchable tags */
288
- tags: string[];
289
- /** Discord user ID of author (null for curated) */
290
- author_discord_id: string | null;
291
- /** Display name of author at submission time */
292
- author_name: string | null;
293
- /** Number of votes */
294
- vote_count: number;
295
- /** Moderation status */
296
- status: PresetStatus;
297
- /** True for official/curated presets */
298
- is_curated: boolean;
299
- /** ISO 8601 creation timestamp */
300
- created_at: string;
301
- /** ISO 8601 last update timestamp */
302
- updated_at: string;
303
- }
41
+ export type { Dye, LocalizedDye, DyeWithDistance, DyeDatabase } from '@xivdyetools/types';
304
42
  /**
305
- * Data required to submit a new preset
43
+ * @deprecated Import directly from '@xivdyetools/types' instead.
44
+ * These re-exports will be removed in the next major version.
306
45
  */
307
- export interface PresetSubmission {
308
- /** Name (2-50 characters) */
309
- name: string;
310
- /** Description (10-200 characters) */
311
- description: string;
312
- /** Category */
313
- category_id: PresetCategory;
314
- /** Array of dye item IDs (2-5 dyes) */
315
- dyes: number[];
316
- /** Tags (0-10 tags, max 30 chars each) */
317
- tags: string[];
318
- /** Submitter's Discord user ID */
319
- author_discord_id: string;
320
- /** Submitter's display name */
321
- author_name: string;
322
- }
46
+ export type { PresetCategory, PresetStatus, PresetSortOption, CategoryMeta, PresetPalette, ResolvedPreset, PresetData, CommunityPreset, PresetSubmission, AuthenticatedPresetSubmission, PresetFilters, PresetEditRequest, PresetListResponse, PresetSubmitResponse, PresetEditResponse, VoteResponse, ModerationResponse, CategoryListResponse, } from '@xivdyetools/types';
323
47
  /**
324
- * Response when listing presets
48
+ * @deprecated Import directly from '@xivdyetools/types' instead.
49
+ * These re-exports will be removed in the next major version.
325
50
  */
326
- export interface PresetListResponse {
327
- /** Array of presets */
328
- presets: CommunityPreset[];
329
- /** Total count (for pagination) */
330
- total: number;
331
- /** Current page number */
332
- page: number;
333
- /** Results per page */
334
- limit: number;
335
- /** True if more pages available */
336
- has_more: boolean;
337
- }
51
+ export type { AuthProvider, AuthSource, AuthContext, PrimaryCharacter, JWTPayload, OAuthState, DiscordTokenResponse, DiscordUser, XIVAuthTokenResponse, XIVAuthCharacter, XIVAuthCharacterRegistration, XIVAuthSocialIdentity, XIVAuthUser, AuthUser, AuthResponse, RefreshResponse, UserInfoResponse, } from '@xivdyetools/types';
338
52
  /**
339
- * Response when submitting a preset
53
+ * @deprecated Import directly from '@xivdyetools/types' instead.
54
+ * These re-exports will be removed in the next major version.
340
55
  */
341
- export interface PresetSubmitResponse {
342
- /** Whether the operation succeeded */
343
- success: boolean;
344
- /** The created preset (if new) */
345
- preset?: CommunityPreset;
346
- /** The existing preset (if duplicate) */
347
- duplicate?: CommunityPreset;
348
- /** Whether a vote was added to duplicate */
349
- vote_added?: boolean;
350
- /** Moderation result */
351
- moderation_status?: 'approved' | 'pending';
352
- }
56
+ export type { APIResponse, CachedData, ModerationResult, ModerationLogEntry, ModerationStats, PriceData, RateLimitResult, } from '@xivdyetools/types';
353
57
  /**
354
- * Response when voting on a preset
58
+ * @deprecated Import directly from '@xivdyetools/types' instead.
59
+ * These re-exports will be removed in the next major version.
355
60
  */
356
- export interface VoteResponse {
357
- /** Whether the operation succeeded */
358
- success: boolean;
359
- /** Updated vote count */
360
- new_vote_count: number;
361
- /** True if user already voted */
362
- already_voted?: boolean;
363
- }
61
+ export type { LocaleCode, TranslationKey, HarmonyTypeKey, JobKey, GrandCompanyKey, LocaleData, LocalePreference, } from '@xivdyetools/types';
364
62
  /**
365
- * Filters for listing presets
63
+ * @deprecated Import directly from '@xivdyetools/types' instead.
64
+ * These re-exports will be removed in the next major version.
366
65
  */
367
- export interface PresetFilters {
368
- /** Filter by category */
369
- category?: PresetCategory;
370
- /** Search term */
371
- search?: string;
372
- /** Filter by status */
373
- status?: PresetStatus;
374
- /** Sort order */
375
- sort?: 'popular' | 'recent' | 'name';
376
- /** Page number */
377
- page?: number;
378
- /** Results per page */
379
- limit?: number;
380
- /** Filter by curated status */
381
- is_curated?: boolean;
382
- }
66
+ export { ErrorCode, AppError } from '@xivdyetools/types';
383
67
  /**
384
- * Severity levels for application errors
68
+ * @deprecated Import directly from '@xivdyetools/types' instead.
69
+ * These re-exports will be removed in the next major version.
385
70
  */
386
- export type ErrorSeverity = 'critical' | 'error' | 'warning' | 'info';
71
+ export type { ErrorSeverity } from '@xivdyetools/types';
387
72
  /**
388
- * Custom error class with severity and code
73
+ * @deprecated Import directly from '@xivdyetools/types' instead.
74
+ * These re-exports will be removed in the next major version.
389
75
  */
390
- export declare class AppError extends Error {
391
- code: string;
392
- severity: ErrorSeverity;
393
- constructor(code: string, message: string, severity?: ErrorSeverity);
394
- toJSON(): Record<string, unknown>;
395
- }
76
+ export type { Result, AsyncResult, Nullable, Optional } from '@xivdyetools/types';
396
77
  /**
397
- * Error codes for different failure scenarios
78
+ * @deprecated Import directly from '@xivdyetools/types' instead.
79
+ * These re-exports will be removed in the next major version.
398
80
  */
399
- export declare enum ErrorCode {
400
- INVALID_HEX_COLOR = "INVALID_HEX_COLOR",
401
- INVALID_RGB_VALUE = "INVALID_RGB_VALUE",
402
- DYE_NOT_FOUND = "DYE_NOT_FOUND",
403
- DATABASE_LOAD_FAILED = "DATABASE_LOAD_FAILED",
404
- INVALID_INPUT = "INVALID_INPUT",
405
- API_CALL_FAILED = "API_CALL_FAILED",
406
- LOCALE_LOAD_FAILED = "LOCALE_LOAD_FAILED",
407
- UNKNOWN_ERROR = "UNKNOWN_ERROR"
408
- }
81
+ export { isOk, isErr } from '@xivdyetools/types';
409
82
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,aAAa,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M,oBAAoB,CAAC;AAClF;;;GAGG;AACH,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1,87 +1,32 @@
1
1
  /**
2
2
  * @xivdyetools/core - Shared Type Definitions
3
3
  *
4
- * Type definitions for color science and FFXIV dyes
4
+ * Type definitions for color science and FFXIV dyes.
5
+ *
6
+ * NOTE: These types are now re-exported from @xivdyetools/types for consistency
7
+ * across the xivdyetools ecosystem. For new projects, consider importing
8
+ * directly from @xivdyetools/types.
5
9
  *
6
10
  * @module types
7
11
  */
8
- export { NoOpLogger, ConsoleLogger } from './logger.js';
9
- /**
10
- * Helper to create branded HexColor type with validation
11
- * Per R-1: Validates hex format before creating branded type
12
- * @throws {Error} If hex format is invalid
13
- */
14
- export function createHexColor(hex) {
15
- // Basic validation - must be #RRGGBB or #RGB format
16
- if (!/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(hex)) {
17
- throw new Error(`Invalid hex color format: ${hex}. Expected #RRGGBB or #RGB format.`);
18
- }
19
- // Normalize to uppercase #RRGGBB
20
- const normalized = hex.length === 4
21
- ? `#${hex[1]}${hex[1]}${hex[2]}${hex[2]}${hex[3]}${hex[3]}`.toUpperCase()
22
- : hex.toUpperCase();
23
- return normalized;
24
- }
25
- /**
26
- * Helper to create branded DyeId type with validation
27
- * Per R-1: Validates dye ID is in valid range (1-200)
28
- */
29
- export function createDyeId(id) {
30
- if (!Number.isInteger(id) || id < 1 || id > 200) {
31
- return null;
32
- }
33
- return id;
34
- }
35
12
  /**
36
- * Helper to create branded Hue type with normalization
37
- * Per R-1: Normalizes hue to 0-360 range
13
+ * @deprecated Import directly from '@xivdyetools/logger/library' instead.
14
+ * These re-exports will be removed in the next major version.
38
15
  */
39
- export function createHue(hue) {
40
- // Normalize to 0-360 range
41
- const normalized = ((hue % 360) + 360) % 360;
42
- return normalized;
43
- }
16
+ export { NoOpLogger, ConsoleLogger } from '@xivdyetools/logger/library';
44
17
  /**
45
- * Helper to create branded Saturation type with clamping
46
- * Per R-1: Clamps saturation to 0-100 range
18
+ * @deprecated Import directly from '@xivdyetools/types' instead.
19
+ * These re-exports will be removed in the next major version.
47
20
  */
48
- export function createSaturation(saturation) {
49
- const clamped = Math.max(0, Math.min(100, saturation));
50
- return clamped;
51
- }
21
+ export { createHexColor, createDyeId, createHue, createSaturation } from '@xivdyetools/types';
52
22
  /**
53
- * Custom error class with severity and code
23
+ * @deprecated Import directly from '@xivdyetools/types' instead.
24
+ * These re-exports will be removed in the next major version.
54
25
  */
55
- export class AppError extends Error {
56
- constructor(code, message, severity = 'error') {
57
- super(message);
58
- this.code = code;
59
- this.severity = severity;
60
- this.name = 'AppError';
61
- Object.setPrototypeOf(this, AppError.prototype);
62
- }
63
- toJSON() {
64
- return {
65
- name: this.name,
66
- code: this.code,
67
- message: this.message,
68
- severity: this.severity,
69
- stack: this.stack,
70
- };
71
- }
72
- }
26
+ export { ErrorCode, AppError } from '@xivdyetools/types';
73
27
  /**
74
- * Error codes for different failure scenarios
28
+ * @deprecated Import directly from '@xivdyetools/types' instead.
29
+ * These re-exports will be removed in the next major version.
75
30
  */
76
- export var ErrorCode;
77
- (function (ErrorCode) {
78
- ErrorCode["INVALID_HEX_COLOR"] = "INVALID_HEX_COLOR";
79
- ErrorCode["INVALID_RGB_VALUE"] = "INVALID_RGB_VALUE";
80
- ErrorCode["DYE_NOT_FOUND"] = "DYE_NOT_FOUND";
81
- ErrorCode["DATABASE_LOAD_FAILED"] = "DATABASE_LOAD_FAILED";
82
- ErrorCode["INVALID_INPUT"] = "INVALID_INPUT";
83
- ErrorCode["API_CALL_FAILED"] = "API_CALL_FAILED";
84
- ErrorCode["LOCALE_LOAD_FAILED"] = "LOCALE_LOAD_FAILED";
85
- ErrorCode["UNKNOWN_ERROR"] = "UNKNOWN_ERROR";
86
- })(ErrorCode || (ErrorCode = {}));
31
+ export { isOk, isErr } from '@xivdyetools/types';
87
32
  //# sourceMappingURL=index.js.map
@@ -1 +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AoB,CAAC;AA0F9F;;;GAGG;AACH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAYzD;;;GAGG;AACH,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC"}
@@ -4,81 +4,20 @@
4
4
  * Injectable logger interface for library consumers to customize logging behavior.
5
5
  * Prevents library code from polluting consumer application logs.
6
6
  *
7
- * @module types/logger
8
- */
9
- /**
10
- * Logger interface for customizable logging
11
- *
12
- * Implement this interface to control how the library logs messages.
13
- * By default, the library uses a no-op logger that suppresses all output.
14
- *
15
- * @example Using the console logger
16
- * ```typescript
17
- * import { ConsoleLogger, DyeService } from 'xivdyetools-core';
18
- *
19
- * // Enable console logging for debugging
20
- * const dyeService = new DyeService({ logger: ConsoleLogger });
21
- * ```
7
+ * NOTE: This file now re-exports from @xivdyetools/logger/library for consistency
8
+ * across the xivdyetools ecosystem. For new projects, consider importing
9
+ * directly from @xivdyetools/logger/library.
22
10
  *
23
- * @example Creating a custom logger
24
- * ```typescript
25
- * const myLogger: Logger = {
26
- * info: (msg) => myLoggingFramework.info(`[xivdyetools] ${msg}`),
27
- * warn: (msg) => myLoggingFramework.warn(`[xivdyetools] ${msg}`),
28
- * error: (msg, error) => myLoggingFramework.error(`[xivdyetools] ${msg}`, error),
29
- * debug: (msg) => myLoggingFramework.debug(`[xivdyetools] ${msg}`),
30
- * };
31
- * ```
11
+ * @module types/logger
32
12
  */
33
- export interface Logger {
34
- /**
35
- * Log an informational message
36
- * @param message - Message to log
37
- */
38
- info: (message: string) => void;
39
- /**
40
- * Log a warning message
41
- * @param message - Message to log
42
- */
43
- warn: (message: string) => void;
44
- /**
45
- * Log an error message
46
- * @param message - Message to log
47
- * @param error - Optional error object for additional context
48
- */
49
- error: (message: string, error?: unknown) => void;
50
- /**
51
- * Log a debug message (optional, typically suppressed in production)
52
- * @param message - Message to log
53
- */
54
- debug?: (message: string) => void;
55
- }
56
13
  /**
57
- * No-op logger that suppresses all output
58
- *
59
- * This is the default logger used by the library to prevent
60
- * polluting consumer application logs.
61
- *
62
- * @example
63
- * ```typescript
64
- * // Default behavior - no console output
65
- * const service = new DyeService();
66
- * ```
14
+ * @deprecated Import directly from '@xivdyetools/logger/library' instead.
15
+ * These re-exports will be removed in the next major version.
67
16
  */
68
- export declare const NoOpLogger: Logger;
17
+ export type { Logger } from '@xivdyetools/logger/library';
69
18
  /**
70
- * Console logger for development and debugging
71
- *
72
- * Use this when you want to see library log messages in the console.
73
- * Prefixes all messages with [xivdyetools] for easy identification.
74
- *
75
- * @example
76
- * ```typescript
77
- * import { ConsoleLogger, DyeService } from 'xivdyetools-core';
78
- *
79
- * // Enable verbose logging during development
80
- * const dyeService = new DyeService({ logger: ConsoleLogger });
81
- * ```
19
+ * @deprecated Import directly from '@xivdyetools/logger/library' instead.
20
+ * These re-exports will be removed in the next major version.
82
21
  */
83
- export declare const ConsoleLogger: Logger;
22
+ export { NoOpLogger, ConsoleLogger, createLibraryLogger } from '@xivdyetools/logger/library';
84
23
  //# sourceMappingURL=logger.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/types/logger.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,MAAM;IACrB;;;OAGG;IACH,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAEhC;;;OAGG;IACH,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAEhC;;;;OAIG;IACH,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAElD;;;OAGG;IACH,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU,EAAE,MAKxB,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,aAAa,EAAE,MAW3B,CAAC"}
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/types/logger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;GAGG;AACH,YAAY,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAC1D;;;GAGG;AACH,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC"}
@@ -4,51 +4,15 @@
4
4
  * Injectable logger interface for library consumers to customize logging behavior.
5
5
  * Prevents library code from polluting consumer application logs.
6
6
  *
7
- * @module types/logger
8
- */
9
- /**
10
- * No-op logger that suppresses all output
11
- *
12
- * This is the default logger used by the library to prevent
13
- * polluting consumer application logs.
7
+ * NOTE: This file now re-exports from @xivdyetools/logger/library for consistency
8
+ * across the xivdyetools ecosystem. For new projects, consider importing
9
+ * directly from @xivdyetools/logger/library.
14
10
  *
15
- * @example
16
- * ```typescript
17
- * // Default behavior - no console output
18
- * const service = new DyeService();
19
- * ```
11
+ * @module types/logger
20
12
  */
21
- export const NoOpLogger = {
22
- info: () => { },
23
- warn: () => { },
24
- error: () => { },
25
- debug: () => { },
26
- };
27
13
  /**
28
- * Console logger for development and debugging
29
- *
30
- * Use this when you want to see library log messages in the console.
31
- * Prefixes all messages with [xivdyetools] for easy identification.
32
- *
33
- * @example
34
- * ```typescript
35
- * import { ConsoleLogger, DyeService } from 'xivdyetools-core';
36
- *
37
- * // Enable verbose logging during development
38
- * const dyeService = new DyeService({ logger: ConsoleLogger });
39
- * ```
14
+ * @deprecated Import directly from '@xivdyetools/logger/library' instead.
15
+ * These re-exports will be removed in the next major version.
40
16
  */
41
- export const ConsoleLogger = {
42
- info: (message) => console.info(`[xivdyetools] ${message}`),
43
- warn: (message) => console.warn(`[xivdyetools] ${message}`),
44
- error: (message, error) => {
45
- if (error) {
46
- console.error(`[xivdyetools] ${message}`, error);
47
- }
48
- else {
49
- console.error(`[xivdyetools] ${message}`);
50
- }
51
- },
52
- debug: (message) => console.debug(`[xivdyetools] ${message}`),
53
- };
17
+ export { NoOpLogger, ConsoleLogger, createLibraryLogger } from '@xivdyetools/logger/library';
54
18
  //# sourceMappingURL=logger.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/types/logger.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAqDH;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,UAAU,GAAW;IAChC,IAAI,EAAE,GAAG,EAAE,GAAE,CAAC;IACd,IAAI,EAAE,GAAG,EAAE,GAAE,CAAC;IACd,KAAK,EAAE,GAAG,EAAE,GAAE,CAAC;IACf,KAAK,EAAE,GAAG,EAAE,GAAE,CAAC;CAChB,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,aAAa,GAAW;IACnC,IAAI,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,OAAO,EAAE,CAAC;IACnE,IAAI,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,OAAO,EAAE,CAAC;IACnE,KAAK,EAAE,CAAC,OAAe,EAAE,KAAe,EAAE,EAAE;QAC1C,IAAI,KAAK,EAAE,CAAC;YACV,OAAO,CAAC,KAAK,CAAC,iBAAiB,OAAO,EAAE,EAAE,KAAK,CAAC,CAAC;QACnD,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,KAAK,CAAC,iBAAiB,OAAO,EAAE,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;IACD,KAAK,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,iBAAiB,OAAO,EAAE,CAAC;CACtE,CAAC"}
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/types/logger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAOH;;;GAGG;AACH,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC"}
package/dist/version.d.ts CHANGED
@@ -7,5 +7,5 @@
7
7
  * Current library version
8
8
  * Automatically synced with package.json version
9
9
  */
10
- export declare const VERSION = "1.3.7";
10
+ export declare const VERSION = "1.4.0";
11
11
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -7,5 +7,5 @@
7
7
  * Current library version
8
8
  * Automatically synced with package.json version
9
9
  */
10
- export const VERSION = '1.3.7';
10
+ export const VERSION = '1.4.0';
11
11
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xivdyetools/core",
3
- "version": "1.3.7",
3
+ "version": "1.4.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",
@@ -56,7 +56,7 @@
56
56
  "url": "git+https://github.com/FlashGalatine/xivdyetools-core.git"
57
57
  },
58
58
  "devDependencies": {
59
- "@types/node": "^20.10.0",
59
+ "@types/node": "^22.10.2",
60
60
  "@typescript-eslint/eslint-plugin": "^6.15.0",
61
61
  "@typescript-eslint/parser": "^6.15.0",
62
62
  "@vitest/coverage-v8": "^4.0.14",
@@ -68,13 +68,17 @@
68
68
  "tsx": "^4.7.0",
69
69
  "typedoc": "^0.28.14",
70
70
  "typedoc-plugin-markdown": "^4.9.0",
71
- "typescript": "^5.3.2",
71
+ "typescript": "^5.9.3",
72
72
  "vitest": "^4.0.13",
73
73
  "yaml": "^2.3.4"
74
74
  },
75
75
  "engines": {
76
76
  "node": ">=18.0.0"
77
77
  },
78
+ "dependencies": {
79
+ "@xivdyetools/types": "^1.0.0",
80
+ "@xivdyetools/logger": "^1.0.0"
81
+ },
78
82
  "lint-staged": {
79
83
  "*.ts": [
80
84
  "eslint --fix",