lit-intlayer 9.1.2 → 9.2.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.
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./plugins.cjs");let t=require("@intlayer/core/interpreter");var n=(n,r)=>(0,t.getDictionary)(n,r,e.getPlugins(typeof r==`object`&&r?r.locale:r));exports.getDictionary=n;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./plugins.cjs");let t=require("@intlayer/core/interpreter");var n=(n,r)=>{let i=typeof r==`object`&&r?r.locale:r;return(0,t.getDictionary)(n,r,e.getPlugins(i))};exports.getDictionary=n;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./plugins.cjs");let t=require("@intlayer/core/interpreter");var n=(n,r)=>(0,t.getIntlayer)(n,r,e.getPlugins(typeof r==`object`&&r?r.locale:r));exports.getIntlayer=n;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./plugins.cjs");let t=require("@intlayer/core/interpreter");var n=(n,r)=>{let i=typeof r==`object`&&r?r.locale:r;return(0,t.getIntlayer)(n,r,e.getPlugins(i))};exports.getIntlayer=n;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});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;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});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(){if(!this.content)return n.nothing;let e=i({components:this.components});return n.html`${(0,t.unsafeHTML)(e(this.content))}`}};customElements.get(`intlayer-html-renderer`)||customElements.define(`intlayer-html-renderer`,a),exports.HTMLRenderer=a,exports.renderHTML=r,exports.useHTMLRenderer=i;
@@ -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,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));const c=require("./renderIntlayerNode.cjs"),l=require("../installIntlayer-Crmc3v8X.js"),u=require("./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 _=(e=``,t={})=>(0,p.compileWithOptions)(e,u.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 c.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)=>c.renderIntlayerNode({...n,value:t,children:e})}],dictionaryKey:i.dictionaryKey,keyPath:[]}),l=_(e),u=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??``))}">${l}</intlayer-content-selector-wrapper>`,e,{metadata:s,use:u}):v(l,e,{metadata:s,use:u})}},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`&&l.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
+ 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("./renderIntlayerNode.cjs"),l=require("../installIntlayer-Crmc3v8X.js"),u=require("./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 _=(e=``,t={})=>(0,p.compileWithOptions)(e,u.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 c.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)=>c.renderIntlayerNode({...n,value:t,children:e})}],dictionaryKey:i.dictionaryKey,keyPath:[]}),l=_(e),u=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??``))}">${l}</intlayer-content-selector-wrapper>`,e,{metadata:s,use:u}):v(l,e,{metadata:s,use:u})}},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`&&l.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,6 +1,9 @@
1
1
  import { getPlugins as e } from "./plugins.mjs";
2
2
  import { getDictionary as t } from "@intlayer/core/interpreter";
3
3
  //#region src/getDictionary.ts
4
- var n = (n, r) => t(n, r, e(typeof r == "object" && r ? r.locale : r));
4
+ var n = (n, r) => {
5
+ let i = typeof r == "object" && r ? r.locale : r;
6
+ return t(n, r, e(i));
7
+ };
5
8
  //#endregion
6
9
  export { n as getDictionary };
@@ -1,6 +1,9 @@
1
1
  import { getPlugins as e } from "./plugins.mjs";
2
2
  import { getIntlayer as t } from "@intlayer/core/interpreter";
3
3
  //#region src/getIntlayer.ts
4
- var n = (n, r) => t(n, r, e(typeof r == "object" && r ? r.locale : r));
4
+ var n = (n, r) => {
5
+ let i = typeof r == "object" && r ? r.locale : r;
6
+ return t(n, r, e(i));
7
+ };
5
8
  //#endregion
6
9
  export { n as getIntlayer };
@@ -16,7 +16,9 @@ var a = (e, t = {}) => e, o = ({ components: t } = {}) => {
16
16
  return this;
17
17
  }
18
18
  render() {
19
- return this.content ? r`${t(o({ components: this.components })(this.content))}` : i;
19
+ if (!this.content) return i;
20
+ let e = o({ components: this.components });
21
+ return r`${t(e(this.content))}`;
20
22
  }
21
23
  };
22
24
  customElements.get("intlayer-html-renderer") || customElements.define("intlayer-html-renderer", s);
@@ -1,5 +1,5 @@
1
1
  import { Dictionary, DictionarySelectorForGroup, QualifiedDictionaryGroup, ResolveQualifiedDictionaryContent } from '@intlayer/types/dictionary';
2
- import { DeclaredLocales, ExtractSelectorLocale } from '@intlayer/types/module_augmentation';
2
+ import { DeclaredLocales, ExtractSelectorLocale, LocalesValues } from '@intlayer/types/module_augmentation';
3
3
  import { DeepTransformContent } from '../plugins';
4
4
  import { IntlayerLitProxy } from './IntlayerBinding';
5
5
  /**
@@ -14,5 +14,5 @@ import { IntlayerLitProxy } from './IntlayerBinding';
14
14
  * @param localeOrSelector - Optional locale or selector.
15
15
  * @returns An {@link IntlayerLitProxy} with an `.observe()` registration method.
16
16
  */
17
- export declare const useDictionary: <const T extends Dictionary | QualifiedDictionaryGroup, const A extends DeclaredLocales | DictionarySelectorForGroup<T> = DeclaredLocales>(dictionary: T, localeOrSelector?: A) => IntlayerLitProxy<DeepTransformContent<ResolveQualifiedDictionaryContent<T, A>, ExtractSelectorLocale<A>>>;
17
+ export declare const useDictionary: <const T extends Dictionary | QualifiedDictionaryGroup, const A extends LocalesValues | DictionarySelectorForGroup<T> = DeclaredLocales>(dictionary: T, localeOrSelector?: A) => IntlayerLitProxy<DeepTransformContent<ResolveQualifiedDictionaryContent<T, A>, ExtractSelectorLocale<A>>>;
18
18
  //# sourceMappingURL=useDictionary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDictionary.d.ts","sourceRoot":"","sources":["../../../src/client/useDictionary.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,UAAU,EAEV,0BAA0B,EAC1B,wBAAwB,EACxB,iCAAiC,EAClC,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EAEtB,MAAM,qCAAqC,CAAC;AAG7C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAmB,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG3E;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa,GACxB,KAAK,CAAC,CAAC,SAAS,UAAU,GAAG,wBAAwB,EACrD,KAAK,CAAC,CAAC,SACH,eAAe,GACf,0BAA0B,CAAC,CAAC,CAAC,GAAG,eAAe,EAEnD,YAAY,CAAC,EACb,mBAAmB,CAAC,KACnB,gBAAgB,CACjB,oBAAoB,CAClB,iCAAiC,CAAC,CAAC,EAAE,CAAC,CAAC,EACvC,qBAAqB,CAAC,CAAC,CAAC,CACzB,CAmEF,CAAC"}
1
+ {"version":3,"file":"useDictionary.d.ts","sourceRoot":"","sources":["../../../src/client/useDictionary.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,UAAU,EAEV,0BAA0B,EAC1B,wBAAwB,EACxB,iCAAiC,EAClC,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACrB,aAAa,EACd,MAAM,qCAAqC,CAAC;AAG7C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAmB,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG3E;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa,GACxB,KAAK,CAAC,CAAC,SAAS,UAAU,GAAG,wBAAwB,EACrD,KAAK,CAAC,CAAC,SACH,aAAa,GACb,0BAA0B,CAAC,CAAC,CAAC,GAAG,eAAe,EAEnD,YAAY,CAAC,EACb,mBAAmB,CAAC,KACnB,gBAAgB,CACjB,oBAAoB,CAClB,iCAAiC,CAAC,CAAC,EAAE,CAAC,CAAC,EACvC,qBAAqB,CAAC,CAAC,CAAC,CACzB,CAmEF,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { QualifiedDynamicLoaderMap } from '@intlayer/core/dictionaryManipulator';
2
2
  import { Dictionary } from '@intlayer/types/dictionary';
3
- import { DeclaredLocales, DictionaryKeys, DictionarySelectorForKey, StrictModeLocaleMap } from '@intlayer/types/module_augmentation';
3
+ import { DeclaredLocales, DictionaryKeys, DictionarySelectorForKey, LocalesValues, StrictModeLocaleMap } from '@intlayer/types/module_augmentation';
4
4
  import { DeepTransformContent } from '../plugins';
5
5
  import { IntlayerLitProxy } from './IntlayerBinding';
6
6
  /**
@@ -34,5 +34,5 @@ import { IntlayerLitProxy } from './IntlayerBinding';
34
34
  * private content = useDictionaryDynamic(_hash_dyn, 'app').observe(this);
35
35
  * ```
36
36
  */
37
- export declare const useDictionaryDynamic: <const T extends Dictionary, const K extends DictionaryKeys, const A extends DeclaredLocales | DictionarySelectorForKey<K> = DeclaredLocales>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>> | QualifiedDynamicLoaderMap, key: K, localeOrSelector?: A) => IntlayerLitProxy<DeepTransformContent<T["content"]>>;
37
+ export declare const useDictionaryDynamic: <const T extends Dictionary, const K extends DictionaryKeys, const A extends LocalesValues | DictionarySelectorForKey<K> = DeclaredLocales>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>> | QualifiedDynamicLoaderMap, key: K, localeOrSelector?: A) => IntlayerLitProxy<DeepTransformContent<T["content"]>>;
38
38
  //# sourceMappingURL=useDictionaryDynamic.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDictionaryDynamic.d.ts","sourceRoot":"","sources":["../../../src/client/useDictionaryDynamic.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,yBAAyB,EAG/B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,wBAAwB,EAExB,mBAAmB,EACpB,MAAM,qCAAqC,CAAC;AAG7C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAmB,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAkD3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,oBAAoB,GAC/B,KAAK,CAAC,CAAC,SAAS,UAAU,EAC1B,KAAK,CAAC,CAAC,SAAS,cAAc,EAC9B,KAAK,CAAC,CAAC,SACH,eAAe,GACf,wBAAwB,CAAC,CAAC,CAAC,GAAG,eAAe,EAEjD,mBACI,mBAAmB,CAAC,MAAM,OAAO,CAAC,CAAC,CAAC,CAAC,GACrC,yBAAyB,EAC7B,KAAK,CAAC,EACN,mBAAmB,CAAC,KACnB,gBAAgB,CAAC,oBAAoB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAwHrD,CAAC"}
1
+ {"version":3,"file":"useDictionaryDynamic.d.ts","sourceRoot":"","sources":["../../../src/client/useDictionaryDynamic.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,yBAAyB,EAG/B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,wBAAwB,EACxB,aAAa,EACb,mBAAmB,EACpB,MAAM,qCAAqC,CAAC;AAG7C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAmB,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAkD3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,oBAAoB,GAC/B,KAAK,CAAC,CAAC,SAAS,UAAU,EAC1B,KAAK,CAAC,CAAC,SAAS,cAAc,EAC9B,KAAK,CAAC,CAAC,SAAS,aAAa,GAAG,wBAAwB,CAAC,CAAC,CAAC,GAAG,eAAe,EAE7E,mBACI,mBAAmB,CAAC,MAAM,OAAO,CAAC,CAAC,CAAC,CAAC,GACrC,yBAAyB,EAC7B,KAAK,CAAC,EACN,mBAAmB,CAAC,KACnB,gBAAgB,CAAC,oBAAoB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAwHrD,CAAC"}
@@ -1,4 +1,4 @@
1
- import { DeclaredLocales, DictionaryKeys, DictionaryRegistryResult, DictionarySelectorForKey, ExtractSelectorLocale } from '@intlayer/types/module_augmentation';
1
+ import { DeclaredLocales, DictionaryKeys, DictionaryRegistryResult, DictionarySelectorForKey, ExtractSelectorLocale, LocalesValues } from '@intlayer/types/module_augmentation';
2
2
  import { DeepTransformContent } from '../plugins';
3
3
  import { IntlayerLitProxy } from './IntlayerBinding';
4
4
  /**
@@ -19,5 +19,5 @@ import { IntlayerLitProxy } from './IntlayerBinding';
19
19
  * In non-optimized builds (dev without babel) the content is re-fetched from
20
20
  * `getIntlayer` on every property access, caching by locale.
21
21
  */
22
- export declare const useIntlayer: <const T extends DictionaryKeys, const A extends DeclaredLocales | DictionarySelectorForKey<T> = DeclaredLocales>(key: T, localeOrSelector?: A) => IntlayerLitProxy<DeepTransformContent<DictionaryRegistryResult<T, A>, ExtractSelectorLocale<A>>>;
22
+ export declare const useIntlayer: <const T extends DictionaryKeys, const A extends LocalesValues | DictionarySelectorForKey<T> = DeclaredLocales>(key: T, localeOrSelector?: A) => IntlayerLitProxy<DeepTransformContent<DictionaryRegistryResult<T, A>, ExtractSelectorLocale<A>>>;
23
23
  //# sourceMappingURL=useIntlayer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useIntlayer.d.ts","sourceRoot":"","sources":["../../../src/client/useIntlayer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EAEtB,MAAM,qCAAqC,CAAC;AAE7C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAmB,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG3E;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,WAAW,GACtB,KAAK,CAAC,CAAC,SAAS,cAAc,EAC9B,KAAK,CAAC,CAAC,SACH,eAAe,GACf,wBAAwB,CAAC,CAAC,CAAC,GAAG,eAAe,EAEjD,KAAK,CAAC,EACN,mBAAmB,CAAC,KACnB,gBAAgB,CACjB,oBAAoB,CAAC,wBAAwB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAqE/E,CAAC"}
1
+ {"version":3,"file":"useIntlayer.d.ts","sourceRoot":"","sources":["../../../src/client/useIntlayer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EACrB,aAAa,EACd,MAAM,qCAAqC,CAAC;AAE7C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAmB,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG3E;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,WAAW,GACtB,KAAK,CAAC,CAAC,SAAS,cAAc,EAC9B,KAAK,CAAC,CAAC,SAAS,aAAa,GAAG,wBAAwB,CAAC,CAAC,CAAC,GAAG,eAAe,EAE7E,KAAK,CAAC,EACN,mBAAmB,CAAC,KACnB,gBAAgB,CACjB,oBAAoB,CAAC,wBAAwB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAqE/E,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import { Dictionary, DictionarySelectorForGroup, QualifiedDictionaryGroup, ResolveQualifiedDictionaryContent } from '@intlayer/types/dictionary';
2
- import { DeclaredLocales, ExtractSelectorLocale } from '@intlayer/types/module_augmentation';
2
+ import { DeclaredLocales, ExtractSelectorLocale, LocalesValues } from '@intlayer/types/module_augmentation';
3
3
  import { DeepTransformContent } from './plugins';
4
4
  /**
5
5
  * Transforms a dictionary (or qualified dictionary group) and returns its
6
6
  * content for the given locale or selector (`{ item }`, `{ variant }`,
7
7
  * optionally combined with `locale`).
8
8
  */
9
- export declare const getDictionary: <const T extends Dictionary | QualifiedDictionaryGroup, const A extends DeclaredLocales | DictionarySelectorForGroup<T> = DeclaredLocales>(dictionary: T, localeOrSelector?: A) => DeepTransformContent<ResolveQualifiedDictionaryContent<T, A>, ExtractSelectorLocale<A>>;
9
+ export declare const getDictionary: <const T extends Dictionary | QualifiedDictionaryGroup, const A extends LocalesValues | DictionarySelectorForGroup<T> = DeclaredLocales>(dictionary: T, localeOrSelector?: A) => DeepTransformContent<ResolveQualifiedDictionaryContent<T, A>, ExtractSelectorLocale<A>>;
10
10
  //# sourceMappingURL=getDictionary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getDictionary.d.ts","sourceRoot":"","sources":["../../src/getDictionary.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,0BAA0B,EAC1B,wBAAwB,EACxB,iCAAiC,EAClC,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EAEtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,KAAK,oBAAoB,EAAc,MAAM,WAAW,CAAC;AAElE;;;;GAIG;AACH,eAAO,MAAM,aAAa,GACxB,KAAK,CAAC,CAAC,SAAS,UAAU,GAAG,wBAAwB,EACrD,KAAK,CAAC,CAAC,SACH,eAAe,GACf,0BAA0B,CAAC,CAAC,CAAC,GAAG,eAAe,EAEnD,YAAY,CAAC,EACb,mBAAmB,CAAC,KACnB,oBAAoB,CACrB,iCAAiC,CAAC,CAAC,EAAE,CAAC,CAAC,EACvC,qBAAqB,CAAC,CAAC,CAAC,CAazB,CAAC"}
1
+ {"version":3,"file":"getDictionary.d.ts","sourceRoot":"","sources":["../../src/getDictionary.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,0BAA0B,EAC1B,wBAAwB,EACxB,iCAAiC,EAClC,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACrB,aAAa,EACd,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,KAAK,oBAAoB,EAAc,MAAM,WAAW,CAAC;AAElE;;;;GAIG;AACH,eAAO,MAAM,aAAa,GACxB,KAAK,CAAC,CAAC,SAAS,UAAU,GAAG,wBAAwB,EACrD,KAAK,CAAC,CAAC,SACH,aAAa,GACb,0BAA0B,CAAC,CAAC,CAAC,GAAG,eAAe,EAEnD,YAAY,CAAC,EACb,mBAAmB,CAAC,KACnB,oBAAoB,CACrB,iCAAiC,CAAC,CAAC,EAAE,CAAC,CAAC,EACvC,qBAAqB,CAAC,CAAC,CAAC,CAazB,CAAC"}
@@ -1,9 +1,9 @@
1
- import { DeclaredLocales, DictionaryKeys, DictionaryRegistryResult, DictionarySelectorForKey, ExtractSelectorLocale } from '@intlayer/types/module_augmentation';
1
+ import { DeclaredLocales, DictionaryKeys, DictionaryRegistryResult, DictionarySelectorForKey, ExtractSelectorLocale, LocalesValues } from '@intlayer/types/module_augmentation';
2
2
  import { DeepTransformContent } from './plugins';
3
3
  /**
4
4
  * Picks one dictionary by its key and returns its content for the given
5
5
  * locale or selector (`{ item }`, `{ variant }`,
6
6
  * optionally combined with `locale`).
7
7
  */
8
- export declare const getIntlayer: <const T extends DictionaryKeys, const A extends DeclaredLocales | DictionarySelectorForKey<T> = DeclaredLocales>(key: T, localeOrSelector?: A) => DeepTransformContent<DictionaryRegistryResult<T, A>, ExtractSelectorLocale<A>>;
8
+ export declare const getIntlayer: <const T extends DictionaryKeys, const A extends LocalesValues | DictionarySelectorForKey<T> = DeclaredLocales>(key: T, localeOrSelector?: A) => DeepTransformContent<DictionaryRegistryResult<T, A>, ExtractSelectorLocale<A>>;
9
9
  //# sourceMappingURL=getIntlayer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getIntlayer.d.ts","sourceRoot":"","sources":["../../src/getIntlayer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EAEtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,KAAK,oBAAoB,EAAc,MAAM,WAAW,CAAC;AAElE;;;;GAIG;AACH,eAAO,MAAM,WAAW,GACtB,KAAK,CAAC,CAAC,SAAS,cAAc,EAC9B,KAAK,CAAC,CAAC,SACH,eAAe,GACf,wBAAwB,CAAC,CAAC,CAAC,GAAG,eAAe,EAEjD,KAAK,CAAC,EACN,mBAAmB,CAAC,KACnB,oBAAoB,CACrB,wBAAwB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC9B,qBAAqB,CAAC,CAAC,CAAC,CASzB,CAAC"}
1
+ {"version":3,"file":"getIntlayer.d.ts","sourceRoot":"","sources":["../../src/getIntlayer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EACrB,aAAa,EACd,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,KAAK,oBAAoB,EAAc,MAAM,WAAW,CAAC;AAElE;;;;GAIG;AACH,eAAO,MAAM,WAAW,GACtB,KAAK,CAAC,CAAC,SAAS,cAAc,EAC9B,KAAK,CAAC,CAAC,SAAS,aAAa,GAAG,wBAAwB,CAAC,CAAC,CAAC,GAAG,eAAe,EAE7E,KAAK,CAAC,EACN,mBAAmB,CAAC,KACnB,oBAAoB,CACrB,wBAAwB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC9B,qBAAqB,CAAC,CAAC,CAAC,CASzB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lit-intlayer",
3
- "version": "9.1.2",
3
+ "version": "9.2.0",
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": "9.1.2",
107
- "@intlayer/config": "9.1.2",
108
- "@intlayer/core": "9.1.2",
109
- "@intlayer/editor": "9.1.2",
110
- "@intlayer/types": "9.1.2"
106
+ "@intlayer/api": "9.2.0",
107
+ "@intlayer/config": "9.2.0",
108
+ "@intlayer/core": "9.2.0",
109
+ "@intlayer/editor": "9.2.0",
110
+ "@intlayer/types": "9.2.0"
111
111
  },
112
112
  "devDependencies": {
113
113
  "@types/node": "26.1.2",
@@ -119,12 +119,12 @@
119
119
  "rimraf": "6.1.3",
120
120
  "tsdown": "0.22.14",
121
121
  "typescript": "7.0.2",
122
- "vite": "8.2.0",
122
+ "vite": "8.2.1",
123
123
  "vite-plugin-dts": "5.0.3",
124
124
  "vitest": "4.1.10"
125
125
  },
126
126
  "peerDependencies": {
127
- "intlayer": "9.1.2",
127
+ "intlayer": "9.2.0",
128
128
  "lit": ">=3.0.0"
129
129
  },
130
130
  "peerDependenciesMeta": {