lit-intlayer 9.5.5 → 9.5.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/README.md CHANGED
@@ -201,7 +201,6 @@ Explore our comprehensive documentation to get started with Intlayer and learn h
201
201
  <li><a href="https://intlayer.org/doc/environment/astro/vue" rel=''>Vue</a></li>
202
202
  <li><a href="https://intlayer.org/doc/environment/astro/svelte" rel=''>Svelte</a></li>
203
203
  <li><a href="https://intlayer.org/doc/environment/astro/solid" rel=''>Solid</a></li>
204
- <li><a href="https://intlayer.org/doc/environment/astro/vanilla" rel=''>Vanilla JS</a></li>
205
204
  <li><a href="https://intlayer.org/doc/environment/astro/lit" rel=''>Lit</a></li>
206
205
  </ul>
207
206
  </li>
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../installIntlayer-DOvWQYtw.js"),t=require("./IntlayerBinding.cjs"),n=require("../getDictionary.cjs");let r=require("@intlayer/config/built"),i=require("@intlayer/core/dictionaryManipulator");var a=(a,o)=>{let s=e.r(),c=process.env.INTLAYER_DICTIONARY_SELECTOR!==`false`&&typeof o==`object`&&o?o.locale:o,l=e=>process.env.INTLAYER_DICTIONARY_SELECTOR===`false`?n.getDictionary(a,e):n.getDictionary(a,(0,i.resolveDictionaryArgument)({localeOrSelector:o,contextLocale:e,contextVariant:s.variant,dictionaryKey:a.key})),u=l(c??s.locale??r.internationalization.defaultLocale);s.subscribe(e=>{u=l(c??e)});let d,f=new Proxy({},{get(e,t){if(t===`observe`)return d;if(t===Symbol.toPrimitive)return()=>u?.[Symbol.toPrimitive]?.()??``;if(t===`toString`)return()=>String(u?.toString?.()??``);if(t!==`then`&&u!=null)return u[t]}});return d=e=>(new t.IntlayerBinding(e),f),f};exports.useDictionary=a;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../installIntlayer-DOvWQYtw.js"),t=require("../getDictionary.cjs"),n=require("./IntlayerBinding.cjs");let r=require("@intlayer/config/built"),i=require("@intlayer/core/dictionaryManipulator");var a=(a,o)=>{let s=e.r(),c=process.env.INTLAYER_DICTIONARY_SELECTOR!==`false`&&typeof o==`object`&&o?o.locale:o,l=e=>process.env.INTLAYER_DICTIONARY_SELECTOR===`false`?t.getDictionary(a,e):t.getDictionary(a,(0,i.resolveDictionaryArgument)({localeOrSelector:o,contextLocale:e,contextVariant:s.variant,dictionaryKey:a.key})),u=l(c??s.locale??r.internationalization.defaultLocale);s.subscribe(e=>{u=l(c??e)});let d,f=new Proxy({},{get(e,t){if(t===`observe`)return d;if(t===Symbol.toPrimitive)return()=>u?.[Symbol.toPrimitive]?.()??``;if(t===`toString`)return()=>String(u?.toString?.()??``);if(t!==`then`&&u!=null)return u[t]}});return d=e=>(new n.IntlayerBinding(e),f),f};exports.useDictionary=a;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../installIntlayer-DOvWQYtw.js"),t=require("./IntlayerBinding.cjs"),n=require("../getDictionary.cjs");let r=require("@intlayer/config/built"),i=require("@intlayer/core/dictionaryManipulator");var a=new Map,o=async(e,t)=>{if(!t)return;if(a.has(e))return a.get(e);let n=await t();return a.set(e,n),n},s=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 s},apply:()=>s,construct:()=>({})}),c=(c,l,u)=>{let d=e.r(),f=process.env.INTLAYER_DICTIONARY_SELECTOR!==`false`&&(0,i.isQualifiedDynamicLoaderMap)(c),{locale:p,selector:m}=process.env.INTLAYER_DICTIONARY_SELECTOR===`false`?{locale:u,selector:void 0}:(0,i.parseDictionarySelector)((0,i.resolveDictionaryArgument)({localeOrSelector:u,contextLocale:d.locale,contextVariant:d.variant,dictionaryKey:String(l)})),h=()=>p??d.locale??r.internationalization.defaultLocale,g,_=new Set,v=()=>{for(let e of _)e()},y=e=>{if(f){(0,i.resolveQualifiedDynamicContentAsync)({loaderMap:c,key:String(l),locale:e,selector:m,transform:t=>n.getDictionary(t,e)}).then(e=>{g=e,v()});return}let t=`${String(l)}.${e}`,r=(0,i.getPreloadedDictionary)(c,e);if(r){a.set(t,r),g=n.getDictionary(r,e),v();return}let s=c[e];o(t,s).then(t=>{t&&(g=n.getDictionary(t,e),v())})};y(h()),d.subscribe(e=>{y(p??e)});let b,x=new Proxy({},{get(e,t){if(t===`observe`)return b;if(t===Symbol.toPrimitive)return()=>void 0;if(t===`toString`)return()=>``;if(t!==`then`)return g==null?s:g[t]}});return b=e=>{let n=()=>e.requestUpdate();return _.add(n),new t.IntlayerBinding(e,()=>{g!=null&&e.requestUpdate()},()=>{_.delete(n)}),x},x};exports.useDictionaryDynamic=c;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../installIntlayer-DOvWQYtw.js"),t=require("../getDictionary.cjs"),n=require("./IntlayerBinding.cjs");let r=require("@intlayer/config/built"),i=require("@intlayer/core/dictionaryManipulator");var a=new Map,o=async(e,t)=>{if(!t)return;if(a.has(e))return a.get(e);let n=await t();return a.set(e,n),n},s=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 s},apply:()=>s,construct:()=>({})}),c=(c,l,u)=>{let d=e.r(),f=process.env.INTLAYER_DICTIONARY_SELECTOR!==`false`&&(0,i.isQualifiedDynamicLoaderMap)(c),{locale:p,selector:m}=process.env.INTLAYER_DICTIONARY_SELECTOR===`false`?{locale:u,selector:void 0}:(0,i.parseDictionarySelector)((0,i.resolveDictionaryArgument)({localeOrSelector:u,contextLocale:d.locale,contextVariant:d.variant,dictionaryKey:String(l)})),h=()=>p??d.locale??r.internationalization.defaultLocale,g,_=new Set,v=()=>{for(let e of _)e()},y=e=>{if(f){(0,i.resolveQualifiedDynamicContentAsync)({loaderMap:c,key:String(l),locale:e,selector:m,transform:n=>t.getDictionary(n,e)}).then(e=>{g=e,v()});return}let n=`${String(l)}.${e}`,r=(0,i.getPreloadedDictionary)(c,e);if(r){a.set(n,r),g=t.getDictionary(r,e),v();return}let s=c[e];o(n,s).then(n=>{n&&(g=t.getDictionary(n,e),v())})};y(h()),d.subscribe(e=>{y(p??e)});let b,x=new Proxy({},{get(e,t){if(t===`observe`)return b;if(t===Symbol.toPrimitive)return()=>void 0;if(t===`toString`)return()=>``;if(t!==`then`)return g==null?s:g[t]}});return b=e=>{let t=()=>e.requestUpdate();return _.add(t),new n.IntlayerBinding(e,()=>{g!=null&&e.requestUpdate()},()=>{_.delete(t)}),x},x};exports.useDictionaryDynamic=c;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../installIntlayer-DOvWQYtw.js"),t=require("./IntlayerBinding.cjs"),n=require("../getIntlayer.cjs");let r=require("@intlayer/config/built"),i=require("@intlayer/core/dictionaryManipulator");var a=(a,o)=>{let s=e.r(),c=process.env.INTLAYER_DICTIONARY_SELECTOR!==`false`&&typeof o==`object`&&o?o.locale:o,l=e=>process.env.INTLAYER_DICTIONARY_SELECTOR===`false`?n.getIntlayer(a,e):n.getIntlayer(a,(0,i.resolveDictionaryArgument)({localeOrSelector:o,contextLocale:e,contextVariant:s.variant,dictionaryKey:a})),u,d,f=!1,p=new Proxy({},{get(e,n){if(n===`observe`)return e=>(new t.IntlayerBinding(e),p);if(n===Symbol.toPrimitive||n===`toString`)return()=>``;if(n===`then`||typeof n==`symbol`||typeof n==`string`&&n.startsWith(`_$`))return;let i=c??s.locale??r.internationalization.defaultLocale;if((!f||u!==i)&&(d=l(i),u=i,f=!0),d!=null)return d[n]}});return p};exports.useIntlayer=a;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../installIntlayer-DOvWQYtw.js"),t=require("../getIntlayer.cjs"),n=require("./IntlayerBinding.cjs");let r=require("@intlayer/config/built"),i=require("@intlayer/core/dictionaryManipulator");var a=(a,o)=>{let s=e.r(),c=process.env.INTLAYER_DICTIONARY_SELECTOR!==`false`&&typeof o==`object`&&o?o.locale:o,l=e=>process.env.INTLAYER_DICTIONARY_SELECTOR===`false`?t.getIntlayer(a,e):t.getIntlayer(a,(0,i.resolveDictionaryArgument)({localeOrSelector:o,contextLocale:e,contextVariant:s.variant,dictionaryKey:a})),u,d,f=!1,p=new Proxy({},{get(e,t){if(t===`observe`)return e=>(new n.IntlayerBinding(e),p);if(t===Symbol.toPrimitive||t===`toString`)return()=>``;if(t===`then`||typeof t==`symbol`||typeof t==`string`&&t.startsWith(`_$`))return;let i=c??s.locale??r.internationalization.defaultLocale;if((!f||u!==i)&&(d=l(i),u=i,f=!0),d!=null)return d[t]}});return p};exports.useIntlayer=a;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./useCurrency.cjs"),t=require("./useUnit.cjs"),n=require("./useDate.cjs"),r=require("./useCompact.cjs"),i=require("./useIntl.cjs"),a=require("./useList.cjs"),o=require("./useNumber.cjs"),s=require("./usePercentage.cjs"),c=require("./useRelativeTime.cjs");exports.useCompact=r.useCompact,exports.useCurrency=e.useCurrency,exports.useDate=n.useDate,exports.useIntl=i.useIntl,exports.useList=a.useList,exports.useNumber=o.useNumber,exports.usePercentage=s.usePercentage,exports.useRelativeTime=c.useRelativeTime,exports.useUnit=t.useUnit;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./usePercentage.cjs"),t=require("./useUnit.cjs"),n=require("./useCompact.cjs"),r=require("./useNumber.cjs"),i=require("./useIntl.cjs"),a=require("./useList.cjs"),o=require("./useCurrency.cjs"),s=require("./useDate.cjs"),c=require("./useRelativeTime.cjs");exports.useCompact=n.useCompact,exports.useCurrency=o.useCurrency,exports.useDate=s.useDate,exports.useIntl=i.useIntl,exports.useList=a.useList,exports.useNumber=r.useNumber,exports.usePercentage=e.usePercentage,exports.useRelativeTime=c.useRelativeTime,exports.useUnit=t.useUnit;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../installIntlayer-DOvWQYtw.js"),t=require("./client/IntlayerBinding.cjs"),n=require("./plugins.cjs"),r=require("./getDictionary.cjs"),i=require("./client/useDictionary.cjs"),a=require("./client/useDictionaryDynamic.cjs"),o=require("./getIntlayer.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=t.IntlayerBinding,exports.IntlayerClient=e.t,exports.LocaleController=l.LocaleController,exports.createIntlayerClient=e.n,exports.getDictionary=r.getDictionary,exports.getIntlayer=o.getIntlayer,exports.getIntlayerClient=e.r,exports.getPlugins=n.getPlugins,exports.htmlPlugin=n.htmlPlugin,exports.insertionPlugin=n.insertionPlugin,exports.installIntlayer=e.i,exports.intlayerNodePlugins=n.intlayerNodePlugins,exports.localeCookie=c.localeCookie,exports.localeInStorage=c.localeInStorage,exports.markdownPlugin=n.markdownPlugin,exports.markdownStringPlugin=n.markdownStringPlugin,exports.setLocaleCookie=c.setLocaleCookie,exports.setLocaleInStorage=c.setLocaleInStorage,exports.useDictionary=i.useDictionary,exports.useDictionaryDynamic=a.useDictionaryDynamic,exports.useEditor=e.a,exports.useIntlayer=s.useIntlayer,exports.useLocale=l.useLocale,exports.useLocaleCookie=c.useLocaleCookie,exports.useLocaleStorage=c.useLocaleStorage,exports.useRewriteURL=u.useRewriteURL;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../installIntlayer-DOvWQYtw.js"),t=require("./plugins.cjs"),n=require("./getDictionary.cjs"),r=require("./getIntlayer.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=e.t,exports.LocaleController=l.LocaleController,exports.createIntlayerClient=e.n,exports.getDictionary=n.getDictionary,exports.getIntlayer=r.getIntlayer,exports.getIntlayerClient=e.r,exports.getPlugins=t.getPlugins,exports.htmlPlugin=t.htmlPlugin,exports.insertionPlugin=t.insertionPlugin,exports.installIntlayer=e.i,exports.intlayerNodePlugins=t.intlayerNodePlugins,exports.localeCookie=c.localeCookie,exports.localeInStorage=c.localeInStorage,exports.markdownPlugin=t.markdownPlugin,exports.markdownStringPlugin=t.markdownStringPlugin,exports.setLocaleCookie=c.setLocaleCookie,exports.setLocaleInStorage=c.setLocaleInStorage,exports.useDictionary=a.useDictionary,exports.useDictionaryDynamic=o.useDictionaryDynamic,exports.useEditor=e.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`});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,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));const c=require("../installIntlayer-DOvWQYtw.js"),l=require("./markdown/runtime.cjs"),u=require("./renderIntlayerNode.cjs");let d=require("@intlayer/config/built"),f=require("@intlayer/core/interpreter"),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 _=(e=``,t={})=>(0,p.compileWithOptions)(e,l.default,t),v=(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)}})},y=e=>e.replace(/&/g,`&amp;`).replace(/"/g,`&quot;`),b=e=>e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`),x={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(process.env.INTLAYER_EDITOR_ENABLED!==`false`&&d.editor.enabled){let e=String(t??``);return v(`<intlayer-content-selector-wrapper key-path="${y(JSON.stringify(n??[]))}" dictionary-key="${y(String(r??``))}">${b(e)}</intlayer-content-selector-wrapper>`,e)}return u.renderIntlayerNode({...i,value:t,children:t})}},S=process.env.INTLAYER_NODE_TYPE_INSERTION===`false`?f.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`||(0,f.isInterpolableWrapperNode)(e),transform:(e,n,r)=>{if((0,f.isInterpolableWrapperNode)(e))return i=>(0,f.transformInterpolableNode)(e,i,n,t.plugins,r);let i=r(e,{...n,children:e,plugins:(t.plugins??[]).filter(e=>e.id!==`intlayer-node-plugin`)});return e=>{let a=(0,f.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}},C=process.env.INTLAYER_NODE_TYPE_MARKDOWN===`false`?f.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)=>u.renderIntlayerNode({...n,value:t,children:e})}],dictionaryKey:i.dictionaryKey,keyPath:[]}),c=_(e),l=t=>{let n=_(e,{components:t});return process.env.INTLAYER_EDITOR_ENABLED!==`false`&&d.editor.enabled?v(`<intlayer-content-selector-wrapper key-path="${y(JSON.stringify(a??[]))}" dictionary-key="${y(String(o??``))}">${n}</intlayer-content-selector-wrapper>`,e):v(n,e)};return process.env.INTLAYER_EDITOR_ENABLED!==`false`&&d.editor.enabled?v(`<intlayer-content-selector-wrapper key-path="${y(JSON.stringify(a??[]))}" dictionary-key="${y(String(o??``))}">${c}</intlayer-content-selector-wrapper>`,e,{metadata:s,use:l}):v(c,e,{metadata:s,use:l})}},w=process.env.INTLAYER_NODE_TYPE_MARKDOWN===`false`?f.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:[C,...t.plugins??[]]})}},T=process.env.INTLAYER_NODE_TYPE_HTML===`false`?f.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=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)}>`}}),o=(0,f.getHTML)(n,a);return process.env.INTLAYER_EDITOR_ENABLED!==`false`&&d.editor.enabled?v(`<intlayer-content-selector-wrapper key-path="${y(JSON.stringify(r??[]))}" dictionary-key="${y(String(i??``))}">${o}</intlayer-content-selector-wrapper>`,n):v(o,n)};return process.env.INTLAYER_EDITOR_ENABLED!==`false`&&d.editor.enabled?v(`<intlayer-content-selector-wrapper key-path="${y(JSON.stringify(r??[]))}" dictionary-key="${y(String(i??``))}">${n}</intlayer-content-selector-wrapper>`,n,{use:a}):v(n,n,{use:a})}},E=new Map,D=(e,t=!0)=>{let n=e??(typeof window<`u`&&c.r()?.locale)??d.internationalization.defaultLocale,r=`${n}_${t}`;if(E.has(r))return E.get(r);let i=[(0,f.translationPlugin)(e??d.internationalization.defaultLocale,t?d.internationalization.defaultLocale:void 0),f.enumerationPlugin,(0,f.pluralPlugin)(n),f.conditionPlugin,(0,f.nestedPlugin)(n),f.filePlugin,f.genderPlugin,f.selectPlugin,x,S,w,T];return E.set(r,i),i};exports.getPlugins=D,exports.htmlPlugin=T,exports.insertionPlugin=S,exports.intlayerNodePlugins=x,exports.markdownPlugin=w,exports.markdownStringPlugin=C;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});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,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));const c=require("../installIntlayer-DOvWQYtw.js"),l=require("./markdown/runtime.cjs"),u=require("./renderIntlayerNode.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 _=(e=``,t={})=>(0,p.compileWithOptions)(e,l.default,t),v=(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)}})},y=e=>e.replace(/&/g,`&amp;`).replace(/"/g,`&quot;`),b=e=>e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`),x={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(process.env.INTLAYER_EDITOR_ENABLED!==`false`&&f.editor.enabled){let e=String(t??``);return v(`<intlayer-content-selector-wrapper key-path="${y(JSON.stringify(n??[]))}" dictionary-key="${y(String(r??``))}">${b(e)}</intlayer-content-selector-wrapper>`,e)}return u.renderIntlayerNode({...i,value:t,children:t})}},S=process.env.INTLAYER_NODE_TYPE_INSERTION===`false`?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`||(0,d.isInterpolableWrapperNode)(e),transform:(e,n,r)=>{if((0,d.isInterpolableWrapperNode)(e))return i=>(0,d.transformInterpolableNode)(e,i,n,t.plugins,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}},C=process.env.INTLAYER_NODE_TYPE_MARKDOWN===`false`?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)=>u.renderIntlayerNode({...n,value:t,children:e})}],dictionaryKey:i.dictionaryKey,keyPath:[]}),c=_(e),l=t=>{let n=_(e,{components:t});return process.env.INTLAYER_EDITOR_ENABLED!==`false`&&f.editor.enabled?v(`<intlayer-content-selector-wrapper key-path="${y(JSON.stringify(a??[]))}" dictionary-key="${y(String(o??``))}">${n}</intlayer-content-selector-wrapper>`,e):v(n,e)};return process.env.INTLAYER_EDITOR_ENABLED!==`false`&&f.editor.enabled?v(`<intlayer-content-selector-wrapper key-path="${y(JSON.stringify(a??[]))}" dictionary-key="${y(String(o??``))}">${c}</intlayer-content-selector-wrapper>`,e,{metadata:s,use:l}):v(c,e,{metadata:s,use:l})}},w=process.env.INTLAYER_NODE_TYPE_MARKDOWN===`false`?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:[C,...t.plugins??[]]})}},T=process.env.INTLAYER_NODE_TYPE_HTML===`false`?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=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)}>`}}),o=(0,d.getHTML)(n,a);return process.env.INTLAYER_EDITOR_ENABLED!==`false`&&f.editor.enabled?v(`<intlayer-content-selector-wrapper key-path="${y(JSON.stringify(r??[]))}" dictionary-key="${y(String(i??``))}">${o}</intlayer-content-selector-wrapper>`,n):v(o,n)};return process.env.INTLAYER_EDITOR_ENABLED!==`false`&&f.editor.enabled?v(`<intlayer-content-selector-wrapper key-path="${y(JSON.stringify(r??[]))}" dictionary-key="${y(String(i??``))}">${n}</intlayer-content-selector-wrapper>`,n,{use:a}):v(n,n,{use:a})}},E=new Map,D=(e,t=!0)=>{let n=e??(typeof window<`u`&&c.r()?.locale)??f.internationalization.defaultLocale,r=`${n}_${t}`;if(E.has(r))return E.get(r);let i=[(0,d.translationPlugin)(e??f.internationalization.defaultLocale,t?f.internationalization.defaultLocale:void 0),d.enumerationPlugin,(0,d.pluralPlugin)(n),d.conditionPlugin,(0,d.nestedPlugin)(n),d.filePlugin,d.genderPlugin,d.selectPlugin,x,S,w,T];return E.set(r,i),i};exports.getPlugins=D,exports.htmlPlugin=T,exports.insertionPlugin=S,exports.intlayerNodePlugins=x,exports.markdownPlugin=w,exports.markdownStringPlugin=C;
@@ -1,11 +1,11 @@
1
1
  import { r as e } from "../../installIntlayer-DT6bzUDN.mjs";
2
- import { IntlayerBinding as t } from "./IntlayerBinding.mjs";
3
- import { getDictionary as n } from "../getDictionary.mjs";
2
+ import { getDictionary as t } from "../getDictionary.mjs";
3
+ import { IntlayerBinding as n } from "./IntlayerBinding.mjs";
4
4
  import { internationalization as r } from "@intlayer/config/built";
5
5
  import { resolveDictionaryArgument as i } from "@intlayer/core/dictionaryManipulator";
6
6
  //#region src/client/useDictionary.ts
7
7
  var a = (a, o) => {
8
- let s = e(), c = process.env.INTLAYER_DICTIONARY_SELECTOR !== "false" && typeof o == "object" && o ? o.locale : o, l = (e) => process.env.INTLAYER_DICTIONARY_SELECTOR === "false" ? n(a, e) : n(a, i({
8
+ let s = e(), c = process.env.INTLAYER_DICTIONARY_SELECTOR !== "false" && typeof o == "object" && o ? o.locale : o, l = (e) => process.env.INTLAYER_DICTIONARY_SELECTOR === "false" ? t(a, e) : t(a, i({
9
9
  localeOrSelector: o,
10
10
  contextLocale: e,
11
11
  contextVariant: s.variant,
@@ -20,7 +20,7 @@ var a = (a, o) => {
20
20
  if (t === "toString") return () => String(u?.toString?.() ?? "");
21
21
  if (t !== "then" && u != null) return u[t];
22
22
  } });
23
- return d = (e) => (new t(e), f), f;
23
+ return d = (e) => (new n(e), f), f;
24
24
  };
25
25
  //#endregion
26
26
  export { a as useDictionary };
@@ -1,6 +1,6 @@
1
1
  import { r as e } from "../../installIntlayer-DT6bzUDN.mjs";
2
- import { IntlayerBinding as t } from "./IntlayerBinding.mjs";
3
- import { getDictionary as n } from "../getDictionary.mjs";
2
+ import { getDictionary as t } from "../getDictionary.mjs";
3
+ import { IntlayerBinding as n } from "./IntlayerBinding.mjs";
4
4
  import { internationalization as r } from "@intlayer/config/built";
5
5
  import { getPreloadedDictionary as i, isQualifiedDynamicLoaderMap as a, parseDictionarySelector as o, resolveDictionaryArgument as s, resolveQualifiedDynamicContentAsync as c } from "@intlayer/core/dictionaryManipulator";
6
6
  //#region src/client/useDictionaryDynamic.ts
@@ -34,20 +34,20 @@ var l = /* @__PURE__ */ new Map(), u = async (e, t) => {
34
34
  key: String(p),
35
35
  locale: e,
36
36
  selector: v,
37
- transform: (t) => n(t, e)
37
+ transform: (n) => t(n, e)
38
38
  }).then((e) => {
39
39
  b = e, S();
40
40
  });
41
41
  return;
42
42
  }
43
- let t = `${String(p)}.${e}`, r = i(f, e);
43
+ let n = `${String(p)}.${e}`, r = i(f, e);
44
44
  if (r) {
45
- l.set(t, r), b = n(r, e), S();
45
+ l.set(n, r), b = t(r, e), S();
46
46
  return;
47
47
  }
48
48
  let a = f[e];
49
- u(t, a).then((t) => {
50
- t && (b = n(t, e), S());
49
+ u(n, a).then((n) => {
50
+ n && (b = t(n, e), S());
51
51
  });
52
52
  };
53
53
  C(y()), h.subscribe((e) => {
@@ -60,11 +60,11 @@ var l = /* @__PURE__ */ new Map(), u = async (e, t) => {
60
60
  if (t !== "then") return b == null ? d : b[t];
61
61
  } });
62
62
  return w = (e) => {
63
- let n = () => e.requestUpdate();
64
- return x.add(n), new t(e, () => {
63
+ let t = () => e.requestUpdate();
64
+ return x.add(t), new n(e, () => {
65
65
  b != null && e.requestUpdate();
66
66
  }, () => {
67
- x.delete(n);
67
+ x.delete(t);
68
68
  }), T;
69
69
  }, T;
70
70
  };
@@ -1,21 +1,21 @@
1
1
  import { r as e } from "../../installIntlayer-DT6bzUDN.mjs";
2
- import { IntlayerBinding as t } from "./IntlayerBinding.mjs";
3
- import { getIntlayer as n } from "../getIntlayer.mjs";
2
+ import { getIntlayer as t } from "../getIntlayer.mjs";
3
+ import { IntlayerBinding as n } from "./IntlayerBinding.mjs";
4
4
  import { internationalization as r } from "@intlayer/config/built";
5
5
  import { resolveDictionaryArgument as i } from "@intlayer/core/dictionaryManipulator";
6
6
  //#region src/client/useIntlayer.ts
7
7
  var a = (a, o) => {
8
- let s = e(), c = process.env.INTLAYER_DICTIONARY_SELECTOR !== "false" && typeof o == "object" && o ? o.locale : o, l = (e) => process.env.INTLAYER_DICTIONARY_SELECTOR === "false" ? n(a, e) : n(a, i({
8
+ let s = e(), c = process.env.INTLAYER_DICTIONARY_SELECTOR !== "false" && typeof o == "object" && o ? o.locale : o, l = (e) => process.env.INTLAYER_DICTIONARY_SELECTOR === "false" ? t(a, e) : t(a, i({
9
9
  localeOrSelector: o,
10
10
  contextLocale: e,
11
11
  contextVariant: s.variant,
12
12
  dictionaryKey: a
13
- })), u, d, f = !1, p = new Proxy({}, { get(e, n) {
14
- if (n === "observe") return (e) => (new t(e), p);
15
- if (n === Symbol.toPrimitive || n === "toString") return () => "";
16
- if (n === "then" || typeof n == "symbol" || typeof n == "string" && n.startsWith("_$")) return;
13
+ })), u, d, f = !1, p = new Proxy({}, { get(e, t) {
14
+ if (t === "observe") return (e) => (new n(e), p);
15
+ if (t === Symbol.toPrimitive || t === "toString") return () => "";
16
+ if (t === "then" || typeof t == "symbol" || typeof t == "string" && t.startsWith("_$")) return;
17
17
  let i = c ?? s.locale ?? r.defaultLocale;
18
- if ((!f || u !== i) && (d = l(i), u = i, f = !0), d != null) return d[n];
18
+ if ((!f || u !== i) && (d = l(i), u = i, f = !0), d != null) return d[t];
19
19
  } });
20
20
  return p;
21
21
  };
@@ -1,10 +1,10 @@
1
- import { useCurrency as e } from "./useCurrency.mjs";
1
+ import { usePercentage as e } from "./usePercentage.mjs";
2
2
  import { useUnit as t } from "./useUnit.mjs";
3
- import { useDate as n } from "./useDate.mjs";
4
- import { useCompact as r } from "./useCompact.mjs";
3
+ import { useCompact as n } from "./useCompact.mjs";
4
+ import { useNumber as r } from "./useNumber.mjs";
5
5
  import { useIntl as i } from "./useIntl.mjs";
6
6
  import { useList as a } from "./useList.mjs";
7
- import { useNumber as o } from "./useNumber.mjs";
8
- import { usePercentage as s } from "./usePercentage.mjs";
7
+ import { useCurrency as o } from "./useCurrency.mjs";
8
+ import { useDate as s } from "./useDate.mjs";
9
9
  import { useRelativeTime as c } from "./useRelativeTime.mjs";
10
- export { r as useCompact, e as useCurrency, n as useDate, i as useIntl, a as useList, o as useNumber, s as usePercentage, c as useRelativeTime, t as useUnit };
10
+ export { n as useCompact, o as useCurrency, s as useDate, i as useIntl, a as useList, r as useNumber, e as usePercentage, c as useRelativeTime, t as useUnit };
@@ -1,13 +1,13 @@
1
1
  import { a as e, i as t, n, r, t as i } from "../installIntlayer-DT6bzUDN.mjs";
2
- import { IntlayerBinding as a } from "./client/IntlayerBinding.mjs";
3
- import { getPlugins as o, htmlPlugin as s, insertionPlugin as c, intlayerNodePlugins as l, markdownPlugin as u, markdownStringPlugin as d } from "./plugins.mjs";
4
- import { getDictionary as f } from "./getDictionary.mjs";
5
- import { useDictionary as p } from "./client/useDictionary.mjs";
6
- import { useDictionaryDynamic as m } from "./client/useDictionaryDynamic.mjs";
7
- import { getIntlayer as h } from "./getIntlayer.mjs";
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 { getDictionary as d } from "./getDictionary.mjs";
4
+ import { getIntlayer as f } from "./getIntlayer.mjs";
5
+ import { IntlayerBinding as p } from "./client/IntlayerBinding.mjs";
6
+ import { useDictionary as m } from "./client/useDictionary.mjs";
7
+ import { useDictionaryDynamic as h } from "./client/useDictionaryDynamic.mjs";
8
8
  import { useIntlayer as g } from "./client/useIntlayer.mjs";
9
9
  import { localeCookie as _, localeInStorage as v, setLocaleCookie as y, setLocaleInStorage as b, useLocaleCookie as x, useLocaleStorage as S } from "./client/useLocaleStorage.mjs";
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 { a as IntlayerBinding, i as IntlayerClient, C as LocaleController, n as createIntlayerClient, f as getDictionary, h as getIntlayer, r as getIntlayerClient, o as getPlugins, s as htmlPlugin, c as insertionPlugin, t as installIntlayer, l as intlayerNodePlugins, _ as localeCookie, v as localeInStorage, u as markdownPlugin, d as markdownStringPlugin, y as setLocaleCookie, b as setLocaleInStorage, p as useDictionary, m as useDictionaryDynamic, e as useEditor, g as useIntlayer, w as useLocale, x as useLocaleCookie, S as useLocaleStorage, T as useRewriteURL };
13
+ export { p as IntlayerBinding, i as IntlayerClient, C as LocaleController, n as createIntlayerClient, d as getDictionary, f 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 };
@@ -1,8 +1,8 @@
1
1
  import { r as e } from "../installIntlayer-DT6bzUDN.mjs";
2
2
  import t from "./markdown/runtime.mjs";
3
3
  import { renderIntlayerNode as n } from "./renderIntlayerNode.mjs";
4
- import { editor as r, internationalization as i } from "@intlayer/config/built";
5
- import { conditionPlugin as a, enumerationPlugin as o, fallbackPlugin as s, filePlugin as c, genderPlugin as l, getHTML as u, isInterpolableWrapperNode as d, nestedPlugin as f, pluralPlugin as p, selectPlugin as m, splitInsertionTemplate as h, transformInterpolableNode as g, translationPlugin as _ } from "@intlayer/core/interpreter";
4
+ import { conditionPlugin as r, enumerationPlugin as i, fallbackPlugin as a, filePlugin as o, genderPlugin as s, getHTML as c, isInterpolableWrapperNode as l, nestedPlugin as u, pluralPlugin as d, selectPlugin as f, splitInsertionTemplate as p, transformInterpolableNode as m, translationPlugin as h } from "@intlayer/core/interpreter";
5
+ import { editor as g, internationalization as _ } from "@intlayer/config/built";
6
6
  import { compileWithOptions as v, getMarkdownMetadata as y } from "@intlayer/core/markdown";
7
7
  import * as b from "@intlayer/types/nodeType";
8
8
  import { unsafeHTML as x } from "lit/directives/unsafe-html.js";
@@ -18,33 +18,33 @@ var w = (e = "", n = {}) => v(e, t, n), T = (e, t, n = {}) => {
18
18
  }, E = (e) => e.replace(/&/g, "&amp;").replace(/"/g, "&quot;"), D = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), O = {
19
19
  id: "intlayer-node-plugin",
20
20
  canHandle: (e) => typeof e == "bigint" || typeof e == "string" || typeof e == "number",
21
- transform: (e, { children: t, keyPath: i, dictionaryKey: a, ...o }) => {
22
- if (process.env.INTLAYER_EDITOR_ENABLED !== "false" && r.enabled) {
21
+ transform: (e, { children: t, keyPath: r, dictionaryKey: i, ...a }) => {
22
+ if (process.env.INTLAYER_EDITOR_ENABLED !== "false" && g.enabled) {
23
23
  let e = String(t ?? "");
24
- return T(`<intlayer-content-selector-wrapper key-path="${E(JSON.stringify(i ?? []))}" dictionary-key="${E(String(a ?? ""))}">${D(e)}</intlayer-content-selector-wrapper>`, e);
24
+ return T(`<intlayer-content-selector-wrapper key-path="${E(JSON.stringify(r ?? []))}" dictionary-key="${E(String(i ?? ""))}">${D(e)}</intlayer-content-selector-wrapper>`, e);
25
25
  }
26
26
  return n({
27
- ...o,
27
+ ...a,
28
28
  value: t,
29
29
  children: t
30
30
  });
31
31
  }
32
- }, k = process.env.INTLAYER_NODE_TYPE_INSERTION === "false" ? s : {
32
+ }, k = process.env.INTLAYER_NODE_TYPE_INSERTION === "false" ? a : {
33
33
  id: "insertion-plugin",
34
34
  canHandle: (e) => typeof e == "object" && e?.nodeType === b.INSERTION,
35
35
  transform: (e, t, n) => {
36
36
  let r = [...t.keyPath, { type: b.INSERTION }], i = e[b.INSERTION], a = {
37
37
  id: "insertion-string-plugin",
38
- canHandle: (e) => typeof e == "string" || d(e),
38
+ canHandle: (e) => typeof e == "string" || l(e),
39
39
  transform: (e, n, r) => {
40
- if (d(e)) return (i) => g(e, i, n, t.plugins, r);
40
+ if (l(e)) return (i) => m(e, i, n, t.plugins, r);
41
41
  let i = r(e, {
42
42
  ...n,
43
43
  children: e,
44
44
  plugins: (t.plugins ?? []).filter((e) => e.id !== "intlayer-node-plugin")
45
45
  });
46
46
  return (e) => {
47
- let a = h(i, e), o = a.isSimple ? a.parts : a.parts.join("");
47
+ let a = p(i, e), o = a.isSimple ? a.parts : a.parts.join("");
48
48
  return r(o, {
49
49
  ...n,
50
50
  plugins: t.plugins,
@@ -63,11 +63,11 @@ var w = (e = "", n = {}) => v(e, t, n), T = (e, t, n = {}) => {
63
63
  return typeof n == "function" ? n(e) : n;
64
64
  } : o;
65
65
  }
66
- }, A = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? s : {
66
+ }, A = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? a : {
67
67
  id: "markdown-string-plugin",
68
68
  canHandle: (e) => typeof e == "string",
69
- transform: (e, t, i) => {
70
- let { plugins: a, ...o } = t, { keyPath: s, dictionaryKey: c } = o, l = i(y(e) ?? {}, {
69
+ transform: (e, t, r) => {
70
+ let { plugins: i, ...a } = t, { keyPath: o, dictionaryKey: s } = a, c = r(y(e) ?? {}, {
71
71
  plugins: [{
72
72
  id: "markdown-metadata-plugin",
73
73
  canHandle: (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || !e,
@@ -77,21 +77,21 @@ var w = (e = "", n = {}) => v(e, t, n), T = (e, t, n = {}) => {
77
77
  children: e
78
78
  })
79
79
  }],
80
- dictionaryKey: o.dictionaryKey,
80
+ dictionaryKey: a.dictionaryKey,
81
81
  keyPath: []
82
- }), u = w(e), d = (t) => {
82
+ }), l = w(e), u = (t) => {
83
83
  let n = w(e, { components: t });
84
- return process.env.INTLAYER_EDITOR_ENABLED !== "false" && r.enabled ? T(`<intlayer-content-selector-wrapper key-path="${E(JSON.stringify(s ?? []))}" dictionary-key="${E(String(c ?? ""))}">${n}</intlayer-content-selector-wrapper>`, e) : T(n, e);
84
+ return process.env.INTLAYER_EDITOR_ENABLED !== "false" && g.enabled ? T(`<intlayer-content-selector-wrapper key-path="${E(JSON.stringify(o ?? []))}" dictionary-key="${E(String(s ?? ""))}">${n}</intlayer-content-selector-wrapper>`, e) : T(n, e);
85
85
  };
86
- return process.env.INTLAYER_EDITOR_ENABLED !== "false" && r.enabled ? T(`<intlayer-content-selector-wrapper key-path="${E(JSON.stringify(s ?? []))}" dictionary-key="${E(String(c ?? ""))}">${u}</intlayer-content-selector-wrapper>`, e, {
87
- metadata: l,
88
- use: d
89
- }) : T(u, e, {
90
- metadata: l,
91
- use: d
86
+ return process.env.INTLAYER_EDITOR_ENABLED !== "false" && g.enabled ? T(`<intlayer-content-selector-wrapper key-path="${E(JSON.stringify(o ?? []))}" dictionary-key="${E(String(s ?? ""))}">${l}</intlayer-content-selector-wrapper>`, e, {
87
+ metadata: c,
88
+ use: u
89
+ }) : T(l, e, {
90
+ metadata: c,
91
+ use: u
92
92
  });
93
93
  }
94
- }, j = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? s : {
94
+ }, j = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? a : {
95
95
  id: "markdown-plugin",
96
96
  canHandle: (e) => typeof e == "object" && e?.nodeType === b.MARKDOWN,
97
97
  transform: (e, t, n) => {
@@ -103,37 +103,37 @@ var w = (e = "", n = {}) => v(e, t, n), T = (e, t, n = {}) => {
103
103
  plugins: [A, ...t.plugins ?? []]
104
104
  });
105
105
  }
106
- }, M = process.env.INTLAYER_NODE_TYPE_HTML === "false" ? s : {
106
+ }, M = process.env.INTLAYER_NODE_TYPE_HTML === "false" ? a : {
107
107
  id: "html-plugin",
108
108
  canHandle: (e) => typeof e == "object" && e?.nodeType === b.HTML,
109
109
  transform: (e, t) => {
110
- let n = e[b.HTML], { keyPath: i, dictionaryKey: a } = t, o = (e = {}) => {
111
- let t = Object.fromEntries(Object.entries(e).filter(([, e]) => e).map(([e, t]) => [e, (e) => t(e)])), o = new Proxy(t, { get(e, t) {
110
+ let n = e[b.HTML], { keyPath: r, dictionaryKey: i } = t, a = (e = {}) => {
111
+ let t = Object.fromEntries(Object.entries(e).filter(([, e]) => e).map(([e, t]) => [e, (e) => t(e)])), a = new Proxy(t, { get(e, t) {
112
112
  if (typeof t == "string" && t in e) return e[t];
113
113
  if (typeof t == "string" && /^[a-z][a-z0-9]*$/.test(t)) return (e) => S`<${C(t)} ...${e}>${e.children}</${C(t)}>`;
114
- } }), s = u(n, o);
115
- return process.env.INTLAYER_EDITOR_ENABLED !== "false" && r.enabled ? T(`<intlayer-content-selector-wrapper key-path="${E(JSON.stringify(i ?? []))}" dictionary-key="${E(String(a ?? ""))}">${s}</intlayer-content-selector-wrapper>`, n) : T(s, n);
114
+ } }), o = c(n, a);
115
+ return process.env.INTLAYER_EDITOR_ENABLED !== "false" && g.enabled ? T(`<intlayer-content-selector-wrapper key-path="${E(JSON.stringify(r ?? []))}" dictionary-key="${E(String(i ?? ""))}">${o}</intlayer-content-selector-wrapper>`, n) : T(o, n);
116
116
  };
117
- return process.env.INTLAYER_EDITOR_ENABLED !== "false" && r.enabled ? T(`<intlayer-content-selector-wrapper key-path="${E(JSON.stringify(i ?? []))}" dictionary-key="${E(String(a ?? ""))}">${n}</intlayer-content-selector-wrapper>`, n, { use: o }) : T(n, n, { use: o });
117
+ return process.env.INTLAYER_EDITOR_ENABLED !== "false" && g.enabled ? T(`<intlayer-content-selector-wrapper key-path="${E(JSON.stringify(r ?? []))}" dictionary-key="${E(String(i ?? ""))}">${n}</intlayer-content-selector-wrapper>`, n, { use: a }) : T(n, n, { use: a });
118
118
  }
119
119
  }, N = /* @__PURE__ */ new Map(), P = (t, n = !0) => {
120
- let r = t ?? (typeof window < "u" && e()?.locale) ?? i.defaultLocale, s = `${r}_${n}`;
121
- if (N.has(s)) return N.get(s);
122
- let u = [
123
- _(t ?? i.defaultLocale, n ? i.defaultLocale : void 0),
120
+ let a = t ?? (typeof window < "u" && e()?.locale) ?? _.defaultLocale, c = `${a}_${n}`;
121
+ if (N.has(c)) return N.get(c);
122
+ let l = [
123
+ h(t ?? _.defaultLocale, n ? _.defaultLocale : void 0),
124
+ i,
125
+ d(a),
126
+ r,
127
+ u(a),
124
128
  o,
125
- p(r),
126
- a,
127
- f(r),
128
- c,
129
- l,
130
- m,
129
+ s,
130
+ f,
131
131
  O,
132
132
  k,
133
133
  j,
134
134
  M
135
135
  ];
136
- return N.set(s, u), u;
136
+ return N.set(c, l), l;
137
137
  };
138
138
  //#endregion
139
139
  export { P as getPlugins, M as htmlPlugin, k as insertionPlugin, O as intlayerNodePlugins, j as markdownPlugin, A as markdownStringPlugin };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lit-intlayer",
3
- "version": "9.5.5",
3
+ "version": "9.5.7",
4
4
  "private": false,
5
5
  "description": "Easily internationalize i18n your Lit applications with type-safe multilingual content management.",
6
6
  "keywords": [
@@ -104,11 +104,11 @@
104
104
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
105
105
  },
106
106
  "dependencies": {
107
- "@intlayer/api": "9.5.5",
108
- "@intlayer/config": "9.5.5",
109
- "@intlayer/core": "9.5.5",
110
- "@intlayer/editor": "9.5.5",
111
- "@intlayer/types": "9.5.5"
107
+ "@intlayer/api": "9.5.6",
108
+ "@intlayer/config": "9.5.6",
109
+ "@intlayer/core": "9.5.6",
110
+ "@intlayer/editor": "9.5.7",
111
+ "@intlayer/types": "9.5.6"
112
112
  },
113
113
  "devDependencies": {
114
114
  "@types/node": "^22",
@@ -121,11 +121,11 @@
121
121
  "tsdown": "0.23.0",
122
122
  "typescript": "7.0.2",
123
123
  "vite": "8.3.0",
124
- "vite-plugin-dts": "5.1.0",
124
+ "vite-plugin-dts": "5.1.1",
125
125
  "vitest": "5.0.1"
126
126
  },
127
127
  "peerDependencies": {
128
- "intlayer": "9.5.5",
128
+ "intlayer": "9.5.6",
129
129
  "lit": ">=3.0.0"
130
130
  },
131
131
  "peerDependenciesMeta": {