lit-intlayer 8.7.6 → 8.7.7
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/cjs/client/IntlayerBinding.cjs +1 -1
- package/dist/cjs/client/useLocale.cjs +1 -1
- package/dist/cjs/format/useCompact.cjs +1 -1
- package/dist/cjs/format/useCurrency.cjs +1 -1
- package/dist/cjs/format/useDate.cjs +1 -1
- package/dist/cjs/format/useIntl.cjs +1 -1
- package/dist/cjs/format/useList.cjs +1 -1
- package/dist/cjs/format/useNumber.cjs +1 -1
- package/dist/cjs/format/usePercentage.cjs +1 -1
- package/dist/cjs/format/useRelativeTime.cjs +1 -1
- package/dist/cjs/format/useUnit.cjs +1 -1
- package/dist/esm/client/IntlayerBinding.mjs +2 -1
- package/dist/esm/client/useLocale.mjs +2 -1
- package/dist/esm/format/useCompact.mjs +2 -1
- package/dist/esm/format/useCurrency.mjs +2 -1
- package/dist/esm/format/useDate.mjs +2 -1
- package/dist/esm/format/useIntl.mjs +2 -1
- package/dist/esm/format/useList.mjs +2 -1
- package/dist/esm/format/useNumber.mjs +2 -1
- package/dist/esm/format/usePercentage.mjs +2 -1
- package/dist/esm/format/useRelativeTime.mjs +2 -1
- package/dist/esm/format/useUnit.mjs +2 -1
- package/package.json +10 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../installIntlayer-CzjS9bWc.js`);var t=class{host;unsubscribeLocale=null;onConnect;onDisconnect;constructor(e,t,n){this.host=e,this.onConnect=t,this.onDisconnect=n,this.host.addController(this)}hostConnected(){
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../installIntlayer-CzjS9bWc.js`);var t=class{host;unsubscribeLocale=null;onConnect;onDisconnect;constructor(e,t,n){this.host=e,this.onConnect=t,this.onDisconnect=n,this.host.addController(this)}hostConnected(){let t=e.r();this.unsubscribeLocale=t.subscribe(()=>{this.host.requestUpdate()}),this.onConnect?.()}hostDisconnected(){this.unsubscribeLocale?.(),this.unsubscribeLocale=null,this.onDisconnect?.()}};exports.IntlayerBinding=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-r70eQ6nT.js`);const e=require(`../../installIntlayer-CzjS9bWc.js`),t=require(`./useLocaleStorage.cjs`);let n=require(`@intlayer/config/built`);var r=class{host;_isCookieEnabled;_onLocaleChange;_unsubscribe=null;locale;defaultLocale;availableLocales;constructor(t,r={}){this.host=t,this._isCookieEnabled=r.isCookieEnabled,this._onLocaleChange=r.onLocaleChange;let i=e.r(),{defaultLocale:a,locales:o}=n.internationalization??{};this.locale=i.locale,this.defaultLocale=a,this.availableLocales=o??[],t.addController(this)}setLocale=n=>{if(!this.availableLocales.map(String).includes(n)){console.error(`Locale "${n}" is not available.`);return}let r=e.r();r.setLocale(n),t.setLocaleInStorage(n,this._isCookieEnabled??r.isCookieEnabled??!0),this._onLocaleChange?.(n)};hostConnected(){
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-r70eQ6nT.js`);const e=require(`../../installIntlayer-CzjS9bWc.js`),t=require(`./useLocaleStorage.cjs`);let n=require(`@intlayer/config/built`);var r=class{host;_isCookieEnabled;_onLocaleChange;_unsubscribe=null;locale;defaultLocale;availableLocales;constructor(t,r={}){this.host=t,this._isCookieEnabled=r.isCookieEnabled,this._onLocaleChange=r.onLocaleChange;let i=e.r(),{defaultLocale:a,locales:o}=n.internationalization??{};this.locale=i.locale,this.defaultLocale=a,this.availableLocales=o??[],t.addController(this)}setLocale=n=>{if(!this.availableLocales.map(String).includes(n)){console.error(`Locale "${n}" is not available.`);return}let r=e.r();r.setLocale(n),t.setLocaleInStorage(n,this._isCookieEnabled??r.isCookieEnabled??!0),this._onLocaleChange?.(n)};hostConnected(){let t=e.r();this._unsubscribe=t.subscribe(e=>{this.locale=e,this.host.requestUpdate()})}hostDisconnected(){this._unsubscribe?.(),this._unsubscribe=null}},i=(e,t={})=>new r(e,t);exports.LocaleController=r,exports.useLocale=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-r70eQ6nT.js`);const e=require(`../../installIntlayer-CzjS9bWc.js`);let t=require(`@intlayer/core/formatters`);var n=class{host;_unsubscribe=null;value;constructor(n){this.host=n;let r=e.r();this.value=(...e)=>(0,t.compact)(e[0],{...e[1],locale:e[1]?.locale??r.locale}),n.addController(this)}hostConnected(){
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-r70eQ6nT.js`);const e=require(`../../installIntlayer-CzjS9bWc.js`);let t=require(`@intlayer/core/formatters`);var n=class{host;_unsubscribe=null;value;constructor(n){this.host=n;let r=e.r();this.value=(...e)=>(0,t.compact)(e[0],{...e[1],locale:e[1]?.locale??r.locale}),n.addController(this)}hostConnected(){let n=e.r();this._unsubscribe=n.subscribe(e=>{this.value=(...n)=>(0,t.compact)(n[0],{...n[1],locale:n[1]?.locale??e}),this.host.requestUpdate()})}hostDisconnected(){this._unsubscribe?.(),this._unsubscribe=null}},r=e=>new n(e);exports.useCompact=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-r70eQ6nT.js`);const e=require(`../../installIntlayer-CzjS9bWc.js`);let t=require(`@intlayer/core/formatters`);var n=class{host;_unsubscribe=null;value;constructor(n){this.host=n;let r=e.r();this.value=(...e)=>(0,t.currency)(e[0],{...e[1],locale:e[1]?.locale??r.locale}),n.addController(this)}hostConnected(){
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-r70eQ6nT.js`);const e=require(`../../installIntlayer-CzjS9bWc.js`);let t=require(`@intlayer/core/formatters`);var n=class{host;_unsubscribe=null;value;constructor(n){this.host=n;let r=e.r();this.value=(...e)=>(0,t.currency)(e[0],{...e[1],locale:e[1]?.locale??r.locale}),n.addController(this)}hostConnected(){let n=e.r();this._unsubscribe=n.subscribe(e=>{this.value=(...n)=>(0,t.currency)(n[0],{...n[1],locale:n[1]?.locale??e}),this.host.requestUpdate()})}hostDisconnected(){this._unsubscribe?.(),this._unsubscribe=null}},r=e=>new n(e);exports.useCurrency=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-r70eQ6nT.js`);const e=require(`../../installIntlayer-CzjS9bWc.js`);let t=require(`@intlayer/core/formatters`);var n=class{host;_unsubscribe=null;value;constructor(n){this.host=n;let r=e.r();this.value=(...e)=>{let n=typeof e[1]==`string`?{...t.presets[e[1]],locale:r.locale}:{...e[1],locale:e[1]?.locale??r.locale};return(0,t.date)(e[0],n)},n.addController(this)}hostConnected(){
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-r70eQ6nT.js`);const e=require(`../../installIntlayer-CzjS9bWc.js`);let t=require(`@intlayer/core/formatters`);var n=class{host;_unsubscribe=null;value;constructor(n){this.host=n;let r=e.r();this.value=(...e)=>{let n=typeof e[1]==`string`?{...t.presets[e[1]],locale:r.locale}:{...e[1],locale:e[1]?.locale??r.locale};return(0,t.date)(e[0],n)},n.addController(this)}hostConnected(){let n=e.r();this._unsubscribe=n.subscribe(e=>{this.value=(...n)=>{let r=typeof n[1]==`string`?{...t.presets[n[1]],locale:e}:{...n[1],locale:n[1]?.locale??e};return(0,t.date)(n[0],r)},this.host.requestUpdate()})}hostDisconnected(){this._unsubscribe?.(),this._unsubscribe=null}},r=e=>new n(e);exports.useDate=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-r70eQ6nT.js`);const e=require(`../../installIntlayer-CzjS9bWc.js`);let t=require(`@intlayer/core/utils`);var n=class{host;_overrideLocale;_unsubscribe=null;value;constructor(n,r){this.host=n,this._overrideLocale=r;let i=e.r();this.value=(0,t.bindIntl)(this._overrideLocale??i.locale),n.addController(this)}hostConnected(){
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-r70eQ6nT.js`);const e=require(`../../installIntlayer-CzjS9bWc.js`);let t=require(`@intlayer/core/utils`);var n=class{host;_overrideLocale;_unsubscribe=null;value;constructor(n,r){this.host=n,this._overrideLocale=r;let i=e.r();this.value=(0,t.bindIntl)(this._overrideLocale??i.locale),n.addController(this)}hostConnected(){let n=e.r();this._unsubscribe=n.subscribe(e=>{this.value=(0,t.bindIntl)(this._overrideLocale??e),this.host.requestUpdate()})}hostDisconnected(){this._unsubscribe?.(),this._unsubscribe=null}},r=(e,t)=>new n(e,t);exports.useIntl=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-r70eQ6nT.js`);const e=require(`../../installIntlayer-CzjS9bWc.js`);let t=require(`@intlayer/core/formatters`);var n=class{host;_unsubscribe=null;value;constructor(n){this.host=n;let r=e.r();this.value=(...e)=>(0,t.list)(e[0],{...e[1],locale:e[1]?.locale??r.locale}),n.addController(this)}hostConnected(){
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-r70eQ6nT.js`);const e=require(`../../installIntlayer-CzjS9bWc.js`);let t=require(`@intlayer/core/formatters`);var n=class{host;_unsubscribe=null;value;constructor(n){this.host=n;let r=e.r();this.value=(...e)=>(0,t.list)(e[0],{...e[1],locale:e[1]?.locale??r.locale}),n.addController(this)}hostConnected(){let n=e.r();this._unsubscribe=n.subscribe(e=>{this.value=(...n)=>(0,t.list)(n[0],{...n[1],locale:n[1]?.locale??e}),this.host.requestUpdate()})}hostDisconnected(){this._unsubscribe?.(),this._unsubscribe=null}},r=e=>new n(e);exports.useList=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-r70eQ6nT.js`);const e=require(`../../installIntlayer-CzjS9bWc.js`);let t=require(`@intlayer/core/formatters`);var n=class{host;_unsubscribe=null;value;constructor(n){this.host=n;let r=e.r();this.value=(...e)=>(0,t.number)(e[0],{...e[1],locale:e[1]?.locale??r.locale}),n.addController(this)}hostConnected(){
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-r70eQ6nT.js`);const e=require(`../../installIntlayer-CzjS9bWc.js`);let t=require(`@intlayer/core/formatters`);var n=class{host;_unsubscribe=null;value;constructor(n){this.host=n;let r=e.r();this.value=(...e)=>(0,t.number)(e[0],{...e[1],locale:e[1]?.locale??r.locale}),n.addController(this)}hostConnected(){let n=e.r();this._unsubscribe=n.subscribe(e=>{this.value=(...n)=>(0,t.number)(n[0],{...n[1],locale:n[1]?.locale??e}),this.host.requestUpdate()})}hostDisconnected(){this._unsubscribe?.(),this._unsubscribe=null}},r=e=>new n(e);exports.useNumber=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-r70eQ6nT.js`);const e=require(`../../installIntlayer-CzjS9bWc.js`);let t=require(`@intlayer/core/formatters`);var n=class{host;_unsubscribe=null;value;constructor(n){this.host=n;let r=e.r();this.value=(...e)=>(0,t.percentage)(e[0],{...e[1],locale:e[1]?.locale??r.locale}),n.addController(this)}hostConnected(){
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-r70eQ6nT.js`);const e=require(`../../installIntlayer-CzjS9bWc.js`);let t=require(`@intlayer/core/formatters`);var n=class{host;_unsubscribe=null;value;constructor(n){this.host=n;let r=e.r();this.value=(...e)=>(0,t.percentage)(e[0],{...e[1],locale:e[1]?.locale??r.locale}),n.addController(this)}hostConnected(){let n=e.r();this._unsubscribe=n.subscribe(e=>{this.value=(...n)=>(0,t.percentage)(n[0],{...n[1],locale:n[1]?.locale??e}),this.host.requestUpdate()})}hostDisconnected(){this._unsubscribe?.(),this._unsubscribe=null}},r=e=>new n(e);exports.usePercentage=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-r70eQ6nT.js`);const e=require(`../../installIntlayer-CzjS9bWc.js`);let t=require(`@intlayer/core/formatters`);var n=class{host;_unsubscribe=null;value;constructor(n){this.host=n;let r=e.r();this.value=(...e)=>(0,t.relativeTime)(e[0],e[1],{...e[2],locale:e[2]?.locale??r.locale}),n.addController(this)}hostConnected(){
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-r70eQ6nT.js`);const e=require(`../../installIntlayer-CzjS9bWc.js`);let t=require(`@intlayer/core/formatters`);var n=class{host;_unsubscribe=null;value;constructor(n){this.host=n;let r=e.r();this.value=(...e)=>(0,t.relativeTime)(e[0],e[1],{...e[2],locale:e[2]?.locale??r.locale}),n.addController(this)}hostConnected(){let n=e.r();this._unsubscribe=n.subscribe(e=>{this.value=(...n)=>(0,t.relativeTime)(n[0],n[1],{...n[2],locale:n[2]?.locale??e}),this.host.requestUpdate()})}hostDisconnected(){this._unsubscribe?.(),this._unsubscribe=null}},r=e=>new n(e);exports.useRelativeTime=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-r70eQ6nT.js`);const e=require(`../../installIntlayer-CzjS9bWc.js`);let t=require(`@intlayer/core/formatters`);var n=class{host;_unsubscribe=null;value;constructor(n){this.host=n;let r=e.r();this.value=(...e)=>(0,t.units)(e[0],{...e[1],locale:e[1]?.locale??r.locale}),n.addController(this)}hostConnected(){
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-r70eQ6nT.js`);const e=require(`../../installIntlayer-CzjS9bWc.js`);let t=require(`@intlayer/core/formatters`);var n=class{host;_unsubscribe=null;value;constructor(n){this.host=n;let r=e.r();this.value=(...e)=>(0,t.units)(e[0],{...e[1],locale:e[1]?.locale??r.locale}),n.addController(this)}hostConnected(){let n=e.r();this._unsubscribe=n.subscribe(e=>{this.value=(...n)=>(0,t.units)(n[0],{...n[1],locale:n[1]?.locale??e}),this.host.requestUpdate()})}hostDisconnected(){this._unsubscribe?.(),this._unsubscribe=null}},r=e=>new n(e);exports.useUnit=r;
|
|
@@ -9,7 +9,8 @@ var t = class {
|
|
|
9
9
|
this.host = e, this.onConnect = t, this.onDisconnect = n, this.host.addController(this);
|
|
10
10
|
}
|
|
11
11
|
hostConnected() {
|
|
12
|
-
|
|
12
|
+
let t = e();
|
|
13
|
+
this.unsubscribeLocale = t.subscribe(() => {
|
|
13
14
|
this.host.requestUpdate();
|
|
14
15
|
}), this.onConnect?.();
|
|
15
16
|
}
|
|
@@ -24,7 +24,8 @@ var r = class {
|
|
|
24
24
|
r.setLocale(n), t(n, this._isCookieEnabled ?? r.isCookieEnabled ?? !0), this._onLocaleChange?.(n);
|
|
25
25
|
};
|
|
26
26
|
hostConnected() {
|
|
27
|
-
|
|
27
|
+
let t = e();
|
|
28
|
+
this._unsubscribe = t.subscribe((e) => {
|
|
28
29
|
this.locale = e, this.host.requestUpdate();
|
|
29
30
|
});
|
|
30
31
|
}
|
|
@@ -20,7 +20,8 @@ var r = class {
|
|
|
20
20
|
}, r.addController(this);
|
|
21
21
|
}
|
|
22
22
|
hostConnected() {
|
|
23
|
-
|
|
23
|
+
let r = e();
|
|
24
|
+
this._unsubscribe = r.subscribe((e) => {
|
|
24
25
|
this.value = (...r) => {
|
|
25
26
|
let i = typeof r[1] == "string" ? {
|
|
26
27
|
...n[r[1]],
|
|
@@ -12,7 +12,8 @@ var n = class {
|
|
|
12
12
|
this.value = t(this._overrideLocale ?? i.locale), n.addController(this);
|
|
13
13
|
}
|
|
14
14
|
hostConnected() {
|
|
15
|
-
|
|
15
|
+
let n = e();
|
|
16
|
+
this._unsubscribe = n.subscribe((e) => {
|
|
16
17
|
this.value = t(this._overrideLocale ?? e), this.host.requestUpdate();
|
|
17
18
|
});
|
|
18
19
|
}
|
|
@@ -14,7 +14,8 @@ var n = class {
|
|
|
14
14
|
}), n.addController(this);
|
|
15
15
|
}
|
|
16
16
|
hostConnected() {
|
|
17
|
-
|
|
17
|
+
let n = e();
|
|
18
|
+
this._unsubscribe = n.subscribe((e) => {
|
|
18
19
|
this.value = (...n) => t(n[0], n[1], {
|
|
19
20
|
...n[2],
|
|
20
21
|
locale: n[2]?.locale ?? e
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lit-intlayer",
|
|
3
|
-
"version": "8.7.
|
|
3
|
+
"version": "8.7.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Easily internationalize i18n your Lit applications with type-safe multilingual content management.",
|
|
6
6
|
"keywords": [
|
|
@@ -103,11 +103,11 @@
|
|
|
103
103
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
104
104
|
},
|
|
105
105
|
"dependencies": {
|
|
106
|
-
"@intlayer/api": "8.7.
|
|
107
|
-
"@intlayer/config": "8.7.
|
|
108
|
-
"@intlayer/core": "8.7.
|
|
109
|
-
"@intlayer/editor": "8.7.
|
|
110
|
-
"@intlayer/types": "8.7.
|
|
106
|
+
"@intlayer/api": "8.7.7",
|
|
107
|
+
"@intlayer/config": "8.7.7",
|
|
108
|
+
"@intlayer/core": "8.7.7",
|
|
109
|
+
"@intlayer/editor": "8.7.7",
|
|
110
|
+
"@intlayer/types": "8.7.7"
|
|
111
111
|
},
|
|
112
112
|
"devDependencies": {
|
|
113
113
|
"@types/node": "25.6.0",
|
|
@@ -116,14 +116,14 @@
|
|
|
116
116
|
"@utils/tsdown-config": "1.0.4",
|
|
117
117
|
"fast-glob": "3.3.3",
|
|
118
118
|
"rimraf": "6.1.3",
|
|
119
|
-
"tsdown": "0.21.
|
|
119
|
+
"tsdown": "0.21.10",
|
|
120
120
|
"typescript": "6.0.3",
|
|
121
|
-
"vite": "8.0.
|
|
121
|
+
"vite": "8.0.10",
|
|
122
122
|
"vite-plugin-dts": "4.5.4",
|
|
123
|
-
"vitest": "4.1.
|
|
123
|
+
"vitest": "4.1.5"
|
|
124
124
|
},
|
|
125
125
|
"peerDependencies": {
|
|
126
|
-
"intlayer": "8.7.
|
|
126
|
+
"intlayer": "8.7.7",
|
|
127
127
|
"lit": ">=3.0.0"
|
|
128
128
|
},
|
|
129
129
|
"peerDependenciesMeta": {
|