@lukso/core 0.1.0-dev.0f1bea5
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/LICENSE +201 -0
- package/README.md +159 -0
- package/dist/chunk-3WGYJTN4.js +19 -0
- package/dist/chunk-3WGYJTN4.js.map +1 -0
- package/dist/chunk-4TNWG4ME.js +106 -0
- package/dist/chunk-4TNWG4ME.js.map +1 -0
- package/dist/chunk-AMRGSLR5.cjs +1 -0
- package/dist/chunk-AMRGSLR5.cjs.map +1 -0
- package/dist/chunk-CC3LFUYY.cjs +19 -0
- package/dist/chunk-CC3LFUYY.cjs.map +1 -0
- package/dist/chunk-DFMMMF62.cjs +1 -0
- package/dist/chunk-DFMMMF62.cjs.map +1 -0
- package/dist/chunk-DKEXQFNE.js +1 -0
- package/dist/chunk-DKEXQFNE.js.map +1 -0
- package/dist/chunk-DKXHVRHM.js +84 -0
- package/dist/chunk-DKXHVRHM.js.map +1 -0
- package/dist/chunk-FR74YPGJ.cjs +87 -0
- package/dist/chunk-FR74YPGJ.cjs.map +1 -0
- package/dist/chunk-LEL6VWU4.js +1 -0
- package/dist/chunk-LEL6VWU4.js.map +1 -0
- package/dist/chunk-MBIRTPNM.cjs +84 -0
- package/dist/chunk-MBIRTPNM.cjs.map +1 -0
- package/dist/chunk-NJQVWIZL.cjs +49 -0
- package/dist/chunk-NJQVWIZL.cjs.map +1 -0
- package/dist/chunk-RM42NG7E.cjs +106 -0
- package/dist/chunk-RM42NG7E.cjs.map +1 -0
- package/dist/chunk-SV4TVR2K.js +87 -0
- package/dist/chunk-SV4TVR2K.js.map +1 -0
- package/dist/chunk-X2QNFZU7.js +49 -0
- package/dist/chunk-X2QNFZU7.js.map +1 -0
- package/dist/index.cjs +37 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +37 -0
- package/dist/index.js.map +1 -0
- package/dist/mixins/device.cjs +8 -0
- package/dist/mixins/device.cjs.map +1 -0
- package/dist/mixins/device.d.cts +34 -0
- package/dist/mixins/device.d.ts +34 -0
- package/dist/mixins/device.js +8 -0
- package/dist/mixins/device.js.map +1 -0
- package/dist/mixins/index.cjs +14 -0
- package/dist/mixins/index.cjs.map +1 -0
- package/dist/mixins/index.d.cts +3 -0
- package/dist/mixins/index.d.ts +3 -0
- package/dist/mixins/index.js +14 -0
- package/dist/mixins/index.js.map +1 -0
- package/dist/mixins/intl.cjs +8 -0
- package/dist/mixins/intl.cjs.map +1 -0
- package/dist/mixins/intl.d.cts +37 -0
- package/dist/mixins/intl.d.ts +37 -0
- package/dist/mixins/intl.js +8 -0
- package/dist/mixins/intl.js.map +1 -0
- package/dist/services/device.cjs +7 -0
- package/dist/services/device.cjs.map +1 -0
- package/dist/services/device.d.cts +71 -0
- package/dist/services/device.d.ts +71 -0
- package/dist/services/device.js +7 -0
- package/dist/services/device.js.map +1 -0
- package/dist/services/index.cjs +20 -0
- package/dist/services/index.cjs.map +1 -0
- package/dist/services/index.d.cts +4 -0
- package/dist/services/index.d.ts +4 -0
- package/dist/services/index.js +20 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/intl.cjs +15 -0
- package/dist/services/intl.cjs.map +1 -0
- package/dist/services/intl.d.cts +170 -0
- package/dist/services/intl.d.ts +170 -0
- package/dist/services/intl.js +15 -0
- package/dist/services/intl.js.map +1 -0
- package/dist/utils/index.cjs +11 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.d.cts +32 -0
- package/dist/utils/index.d.ts +32 -0
- package/dist/utils/index.js +11 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +114 -0
- package/src/index.ts +10 -0
- package/src/mixins/__tests__/device.spec.ts +119 -0
- package/src/mixins/__tests__/intl.spec.ts +198 -0
- package/src/mixins/device.ts +48 -0
- package/src/mixins/index.ts +8 -0
- package/src/mixins/intl.ts +112 -0
- package/src/services/__tests__/device.spec.ts +36 -0
- package/src/services/__tests__/intl.spec.ts +536 -0
- package/src/services/device.ts +121 -0
- package/src/services/index.ts +17 -0
- package/src/services/intl.ts +326 -0
- package/src/utils/__tests__/browserInfo.spec.ts +310 -0
- package/src/utils/__tests__/slug.spec.ts +26 -0
- package/src/utils/browserInfo.ts +102 -0
- package/src/utils/index.ts +4 -0
- package/src/utils/slug.ts +13 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import "./chunk-DKEXQFNE.js";
|
|
2
|
+
import {
|
|
3
|
+
withDeviceService
|
|
4
|
+
} from "./chunk-3WGYJTN4.js";
|
|
5
|
+
import {
|
|
6
|
+
withIntlService
|
|
7
|
+
} from "./chunk-SV4TVR2K.js";
|
|
8
|
+
import "./chunk-LEL6VWU4.js";
|
|
9
|
+
import {
|
|
10
|
+
deviceService
|
|
11
|
+
} from "./chunk-X2QNFZU7.js";
|
|
12
|
+
import {
|
|
13
|
+
clearIntlService,
|
|
14
|
+
createIntlService,
|
|
15
|
+
defaultConfig,
|
|
16
|
+
getIntlService,
|
|
17
|
+
setIntlService
|
|
18
|
+
} from "./chunk-4TNWG4ME.js";
|
|
19
|
+
import {
|
|
20
|
+
EXTENSION_STORE_LINKS,
|
|
21
|
+
browserInfo,
|
|
22
|
+
slug
|
|
23
|
+
} from "./chunk-DKXHVRHM.js";
|
|
24
|
+
export {
|
|
25
|
+
EXTENSION_STORE_LINKS,
|
|
26
|
+
browserInfo,
|
|
27
|
+
clearIntlService,
|
|
28
|
+
createIntlService,
|
|
29
|
+
defaultConfig,
|
|
30
|
+
deviceService,
|
|
31
|
+
getIntlService,
|
|
32
|
+
setIntlService,
|
|
33
|
+
slug,
|
|
34
|
+
withDeviceService,
|
|
35
|
+
withIntlService
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkCC3LFUYYcjs = require('../chunk-CC3LFUYY.cjs');
|
|
4
|
+
require('../chunk-NJQVWIZL.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
exports.withDeviceService = _chunkCC3LFUYYcjs.withDeviceService;
|
|
8
|
+
//# sourceMappingURL=device.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/service-auth-simple/service-auth-simple/packages/core/dist/mixins/device.cjs"],"names":[],"mappings":"AAAA;AACE;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACF,gEAAC","file":"/home/runner/work/service-auth-simple/service-auth-simple/packages/core/dist/mixins/device.cjs"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Device Detection Mixin
|
|
5
|
+
*
|
|
6
|
+
* Mixin to add device detection service to a Lit component
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Mixin to add device detection service to a Lit component
|
|
11
|
+
*
|
|
12
|
+
* Provides a `device` property with device/OS/browser detection capabilities.
|
|
13
|
+
* The device service is initialized in connectedCallback and follows component lifecycle.
|
|
14
|
+
*
|
|
15
|
+
* @typeParam T - The Lit component class being extended
|
|
16
|
+
* @returns Extended class with device detection capabilities
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* import { LitElement } from 'lit';
|
|
21
|
+
* import { customElement } from 'lit/decorators.js';
|
|
22
|
+
* import { withDeviceService } from '@lukso/core/mixins';
|
|
23
|
+
*
|
|
24
|
+
* @customElement('my-component')
|
|
25
|
+
* export class MyComponent extends withDeviceService(LitElement) {
|
|
26
|
+
* render() {
|
|
27
|
+
* return html\`Device is mobile: \${this.device?.isMobile}\`;
|
|
28
|
+
* }
|
|
29
|
+
* }
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
declare function withDeviceService<T extends typeof LitElement>(Base: T): any;
|
|
33
|
+
|
|
34
|
+
export { withDeviceService };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Device Detection Mixin
|
|
5
|
+
*
|
|
6
|
+
* Mixin to add device detection service to a Lit component
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Mixin to add device detection service to a Lit component
|
|
11
|
+
*
|
|
12
|
+
* Provides a `device` property with device/OS/browser detection capabilities.
|
|
13
|
+
* The device service is initialized in connectedCallback and follows component lifecycle.
|
|
14
|
+
*
|
|
15
|
+
* @typeParam T - The Lit component class being extended
|
|
16
|
+
* @returns Extended class with device detection capabilities
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* import { LitElement } from 'lit';
|
|
21
|
+
* import { customElement } from 'lit/decorators.js';
|
|
22
|
+
* import { withDeviceService } from '@lukso/core/mixins';
|
|
23
|
+
*
|
|
24
|
+
* @customElement('my-component')
|
|
25
|
+
* export class MyComponent extends withDeviceService(LitElement) {
|
|
26
|
+
* render() {
|
|
27
|
+
* return html\`Device is mobile: \${this.device?.isMobile}\`;
|
|
28
|
+
* }
|
|
29
|
+
* }
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
declare function withDeviceService<T extends typeof LitElement>(Base: T): any;
|
|
33
|
+
|
|
34
|
+
export { withDeviceService };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-AMRGSLR5.cjs');
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkCC3LFUYYcjs = require('../chunk-CC3LFUYY.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunkFR74YPGJcjs = require('../chunk-FR74YPGJ.cjs');
|
|
8
|
+
require('../chunk-NJQVWIZL.cjs');
|
|
9
|
+
require('../chunk-RM42NG7E.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
exports.withDeviceService = _chunkCC3LFUYYcjs.withDeviceService; exports.withIntlService = _chunkFR74YPGJcjs.withIntlService;
|
|
14
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/service-auth-simple/service-auth-simple/packages/core/dist/mixins/index.cjs"],"names":[],"mappings":"AAAA,0GAA8B;AAC9B;AACE;AACF,yDAA8B;AAC9B;AACE;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACF,6HAAC","file":"/home/runner/work/service-auth-simple/service-auth-simple/packages/core/dist/mixins/index.cjs"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "../chunk-DKEXQFNE.js";
|
|
2
|
+
import {
|
|
3
|
+
withDeviceService
|
|
4
|
+
} from "../chunk-3WGYJTN4.js";
|
|
5
|
+
import {
|
|
6
|
+
withIntlService
|
|
7
|
+
} from "../chunk-SV4TVR2K.js";
|
|
8
|
+
import "../chunk-X2QNFZU7.js";
|
|
9
|
+
import "../chunk-4TNWG4ME.js";
|
|
10
|
+
export {
|
|
11
|
+
withDeviceService,
|
|
12
|
+
withIntlService
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkFR74YPGJcjs = require('../chunk-FR74YPGJ.cjs');
|
|
4
|
+
require('../chunk-RM42NG7E.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
exports.withIntlService = _chunkFR74YPGJcjs.withIntlService;
|
|
8
|
+
//# sourceMappingURL=intl.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/service-auth-simple/service-auth-simple/packages/core/dist/mixins/intl.cjs"],"names":[],"mappings":"AAAA;AACE;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACF,4DAAC","file":"/home/runner/work/service-auth-simple/service-auth-simple/packages/core/dist/mixins/intl.cjs"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Internationalization Mixin
|
|
5
|
+
*
|
|
6
|
+
* Mixin to add internationalization service to a Lit component
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Mixin to add internationalization service to a Lit component
|
|
11
|
+
*
|
|
12
|
+
* Provides access to the global intl service with reactive locale changes.
|
|
13
|
+
* Automatically subscribes to locale changes and triggers re-renders.
|
|
14
|
+
*
|
|
15
|
+
* The component will use the global intl service if available, or create a local one.
|
|
16
|
+
* This follows the singleton pattern for the global service while allowing flexibility.
|
|
17
|
+
*
|
|
18
|
+
* @typeParam T - The Lit component class being extended
|
|
19
|
+
* @returns Extended class with intl service capabilities
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```typescript
|
|
23
|
+
* import { LitElement, html } from 'lit';
|
|
24
|
+
* import { customElement } from 'lit/decorators.js';
|
|
25
|
+
* import { withIntlService } from '@lukso/core/mixins';
|
|
26
|
+
*
|
|
27
|
+
* @customElement('my-component')
|
|
28
|
+
* export class MyComponent extends withIntlService(LitElement) {
|
|
29
|
+
* render() {
|
|
30
|
+
* return html\`<p>\${this.formatMessage('app.welcome')}</p>\`;
|
|
31
|
+
* }
|
|
32
|
+
* }
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
declare function withIntlService<T extends typeof LitElement>(Base: T): any;
|
|
36
|
+
|
|
37
|
+
export { withIntlService };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Internationalization Mixin
|
|
5
|
+
*
|
|
6
|
+
* Mixin to add internationalization service to a Lit component
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Mixin to add internationalization service to a Lit component
|
|
11
|
+
*
|
|
12
|
+
* Provides access to the global intl service with reactive locale changes.
|
|
13
|
+
* Automatically subscribes to locale changes and triggers re-renders.
|
|
14
|
+
*
|
|
15
|
+
* The component will use the global intl service if available, or create a local one.
|
|
16
|
+
* This follows the singleton pattern for the global service while allowing flexibility.
|
|
17
|
+
*
|
|
18
|
+
* @typeParam T - The Lit component class being extended
|
|
19
|
+
* @returns Extended class with intl service capabilities
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```typescript
|
|
23
|
+
* import { LitElement, html } from 'lit';
|
|
24
|
+
* import { customElement } from 'lit/decorators.js';
|
|
25
|
+
* import { withIntlService } from '@lukso/core/mixins';
|
|
26
|
+
*
|
|
27
|
+
* @customElement('my-component')
|
|
28
|
+
* export class MyComponent extends withIntlService(LitElement) {
|
|
29
|
+
* render() {
|
|
30
|
+
* return html\`<p>\${this.formatMessage('app.welcome')}</p>\`;
|
|
31
|
+
* }
|
|
32
|
+
* }
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
declare function withIntlService<T extends typeof LitElement>(Base: T): any;
|
|
36
|
+
|
|
37
|
+
export { withIntlService };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/service-auth-simple/service-auth-simple/packages/core/dist/services/device.cjs"],"names":[],"mappings":"AAAA;AACE;AACF,yDAA8B;AAC9B;AACE;AACF,wDAAC","file":"/home/runner/work/service-auth-simple/service-auth-simple/packages/core/dist/services/device.cjs"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { UAParser } from 'ua-parser-js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Device Detection Service
|
|
5
|
+
*
|
|
6
|
+
* Provides device type, OS, and browser detection using ua-parser-js
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Device detection flags and utilities
|
|
11
|
+
*/
|
|
12
|
+
interface DeviceService {
|
|
13
|
+
/**
|
|
14
|
+
* Device type detection flags
|
|
15
|
+
*/
|
|
16
|
+
isMobile: boolean;
|
|
17
|
+
isTablet: boolean;
|
|
18
|
+
isDesktop: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Operating system detection flags
|
|
21
|
+
*/
|
|
22
|
+
isIOS: boolean;
|
|
23
|
+
isAndroid: boolean;
|
|
24
|
+
isWindows: boolean;
|
|
25
|
+
isMacOS: boolean;
|
|
26
|
+
isLinux: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Browser detection flags
|
|
29
|
+
*/
|
|
30
|
+
isChrome: boolean;
|
|
31
|
+
isSafari: boolean;
|
|
32
|
+
isFirefox: boolean;
|
|
33
|
+
isEdge: boolean;
|
|
34
|
+
isOpera: boolean;
|
|
35
|
+
isBrave: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Get raw parser result for additional details
|
|
38
|
+
* @returns Full UAParser result object
|
|
39
|
+
*/
|
|
40
|
+
getRaw: () => ReturnType<UAParser['getResult']>;
|
|
41
|
+
/**
|
|
42
|
+
* Signal that tracks device detector initialization
|
|
43
|
+
* Useful for reactivity in web components
|
|
44
|
+
*/
|
|
45
|
+
initialized: {
|
|
46
|
+
value: number;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
interface NavigatorExtended extends Navigator {
|
|
50
|
+
brave?: unknown;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Create a new device detector instance
|
|
54
|
+
*
|
|
55
|
+
* @param navigator - Optional custom navigator object (uses global navigator by default)
|
|
56
|
+
* @returns DeviceService instance with device/OS/browser detection
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```typescript
|
|
60
|
+
* import { deviceService } from '@lukso/core/services/device';
|
|
61
|
+
*
|
|
62
|
+
* const device = deviceService();
|
|
63
|
+
*
|
|
64
|
+
* if (device.isMobile) {
|
|
65
|
+
* console.log('User is on mobile');
|
|
66
|
+
* }
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
declare function deviceService(navigator?: NavigatorExtended): DeviceService;
|
|
70
|
+
|
|
71
|
+
export { type DeviceService, type NavigatorExtended, deviceService };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { UAParser } from 'ua-parser-js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Device Detection Service
|
|
5
|
+
*
|
|
6
|
+
* Provides device type, OS, and browser detection using ua-parser-js
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Device detection flags and utilities
|
|
11
|
+
*/
|
|
12
|
+
interface DeviceService {
|
|
13
|
+
/**
|
|
14
|
+
* Device type detection flags
|
|
15
|
+
*/
|
|
16
|
+
isMobile: boolean;
|
|
17
|
+
isTablet: boolean;
|
|
18
|
+
isDesktop: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Operating system detection flags
|
|
21
|
+
*/
|
|
22
|
+
isIOS: boolean;
|
|
23
|
+
isAndroid: boolean;
|
|
24
|
+
isWindows: boolean;
|
|
25
|
+
isMacOS: boolean;
|
|
26
|
+
isLinux: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Browser detection flags
|
|
29
|
+
*/
|
|
30
|
+
isChrome: boolean;
|
|
31
|
+
isSafari: boolean;
|
|
32
|
+
isFirefox: boolean;
|
|
33
|
+
isEdge: boolean;
|
|
34
|
+
isOpera: boolean;
|
|
35
|
+
isBrave: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Get raw parser result for additional details
|
|
38
|
+
* @returns Full UAParser result object
|
|
39
|
+
*/
|
|
40
|
+
getRaw: () => ReturnType<UAParser['getResult']>;
|
|
41
|
+
/**
|
|
42
|
+
* Signal that tracks device detector initialization
|
|
43
|
+
* Useful for reactivity in web components
|
|
44
|
+
*/
|
|
45
|
+
initialized: {
|
|
46
|
+
value: number;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
interface NavigatorExtended extends Navigator {
|
|
50
|
+
brave?: unknown;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Create a new device detector instance
|
|
54
|
+
*
|
|
55
|
+
* @param navigator - Optional custom navigator object (uses global navigator by default)
|
|
56
|
+
* @returns DeviceService instance with device/OS/browser detection
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```typescript
|
|
60
|
+
* import { deviceService } from '@lukso/core/services/device';
|
|
61
|
+
*
|
|
62
|
+
* const device = deviceService();
|
|
63
|
+
*
|
|
64
|
+
* if (device.isMobile) {
|
|
65
|
+
* console.log('User is on mobile');
|
|
66
|
+
* }
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
declare function deviceService(navigator?: NavigatorExtended): DeviceService;
|
|
70
|
+
|
|
71
|
+
export { type DeviceService, type NavigatorExtended, deviceService };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-DFMMMF62.cjs');
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkNJQVWIZLcjs = require('../chunk-NJQVWIZL.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
var _chunkRM42NG7Ecjs = require('../chunk-RM42NG7E.cjs');
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
exports.clearIntlService = _chunkRM42NG7Ecjs.clearIntlService; exports.createIntlService = _chunkRM42NG7Ecjs.createIntlService; exports.defaultConfig = _chunkRM42NG7Ecjs.defaultConfig; exports.deviceService = _chunkNJQVWIZLcjs.deviceService; exports.getIntlService = _chunkRM42NG7Ecjs.getIntlService; exports.setIntlService = _chunkRM42NG7Ecjs.setIntlService;
|
|
20
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/service-auth-simple/service-auth-simple/packages/core/dist/services/index.cjs"],"names":[],"mappings":"AAAA,0GAA8B;AAC9B;AACE;AACF,yDAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,uWAAC","file":"/home/runner/work/service-auth-simple/service-auth-simple/packages/core/dist/services/index.cjs"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import "../chunk-LEL6VWU4.js";
|
|
2
|
+
import {
|
|
3
|
+
deviceService
|
|
4
|
+
} from "../chunk-X2QNFZU7.js";
|
|
5
|
+
import {
|
|
6
|
+
clearIntlService,
|
|
7
|
+
createIntlService,
|
|
8
|
+
defaultConfig,
|
|
9
|
+
getIntlService,
|
|
10
|
+
setIntlService
|
|
11
|
+
} from "../chunk-4TNWG4ME.js";
|
|
12
|
+
export {
|
|
13
|
+
clearIntlService,
|
|
14
|
+
createIntlService,
|
|
15
|
+
defaultConfig,
|
|
16
|
+
deviceService,
|
|
17
|
+
getIntlService,
|
|
18
|
+
setIntlService
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunkRM42NG7Ecjs = require('../chunk-RM42NG7E.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
exports.clearIntlService = _chunkRM42NG7Ecjs.clearIntlService; exports.createIntlService = _chunkRM42NG7Ecjs.createIntlService; exports.defaultConfig = _chunkRM42NG7Ecjs.defaultConfig; exports.getIntlService = _chunkRM42NG7Ecjs.getIntlService; exports.setIntlService = _chunkRM42NG7Ecjs.setIntlService;
|
|
15
|
+
//# sourceMappingURL=intl.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/service-auth-simple/service-auth-simple/packages/core/dist/services/intl.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACF,8SAAC","file":"/home/runner/work/service-auth-simple/service-auth-simple/packages/core/dist/services/intl.cjs"}
|