@quvel-kit/core 1.3.4 → 1.3.5
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/config/quvel.d.ts.map +1 -1
- package/dist/config/quvel.js +10 -1
- package/dist/config/quvel.types.d.ts +15 -2
- package/dist/config/quvel.types.d.ts.map +1 -1
- package/dist/container/ServiceContainer.d.ts +1 -1
- package/dist/container/ServiceContainer.d.ts.map +1 -1
- package/dist/container/ServiceContainer.js +2 -2
- package/dist/modules/helpers.d.ts +3 -15
- package/dist/modules/helpers.d.ts.map +1 -1
- package/dist/modules/helpers.js +3 -15
- package/dist/modules/index.d.ts +0 -1
- package/dist/modules/index.d.ts.map +1 -1
- package/dist/modules/index.js +1 -1
- package/dist/services/ThemeService.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quvel.d.ts","sourceRoot":"","sources":["../../src/config/quvel.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAItE,OAAO,EAAqB,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAI7F;;GAEG;AACH,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAErF;;GAEG;AACH,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,GAAG,WAAW,
|
|
1
|
+
{"version":3,"file":"quvel.d.ts","sourceRoot":"","sources":["../../src/config/quvel.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAItE,OAAO,EAAqB,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAI7F;;GAEG;AACH,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAErF;;GAEG;AACH,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,GAAG,WAAW,CA4CvE"}
|
package/dist/config/quvel.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { defineQuvelModule } from '../module.js';
|
|
7
7
|
import { I18nService } from '../services/I18nService.js';
|
|
8
8
|
import { ValidationService, DEFAULT_LOCALE_MAPPING } from '../services/ValidationService.js';
|
|
9
|
-
import { getTranslations } from '../modules/
|
|
9
|
+
import { getTranslations, getRoutes, getServices } from '../modules/helpers.js';
|
|
10
10
|
import { getSupportedLocales } from './i18n.js';
|
|
11
11
|
/**
|
|
12
12
|
* Re-export DEFAULT_LOCALE_MAPPING for convenience
|
|
@@ -55,5 +55,14 @@ export function defineQuvelConfig(config) {
|
|
|
55
55
|
modules: allModules,
|
|
56
56
|
messages,
|
|
57
57
|
localeMapping: resolvedLocaleMapping,
|
|
58
|
+
getRoutes() {
|
|
59
|
+
return getRoutes(allModules);
|
|
60
|
+
},
|
|
61
|
+
getServices() {
|
|
62
|
+
return getServices(allModules);
|
|
63
|
+
},
|
|
64
|
+
getTranslations(locale) {
|
|
65
|
+
return getTranslations(allModules, locale);
|
|
66
|
+
},
|
|
58
67
|
};
|
|
59
68
|
}
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Type definitions for the Quvel configuration system
|
|
5
5
|
*/
|
|
6
|
-
import type {
|
|
6
|
+
import type { RouteRecordRaw } from 'vue-router';
|
|
7
|
+
import type { Module, ServiceRegistry } from '../modules/types.js';
|
|
7
8
|
/**
|
|
8
9
|
* Locale mapping configuration for validation
|
|
9
10
|
* Maps i18n locale codes to Zod locale codes
|
|
@@ -44,7 +45,7 @@ export interface QuvelConfigInput {
|
|
|
44
45
|
*/
|
|
45
46
|
export interface QuvelConfig {
|
|
46
47
|
/**
|
|
47
|
-
* All modules
|
|
48
|
+
* All modules
|
|
48
49
|
*/
|
|
49
50
|
modules: Module[];
|
|
50
51
|
/**
|
|
@@ -55,5 +56,17 @@ export interface QuvelConfig {
|
|
|
55
56
|
* Locale mapping for validation
|
|
56
57
|
*/
|
|
57
58
|
localeMapping: LocaleMapping;
|
|
59
|
+
/**
|
|
60
|
+
* Get all routes from modules
|
|
61
|
+
*/
|
|
62
|
+
getRoutes(): RouteRecordRaw[];
|
|
63
|
+
/**
|
|
64
|
+
* Get all services from modules
|
|
65
|
+
*/
|
|
66
|
+
getServices(): ServiceRegistry;
|
|
67
|
+
/**
|
|
68
|
+
* Get translations for a specific locale from all modules
|
|
69
|
+
*/
|
|
70
|
+
getTranslations(locale: string): Record<string, unknown>;
|
|
58
71
|
}
|
|
59
72
|
//# sourceMappingURL=quvel.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quvel.types.d.ts","sourceRoot":"","sources":["../../src/config/quvel.types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"quvel.types.d.ts","sourceRoot":"","sources":["../../src/config/quvel.types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEnE;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;CAC9B;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnB;;;OAGG;IACH,aAAa,CAAC,EAAE,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,IAAI,IAAI,IAAI,WAAW,CAEtB;IAED,IAAI,UAAU,IAAI,iBAAiB,CAElC;IAED,IAAI,IAAI;;2BA1LP,CAAF;;;;;;MA8LE;IAED,IAAI,EAAE,IAAI,gBAAgB,CAEzB;IAED,IAAI,KAAK,IAAI,YAAY,CAExB;CACF"}
|
|
@@ -67,7 +67,7 @@ export class ServiceContainer {
|
|
|
67
67
|
/**
|
|
68
68
|
* Retrieves a service by its class
|
|
69
69
|
*/
|
|
70
|
-
get(ServiceClass) {
|
|
70
|
+
get = (ServiceClass) => {
|
|
71
71
|
const key = this.serviceClassToKey.get(ServiceClass);
|
|
72
72
|
if (key && this.services.has(key)) {
|
|
73
73
|
return this.services.get(key);
|
|
@@ -81,7 +81,7 @@ export class ServiceContainer {
|
|
|
81
81
|
this.registerService(name, instance);
|
|
82
82
|
this.bootService(name, instance);
|
|
83
83
|
return instance;
|
|
84
|
-
}
|
|
84
|
+
};
|
|
85
85
|
/**
|
|
86
86
|
* Get a service by name
|
|
87
87
|
*/
|
|
@@ -2,29 +2,17 @@ import type { RouteRecordRaw } from 'vue-router';
|
|
|
2
2
|
import type { Module, ServiceRegistry } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Get all routes from modules
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* ```ts
|
|
8
|
-
* const routes = getRoutes(modules);
|
|
9
|
-
* ```
|
|
5
|
+
* @internal - Use config.getRoutes() instead
|
|
10
6
|
*/
|
|
11
7
|
export declare function getRoutes(modules: Module[]): RouteRecordRaw[];
|
|
12
8
|
/**
|
|
13
9
|
* Get all services from modules
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```ts
|
|
17
|
-
* const services = getServices(modules);
|
|
18
|
-
* ```
|
|
10
|
+
* @internal - Use config.getServices() instead
|
|
19
11
|
*/
|
|
20
12
|
export declare function getServices(modules: Module[]): ServiceRegistry;
|
|
21
13
|
/**
|
|
22
14
|
* Get translations for a specific locale from all modules
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* ```ts
|
|
26
|
-
* const translations = getTranslations(modules, 'en-US');
|
|
27
|
-
* ```
|
|
15
|
+
* @internal - Use config.getTranslations(locale) instead
|
|
28
16
|
*/
|
|
29
17
|
export declare function getTranslations(modules: Module[], locale: string): Record<string, unknown>;
|
|
30
18
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/modules/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EACV,MAAM,EACN,eAAe,EAChB,MAAM,YAAY,CAAC;AAEpB
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/modules/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EACV,MAAM,EACN,eAAe,EAChB,MAAM,YAAY,CAAC;AAEpB;;;GAGG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,cAAc,EAAE,CAE7D;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,eAAe,CAU9D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EAAE,EACjB,MAAM,EAAE,MAAM,GACb,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAUzB"}
|
package/dist/modules/helpers.js
CHANGED
|
@@ -1,21 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Get all routes from modules
|
|
3
|
-
*
|
|
4
|
-
* @example
|
|
5
|
-
* ```ts
|
|
6
|
-
* const routes = getRoutes(modules);
|
|
7
|
-
* ```
|
|
3
|
+
* @internal - Use config.getRoutes() instead
|
|
8
4
|
*/
|
|
9
5
|
export function getRoutes(modules) {
|
|
10
6
|
return modules.flatMap((module) => module.routes || []);
|
|
11
7
|
}
|
|
12
8
|
/**
|
|
13
9
|
* Get all services from modules
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```ts
|
|
17
|
-
* const services = getServices(modules);
|
|
18
|
-
* ```
|
|
10
|
+
* @internal - Use config.getServices() instead
|
|
19
11
|
*/
|
|
20
12
|
export function getServices(modules) {
|
|
21
13
|
const merged = {};
|
|
@@ -28,11 +20,7 @@ export function getServices(modules) {
|
|
|
28
20
|
}
|
|
29
21
|
/**
|
|
30
22
|
* Get translations for a specific locale from all modules
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* ```ts
|
|
34
|
-
* const translations = getTranslations(modules, 'en-US');
|
|
35
|
-
* ```
|
|
23
|
+
* @internal - Use config.getTranslations(locale) instead
|
|
36
24
|
*/
|
|
37
25
|
export function getTranslations(modules, locale) {
|
|
38
26
|
const merged = {};
|
package/dist/modules/index.d.ts
CHANGED
|
@@ -3,6 +3,5 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Helpers for defining and aggregating module resources.
|
|
5
5
|
*/
|
|
6
|
-
export { getRoutes, getServices, getTranslations, } from './helpers.js';
|
|
7
6
|
export type { Module, ModuleLoader, ServiceRegistry, TranslationRegistry, ModuleBuildConfig, BootFileConfig, ServiceClass, QuasarContext, } from './types.js';
|
|
8
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EACV,MAAM,EACN,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,YAAY,EACZ,aAAa,GACd,MAAM,YAAY,CAAC"}
|
package/dist/modules/index.js
CHANGED
|
@@ -40,7 +40,7 @@ export class ThemeService extends Service {
|
|
|
40
40
|
if (userTheme && themeOptions.includes(userTheme)) {
|
|
41
41
|
return userTheme;
|
|
42
42
|
}
|
|
43
|
-
return
|
|
43
|
+
return 'light';
|
|
44
44
|
}
|
|
45
45
|
return 'light';
|
|
46
46
|
}
|