vue-intlayer 9.7.1 → 9.7.3

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("../getDictionary.cjs"),t=require("./installIntlayer.cjs");let n=require("@intlayer/core/interpreter"),r=require("vue"),i=require("@intlayer/core/dictionaryManipulator");var a=(e,t)=>t.reduce((e,t)=>e?.[t],e),o=e=>typeof e==`object`&&!!e,s=e=>typeof e==`function`||o(e)&&(`render`in e||`setup`in e),c=e=>e!=null&&(typeof e==`object`||typeof e==`function`)&&`__update`in e&&`render`in e&&`raw`in e,l=e=>(0,r.markRaw)((0,r.defineComponent)({name:`IntlayerLeaf`,setup(){return()=>{let t=e();return t==null?null:s(t)?(0,r.h)(t):Array.isArray(t)?(0,r.h)(`span`,t):t}}})),u=e=>new Proxy({},{get(t,n){let r=e.value;if(n===`__v_isRef`)return!0;if(n===`value`)return r??``;if(n===`$raw`)return e;if(n===`__v_skip`)return!0;if(n===`c`||n===`asComponent`)return l(()=>e.value);if(r==null)return n===Symbol.toPrimitive||n===`toString`?()=>``:void 0;let i=r[n];return typeof i==`function`?i.bind(r):i},ownKeys(){let t=e.value;return typeof t==`object`&&t?Reflect.ownKeys(t):[]},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}}),d=(d,f)=>{let p=(0,r.getCurrentInstance)()?(0,r.inject)(t.INTLAYER_SYMBOL):void 0,m=(0,r.isRef)(p?.locale)?p.locale:(0,r.ref)(p?.locale??(0,n.resolveInterpreterLocale)()),h=(0,r.computed)(()=>{let e=f===void 0?void 0:(0,r.toValue)(f);if(process.env.INTLAYER_DICTIONARY_SELECTOR!==`false`){let t=(0,i.resolveDictionaryArgument)({localeOrSelector:e,contextLocale:m.value,contextVariant:p?.variant?.value,dictionaryKey:(0,r.toValue)(d).key});return(0,i.parseDictionarySelector)(t)}return{selector:void 0,locale:e}}),g=(0,r.computed)(()=>h.value.locale??m.value),_=(0,r.shallowRef)({});(0,r.watch)([()=>(0,r.toValue)(d),()=>g.value,()=>h.value.selector],([t,n,r])=>{_.value=r?e.getDictionary(t,{...r,locale:n}):e.getDictionary(t,n)},{immediate:!0,flush:`sync`});let v=e=>new Proxy({},{get(t,n,i){let d=(0,r.computed)(()=>a(_.value,e));if(typeof n==`symbol`||typeof n==`string`&&(n.startsWith(`__`)||n.startsWith(`$`)))return n===`__v_isRef`?!0:n===`$raw`?d:n===Symbol.toPrimitive?()=>String(d.value??``):Reflect.get(t,n,i);if(n===`value`)return d.value??``;if(n===`then`)return;if(n===`c`||n===`asComponent`)return l(()=>d.value);let f=e.concat(n),p=a(_.value,f);if(p===void 0||o(p)&&!s(p))return v(f);if(c(p))return u((0,r.computed)(()=>a(_.value,f)));if(typeof p==`function`){let t=a(_.value,e);return t!=null&&!Object.hasOwn(t,n)?p.bind(t):(...e)=>a(_.value,f)?.(...e)}let m=(0,r.computed)(()=>a(_.value,f));return new Proxy(m,{get(e,t,n){return t===`value`?e.value??``:Reflect.get(e,t,n)}})},ownKeys(){let t=a(_.value,e);return o(t)?Reflect.ownKeys(t):[]},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return v([])};exports.atPath=a,exports.createIntlayerLeafProxy=u,exports.isComponentLike=s,exports.isIntlayerNode=c,exports.isObjectLike=o,exports.toComponent=l,exports.useDictionary=d;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../getDictionary.cjs"),t=require("./installIntlayer.cjs");let n=require("vue"),r=require("@intlayer/core/dictionaryManipulator"),i=require("@intlayer/core/interpreter");var a=(e,t)=>t.reduce((e,t)=>e?.[t],e),o=e=>typeof e==`object`&&!!e,s=e=>typeof e==`function`||o(e)&&(`render`in e||`setup`in e),c=e=>e!=null&&(typeof e==`object`||typeof e==`function`)&&`__update`in e&&`render`in e&&`raw`in e,l=e=>(0,n.markRaw)((0,n.defineComponent)({name:`IntlayerLeaf`,setup(){return()=>{let t=e();return t==null?null:s(t)?(0,n.h)(t):Array.isArray(t)?(0,n.h)(`span`,t):t}}})),u=e=>new Proxy({},{get(t,n){let r=e.value;if(n===`__v_isRef`)return!0;if(n===`value`)return r??``;if(n===`$raw`)return e;if(n===`__v_skip`)return!0;if(n===`c`||n===`asComponent`)return l(()=>e.value);if(r==null)return n===Symbol.toPrimitive||n===`toString`?()=>``:void 0;let i=r[n];return typeof i==`function`?i.bind(r):i},ownKeys(){let t=e.value;return typeof t==`object`&&t?Reflect.ownKeys(t):[]},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}}),d=(d,f)=>{let p=(0,n.getCurrentInstance)()?(0,n.inject)(t.INTLAYER_SYMBOL):void 0,m=(0,n.isRef)(p?.locale)?p.locale:(0,n.ref)(p?.locale??(0,i.resolveInterpreterLocale)()),h=(0,n.computed)(()=>{let e=f===void 0?void 0:(0,n.toValue)(f);if(process.env.INTLAYER_DICTIONARY_SELECTOR!==`false`){let t=(0,r.resolveDictionaryArgument)({localeOrSelector:e,contextLocale:m.value,contextVariant:p?.variant?.value,dictionaryKey:(0,n.toValue)(d).key});return(0,r.parseDictionarySelector)(t)}return{selector:void 0,locale:e}}),g=(0,n.computed)(()=>h.value.locale??m.value),_=(0,n.shallowRef)({});(0,n.watch)([()=>(0,n.toValue)(d),()=>g.value,()=>h.value.selector],([t,n,r])=>{_.value=r?e.getDictionary(t,{...r,locale:n}):e.getDictionary(t,n)},{immediate:!0,flush:`sync`});let v=e=>new Proxy({},{get(t,r,i){let d=(0,n.computed)(()=>a(_.value,e));if(typeof r==`symbol`||typeof r==`string`&&(r.startsWith(`__`)||r.startsWith(`$`)))return r===`__v_isRef`?!0:r===`$raw`?d:r===Symbol.toPrimitive?()=>String(d.value??``):Reflect.get(t,r,i);if(r===`value`)return d.value??``;if(r===`then`)return;if(r===`c`||r===`asComponent`)return l(()=>d.value);let f=e.concat(r),p=a(_.value,f);if(p===void 0||o(p)&&!s(p))return v(f);if(c(p))return u((0,n.computed)(()=>a(_.value,f)));if(typeof p==`function`){let t=a(_.value,e);return t!=null&&!Object.hasOwn(t,r)?p.bind(t):(...e)=>a(_.value,f)?.(...e)}let m=(0,n.computed)(()=>a(_.value,f));return new Proxy(m,{get(e,t,n){return t===`value`?e.value??``:Reflect.get(e,t,n)}})},ownKeys(){let t=a(_.value,e);return o(t)?Reflect.ownKeys(t):[]},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return v([])};exports.atPath=a,exports.createIntlayerLeafProxy=u,exports.isComponentLike=s,exports.isIntlayerNode=c,exports.isObjectLike=o,exports.toComponent=l,exports.useDictionary=d;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./installIntlayer.cjs"),t=require("./useDictionary.cjs");let n=require("@intlayer/core/interpreter"),r=require("vue"),i=require("@intlayer/core/dictionaryManipulator");var a=async(a,o)=>{let s=(0,r.inject)(e.INTLAYER_SYMBOL),c=(0,r.computed)(()=>(0,r.toValue)(o)??s?.locale?.value??(0,n.resolveInterpreterLocale)()),l=(0,i.getPreloadedDictionary)(a,c.value),u=(0,r.ref)(l??await a[c.value]?.());return(0,r.watch)(()=>c.value,async e=>{let t=await a[e]?.();t&&(u.value=t)}),t.useDictionary(u,c)};exports.useDictionaryAsync=a;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./installIntlayer.cjs"),t=require("./useDictionary.cjs");let n=require("vue"),r=require("@intlayer/core/dictionaryManipulator"),i=require("@intlayer/core/interpreter");var a=async(a,o)=>{let s=(0,n.inject)(e.INTLAYER_SYMBOL),c=(0,n.computed)(()=>(0,n.toValue)(o)??s?.locale?.value??(0,i.resolveInterpreterLocale)()),l=(0,r.getPreloadedDictionary)(a,c.value),u=(0,n.ref)(l??await a[c.value]?.());return(0,n.watch)(()=>c.value,async e=>{let t=await a[e]?.();t&&(u.value=t)}),t.useDictionary(u,c)};exports.useDictionaryAsync=a;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../getDictionary.cjs"),t=require("./installIntlayer.cjs"),n=require("./useDictionaryAsync.cjs");let r=require("@intlayer/core/interpreter"),i=require("vue"),a=require("@intlayer/core/dictionaryManipulator");var o=async(o,s,c)=>{if(process.env.INTLAYER_DICTIONARY_SELECTOR!==`false`&&(0,a.isQualifiedDynamicLoaderMap)(o)){let n=(0,i.inject)(t.INTLAYER_SYMBOL),l=c===void 0?void 0:(0,i.toValue)(c),{locale:u,selector:d}=(0,a.parseDictionarySelector)((0,a.resolveDictionaryArgument)({localeOrSelector:l??void 0,contextLocale:n?.locale?.value,contextVariant:n?.variant?.value,dictionaryKey:String(s)})),f=u??n?.locale?.value??(0,r.resolveInterpreterLocale)();return(0,a.resolveQualifiedDynamicContentAsync)({loaderMap:o,key:String(s),locale:f,selector:d,transform:t=>e.getDictionary(t,f)})}return n.useDictionaryAsync(o,c)};exports.useDictionaryDynamic=o;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../getDictionary.cjs"),t=require("./installIntlayer.cjs"),n=require("./useDictionaryAsync.cjs");let r=require("vue"),i=require("@intlayer/core/dictionaryManipulator"),a=require("@intlayer/core/interpreter");var o=async(o,s,c)=>{if(process.env.INTLAYER_DICTIONARY_SELECTOR!==`false`&&(0,i.isQualifiedDynamicLoaderMap)(o)){let n=(0,r.inject)(t.INTLAYER_SYMBOL),l=c===void 0?void 0:(0,r.toValue)(c),{locale:u,selector:d}=(0,i.parseDictionarySelector)((0,i.resolveDictionaryArgument)({localeOrSelector:l??void 0,contextLocale:n?.locale?.value,contextVariant:n?.variant?.value,dictionaryKey:String(s)})),f=u??n?.locale?.value??(0,a.resolveInterpreterLocale)();return(0,i.resolveQualifiedDynamicContentAsync)({loaderMap:o,key:String(s),locale:f,selector:d,transform:t=>e.getDictionary(t,f)})}return n.useDictionaryAsync(o,c)};exports.useDictionaryDynamic=o;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../getIntlayer.cjs"),t=require("./installIntlayer.cjs"),n=require("./useDictionary.cjs");let r=require("@intlayer/core/interpreter"),i=require("vue"),a=require("@intlayer/core/dictionaryManipulator");var o=(o,s)=>{let c=(0,i.inject)(t.INTLAYER_SYMBOL),l=(0,i.isRef)(c?.locale)?c.locale:(0,i.ref)(c?.locale??(0,r.resolveInterpreterLocale)()),u=(0,i.computed)(()=>{let e=s===void 0?void 0:(0,i.toValue)(s);if(process.env.INTLAYER_DICTIONARY_SELECTOR!==`false`){let t=(0,a.resolveDictionaryArgument)({localeOrSelector:e,contextLocale:l.value,contextVariant:c?.variant?.value,dictionaryKey:(0,i.toValue)(o)});return(0,a.parseDictionarySelector)(t)}return{selector:void 0,locale:e}}),d=(0,i.computed)(()=>u.value.locale??l.value),f=(0,i.shallowRef)({});(0,i.watch)([()=>(0,i.toValue)(o),()=>d.value,()=>u.value.selector],([t,n,r])=>{f.value=r?e.getIntlayer(t,{...r,locale:n}):e.getIntlayer(t,n)},{immediate:!0,flush:`sync`});let p=new Map,m=e=>{let t=e.join(`.`);if(p.has(t))return p.get(t);let r=(0,i.computed)(()=>n.atPath(f.value,e)),a=new Proxy({},{get(t,a,o){if(typeof a==`symbol`||typeof a==`string`&&(a.startsWith(`__`)||a.startsWith(`$`)))return a===`__v_isRef`?!0:a===`then`?void 0:Reflect.get(t,a,o);if(a===`value`)return r.value??``;if(a===`c`||a===`asComponent`)return n.toComponent(()=>r.value);if(a===`$raw`)return r;if(a===Symbol.toPrimitive)return()=>String(r.value??``);let s=e.concat(a),c=n.atPath(f.value,s);if(c===void 0||n.isObjectLike(c)&&!n.isComponentLike(c))return m(s);if(n.isIntlayerNode(c))return n.createIntlayerLeafProxy((0,i.computed)(()=>n.atPath(f.value,s)));if(typeof c==`function`){let t=n.atPath(f.value,e);return t!=null&&!Object.hasOwn(t,a)?c.bind(t):(...e)=>n.atPath(f.value,s)?.(...e)}let l=(0,i.computed)(()=>n.atPath(f.value,s));return new Proxy(l,{get(e,t,n){return t===`value`?e.value??``:t===`__v_isRef`||Reflect.get(e,t,n)}})},ownKeys(){let t=n.atPath(f.value,e);return n.isObjectLike(t)?Reflect.ownKeys(t):[]},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return p.set(t,a),a};return m([])};exports.useIntlayer=o;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../getIntlayer.cjs"),t=require("./installIntlayer.cjs"),n=require("./useDictionary.cjs");let r=require("vue"),i=require("@intlayer/core/dictionaryManipulator"),a=require("@intlayer/core/interpreter");var o=(o,s)=>{let c=(0,r.inject)(t.INTLAYER_SYMBOL),l=(0,r.isRef)(c?.locale)?c.locale:(0,r.ref)(c?.locale??(0,a.resolveInterpreterLocale)()),u=(0,r.computed)(()=>{let e=s===void 0?void 0:(0,r.toValue)(s);if(process.env.INTLAYER_DICTIONARY_SELECTOR!==`false`){let t=(0,i.resolveDictionaryArgument)({localeOrSelector:e,contextLocale:l.value,contextVariant:c?.variant?.value,dictionaryKey:(0,r.toValue)(o)});return(0,i.parseDictionarySelector)(t)}return{selector:void 0,locale:e}}),d=(0,r.computed)(()=>u.value.locale??l.value),f=(0,r.shallowRef)({});(0,r.watch)([()=>(0,r.toValue)(o),()=>d.value,()=>u.value.selector],([t,n,r])=>{f.value=r?e.getIntlayer(t,{...r,locale:n}):e.getIntlayer(t,n)},{immediate:!0,flush:`sync`});let p=new Map,m=e=>{let t=e.join(`.`);if(p.has(t))return p.get(t);let i=(0,r.computed)(()=>n.atPath(f.value,e)),a=new Proxy({},{get(t,a,o){if(typeof a==`symbol`||typeof a==`string`&&(a.startsWith(`__`)||a.startsWith(`$`)))return a===`__v_isRef`?!0:a===`then`?void 0:Reflect.get(t,a,o);if(a===`value`)return i.value??``;if(a===`c`||a===`asComponent`)return n.toComponent(()=>i.value);if(a===`$raw`)return i;if(a===Symbol.toPrimitive)return()=>String(i.value??``);let s=e.concat(a),c=n.atPath(f.value,s);if(c===void 0||n.isObjectLike(c)&&!n.isComponentLike(c))return m(s);if(n.isIntlayerNode(c))return n.createIntlayerLeafProxy((0,r.computed)(()=>n.atPath(f.value,s)));if(typeof c==`function`){let t=n.atPath(f.value,e);return t!=null&&!Object.hasOwn(t,a)?c.bind(t):(...e)=>n.atPath(f.value,s)?.(...e)}let l=(0,r.computed)(()=>n.atPath(f.value,s));return new Proxy(l,{get(e,t,n){return t===`value`?e.value??``:t===`__v_isRef`||Reflect.get(e,t,n)}})},ownKeys(){let t=n.atPath(f.value,e);return n.isObjectLike(t)?Reflect.ownKeys(t):[]},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return p.set(t,a),a};return m([])};exports.useIntlayer=o;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../rolldown-runtime-BocRIvOZ.js"),t=require("./formatDictionaryForInspector.cjs");let n=require("@intlayer/types/nodeType");n=e.t(n);let r=require("@intlayer/core/dictionaryManipulator");var i=e=>typeof e==`object`&&!!e&&!Array.isArray(e),a=(e,t)=>{let a=(0,r.getContentNodeByKeyPath)(e.content,t);return typeof a==`string`?`plain-string`:i(a)&&a.nodeType===n.TRANSLATION&&i(a[n.TRANSLATION])&&Object.values(a[n.TRANSLATION]).every(e=>typeof e==`string`)?`translation`:null},o=(e,t=`Translations`)=>{let[n,r,...i]=e[0]===t?e.slice(1):e;return!n||i.length>0?null:r?{label:n,locale:r}:{label:n}},s=(e,r)=>{let i=t.listInspectorEntries(e).find(({label:e})=>e===r.label);return i?r.locale?[...i.keyPath,{type:n.TRANSLATION,key:r.locale}]:i.keyPath:null},c=(e,t,n)=>{if(typeof(0,r.getContentNodeByKeyPath)(e.content,t)!=`string`)return null;let i=(0,r.editDictionaryByKeyPath)(structuredClone(e.content),t,n);return{...e,content:i}};exports.applyDictionaryEdit=c,exports.getEditKeyPath=s,exports.getEditability=a,exports.parseEditPath=o;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../rolldown-runtime-BocRIvOZ.js"),t=require("./formatDictionaryForInspector.cjs");let n=require("@intlayer/core/dictionaryManipulator"),r=require("@intlayer/types/nodeType");r=e.t(r);var i=e=>typeof e==`object`&&!!e&&!Array.isArray(e),a=(e,t)=>{let a=(0,n.getContentNodeByKeyPath)(e.content,t);return typeof a==`string`?`plain-string`:i(a)&&a.nodeType===r.TRANSLATION&&i(a[r.TRANSLATION])&&Object.values(a[r.TRANSLATION]).every(e=>typeof e==`string`)?`translation`:null},o=(e,t=`Translations`)=>{let[n,r,...i]=e[0]===t?e.slice(1):e;return!n||i.length>0?null:r?{label:n,locale:r}:{label:n}},s=(e,n)=>{let i=t.listInspectorEntries(e).find(({label:e})=>e===n.label);return i?n.locale?[...i.keyPath,{type:r.TRANSLATION,key:n.locale}]:i.keyPath:null},c=(e,t,r)=>{if(typeof(0,n.getContentNodeByKeyPath)(e.content,t)!=`string`)return null;let i=(0,n.editDictionaryByKeyPath)(structuredClone(e.content),t,r);return{...e,content:i}};exports.applyDictionaryEdit=c,exports.getEditKeyPath=s,exports.getEditability=a,exports.parseEditPath=o;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./installIntlayerHTML.cjs");let t=require("@intlayer/core/interpreter"),n=require("vue"),r=require("@intlayer/core/transpiler");var i=(e,{components:i={}}={})=>{let a=Object.fromEntries(Object.entries(i).filter(([,e])=>e).map(([e,t])=>[e,e=>(0,n.h)(t,e,e?.children)])),o=new Proxy(a,{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 r.VOID_HTML_ELEMENTS.has(t)?({children:e,...r})=>(0,n.h)(t,r):e=>(0,n.h)(t,e,e?.children)}});return(0,t.getHTML)(e,o)},a=({components:t}={})=>{let n=e.useHTML();return e=>n?n.renderHTML(e,{components:t}):i(e,{components:t})},o=(0,n.defineComponent)({name:`HTMLRenderer`,props:{content:{type:String,required:!0},components:{type:Object,default:void 0}},setup(e){let t=a({components:e.components});return()=>t(e.content)}});exports.HTMLRenderer=o,exports.renderHTML=i,exports.useHTMLRenderer=a;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./installIntlayerHTML.cjs");let t=require("vue"),n=require("@intlayer/core/interpreter"),r=require("@intlayer/core/transpiler");var i=(e,{components:i={}}={})=>{let a=Object.fromEntries(Object.entries(i).filter(([,e])=>e).map(([e,n])=>[e,e=>(0,t.h)(n,e,e?.children)])),o=new Proxy(a,{get(e,n){if(typeof n==`string`&&n in e)return e[n];if(typeof n==`string`&&/^[a-z][a-z0-9]*$/.test(n))return r.VOID_HTML_ELEMENTS.has(n)?({children:e,...r})=>(0,t.h)(n,r):e=>(0,t.h)(n,e,e?.children)}});return(0,n.getHTML)(e,o)},a=({components:t}={})=>{let n=e.useHTML();return e=>n?n.renderHTML(e,{components:t}):i(e,{components:t})},o=(0,t.defineComponent)({name:`HTMLRenderer`,props:{content:{type:String,required:!0},components:{type:Object,default:void 0}},setup(e){let t=a({components:e.components});return()=>t(e.content)}});exports.HTMLRenderer=o,exports.renderHTML=i,exports.useHTMLRenderer=a;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@intlayer/core/interpreter"),t=require("vue");var n=Symbol(`intlayerHTML`),r=null,i=e=>r||(r={renderHTML:e},r),a=(r,a)=>{let o;if(typeof a==`function`)o=a;else{let{components:t,renderHTML:n}=a??{};o=n||((n,r)=>{let{components:i,...a}=r&&typeof r==`object`&&`components`in r?r:{components:r},o=i||a,s={...t,...o};return(0,e.getHTML)(n,s)})}let s=i((e,r)=>typeof a==`function`||typeof a==`object`&&a?.renderHTML?{setup(){return(0,t.provide)(n,{renderHTML:void 0}),()=>o(e,r)}}:o(e,r));r.provide(n,s)},o={install:a},s=()=>(0,t.inject)(n);exports.INTLAYER_HTML_SYMBOL=n,exports.createIntlayerHTMLClient=i,exports.installIntlayerHTML=a,exports.intlayerHTML=o,exports.useHTML=s;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("vue"),t=require("@intlayer/core/interpreter");var n=Symbol(`intlayerHTML`),r=null,i=e=>r||(r={renderHTML:e},r),a=(r,a)=>{let o;if(typeof a==`function`)o=a;else{let{components:e,renderHTML:n}=a??{};o=n||((n,r)=>{let{components:i,...a}=r&&typeof r==`object`&&`components`in r?r:{components:r},o=i||a,s={...e,...o};return(0,t.getHTML)(n,s)})}let s=i((t,r)=>typeof a==`function`||typeof a==`object`&&a?.renderHTML?{setup(){return(0,e.provide)(n,{renderHTML:void 0}),()=>o(t,r)}}:o(t,r));r.provide(n,s)},o={install:a},s=()=>(0,e.inject)(n);exports.INTLAYER_HTML_SYMBOL=n,exports.createIntlayerHTMLClient=i,exports.installIntlayerHTML=a,exports.intlayerHTML=o,exports.useHTML=s;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./editor/useEditor.cjs"),t=require("./client/installIntlayer.cjs"),n=require("./analytics/useAnalytics.cjs"),r=require("./analytics/useConversion.cjs"),i=require("./analytics/useExperiment.cjs");require("./analytics/index.cjs");const a=require("./getDictionary.cjs"),o=require("./client/useDictionary.cjs"),s=require("./client/useDictionaryAsync.cjs"),c=require("./client/useDictionaryDynamic.cjs"),l=require("./getIntlayer.cjs"),u=require("./client/useIntlayer.cjs"),d=require("./client/useLoadDynamic.cjs"),f=require("./client/useLocale.cjs"),p=require("./client/usePathname.cjs"),m=require("./client/useRewriteURL.cjs");require("./client/index.cjs");const h=require("./plugins.cjs");exports.INTLAYER_SYMBOL=t.INTLAYER_SYMBOL,exports.atPath=o.atPath,exports.createIntlayerClient=t.createIntlayerClient,exports.createIntlayerLeafProxy=o.createIntlayerLeafProxy,exports.getDictionary=a.getDictionary,exports.getIntlayer=l.getIntlayer,exports.getPlugins=h.getPlugins,exports.htmlPlugin=h.htmlPlugin,exports.insertionPlugin=h.insertionPlugin,exports.installIntlayer=t.installIntlayer,exports.intlayer=t.intlayer,exports.intlayerNodePlugins=h.intlayerNodePlugins,exports.isComponentLike=o.isComponentLike,exports.isIntlayerNode=o.isIntlayerNode,exports.isObjectLike=o.isObjectLike,exports.markdownPlugin=h.markdownPlugin,exports.markdownStringPlugin=h.markdownStringPlugin,exports.toComponent=o.toComponent,exports.useAnalytics=n.useAnalytics,exports.useConversion=r.useConversion,exports.useDictionary=o.useDictionary,exports.useDictionaryAsync=s.useDictionaryAsync,exports.useDictionaryDynamic=c.useDictionaryDynamic,exports.useEditor=e.useEditor,exports.useExperiment=i.useExperiment,exports.useIntlayer=u.useIntlayer,exports.useLoadDynamic=d.useLoadDynamic,exports.useLocale=f.useLocale,exports.usePathname=p.usePathname,exports.useRewriteURL=m.useRewriteURL;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./client/installIntlayer.cjs"),t=require("./analytics/useAnalytics.cjs"),n=require("./analytics/useConversion.cjs"),r=require("./analytics/useExperiment.cjs");require("./analytics/index.cjs");const i=require("./editor/useEditor.cjs"),a=require("./getDictionary.cjs"),o=require("./client/useDictionary.cjs"),s=require("./client/useDictionaryAsync.cjs"),c=require("./client/useDictionaryDynamic.cjs"),l=require("./getIntlayer.cjs"),u=require("./client/useIntlayer.cjs"),d=require("./client/useLoadDynamic.cjs"),f=require("./client/useLocale.cjs"),p=require("./client/usePathname.cjs"),m=require("./client/useRewriteURL.cjs");require("./client/index.cjs");const h=require("./plugins.cjs");exports.INTLAYER_SYMBOL=e.INTLAYER_SYMBOL,exports.atPath=o.atPath,exports.createIntlayerClient=e.createIntlayerClient,exports.createIntlayerLeafProxy=o.createIntlayerLeafProxy,exports.getDictionary=a.getDictionary,exports.getIntlayer=l.getIntlayer,exports.getPlugins=h.getPlugins,exports.htmlPlugin=h.htmlPlugin,exports.insertionPlugin=h.insertionPlugin,exports.installIntlayer=e.installIntlayer,exports.intlayer=e.intlayer,exports.intlayerNodePlugins=h.intlayerNodePlugins,exports.isComponentLike=o.isComponentLike,exports.isIntlayerNode=o.isIntlayerNode,exports.isObjectLike=o.isObjectLike,exports.markdownPlugin=h.markdownPlugin,exports.markdownStringPlugin=h.markdownStringPlugin,exports.toComponent=o.toComponent,exports.useAnalytics=t.useAnalytics,exports.useConversion=n.useConversion,exports.useDictionary=o.useDictionary,exports.useDictionaryAsync=s.useDictionaryAsync,exports.useDictionaryDynamic=c.useDictionaryDynamic,exports.useEditor=i.useEditor,exports.useExperiment=r.useExperiment,exports.useIntlayer=u.useIntlayer,exports.useLoadDynamic=d.useLoadDynamic,exports.useLocale=f.useLocale,exports.usePathname=p.usePathname,exports.useRewriteURL=m.useRewriteURL;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../rolldown-runtime-BocRIvOZ.js"),t=require("./analytics/exposureSink.cjs"),n=require("./html/HTMLRenderer.cjs"),r=require("./markdown/installIntlayerMarkdown.cjs"),i=require("./renderIntlayerNode.cjs");let a=require("@intlayer/config/built"),o=require("@intlayer/core/interpreter"),s=require("@intlayer/core/markdown"),c=require("@intlayer/types/nodeType");c=e.t(c);let l=require("vue");var u=process.env.INTLAYER_EDITOR_ENABLED===`false`?null:(0,l.defineAsyncComponent)(()=>Promise.resolve().then(()=>require("./editor/ContentSelector.cjs"))),d={id:`intlayer-node-plugin`,canHandle:e=>typeof e==`bigint`||typeof e==`string`||typeof e==`number`,transform:(e,n)=>{let{children:r,dictionaryKey:o,keyPath:s}=n;process.env.INTLAYER_ANALYTICS_ENABLED!==`false`&&t.reportExposure({dictionaryKey:o,keyPath:s,locale:n.locale,nodeType:`text`});let c=e=>i.renderIntlayerNode({value:e,children:process.env.INTLAYER_EDITOR_ENABLED!==`false`&&a.editor.enabled?()=>(0,l.h)(u,{dictionaryKey:o,keyPath:s},{default:()=>typeof e==`function`?e():e}):e}),d=c(r);if(typeof r!=`function`)return d;let f=(...e)=>{let t=r(...e);return c(t)};Object.setPrototypeOf(f,Object.getPrototypeOf(d));for(let e of Object.getOwnPropertyNames(d)){let t=Object.getOwnPropertyDescriptor(d,e);t&&Object.defineProperty(f,e,t)}for(let e of Object.getOwnPropertySymbols(d)){let t=Object.getOwnPropertyDescriptor(d,e);t&&Object.defineProperty(f,e,t)}return(0,l.markRaw)(f)}},f=(e,t)=>{let n=new Map,r={};for(let[e,i]of Object.entries(t))typeof i==`string`||typeof i==`number`?r[e]=i:(n.set(e,i),r[e]=`__VNODE_${e}__`);let i=(0,o.splitInsertionTemplate)(e,r);if(n.size>0){let e=[];if(i.isSimple){let t=i.parts,r=0;for(let[i]of n){let a=`__VNODE_${i}__`,o=t.indexOf(a);o!==-1&&(o>r&&e.push(t.substring(r,o)),e.push(n.get(i)),r=o+a.length)}return r<t.length&&e.push(t.substring(r)),(0,l.h)(l.Fragment,null,...e)}return i.parts.forEach(t=>{if(typeof t==`string`){let r=t;for(let[t]of n){let i=`__VNODE_${t}__`,a=r.indexOf(i);a!==-1&&(a>0&&e.push(r.substring(0,a)),e.push(n.get(t)),r=r.substring(a+i.length))}r.length>0&&e.push(r)}else e.push(t)}),(0,l.h)(l.Fragment,null,...e)}return i.isSimple?i.parts:(0,l.h)(l.Fragment,null,i.parts)},p=process.env.INTLAYER_NODE_TYPE_INSERTION===`false`?o.fallbackPlugin:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===c.INSERTION,transform:(e,t,n)=>{let r=[...t.keyPath,{type:c.INSERTION}],i=e[c.INSERTION],a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`||(0,o.isInterpolableWrapperNode)(e),transform:(e,n,r)=>{if((0,o.isInterpolableWrapperNode)(e))return i=>(0,o.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=f(i,e);return r(a,{...n,plugins:t.plugins,children:a})}}},s=n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]});return(0,o.resolveInsertedSelector)(i,s)}},m=process.env.INTLAYER_NODE_TYPE_MARKDOWN===`false`?o.fallbackPlugin:{id:`markdown-string-plugin`,canHandle:e=>typeof e==`string`,transform:(e,t,n)=>{let{plugins:o,...c}=t,d=n((0,s.getMarkdownMetadata)(e)??{},{plugins:[{id:`markdown-metadata-plugin`,canHandle:e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`||!e,transform:(t,n)=>i.renderIntlayerNode({...n,value:t,children:e})}],dictionaryKey:c.dictionaryKey,keyPath:[]}),f=n=>i.renderIntlayerNode({...t,value:e,children:()=>{let{renderMarkdown:t,components:i}=r.useMarkdown(),o=t(e,void 0,{...i??{},...n??{}});return process.env.INTLAYER_EDITOR_ENABLED!==`false`&&a.editor.enabled?(0,l.h)(u,{dictionaryKey:c.dictionaryKey,keyPath:c.keyPath},{default:()=>o}):o},additionalProps:{metadata:d,use:e=>f(e)}});return f()}},h=process.env.INTLAYER_NODE_TYPE_MARKDOWN===`false`?o.fallbackPlugin:{id:`markdown-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===c.MARKDOWN,transform:(e,t,n)=>{let r=[...t.keyPath,{type:c.MARKDOWN}],i=e[c.MARKDOWN];return n(i,{...t,children:i,keyPath:r,plugins:[m,...t.plugins??[]]})}},g=process.env.INTLAYER_NODE_TYPE_HTML===`false`?o.fallbackPlugin:{id:`html-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===c.HTML,transform:(e,t)=>{let r=e[c.HTML];e.tags;let o=(e={})=>{let s=n.renderHTML(r,{components:e});return i.renderIntlayerNode({...t,value:r,children:process.env.INTLAYER_EDITOR_ENABLED!==`false`&&a.editor.enabled?()=>(0,l.h)(u,{dictionaryKey:t.dictionaryKey,keyPath:t.keyPath,...e},{default:()=>s}):s,additionalProps:{use:e=>o(e)}})};return o()}},_=new Map,v=(e,t=!0)=>{let n=(0,o.resolveInterpreterLocale)(e),r=`${n}_${t}`;if(_.has(r))return _.get(r);let i=[d,(0,o.translationPlugin)(n,t?a.internationalization.defaultLocale:void 0),o.enumerationPlugin,(0,o.pluralPlugin)(n),o.conditionPlugin,(0,o.nestedPlugin)(n),o.filePlugin,o.genderPlugin,o.selectPlugin,p,h,g].filter(e=>e!==o.fallbackPlugin);return _.set(r,i),i};exports.getPlugins=v,exports.htmlPlugin=g,exports.insertionPlugin=p,exports.intlayerNodePlugins=d,exports.markdownPlugin=h,exports.markdownStringPlugin=m;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../rolldown-runtime-BocRIvOZ.js"),t=require("./analytics/exposureSink.cjs"),n=require("./html/HTMLRenderer.cjs"),r=require("./markdown/installIntlayerMarkdown.cjs"),i=require("./renderIntlayerNode.cjs");let a=require("@intlayer/config/built"),o=require("vue"),s=require("@intlayer/core/interpreter"),c=require("@intlayer/core/markdown"),l=require("@intlayer/types/nodeType");l=e.t(l);var u=process.env.INTLAYER_EDITOR_ENABLED===`false`?null:(0,o.defineAsyncComponent)(()=>Promise.resolve().then(()=>require("./editor/ContentSelector.cjs"))),d={id:`intlayer-node-plugin`,canHandle:e=>typeof e==`bigint`||typeof e==`string`||typeof e==`number`,transform:(e,n)=>{let{children:r,dictionaryKey:s,keyPath:c}=n;process.env.INTLAYER_ANALYTICS_ENABLED!==`false`&&t.reportExposure({dictionaryKey:s,keyPath:c,locale:n.locale,nodeType:`text`});let l=e=>i.renderIntlayerNode({value:e,children:process.env.INTLAYER_EDITOR_ENABLED!==`false`&&a.editor.enabled?()=>(0,o.h)(u,{dictionaryKey:s,keyPath:c},{default:()=>typeof e==`function`?e():e}):e}),d=l(r);if(typeof r!=`function`)return d;let f=(...e)=>{let t=r(...e);return l(t)};Object.setPrototypeOf(f,Object.getPrototypeOf(d));for(let e of Object.getOwnPropertyNames(d)){let t=Object.getOwnPropertyDescriptor(d,e);t&&Object.defineProperty(f,e,t)}for(let e of Object.getOwnPropertySymbols(d)){let t=Object.getOwnPropertyDescriptor(d,e);t&&Object.defineProperty(f,e,t)}return(0,o.markRaw)(f)}},f=(e,t)=>{let n=new Map,r={};for(let[e,i]of Object.entries(t))typeof i==`string`||typeof i==`number`?r[e]=i:(n.set(e,i),r[e]=`__VNODE_${e}__`);let i=(0,s.splitInsertionTemplate)(e,r);if(n.size>0){let e=[];if(i.isSimple){let t=i.parts,r=0;for(let[i]of n){let a=`__VNODE_${i}__`,o=t.indexOf(a);o!==-1&&(o>r&&e.push(t.substring(r,o)),e.push(n.get(i)),r=o+a.length)}return r<t.length&&e.push(t.substring(r)),(0,o.h)(o.Fragment,null,...e)}return i.parts.forEach(t=>{if(typeof t==`string`){let r=t;for(let[t]of n){let i=`__VNODE_${t}__`,a=r.indexOf(i);a!==-1&&(a>0&&e.push(r.substring(0,a)),e.push(n.get(t)),r=r.substring(a+i.length))}r.length>0&&e.push(r)}else e.push(t)}),(0,o.h)(o.Fragment,null,...e)}return i.isSimple?i.parts:(0,o.h)(o.Fragment,null,i.parts)},p=process.env.INTLAYER_NODE_TYPE_INSERTION===`false`?s.fallbackPlugin:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===l.INSERTION,transform:(e,t,n)=>{let r=[...t.keyPath,{type:l.INSERTION}],i=e[l.INSERTION],a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`||(0,s.isInterpolableWrapperNode)(e),transform:(e,n,r)=>{if((0,s.isInterpolableWrapperNode)(e))return i=>(0,s.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=f(i,e);return r(a,{...n,plugins:t.plugins,children:a})}}},o=n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]});return(0,s.resolveInsertedSelector)(i,o)}},m=process.env.INTLAYER_NODE_TYPE_MARKDOWN===`false`?s.fallbackPlugin:{id:`markdown-string-plugin`,canHandle:e=>typeof e==`string`,transform:(e,t,n)=>{let{plugins:s,...l}=t,d=n((0,c.getMarkdownMetadata)(e)??{},{plugins:[{id:`markdown-metadata-plugin`,canHandle:e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`||!e,transform:(t,n)=>i.renderIntlayerNode({...n,value:t,children:e})}],dictionaryKey:l.dictionaryKey,keyPath:[]}),f=n=>i.renderIntlayerNode({...t,value:e,children:()=>{let{renderMarkdown:t,components:i}=r.useMarkdown(),s=t(e,void 0,{...i??{},...n??{}});return process.env.INTLAYER_EDITOR_ENABLED!==`false`&&a.editor.enabled?(0,o.h)(u,{dictionaryKey:l.dictionaryKey,keyPath:l.keyPath},{default:()=>s}):s},additionalProps:{metadata:d,use:e=>f(e)}});return f()}},h=process.env.INTLAYER_NODE_TYPE_MARKDOWN===`false`?s.fallbackPlugin:{id:`markdown-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===l.MARKDOWN,transform:(e,t,n)=>{let r=[...t.keyPath,{type:l.MARKDOWN}],i=e[l.MARKDOWN];return n(i,{...t,children:i,keyPath:r,plugins:[m,...t.plugins??[]]})}},g=process.env.INTLAYER_NODE_TYPE_HTML===`false`?s.fallbackPlugin:{id:`html-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===l.HTML,transform:(e,t)=>{let r=e[l.HTML];e.tags;let s=(e={})=>{let c=n.renderHTML(r,{components:e});return i.renderIntlayerNode({...t,value:r,children:process.env.INTLAYER_EDITOR_ENABLED!==`false`&&a.editor.enabled?()=>(0,o.h)(u,{dictionaryKey:t.dictionaryKey,keyPath:t.keyPath,...e},{default:()=>c}):c,additionalProps:{use:e=>s(e)}})};return s()}},_=new Map,v=(e,t=!0)=>{let n=(0,s.resolveInterpreterLocale)(e),r=`${n}_${t}`;if(_.has(r))return _.get(r);let i=[d,(0,s.translationPlugin)(n,t?a.internationalization.defaultLocale:void 0),s.enumerationPlugin,(0,s.pluralPlugin)(n),s.conditionPlugin,(0,s.nestedPlugin)(n),s.filePlugin,s.genderPlugin,s.selectPlugin,p,h,g].filter(e=>e!==s.fallbackPlugin);return _.set(r,i),i};exports.getPlugins=v,exports.htmlPlugin=g,exports.insertionPlugin=p,exports.intlayerNodePlugins=d,exports.markdownPlugin=h,exports.markdownStringPlugin=m;
@@ -1,15 +1,15 @@
1
1
  import { getDictionary as e } from "../getDictionary.mjs";
