@lukso/core 1.2.1 → 1.2.2-dev.205b184
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-6VE73XQH.cjs → chunk-GBVTZLYF.cjs} +1 -1
- package/dist/chunk-GBVTZLYF.cjs.map +1 -0
- package/dist/{chunk-K5NPHWCG.js → chunk-GD6H7BSG.js} +1 -1
- package/dist/chunk-GD6H7BSG.js.map +1 -0
- package/dist/{chunk-7CRBSMQ7.cjs → chunk-KPIUNN26.cjs} +1 -1
- package/dist/chunk-KPIUNN26.cjs.map +1 -0
- package/dist/{chunk-H3LA56KM.js → chunk-O2MNO3WV.js} +1 -1
- package/dist/chunk-O2MNO3WV.js.map +1 -0
- package/dist/{chunk-3WGYJTN4.js → chunk-UF5VAIDL.js} +1 -1
- package/dist/chunk-UF5VAIDL.js.map +1 -0
- package/dist/{chunk-CC3LFUYY.cjs → chunk-UQSIH233.cjs} +1 -1
- package/dist/chunk-UQSIH233.cjs.map +1 -0
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/mixins/device.cjs +2 -2
- package/dist/mixins/device.d.cts +14 -2
- package/dist/mixins/device.d.ts +14 -2
- package/dist/mixins/device.js +1 -1
- package/dist/mixins/index.cjs +4 -4
- package/dist/mixins/index.d.cts +7 -3
- package/dist/mixins/index.d.ts +7 -3
- package/dist/mixins/index.js +3 -3
- package/dist/mixins/intl.cjs +2 -2
- package/dist/mixins/intl.d.cts +15 -2
- package/dist/mixins/intl.d.ts +15 -2
- package/dist/mixins/intl.js +1 -1
- package/dist/mixins/theme.cjs +2 -2
- package/dist/mixins/theme.d.cts +14 -2
- package/dist/mixins/theme.d.ts +14 -2
- package/dist/mixins/theme.js +1 -1
- package/package.json +5 -5
- package/src/index.ts +1 -1
- package/src/mixins/device.ts +19 -4
- package/src/mixins/index.ts +16 -3
- package/src/mixins/intl.ts +20 -4
- package/src/mixins/theme.ts +21 -4
- package/dist/chunk-3WGYJTN4.js.map +0 -1
- package/dist/chunk-6VE73XQH.cjs.map +0 -1
- package/dist/chunk-7CRBSMQ7.cjs.map +0 -1
- package/dist/chunk-CC3LFUYY.cjs.map +0 -1
- package/dist/chunk-H3LA56KM.js.map +0 -1
- package/dist/chunk-K5NPHWCG.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/service-auth-simple/service-auth-simple/packages/core/dist/chunk-GBVTZLYF.cjs","../src/mixins/theme.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;ACGA,iDAAgC;AAsDzB,SAAS,SAAA,CACd,IAAA,EAC0B;AAAA,EAE1B,MAAM,MAAA,QAAe,KAAa;AAAA,IAAlC,WAAA,CAAA,EAAA;AAAA,MAAA,KAAA,CAAA,GAAA,SAAA,CAAA;AAKE,MAAA,IAAA,CAAA,MAAA,EAAe,OAAA;AAMf,MAAA,IAAA,CAAU,OAAA,EAAS,KAAA;AAOnB,MAAA,IAAA,CAAQ,eAAA,EAAwC,IAAA;AAgEhD;AAAA;AAAA;AAAA;AAAA;AAAA,MAAA,IAAA,CAAQ,uBAAA,EAAyB,CAAC,KAAA,EAAA,GAAqC;AACrE,QAAA,IAAA,CAAK,OAAA,EAAS,KAAA,CAAM,OAAA;AAAA,MACtB,CAAA;AAAA,IAAA;AAAA,IAhEA,iBAAA,CAAA,EAA0B;AACxB,MAAA,KAAA,CAAM,iBAAA,CAAkB,CAAA;AACxB,MAAA,IAAA,CAAK,WAAA,CAAY,CAAA;AACjB,MAAA,IAAA,CAAK,eAAA,CAAgB,CAAA;AAGrB,MAAA,GAAA,CAAI,IAAA,CAAK,MAAA,IAAU,MAAA,EAAQ;AACzB,QAAA,IAAA,CAAK,eAAA,EAAiB,MAAA,CAAO,UAAA,CAAW,8BAA8B,CAAA;AACtE,QAAA,IAAA,CAAK,cAAA,CAAe,gBAAA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A,EAAA,CAAA,CAAA;AAMU,EAAA,+CAAA;AAAA,IADT,iCAAA;AAAM,EAAA,CAAA,EAVH,KAAA,CAWM,SAAA,EAAA,QAAA,EAAA,CAAA,CAAA;AAiHZ,EAAA,OAAO,KAAA;AACT;ADlFA;AACA;AACE;AACF,8BAAC","file":"/home/runner/work/service-auth-simple/service-auth-simple/packages/core/dist/chunk-GBVTZLYF.cjs","sourcesContent":[null,"/**\n * Theme Mixin\n *\n * Mixin to add theme detection and management to a Lit component\n */\n\nimport type { LitElement } from 'lit'\nimport { property, state } from 'lit/decorators.js'\n\nexport type Theme = 'light' | 'dark' | 'auto'\n\n/**\n * Interface for components that have theme management capabilities\n */\nexport interface ThemeMixin {\n theme: Theme\n isDark: boolean\n updateTheme(): void\n}\n\n/**\n * Type helper for the constructor returned by withTheme\n */\nexport type ThemeMixinConstructor<T extends typeof LitElement> = (new (\n ...args: any[]\n) => InstanceType<T> & ThemeMixin) &\n T\n\n/**\n * Mixin to add theme management to a Lit component\n *\n * Provides a `theme` property and `isDark` state that automatically handles:\n * - Manual theme selection ('light' or 'dark')\n * - Auto theme detection based on system preferences\n * - Reactive updates when system theme changes\n * - Automatically wraps all rendered content in a themed div with 'dark' class when dark mode is active\n *\n * All content rendered by the component will be inside a theme-root div that receives the dark class.\n * Components can use render() normally - no changes needed.\n *\n * @typeParam T - The Lit component class being extended\n * @returns Extended class with theme management capabilities\n *\n * @example\n * ```typescript\n * import { LitElement, html } from 'lit';\n * import { customElement } from 'lit/decorators.js';\n * import { withTheme } from '@lukso/core/mixins';\n *\n * @customElement('my-component')\n * export class MyComponent extends withTheme(LitElement) {\n * render() {\n * return html`\n * <div class=\"text-neutral-20 dark:text-neutral-100\">\n * Current theme: ${this.theme}\n * </div>\n * `;\n * }\n * }\n * ```\n */\nexport function withTheme<T extends typeof LitElement>(\n Base: T\n): ThemeMixinConstructor<T> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n class Mixin extends (Base as any) {\n /**\n * Theme mode: 'light', 'dark', or 'auto' (follows system preference)\n */\n @property({ type: String, reflect: true })\n theme: Theme = 'light'\n\n /**\n * Computed state indicating if dark mode is active\n */\n @state()\n protected isDark = false\n\n /**\n * The theme root element that wraps all rendered content and receives the dark class\n */\n private themeRoot!: HTMLDivElement\n\n private mediaQueryList: MediaQueryList | null = null\n\n connectedCallback(): void {\n super.connectedCallback()\n this.updateTheme()\n this.updateHostClass()\n\n // Listen for system theme changes when in 'auto' mode\n if (this.theme === 'auto') {\n this.mediaQueryList = window.matchMedia('(prefers-color-scheme: dark)')\n this.mediaQueryList.addEventListener(\n 'change',\n this.handleMediaQueryChange\n )\n }\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback()\n\n if (this.mediaQueryList) {\n this.mediaQueryList.removeEventListener(\n 'change',\n this.handleMediaQueryChange\n )\n }\n }\n\n updated(changedProperties: Map<string, any>): void {\n super.updated(changedProperties)\n\n // Handle theme changes\n if (changedProperties.has('theme')) {\n this.updateTheme()\n\n // Update media query listener when theme mode changes\n if (this.theme === 'auto' && !this.mediaQueryList) {\n this.mediaQueryList = window.matchMedia(\n '(prefers-color-scheme: dark)'\n )\n this.mediaQueryList.addEventListener(\n 'change',\n this.handleMediaQueryChange\n )\n } else if (this.theme !== 'auto' && this.mediaQueryList) {\n this.mediaQueryList.removeEventListener(\n 'change',\n this.handleMediaQueryChange\n )\n this.mediaQueryList = null\n }\n }\n\n // Update host class when isDark changes\n if (changedProperties.has('isDark')) {\n this.updateHostClass()\n }\n }\n\n /**\n * Handle system theme changes\n *\n * @param event - Media query list event\n */\n private handleMediaQueryChange = (event: MediaQueryListEvent): void => {\n this.isDark = event.matches\n }\n\n /**\n * Update isDark state based on theme property\n */\n protected updateTheme(): void {\n if (this.theme === 'auto') {\n this.isDark = window.matchMedia('(prefers-color-scheme: dark)').matches\n } else {\n this.isDark = this.theme === 'dark'\n }\n }\n\n /**\n * Create the render root with a themed wrapper div\n */\n createRenderRoot(): Element | ShadowRoot {\n const root = super.createRenderRoot()\n\n this.themeRoot = document.createElement('div')\n this.themeRoot.setAttribute('data-theme-root', '')\n\n root.appendChild(this.themeRoot)\n return this.themeRoot\n }\n\n /**\n * Update the host element's and theme root's class based on isDark state\n */\n private updateHostClass(): void {\n if (this.isDark) {\n this.classList.add('dark')\n this.themeRoot.classList.add('dark')\n } else {\n this.classList.remove('dark')\n this.themeRoot.classList.remove('dark')\n }\n }\n }\n\n return Mixin as unknown as ThemeMixinConstructor<T>\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../translations/en_US.json","../src/mixins/intl.ts"],"sourcesContent":["{\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}","/**\n * Internationalization Mixin\n *\n * Mixin to add internationalization service to a Lit component\n */\n\nimport englishTranslations from '@lukso/core/translations/en_US.json'\nimport { effect } from '@preact/signals-core'\nimport type { LitElement } from 'lit'\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"],"mappings":";;;;;;;;AAAA;AAAA,EACE,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;AAC7C;;;ACRA,SAAS,cAAc;AAoDhB,SAAS,gBACd,MACgC;AAAA,EAEhC,MAAM,cAAe,KAAa;AAAA,IAAlC;AAAA;AACE,WAAU,kBAA4C;AAAA;AAAA,IAEtD,oBAA0B;AACxB,YAAM,kBAAkB;AAGxB,UAAI,OAA2B,eAAe;AAG9C,UAAI,CAAC,MAAM;AACT,eAAO,KAAK,eAAe,KAAK;AAAA,MAClC;AAEA,UAAI,MAAM;AACR,aAAK,kBAAkB,OAAO,MAAM;AAElC,gBAAM,cAAc;AACpB,eAAK,cAAc;AAAA,QACrB,CAAC;AAAA,MACH;AAGA,YAAM,wBAAwB,aAA0B;AAAA,IAC1D;AAAA,IAEA,uBAA6B;AAC3B,YAAM,qBAAqB;AAG3B,UAAI,OAAO,KAAK,oBAAoB,YAAY;AAC9C,aAAK,gBAAgB;AAAA,MACvB;AAAA,IACF;AAAA;AAAA;AAAA;AAAA;AAAA,IAMU,iBAA0C;AAClD,YAAM,cAAc;AAAA,QAClB,OAAO,OAAO,eAAe;AAAA,UAC3B,UAAU;AAAA,QACZ,CAAC;AAAA,MACH;AACA,qBAAe,WAAW;AAC1B,aAAO;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAKA,cAAc,KAAc,SAA0C;AACpE,UAAI,CAAC,KAAK;AACR,gBAAQ,KAAK,8CAA8C;AAC3D,eAAO;AAAA,MACT;AAEA,YAAM,OAAO,eAAe;AAC5B,aAAO,MAAM,cAAc,KAAK,OAAO,KAAK;AAAA,IAC9C;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/service-auth-simple/service-auth-simple/packages/core/dist/chunk-KPIUNN26.cjs","../translations/en_US.json","../src/mixins/intl.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;ACPA,IAAA,cAAA,EAAA;AAAA,EACE,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;ADSA;AACA;AElBA,mDAAuB;AAoDhB,SAAS,eAAA,CACd,IAAA,EACgC;AAAA,EAEhC,MAAM,MAAA,QAAe,KAAa;AAAA,IAAlC,WAAA,CAAA,EAAA;AAAA,MAAA,KAAA,CAAA,GAAA,SAAA,CAAA;AACE,MAAA,IAAA,CAAU,gBAAA,EAA4C,KAAA,CAAA;AAAA,IAAA;AAAA,IAEtD,iBAAA,CAAA,EAA0B;AACxB,MAAA,KAAA,CAAM,iBAAA,CAAkB,CAAA;AAGxB,MAAA,IAAI,KAAA,EA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AAA;AAAA,IAC9C;AAAA,EACF;AAEA,EAAA,OAAO,KAAA;AACT;AF/CA;AACA;AACE;AACF,0CAAC","file":"/home/runner/work/service-auth-simple/service-auth-simple/packages/core/dist/chunk-KPIUNN26.cjs","sourcesContent":[null,"{\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}","/**\n * Internationalization Mixin\n *\n * Mixin to add internationalization service to a Lit component\n */\n\nimport englishTranslations from '@lukso/core/translations/en_US.json'\nimport { effect } from '@preact/signals-core'\nimport type { LitElement } from 'lit'\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"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/mixins/theme.ts"],"sourcesContent":["/**\n * Theme Mixin\n *\n * Mixin to add theme detection and management to a Lit component\n */\n\nimport type { LitElement } from 'lit'\nimport { property, state } from 'lit/decorators.js'\n\nexport type Theme = 'light' | 'dark' | 'auto'\n\n/**\n * Interface for components that have theme management capabilities\n */\nexport interface ThemeMixin {\n theme: Theme\n isDark: boolean\n updateTheme(): void\n}\n\n/**\n * Type helper for the constructor returned by withTheme\n */\nexport type ThemeMixinConstructor<T extends typeof LitElement> = (new (\n ...args: any[]\n) => InstanceType<T> & ThemeMixin) &\n T\n\n/**\n * Mixin to add theme management to a Lit component\n *\n * Provides a `theme` property and `isDark` state that automatically handles:\n * - Manual theme selection ('light' or 'dark')\n * - Auto theme detection based on system preferences\n * - Reactive updates when system theme changes\n * - Automatically wraps all rendered content in a themed div with 'dark' class when dark mode is active\n *\n * All content rendered by the component will be inside a theme-root div that receives the dark class.\n * Components can use render() normally - no changes needed.\n *\n * @typeParam T - The Lit component class being extended\n * @returns Extended class with theme management capabilities\n *\n * @example\n * ```typescript\n * import { LitElement, html } from 'lit';\n * import { customElement } from 'lit/decorators.js';\n * import { withTheme } from '@lukso/core/mixins';\n *\n * @customElement('my-component')\n * export class MyComponent extends withTheme(LitElement) {\n * render() {\n * return html`\n * <div class=\"text-neutral-20 dark:text-neutral-100\">\n * Current theme: ${this.theme}\n * </div>\n * `;\n * }\n * }\n * ```\n */\nexport function withTheme<T extends typeof LitElement>(\n Base: T\n): ThemeMixinConstructor<T> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n class Mixin extends (Base as any) {\n /**\n * Theme mode: 'light', 'dark', or 'auto' (follows system preference)\n */\n @property({ type: String, reflect: true })\n theme: Theme = 'light'\n\n /**\n * Computed state indicating if dark mode is active\n */\n @state()\n protected isDark = false\n\n /**\n * The theme root element that wraps all rendered content and receives the dark class\n */\n private themeRoot!: HTMLDivElement\n\n private mediaQueryList: MediaQueryList | null = null\n\n connectedCallback(): void {\n super.connectedCallback()\n this.updateTheme()\n this.updateHostClass()\n\n // Listen for system theme changes when in 'auto' mode\n if (this.theme === 'auto') {\n this.mediaQueryList = window.matchMedia('(prefers-color-scheme: dark)')\n this.mediaQueryList.addEventListener(\n 'change',\n this.handleMediaQueryChange\n )\n }\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback()\n\n if (this.mediaQueryList) {\n this.mediaQueryList.removeEventListener(\n 'change',\n this.handleMediaQueryChange\n )\n }\n }\n\n updated(changedProperties: Map<string, any>): void {\n super.updated(changedProperties)\n\n // Handle theme changes\n if (changedProperties.has('theme')) {\n this.updateTheme()\n\n // Update media query listener when theme mode changes\n if (this.theme === 'auto' && !this.mediaQueryList) {\n this.mediaQueryList = window.matchMedia(\n '(prefers-color-scheme: dark)'\n )\n this.mediaQueryList.addEventListener(\n 'change',\n this.handleMediaQueryChange\n )\n } else if (this.theme !== 'auto' && this.mediaQueryList) {\n this.mediaQueryList.removeEventListener(\n 'change',\n this.handleMediaQueryChange\n )\n this.mediaQueryList = null\n }\n }\n\n // Update host class when isDark changes\n if (changedProperties.has('isDark')) {\n this.updateHostClass()\n }\n }\n\n /**\n * Handle system theme changes\n *\n * @param event - Media query list event\n */\n private handleMediaQueryChange = (event: MediaQueryListEvent): void => {\n this.isDark = event.matches\n }\n\n /**\n * Update isDark state based on theme property\n */\n protected updateTheme(): void {\n if (this.theme === 'auto') {\n this.isDark = window.matchMedia('(prefers-color-scheme: dark)').matches\n } else {\n this.isDark = this.theme === 'dark'\n }\n }\n\n /**\n * Create the render root with a themed wrapper div\n */\n createRenderRoot(): Element | ShadowRoot {\n const root = super.createRenderRoot()\n\n this.themeRoot = document.createElement('div')\n this.themeRoot.setAttribute('data-theme-root', '')\n\n root.appendChild(this.themeRoot)\n return this.themeRoot\n }\n\n /**\n * Update the host element's and theme root's class based on isDark state\n */\n private updateHostClass(): void {\n if (this.isDark) {\n this.classList.add('dark')\n this.themeRoot.classList.add('dark')\n } else {\n this.classList.remove('dark')\n this.themeRoot.classList.remove('dark')\n }\n }\n }\n\n return Mixin as unknown as ThemeM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,KAAK,UAAU,QAAQ;AACzB,aAAK,SAAS,OAAO,WAAW,8BAA8B,EAAE;AAAA,MAClE,OAAO;AACL,aAAK,SAAS,KAAK,UAAU;AAAA,MAC/B;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAKA,mBAAyC;AACvC,YAAM,OAAO,MAAM,iBAAiB;AAEpC,WAAK,YAAY,SAAS,cAAc,KAAK;AAC7C,WAAK,UAAU,aAAa,mBAAmB,EAAE;AAEjD,WAAK,YAAY,KAAK,SAAS;AAC/B,aAAO,KAAK;AAAA,IACd;AAAA;AAAA;AAAA;AAAA,IAKQ,kBAAwB;AAC9B,UAAI,KAAK,QAAQ;AACf,aAAK,UAAU,IAAI,MAAM;AACzB,aAAK,UAAU,UAAU,IAAI,MAAM;AAAA,MACrC,OAAO;AACL,aAAK,UAAU,OAAO,MAAM;AAC5B,aAAK,UAAU,UAAU,OAAO,MAAM;AAAA,MACxC;AAAA,IACF;AAAA,EACF;AArHE;AAAA,IADC,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,KAJrC,MAKJ;AAMU;AAAA,IADT,MAAM;AAAA,KAVH,MAWM;AAiHZ,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/mixins/device.ts"],"sourcesContent":["/**\n * Device Detection Mixin\n *\n * Mixin to add device detection service to a Lit component\n */\n\nimport type { LitElement } from 'lit'\nimport type { DeviceService } from '../services/device.js'\nimport { deviceService, type NavigatorExtended } from '../services/device.js'\n\n/**\n * Interface for components that have device detection capabilities\n */\nexport interface DeviceServiceMixin {\n device: DeviceService | undefined\n}\n\n/**\n * Type helper for the constructor returned by withDeviceService\n */\nexport type DeviceServiceMixinConstructor<T extends typeof LitElement> = (new (\n ...args: any[]\n) => InstanceType<T> & DeviceServiceMixin) &\n T\n\n/**\n * Mixin to add device detection service to a Lit component\n *\n * Provides a `device` property with device/OS/browser detection capabilities.\n * The device service is initialized in connectedCallback and follows component lifecycle.\n *\n * @typeParam T - The Lit component class being extended\n * @returns Extended class with device detection capabilities\n *\n * @example\n * ```typescript\n * import { LitElement } from 'lit';\n * import { customElement } from 'lit/decorators.js';\n * import { withDeviceService } from '@lukso/core/mixins';\n *\n * @customElement('my-component')\n * export class MyComponent extends withDeviceService(LitElement) {\n * render() {\n * return html\\`Device is mobile: \\${this.device?.isMobile}\\`;\n * }\n * }\n * ```\n */\nexport function withDeviceService<T extends typeof LitElement>(\n Base: T\n): DeviceServiceMixinConstructor<T> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n class Mixin extends (Base as any) {\n device: DeviceService | undefined\n\n connectedCallback(): void {\n super.connectedCallback()\n this.device = deviceService(navigator as NavigatorExtended)\n }\n }\n\n return Mixin as unknown as DeviceServiceMixinConstructor<T>\n}\n"],"mappings":";;;;;AAgDO,SAAS,kBACd,MACkC;AAAA,EAElC,MAAM,cAAe,KAAa;AAAA,IAGhC,oBAA0B;AACxB,YAAM,kBAAkB;AACxB,WAAK,SAAS,cAAc,SAA8B;AAAA,IAC5D;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/service-auth-simple/service-auth-simple/packages/core/dist/chunk-UQSIH233.cjs","../src/mixins/device.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;AC4CO,SAAS,iBAAA,CACd,IAAA,EACkC;AAAA,EAElC,MAAM,MAAA,QAAe,KAAa;AAAA,IAGhC,iBAAA,CAAA,EAA0B;AACxB,MAAA,KAAA,CAAM,iBAAA,CAAkB,CAAA;AACxB,MAAA,IAAA,CAAK,OAAA,EAAS,6CAAA,SAA4C,CAAA;AAAA,IAC5D;AAAA,EACF;AAEA,EAAA,OAAO,KAAA;AACT;ADhDA;AACA;AACE;AACF,8CAAC","file":"/home/runner/work/service-auth-simple/service-auth-simple/packages/core/dist/chunk-UQSIH233.cjs","sourcesContent":[null,"/**\n * Device Detection Mixin\n *\n * Mixin to add device detection service to a Lit component\n */\n\nimport type { LitElement } from 'lit'\nimport type { DeviceService } from '../services/device.js'\nimport { deviceService, type NavigatorExtended } from '../services/device.js'\n\n/**\n * Interface for components that have device detection capabilities\n */\nexport interface DeviceServiceMixin {\n device: DeviceService | undefined\n}\n\n/**\n * Type helper for the constructor returned by withDeviceService\n */\nexport type DeviceServiceMixinConstructor<T extends typeof LitElement> = (new (\n ...args: any[]\n) => InstanceType<T> & DeviceServiceMixin) &\n T\n\n/**\n * Mixin to add device detection service to a Lit component\n *\n * Provides a `device` property with device/OS/browser detection capabilities.\n * The device service is initialized in connectedCallback and follows component lifecycle.\n *\n * @typeParam T - The Lit component class being extended\n * @returns Extended class with device detection capabilities\n *\n * @example\n * ```typescript\n * import { LitElement } from 'lit';\n * import { customElement } from 'lit/decorators.js';\n * import { withDeviceService } from '@lukso/core/mixins';\n *\n * @customElement('my-component')\n * export class MyComponent extends withDeviceService(LitElement) {\n * render() {\n * return html\\`Device is mobile: \\${this.device?.isMobile}\\`;\n * }\n * }\n * ```\n */\nexport function withDeviceService<T extends typeof LitElement>(\n Base: T\n): DeviceServiceMixinConstructor<T> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n class Mixin extends (Base as any) {\n device: DeviceService | undefined\n\n connectedCallback(): void {\n super.connectedCallback()\n this.device = deviceService(navigator as NavigatorExtended)\n }\n }\n\n return Mixin as unknown as DeviceServiceMixinConstructor<T>\n}\n"]}
|
package/dist/index.cjs
CHANGED
|
@@ -20,10 +20,10 @@ var _chunkLUT5BHYLcjs = require('./chunk-LUT5BHYL.cjs');
|
|
|
20
20
|
require('./chunk-DWXFDFMM.cjs');
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkUQSIH233cjs = require('./chunk-UQSIH233.cjs');
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkKPIUNN26cjs = require('./chunk-KPIUNN26.cjs');
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
@@ -33,7 +33,7 @@ var _chunk7CRBSMQ7cjs = require('./chunk-7CRBSMQ7.cjs');
|
|
|
33
33
|
var _chunkIDQ6WJY5cjs = require('./chunk-IDQ6WJY5.cjs');
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var _chunkGBVTZLYFcjs = require('./chunk-GBVTZLYF.cjs');
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
var _chunkNJQVWIZLcjs = require('./chunk-NJQVWIZL.cjs');
|
|
@@ -60,5 +60,5 @@ require('./chunk-ZBDE64SD.cjs');
|
|
|
60
60
|
|
|
61
61
|
|
|
62
62
|
|
|
63
|
-
exports.EXTENSION_STORE_LINKS = _chunkQU6NUTY6cjs.EXTENSION_STORE_LINKS; exports.GRAPHQL_ENDPOINT_MAINNET = _chunkLUT5BHYLcjs.GRAPHQL_ENDPOINT_MAINNET; exports.GRAPHQL_ENDPOINT_TESTNET = _chunkLUT5BHYLcjs.GRAPHQL_ENDPOINT_TESTNET; exports.LUKSO_CHAINS_BY_ID = _chunkMCNNULYXcjs.LUKSO_CHAINS_BY_ID; exports.SUPPORTED_NETWORK_IDS = _chunkLUT5BHYLcjs.SUPPORTED_NETWORK_IDS; exports.UrlConverter = _chunkQU6NUTY6cjs.UrlConverter; exports.UrlResolver = _chunkQU6NUTY6cjs.UrlResolver; exports.browserInfo = _chunkQU6NUTY6cjs.browserInfo; exports.clearIntlService = _chunkIDQ6WJY5cjs.clearIntlService; exports.createIntlService = _chunkIDQ6WJY5cjs.createIntlService; exports.defaultConfig = _chunkIDQ6WJY5cjs.defaultConfig; exports.deviceService = _chunkNJQVWIZLcjs.deviceService; exports.getChainById = _chunkMCNNULYXcjs.getChainById; exports.getIntlService = _chunkIDQ6WJY5cjs.getIntlService; exports.luksoMainnet = _chunkMCNNULYXcjs.luksoMainnet; exports.luksoTestnet = _chunkMCNNULYXcjs.luksoTestnet; exports.setIntlService = _chunkIDQ6WJY5cjs.setIntlService; exports.slug = _chunkQU6NUTY6cjs.slug; exports.withDeviceService =
|
|
63
|
+
exports.EXTENSION_STORE_LINKS = _chunkQU6NUTY6cjs.EXTENSION_STORE_LINKS; exports.GRAPHQL_ENDPOINT_MAINNET = _chunkLUT5BHYLcjs.GRAPHQL_ENDPOINT_MAINNET; exports.GRAPHQL_ENDPOINT_TESTNET = _chunkLUT5BHYLcjs.GRAPHQL_ENDPOINT_TESTNET; exports.LUKSO_CHAINS_BY_ID = _chunkMCNNULYXcjs.LUKSO_CHAINS_BY_ID; exports.SUPPORTED_NETWORK_IDS = _chunkLUT5BHYLcjs.SUPPORTED_NETWORK_IDS; exports.UrlConverter = _chunkQU6NUTY6cjs.UrlConverter; exports.UrlResolver = _chunkQU6NUTY6cjs.UrlResolver; exports.browserInfo = _chunkQU6NUTY6cjs.browserInfo; exports.clearIntlService = _chunkIDQ6WJY5cjs.clearIntlService; exports.createIntlService = _chunkIDQ6WJY5cjs.createIntlService; exports.defaultConfig = _chunkIDQ6WJY5cjs.defaultConfig; exports.deviceService = _chunkNJQVWIZLcjs.deviceService; exports.getChainById = _chunkMCNNULYXcjs.getChainById; exports.getIntlService = _chunkIDQ6WJY5cjs.getIntlService; exports.luksoMainnet = _chunkMCNNULYXcjs.luksoMainnet; exports.luksoTestnet = _chunkMCNNULYXcjs.luksoTestnet; exports.setIntlService = _chunkIDQ6WJY5cjs.setIntlService; exports.slug = _chunkQU6NUTY6cjs.slug; exports.withDeviceService = _chunkUQSIH233cjs.withDeviceService; exports.withIntlService = _chunkKPIUNN26cjs.withIntlService; exports.withTheme = _chunkGBVTZLYFcjs.withTheme;
|
|
64
64
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { Address, ChainExtended, LSPMintableInitAddresses, LUKSO_CHAINS_BY_ID, NetworkSlug, getChainById, luksoMainnet, luksoTestnet } from './chains/index.cjs';
|
|
2
2
|
export { GRAPHQL_ENDPOINT_MAINNET, GRAPHQL_ENDPOINT_TESTNET, SUPPORTED_NETWORK_IDS } from './config.cjs';
|
|
3
|
-
export { withDeviceService } from './mixins/device.cjs';
|
|
4
|
-
export { withIntlService } from './mixins/intl.cjs';
|
|
5
|
-
export { Theme, withTheme } from './mixins/theme.cjs';
|
|
3
|
+
export { DeviceServiceMixin, DeviceServiceMixinConstructor, withDeviceService } from './mixins/device.cjs';
|
|
4
|
+
export { IntlServiceMixin, IntlServiceMixinConstructor, withIntlService } from './mixins/intl.cjs';
|
|
5
|
+
export { Theme, ThemeMixin, ThemeMixinConstructor, withTheme } from './mixins/theme.cjs';
|
|
6
6
|
export { DeviceService, NavigatorExtended, deviceService } from './services/device.cjs';
|
|
7
7
|
export { IntlMessages, IntlService, clearIntlService, createIntlService, defaultConfig, getIntlService, setIntlService } from './services/intl.cjs';
|
|
8
8
|
export { BrowserInfo, BrowserName, EXTENSION_STORE_LINKS, UrlConverter, UrlResolver, browserInfo, slug } from './utils/index.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { Address, ChainExtended, LSPMintableInitAddresses, LUKSO_CHAINS_BY_ID, NetworkSlug, getChainById, luksoMainnet, luksoTestnet } from './chains/index.js';
|
|
2
2
|
export { GRAPHQL_ENDPOINT_MAINNET, GRAPHQL_ENDPOINT_TESTNET, SUPPORTED_NETWORK_IDS } from './config.js';
|
|
3
|
-
export { withDeviceService } from './mixins/device.js';
|
|
4
|
-
export { withIntlService } from './mixins/intl.js';
|
|
5
|
-
export { Theme, withTheme } from './mixins/theme.js';
|
|
3
|
+
export { DeviceServiceMixin, DeviceServiceMixinConstructor, withDeviceService } from './mixins/device.js';
|
|
4
|
+
export { IntlServiceMixin, IntlServiceMixinConstructor, withIntlService } from './mixins/intl.js';
|
|
5
|
+
export { Theme, ThemeMixin, ThemeMixinConstructor, withTheme } from './mixins/theme.js';
|
|
6
6
|
export { DeviceService, NavigatorExtended, deviceService } from './services/device.js';
|
|
7
7
|
export { IntlMessages, IntlService, clearIntlService, createIntlService, defaultConfig, getIntlService, setIntlService } from './services/intl.js';
|
|
8
8
|
export { BrowserInfo, BrowserName, EXTENSION_STORE_LINKS, UrlConverter, UrlResolver, browserInfo, slug } from './utils/index.js';
|
package/dist/index.js
CHANGED
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
import "./chunk-JEE6C34P.js";
|
|
21
21
|
import {
|
|
22
22
|
withDeviceService
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-UF5VAIDL.js";
|
|
24
24
|
import {
|
|
25
25
|
withIntlService
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-GD6H7BSG.js";
|
|
27
27
|
import {
|
|
28
28
|
clearIntlService,
|
|
29
29
|
createIntlService,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
} from "./chunk-HTK4HH4J.js";
|
|
34
34
|
import {
|
|
35
35
|
withTheme
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-O2MNO3WV.js";
|
|
37
37
|
import {
|
|
38
38
|
deviceService
|
|
39
39
|
} from "./chunk-X2QNFZU7.js";
|
package/dist/mixins/device.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkUQSIH233cjs = require('../chunk-UQSIH233.cjs');
|
|
4
4
|
require('../chunk-NJQVWIZL.cjs');
|
|
5
5
|
require('../chunk-ZBDE64SD.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.withDeviceService =
|
|
8
|
+
exports.withDeviceService = _chunkUQSIH233cjs.withDeviceService;
|
|
9
9
|
//# sourceMappingURL=device.cjs.map
|
package/dist/mixins/device.d.cts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
+
import { DeviceService } from '../services/device.cjs';
|
|
3
|
+
import 'ua-parser-js';
|
|
2
4
|
|
|
3
5
|
/**
|
|
4
6
|
* Device Detection Mixin
|
|
@@ -6,6 +8,16 @@ import { LitElement } from 'lit';
|
|
|
6
8
|
* Mixin to add device detection service to a Lit component
|
|
7
9
|
*/
|
|
8
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Interface for components that have device detection capabilities
|
|
13
|
+
*/
|
|
14
|
+
interface DeviceServiceMixin {
|
|
15
|
+
device: DeviceService | undefined;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Type helper for the constructor returned by withDeviceService
|
|
19
|
+
*/
|
|
20
|
+
type DeviceServiceMixinConstructor<T extends typeof LitElement> = (new (...args: any[]) => InstanceType<T> & DeviceServiceMixin) & T;
|
|
9
21
|
/**
|
|
10
22
|
* Mixin to add device detection service to a Lit component
|
|
11
23
|
*
|
|
@@ -29,6 +41,6 @@ import { LitElement } from 'lit';
|
|
|
29
41
|
* }
|
|
30
42
|
* ```
|
|
31
43
|
*/
|
|
32
|
-
declare function withDeviceService<T extends typeof LitElement>(Base: T):
|
|
44
|
+
declare function withDeviceService<T extends typeof LitElement>(Base: T): DeviceServiceMixinConstructor<T>;
|
|
33
45
|
|
|
34
|
-
export { withDeviceService };
|
|
46
|
+
export { type DeviceServiceMixin, type DeviceServiceMixinConstructor, withDeviceService };
|
package/dist/mixins/device.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
+
import { DeviceService } from '../services/device.js';
|
|
3
|
+
import 'ua-parser-js';
|
|
2
4
|
|
|
3
5
|
/**
|
|
4
6
|
* Device Detection Mixin
|
|
@@ -6,6 +8,16 @@ import { LitElement } from 'lit';
|
|
|
6
8
|
* Mixin to add device detection service to a Lit component
|
|
7
9
|
*/
|
|
8
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Interface for components that have device detection capabilities
|
|
13
|
+
*/
|
|
14
|
+
interface DeviceServiceMixin {
|
|
15
|
+
device: DeviceService | undefined;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Type helper for the constructor returned by withDeviceService
|
|
19
|
+
*/
|
|
20
|
+
type DeviceServiceMixinConstructor<T extends typeof LitElement> = (new (...args: any[]) => InstanceType<T> & DeviceServiceMixin) & T;
|
|
9
21
|
/**
|
|
10
22
|
* Mixin to add device detection service to a Lit component
|
|
11
23
|
*
|
|
@@ -29,6 +41,6 @@ import { LitElement } from 'lit';
|
|
|
29
41
|
* }
|
|
30
42
|
* ```
|
|
31
43
|
*/
|
|
32
|
-
declare function withDeviceService<T extends typeof LitElement>(Base: T):
|
|
44
|
+
declare function withDeviceService<T extends typeof LitElement>(Base: T): DeviceServiceMixinConstructor<T>;
|
|
33
45
|
|
|
34
|
-
export { withDeviceService };
|
|
46
|
+
export { type DeviceServiceMixin, type DeviceServiceMixinConstructor, withDeviceService };
|
package/dist/mixins/device.js
CHANGED
package/dist/mixins/index.cjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-DWXFDFMM.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkUQSIH233cjs = require('../chunk-UQSIH233.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkKPIUNN26cjs = require('../chunk-KPIUNN26.cjs');
|
|
8
8
|
require('../chunk-IDQ6WJY5.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkGBVTZLYFcjs = require('../chunk-GBVTZLYF.cjs');
|
|
12
12
|
require('../chunk-NJQVWIZL.cjs');
|
|
13
13
|
require('../chunk-ZBDE64SD.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
exports.withDeviceService =
|
|
18
|
+
exports.withDeviceService = _chunkUQSIH233cjs.withDeviceService; exports.withIntlService = _chunkKPIUNN26cjs.withIntlService; exports.withTheme = _chunkGBVTZLYFcjs.withTheme;
|
|
19
19
|
//# sourceMappingURL=index.cjs.map
|
package/dist/mixins/index.d.cts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
export { withDeviceService } from './device.cjs';
|
|
2
|
-
export { withIntlService } from './intl.cjs';
|
|
3
|
-
export { Theme, withTheme } from './theme.cjs';
|
|
1
|
+
export { DeviceServiceMixin, DeviceServiceMixinConstructor, withDeviceService } from './device.cjs';
|
|
2
|
+
export { IntlServiceMixin, IntlServiceMixinConstructor, withIntlService } from './intl.cjs';
|
|
3
|
+
export { Theme, ThemeMixin, ThemeMixinConstructor, withTheme } from './theme.cjs';
|
|
4
4
|
import 'lit';
|
|
5
|
+
import '../services/device.cjs';
|
|
6
|
+
import 'ua-parser-js';
|
|
7
|
+
import '../services/intl.cjs';
|
|
8
|
+
import '@formatjs/intl';
|
package/dist/mixins/index.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
export { withDeviceService } from './device.js';
|
|
2
|
-
export { withIntlService } from './intl.js';
|
|
3
|
-
export { Theme, withTheme } from './theme.js';
|
|
1
|
+
export { DeviceServiceMixin, DeviceServiceMixinConstructor, withDeviceService } from './device.js';
|
|
2
|
+
export { IntlServiceMixin, IntlServiceMixinConstructor, withIntlService } from './intl.js';
|
|
3
|
+
export { Theme, ThemeMixin, ThemeMixinConstructor, withTheme } from './theme.js';
|
|
4
4
|
import 'lit';
|
|
5
|
+
import '../services/device.js';
|
|
6
|
+
import 'ua-parser-js';
|
|
7
|
+
import '../services/intl.js';
|
|
8
|
+
import '@formatjs/intl';
|
package/dist/mixins/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import "../chunk-JEE6C34P.js";
|
|
2
2
|
import {
|
|
3
3
|
withDeviceService
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-UF5VAIDL.js";
|
|
5
5
|
import {
|
|
6
6
|
withIntlService
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-GD6H7BSG.js";
|
|
8
8
|
import "../chunk-HTK4HH4J.js";
|
|
9
9
|
import {
|
|
10
10
|
withTheme
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-O2MNO3WV.js";
|
|
12
12
|
import "../chunk-X2QNFZU7.js";
|
|
13
13
|
import "../chunk-EUXUH3YW.js";
|
|
14
14
|
export {
|
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 _chunkKPIUNN26cjs = require('../chunk-KPIUNN26.cjs');
|
|
4
4
|
require('../chunk-IDQ6WJY5.cjs');
|
|
5
5
|
require('../chunk-ZBDE64SD.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.withIntlService =
|
|
8
|
+
exports.withIntlService = _chunkKPIUNN26cjs.withIntlService;
|
|
9
9
|
//# sourceMappingURL=intl.cjs.map
|
package/dist/mixins/intl.d.cts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
+
import { IntlService } from '../services/intl.cjs';
|
|
3
|
+
import '@formatjs/intl';
|
|
2
4
|
|
|
3
5
|
/**
|
|
4
6
|
* Internationalization Mixin
|
|
@@ -6,6 +8,17 @@ import { LitElement } from 'lit';
|
|
|
6
8
|
* Mixin to add internationalization service to a Lit component
|
|
7
9
|
*/
|
|
8
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Interface for components that have intl service capabilities
|
|
13
|
+
*/
|
|
14
|
+
interface IntlServiceMixin {
|
|
15
|
+
formatMessage(key?: string, options?: Record<string, string>): string;
|
|
16
|
+
setupLocalIntl(): IntlService | undefined;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Type helper for the constructor returned by withIntlService
|
|
20
|
+
*/
|
|
21
|
+
type IntlServiceMixinConstructor<T extends typeof LitElement> = (new (...args: any[]) => InstanceType<T> & IntlServiceMixin) & T;
|
|
9
22
|
/**
|
|
10
23
|
* Mixin to add internationalization service to a Lit component
|
|
11
24
|
*
|
|
@@ -32,6 +45,6 @@ import { LitElement } from 'lit';
|
|
|
32
45
|
* }
|
|
33
46
|
* ```
|
|
34
47
|
*/
|
|
35
|
-
declare function withIntlService<T extends typeof LitElement>(Base: T):
|
|
48
|
+
declare function withIntlService<T extends typeof LitElement>(Base: T): IntlServiceMixinConstructor<T>;
|
|
36
49
|
|
|
37
|
-
export { withIntlService };
|
|
50
|
+
export { type IntlServiceMixin, type IntlServiceMixinConstructor, withIntlService };
|
package/dist/mixins/intl.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
+
import { IntlService } from '../services/intl.js';
|
|
3
|
+
import '@formatjs/intl';
|
|
2
4
|
|
|
3
5
|
/**
|
|
4
6
|
* Internationalization Mixin
|
|
@@ -6,6 +8,17 @@ import { LitElement } from 'lit';
|
|
|
6
8
|
* Mixin to add internationalization service to a Lit component
|
|
7
9
|
*/
|
|
8
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Interface for components that have intl service capabilities
|
|
13
|
+
*/
|
|
14
|
+
interface IntlServiceMixin {
|
|
15
|
+
formatMessage(key?: string, options?: Record<string, string>): string;
|
|
16
|
+
setupLocalIntl(): IntlService | undefined;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Type helper for the constructor returned by withIntlService
|
|
20
|
+
*/
|
|
21
|
+
type IntlServiceMixinConstructor<T extends typeof LitElement> = (new (...args: any[]) => InstanceType<T> & IntlServiceMixin) & T;
|
|
9
22
|
/**
|
|
10
23
|
* Mixin to add internationalization service to a Lit component
|
|
11
24
|
*
|
|
@@ -32,6 +45,6 @@ import { LitElement } from 'lit';
|
|
|
32
45
|
* }
|
|
33
46
|
* ```
|
|
34
47
|
*/
|
|
35
|
-
declare function withIntlService<T extends typeof LitElement>(Base: T):
|
|
48
|
+
declare function withIntlService<T extends typeof LitElement>(Base: T): IntlServiceMixinConstructor<T>;
|
|
36
49
|
|
|
37
|
-
export { withIntlService };
|
|
50
|
+
export { type IntlServiceMixin, type IntlServiceMixinConstructor, withIntlService };
|
package/dist/mixins/intl.js
CHANGED
package/dist/mixins/theme.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkGBVTZLYFcjs = require('../chunk-GBVTZLYF.cjs');
|
|
4
4
|
require('../chunk-ZBDE64SD.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
exports.withTheme =
|
|
7
|
+
exports.withTheme = _chunkGBVTZLYFcjs.withTheme;
|
|
8
8
|
//# sourceMappingURL=theme.cjs.map
|
package/dist/mixins/theme.d.cts
CHANGED
|
@@ -7,6 +7,18 @@ import { LitElement } from 'lit';
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
type Theme = 'light' | 'dark' | 'auto';
|
|
10
|
+
/**
|
|
11
|
+
* Interface for components that have theme management capabilities
|
|
12
|
+
*/
|
|
13
|
+
interface ThemeMixin {
|
|
14
|
+
theme: Theme;
|
|
15
|
+
isDark: boolean;
|
|
16
|
+
updateTheme(): void;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Type helper for the constructor returned by withTheme
|
|
20
|
+
*/
|
|
21
|
+
type ThemeMixinConstructor<T extends typeof LitElement> = (new (...args: any[]) => InstanceType<T> & ThemeMixin) & T;
|
|
10
22
|
/**
|
|
11
23
|
* Mixin to add theme management to a Lit component
|
|
12
24
|
*
|
|
@@ -40,6 +52,6 @@ type Theme = 'light' | 'dark' | 'auto';
|
|
|
40
52
|
* }
|
|
41
53
|
* ```
|
|
42
54
|
*/
|
|
43
|
-
declare function withTheme<T extends typeof LitElement>(Base: T):
|
|
55
|
+
declare function withTheme<T extends typeof LitElement>(Base: T): ThemeMixinConstructor<T>;
|
|
44
56
|
|
|
45
|
-
export { type Theme, withTheme };
|
|
57
|
+
export { type Theme, type ThemeMixin, type ThemeMixinConstructor, withTheme };
|
package/dist/mixins/theme.d.ts
CHANGED
|
@@ -7,6 +7,18 @@ import { LitElement } from 'lit';
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
type Theme = 'light' | 'dark' | 'auto';
|
|
10
|
+
/**
|
|
11
|
+
* Interface for components that have theme management capabilities
|
|
12
|
+
*/
|
|
13
|
+
interface ThemeMixin {
|
|
14
|
+
theme: Theme;
|
|
15
|
+
isDark: boolean;
|
|
16
|
+
updateTheme(): void;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Type helper for the constructor returned by withTheme
|
|
20
|
+
*/
|
|
21
|
+
type ThemeMixinConstructor<T extends typeof LitElement> = (new (...args: any[]) => InstanceType<T> & ThemeMixin) & T;
|
|
10
22
|
/**
|
|
11
23
|
* Mixin to add theme management to a Lit component
|
|
12
24
|
*
|
|
@@ -40,6 +52,6 @@ type Theme = 'light' | 'dark' | 'auto';
|
|
|
40
52
|
* }
|
|
41
53
|
* ```
|
|
42
54
|
*/
|
|
43
|
-
declare function withTheme<T extends typeof LitElement>(Base: T):
|
|
55
|
+
declare function withTheme<T extends typeof LitElement>(Base: T): ThemeMixinConstructor<T>;
|
|
44
56
|
|
|
45
|
-
export { type Theme, withTheme };
|
|
57
|
+
export { type Theme, type ThemeMixin, type ThemeMixinConstructor, withTheme };
|
package/dist/mixins/theme.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lukso/core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2-dev.205b184",
|
|
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",
|
|
@@ -88,10 +88,10 @@
|
|
|
88
88
|
"url": "https://github.com/lukso-network/up-connector.git"
|
|
89
89
|
},
|
|
90
90
|
"dependencies": {
|
|
91
|
-
"@formatjs/intl": "^
|
|
91
|
+
"@formatjs/intl": "^4.0.2",
|
|
92
92
|
"@preact/signals-core": "^1.12.1",
|
|
93
93
|
"lit": "^3.3.1",
|
|
94
|
-
"ua-parser-js": "^2.0.
|
|
94
|
+
"ua-parser-js": "^2.0.7"
|
|
95
95
|
},
|
|
96
96
|
"peerDependencies": {
|
|
97
97
|
"viem": "^2.0.0"
|
|
@@ -104,8 +104,8 @@
|
|
|
104
104
|
"devDependencies": {
|
|
105
105
|
"tsup": "^8.5.1",
|
|
106
106
|
"typescript": "^5.9.3",
|
|
107
|
-
"viem": "^2.
|
|
108
|
-
"vitest": "^4.0.
|
|
107
|
+
"viem": "^2.43.1",
|
|
108
|
+
"vitest": "^4.0.16"
|
|
109
109
|
},
|
|
110
110
|
"tsup": {
|
|
111
111
|
"entry": [
|
package/src/index.ts
CHANGED
package/src/mixins/device.ts
CHANGED
|
@@ -8,6 +8,21 @@ import type { LitElement } from 'lit'
|
|
|
8
8
|
import type { DeviceService } from '../services/device.js'
|
|
9
9
|
import { deviceService, type NavigatorExtended } from '../services/device.js'
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Interface for components that have device detection capabilities
|
|
13
|
+
*/
|
|
14
|
+
export interface DeviceServiceMixin {
|
|
15
|
+
device: DeviceService | undefined
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Type helper for the constructor returned by withDeviceService
|
|
20
|
+
*/
|
|
21
|
+
export type DeviceServiceMixinConstructor<T extends typeof LitElement> = (new (
|
|
22
|
+
...args: any[]
|
|
23
|
+
) => InstanceType<T> & DeviceServiceMixin) &
|
|
24
|
+
T
|
|
25
|
+
|
|
11
26
|
/**
|
|
12
27
|
* Mixin to add device detection service to a Lit component
|
|
13
28
|
*
|
|
@@ -31,8 +46,9 @@ import { deviceService, type NavigatorExtended } from '../services/device.js'
|
|
|
31
46
|
* }
|
|
32
47
|
* ```
|
|
33
48
|
*/
|
|
34
|
-
|
|
35
|
-
|
|
49
|
+
export function withDeviceService<T extends typeof LitElement>(
|
|
50
|
+
Base: T
|
|
51
|
+
): DeviceServiceMixinConstructor<T> {
|
|
36
52
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
37
53
|
class Mixin extends (Base as any) {
|
|
38
54
|
device: DeviceService | undefined
|
|
@@ -43,6 +59,5 @@ export function withDeviceService<T extends typeof LitElement>(Base: T): any {
|
|
|
43
59
|
}
|
|
44
60
|
}
|
|
45
61
|
|
|
46
|
-
|
|
47
|
-
return Mixin as any
|
|
62
|
+
return Mixin as unknown as DeviceServiceMixinConstructor<T>
|
|
48
63
|
}
|
package/src/mixins/index.ts
CHANGED
|
@@ -4,6 +4,19 @@
|
|
|
4
4
|
* Reusable Lit component mixins for device detection, internationalization, and more
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
export {
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
export {
|
|
8
|
+
type DeviceServiceMixin,
|
|
9
|
+
type DeviceServiceMixinConstructor,
|
|
10
|
+
withDeviceService,
|
|
11
|
+
} from './device.js'
|
|
12
|
+
export {
|
|
13
|
+
type IntlServiceMixin,
|
|
14
|
+
type IntlServiceMixinConstructor,
|
|
15
|
+
withIntlService,
|
|
16
|
+
} from './intl.js'
|
|
17
|
+
export {
|
|
18
|
+
type Theme,
|
|
19
|
+
type ThemeMixin,
|
|
20
|
+
type ThemeMixinConstructor,
|
|
21
|
+
withTheme,
|
|
22
|
+
} from './theme.js'
|
package/src/mixins/intl.ts
CHANGED
|
@@ -15,6 +15,22 @@ import {
|
|
|
15
15
|
setIntlService,
|
|
16
16
|
} from '../services/intl.js'
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Interface for components that have intl service capabilities
|
|
20
|
+
*/
|
|
21
|
+
export interface IntlServiceMixin {
|
|
22
|
+
formatMessage(key?: string, options?: Record<string, string>): string
|
|
23
|
+
setupLocalIntl(): IntlService | undefined
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Type helper for the constructor returned by withIntlService
|
|
28
|
+
*/
|
|
29
|
+
export type IntlServiceMixinConstructor<T extends typeof LitElement> = (new (
|
|
30
|
+
...args: any[]
|
|
31
|
+
) => InstanceType<T> & IntlServiceMixin) &
|
|
32
|
+
T
|
|
33
|
+
|
|
18
34
|
/**
|
|
19
35
|
* Mixin to add internationalization service to a Lit component
|
|
20
36
|
*
|
|
@@ -41,8 +57,9 @@ import {
|
|
|
41
57
|
* }
|
|
42
58
|
* ```
|
|
43
59
|
*/
|
|
44
|
-
|
|
45
|
-
|
|
60
|
+
export function withIntlService<T extends typeof LitElement>(
|
|
61
|
+
Base: T
|
|
62
|
+
): IntlServiceMixinConstructor<T> {
|
|
46
63
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
47
64
|
class Mixin extends (Base as any) {
|
|
48
65
|
protected unsubscribeIntl: (() => void) | undefined = undefined
|
|
@@ -107,6 +124,5 @@ export function withIntlService<T extends typeof LitElement>(Base: T): any {
|
|
|
107
124
|
}
|
|
108
125
|
}
|
|
109
126
|
|
|
110
|
-
|
|
111
|
-
return Mixin as any
|
|
127
|
+
return Mixin as unknown as IntlServiceMixinConstructor<T>
|
|
112
128
|
}
|
package/src/mixins/theme.ts
CHANGED
|
@@ -9,6 +9,23 @@ import { property, state } from 'lit/decorators.js'
|
|
|
9
9
|
|
|
10
10
|
export type Theme = 'light' | 'dark' | 'auto'
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Interface for components that have theme management capabilities
|
|
14
|
+
*/
|
|
15
|
+
export interface ThemeMixin {
|
|
16
|
+
theme: Theme
|
|
17
|
+
isDark: boolean
|
|
18
|
+
updateTheme(): void
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Type helper for the constructor returned by withTheme
|
|
23
|
+
*/
|
|
24
|
+
export type ThemeMixinConstructor<T extends typeof LitElement> = (new (
|
|
25
|
+
...args: any[]
|
|
26
|
+
) => InstanceType<T> & ThemeMixin) &
|
|
27
|
+
T
|
|
28
|
+
|
|
12
29
|
/**
|
|
13
30
|
* Mixin to add theme management to a Lit component
|
|
14
31
|
*
|
|
@@ -42,8 +59,9 @@ export type Theme = 'light' | 'dark' | 'auto'
|
|
|
42
59
|
* }
|
|
43
60
|
* ```
|
|
44
61
|
*/
|
|
45
|
-
|
|
46
|
-
|
|
62
|
+
export function withTheme<T extends typeof LitElement>(
|
|
63
|
+
Base: T
|
|
64
|
+
): ThemeMixinConstructor<T> {
|
|
47
65
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
48
66
|
class Mixin extends (Base as any) {
|
|
49
67
|
/**
|
|
@@ -169,6 +187,5 @@ export function withTheme<T extends typeof LitElement>(Base: T): any {
|
|
|
169
187
|
}
|
|
170
188
|
}
|
|
171
189
|
|
|
172
|
-
|
|
173
|
-
return Mixin as any
|
|
190
|
+
return Mixin as unknown as ThemeMixinConstructor<T>
|
|
174
191
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/mixins/device.ts"],"sourcesContent":["/**\n * Device Detection Mixin\n *\n * Mixin to add device detection service to a Lit component\n */\n\nimport type { LitElement } from 'lit'\nimport type { DeviceService } from '../services/device.js'\nimport { deviceService, type NavigatorExtended } from '../services/device.js'\n\n/**\n * Mixin to add device detection service to a Lit component\n *\n * Provides a `device` property with device/OS/browser detection capabilities.\n * The device service is initialized in connectedCallback and follows component lifecycle.\n *\n * @typeParam T - The Lit component class being extended\n * @returns Extended class with device detection capabilities\n *\n * @example\n * ```typescript\n * import { LitElement } from 'lit';\n * import { customElement } from 'lit/decorators.js';\n * import { withDeviceService } from '@lukso/core/mixins';\n *\n * @customElement('my-component')\n * export class MyComponent extends withDeviceService(LitElement) {\n * render() {\n * return html\\`Device is mobile: \\${this.device?.isMobile}\\`;\n * }\n * }\n * ```\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function withDeviceService<T extends typeof LitElement>(Base: T): any {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n class Mixin extends (Base as any) {\n device: DeviceService | undefined\n\n connectedCallback(): void {\n super.connectedCallback()\n this.device = deviceService(navigator as NavigatorExtended)\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return Mixin as any\n}\n"],"mappings":";;;;;AAkCO,SAAS,kBAA+C,MAAc;AAAA,EAE3E,MAAM,cAAe,KAAa;AAAA,IAGhC,oBAA0B;AACxB,YAAM,kBAAkB;AACxB,WAAK,SAAS,cAAc,SAA8B;AAAA,IAC5D;AAAA,EACF;AAGA,SAAO;AACT;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/service-auth-simple/service-auth-simple/packages/core/dist/chunk-6VE73XQH.cjs","../src/mixins/theme.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;ACGA,iDAAgC;AAsCzB,SAAS,SAAA,CAAuC,IAAA,EAAc;AAAA,EAEnE,MAAM,MAAA,QAAe,KAAa;AAAA,IAAlC,WAAA,CAAA,EAAA;AAAA,MAAA,KAAA,CAAA,GAAA,SAAA,CAAA;AAKE,MAAA,IAAA,CAAA,MAAA,EAAe,OAAA;AAMf,MAAA,IAAA,CAAU,OAAA,EAAS,KAAA;AAOnB,MAAA,IAAA,CAAQ,eAAA,EAAwC,IAAA;AAgEhD;AAAA;AAAA;AAAA;AAAA;AAAA,MAAA,IAAA,CAAQ,uBAAA,EAAyB,CAAC,KAAA,EAAA,GAAqC;AACrE,QAAA,IAAA,CAAK,OAAA,EAAS,KAAA,CAAM,OAAA;AAAA,MACtB,CAAA;AAAA,IAAA;AAAA,IAhEA,iBAAA,CAAA,EAA0B;AACxB,MAAA,KAAA,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K,SAAA,CAAU,MAAA,CAAO,MAAM,CAAA;AAC5B,QAAA,IAAA,CAAK,SAAA,CAAU,SAAA,CAAU,MAAA,CAAO,MAAM,CAAA;AAAA,MACxC;AAAA,IACF;AAAA,EACF;AArHE,EAAA,+CAAA;AAAA,IADC,oCAAA,EAAW,IAAA,EAAM,MAAA,EAAQ,OAAA,EAAS,KAAK,CAAC;AAAA,EAAA,CAAA,EAJrC,KAAA,CAKJ,SAAA,EAAA,OAAA,EAAA,CAAA,CAAA;AAMU,EAAA,+CAAA;AAAA,IADT,iCAAA;AAAM,EAAA,CAAA,EAVH,KAAA,CAWM,SAAA,EAAA,QAAA,EAAA,CAAA,CAAA;AAkHZ,EAAA,OAAO,KAAA;AACT;ADjEA;AACA;AACE;AACF,8BAAC","file":"/home/runner/work/service-auth-simple/service-auth-simple/packages/core/dist/chunk-6VE73XQH.cjs","sourcesContent":[null,"/**\n * Theme Mixin\n *\n * Mixin to add theme detection and management to a Lit component\n */\n\nimport type { LitElement } from 'lit'\nimport { property, state } from 'lit/decorators.js'\n\nexport type Theme = 'light' | 'dark' | 'auto'\n\n/**\n * Mixin to add theme management to a Lit component\n *\n * Provides a `theme` property and `isDark` state that automatically handles:\n * - Manual theme selection ('light' or 'dark')\n * - Auto theme detection based on system preferences\n * - Reactive updates when system theme changes\n * - Automatically wraps all rendered content in a themed div with 'dark' class when dark mode is active\n *\n * All content rendered by the component will be inside a theme-root div that receives the dark class.\n * Components can use render() normally - no changes needed.\n *\n * @typeParam T - The Lit component class being extended\n * @returns Extended class with theme management capabilities\n *\n * @example\n * ```typescript\n * import { LitElement, html } from 'lit';\n * import { customElement } from 'lit/decorators.js';\n * import { withTheme } from '@lukso/core/mixins';\n *\n * @customElement('my-component')\n * export class MyComponent extends withTheme(LitElement) {\n * render() {\n * return html`\n * <div class=\"text-neutral-20 dark:text-neutral-100\">\n * Current theme: ${this.theme}\n * </div>\n * `;\n * }\n * }\n * ```\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function withTheme<T extends typeof LitElement>(Base: T): any {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n class Mixin extends (Base as any) {\n /**\n * Theme mode: 'light', 'dark', or 'auto' (follows system preference)\n */\n @property({ type: String, reflect: true })\n theme: Theme = 'light'\n\n /**\n * Computed state indicating if dark mode is active\n */\n @state()\n protected isDark = false\n\n /**\n * The theme root element that wraps all rendered content and receives the dark class\n */\n private themeRoot!: HTMLDivElement\n\n private mediaQueryList: MediaQueryList | null = null\n\n connectedCallback(): void {\n super.connectedCallback()\n this.updateTheme()\n this.updateHostClass()\n\n // Listen for system theme changes when in 'auto' mode\n if (this.theme === 'auto') {\n this.mediaQueryList = window.matchMedia('(prefers-color-scheme: dark)')\n this.mediaQueryList.addEventListener(\n 'change',\n this.handleMediaQueryChange\n )\n }\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback()\n\n if (this.mediaQueryList) {\n this.mediaQueryList.removeEventListener(\n 'change',\n this.handleMediaQueryChange\n )\n }\n }\n\n updated(changedProperties: Map<string, any>): void {\n super.updated(changedProperties)\n\n // Handle theme changes\n if (changedProperties.has('theme')) {\n this.updateTheme()\n\n // Update media query listener when theme mode changes\n if (this.theme === 'auto' && !this.mediaQueryList) {\n this.mediaQueryList = window.matchMedia(\n '(prefers-color-scheme: dark)'\n )\n this.mediaQueryList.addEventListener(\n 'change',\n this.handleMediaQueryChange\n )\n } else if (this.theme !== 'auto' && this.mediaQueryList) {\n this.mediaQueryList.removeEventListener(\n 'change',\n this.handleMediaQueryChange\n )\n this.mediaQueryList = null\n }\n }\n\n // Update host class when isDark changes\n if (changedProperties.has('isDark')) {\n this.updateHostClass()\n }\n }\n\n /**\n * Handle system theme changes\n *\n * @param event - Media query list event\n */\n private handleMediaQueryChange = (event: MediaQueryListEvent): void => {\n this.isDark = event.matches\n }\n\n /**\n * Update isDark state based on theme property\n */\n protected updateTheme(): void {\n if (this.theme === 'auto') {\n this.isDark = window.matchMedia('(prefers-color-scheme: dark)').matches\n } else {\n this.isDark = this.theme === 'dark'\n }\n }\n\n /**\n * Create the render root with a themed wrapper div\n */\n createRenderRoot(): Element | ShadowRoot {\n const root = super.createRenderRoot()\n\n this.themeRoot = document.createElement('div')\n this.themeRoot.setAttribute('data-theme-root', '')\n\n root.appendChild(this.themeRoot)\n return this.themeRoot\n }\n\n /**\n * Update the host element's and theme root's class based on isDark state\n */\n private updateHostClass(): void {\n if (this.isDark) {\n this.classList.add('dark')\n this.themeRoot.classList.add('dark')\n } else {\n this.classList.remove('dark')\n this.themeRoot.classList.remove('dark')\n }\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return Mixin as any\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/service-auth-simple/service-auth-simple/packages/core/dist/chunk-7CRBSMQ7.cjs","../translations/en_US.json","../src/mixins/intl.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;ACPA,IAAA,cAAA,EAAA;AAAA,EACE,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;ADSA;AACA;AElBA,mDAAuB;AAqChB,SAAS,eAAA,CAA6C,IAAA,EAAc;AAAA,EAEzE,MAAM,MAAA,QAAe,KAAa;AA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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;AAGA,EAAA,OAAO,KAAA;AACT;AF/BA;AACA;AACE;AACF,0CAAC","file":"/home/runner/work/service-auth-simple/service-auth-simple/packages/core/dist/chunk-7CRBSMQ7.cjs","sourcesContent":[null,"{\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}","/**\n * Internationalization Mixin\n *\n * Mixin to add internationalization service to a Lit component\n */\n\nimport englishTranslations from '@lukso/core/translations/en_US.json'\nimport { effect } from '@preact/signals-core'\nimport type { LitElement } from 'lit'\nimport {\n createIntlService,\n defaultConfig,\n getIntlService,\n type IntlService,\n setIntlService,\n} from '../services/intl.js'\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 */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function withIntlService<T extends typeof LitElement>(Base: T): any {\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return Mixin as any\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/service-auth-simple/service-auth-simple/packages/core/dist/chunk-CC3LFUYY.cjs","../src/mixins/device.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;AC8BO,SAAS,iBAAA,CAA+C,IAAA,EAAc;AAAA,EAE3E,MAAM,MAAA,QAAe,KAAa;AAAA,IAGhC,iBAAA,CAAA,EAA0B;AACxB,MAAA,KAAA,CAAM,iBAAA,CAAkB,CAAA;AACxB,MAAA,IAAA,CAAK,OAAA,EAAS,6CAAA,SAA4C,CAAA;AAAA,IAC5D;AAAA,EACF;AAGA,EAAA,OAAO,KAAA;AACT;ADjCA;AACA;AACE;AACF,8CAAC","file":"/home/runner/work/service-auth-simple/service-auth-simple/packages/core/dist/chunk-CC3LFUYY.cjs","sourcesContent":[null,"/**\n * Device Detection Mixin\n *\n * Mixin to add device detection service to a Lit component\n */\n\nimport type { LitElement } from 'lit'\nimport type { DeviceService } from '../services/device.js'\nimport { deviceService, type NavigatorExtended } from '../services/device.js'\n\n/**\n * Mixin to add device detection service to a Lit component\n *\n * Provides a `device` property with device/OS/browser detection capabilities.\n * The device service is initialized in connectedCallback and follows component lifecycle.\n *\n * @typeParam T - The Lit component class being extended\n * @returns Extended class with device detection capabilities\n *\n * @example\n * ```typescript\n * import { LitElement } from 'lit';\n * import { customElement } from 'lit/decorators.js';\n * import { withDeviceService } from '@lukso/core/mixins';\n *\n * @customElement('my-component')\n * export class MyComponent extends withDeviceService(LitElement) {\n * render() {\n * return html\\`Device is mobile: \\${this.device?.isMobile}\\`;\n * }\n * }\n * ```\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function withDeviceService<T extends typeof LitElement>(Base: T): any {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n class Mixin extends (Base as any) {\n device: DeviceService | undefined\n\n connectedCallback(): void {\n super.connectedCallback()\n this.device = deviceService(navigator as NavigatorExtended)\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return Mixin as any\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/mixins/theme.ts"],"sourcesContent":["/**\n * Theme Mixin\n *\n * Mixin to add theme detection and management to a Lit component\n */\n\nimport type { LitElement } from 'lit'\nimport { property, state } from 'lit/decorators.js'\n\nexport type Theme = 'light' | 'dark' | 'auto'\n\n/**\n * Mixin to add theme management to a Lit component\n *\n * Provides a `theme` property and `isDark` state that automatically handles:\n * - Manual theme selection ('light' or 'dark')\n * - Auto theme detection based on system preferences\n * - Reactive updates when system theme changes\n * - Automatically wraps all rendered content in a themed div with 'dark' class when dark mode is active\n *\n * All content rendered by the component will be inside a theme-root div that receives the dark class.\n * Components can use render() normally - no changes needed.\n *\n * @typeParam T - The Lit component class being extended\n * @returns Extended class with theme management capabilities\n *\n * @example\n * ```typescript\n * import { LitElement, html } from 'lit';\n * import { customElement } from 'lit/decorators.js';\n * import { withTheme } from '@lukso/core/mixins';\n *\n * @customElement('my-component')\n * export class MyComponent extends withTheme(LitElement) {\n * render() {\n * return html`\n * <div class=\"text-neutral-20 dark:text-neutral-100\">\n * Current theme: ${this.theme}\n * </div>\n * `;\n * }\n * }\n * ```\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function withTheme<T extends typeof LitElement>(Base: T): any {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n class Mixin extends (Base as any) {\n /**\n * Theme mode: 'light', 'dark', or 'auto' (follows system preference)\n */\n @property({ type: String, reflect: true })\n theme: Theme = 'light'\n\n /**\n * Computed state indicating if dark mode is active\n */\n @state()\n protected isDark = false\n\n /**\n * The theme root element that wraps all rendered content and receives the dark class\n */\n private themeRoot!: HTMLDivElement\n\n private mediaQueryList: MediaQueryList | null = null\n\n connectedCallback(): void {\n super.connectedCallback()\n this.updateTheme()\n this.updateHostClass()\n\n // Listen for system theme changes when in 'auto' mode\n if (this.theme === 'auto') {\n this.mediaQueryList = window.matchMedia('(prefers-color-scheme: dark)')\n this.mediaQueryList.addEventListener(\n 'change',\n this.handleMediaQueryChange\n )\n }\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback()\n\n if (this.mediaQueryList) {\n this.mediaQueryList.removeEventListener(\n 'change',\n this.handleMediaQueryChange\n )\n }\n }\n\n updated(changedProperties: Map<string, any>): void {\n super.updated(changedProperties)\n\n // Handle theme changes\n if (changedProperties.has('theme')) {\n this.updateTheme()\n\n // Update media query listener when theme mode changes\n if (this.theme === 'auto' && !this.mediaQueryList) {\n this.mediaQueryList = window.matchMedia(\n '(prefers-color-scheme: dark)'\n )\n this.mediaQueryList.addEventListener(\n 'change',\n this.handleMediaQueryChange\n )\n } else if (this.theme !== 'auto' && this.mediaQueryList) {\n this.mediaQueryList.removeEventListener(\n 'change',\n this.handleMediaQueryChange\n )\n this.mediaQueryList = null\n }\n }\n\n // Update host class when isDark changes\n if (changedProperties.has('isDark')) {\n this.updateHostClass()\n }\n }\n\n /**\n * Handle system theme changes\n *\n * @param event - Media query list event\n */\n private handleMediaQueryChange = (event: MediaQueryListEvent): void => {\n this.isDark = event.matches\n }\n\n /**\n * Update isDark state based on theme property\n */\n protected updateTheme(): void {\n if (this.theme === 'auto') {\n this.isDark = window.matchMedia('(prefers-color-scheme: dark)').matches\n } else {\n this.isDark = this.theme === 'dark'\n }\n }\n\n /**\n * Create the render root with a themed wrapper div\n */\n createRenderRoot(): Element | ShadowRoot {\n const root = super.createRenderRoot()\n\n this.themeRoot = document.createElement('div')\n this.themeRoot.setAttribute('data-theme-root', '')\n\n root.appendChild(this.themeRoot)\n return this.themeRoot\n }\n\n /**\n * Update the host element's and theme root's class based on isDark state\n */\n private updateHostClass(): void {\n if (this.isDark) {\n this.classList.add('dark')\n this.themeRoot.classList.add('dark')\n } else {\n this.classList.remove('dark')\n this.themeRoot.classList.remove('dark')\n }\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return Mixin as any\n}\n"],"mappings":";;;;;AAOA,SAAS,UAAU,aAAa;AAsCzB,SAAS,U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,MAClE,OAAO;AACL,aAAK,SAAS,KAAK,UAAU;AAAA,MAC/B;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAKA,mBAAyC;AACvC,YAAM,OAAO,MAAM,iBAAiB;AAEpC,WAAK,YAAY,SAAS,cAAc,KAAK;AAC7C,WAAK,UAAU,aAAa,mBAAmB,EAAE;AAEjD,WAAK,YAAY,KAAK,SAAS;AAC/B,aAAO,KAAK;AAAA,IACd;AAAA;AAAA;AAAA;AAAA,IAKQ,kBAAwB;AAC9B,UAAI,KAAK,QAAQ;AACf,aAAK,UAAU,IAAI,MAAM;AACzB,aAAK,UAAU,UAAU,IAAI,MAAM;AAAA,MACrC,OAAO;AACL,aAAK,UAAU,OAAO,MAAM;AAC5B,aAAK,UAAU,UAAU,OAAO,MAAM;AAAA,MACxC;AAAA,IACF;AAAA,EACF;AArHE;AAAA,IADC,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,KAJrC,MAKJ;AAMU;AAAA,IADT,MAAM;AAAA,KAVH,MAWM;AAkHZ,SAAO;AACT;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../translations/en_US.json","../src/mixins/intl.ts"],"sourcesContent":["{\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}","/**\n * Internationalization Mixin\n *\n * Mixin to add internationalization service to a Lit component\n */\n\nimport englishTranslations from '@lukso/core/translations/en_US.json'\nimport { effect } from '@preact/signals-core'\nimport type { LitElement } from 'lit'\nimport {\n createIntlService,\n defaultConfig,\n getIntlService,\n type IntlService,\n setIntlService,\n} from '../services/intl.js'\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 */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function withIntlService<T extends typeof LitElement>(Base: T): any {\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return Mixin as any\n}\n"],"mappings":";;;;;;;;AAAA;AAAA,EACE,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;AAC7C;;;ACRA,SAAS,cAAc;AAqChB,SAAS,gBAA6C,MAAc;AAAA,EAEzE,MAAM,cAAe,KAAa;AAAA,IAAlC;AAAA;AACE,WAAU,kBAA4C;AAAA;AAAA,IAEtD,oBAA0B;AACxB,YAAM,kBAAkB;AAGxB,UAAI,OAA2B,eAAe;AAG9C,UAAI,CAAC,MAAM;AACT,eAAO,KAAK,eAAe,KAAK;AAAA,MAClC;AAEA,UAAI,MAAM;AACR,aAAK,kBAAkB,OAAO,MAAM;AAElC,gBAAM,cAAc;AACpB,eAAK,cAAc;AAAA,QACrB,CAAC;AAAA,MACH;AAGA,YAAM,wBAAwB,aAA0B;AAAA,IAC1D;AAAA,IAEA,uBAA6B;AAC3B,YAAM,qBAAqB;AAG3B,UAAI,OAAO,KAAK,oBAAoB,YAAY;AAC9C,aAAK,gBAAgB;AAAA,MACvB;AAAA,IACF;AAAA;AAAA;AAAA;AAAA;AAAA,IAMU,iBAA0C;AAClD,YAAM,cAAc;AA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