lit-intlayer 8.6.9 → 8.7.0-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/client/IntlayerBinding.cjs +1 -1
- package/dist/cjs/client/index.cjs +1 -1
- package/dist/cjs/client/installIntlayer.cjs +1 -1
- package/dist/cjs/client/useDictionary.cjs +1 -1
- package/dist/cjs/client/useDictionaryDynamic.cjs +1 -1
- package/dist/cjs/client/useIntlayer.cjs +1 -1
- package/dist/cjs/client/useLocale.cjs +1 -1
- package/dist/cjs/client/useLocaleStorage.cjs +1 -1
- package/dist/cjs/client/useRewriteURL.cjs +1 -1
- package/dist/cjs/editor/useEditor.cjs +1 -1
- package/dist/cjs/format/index.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/cjs/getDictionary.cjs +1 -1
- package/dist/cjs/getIntlayer.cjs +1 -1
- package/dist/cjs/html/HTMLRenderer.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/markdown/MarkdownRenderer.cjs +1 -1
- package/dist/cjs/markdown/compiler.cjs +1 -1
- package/dist/cjs/plugins.cjs +1 -1
- package/dist/esm/client/IntlayerBinding.mjs +1 -1
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/installIntlayer.mjs +1 -1
- package/dist/esm/client/useDictionary.mjs +1 -1
- package/dist/esm/client/useDictionaryDynamic.mjs +1 -1
- package/dist/esm/client/useIntlayer.mjs +1 -1
- package/dist/esm/client/useLocale.mjs +1 -1
- package/dist/esm/client/useRewriteURL.mjs +1 -1
- package/dist/esm/editor/useEditor.mjs +1 -1
- package/dist/esm/format/index.mjs +10 -10
- package/dist/esm/format/useCompact.mjs +1 -1
- package/dist/esm/format/useCurrency.mjs +1 -1
- package/dist/esm/format/useDate.mjs +1 -1
- package/dist/esm/format/useIntl.mjs +1 -1
- package/dist/esm/format/useList.mjs +1 -1
- package/dist/esm/format/useNumber.mjs +1 -1
- package/dist/esm/format/usePercentage.mjs +1 -1
- package/dist/esm/format/useRelativeTime.mjs +1 -1
- package/dist/esm/format/useUnit.mjs +1 -1
- package/dist/esm/index.mjs +4 -4
- package/dist/esm/plugins.mjs +22 -22
- package/dist/{installIntlayer-CsvLqZuB.mjs → installIntlayer-DCwculig.mjs} +4 -4
- package/dist/{installIntlayer-DMIkS15Y.js → installIntlayer-DrtuR0-v.js} +1 -1
- package/dist/{plugins-D2ByX3NK.js → plugins-CCaXtc4l.js} +1 -1
- package/package.json +12 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../installIntlayer-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../installIntlayer-DrtuR0-v.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(){this.unsubscribeLocale=e.r().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`});const e=require(`../../installIntlayer-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../installIntlayer-DrtuR0-v.js`),t=require(`./IntlayerBinding.cjs`),n=require(`./useDictionary.cjs`),r=require(`./useDictionaryDynamic.cjs`),i=require(`./useIntlayer.cjs`),a=require(`./useLocaleStorage.cjs`),o=require(`./useLocale.cjs`),s=require(`./useRewriteURL.cjs`);exports.IntlayerBinding=t.IntlayerBinding,exports.IntlayerClient=e.t,exports.LocaleController=o.LocaleController,exports.createIntlayerClient=e.n,exports.getIntlayerClient=e.r,exports.installIntlayer=e.i,exports.localeCookie=a.localeCookie,exports.localeInStorage=a.localeInStorage,exports.setLocaleCookie=a.setLocaleCookie,exports.setLocaleInStorage=a.setLocaleInStorage,exports.useDictionary=n.useDictionary,exports.useDictionaryDynamic=r.useDictionaryDynamic,exports.useIntlayer=i.useIntlayer,exports.useLocale=o.useLocale,exports.useLocaleCookie=a.useLocaleCookie,exports.useLocaleStorage=a.useLocaleStorage,exports.useRewriteURL=s.useRewriteURL;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../installIntlayer-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../installIntlayer-DrtuR0-v.js`);exports.IntlayerClient=e.t,exports.createIntlayerClient=e.n,exports.getIntlayerClient=e.r,exports.installIntlayer=e.i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-CCaXtc4l.js`);const e=require(`../../installIntlayer-DrtuR0-v.js`),t=require(`../getDictionary.cjs`),n=require(`./IntlayerBinding.cjs`);let r=require(`@intlayer/config/built`);var i=(i,a)=>{let o=e.r(),s=t.getDictionary(i,a??o.locale??r.internationalization.defaultLocale);o.subscribe(e=>{s=t.getDictionary(i,a??e)});let c,l=new Proxy({},{get(e,t){if(t===`observe`)return c;if(t===Symbol.toPrimitive)return()=>s[Symbol.toPrimitive]?.()??``;if(t===`toString`)return()=>String(s.toString?.()??``);if(t!==`then`)return s[t]}});return c=e=>(new n.IntlayerBinding(e),l),l};exports.useDictionary=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-CCaXtc4l.js`);const e=require(`../../installIntlayer-DrtuR0-v.js`),t=require(`../getDictionary.cjs`),n=require(`./IntlayerBinding.cjs`);let r=require(`@intlayer/config/built`);var i=new Map,a=async(e,t)=>{if(!t)return;if(i.has(e))return i.get(e);let n=await t();return i.set(e,n),n},o=new Proxy(()=>{},{get:(e,t)=>{if(t===Symbol.toPrimitive||t===`toString`)return()=>``;if(t!==`then`&&!(typeof t==`string`&&t.startsWith(`_$`))&&t!==`nodeType`&&t!==Symbol.iterator)return o},apply:()=>o,construct:()=>({})}),s=(i,s,c)=>{let l=e.r(),u=()=>c??l.locale??r.internationalization.defaultLocale,d,f=new Set,p=e=>{let n=`${String(s)}.${e}`,r=i[e];a(n,r).then(n=>{if(n){d=t.getDictionary(n,e);for(let e of f)e()}})};p(u()),l.subscribe(e=>{p(c??e)});let m,h=new Proxy({},{get(e,t){if(t===`observe`)return m;if(t===Symbol.toPrimitive)return()=>void 0;if(t===`toString`)return()=>``;if(t!==`then`)return d===void 0?o:d[t]}});return m=e=>{let t=()=>e.requestUpdate();return f.add(t),new n.IntlayerBinding(e,()=>{d!==void 0&&e.requestUpdate()},()=>{f.delete(t)}),h},h};exports.useDictionaryDynamic=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-CCaXtc4l.js`);const e=require(`../../installIntlayer-DrtuR0-v.js`),t=require(`../getIntlayer.cjs`),n=require(`./IntlayerBinding.cjs`);let r=require(`@intlayer/config/built`);var i=(i,a)=>{let o=e.r(),s,c=null,l=new Proxy({},{get(e,u){if(u===`observe`)return e=>(new n.IntlayerBinding(e),l);if(u===Symbol.toPrimitive||u===`toString`)return()=>``;if(u===`then`||typeof u==`symbol`||typeof u==`string`&&u.startsWith(`_$`))return;let d=a??o.locale??r.internationalization.defaultLocale;return(s!==d||c===null)&&(c=t.getIntlayer(i,d),s=d),c[u]}});return l};exports.useIntlayer=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-CCaXtc4l.js`);const e=require(`../../installIntlayer-DrtuR0-v.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(){this._unsubscribe=e.r().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-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-CCaXtc4l.js`);let e=require(`@intlayer/core/localization`),t=require(`@intlayer/core/utils`);var n=(0,t.getLocaleFromStorageClient)(e.localeStorageOptions),r=n,i=(n,r)=>(0,t.setLocaleInStorageClient)(n,{...e.localeStorageOptions,isCookieEnabled:r}),a=i,o=n=>{let r=(0,t.LocaleStorageClient)({...e.localeStorageOptions,isCookieEnabled:n});return{localeStorage:r.getLocale(),setLocaleStorage:r.setLocale}},s=e=>{let t=o(e);return{localeCookie:t.localeStorage,setLocaleCookie:t.setLocaleStorage}};exports.localeCookie=r,exports.localeInStorage=n,exports.setLocaleCookie=a,exports.setLocaleInStorage=i,exports.useLocaleCookie=s,exports.useLocaleStorage=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-CCaXtc4l.js`);const e=require(`../../installIntlayer-DrtuR0-v.js`);let t=require(`@intlayer/config/built`),n=require(`@intlayer/core/localization`);var r=class{_host;_unsubscribe=null;constructor(e){this._host=e,e.addController(this)}_rewrite(e){let r=t.routing?.rewrite;if(typeof window>`u`||!r)return;let i=window.location.pathname,a=(0,n.getRewritePath)(i,e,r);a&&a!==i&&window.history.replaceState(window.history.state,``,a+window.location.search+window.location.hash)}hostConnected(){let t=e.r();this._rewrite(t.locale),this._unsubscribe=t.subscribe(e=>{this._rewrite(e)})}hostDisconnected(){this._unsubscribe?.(),this._unsubscribe=null}},i=e=>{new r(e)};exports.useRewriteURL=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../installIntlayer-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../installIntlayer-DrtuR0-v.js`);exports.useEditor=e.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./useUnit.cjs`),t=require(`./useDate.cjs`),n=require(`./useNumber.cjs`),r=require(`./useRelativeTime.cjs`),i=require(`./useCompact.cjs`),a=require(`./useIntl.cjs`),o=require(`./useList.cjs`),s=require(`./usePercentage.cjs`),c=require(`./useCurrency.cjs`);exports.useCompact=i.useCompact,exports.useCurrency=c.useCurrency,exports.useDate=t.useDate,exports.useIntl=a.useIntl,exports.useList=o.useList,exports.useNumber=n.useNumber,exports.usePercentage=s.usePercentage,exports.useRelativeTime=r.useRelativeTime,exports.useUnit=e.useUnit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-CCaXtc4l.js`);const e=require(`../../installIntlayer-DrtuR0-v.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(){this._unsubscribe=e.r().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-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-CCaXtc4l.js`);const e=require(`../../installIntlayer-DrtuR0-v.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(){this._unsubscribe=e.r().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-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-CCaXtc4l.js`);const e=require(`../../installIntlayer-DrtuR0-v.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(){this._unsubscribe=e.r().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-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-CCaXtc4l.js`);const e=require(`../../installIntlayer-DrtuR0-v.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(){this._unsubscribe=e.r().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-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-CCaXtc4l.js`);const e=require(`../../installIntlayer-DrtuR0-v.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(){this._unsubscribe=e.r().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-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-CCaXtc4l.js`);const e=require(`../../installIntlayer-DrtuR0-v.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(){this._unsubscribe=e.r().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-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-CCaXtc4l.js`);const e=require(`../../installIntlayer-DrtuR0-v.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(){this._unsubscribe=e.r().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-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-CCaXtc4l.js`);const e=require(`../../installIntlayer-DrtuR0-v.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(){this._unsubscribe=e.r().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-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-CCaXtc4l.js`);const e=require(`../../installIntlayer-DrtuR0-v.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(){this._unsubscribe=e.r().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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../plugins-CCaXtc4l.js`);let t=require(`@intlayer/core/interpreter`);var n=(n,r)=>(0,t.getDictionary)(n,r,e.t(r));exports.getDictionary=n;
|
package/dist/cjs/getIntlayer.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../plugins-CCaXtc4l.js`);let t=require(`@intlayer/core/interpreter`);var n=(n,r)=>(0,t.getIntlayer)(n,r,e.t(r));exports.getIntlayer=n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-CCaXtc4l.js`);const e=require(`./installIntlayerHTML.cjs`);let t=require(`lit/directives/unsafe-html.js`),n=require(`lit`);var r=(e,t={})=>e,i=({components:t}={})=>{let n=e.useHTML();return e=>n.renderHTML(e,{components:t})},a=class extends n.LitElement{static properties={content:{type:String},components:{attribute:!1}};content=``;components;createRenderRoot(){return this}render(){return this.content?n.html`${(0,t.unsafeHTML)(i({components:this.components})(this.content))}`:n.nothing}};customElements.get(`intlayer-html-renderer`)||customElements.define(`intlayer-html-renderer`,a),exports.HTMLRenderer=a,exports.renderHTML=r,exports.useHTMLRenderer=i;
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../plugins-CCaXtc4l.js`),t=require(`../installIntlayer-DrtuR0-v.js`),n=require(`./getIntlayer.cjs`),r=require(`./getDictionary.cjs`),i=require(`./client/IntlayerBinding.cjs`),a=require(`./client/useDictionary.cjs`),o=require(`./client/useDictionaryDynamic.cjs`),s=require(`./client/useIntlayer.cjs`),c=require(`./client/useLocaleStorage.cjs`),l=require(`./client/useLocale.cjs`),u=require(`./client/useRewriteURL.cjs`);require(`./client/index.cjs`),exports.IntlayerBinding=i.IntlayerBinding,exports.IntlayerClient=t.t,exports.LocaleController=l.LocaleController,exports.createIntlayerClient=t.n,exports.getDictionary=r.getDictionary,exports.getIntlayer=n.getIntlayer,exports.getIntlayerClient=t.r,exports.getPlugins=e.t,exports.htmlPlugin=e.n,exports.insertionPlugin=e.r,exports.installIntlayer=t.i,exports.intlayerNodePlugins=e.i,exports.localeCookie=c.localeCookie,exports.localeInStorage=c.localeInStorage,exports.markdownPlugin=e.a,exports.markdownStringPlugin=e.o,exports.setLocaleCookie=c.setLocaleCookie,exports.setLocaleInStorage=c.setLocaleInStorage,exports.useDictionary=a.useDictionary,exports.useDictionaryDynamic=o.useDictionaryDynamic,exports.useEditor=t.a,exports.useIntlayer=s.useIntlayer,exports.useLocale=l.useLocale,exports.useLocaleCookie=c.useLocaleCookie,exports.useLocaleStorage=c.useLocaleStorage,exports.useRewriteURL=u.useRewriteURL;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-CCaXtc4l.js`);const e=require(`./compiler.cjs`),t=require(`./installIntlayerMarkdown.cjs`);let n=require(`lit/directives/unsafe-html.js`),r=require(`lit`);var i=(t,{forceBlock:n,forceInline:r,preserveFrontmatter:i,tagfilter:a}={})=>e.compileMarkdown(t,{forceBlock:n,forceInline:r,preserveFrontmatter:i,tagfilter:a}),a=(e={})=>{let n=t.useMarkdown();return t=>n.renderMarkdown(t,{forceBlock:e.forceBlock,forceInline:e.forceInline,preserveFrontmatter:e.preserveFrontmatter,tagfilter:e.tagfilter},e.components,e.wrapper)},o=class extends r.LitElement{static properties={content:{type:String},forceBlock:{type:Boolean},forceInline:{type:Boolean},preserveFrontmatter:{type:Boolean},tagfilter:{type:Boolean},renderMarkdown:{attribute:!1}};content=``;forceBlock;forceInline;preserveFrontmatter;tagfilter;renderMarkdownFn;createRenderRoot(){return this}render(){if(!this.content)return r.nothing;let e;return e=this.renderMarkdownFn?this.renderMarkdownFn(this.content,{forceBlock:this.forceBlock,forceInline:this.forceInline,preserveFrontmatter:this.preserveFrontmatter,tagfilter:this.tagfilter},void 0,void 0):a({forceBlock:this.forceBlock,forceInline:this.forceInline,preserveFrontmatter:this.preserveFrontmatter,tagfilter:this.tagfilter})(this.content),r.html`${(0,n.unsafeHTML)(e)}`}};customElements.get(`intlayer-markdown-renderer`)||customElements.define(`intlayer-markdown-renderer`,o),exports.MarkdownRenderer=o,exports.renderMarkdown=i,exports.useMarkdownRenderer=a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-CCaXtc4l.js`);const e=require(`./runtime.cjs`);let t=require(`@intlayer/core/markdown`);var n=(n=``,r={})=>(0,t.compileWithOptions)(n,e.default,r),r=n,i=n;exports.RuleType=t.RuleType,exports.compile=i,exports.compileMarkdown=n,exports.compiler=r,exports.sanitizer=t.sanitizer,exports.slugify=t.slugify;
|
package/dist/cjs/plugins.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../plugins-CCaXtc4l.js`);exports.getPlugins=e.t,exports.htmlPlugin=e.n,exports.insertionPlugin=e.r,exports.intlayerNodePlugins=e.i,exports.markdownPlugin=e.a,exports.markdownStringPlugin=e.o;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as e, n as t, r as n, t as r } from "../../installIntlayer-
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "../../installIntlayer-DCwculig.mjs";
|
|
2
2
|
import { IntlayerBinding as i } from "./IntlayerBinding.mjs";
|
|
3
3
|
import { useDictionary as a } from "./useDictionary.mjs";
|
|
4
4
|
import { useDictionaryDynamic as o } from "./useDictionaryDynamic.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as e, n as t, r as n, t as r } from "../../installIntlayer-
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "../../installIntlayer-DCwculig.mjs";
|
|
2
2
|
export { r as IntlayerClient, t as createIntlayerClient, n as getIntlayerClient, e as installIntlayer };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as e } from "../../installIntlayer-
|
|
1
|
+
import { r as e } from "../../installIntlayer-DCwculig.mjs";
|
|
2
2
|
import { getDictionary as t } from "../getDictionary.mjs";
|
|
3
3
|
import { IntlayerBinding as n } from "./IntlayerBinding.mjs";
|
|
4
4
|
import { internationalization as r } from "@intlayer/config/built";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as e } from "../../installIntlayer-
|
|
1
|
+
import { r as e } from "../../installIntlayer-DCwculig.mjs";
|
|
2
2
|
import { getDictionary as t } from "../getDictionary.mjs";
|
|
3
3
|
import { IntlayerBinding as n } from "./IntlayerBinding.mjs";
|
|
4
4
|
import { internationalization as r } from "@intlayer/config/built";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as e } from "../../installIntlayer-
|
|
1
|
+
import { r as e } from "../../installIntlayer-DCwculig.mjs";
|
|
2
2
|
import { getIntlayer as t } from "../getIntlayer.mjs";
|
|
3
3
|
import { IntlayerBinding as n } from "./IntlayerBinding.mjs";
|
|
4
4
|
import { internationalization as r } from "@intlayer/config/built";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as e } from "../../installIntlayer-
|
|
1
|
+
import { r as e } from "../../installIntlayer-DCwculig.mjs";
|
|
2
2
|
import { setLocaleInStorage as t } from "./useLocaleStorage.mjs";
|
|
3
3
|
import { internationalization as n } from "@intlayer/config/built";
|
|
4
4
|
//#region src/client/useLocale.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as e } from "../../installIntlayer-
|
|
1
|
+
import { r as e } from "../../installIntlayer-DCwculig.mjs";
|
|
2
2
|
import { routing as t } from "@intlayer/config/built";
|
|
3
3
|
import { getRewritePath as n } from "@intlayer/core/localization";
|
|
4
4
|
//#region src/client/useRewriteURL.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e } from "../../installIntlayer-
|
|
1
|
+
import { a as e } from "../../installIntlayer-DCwculig.mjs";
|
|
2
2
|
export { e as useEditor };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
export {
|
|
1
|
+
import { useUnit as e } from "./useUnit.mjs";
|
|
2
|
+
import { useDate as t } from "./useDate.mjs";
|
|
3
|
+
import { useNumber as n } from "./useNumber.mjs";
|
|
4
|
+
import { useRelativeTime as r } from "./useRelativeTime.mjs";
|
|
5
|
+
import { useCompact as i } from "./useCompact.mjs";
|
|
6
|
+
import { useIntl as a } from "./useIntl.mjs";
|
|
7
|
+
import { useList as o } from "./useList.mjs";
|
|
8
|
+
import { usePercentage as s } from "./usePercentage.mjs";
|
|
9
|
+
import { useCurrency as c } from "./useCurrency.mjs";
|
|
10
|
+
export { i as useCompact, c as useCurrency, t as useDate, a as useIntl, o as useList, n as useNumber, s as usePercentage, r as useRelativeTime, e as useUnit };
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as e, i as t, n, r, t as i } from "../installIntlayer-
|
|
1
|
+
import { a as e, i as t, n, r, t as i } from "../installIntlayer-DCwculig.mjs";
|
|
2
2
|
import { getPlugins as a, htmlPlugin as o, insertionPlugin as s, intlayerNodePlugins as c, markdownPlugin as l, markdownStringPlugin as u } from "./plugins.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { getIntlayer as d } from "./getIntlayer.mjs";
|
|
4
|
+
import { getDictionary as f } from "./getDictionary.mjs";
|
|
5
5
|
import { IntlayerBinding as p } from "./client/IntlayerBinding.mjs";
|
|
6
6
|
import { useDictionary as m } from "./client/useDictionary.mjs";
|
|
7
7
|
import { useDictionaryDynamic as h } from "./client/useDictionaryDynamic.mjs";
|
|
@@ -10,4 +10,4 @@ import { localeCookie as _, localeInStorage as v, setLocaleCookie as y, setLocal
|
|
|
10
10
|
import { LocaleController as C, useLocale as w } from "./client/useLocale.mjs";
|
|
11
11
|
import { useRewriteURL as T } from "./client/useRewriteURL.mjs";
|
|
12
12
|
import "./client/index.mjs";
|
|
13
|
-
export { p as IntlayerBinding, i as IntlayerClient, C as LocaleController, n as createIntlayerClient,
|
|
13
|
+
export { p as IntlayerBinding, i as IntlayerClient, C as LocaleController, n as createIntlayerClient, f as getDictionary, d as getIntlayer, r as getIntlayerClient, a as getPlugins, o as htmlPlugin, s as insertionPlugin, t as installIntlayer, c as intlayerNodePlugins, _ as localeCookie, v as localeInStorage, l as markdownPlugin, u as markdownStringPlugin, y as setLocaleCookie, b as setLocaleInStorage, m as useDictionary, h as useDictionaryDynamic, e as useEditor, g as useIntlayer, w as useLocale, x as useLocaleCookie, S as useLocaleStorage, T as useRewriteURL };
|
package/dist/esm/plugins.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import t from "
|
|
3
|
-
import
|
|
1
|
+
import { renderIntlayerNode as e } from "./renderIntlayerNode.mjs";
|
|
2
|
+
import { r as t } from "../installIntlayer-DCwculig.mjs";
|
|
3
|
+
import n from "./markdown/runtime.mjs";
|
|
4
4
|
import { conditionPlugin as r, enumerationPlugin as i, fallbackPlugin as a, filePlugin as o, genderPlugin as s, getHTML as c, nestedPlugin as l, splitInsertionTemplate as u, translationPlugin as d } from "@intlayer/core/interpreter";
|
|
5
5
|
import { editor as f, internationalization as p } from "@intlayer/config/built";
|
|
6
6
|
import { compileWithOptions as m, getMarkdownMetadata as h } from "@intlayer/core/markdown";
|
|
@@ -8,7 +8,7 @@ import * as g from "@intlayer/types/nodeType";
|
|
|
8
8
|
import { unsafeHTML as _ } from "lit/directives/unsafe-html.js";
|
|
9
9
|
import { html as v, unsafeStatic as y } from "lit/static-html.js";
|
|
10
10
|
//#region src/plugins.ts
|
|
11
|
-
var b = process.env.INTLAYER_NODE_TYPE_INTLAYER_NODE === "false", x = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false", S = process.env.INTLAYER_NODE_TYPE_HTML === "false", C = process.env.INTLAYER_NODE_TYPE_INSERTION === "false", w = process.env.INTLAYER_EDITOR_ENABLED === "false", T = (e = "",
|
|
11
|
+
var b = process.env.INTLAYER_NODE_TYPE_INTLAYER_NODE === "false", x = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false", S = process.env.INTLAYER_NODE_TYPE_HTML === "false", C = process.env.INTLAYER_NODE_TYPE_INSERTION === "false", w = process.env.INTLAYER_EDITOR_ENABLED === "false", T = (e = "", t = {}) => m(e, n, t), E = (e, t, n = {}) => {
|
|
12
12
|
let r = typeof e == "string" ? _(e) : e;
|
|
13
13
|
return new Proxy(r, { get(e, r, i) {
|
|
14
14
|
if (r === "value" || r === "raw") return t;
|
|
@@ -18,15 +18,15 @@ var b = process.env.INTLAYER_NODE_TYPE_INTLAYER_NODE === "false", x = process.en
|
|
|
18
18
|
}, D = (e) => e.replace(/&/g, "&").replace(/"/g, """), O = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), k = b ? a : {
|
|
19
19
|
id: "intlayer-node-plugin",
|
|
20
20
|
canHandle: (e) => typeof e == "bigint" || typeof e == "string" || typeof e == "number",
|
|
21
|
-
transform: (
|
|
21
|
+
transform: (t, { children: n, keyPath: r, dictionaryKey: i, ...a }) => {
|
|
22
22
|
if (!w && f.enabled) {
|
|
23
|
-
let e = String(
|
|
23
|
+
let e = String(n ?? "");
|
|
24
24
|
return E(`<intlayer-content-selector-wrapper key-path="${D(JSON.stringify(r ?? []))}" dictionary-key="${D(String(i ?? ""))}">${O(e)}</intlayer-content-selector-wrapper>`, e);
|
|
25
25
|
}
|
|
26
|
-
return
|
|
26
|
+
return e({
|
|
27
27
|
...a,
|
|
28
|
-
value:
|
|
29
|
-
children:
|
|
28
|
+
value: n,
|
|
29
|
+
children: n
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
}, A = C ? a : {
|
|
@@ -65,27 +65,27 @@ var b = process.env.INTLAYER_NODE_TYPE_INTLAYER_NODE === "false", x = process.en
|
|
|
65
65
|
}, j = x ? a : {
|
|
66
66
|
id: "markdown-string-plugin",
|
|
67
67
|
canHandle: (e) => typeof e == "string",
|
|
68
|
-
transform: (
|
|
69
|
-
let { plugins: i, ...a } =
|
|
68
|
+
transform: (t, n, r) => {
|
|
69
|
+
let { plugins: i, ...a } = n, { keyPath: o, dictionaryKey: s } = a, c = r(h(t) ?? {}, {
|
|
70
70
|
plugins: [{
|
|
71
71
|
id: "markdown-metadata-plugin",
|
|
72
72
|
canHandle: (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || !e,
|
|
73
|
-
transform: (
|
|
73
|
+
transform: (n, r) => e({
|
|
74
74
|
...r,
|
|
75
|
-
value:
|
|
76
|
-
children:
|
|
75
|
+
value: n,
|
|
76
|
+
children: t
|
|
77
77
|
})
|
|
78
78
|
}],
|
|
79
79
|
dictionaryKey: a.dictionaryKey,
|
|
80
80
|
keyPath: []
|
|
81
|
-
}), l = T(
|
|
82
|
-
let n = T(
|
|
83
|
-
return !w && f.enabled ? E(`<intlayer-content-selector-wrapper key-path="${D(JSON.stringify(o ?? []))}" dictionary-key="${D(String(s ?? ""))}">${n}</intlayer-content-selector-wrapper>`,
|
|
81
|
+
}), l = T(t), u = (e) => {
|
|
82
|
+
let n = T(t, { components: e });
|
|
83
|
+
return !w && f.enabled ? E(`<intlayer-content-selector-wrapper key-path="${D(JSON.stringify(o ?? []))}" dictionary-key="${D(String(s ?? ""))}">${n}</intlayer-content-selector-wrapper>`, t) : E(n, t);
|
|
84
84
|
};
|
|
85
|
-
return !w && f.enabled ? E(`<intlayer-content-selector-wrapper key-path="${D(JSON.stringify(o ?? []))}" dictionary-key="${D(String(s ?? ""))}">${l}</intlayer-content-selector-wrapper>`,
|
|
85
|
+
return !w && f.enabled ? E(`<intlayer-content-selector-wrapper key-path="${D(JSON.stringify(o ?? []))}" dictionary-key="${D(String(s ?? ""))}">${l}</intlayer-content-selector-wrapper>`, t, {
|
|
86
86
|
metadata: c,
|
|
87
87
|
use: u
|
|
88
|
-
}) : E(l,
|
|
88
|
+
}) : E(l, t, {
|
|
89
89
|
metadata: c,
|
|
90
90
|
use: u
|
|
91
91
|
});
|
|
@@ -115,10 +115,10 @@ var b = process.env.INTLAYER_NODE_TYPE_INTLAYER_NODE === "false", x = process.en
|
|
|
115
115
|
};
|
|
116
116
|
return !w && f.enabled ? E(`<intlayer-content-selector-wrapper key-path="${D(JSON.stringify(r ?? []))}" dictionary-key="${D(String(i ?? ""))}">${n}</intlayer-content-selector-wrapper>`, n, { use: a }) : E(n, n, { use: a });
|
|
117
117
|
}
|
|
118
|
-
}, P = (
|
|
119
|
-
let a =
|
|
118
|
+
}, P = (e, n = !0) => {
|
|
119
|
+
let a = e ?? (typeof window < "u" && t()?.locale) ?? p.defaultLocale;
|
|
120
120
|
return [
|
|
121
|
-
d(
|
|
121
|
+
d(e ?? p.defaultLocale, n ? p.defaultLocale : void 0),
|
|
122
122
|
i,
|
|
123
123
|
r,
|
|
124
124
|
l(a),
|
|
@@ -48,9 +48,9 @@ var o = class {
|
|
|
48
48
|
_locale;
|
|
49
49
|
_listeners = /* @__PURE__ */ new Set();
|
|
50
50
|
isCookieEnabled;
|
|
51
|
-
constructor(
|
|
52
|
-
let { defaultLocale:
|
|
53
|
-
this._locale =
|
|
51
|
+
constructor(n, r = !0) {
|
|
52
|
+
let { defaultLocale: i } = e ?? {};
|
|
53
|
+
t(), this._locale = n ?? i, this.isCookieEnabled = r;
|
|
54
54
|
}
|
|
55
55
|
get locale() {
|
|
56
56
|
return this._locale;
|
|
@@ -64,7 +64,7 @@ var o = class {
|
|
|
64
64
|
this._listeners.delete(e);
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
}, s = null, c = (e,
|
|
67
|
+
}, s = null, c = (e, t = !0) => s || (s = new o(e, t), s), l = () => (s ||= new o(), s), u = ({ locale: e, isCookieEnabled: t } = {}) => {
|
|
68
68
|
let n = c(e, t);
|
|
69
69
|
return a(), n;
|
|
70
70
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./plugins-
|
|
1
|
+
require(`./plugins-CCaXtc4l.js`);let e=require(`@intlayer/config/built`),t=require(`@intlayer/config/client`),n=require(`@intlayer/editor/isEnabled`);var r=process.env.INTLAYER_EDITOR_ENABLED===`false`,i=class{host;_stopped=!1;_unsubscribeLocale=null;constructor(e){this.host=e,e.addController(this)}hostConnected(){this._stopped=!1,!(r||!n.isEnabled)&&import(`@intlayer/editor`).then(({initEditorClient:e})=>{if(this._stopped)return;let t=e(),n=l();t.currentLocale.set(n.locale),this._unsubscribeLocale=n.subscribe(e=>{t.currentLocale.set(e)})})}hostDisconnected(){this._stopped=!0,this._unsubscribeLocale?.(),this._unsubscribeLocale=null,import(`@intlayer/editor`).then(({stopEditorClient:e})=>{e()})}};function a(e){if(r||!n.isEnabled)return e?void 0:()=>{};if(!e){let e=!1,t=null;return import(`@intlayer/editor`).then(({initEditorClient:n})=>{if(e)return;let r=n(),i=l();r.currentLocale.set(i.locale),t=i.subscribe(e=>{r.currentLocale.set(e)})}),()=>{e=!0,t?.(),import(`@intlayer/editor`).then(({stopEditorClient:e})=>{e()})}}new i(e)}var o=class{_locale;_listeners=new Set;isCookieEnabled;constructor(n,r=!0){let{defaultLocale:i}=e.internationalization??{};(0,t.setIntlayerIdentifier)(),this._locale=n??i,this.isCookieEnabled=r}get locale(){return this._locale}setLocale(e){this._locale=e;for(let t of this._listeners)t(e)}subscribe(e){return this._listeners.add(e),()=>{this._listeners.delete(e)}}},s=null,c=(e,t=!0)=>s||(s=new o(e,t),s),l=()=>(s||=new o,s),u=({locale:e,isCookieEnabled:t}={})=>{let n=c(e,t);return a(),n};Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));const c=require(`./
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));const c=require(`./cjs/renderIntlayerNode.cjs`),l=require(`./installIntlayer-DrtuR0-v.js`),u=require(`./cjs/markdown/runtime.cjs`);let d=require(`@intlayer/core/interpreter`),f=require(`@intlayer/config/built`),p=require(`@intlayer/core/markdown`),m=require(`@intlayer/types/nodeType`);m=s(m);let h=require(`lit/directives/unsafe-html.js`),g=require(`lit/static-html.js`);var _=process.env.INTLAYER_NODE_TYPE_INTLAYER_NODE===`false`,v=process.env.INTLAYER_NODE_TYPE_MARKDOWN===`false`,y=process.env.INTLAYER_NODE_TYPE_HTML===`false`,b=process.env.INTLAYER_NODE_TYPE_INSERTION===`false`,x=process.env.INTLAYER_EDITOR_ENABLED===`false`,S=(e=``,t={})=>(0,p.compileWithOptions)(e,u.default,t),C=(e,t,n={})=>{let r=typeof e==`string`?(0,h.unsafeHTML)(e):e;return new Proxy(r,{get(e,r,i){if(r===`value`||r===`raw`)return t;if(r===`toString`||r===Symbol.toPrimitive)return()=>t;if(r!==Symbol.iterator)return r===`__update`?()=>{}:r===`isJSX`?!0:r in n?n[r]:Reflect.get(e,r,i)}})},w=e=>e.replace(/&/g,`&`).replace(/"/g,`"`),T=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`),E=_?d.fallbackPlugin:{id:`intlayer-node-plugin`,canHandle:e=>typeof e==`bigint`||typeof e==`string`||typeof e==`number`,transform:(e,{children:t,keyPath:n,dictionaryKey:r,...i})=>{if(!x&&f.editor.enabled){let e=String(t??``);return C(`<intlayer-content-selector-wrapper key-path="${w(JSON.stringify(n??[]))}" dictionary-key="${w(String(r??``))}">${T(e)}</intlayer-content-selector-wrapper>`,e)}return c.renderIntlayerNode({...i,value:t,children:t})}},D=b?d.fallbackPlugin:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===m.INSERTION,transform:(e,t,n)=>{let r=[...t.keyPath,{type:m.INSERTION}],i=e[m.INSERTION],a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`,transform:(e,n,r)=>{let i=r(e,{...n,children:e,plugins:(t.plugins??[]).filter(e=>e.id!==`intlayer-node-plugin`)});return e=>{let a=(0,d.splitInsertionTemplate)(i,e),o=a.isSimple?a.parts:a.parts.join(``);return r(o,{...n,plugins:t.plugins,children:o})}}},o=n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]});return typeof i==`object`&&i&&`nodeType`in i&&[m.ENUMERATION,m.CONDITION].includes(i.nodeType)?e=>t=>{let n=o(t);return typeof n==`function`?n(e):n}:o}},O=v?d.fallbackPlugin:{id:`markdown-string-plugin`,canHandle:e=>typeof e==`string`,transform:(e,t,n)=>{let{plugins:r,...i}=t,{keyPath:a,dictionaryKey:o}=i,s=n((0,p.getMarkdownMetadata)(e)??{},{plugins:[{id:`markdown-metadata-plugin`,canHandle:e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`||!e,transform:(t,n)=>c.renderIntlayerNode({...n,value:t,children:e})}],dictionaryKey:i.dictionaryKey,keyPath:[]}),l=S(e),u=t=>{let n=S(e,{components:t});return!x&&f.editor.enabled?C(`<intlayer-content-selector-wrapper key-path="${w(JSON.stringify(a??[]))}" dictionary-key="${w(String(o??``))}">${n}</intlayer-content-selector-wrapper>`,e):C(n,e)};return!x&&f.editor.enabled?C(`<intlayer-content-selector-wrapper key-path="${w(JSON.stringify(a??[]))}" dictionary-key="${w(String(o??``))}">${l}</intlayer-content-selector-wrapper>`,e,{metadata:s,use:u}):C(l,e,{metadata:s,use:u})}},k=v?d.fallbackPlugin:{id:`markdown-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===m.MARKDOWN,transform:(e,t,n)=>{let r=[...t.keyPath,{type:m.MARKDOWN}],i=e[m.MARKDOWN];return n(i,{...t,children:i,keyPath:r,plugins:[O,...t.plugins??[]]})}},A=y?d.fallbackPlugin:{id:`html-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===m.HTML,transform:(e,t)=>{let n=e[m.HTML],{keyPath:r,dictionaryKey:i}=t,a=(e={})=>{let t=Object.fromEntries(Object.entries(e).filter(([,e])=>e).map(([e,t])=>[e,e=>t(e)])),a=(0,d.getHTML)(n,new Proxy(t,{get(e,t){if(typeof t==`string`&&t in e)return e[t];if(typeof t==`string`&&/^[a-z][a-z0-9]*$/.test(t))return e=>g.html`<${(0,g.unsafeStatic)(t)} ...${e}>${e.children}</${(0,g.unsafeStatic)(t)}>`}}));return!x&&f.editor.enabled?C(`<intlayer-content-selector-wrapper key-path="${w(JSON.stringify(r??[]))}" dictionary-key="${w(String(i??``))}">${a}</intlayer-content-selector-wrapper>`,n):C(a,n)};return!x&&f.editor.enabled?C(`<intlayer-content-selector-wrapper key-path="${w(JSON.stringify(r??[]))}" dictionary-key="${w(String(i??``))}">${n}</intlayer-content-selector-wrapper>`,n,{use:a}):C(n,n,{use:a})}},j=(e,t=!0)=>{let n=e??(typeof window<`u`&&l.r()?.locale)??f.internationalization.defaultLocale;return[(0,d.translationPlugin)(e??f.internationalization.defaultLocale,t?f.internationalization.defaultLocale:void 0),d.enumerationPlugin,d.conditionPlugin,(0,d.nestedPlugin)(n),d.filePlugin,d.genderPlugin,E,D,k,A].filter(Boolean)};Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return j}});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lit-intlayer",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.7.0-canary.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Easily internationalize i18n your Lit applications with type-safe multilingual content management.",
|
|
6
6
|
"keywords": [
|
|
@@ -86,10 +86,10 @@
|
|
|
86
86
|
"./package.json"
|
|
87
87
|
],
|
|
88
88
|
"scripts": {
|
|
89
|
-
"build": "vite build",
|
|
90
|
-
"build:ci": "vite build",
|
|
89
|
+
"build": "bun --bun vite build",
|
|
90
|
+
"build:ci": "bun --bun vite build",
|
|
91
91
|
"clean": "bun --bun rimraf ./dist .turbo",
|
|
92
|
-
"dev": "vite build --watch",
|
|
92
|
+
"dev": "bun --bun vite build --watch",
|
|
93
93
|
"format": "bun --bun biome format . --check",
|
|
94
94
|
"format:fix": "bun --bun biome format --write .",
|
|
95
95
|
"lint": "bun --bun biome lint .",
|
|
@@ -103,11 +103,11 @@
|
|
|
103
103
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
104
104
|
},
|
|
105
105
|
"dependencies": {
|
|
106
|
-
"@intlayer/api": "8.
|
|
107
|
-
"@intlayer/config": "8.
|
|
108
|
-
"@intlayer/core": "8.
|
|
109
|
-
"@intlayer/editor": "8.
|
|
110
|
-
"@intlayer/types": "8.
|
|
106
|
+
"@intlayer/api": "8.7.0-canary.0",
|
|
107
|
+
"@intlayer/config": "8.7.0-canary.0",
|
|
108
|
+
"@intlayer/core": "8.7.0-canary.0",
|
|
109
|
+
"@intlayer/editor": "8.7.0-canary.0",
|
|
110
|
+
"@intlayer/types": "8.7.0-canary.0"
|
|
111
111
|
},
|
|
112
112
|
"devDependencies": {
|
|
113
113
|
"@types/node": "25.5.2",
|
|
@@ -118,12 +118,12 @@
|
|
|
118
118
|
"rimraf": "6.1.3",
|
|
119
119
|
"tsdown": "0.21.7",
|
|
120
120
|
"typescript": "6.0.2",
|
|
121
|
-
"vite": "8.0.
|
|
121
|
+
"vite": "8.0.7",
|
|
122
122
|
"vite-plugin-dts": "4.5.4",
|
|
123
|
-
"vitest": "4.1.
|
|
123
|
+
"vitest": "4.1.3"
|
|
124
124
|
},
|
|
125
125
|
"peerDependencies": {
|
|
126
|
-
"intlayer": "8.
|
|
126
|
+
"intlayer": "8.7.0-canary.0",
|
|
127
127
|
"lit": ">=3.0.0"
|
|
128
128
|
},
|
|
129
129
|
"peerDependenciesMeta": {
|