@lukso/core 1.3.0 → 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.
- package/dist/{chunk-YZZF3DXX.cjs → chunk-P3OUBU4I.cjs} +4 -2
- package/dist/chunk-P3OUBU4I.cjs.map +1 -0
- package/dist/{chunk-UQCGHU37.js → chunk-VODIIQT4.js} +4 -2
- package/dist/{chunk-UQCGHU37.js.map → chunk-VODIIQT4.js.map} +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/mixins/index.cjs +2 -2
- package/dist/mixins/index.js +1 -1
- package/dist/mixins/intl.cjs +2 -2
- package/dist/mixins/intl.js +1 -1
- package/package.json +2 -2
- package/translations/de_DE.json +3 -1
- package/translations/en_US.json +3 -1
- package/dist/chunk-YZZF3DXX.cjs.map +0 -1
|
@@ -27,7 +27,9 @@ var en_US_default = {
|
|
|
27
27
|
connect_modal_description: "Log in with your Universal Profile",
|
|
28
28
|
connect_modal_connectors_up_mobile: "Mobile Application",
|
|
29
29
|
connect_modal_connectors_up_browser_extension: "Browser Extension",
|
|
30
|
-
connect_modal_connectors_passkey_wallet: "Passkey Wallet"
|
|
30
|
+
connect_modal_connectors_passkey_wallet: "Passkey Wallet",
|
|
31
|
+
connect_modal_close: "Close modal",
|
|
32
|
+
connect_modal_go_back: "Go back"
|
|
31
33
|
};
|
|
32
34
|
|
|
33
35
|
// src/mixins/intl.ts
|
|
@@ -88,4 +90,4 @@ function withIntlService(Base) {
|
|
|
88
90
|
|
|
89
91
|
|
|
90
92
|
exports.withIntlService = withIntlService;
|
|
91
|
-
//# sourceMappingURL=chunk-
|
|
93
|
+
//# sourceMappingURL=chunk-P3OUBU4I.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/service-auth-simple/service-auth-simple/packages/core/dist/chunk-P3OUBU4I.cjs","../src/mixins/intl.ts","../translations/en_US.json"],"names":[],"mappings":"AA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dist/chunk-P3OUBU4I.cjs","sourcesContent":[null,"/**\n * Internationalization Mixin\n *\n * Mixin to add internationalization service to a Lit component\n */\n\nimport { effect } from '@preact/signals-core'\nimport type { LitElement } from 'lit'\nimport englishTranslations from '../../translations/en_US.json'\nimport {\n createIntlService,\n defaultConfig,\n getIntlService,\n type IntlService,\n setIntlService,\n} from '../services/intl.js'\n\n/**\n * Interface for components that have intl service capabilities\n */\nexport interface IntlServiceMixin {\n formatMessage(key?: string, options?: Record<string, string>): string\n setupLocalIntl(): IntlService | undefined\n}\n\n/**\n * Type helper for the constructor returned by withIntlService\n */\nexport type IntlServiceMixinConstructor<T extends typeof LitElement> = (new (\n ...args: any[]\n) => InstanceType<T> & IntlServiceMixin) &\n T\n\n/**\n * Mixin to add internationalization service to a Lit component\n *\n * Provides access to the global intl service with reactive locale changes.\n * Automatically subscribes to locale changes and triggers re-renders.\n *\n * The component will use the global intl service if available, or create a local one.\n * This follows the singleton pattern for the global service while allowing flexibility.\n *\n * @typeParam T - The Lit component class being extended\n * @returns Extended class with intl service capabilities\n *\n * @example\n * ```typescript\n * import { LitElement, html } from 'lit';\n * import { customElement } from 'lit/decorators.js';\n * import { withIntlService } from '@lukso/core/mixins';\n *\n * @customElement('my-component')\n * export class MyComponent extends withIntlService(LitElement) {\n * render() {\n * return html\\`<p>\\${this.formatMessage('app.welcome')}</p>\\`;\n * }\n * }\n * ```\n */\nexport function withIntlService<T extends typeof LitElement>(\n Base: T\n): IntlServiceMixinConstructor<T> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n class Mixin extends (Base as any) {\n protected unsubscribeIntl: (() => void) | undefined = undefined\n\n connectedCallback(): void {\n super.connectedCallback()\n\n // Subscribe to intl changes via signal\n let intl: IntlService | null = getIntlService()\n\n // When no intl is provided by host app we initialize our own\n if (!intl) {\n intl = this.setupLocalIntl() ?? null\n }\n\n if (intl) {\n this.unsubscribeIntl = effect(() => {\n // Access the signal to track changes\n intl?.localeChanged.value\n this.requestUpdate()\n })\n }\n\n // Set fallback for missing translations\n intl?.setFallbackTranslations(englishTranslations as any)\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback()\n\n // Unsubscribe from intl changes\n if (typeof this.unsubscribeIntl === 'function') {\n this.unsubscribeIntl()\n }\n }\n\n /**\n * Setup a local intl service with default configuration\n * Subclasses can override this to customize initialization\n */\n protected setupLocalIntl(): IntlService | undefined {\n const intlService = createIntlService(\n Object.assign(defaultConfig, {\n messages: englishTranslations,\n })\n )\n setIntlService(intlService)\n return intlService\n }\n\n /**\n * Format message using the intl service\n */\n formatMessage(key?: string, options?: Record<string, string>): string {\n if (!key) {\n console.warn('No translation key provided to formatMessage')\n return ''\n }\n\n const intl = getIntlService()\n return intl?.formatMessage(key, options) ?? key\n }\n }\n\n return Mixin as unknown as IntlServiceMixinConstructor<T>\n}\n","{\n \"sign_up_modal_use_mobile\": \"Install the Mobile Application\",\n \"sign_up_modal_title\": \"Create Universal Profile!\",\n \"sign_up_modal_install_extension\": \"Install the Browser Extension\",\n \"sign_up_modal_description\": \"Choose the device on which you want to create a profile. You can use either to interact with supported apps\",\n \"connect_modal_try_again\": \"Try again\",\n \"connect_modal_title\": \"Let’s log you in\",\n \"connect_modal_qr_code_title\": \"Scan to log in\",\n \"connect_modal_qr_code_description\": \"Scan the below QR code with the Universal Profile mobile app to log in\",\n \"connect_modal_other_connectors\": \"Connect Wallet\",\n \"connect_modal_or_info\": \"Log in with a different wallet\",\n \"connect_modal_or\": \"Or\",\n \"connect_modal_installed\": \"INSTALLED\",\n \"connect_modal_failed_to_load\": \"Failed to load...\",\n \"connect_modal_eoa_title\": \"Connect your Wallet\",\n \"connect_modal_description\": \"Log in with your Universal Profile\",\n \"connect_modal_connectors_up_mobile\": \"Mobile Application\",\n \"connect_modal_connectors_up_browser_extension\": \"Browser Extension\",\n \"connect_modal_connectors_passkey_wallet\": \"Passkey Wallet\",\n \"connect_modal_close\": \"Close modal\",\n \"connect_modal_go_back\": \"Go back\"\n}"]}
|
|
@@ -27,7 +27,9 @@ var en_US_default = {
|
|
|
27
27
|
connect_modal_description: "Log in with your Universal Profile",
|
|
28
28
|
connect_modal_connectors_up_mobile: "Mobile Application",
|
|
29
29
|
connect_modal_connectors_up_browser_extension: "Browser Extension",
|
|
30
|
-
connect_modal_connectors_passkey_wallet: "Passkey Wallet"
|
|
30
|
+
connect_modal_connectors_passkey_wallet: "Passkey Wallet",
|
|
31
|
+
connect_modal_close: "Close modal",
|
|
32
|
+
connect_modal_go_back: "Go back"
|
|
31
33
|
};
|
|
32
34
|
|
|
33
35
|
// src/mixins/intl.ts
|
|
@@ -88,4 +90,4 @@ function withIntlService(Base) {
|
|
|
88
90
|
export {
|
|
89
91
|
withIntlService
|
|
90
92
|
};
|
|
91
|
-
//# sourceMappingURL=chunk-
|
|
93
|
+
//# sourceMappingURL=chunk-VODIIQT4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/mixins/intl.ts","../translations/en_US.json"],"sourcesContent":["/**\n * Internationalization Mixin\n *\n * Mixin to add internationalization service to a Lit component\n */\n\nimport { effect } from '@preact/signals-core'\nimport type { LitElement } from 'lit'\nimport englishTranslations from '../../translations/en_US.json'\nimport {\n createIntlService,\n defaultConfig,\n getIntlService,\n type IntlService,\n setIntlService,\n} from '../services/intl.js'\n\n/**\n * Interface for components that have intl service capabilities\n */\nexport interface IntlServiceMixin {\n formatMessage(key?: string, options?: Record<string, string>): string\n setupLocalIntl(): IntlService | undefined\n}\n\n/**\n * Type helper for the constructor returned by withIntlService\n */\nexport type IntlServiceMixinConstructor<T extends typeof LitElement> = (new (\n ...args: any[]\n) => InstanceType<T> & IntlServiceMixin) &\n T\n\n/**\n * Mixin to add internationalization service to a Lit component\n *\n * Provides access to the global intl service with reactive locale changes.\n * Automatically subscribes to locale changes and triggers re-renders.\n *\n * The component will use the global intl service if available, or create a local one.\n * This follows the singleton pattern for the global service while allowing flexibility.\n *\n * @typeParam T - The Lit component class being extended\n * @returns Extended class with intl service capabilities\n *\n * @example\n * ```typescript\n * import { LitElement, html } from 'lit';\n * import { customElement } from 'lit/decorators.js';\n * import { withIntlService } from '@lukso/core/mixins';\n *\n * @customElement('my-component')\n * export class MyComponent extends withIntlService(LitElement) {\n * render() {\n * return html\\`<p>\\${this.formatMessage('app.welcome')}</p>\\`;\n * }\n * }\n * ```\n */\nexport function withIntlService<T extends typeof LitElement>(\n Base: T\n): IntlServiceMixinConstructor<T> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n class Mixin extends (Base as any) {\n protected unsubscribeIntl: (() => void) | undefined = undefined\n\n connectedCallback(): void {\n super.connectedCallback()\n\n // Subscribe to intl changes via signal\n let intl: IntlService | null = getIntlService()\n\n // When no intl is provided by host app we initialize our own\n if (!intl) {\n intl = this.setupLocalIntl() ?? null\n }\n\n if (intl) {\n this.unsubscribeIntl = effect(() => {\n // Access the signal to track changes\n intl?.localeChanged.value\n this.requestUpdate()\n })\n }\n\n // Set fallback for missing translations\n intl?.setFallbackTranslations(englishTranslations as any)\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback()\n\n // Unsubscribe from intl changes\n if (typeof this.unsubscribeIntl === 'function') {\n this.unsubscribeIntl()\n }\n }\n\n /**\n * Setup a local intl service with default configuration\n * Subclasses can override this to customize initialization\n */\n protected setupLocalIntl(): IntlService | undefined {\n const intlService = createIntlService(\n Object.assign(defaultConfig, {\n messages: englishTranslations,\n })\n )\n setIntlService(intlService)\n return intlService\n }\n\n /**\n * Format message using the intl service\n */\n formatMessage(key?: string, options?: Record<string, string>): string {\n if (!key) {\n console.warn('No translation key provided to formatMessage')\n return ''\n }\n\n const intl = getIntlService()\n return intl?.formatMessage(key, options) ?? key\n }\n }\n\n return Mixin as unknown as IntlServiceMixinConstructor<T>\n}\n","{\n \"sign_up_modal_use_mobile\": \"Install the Mobile Application\",\n \"sign_up_modal_title\": \"Create Universal Profile!\",\n \"sign_up_modal_install_extension\": \"Install the Browser Extension\",\n \"sign_up_modal_description\": \"Choose the device on which you want to create a profile. You can use either to interact with supported apps\",\n \"connect_modal_try_again\": \"Try again\",\n \"connect_modal_title\": \"Let’s log you in\",\n \"connect_modal_qr_code_title\": \"Scan to log in\",\n \"connect_modal_qr_code_description\": \"Scan the below QR code with the Universal Profile mobile app to log in\",\n \"connect_modal_other_connectors\": \"Connect Wallet\",\n \"connect_modal_or_info\": \"Log in with a different wallet\",\n \"connect_modal_or\": \"Or\",\n \"connect_modal_installed\": \"INSTALLED\",\n \"connect_modal_failed_to_load\": \"Failed to load...\",\n \"connect_modal_eoa_title\": \"Connect your Wallet\",\n \"connect_modal_description\": \"Log in with your Universal Profile\",\n \"connect_modal_connectors_up_mobile\": \"Mobile Application\",\n \"connect_modal_connectors_up_browser_extension\": \"Browser Extension\",\n \"connect_modal_connectors_passkey_wallet\": \"Passkey Wallet\"\n}"],"mappings":";;;;;;;;AAMA,SAAS,cAAc;;;ACNvB;AAAA,EACE,0BAA4B;AAAA,EAC5B,qBAAuB;AAAA,EACvB,iCAAmC;AAAA,EACnC,2BAA6B;AAAA,EAC7B,yBAA2B;AAAA,EAC3B,qBAAuB;AAAA,EACvB,6BAA+B;AAAA,EAC/B,mCAAqC;AAAA,EACrC,gCAAkC;AAAA,EAClC,uBAAyB;AAAA,EACzB,kBAAoB;AAAA,EACpB,yBAA2B;AAAA,EAC3B,8BAAgC;AAAA,EAChC,yBAA2B;AAAA,EAC3B,2BAA6B;AAAA,EAC7B,oCAAsC;AAAA,EACtC,+CAAiD;AAAA,EACjD,yCAA2C;
|
|
1
|
+
{"version":3,"sources":["../src/mixins/intl.ts","../translations/en_US.json"],"sourcesContent":["/**\n * Internationalization Mixin\n *\n * Mixin to add internationalization service to a Lit component\n */\n\nimport { effect } from '@preact/signals-core'\nimport type { LitElement } from 'lit'\nimport englishTranslations from '../../translations/en_US.json'\nimport {\n createIntlService,\n defaultConfig,\n getIntlService,\n type IntlService,\n setIntlService,\n} from '../services/intl.js'\n\n/**\n * Interface for components that have intl service capabilities\n */\nexport interface IntlServiceMixin {\n formatMessage(key?: string, options?: Record<string, string>): string\n setupLocalIntl(): IntlService | undefined\n}\n\n/**\n * Type helper for the constructor returned by withIntlService\n */\nexport type IntlServiceMixinConstructor<T extends typeof LitElement> = (new (\n ...args: any[]\n) => InstanceType<T> & IntlServiceMixin) &\n T\n\n/**\n * Mixin to add internationalization service to a Lit component\n *\n * Provides access to the global intl service with reactive locale changes.\n * Automatically subscribes to locale changes and triggers re-renders.\n *\n * The component will use the global intl service if available, or create a local one.\n * This follows the singleton pattern for the global service while allowing flexibility.\n *\n * @typeParam T - The Lit component class being extended\n * @returns Extended class with intl service capabilities\n *\n * @example\n * ```typescript\n * import { LitElement, html } from 'lit';\n * import { customElement } from 'lit/decorators.js';\n * import { withIntlService } from '@lukso/core/mixins';\n *\n * @customElement('my-component')\n * export class MyComponent extends withIntlService(LitElement) {\n * render() {\n * return html\\`<p>\\${this.formatMessage('app.welcome')}</p>\\`;\n * }\n * }\n * ```\n */\nexport function withIntlService<T extends typeof LitElement>(\n Base: T\n): IntlServiceMixinConstructor<T> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n class Mixin extends (Base as any) {\n protected unsubscribeIntl: (() => void) | undefined = undefined\n\n connectedCallback(): void {\n super.connectedCallback()\n\n // Subscribe to intl changes via signal\n let intl: IntlService | null = getIntlService()\n\n // When no intl is provided by host app we initialize our own\n if (!intl) {\n intl = this.setupLocalIntl() ?? null\n }\n\n if (intl) {\n this.unsubscribeIntl = effect(() => {\n // Access the signal to track changes\n intl?.localeChanged.value\n this.requestUpdate()\n })\n }\n\n // Set fallback for missing translations\n intl?.setFallbackTranslations(englishTranslations as any)\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback()\n\n // Unsubscribe from intl changes\n if (typeof this.unsubscribeIntl === 'function') {\n this.unsubscribeIntl()\n }\n }\n\n /**\n * Setup a local intl service with default configuration\n * Subclasses can override this to customize initialization\n */\n protected setupLocalIntl(): IntlService | undefined {\n const intlService = createIntlService(\n Object.assign(defaultConfig, {\n messages: englishTranslations,\n })\n )\n setIntlService(intlService)\n return intlService\n }\n\n /**\n * Format message using the intl service\n */\n formatMessage(key?: string, options?: Record<string, string>): string {\n if (!key) {\n console.warn('No translation key provided to formatMessage')\n return ''\n }\n\n const intl = getIntlService()\n return intl?.formatMessage(key, options) ?? key\n }\n }\n\n return Mixin as unknown as IntlServiceMixinConstructor<T>\n}\n","{\n \"sign_up_modal_use_mobile\": \"Install the Mobile Application\",\n \"sign_up_modal_title\": \"Create Universal Profile!\",\n \"sign_up_modal_install_extension\": \"Install the Browser Extension\",\n \"sign_up_modal_description\": \"Choose the device on which you want to create a profile. You can use either to interact with supported apps\",\n \"connect_modal_try_again\": \"Try again\",\n \"connect_modal_title\": \"Let’s log you in\",\n \"connect_modal_qr_code_title\": \"Scan to log in\",\n \"connect_modal_qr_code_description\": \"Scan the below QR code with the Universal Profile mobile app to log in\",\n \"connect_modal_other_connectors\": \"Connect Wallet\",\n \"connect_modal_or_info\": \"Log in with a different wallet\",\n \"connect_modal_or\": \"Or\",\n \"connect_modal_installed\": \"INSTALLED\",\n \"connect_modal_failed_to_load\": \"Failed to load...\",\n \"connect_modal_eoa_title\": \"Connect your Wallet\",\n \"connect_modal_description\": \"Log in with your Universal Profile\",\n \"connect_modal_connectors_up_mobile\": \"Mobile Application\",\n \"connect_modal_connectors_up_browser_extension\": \"Browser Extension\",\n \"connect_modal_connectors_passkey_wallet\": \"Passkey Wallet\",\n \"connect_modal_close\": \"Close modal\",\n \"connect_modal_go_back\": \"Go back\"\n}"],"mappings":";;;;;;;;AAMA,SAAS,cAAc;;;ACNvB;AAAA,EACE,0BAA4B;AAAA,EAC5B,qBAAuB;AAAA,EACvB,iCAAmC;AAAA,EACnC,2BAA6B;AAAA,EAC7B,yBAA2B;AAAA,EAC3B,qBAAuB;AAAA,EACvB,6BAA+B;AAAA,EAC/B,mCAAqC;AAAA,EACrC,gCAAkC;AAAA,EAClC,uBAAyB;AAAA,EACzB,k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
var _chunkUQSIH233cjs = require('./chunk-UQSIH233.cjs');
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
var
|
|
37
|
+
var _chunkP3OUBU4Icjs = require('./chunk-P3OUBU4I.cjs');
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
@@ -84,5 +84,5 @@ _chunkGBY3X5CQcjs.init_config.call(void 0, );
|
|
|
84
84
|
|
|
85
85
|
|
|
86
86
|
|
|
87
|
-
exports.EIP1271_MAGIC_VALUE = _chunk2KVLFGLMcjs.EIP1271_MAGIC_VALUE; exports.EXTENSION_STORE_LINKS = _chunk2KVLFGLMcjs.EXTENSION_STORE_LINKS; exports.GRAPHQL_ENDPOINT_MAINNET = _chunkGBY3X5CQcjs.GRAPHQL_ENDPOINT_MAINNET; exports.GRAPHQL_ENDPOINT_TESTNET = _chunkGBY3X5CQcjs.GRAPHQL_ENDPOINT_TESTNET; exports.SUPPORTED_NETWORK_IDS = _chunkGBY3X5CQcjs.SUPPORTED_NETWORK_IDS; exports.UrlConverter = _chunk2KVLFGLMcjs.UrlConverter; exports.UrlResolver = _chunk2KVLFGLMcjs.UrlResolver; exports.browserInfo = _chunk2KVLFGLMcjs.browserInfo; exports.clearIntlService = _chunkIDQ6WJY5cjs.clearIntlService; exports.createIntlService = _chunkIDQ6WJY5cjs.createIntlService; exports.createMessage = _chunk2KVLFGLMcjs.createMessage; exports.createSignedQR = _chunk2KVLFGLMcjs.createSignedQR; exports.defaultConfig = _chunkIDQ6WJY5cjs.defaultConfig; exports.deviceService = _chunkNJQVWIZLcjs.deviceService; exports.getChainById = _chunk4TARUYHAcjs.getChainById; exports.getControllerAddress = _chunk2KVLFGLMcjs.getControllerAddress; exports.getEIP1271Data = _chunk2KVLFGLMcjs.getEIP1271Data; exports.getIntlService = _chunkIDQ6WJY5cjs.getIntlService; exports.getLuksoMainnet = _chunk4TARUYHAcjs.getLuksoMainnet; exports.getLuksoTestnet = _chunk4TARUYHAcjs.getLuksoTestnet; exports.isSignedQRFormat = _chunk2KVLFGLMcjs.isSignedQRFormat; exports.luksoChainsByID = _chunk4TARUYHAcjs.luksoChainsByID; exports.luksoMainnet = _chunk4TARUYHAcjs.luksoMainnet; exports.luksoTestnet = _chunk4TARUYHAcjs.luksoTestnet; exports.parseSignedQR = _chunk2KVLFGLMcjs.parseSignedQR; exports.setIntlService = _chunkIDQ6WJY5cjs.setIntlService; exports.slug = _chunk2KVLFGLMcjs.slug; exports.verifySignedQR = _chunk2KVLFGLMcjs.verifySignedQR; exports.withDeviceService = _chunkUQSIH233cjs.withDeviceService; exports.withIntlService =
|
|
87
|
+
exports.EIP1271_MAGIC_VALUE = _chunk2KVLFGLMcjs.EIP1271_MAGIC_VALUE; exports.EXTENSION_STORE_LINKS = _chunk2KVLFGLMcjs.EXTENSION_STORE_LINKS; exports.GRAPHQL_ENDPOINT_MAINNET = _chunkGBY3X5CQcjs.GRAPHQL_ENDPOINT_MAINNET; exports.GRAPHQL_ENDPOINT_TESTNET = _chunkGBY3X5CQcjs.GRAPHQL_ENDPOINT_TESTNET; exports.SUPPORTED_NETWORK_IDS = _chunkGBY3X5CQcjs.SUPPORTED_NETWORK_IDS; exports.UrlConverter = _chunk2KVLFGLMcjs.UrlConverter; exports.UrlResolver = _chunk2KVLFGLMcjs.UrlResolver; exports.browserInfo = _chunk2KVLFGLMcjs.browserInfo; exports.clearIntlService = _chunkIDQ6WJY5cjs.clearIntlService; exports.createIntlService = _chunkIDQ6WJY5cjs.createIntlService; exports.createMessage = _chunk2KVLFGLMcjs.createMessage; exports.createSignedQR = _chunk2KVLFGLMcjs.createSignedQR; exports.defaultConfig = _chunkIDQ6WJY5cjs.defaultConfig; exports.deviceService = _chunkNJQVWIZLcjs.deviceService; exports.getChainById = _chunk4TARUYHAcjs.getChainById; exports.getControllerAddress = _chunk2KVLFGLMcjs.getControllerAddress; exports.getEIP1271Data = _chunk2KVLFGLMcjs.getEIP1271Data; exports.getIntlService = _chunkIDQ6WJY5cjs.getIntlService; exports.getLuksoMainnet = _chunk4TARUYHAcjs.getLuksoMainnet; exports.getLuksoTestnet = _chunk4TARUYHAcjs.getLuksoTestnet; exports.isSignedQRFormat = _chunk2KVLFGLMcjs.isSignedQRFormat; exports.luksoChainsByID = _chunk4TARUYHAcjs.luksoChainsByID; exports.luksoMainnet = _chunk4TARUYHAcjs.luksoMainnet; exports.luksoTestnet = _chunk4TARUYHAcjs.luksoTestnet; exports.parseSignedQR = _chunk2KVLFGLMcjs.parseSignedQR; exports.setIntlService = _chunkIDQ6WJY5cjs.setIntlService; exports.slug = _chunk2KVLFGLMcjs.slug; exports.verifySignedQR = _chunk2KVLFGLMcjs.verifySignedQR; exports.withDeviceService = _chunkUQSIH233cjs.withDeviceService; exports.withIntlService = _chunkP3OUBU4Icjs.withIntlService; exports.withTheme = _chunkDF2DOQMFcjs.withTheme;
|
|
88
88
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
package/dist/mixins/index.cjs
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _chunkUQSIH233cjs = require('../chunk-UQSIH233.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkP3OUBU4Icjs = require('../chunk-P3OUBU4I.cjs');
|
|
8
8
|
require('../chunk-IDQ6WJY5.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
@@ -15,5 +15,5 @@ require('../chunk-KP76AWY3.cjs');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
exports.withDeviceService = _chunkUQSIH233cjs.withDeviceService; exports.withIntlService =
|
|
18
|
+
exports.withDeviceService = _chunkUQSIH233cjs.withDeviceService; exports.withIntlService = _chunkP3OUBU4Icjs.withIntlService; exports.withTheme = _chunkDF2DOQMFcjs.withTheme;
|
|
19
19
|
//# sourceMappingURL=index.cjs.map
|
package/dist/mixins/index.js
CHANGED
package/dist/mixins/intl.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkP3OUBU4Icjs = require('../chunk-P3OUBU4I.cjs');
|
|
4
4
|
require('../chunk-IDQ6WJY5.cjs');
|
|
5
5
|
require('../chunk-KP76AWY3.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.withIntlService =
|
|
8
|
+
exports.withIntlService = _chunkP3OUBU4Icjs.withIntlService;
|
|
9
9
|
//# sourceMappingURL=intl.cjs.map
|
package/dist/mixins/intl.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lukso/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Core utilities, services, and mixins for LUKSO web components and applications",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"ua-parser-js": "^2.0.9"
|
|
97
97
|
},
|
|
98
98
|
"peerDependencies": {
|
|
99
|
-
"lit": "3.3.
|
|
99
|
+
"lit": "3.3.2",
|
|
100
100
|
"viem": "^2.0.0"
|
|
101
101
|
},
|
|
102
102
|
"peerDependenciesMeta": {
|
package/translations/de_DE.json
CHANGED
|
@@ -14,5 +14,7 @@
|
|
|
14
14
|
"connect_modal_eoa_title": "Verbinden Sie Ihre Wallet",
|
|
15
15
|
"connect_modal_description": "Melden Sie sich mit Ihrem Universalprofil an.",
|
|
16
16
|
"connect_modal_connectors_up_mobile": "Mobile Anwendung",
|
|
17
|
-
"connect_modal_connectors_passkey_wallet": "Erstellen Sie eine Passkey-Wallet"
|
|
17
|
+
"connect_modal_connectors_passkey_wallet": "Erstellen Sie eine Passkey-Wallet",
|
|
18
|
+
"connect_modal_close": "Modal schließen",
|
|
19
|
+
"connect_modal_go_back": "Zurück"
|
|
18
20
|
}
|
package/translations/en_US.json
CHANGED
|
@@ -16,5 +16,7 @@
|
|
|
16
16
|
"connect_modal_description": "Log in with your Universal Profile",
|
|
17
17
|
"connect_modal_connectors_up_mobile": "Mobile Application",
|
|
18
18
|
"connect_modal_connectors_up_browser_extension": "Browser Extension",
|
|
19
|
-
"connect_modal_connectors_passkey_wallet": "Passkey Wallet"
|
|
19
|
+
"connect_modal_connectors_passkey_wallet": "Passkey Wallet",
|
|
20
|
+
"connect_modal_close": "Close modal",
|
|
21
|
+
"connect_modal_go_back": "Go back"
|
|
20
22
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/service-auth-simple/service-auth-simple/packages/core/dist/chunk-YZZF3DXX.cjs","../src/mixins/intl.ts","../translations/en_US.json"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;ACDA,mDAAuB;ADGvB;AACA;AEVA,IAAA,cAAA,EAAA;AAAA,EACE,wBAAA,EAA4B,gCAAA;AAAA,EAC5B,mBAAA,EAAuB,2BAAA;AAAA,EACvB,+BAAA,EAAmC,+BAAA;AAAA,EACnC,yBAAA,EAA6B,6GAAA;AAAA,EAC7B,uBAAA,EAA2B,WAAA;AAAA,EAC3B,mBAAA,EAAuB,uBAAA;AAAA,EACvB,2BAAA,EAA+B,gBAAA;AAAA,EAC/B,iCAAA,EAAqC,wEAAA;AAAA,EACrC,8BAAA,EAAkC,gBAAA;AAAA,EAClC,qBAAA,EAAyB,gCAAA;AAAA,EACzB,gBAAA,EAAoB,IAAA;AAAA,EACpB,uBAAA,EAA2B,WAAA;AAAA,EAC3B,4BAAA,EAAgC,mBAAA;AAAA,EAChC,uBAAA,EAA2B,qBAAA;AAAA,EAC3B,yBAAA,EAA6B,oCAAA;AAAA,EAC7B,kCAAA,EAAsC,oBAAA;AAAA,EACtC,6CAAA,EAAiD,mBAAA;AAAA,EACjD,uCAAA,EAA2C;AAC7C,CAAA;AFYA;AACA;AC2BO,SAAS,eAAA,CACd,IAAA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AA,CAAc,GAAA,EAAc,OAAA,EAA0C;AACpE,MAAA,GAAA,CAAI,CAAC,GAAA,EAAK;AACR,QAAA,OAAA,CAAQ,IAAA,CAAK,8CAA8C,CAAA;AAC3D,QAAA,OAAO,EAAA;AAAA,MACT;AAEA,MAAA,MAAM,KAAA,EAAO,8CAAA,CAAe;AAC5B,MAAA,wCAAO,IAAA,6BAAM,aAAA,mBAAc,GAAA,EAAK,OAAO,GAAA,UAAK,KAAA;AAAA,IAC9C;AAAA,EACF;AAEA,EAAA,OAAO,KAAA;AACT;ADzCA;AACA;AACE;AACF,0CAAC","file":"/home/runner/work/service-auth-simple/service-auth-simple/packages/core/dist/chunk-YZZF3DXX.cjs","sourcesContent":[null,"/**\n * Internationalization Mixin\n *\n * Mixin to add internationalization service to a Lit component\n */\n\nimport { effect } from '@preact/signals-core'\nimport type { LitElement } from 'lit'\nimport englishTranslations from '../../translations/en_US.json'\nimport {\n createIntlService,\n defaultConfig,\n getIntlService,\n type IntlService,\n setIntlService,\n} from '../services/intl.js'\n\n/**\n * Interface for components that have intl service capabilities\n */\nexport interface IntlServiceMixin {\n formatMessage(key?: string, options?: Record<string, string>): string\n setupLocalIntl(): IntlService | undefined\n}\n\n/**\n * Type helper for the constructor returned by withIntlService\n */\nexport type IntlServiceMixinConstructor<T extends typeof LitElement> = (new (\n ...args: any[]\n) => InstanceType<T> & IntlServiceMixin) &\n T\n\n/**\n * Mixin to add internationalization service to a Lit component\n *\n * Provides access to the global intl service with reactive locale changes.\n * Automatically subscribes to locale changes and triggers re-renders.\n *\n * The component will use the global intl service if available, or create a local one.\n * This follows the singleton pattern for the global service while allowing flexibility.\n *\n * @typeParam T - The Lit component class being extended\n * @returns Extended class with intl service capabilities\n *\n * @example\n * ```typescript\n * import { LitElement, html } from 'lit';\n * import { customElement } from 'lit/decorators.js';\n * import { withIntlService } from '@lukso/core/mixins';\n *\n * @customElement('my-component')\n * export class MyComponent extends withIntlService(LitElement) {\n * render() {\n * return html\\`<p>\\${this.formatMessage('app.welcome')}</p>\\`;\n * }\n * }\n * ```\n */\nexport function withIntlService<T extends typeof LitElement>(\n Base: T\n): IntlServiceMixinConstructor<T> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n class Mixin extends (Base as any) {\n protected unsubscribeIntl: (() => void) | undefined = undefined\n\n connectedCallback(): void {\n super.connectedCallback()\n\n // Subscribe to intl changes via signal\n let intl: IntlService | null = getIntlService()\n\n // When no intl is provided by host app we initialize our own\n if (!intl) {\n intl = this.setupLocalIntl() ?? null\n }\n\n if (intl) {\n this.unsubscribeIntl = effect(() => {\n // Access the signal to track changes\n intl?.localeChanged.value\n this.requestUpdate()\n })\n }\n\n // Set fallback for missing translations\n intl?.setFallbackTranslations(englishTranslations as any)\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback()\n\n // Unsubscribe from intl changes\n if (typeof this.unsubscribeIntl === 'function') {\n this.unsubscribeIntl()\n }\n }\n\n /**\n * Setup a local intl service with default configuration\n * Subclasses can override this to customize initialization\n */\n protected setupLocalIntl(): IntlService | undefined {\n const intlService = createIntlService(\n Object.assign(defaultConfig, {\n messages: englishTranslations,\n })\n )\n setIntlService(intlService)\n return intlService\n }\n\n /**\n * Format message using the intl service\n */\n formatMessage(key?: string, options?: Record<string, string>): string {\n if (!key) {\n console.warn('No translation key provided to formatMessage')\n return ''\n }\n\n const intl = getIntlService()\n return intl?.formatMessage(key, options) ?? key\n }\n }\n\n return Mixin as unknown as IntlServiceMixinConstructor<T>\n}\n","{\n \"sign_up_modal_use_mobile\": \"Install the Mobile Application\",\n \"sign_up_modal_title\": \"Create Universal Profile!\",\n \"sign_up_modal_install_extension\": \"Install the Browser Extension\",\n \"sign_up_modal_description\": \"Choose the device on which you want to create a profile. You can use either to interact with supported apps\",\n \"connect_modal_try_again\": \"Try again\",\n \"connect_modal_title\": \"Let’s log you in\",\n \"connect_modal_qr_code_title\": \"Scan to log in\",\n \"connect_modal_qr_code_description\": \"Scan the below QR code with the Universal Profile mobile app to log in\",\n \"connect_modal_other_connectors\": \"Connect Wallet\",\n \"connect_modal_or_info\": \"Log in with a different wallet\",\n \"connect_modal_or\": \"Or\",\n \"connect_modal_installed\": \"INSTALLED\",\n \"connect_modal_failed_to_load\": \"Failed to load...\",\n \"connect_modal_eoa_title\": \"Connect your Wallet\",\n \"connect_modal_description\": \"Log in with your Universal Profile\",\n \"connect_modal_connectors_up_mobile\": \"Mobile Application\",\n \"connect_modal_connectors_up_browser_extension\": \"Browser Extension\",\n \"connect_modal_connectors_passkey_wallet\": \"Passkey Wallet\"\n}"]}
|