2
2
  import { INTLAYER_SYMBOL as t } from "./installIntlayer.mjs";
3
- import { resolveInterpreterLocale as n } from "@intlayer/core/interpreter";
4
- import { computed as r, defineComponent as i, getCurrentInstance as a, h as o, inject as s, isRef as c, markRaw as l, ref as u, shallowRef as d, toValue as f, watch as p } from "vue";
5
- import { parseDictionarySelector as m, resolveDictionaryArgument as h } from "@intlayer/core/dictionaryManipulator";
3
+ import { computed as n, defineComponent as r, getCurrentInstance as i, h as a, inject as o, isRef as s, markRaw as c, ref as l, shallowRef as u, toValue as d, watch as f } from "vue";
4
+ import { parseDictionarySelector as p, resolveDictionaryArgument as m } from "@intlayer/core/dictionaryManipulator";
5
+ import { resolveInterpreterLocale as h } from "@intlayer/core/interpreter";
6
6
  // src/client/useDictionary.ts
7
- var g = (e, t) => t.reduce((e, t) => e?.[t], e), _ = (e) => typeof e == "object" && !!e, v = (e) => typeof e == "function" || _(e) && ("render" in e || "setup" in e), y = (e) => e != null && (typeof e == "object" || typeof e == "function") && "__update" in e && "render" in e && "raw" in e, b = (e) => l(i({
7
+ var g = (e, t) => t.reduce((e, t) => e?.[t], e), _ = (e) => typeof e == "object" && !!e, v = (e) => typeof e == "function" || _(e) && ("render" in e || "setup" in e), y = (e) => e != null && (typeof e == "object" || typeof e == "function") && "__update" in e && "render" in e && "raw" in e, b = (e) => c(r({
8
8
  name: "IntlayerLeaf",
9
9
  setup() {
10
10
  return () => {
11
11
  let t = e();
12
- return t == null ? null : v(t) ? o(t) : Array.isArray(t) ? o("span", t) : t;
12
+ return t == null ? null : v(t) ? a(t) : Array.isArray(t) ? a("span", t) : t;
13
13
  };
14
14
  }
15
15
  })), x = (e) => new Proxy({}, {
@@ -34,25 +34,25 @@ var g = (e, t) => t.reduce((e, t) => e?.[t], e), _ = (e) => typeof e == "object"
34
34
  configurable: !0
35
35
  };
36
36
  }
37
- }), S = (i, o) => {
38
- let l = a() ? s(t) : void 0, S = c(l?.locale) ? l.locale : u(l?.locale ?? n()), C = r(() => {
39
- let e = o === void 0 ? void 0 : f(o);
37
+ }), S = (r, a) => {
38
+ let c = i() ? o(t) : void 0, S = s(c?.locale) ? c.locale : l(c?.locale ?? h()), C = n(() => {
39
+ let e = a === void 0 ? void 0 : d(a);
40
40
  if (process.env.INTLAYER_DICTIONARY_SELECTOR !== "false") {
41
- let t = h({
41
+ let t = m({
42
42
  localeOrSelector: e,
43
43
  contextLocale: S.value,
44
- contextVariant: l?.variant?.value,
45
- dictionaryKey: f(i).key
44
+ contextVariant: c?.variant?.value,
45
+ dictionaryKey: d(r).key
46
46
  });
47
- return m(t);
47
+ return p(t);
48
48
  }
49
49
  return {
50
50
  selector: void 0,
51
51
  locale: e
52
52
  };
53
- }), w = r(() => C.value.locale ?? S.value), T = d({});
54
- p([
55
- () => f(i),
53
+ }), w = n(() => C.value.locale ?? S.value), T = u({});
54
+ f([
55
+ () => d(r),
56
56
  () => w.value,
57
57
  () => C.value.selector
58
58
  ], ([t, n, r]) => {
@@ -65,20 +65,20 @@ var g = (e, t) => t.reduce((e, t) => e?.[t], e), _ = (e) => typeof e == "object"
65
65
  flush: "sync"
66
66
  });
67
67
  let E = (e) => new Proxy({}, {
68
- get(t, n, i) {
69
- let a = r(() => g(T.value, e));
70
- if (typeof n == "symbol" || typeof n == "string" && (n.startsWith("__") || n.startsWith("$"))) return n === "__v_isRef" ? !0 : n === "$raw" ? a : n === Symbol.toPrimitive ? () => String(a.value ?? "") : Reflect.get(t, n, i);
71
- if (n === "value") return a.value ?? "";
72
- if (n === "then") return;
73
- if (n === "c" || n === "asComponent") return b(() => a.value);
74
- let o = e.concat(n), s = g(T.value, o);
68
+ get(t, r, i) {
69
+ let a = n(() => g(T.value, e));
70
+ if (typeof r == "symbol" || typeof r == "string" && (r.startsWith("__") || r.startsWith("$"))) return r === "__v_isRef" ? !0 : r === "$raw" ? a : r === Symbol.toPrimitive ? () => String(a.value ?? "") : Reflect.get(t, r, i);
71
+ if (r === "value") return a.value ?? "";
72
+ if (r === "then") return;
73
+ if (r === "c" || r === "asComponent") return b(() => a.value);
74
+ let o = e.concat(r), s = g(T.value, o);
75
75
  if (s === void 0 || _(s) && !v(s)) return E(o);
76
- if (y(s)) return x(r(() => g(T.value, o)));
76
+ if (y(s)) return x(n(() => g(T.value, o)));
77
77
  if (typeof s == "function") {
78
78
  let t = g(T.value, e);
79
- return t != null && !Object.hasOwn(t, n) ? s.bind(t) : (...e) => g(T.value, o)?.(...e);
79
+ return t != null && !Object.hasOwn(t, r) ? s.bind(t) : (...e) => g(T.value, o)?.(...e);
80
80
  }
81
- let c = r(() => g(T.value, o));
81
+ let c = n(() => g(T.value, o));
82
82
  return new Proxy(c, { get(e, t, n) {
83
83
  return t === "value" ? e.value ?? "" : Reflect.get(e, t, n);
84
84
  } });
@@ -1,12 +1,12 @@
1
1
  import { INTLAYER_SYMBOL as e } from "./installIntlayer.mjs";
2
2
  import { useDictionary as t } from "./useDictionary.mjs";
3
- import { resolveInterpreterLocale as n } from "@intlayer/core/interpreter";
4
- import { computed as r, inject as i, ref as a, toValue as o, watch as s } from "vue";
5
- import { getPreloadedDictionary as c } from "@intlayer/core/dictionaryManipulator";
3
+ import { computed as n, inject as r, ref as i, toValue as a, watch as o } from "vue";
4
+ import { getPreloadedDictionary as s } from "@intlayer/core/dictionaryManipulator";
5
+ import { resolveInterpreterLocale as c } from "@intlayer/core/interpreter";
6
6
  // src/client/useDictionaryAsync.ts
7
7
  var l = async (l, u) => {
8
- let d = i(e), f = r(() => o(u) ?? d?.locale?.value ?? n()), p = c(l, f.value), m = a(p ?? await l[f.value]?.());
9
- return s(() => f.value, async (e) => {
8
+ let d = r(e), f = n(() => a(u) ?? d?.locale?.value ?? c()), p = s(l, f.value), m = i(p ?? await l[f.value]?.());
9
+ return o(() => f.value, async (e) => {
10
10
  let t = await l[e]?.();
11
11
  t && (m.value = t);
12
12
  }), t(m, f);
@@ -1,19 +1,19 @@
1
1
  import { getDictionary as e } from "../getDictionary.mjs";
2
2
  import { INTLAYER_SYMBOL as t } from "./installIntlayer.mjs";
3
3
  import { useDictionaryAsync as n } from "./useDictionaryAsync.mjs";
4
- import { resolveInterpreterLocale as r } from "@intlayer/core/interpreter";
5
- import { inject as i, toValue as a } from "vue";
6
- import { isQualifiedDynamicLoaderMap as o, parseDictionarySelector as s, resolveDictionaryArgument as c, resolveQualifiedDynamicContentAsync as l } from "@intlayer/core/dictionaryManipulator";
4
+ import { inject as r, toValue as i } from "vue";
5
+ import { isQualifiedDynamicLoaderMap as a, parseDictionarySelector as o, resolveDictionaryArgument as s, resolveQualifiedDynamicContentAsync as c } from "@intlayer/core/dictionaryManipulator";
6
+ import { resolveInterpreterLocale as l } from "@intlayer/core/interpreter";
7
7
  // src/client/useDictionaryDynamic.ts
8
8
  var u = async (u, d, f) => {
9
- if (process.env.INTLAYER_DICTIONARY_SELECTOR !== "false" && o(u)) {
10
- let n = i(t), o = f === void 0 ? void 0 : a(f), { locale: p, selector: m } = s(c({
11
- localeOrSelector: o ?? void 0,
9
+ if (process.env.INTLAYER_DICTIONARY_SELECTOR !== "false" && a(u)) {
10
+ let n = r(t), a = f === void 0 ? void 0 : i(f), { locale: p, selector: m } = o(s({
11
+ localeOrSelector: a ?? void 0,
12
12
  contextLocale: n?.locale?.value,
13
13
  contextVariant: n?.variant?.value,
14
14
  dictionaryKey: String(d)
15
- })), h = p ?? n?.locale?.value ?? r();
16
- return l({
15
+ })), h = p ?? n?.locale?.value ?? l();
16
+ return c({
17
17
  loaderMap: u,
18
18
  key: String(d),
19
19
  locale: h,
@@ -1,29 +1,29 @@
1
1
  import { getIntlayer as e } from "../getIntlayer.mjs";
2
2
  import { INTLAYER_SYMBOL as t } from "./installIntlayer.mjs";
3
3
  import { atPath as n, createIntlayerLeafProxy as r, isComponentLike as i, isIntlayerNode as a, isObjectLike as o, toComponent as s } from "./useDictionary.mjs";
4
- import { resolveInterpreterLocale as c } from "@intlayer/core/interpreter";
5
- import { computed as l, inject as u, isRef as d, ref as f, shallowRef as p, toValue as m, watch as h } from "vue";
6
- import { parseDictionarySelector as g, resolveDictionaryArgument as _ } from "@intlayer/core/dictionaryManipulator";
4
+ import { computed as c, inject as l, isRef as u, ref as d, shallowRef as f, toValue as p, watch as m } from "vue";
5
+ import { parseDictionarySelector as h, resolveDictionaryArgument as g } from "@intlayer/core/dictionaryManipulator";
6
+ import { resolveInterpreterLocale as _ } from "@intlayer/core/interpreter";
7
7
  // src/client/useIntlayer.ts
8
8
  var v = (v, y) => {
9
- let b = u(t), x = d(b?.locale) ? b.locale : f(b?.locale ?? c()), S = l(() => {
10
- let e = y === void 0 ? void 0 : m(y);
9
+ let b = l(t), x = u(b?.locale) ? b.locale : d(b?.locale ?? _()), S = c(() => {
10
+ let e = y === void 0 ? void 0 : p(y);
11
11
  if (process.env.INTLAYER_DICTIONARY_SELECTOR !== "false") {
12
- let t = _({
12
+ let t = g({
13
13
  localeOrSelector: e,
14
14
  contextLocale: x.value,
15
15
  contextVariant: b?.variant?.value,
16
- dictionaryKey: m(v)
16
+ dictionaryKey: p(v)
17
17
  });
18
- return g(t);
18
+ return h(t);
19
19
  }
20
20
  return {
21
21
  selector: void 0,
22
22
  locale: e
23
23
  };
24
- }), C = l(() => S.value.locale ?? x.value), w = p({});
25
- h([
26
- () => m(v),
24
+ }), C = c(() => S.value.locale ?? x.value), w = f({});
25
+ m([
26
+ () => p(v),
27
27
  () => C.value,
28
28
  () => S.value.selector
29
29
  ], ([t, n, r]) => {
@@ -38,21 +38,21 @@ var v = (v, y) => {
38
38
  let T = /* @__PURE__ */ new Map(), E = (e) => {
39
39
  let t = e.join(".");
40
40
  if (T.has(t)) return T.get(t);
41
- let c = l(() => n(w.value, e)), u = new Proxy({}, {
41
+ let l = c(() => n(w.value, e)), u = new Proxy({}, {
42
42
  get(t, u, d) {
43
43
  if (typeof u == "symbol" || typeof u == "string" && (u.startsWith("__") || u.startsWith("$"))) return u === "__v_isRef" ? !0 : u === "then" ? void 0 : Reflect.get(t, u, d);
44
- if (u === "value") return c.value ?? "";
45
- if (u === "c" || u === "asComponent") return s(() => c.value);
46
- if (u === "$raw") return c;
47
- if (u === Symbol.toPrimitive) return () => String(c.value ?? "");
44
+ if (u === "value") return l.value ?? "";
45
+ if (u === "c" || u === "asComponent") return s(() => l.value);
46
+ if (u === "$raw") return l;
47
+ if (u === Symbol.toPrimitive) return () => String(l.value ?? "");
48
48
  let f = e.concat(u), p = n(w.value, f);
49
49
  if (p === void 0 || o(p) && !i(p)) return E(f);
50
- if (a(p)) return r(l(() => n(w.value, f)));
50
+ if (a(p)) return r(c(() => n(w.value, f)));
51
51
  if (typeof p == "function") {
52
52
  let t = n(w.value, e);
53
53
  return t != null && !Object.hasOwn(t, u) ? p.bind(t) : (...e) => n(w.value, f)?.(...e);
54
54
  }
55
- let m = l(() => n(w.value, f));
55
+ let m = c(() => n(w.value, f));
56
56
  return new Proxy(m, { get(e, t, n) {
57
57
  return t === "value" ? e.value ?? "" : t === "__v_isRef" || Reflect.get(e, t, n);
58
58
  } });
@@ -1,25 +1,25 @@
1
1
  import { listInspectorEntries as e } from "./formatDictionaryForInspector.mjs";
2
- import * as t from "@intlayer/types/nodeType";
3
- import { editDictionaryByKeyPath as n, getContentNodeByKeyPath as r } from "@intlayer/core/dictionaryManipulator";
2
+ import { editDictionaryByKeyPath as t, getContentNodeByKeyPath as n } from "@intlayer/core/dictionaryManipulator";
3
+ import * as r from "@intlayer/types/nodeType";
4
4
  // src/devtools/editDictionaryContent.ts
5
- var i = (e) => typeof e == "object" && !!e && !Array.isArray(e), a = (e, n) => {
6
- let a = r(e.content, n);
7
- return typeof a == "string" ? "plain-string" : i(a) && a.nodeType === t.TRANSLATION && i(a[t.TRANSLATION]) && Object.values(a[t.TRANSLATION]).every((e) => typeof e == "string") ? "translation" : null;
5
+ var i = (e) => typeof e == "object" && !!e && !Array.isArray(e), a = (e, t) => {
6
+ let a = n(e.content, t);
7
+ return typeof a == "string" ? "plain-string" : i(a) && a.nodeType === r.TRANSLATION && i(a[r.TRANSLATION]) && Object.values(a[r.TRANSLATION]).every((e) => typeof e == "string") ? "translation" : null;
8
8
  }, o = (e, t = "Translations") => {
9
9
  let [n, r, ...i] = e[0] === t ? e.slice(1) : e;
10
10
  return !n || i.length > 0 ? null : r ? {
11
11
  label: n,
12
12
  locale: r
13
13
  } : { label: n };
14
- }, s = (n, r) => {
15
- let i = e(n).find(({ label: e }) => e === r.label);
16
- return i ? r.locale ? [...i.keyPath, {
17
- type: t.TRANSLATION,
18
- key: r.locale
14
+ }, s = (t, n) => {
15
+ let i = e(t).find(({ label: e }) => e === n.label);
16
+ return i ? n.locale ? [...i.keyPath, {
17
+ type: r.TRANSLATION,
18
+ key: n.locale
19
19
  }] : i.keyPath : null;
20
- }, c = (e, t, i) => {
21
- if (typeof r(e.content, t) != "string") return null;
22
- let a = n(structuredClone(e.content), t, i);
20
+ }, c = (e, r, i) => {
21
+ if (typeof n(e.content, r) != "string") return null;
22
+ let a = t(structuredClone(e.content), r, i);
23
23
  return {
24
24
  ...e,
25
25
  content: a
@@ -1,18 +1,18 @@
1
1
  import { useHTML as e } from "./installIntlayerHTML.mjs";
2
- import { getHTML as t } from "@intlayer/core/interpreter";
3
- import { defineComponent as n, h as r } from "vue";
2
+ import { defineComponent as t, h as n } from "vue";
3
+ import { getHTML as r } from "@intlayer/core/interpreter";
4
4
  import { VOID_HTML_ELEMENTS as i } from "@intlayer/core/transpiler";
5
5
  // src/html/HTMLRenderer.ts
6
- var a = (e, { components: n = {} } = {}) => {
7
- let a = Object.fromEntries(Object.entries(n).filter(([, e]) => e).map(([e, t]) => [e, (e) => r(t, e, e?.children)])), o = new Proxy(a, { get(e, t) {
6
+ var a = (e, { components: t = {} } = {}) => {
7
+ let a = Object.fromEntries(Object.entries(t).filter(([, e]) => e).map(([e, t]) => [e, (e) => n(t, e, e?.children)])), o = new Proxy(a, { get(e, t) {
8
8
  if (typeof t == "string" && t in e) return e[t];
9
- if (typeof t == "string" && /^[a-z][a-z0-9]*$/.test(t)) return i.has(t) ? ({ children: e, ...n }) => r(t, n) : (e) => r(t, e, e?.children);
9
+ if (typeof t == "string" && /^[a-z][a-z0-9]*$/.test(t)) return i.has(t) ? ({ children: e, ...r }) => n(t, r) : (e) => n(t, e, e?.children);
10
10
  } });
11
- return t(e, o);
11
+ return r(e, o);
12
12
  }, o = ({ components: t } = {}) => {
13
13
  let n = e();
14
14
  return (e) => n ? n.renderHTML(e, { components: t }) : a(e, { components: t });
15
- }, s = n({
15
+ }, s = t({
16
16
  name: "HTMLRenderer",
17
17
  props: {
18
18
  content: {
@@ -1,22 +1,22 @@
1
- import { getHTML as e } from "@intlayer/core/interpreter";
2
- import { inject as t, provide as n } from "vue";
1
+ import { inject as e, provide as t } from "vue";
2
+ import { getHTML as n } from "@intlayer/core/interpreter";
3
3
  // src/html/installIntlayerHTML.ts
4
- var r = Symbol("intlayerHTML"), i = null, a = (e) => i || (i = { renderHTML: e }, i), o = (t, i) => {
4
+ var r = Symbol("intlayerHTML"), i = null, a = (e) => i || (i = { renderHTML: e }, i), o = (e, i) => {
5
5
  let o;
6
6
  if (typeof i == "function") o = i;
7
7
  else {
8
- let { components: t, renderHTML: n } = i ?? {};
9
- o = n || ((n, r) => {
8
+ let { components: e, renderHTML: t } = i ?? {};
9
+ o = t || ((t, r) => {
10
10
  let { components: i, ...a } = r && typeof r == "object" && "components" in r ? r : { components: r }, o = i || a, s = {
11
- ...t,
11
+ ...e,
12
12
  ...o
13
13
  };
14
- return e(n, s);
14
+ return n(t, s);
15
15
  });
16
16
  }
17
- let s = a((e, t) => typeof i == "function" || typeof i == "object" && i?.renderHTML ? { setup() {
18
- return n(r, { renderHTML: void 0 }), () => o(e, t);
19
- } } : o(e, t));
20
- t.provide(r, s);
21
- }, s = { install: o }, c = () => t(r);
17
+ let s = a((e, n) => typeof i == "function" || typeof i == "object" && i?.renderHTML ? { setup() {
18
+ return t(r, { renderHTML: void 0 }), () => o(e, n);
19
+ } } : o(e, n));
20
+ e.provide(r, s);
21
+ }, s = { install: o }, c = () => e(r);
22
22
  export { r as INTLAYER_HTML_SYMBOL, a as createIntlayerHTMLClient, o as installIntlayerHTML, s as intlayerHTML, c as useHTML };
@@ -1,9 +1,9 @@
1
- import { useEditor as e } from "./editor/useEditor.mjs";
2
- import { INTLAYER_SYMBOL as t, createIntlayerClient as n, installIntlayer as r, intlayer as i } from "./client/installIntlayer.mjs";
3
- import { useAnalytics as a } from "./analytics/useAnalytics.mjs";
4
- import { useConversion as o } from "./analytics/useConversion.mjs";
5
- import { useExperiment as s } from "./analytics/useExperiment.mjs";
1
+ import { INTLAYER_SYMBOL as e, createIntlayerClient as t, installIntlayer as n, intlayer as r } from "./client/installIntlayer.mjs";
2
+ import { useAnalytics as i } from "./analytics/useAnalytics.mjs";
3
+ import { useConversion as a } from "./analytics/useConversion.mjs";
4
+ import { useExperiment as o } from "./analytics/useExperiment.mjs";
6
5
  import "./analytics/index.mjs";
6
+ import { useEditor as s } from "./editor/useEditor.mjs";
7
7
  import { getDictionary as c } from "./getDictionary.mjs";
8
8
  import { atPath as l, createIntlayerLeafProxy as u, isComponentLike as d, isIntlayerNode as f, isObjectLike as p, toComponent as m, useDictionary as h } from "./client/useDictionary.mjs";
9
9
  import { useDictionaryAsync as g } from "./client/useDictionaryAsync.mjs";
@@ -16,4 +16,4 @@ import { usePathname as S } from "./client/usePathname.mjs";
16
16
  import { useRewriteURL as C } from "./client/useRewriteURL.mjs";
17
17
  import "./client/index.mjs";
18
18
  import { getPlugins as w, htmlPlugin as T, insertionPlugin as E, intlayerNodePlugins as D, markdownPlugin as O, markdownStringPlugin as k } from "./plugins.mjs";
19
- export { t as INTLAYER_SYMBOL, l as atPath, n as createIntlayerClient, u as createIntlayerLeafProxy, c as getDictionary, v as getIntlayer, w as getPlugins, T as htmlPlugin, E as insertionPlugin, r as installIntlayer, i as intlayer, D as intlayerNodePlugins, d as isComponentLike, f as isIntlayerNode, p as isObjectLike, O as markdownPlugin, k as markdownStringPlugin, m as toComponent, a as useAnalytics, o as useConversion, h as useDictionary, g as useDictionaryAsync, _ as useDictionaryDynamic, e as useEditor, s as useExperiment, y as useIntlayer, b as useLoadDynamic, x as useLocale, S as usePathname, C as useRewriteURL };
19
+ export { e as INTLAYER_SYMBOL, l as atPath, t as createIntlayerClient, u as createIntlayerLeafProxy, c as getDictionary, v as getIntlayer, w as getPlugins, T as htmlPlugin, E as insertionPlugin, n as installIntlayer, r as intlayer, D as intlayerNodePlugins, d as isComponentLike, f as isIntlayerNode, p as isObjectLike, O as markdownPlugin, k as markdownStringPlugin, m as toComponent, i as useAnalytics, a as useConversion, h as useDictionary, g as useDictionaryAsync, _ as useDictionaryDynamic, s as useEditor, o as useExperiment, y as useIntlayer, b as useLoadDynamic, x as useLocale, S as usePathname, C as useRewriteURL };
@@ -3,12 +3,12 @@ import { renderHTML as t } from "./html/HTMLRenderer.mjs";
3
3
  import { useMarkdown as n } from "./markdown/installIntlayerMarkdown.mjs";
4
4
  import { renderIntlayerNode as r } from "./renderIntlayerNode.mjs";
5
5
  import { editor as i, internationalization as a } from "@intlayer/config/built";
6
- import { conditionPlugin as o, enumerationPlugin as s, fallbackPlugin as c, filePlugin as l, genderPlugin as u, isInterpolableWrapperNode as d, nestedPlugin as f, pluralPlugin as p, resolveInsertedSelector as m, resolveInterpreterLocale as h, selectPlugin as g, splitInsertionTemplate as _, transformInterpolableNode as v, translationPlugin as y } from "@intlayer/core/interpreter";
7
- import { getMarkdownMetadata as b } from "@intlayer/core/markdown";
8
- import * as x from "@intlayer/types/nodeType";
9
- import { Fragment as S, defineAsyncComponent as C, h as w, markRaw as T } from "vue";
6
+ import { Fragment as o, defineAsyncComponent as s, h as c, markRaw as l } from "vue";
7
+ import { conditionPlugin as u, enumerationPlugin as d, fallbackPlugin as f, filePlugin as p, genderPlugin as m, isInterpolableWrapperNode as h, nestedPlugin as g, pluralPlugin as _, resolveInsertedSelector as v, resolveInterpreterLocale as y, selectPlugin as b, splitInsertionTemplate as x, transformInterpolableNode as S, translationPlugin as C } from "@intlayer/core/interpreter";
8
+ import { getMarkdownMetadata as w } from "@intlayer/core/markdown";
9
+ import * as T from "@intlayer/types/nodeType";
10
10
  // src/plugins.ts
11
- var E = process.env.INTLAYER_EDITOR_ENABLED === "false" ? null : C(() => import("./editor/ContentSelector.mjs")), D = {
11
+ var E = process.env.INTLAYER_EDITOR_ENABLED === "false" ? null : s(() => import("./editor/ContentSelector.mjs")), D = {
12
12
  id: "intlayer-node-plugin",
13
13
  canHandle: (e) => typeof e == "bigint" || typeof e == "string" || typeof e == "number",
14
14
  transform: (t, n) => {
@@ -19,33 +19,33 @@ var E = process.env.INTLAYER_EDITOR_ENABLED === "false" ? null : C(() => import(
19
19
  locale: n.locale,
20
20
  nodeType: "text"
21
21
  });
22
- let c = (e) => r({
22
+ let u = (e) => r({
23
23
  value: e,
24
- children: process.env.INTLAYER_EDITOR_ENABLED !== "false" && i.enabled ? () => w(E, {
24
+ children: process.env.INTLAYER_EDITOR_ENABLED !== "false" && i.enabled ? () => c(E, {
25
25
  dictionaryKey: o,
26
26
  keyPath: s
27
27
  }, { default: () => typeof e == "function" ? e() : e }) : e
28
- }), l = c(a);
29
- if (typeof a != "function") return l;
30
- let u = (...e) => {
28
+ }), d = u(a);
29
+ if (typeof a != "function") return d;
30
+ let f = (...e) => {
31
31
  let t = a(...e);
32
- return c(t);
32
+ return u(t);
33
33
  };
34
- Object.setPrototypeOf(u, Object.getPrototypeOf(l));
35
- for (let e of Object.getOwnPropertyNames(l)) {
36
- let t = Object.getOwnPropertyDescriptor(l, e);
37
- t && Object.defineProperty(u, e, t);
34
+ Object.setPrototypeOf(f, Object.getPrototypeOf(d));
35
+ for (let e of Object.getOwnPropertyNames(d)) {
36
+ let t = Object.getOwnPropertyDescriptor(d, e);
37
+ t && Object.defineProperty(f, e, t);
38
38
  }
39
- for (let e of Object.getOwnPropertySymbols(l)) {
40
- let t = Object.getOwnPropertyDescriptor(l, e);
41
- t && Object.defineProperty(u, e, t);
39
+ for (let e of Object.getOwnPropertySymbols(d)) {
40
+ let t = Object.getOwnPropertyDescriptor(d, e);
41
+ t && Object.defineProperty(f, e, t);
42
42
  }
43
- return T(u);
43
+ return l(f);
44
44
  }
45
45
  }, O = (e, t) => {
46
46
  let n = /* @__PURE__ */ new Map(), r = {};
47
47
  for (let [e, i] of Object.entries(t)) typeof i == "string" || typeof i == "number" ? r[e] = i : (n.set(e, i), r[e] = `__VNODE_${e}__`);
48
- let i = _(e, r);
48
+ let i = x(e, r);
49
49
  if (n.size > 0) {
50
50
  let e = [];
51
51
  if (i.isSimple) {
@@ -54,7 +54,7 @@ var E = process.env.INTLAYER_EDITOR_ENABLED === "false" ? null : C(() => import(
54
54
  let a = `__VNODE_${i}__`, o = t.indexOf(a);
55
55
  o !== -1 && (o > r && e.push(t.substring(r, o)), e.push(n.get(i)), r = o + a.length);
56
56
  }
57
- return r < t.length && e.push(t.substring(r)), w(S, null, ...e);
57
+ return r < t.length && e.push(t.substring(r)), c(o, null, ...e);
58
58
  }
59
59
  return i.parts.forEach((t) => {
60
60
  if (typeof t == "string") {
@@ -65,22 +65,22 @@ var E = process.env.INTLAYER_EDITOR_ENABLED === "false" ? null : C(() => import(
65
65
  }
66
66
  r.length > 0 && e.push(r);
67
67
  } else e.push(t);
68
- }), w(S, null, ...e);
68
+ }), c(o, null, ...e);
69
69
  }
70
- return i.isSimple ? i.parts : w(S, null, i.parts);
71
- }, k = process.env.INTLAYER_NODE_TYPE_INSERTION === "false" ? c : {
70
+ return i.isSimple ? i.parts : c(o, null, i.parts);
71
+ }, k = process.env.INTLAYER_NODE_TYPE_INSERTION === "false" ? f : {
72
72
  id: "insertion-plugin",
73
- canHandle: (e) => typeof e == "object" && e?.nodeType === x.INSERTION,
73
+ canHandle: (e) => typeof e == "object" && e?.nodeType === T.INSERTION,
74
74
  transform: (e, t, n) => {
75
- let r = [...t.keyPath, { type: x.INSERTION }], i = e[x.INSERTION], a = {
75
+ let r = [...t.keyPath, { type: T.INSERTION }], i = e[T.INSERTION], a = {
76
76
  id: "insertion-string-plugin",
77
- canHandle: (e) => typeof e == "string" || d(e),
77
+ canHandle: (e) => typeof e == "string" || h(e),
78
78
  transform: (e, n, r) => {
79
- if (d(e)) return (i) => v(e, i, n, t.plugins, r);
79
+ if (h(e)) return (i) => S(e, i, n, t.plugins, r);
80
80
  let i = r(e, {
81
81
  ...n,
82
82
  children: e,
83
- plugins: [...(t.plugins ?? []).filter((e) => e.id !== "intlayer-node-plugin")]
83
+ plugins: (t.plugins ?? []).filter((e) => e.id !== "intlayer-node-plugin")
84
84
  });
85
85
  return (e) => {
86
86
  let a = O(i, e);
@@ -97,13 +97,13 @@ var E = process.env.INTLAYER_EDITOR_ENABLED === "false" ? null : C(() => import(
97
97
  keyPath: r,
98
98
  plugins: [a, ...t.plugins ?? []]
99
99
  });
100
- return m(i, o);
100
+ return v(i, o);
101
101
  }
102
- }, A = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? c : {
102
+ }, A = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? f : {
103
103
  id: "markdown-string-plugin",
104
104
  canHandle: (e) => typeof e == "string",
105
105
  transform: (e, t, a) => {
106
- let { plugins: o, ...s } = t, c = a(b(e) ?? {}, {
106
+ let { plugins: o, ...s } = t, l = a(w(e) ?? {}, {
107
107
  plugins: [{
108
108
  id: "markdown-metadata-plugin",
109
109
  canHandle: (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || !e,
@@ -115,7 +115,7 @@ var E = process.env.INTLAYER_EDITOR_ENABLED === "false" ? null : C(() => import(
115
115
  }],
116
116
  dictionaryKey: s.dictionaryKey,
117
117
  keyPath: []
118
- }), l = (a) => r({
118
+ }), u = (a) => r({
119
119
  ...t,
120
120
  value: e,
121
121
  children: () => {
@@ -123,23 +123,23 @@ var E = process.env.INTLAYER_EDITOR_ENABLED === "false" ? null : C(() => import(
123
123
  ...r ?? {},
124
124
  ...a ?? {}
125
125
  });
126
- return process.env.INTLAYER_EDITOR_ENABLED !== "false" && i.enabled ? w(E, {
126
+ return process.env.INTLAYER_EDITOR_ENABLED !== "false" && i.enabled ? c(E, {
127
127
  dictionaryKey: s.dictionaryKey,
128
128
  keyPath: s.keyPath
129
129
  }, { default: () => o }) : o;
130
130
  },
131
131
  additionalProps: {
132
- metadata: c,
133
- use: (e) => l(e)
132
+ metadata: l,
133
+ use: (e) => u(e)
134
134
  }
135
135
  });
136
- return l();
136
+ return u();
137
137
  }
138
- }, j = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? c : {
138
+ }, j = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? f : {
139
139
  id: "markdown-plugin",
140
- canHandle: (e) => typeof e == "object" && e?.nodeType === x.MARKDOWN,
140
+ canHandle: (e) => typeof e == "object" && e?.nodeType === T.MARKDOWN,
141
141
  transform: (e, t, n) => {
142
- let r = [...t.keyPath, { type: x.MARKDOWN }], i = e[x.MARKDOWN];
142
+ let r = [...t.keyPath, { type: T.MARKDOWN }], i = e[T.MARKDOWN];
143
143
  return n(i, {
144
144
  ...t,
145
145
  children: i,
@@ -147,18 +147,18 @@ var E = process.env.INTLAYER_EDITOR_ENABLED === "false" ? null : C(() => import(
147
147
  plugins: [A, ...t.plugins ?? []]
148
148
  });
149
149
  }
150
- }, M = process.env.INTLAYER_NODE_TYPE_HTML === "false" ? c : {
150
+ }, M = process.env.INTLAYER_NODE_TYPE_HTML === "false" ? f : {
151
151
  id: "html-plugin",
152
- canHandle: (e) => typeof e == "object" && e?.nodeType === x.HTML,
152
+ canHandle: (e) => typeof e == "object" && e?.nodeType === T.HTML,
153
153
  transform: (e, n) => {
154
- let a = e[x.HTML];
154
+ let a = e[T.HTML];
155
155
  e.tags;
156
156
  let o = (e = {}) => {
157
157
  let s = t(a, { components: e });
158
158
  return r({
159
159
  ...n,
160
160
  value: a,
161
- children: process.env.INTLAYER_EDITOR_ENABLED !== "false" && i.enabled ? () => w(E, {
161
+ children: process.env.INTLAYER_EDITOR_ENABLED !== "false" && i.enabled ? () => c(E, {
162
162
  dictionaryKey: n.dictionaryKey,
163
163
  keyPath: n.keyPath,
164
164
  ...e
@@ -169,22 +169,22 @@ var E = process.env.INTLAYER_EDITOR_ENABLED === "false" ? null : C(() => import(
169
169
  return o();
170
170
  }
171
171
  }, N = /* @__PURE__ */ new Map(), P = (e, t = !0) => {
172
- let n = h(e), r = `${n}_${t}`;
172
+ let n = y(e), r = `${n}_${t}`;
173
173
  if (N.has(r)) return N.get(r);
174
174
  let i = [
175
175
  D,
176
- y(n, t ? a.defaultLocale : void 0),
177
- s,
178
- p(n),
179
- o,
180
- f(n),
181
- l,
176
+ C(n, t ? a.defaultLocale : void 0),
177
+ d,
178
+ _(n),
182
179
  u,
183
- g,
180
+ g(n),
181
+ p,
182
+ m,
183
+ b,
184
184
  k,
185
185
  j,
186
186
  M
187
- ].filter((e) => e !== c);
187
+ ].filter((e) => e !== f);
188
188
  return N.set(r, i), i;
189
189
  };
190
190
  export { P as getPlugins, M as htmlPlugin, k as insertionPlugin, D as intlayerNodePlugins, j as markdownPlugin, A as markdownStringPlugin };
package/package.json CHANGED
@@ -1,27 +1,23 @@
1
1
  {
2
2
  "name": "vue-intlayer",
3
- "version": "9.7.1",
3
+ "version": "9.7.3",
4
4
  "private": false,
5
5
  "description": "Easily internationalize i18n your Vue applications with type-safe multilingual content management.",
6
6
  "keywords": [
7
- "intlayer",
8
7
  "data",
8
+ "i18n",
9
9
  "internationalization",
10
+ "intlayer",
11
+ "json",
10
12
  "multilingual",
11
- "i18n",
12
13
  "typescript",
13
- "vue",
14
14
  "vite",
15
- "json"
15
+ "vue"
16
16
  ],
17
17
  "homepage": "https://intlayer.org",
18
18
  "bugs": {
19
19
  "url": "https://github.com/aymericzip/intlayer/issues"
20
20
  },
21
- "repository": {
22
- "type": "git",
23
- "url": "git+https://github.com/aymericzip/intlayer.git"
24
- },
25
21
  "license": "Apache-2.0",
26
22
  "author": {
27
23
  "name": "Aymeric PINEAU",
@@ -34,7 +30,37 @@
34
30
  "url": "https://github.com/aymericzip"
35
31
  }
36
32
  ],
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "git+https://github.com/aymericzip/intlayer.git"
36
+ },
37
+ "files": [
38
+ "./dist",
39
+ "./package.json"
40
+ ],
37
41
  "sideEffects": false,
42
+ "main": "dist/cjs/index.cjs",
43
+ "module": "dist/esm/index.mjs",
44
+ "types": "dist/types/index.d.ts",
45
+ "typesVersions": {
46
+ "*": {
47
+ ".": [
48
+ "./dist/types/index.d.ts"
49
+ ],
50
+ "markdown": [
51
+ "./dist/types/markdown/index.d.ts"
52
+ ],
53
+ "format": [
54
+ "./dist/types/format/index.d.ts"
55
+ ],
56
+ "html": [
57
+ "./dist/types/html/index.d.ts"
58
+ ],
59
+ "package.json": [
60
+ "./package.json"
61
+ ]
62
+ }
63
+ },
38
64
  "exports": {
39
65
  ".": {
40
66
  "types": "./dist/types/index.d.ts",
@@ -58,41 +84,15 @@
58
84
  },
59
85
  "./package.json": "./package.json"
60
86
  },
61
- "main": "dist/cjs/index.cjs",
62
- "module": "dist/esm/index.mjs",
63
- "types": "dist/types/index.d.ts",
64
- "typesVersions": {
65
- "*": {
66
- ".": [
67
- "./dist/types/index.d.ts"
68
- ],
69
- "markdown": [
70
- "./dist/types/markdown/index.d.ts"
71
- ],
72
- "format": [
73
- "./dist/types/format/index.d.ts"
74
- ],
75
- "html": [
76
- "./dist/types/html/index.d.ts"
77
- ],
78
- "package.json": [
79
- "./package.json"
80
- ]
81
- }
82
- },
83
- "files": [
84
- "./dist",
85
- "./package.json"
86
- ],
87
87
  "scripts": {
88
88
  "build": "bun --bun vite build",
89
89
  "build:ci": "bun --bun vite build",
90
90
  "clean": "bun --bun rimraf ./dist .turbo",
91
91
  "dev": "bun --bun vite build --watch",
92
- "format": "bun --bun biome format . --check",
93
- "format:fix": "bun --bun biome format --write .",
94
- "lint": "bun --bun biome lint .",
95
- "lint:fix": "bun --bun biome lint --write .",
92
+ "format": "oxfmt --check .",
93
+ "format:fix": "oxfmt .",
94
+ "lint": "oxlint .",
95
+ "lint:fix": "oxlint --fix .",
96
96
  "prepublish": "cp -f ../../README.md ./README.md",
97
97
  "publish": "bun publish || true",
98
98
  "publish:canary": "bun publish --access public --tag canary || true",
@@ -103,12 +103,12 @@
103
103
  "typecheck": "vue-tsc --noEmit --project tsconfig.types.json"
104
104
  },
105
105
  "dependencies": {
106
- "@intlayer/api": "9.7.1",
107
- "@intlayer/config": "9.7.1",
108
- "@intlayer/core": "9.7.1",
109
- "@intlayer/dictionaries-entry": "9.7.1",
110
- "@intlayer/editor": "9.7.1",
111
- "@intlayer/types": "9.7.1",
106
+ "@intlayer/api": "9.7.3",
107
+ "@intlayer/config": "9.7.3",
108
+ "@intlayer/core": "9.7.3",
109
+ "@intlayer/dictionaries-entry": "9.7.3",
110
+ "@intlayer/editor": "9.7.3",
111
+ "@intlayer/types": "9.7.3",
112
112
  "@vue/devtools-api": "^6.6.4"
113
113
  },
114
114
  "devDependencies": {
@@ -119,16 +119,16 @@
119
119
  "@vitejs/plugin-vue": "6.0.8",
120
120
  "ajv": "8.20.0",
121
121
  "fast-glob": "3.3.3",
122
- "rimraf": "6.1.3",
123
- "tsdown": "0.23.4",
122
+ "rimraf": "6.1.4",
123
+ "tsdown": "0.23.7",
124
124
  "typescript": "7.0.2",
125
- "vite": "8.3.5",
125
+ "vite": "8.3.7",
126
126
  "vite-plugin-dts": "5.1.2",
127
127
  "vitest": "5.1.0",
128
128
  "vue-tsc": "3.3.9"
129
129
  },
130
130
  "peerDependencies": {
131
- "intlayer": "9.7.1",
131
+ "intlayer": "9.7.3",
132
132
  "vue": ">=3.0.0"
133
133
  },
134
134
  "peerDependenciesMeta": {
@@ -137,7 +137,7 @@
137
137
  }
138
138
  },
139
139
  "optionalDependencies": {
140
- "@intlayer/analytics": "9.7.1"
140
+ "@intlayer/analytics": "9.7.3"
141
141
  },
142
142
  "engines": {
143
143
  "node": ">=14.18"