vue-intlayer 9.5.3 → 9.5.4-canary.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/README.md +8 -8
  2. package/dist/cjs/analytics/useAnalytics.cjs +1 -1
  3. package/dist/cjs/client/installIntlayer.cjs +1 -1
  4. package/dist/cjs/client/useDictionary.cjs +1 -1
  5. package/dist/cjs/client/useDictionaryAsync.cjs +1 -1
  6. package/dist/cjs/client/useDictionaryDynamic.cjs +1 -1
  7. package/dist/cjs/client/useIntlayer.cjs +1 -1
  8. package/dist/cjs/client/useLocale.cjs +1 -1
  9. package/dist/cjs/client/useRewriteURL.cjs +1 -1
  10. package/dist/cjs/devtools/index.cjs +1 -1
  11. package/dist/cjs/format/index.cjs +1 -1
  12. package/dist/cjs/index.cjs +1 -1
  13. package/dist/cjs/plugins.cjs +1 -1
  14. package/dist/esm/analytics/useAnalytics.mjs +17 -17
  15. package/dist/esm/client/installIntlayer.mjs +6 -6
  16. package/dist/esm/client/useDictionary.mjs +27 -27
  17. package/dist/esm/client/useDictionaryAsync.mjs +4 -4
  18. package/dist/esm/client/useDictionaryDynamic.mjs +7 -7
  19. package/dist/esm/client/useIntlayer.mjs +34 -34
  20. package/dist/esm/client/useLocale.mjs +6 -6
  21. package/dist/esm/client/useRewriteURL.mjs +4 -4
  22. package/dist/esm/devtools/index.mjs +4 -4
  23. package/dist/esm/format/index.mjs +9 -9
  24. package/dist/esm/index.mjs +11 -11
  25. package/dist/esm/plugins.mjs +85 -85
  26. package/dist/types/client/useLocaleStorage.d.ts +4 -4
  27. package/dist/types/format/useCompact.d.ts +1 -1
  28. package/dist/types/format/useCurrency.d.ts +1 -1
  29. package/dist/types/format/useDate.d.ts +1 -1
  30. package/dist/types/format/useList.d.ts +1 -1
  31. package/dist/types/format/useNumber.d.ts +1 -1
  32. package/dist/types/format/usePercentage.d.ts +1 -1
  33. package/dist/types/format/useRelativeTime.d.ts +1 -1
  34. package/dist/types/format/useUnit.d.ts +1 -1
  35. package/package.json +11 -10
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <p align="center">
2
2
  <a href="https://intlayer.org" rel="">
3
- <img src="https://raw.githubusercontent.com/aymericzip/intlayer/main/docs/assets/cover.png" width="60%" alt="Intlayer Logo" />
3
+ <img src="https://raw.githubusercontent.com/aymericzip/intlayer/main/docs/assets/cover.webp" width="60%" alt="Intlayer Logo" />
4
4
  </a>
5
5
  </p>
6
6
 
@@ -49,10 +49,10 @@ With **per-locale content files**, **TypeScript autocompletion**, **tree-shakabl
49
49
 
50
50
  | Feature | Description |
51
51
  | --------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
52
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/frameworks.png?raw=true" alt="Feature" width="700"> | **Cross-Frameworks Support**<br><br>Intlayer is compatible with all major frameworks and libraries, including Next.js, React, Vite, Vue.js, Nuxt, Preact, Express, and more. |
52
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/frameworks.webp?raw=true" alt="Feature" width="700"> | **Cross-Frameworks Support**<br><br>Intlayer is compatible with all major frameworks and libraries, including Next.js, React, Vite, Vue.js, Nuxt, Preact, Express, and more. |
53
53
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/javascript_content_management.jpg?raw=true" alt="Feature" width="700"> | **JavaScript-Powered Content Management**<br><br>Harness the flexibility of JavaScript to define and manage your content efficiently. <br><br> - [Content declaration](https://intlayer.org/doc/concept/content) |
54
54
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/per_locale_content_declaration_file.png?raw=true" alt="Feature" width="700"> | **Per-Locale Content Declaration File**<br><br>Speed up your development by declaring your content once, before auto generation.<br><br> - [Per-Locale Content Declaration File](https://intlayer.org/doc/concept/per-locale-file) |
55
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/compiler.jpg?raw=true" alt="Feature" width="700"> | **Compiler**<br><br>The Intlayer Compiler extract automatically the content from the components and generate the dictionary files.<br><br> - [Compiler](https://intlayer.org/doc/compiler) |
55
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/compiler.webp?raw=true" alt="Feature" width="700"> | **Compiler**<br><br>The Intlayer Compiler extract automatically the content from the components and generate the dictionary files.<br><br> - [Compiler](https://intlayer.org/doc/compiler) |
56
56
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/autocompletion.png?raw=true" alt="Feature" width="700"> | **Type-Safe Environment**<br><br>Leverage TypeScript to ensure your content definitions and code are error-free, while also benefiting from IDE autocompletion.<br><br> - [TypeScript configuration](https://intlayer.org/doc/environment/vite-and-react#configure-typescript) |
57
57
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/config_file.png?raw=true" alt="Feature" width="700"> | **Simplified Setup**<br><br>Get up and running quickly with minimal configuration. Adjust settings for internationalization, routing, AI, build, and content handling with ease. <br><br> - [Explore Next.js integration](https://intlayer.org/doc/environment/nextjs) |
58
58
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/content_retrieval.png?raw=true" alt="Feature" width="700"> | **Simplified Content Retrieval**<br><br>No need to call your `t` function for each piece of content. Retrieve all your content directly using a single hook.<br><br> - [React integration](https://intlayer.org/doc/environment/create-react-app) |
@@ -60,12 +60,12 @@ With **per-locale content files**, **TypeScript autocompletion**, **tree-shakabl
60
60
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/file_tree.png?raw=true" alt="Feature" width="700"> | **Organized Codebase**<br><br>Keep your codebase more organized: 1 component = 1 dictionary in the same folder. Translations close to their respective components, enhance maintainability and clarity. <br><br> - [How Intlayer works](https://intlayer.org/doc/concept/how-works-intlayer) |
61
61
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/url_routing.png?raw=true" alt="Feature" width="700"> | **Enhanced Routing**<br><br>Full support of app routing, adapting seamlessly to complex application structures, for Next.js, React, Vite, Vue.js, etc.<br><br> - [Explore Next.js integration](https://intlayer.org/doc/environment/nextjs) |
62
62
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/markdown.png?raw=true" alt="Feature" width="700"> | **Markdown Support**<br><br>Import and interpret, locale files and remote Markdown for multilingual content like privacy policies, documentation, etc. Interpret and make Markdown metadata accessible in your code.<br><br> - [Content files](https://intlayer.org/doc/concept/content/file) |
63
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/visual_editor.png?raw=true" alt="Feature" width="700"> | **Free Visual Editor & CMS**<br><br>A free visual editor and CMS are available for content writers, removing the need for a localization platform. Keep your content synchronized using Git, or externalize it totally or partially with the CMS.<br><br> - [Intlayer Editor](https://intlayer.org/doc/concept/editor) <br> - [Intlayer CMS](https://intlayer.org/doc/concept/cms) |
64
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/bundle.png?raw=true" alt="Feature" width="700"> | **Tree-shakable Content**<br><br>Tree-shakable content, reducing the size of the final bundle. Loads content per component, excluding any unused content from your bundle. Supports lazy loading to enhance app loading efficiency. <br><br> - [App build optimization](https://intlayer.org/doc/concept/how-works-intlayer#app-build-optimization) |
65
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/static_rendering.png?raw=true" alt="Feature" width="700"> | **Static Rendering**<br><br>Doesn't block Static Rendering. <br><br> - [Next.js integration](https://intlayer.org/doc/environment/nextjs) |
63
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/visual_editor.webp?raw=true" alt="Feature" width="700"> | **Free Visual Editor & CMS**<br><br>A free visual editor and CMS are available for content writers, removing the need for a localization platform. Keep your content synchronized using Git, or externalize it totally or partially with the CMS.<br><br> - [Intlayer Editor](https://intlayer.org/doc/concept/editor) <br> - [Intlayer CMS](https://intlayer.org/doc/concept/cms) |
64
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/bundle.webp?raw=true" alt="Feature" width="700"> | **Tree-shakable Content**<br><br>Tree-shakable content, reducing the size of the final bundle. Loads content per component, excluding any unused content from your bundle. Supports lazy loading to enhance app loading efficiency. <br><br> - [App build optimization](https://intlayer.org/doc/concept/how-works-intlayer#app-build-optimization) |
65
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/static_rendering.webp?raw=true" alt="Feature" width="700"> | **Static Rendering**<br><br>Doesn't block Static Rendering. <br><br> - [Next.js integration](https://intlayer.org/doc/environment/nextjs) |
66
66
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/AI_translation.png?raw=true" alt="Feature" width="700"> | **AI-Powered Translation**<br><br>Transform your website into 231 languages with just one click using Intlayer's advanced AI-powered translation tools using your own AI provider / API key. <br><br> - [CI/CD integration](https://intlayer.org/doc/concept/ci-cd) <br> - [Intlayer CLI](https://intlayer.org/doc/concept/cli) <br> - [Auto fill](https://intlayer.org/doc/concept/auto-fill) |
67
67
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/mcp.png?raw=true" alt="Feature" width="700"> | **MCP Server Integration**<br><br>Provides an MCP (Model Context Protocol) server for IDE automation, enabling seamless content management and i18n workflows directly within your development environment. <br><br> - [MCP Server](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/mcp_server.md) |
68
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/vscode_extension.png?raw=true" alt="Feature" width="700"> | **VSCode Extension**<br><br>Intlayer provides a VSCode extension to help you manage your content and translations, building your dictionaries, translating your content, and more. <br><br> - [VSCode Extension](https://intlayer.org/doc/vs-code-extension) |
68
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/vscode_extension.webp?raw=true" alt="Feature" width="700"> | **VSCode Extension**<br><br>Intlayer provides a VSCode extension to help you manage your content and translations, building your dictionaries, translating your content, and more. <br><br> - [VSCode Extension](https://intlayer.org/doc/vs-code-extension) |
69
69
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/interoperability.png?raw=true" alt="Feature" width="700"> | **Interoperability**<br><br>Allow interoperability with react-i18next, next-i18next, next-intl, react-intl, vue-i18n. <br><br> - [Intlayer and react-intl](https://intlayer.org/blog/intlayer-with-react-intl) <br> - [Intlayer and next-intl](https://intlayer.org/blog/intlayer-with-next-intl) <br> - [Intlayer and next-i18next](https://intlayer.org/blog/intlayer-with-next-i18next) <br> - [Intlayer and vue-i18n](https://intlayer.org/blog/intlayer-with-vue-i18n) <br> - [Intlayer compat adapters](https://intlayer.org/doc/compatibility) |
70
70
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/benchmark.png?raw=true" alt="Feature" width="700"> | **Performances & Benchmark**<br><br>Uses advanced tree-shaking and dynamic loading to boost performances and keep the solution as light as possible. <br><br> - [Performances & Benchmark](https://intlayer.org/doc/benchmark) |
71
71
 
@@ -262,7 +262,7 @@ Intlayer connects **developers**, **copywriters**, and **AI agents** in one work
262
262
  - Feature flags
263
263
  - Headless CMSs (e.g. Contentful, Strapi, Sanity)
264
264
 
265
- ![CMS Preview](https://github.com/aymericzip/intlayer/blob/main/docs/assets/CMS.png?raw=true)
265
+ ![CMS Preview](https://github.com/aymericzip/intlayer/blob/main/docs/assets/CMS.webp?raw=true)
266
266
 
267
267
  ## 🌐 Readme in other languages
268
268
 
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./exposureSink.cjs"),t=require("../../isEnabled-CuTKz0YA.js"),n=require("../client/installIntlayer.cjs");let r=require("vue");var i=t=>{let n=null,i=!1,a=!1;return Promise.resolve().then(()=>require("../../esm-DXg1m_y3.js")).then(({initAnalyticsClient:o,buildContentExposure:s})=>{if(i)return;let c=o();a=!0,t?.value&&c.setLocale(t.value),c.trackPageView({reason:`initial`}),e.setExposureSink(e=>c.trackContentExposure(s(e))),t&&(n=(0,r.watch)(t,e=>{e&&(c.setLocale(e),c.trackPageView({reason:`locale_change`}))}))}).catch(()=>{}),()=>{i=!0,n?.(),e.setExposureSink(null),Promise.resolve().then(()=>require("../../esm-DXg1m_y3.js")).then(({stopAnalyticsClient:e})=>{a&&e()}).catch(()=>{})}},a=e=>{if(process.env.INTLAYER_ANALYTICS_ENABLED===`false`||!t.t)return;if(e){let t=null;e.mixin({inject:{_intlayerClient:{from:n.INTLAYER_SYMBOL,default:null}},mounted(){if(this.$parent!==null)return;let e=this._intlayerClient;t=i(e?.locale)},unmounted(){this.$parent===null&&t?.()}});return}let a=(0,r.inject)(n.INTLAYER_SYMBOL),o=null;(0,r.onMounted)(()=>{o=i(a?.locale)}),(0,r.onUnmounted)(()=>{o?.()})};exports.useAnalytics=a;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../isEnabled-CuTKz0YA.js"),t=require("../client/installIntlayer.cjs"),n=require("./exposureSink.cjs");let r=require("vue");var i=e=>{let t=null,i=!1,a=!1;return Promise.resolve().then(()=>require("../../esm-DXg1m_y3.js")).then(({initAnalyticsClient:o,buildContentExposure:s})=>{if(i)return;let c=o();a=!0,e?.value&&c.setLocale(e.value),c.trackPageView({reason:`initial`}),n.setExposureSink(e=>c.trackContentExposure(s(e))),e&&(t=(0,r.watch)(e,e=>{e&&(c.setLocale(e),c.trackPageView({reason:`locale_change`}))}))}).catch(()=>{}),()=>{i=!0,t?.(),n.setExposureSink(null),Promise.resolve().then(()=>require("../../esm-DXg1m_y3.js")).then(({stopAnalyticsClient:e})=>{a&&e()}).catch(()=>{})}},a=n=>{if(process.env.INTLAYER_ANALYTICS_ENABLED===`false`||!e.t)return;if(n){let e=null;n.mixin({inject:{_intlayerClient:{from:t.INTLAYER_SYMBOL,default:null}},mounted(){if(this.$parent!==null)return;let t=this._intlayerClient;e=i(t?.locale)},unmounted(){this.$parent===null&&e?.()}});return}let a=(0,r.inject)(t.INTLAYER_SYMBOL),o=null;(0,r.onMounted)(()=>{o=i(a?.locale)}),(0,r.onUnmounted)(()=>{o?.()})};exports.useAnalytics=a;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("vue"),t=require("@intlayer/config/built"),n=require("@intlayer/config/client");var r=Symbol(`intlayer`),i=null,a=(r,a=!0,o)=>{if(i)return i;(0,n.setIntlayerIdentifier)();let{defaultLocale:s}=t.internationalization??{},c=(0,e.ref)(r??s),l=e=>{c.value=e},u=(0,e.ref)(o);return i={locale:(0,e.readonly)(c),setLocale:l,variant:(0,e.readonly)(u),setVariant:e=>{u.value=e},isCookieEnabled:a},i},o=(e,t)=>{let{locale:n,isCookieEnabled:i,variant:o}=t??{},s=a(n,i,o);return e.provide(r,s),process.env.INTLAYER_EDITOR_ENABLED!==`false`&&Promise.resolve().then(()=>require("../editor/useEditor.cjs")).then(({useEditor:t})=>{t(e)}).catch(()=>{}),process.env.INTLAYER_ANALYTICS_ENABLED!==`false`&&Promise.resolve().then(()=>require("../analytics/useAnalytics.cjs")).then(({useAnalytics:t})=>{t(e)}).catch(()=>{}),process.env.INTLAYER_DEVTOOLS_ENABLED!==`false`&&Promise.resolve().then(()=>require("../devtools/index.cjs")).then(({enableIntlayerDevtools:t})=>{t(e)}).catch(()=>{}),e},s={install:o};exports.INTLAYER_SYMBOL=r,exports.createIntlayerClient=a,exports.installIntlayer=o,exports.intlayer=s;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@intlayer/config/built"),t=require("vue"),n=require("@intlayer/config/client");var r=Symbol(`intlayer`),i=null,a=(r,a=!0,o)=>{if(i)return i;(0,n.setIntlayerIdentifier)();let{defaultLocale:s}=e.internationalization??{},c=(0,t.ref)(r??s),l=e=>{c.value=e},u=(0,t.ref)(o);return i={locale:(0,t.readonly)(c),setLocale:l,variant:(0,t.readonly)(u),setVariant:e=>{u.value=e},isCookieEnabled:a},i},o=(e,t)=>{let{locale:n,isCookieEnabled:i,variant:o}=t??{},s=a(n,i,o);return e.provide(r,s),process.env.INTLAYER_EDITOR_ENABLED!==`false`&&Promise.resolve().then(()=>require("../editor/useEditor.cjs")).then(({useEditor:t})=>{t(e)}).catch(()=>{}),process.env.INTLAYER_ANALYTICS_ENABLED!==`false`&&Promise.resolve().then(()=>require("../analytics/useAnalytics.cjs")).then(({useAnalytics:t})=>{t(e)}).catch(()=>{}),process.env.INTLAYER_DEVTOOLS_ENABLED!==`false`&&Promise.resolve().then(()=>require("../devtools/index.cjs")).then(({enableIntlayerDevtools:t})=>{t(e)}).catch(()=>{}),e},s={install:o};exports.INTLAYER_SYMBOL=r,exports.createIntlayerClient=a,exports.installIntlayer=o,exports.intlayer=s;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../getDictionary.cjs"),t=require("./installIntlayer.cjs");let n=require("vue"),r=require("@intlayer/config/built"),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,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??r.internationalization.defaultLocale),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,i.resolveDictionaryArgument)({localeOrSelector:e,contextLocale:m.value,contextVariant:p?.variant?.value,dictionaryKey:(0,n.toValue)(d).key});return(0,i.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
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./installIntlayer.cjs"),t=require("../getDictionary.cjs");let n=require("@intlayer/config/built"),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)(e.INTLAYER_SYMBOL):void 0,m=(0,r.isRef)(p?.locale)?p.locale:(0,r.ref)(p?.locale??n.internationalization.defaultLocale),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],([e,n,r])=>{_.value=r?t.getDictionary(e,{...r,locale:n}):t.getDictionary(e,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 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./installIntlayer.cjs"),t=require("./useDictionary.cjs");let n=require("vue"),r=require("@intlayer/config/built"),i=require("@intlayer/core/dictionaryManipulator");var a=async(a,o)=>{let s=(0,n.inject)(e.INTLAYER_SYMBOL),c=(0,n.computed)(()=>o??s?.locale?.value??r.internationalization.defaultLocale),l=(0,i.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
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./installIntlayer.cjs"),t=require("./useDictionary.cjs");let n=require("@intlayer/config/built"),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)(()=>o??s?.locale?.value??n.internationalization.defaultLocale),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 +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("vue"),i=require("@intlayer/config/built"),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,r.inject)(t.INTLAYER_SYMBOL),l=c===void 0?void 0:(0,r.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??i.internationalization.defaultLocale;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("./installIntlayer.cjs"),t=require("../getDictionary.cjs"),n=require("./useDictionaryAsync.cjs");let r=require("@intlayer/config/built"),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)(e.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??r.internationalization.defaultLocale;return(0,a.resolveQualifiedDynamicContentAsync)({loaderMap:o,key:String(s),locale:f,selector:d,transform:e=>t.getDictionary(e,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("vue"),i=require("@intlayer/config/built"),a=require("@intlayer/core/dictionaryManipulator");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??i.internationalization.defaultLocale),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,a.resolveDictionaryArgument)({localeOrSelector:e,contextLocale:l.value,contextVariant:c?.variant?.value,dictionaryKey:(0,r.toValue)(o)});return(0,a.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
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./installIntlayer.cjs"),t=require("./useDictionary.cjs"),n=require("../getIntlayer.cjs");let r=require("@intlayer/config/built"),i=require("vue"),a=require("@intlayer/core/dictionaryManipulator");var o=(o,s)=>{let c=(0,i.inject)(e.INTLAYER_SYMBOL),l=(0,i.isRef)(c?.locale)?c.locale:(0,i.ref)(c?.locale??r.internationalization.defaultLocale),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],([e,t,r])=>{f.value=r?n.getIntlayer(e,{...r,locale:t}):n.getIntlayer(e,t)},{immediate:!0,flush:`sync`});let p=new Map,m=e=>{let n=e.join(`.`);if(p.has(n))return p.get(n);let r=(0,i.computed)(()=>t.atPath(f.value,e)),a=new Proxy({},{get(n,a,o){if(typeof a==`symbol`||typeof a==`string`&&(a.startsWith(`__`)||a.startsWith(`$`)))return a===`__v_isRef`?!0:a===`then`?void 0:Reflect.get(n,a,o);if(a===`value`)return r.value??``;if(a===`c`||a===`asComponent`)return t.toComponent(()=>r.value);if(a===`$raw`)return r;if(a===Symbol.toPrimitive)return()=>String(r.value??``);let s=e.concat(a),c=t.atPath(f.value,s);if(c===void 0||t.isObjectLike(c)&&!t.isComponentLike(c))return m(s);if(t.isIntlayerNode(c))return t.createIntlayerLeafProxy((0,i.computed)(()=>t.atPath(f.value,s)));if(typeof c==`function`){let n=t.atPath(f.value,e);return n!=null&&!Object.hasOwn(n,a)?c.bind(n):(...e)=>t.atPath(f.value,s)?.(...e)}let l=(0,i.computed)(()=>t.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 n=t.atPath(f.value,e);return t.isObjectLike(n)?Reflect.ownKeys(n):[]},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return p.set(n,a),a};return m([])};exports.useIntlayer=o;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./installIntlayer.cjs"),t=require("./useLocaleStorage.cjs");let n=require("vue");var{defaultLocale:r,locales:i}=require("@intlayer/config/built").internationalization??{},a=({isCookieEnabled:a,onLocaleChange:o}={})=>{let s=(0,n.inject)(e.INTLAYER_SYMBOL);return{locale:(0,n.computed)(()=>s?.locale?.value??r),defaultLocale:r,availableLocales:i,setLocale:e=>{if(!i?.map(String).includes(e)){console.error(`Locale ${e} is not available`);return}s&&s.setLocale(e),t.setLocaleInStorage(e,a??s?.isCookieEnabled??!0),o?.(e)}}};exports.useLocale=a;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./installIntlayer.cjs"),t=require("./useLocaleStorage.cjs");let n=require("@intlayer/config/built"),r=require("vue");var{defaultLocale:i,locales:a}=n.internationalization??{},o=({isCookieEnabled:n,onLocaleChange:o}={})=>{let s=(0,r.inject)(e.INTLAYER_SYMBOL);return{locale:(0,r.computed)(()=>s?.locale?.value??i),defaultLocale:i,availableLocales:a,setLocale:e=>{if(!a?.map(String).includes(e)){console.error(`Locale ${e} is not available`);return}s&&s.setLocale(e),t.setLocaleInStorage(e,n??s?.isCookieEnabled??!0),o?.(e)}}};exports.useLocale=o;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./useLocale.cjs");let t=require("vue"),n=require("@intlayer/config/built"),r=require("@intlayer/core/localization");var i=()=>{let{locale:i}=e.useLocale(),a=n.routing?.rewrite;(0,t.watch)(i,e=>{if(typeof window>`u`||!a)return;let t=window.location.pathname,n=(0,r.getRewritePath)(t,e,a);n&&n!==t&&window.history.replaceState(window.history.state,``,n+window.location.search+window.location.hash)},{immediate:!0})};exports.useRewriteURL=i;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./useLocale.cjs");let t=require("@intlayer/config/built"),n=require("vue"),r=require("@intlayer/core/localization");var i=()=>{let{locale:i}=e.useLocale(),a=t.routing?.rewrite;(0,n.watch)(i,e=>{if(typeof window>`u`||!a)return;let t=window.location.pathname,n=(0,r.getRewritePath)(t,e,a);n&&n!==t&&window.history.replaceState(window.history.state,``,n+window.location.search+window.location.hash)},{immediate:!0})};exports.useRewriteURL=i;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./formatDictionaryForInspector.cjs");let t=require("@intlayer/dictionaries-entry"),n=require("@vue/devtools-api");var r=`intlayer`,i=`intlayer-dictionaries-inspector`,a=a=>{(0,n.setupDevtoolsPlugin)({id:r,label:`Intlayer`,packageName:`vue-intlayer`,homepage:`https://intlayer.org`,componentStateTypes:[r],app:a},n=>{n.addInspector({id:i,label:`Intlayer`,icon:`language`,treeFilterPlaceholder:`Search dictionaries`}),n.on.getInspectorTree(e=>{if(e.inspectorId!==`intlayer-dictionaries-inspector`)return;let n=(0,t.getDictionaries)(),r=Object.keys(n);e.rootNodes=r.length===0?[{id:`intlayer-no-dictionaries`,label:`No dictionaries loaded. Add an Intlayer build plugin (e.g. vite-intlayer) to generate them.`}]:r.map(e=>({id:e,label:e}))}),n.on.getInspectorState(n=>{if(n.inspectorId!==`intlayer-dictionaries-inspector`)return;let r=(0,t.getDictionaries)()[n.nodeId];if(!r){n.state={};return}let i=e.formatDictionaryForInspector(r);n.state={Translations:Object.entries(i).map(([e,t])=>({key:e,value:t,editable:!1})),Metadata:[{key:`key`,value:r.key,editable:!1},{key:`title`,value:r.title??``,editable:!1},{key:`description`,value:r.description??``,editable:!1}]}})})};exports.INTLAYER_DEVTOOLS_PLUGIN_ID=r,exports.INTLAYER_DICTIONARIES_INSPECTOR_ID=i,exports.enableIntlayerDevtools=a;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./formatDictionaryForInspector.cjs");let t=require("@intlayer/dictionaries-entry"),n=require("@vue/devtools-api");var r=`intlayer`,i=`intlayer-dictionaries-inspector`,a=n.setupDevtoolsPlugin,o=n=>{a({id:r,label:`Intlayer`,packageName:`vue-intlayer`,homepage:`https://intlayer.org`,componentStateTypes:[r],app:n},n=>{n.addInspector({id:i,label:`Intlayer`,icon:`language`,treeFilterPlaceholder:`Search dictionaries`}),n.on.getInspectorTree(e=>{if(e.inspectorId!==`intlayer-dictionaries-inspector`)return;let n=(0,t.getDictionaries)(),r=Object.keys(n);e.rootNodes=r.length===0?[{id:`intlayer-no-dictionaries`,label:`No dictionaries loaded. Add an Intlayer build plugin (e.g. vite-intlayer) to generate them.`}]:r.map(e=>({id:e,label:e}))}),n.on.getInspectorState(n=>{if(n.inspectorId!==`intlayer-dictionaries-inspector`)return;let r=(0,t.getDictionaries)()[n.nodeId];if(!r){n.state={};return}let i=e.formatDictionaryForInspector(r);n.state={Translations:Object.entries(i).map(([e,t])=>({key:e,value:t,editable:!1})),Metadata:[{key:`key`,value:r.key,editable:!1},{key:`title`,value:r.title??``,editable:!1},{key:`description`,value:r.description??``,editable:!1}]}})})};exports.INTLAYER_DEVTOOLS_PLUGIN_ID=r,exports.INTLAYER_DICTIONARIES_INSPECTOR_ID=i,exports.enableIntlayerDevtools=o;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./useUnit.cjs"),t=require("./useDate.cjs"),n=require("./useNumber.cjs"),r=require("./useRelativeTime.cjs"),i=require("./useCompact.cjs"),a=require("./useIntl.cjs"),o=require("./useList.cjs"),s=require("./usePercentage.cjs"),c=require("./useCurrency.cjs");exports.useCompact=i.useCompact,exports.useCurrency=c.useCurrency,exports.useDate=t.useDate,exports.useIntl=a.useIntl,exports.useList=o.useList,exports.useNumber=n.useNumber,exports.usePercentage=s.usePercentage,exports.useRelativeTime=r.useRelativeTime,exports.useUnit=e.useUnit;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./useCurrency.cjs"),t=require("./useUnit.cjs"),n=require("./useDate.cjs"),r=require("./useCompact.cjs"),i=require("./useIntl.cjs"),a=require("./useList.cjs"),o=require("./useNumber.cjs"),s=require("./usePercentage.cjs"),c=require("./useRelativeTime.cjs");exports.useCompact=r.useCompact,exports.useCurrency=e.useCurrency,exports.useDate=n.useDate,exports.useIntl=i.useIntl,exports.useList=a.useList,exports.useNumber=o.useNumber,exports.usePercentage=s.usePercentage,exports.useRelativeTime=c.useRelativeTime,exports.useUnit=t.useUnit;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./plugins.cjs"),t=require("./getIntlayer.cjs"),n=require("./getDictionary.cjs"),r=require("./client/installIntlayer.cjs"),i=require("./analytics/useAnalytics.cjs"),a=require("./analytics/useConversion.cjs"),o=require("./analytics/useExperiment.cjs");require("./analytics/index.cjs");const s=require("./client/useDictionary.cjs"),c=require("./client/useDictionaryAsync.cjs"),l=require("./client/useDictionaryDynamic.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("./editor/useEditor.cjs");exports.INTLAYER_SYMBOL=r.INTLAYER_SYMBOL,exports.atPath=s.atPath,exports.createIntlayerClient=r.createIntlayerClient,exports.createIntlayerLeafProxy=s.createIntlayerLeafProxy,exports.getDictionary=n.getDictionary,exports.getIntlayer=t.getIntlayer,exports.getPlugins=e.getPlugins,exports.htmlPlugin=e.htmlPlugin,exports.insertionPlugin=e.insertionPlugin,exports.installIntlayer=r.installIntlayer,exports.intlayer=r.intlayer,exports.intlayerNodePlugins=e.intlayerNodePlugins,exports.isComponentLike=s.isComponentLike,exports.isIntlayerNode=s.isIntlayerNode,exports.isObjectLike=s.isObjectLike,exports.markdownPlugin=e.markdownPlugin,exports.markdownStringPlugin=e.markdownStringPlugin,exports.toComponent=s.toComponent,exports.useAnalytics=i.useAnalytics,exports.useConversion=a.useConversion,exports.useDictionary=s.useDictionary,exports.useDictionaryAsync=c.useDictionaryAsync,exports.useDictionaryDynamic=l.useDictionaryDynamic,exports.useEditor=h.useEditor,exports.useExperiment=o.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("./plugins.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("./editor/useEditor.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=i.getPlugins,exports.htmlPlugin=i.htmlPlugin,exports.insertionPlugin=i.insertionPlugin,exports.installIntlayer=e.installIntlayer,exports.intlayer=e.intlayer,exports.intlayerNodePlugins=i.intlayerNodePlugins,exports.isComponentLike=o.isComponentLike,exports.isIntlayerNode=o.isIntlayerNode,exports.isObjectLike=o.isObjectLike,exports.markdownPlugin=i.markdownPlugin,exports.markdownStringPlugin=i.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=h.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`});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("./analytics/exposureSink.cjs"),u=require("./html/HTMLRenderer.cjs"),d=require("./markdown/installIntlayerMarkdown.cjs");let f=require("vue"),p=require("@intlayer/core/interpreter"),m=require("@intlayer/config/built"),h=require("@intlayer/core/markdown"),g=require("@intlayer/types/nodeType");g=s(g);var _=process.env.INTLAYER_EDITOR_ENABLED===`false`?null:(0,f.defineAsyncComponent)(()=>Promise.resolve().then(()=>require("./editor/ContentSelector.cjs"))),v={id:`intlayer-node-plugin`,canHandle:e=>typeof e==`bigint`||typeof e==`string`||typeof e==`number`,transform:(e,{children:t,...n})=>{process.env.INTLAYER_ANALYTICS_ENABLED!==`false`&&l.reportExposure({dictionaryKey:n.dictionaryKey,keyPath:n.keyPath,locale:n.locale,nodeType:`text`});let r=e=>c.renderIntlayerNode({...n,value:e,children:process.env.INTLAYER_EDITOR_ENABLED!==`false`&&m.editor.enabled?()=>(0,f.h)(_,{dictionaryKey:n.dictionaryKey,keyPath:n.keyPath},{default:()=>typeof e==`function`?e():e}):e}),i=r(t);if(typeof t!=`function`)return i;let a=(...e)=>{let n=t(...e);return r(n)};Object.setPrototypeOf(a,Object.getPrototypeOf(i));for(let e of Object.getOwnPropertyNames(i)){let t=Object.getOwnPropertyDescriptor(i,e);t&&Object.defineProperty(a,e,t)}for(let e of Object.getOwnPropertySymbols(i)){let t=Object.getOwnPropertyDescriptor(i,e);t&&Object.defineProperty(a,e,t)}return(0,f.markRaw)(a)}},y=(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,p.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,f.h)(f.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,f.h)(f.Fragment,null,...e)}return i.isSimple?i.parts:(0,f.h)(f.Fragment,null,i.parts)},b=process.env.INTLAYER_NODE_TYPE_INSERTION===`false`?p.fallbackPlugin:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===g.INSERTION,transform:(e,t,n)=>{let r=[...t.keyPath,{type:g.INSERTION}],i=e[g.INSERTION],a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`||(0,p.isInterpolableWrapperNode)(e),transform:(e,n,r)=>{if((0,p.isInterpolableWrapperNode)(e))return i=>(0,p.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=y(i,e);return r(a,{...n,plugins:t.plugins,children:a})}}};return n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]})}},x=process.env.INTLAYER_NODE_TYPE_MARKDOWN===`false`?p.fallbackPlugin:{id:`markdown-string-plugin`,canHandle:e=>typeof e==`string`,transform:(e,t,n)=>{let{plugins:r,...i}=t,a=n((0,h.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:[]}),o=n=>c.renderIntlayerNode({...t,value:e,children:()=>{let{renderMarkdown:t,components:r}=d.useMarkdown(),a=t(e,void 0,{...r??{},...n??{}});return process.env.INTLAYER_EDITOR_ENABLED!==`false`&&m.editor.enabled?(0,f.h)(_,{dictionaryKey:i.dictionaryKey,keyPath:i.keyPath},{default:()=>a}):a},additionalProps:{metadata:a,use:e=>o(e)}});return o()}},S=process.env.INTLAYER_NODE_TYPE_MARKDOWN===`false`?p.fallbackPlugin:{id:`markdown-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===g.MARKDOWN,transform:(e,t,n)=>{let r=[...t.keyPath,{type:g.MARKDOWN}],i=e[g.MARKDOWN];return n(i,{...t,children:i,keyPath:r,plugins:[x,...t.plugins??[]]})}},C=process.env.INTLAYER_NODE_TYPE_HTML===`false`?p.fallbackPlugin:{id:`html-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===g.HTML,transform:(e,t)=>{let n=e[g.HTML];e.tags;let r=(e={})=>{let i=u.renderHTML(n,{components:e});return c.renderIntlayerNode({...t,value:n,children:process.env.INTLAYER_EDITOR_ENABLED!==`false`&&m.editor.enabled?()=>(0,f.h)(_,{dictionaryKey:t.dictionaryKey,keyPath:t.keyPath,...e},{default:()=>i}):i,additionalProps:{use:e=>r(e)}})};return r()}},w=new Map,T=(e,t=!0)=>{let n=`${e??m.internationalization.defaultLocale}_${t}`;if(w.has(n))return w.get(n);let r=[(0,p.translationPlugin)(e??m.internationalization.defaultLocale,t?m.internationalization.defaultLocale:void 0),p.enumerationPlugin,(0,p.pluralPlugin)(e??m.internationalization.defaultLocale),p.conditionPlugin,(0,p.nestedPlugin)(e??m.internationalization.defaultLocale),p.filePlugin,p.genderPlugin,p.selectPlugin,v,b,S,C];return w.set(n,r),r};exports.getPlugins=T,exports.htmlPlugin=C,exports.insertionPlugin=b,exports.intlayerNodePlugins=v,exports.markdownPlugin=S,exports.markdownStringPlugin=x;
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("./analytics/exposureSink.cjs"),l=require("./html/HTMLRenderer.cjs"),u=require("./markdown/installIntlayerMarkdown.cjs"),d=require("./renderIntlayerNode.cjs");let f=require("@intlayer/config/built"),p=require("vue"),m=require("@intlayer/core/interpreter"),h=require("@intlayer/core/markdown"),g=require("@intlayer/types/nodeType");g=s(g);var _=process.env.INTLAYER_EDITOR_ENABLED===`false`?null:(0,p.defineAsyncComponent)(()=>Promise.resolve().then(()=>require("./editor/ContentSelector.cjs"))),v={id:`intlayer-node-plugin`,canHandle:e=>typeof e==`bigint`||typeof e==`string`||typeof e==`number`,transform:(e,{children:t,...n})=>{process.env.INTLAYER_ANALYTICS_ENABLED!==`false`&&c.reportExposure({dictionaryKey:n.dictionaryKey,keyPath:n.keyPath,locale:n.locale,nodeType:`text`});let r=e=>d.renderIntlayerNode({...n,value:e,children:process.env.INTLAYER_EDITOR_ENABLED!==`false`&&f.editor.enabled?()=>(0,p.h)(_,{dictionaryKey:n.dictionaryKey,keyPath:n.keyPath},{default:()=>typeof e==`function`?e():e}):e}),i=r(t);if(typeof t!=`function`)return i;let a=(...e)=>{let n=t(...e);return r(n)};Object.setPrototypeOf(a,Object.getPrototypeOf(i));for(let e of Object.getOwnPropertyNames(i)){let t=Object.getOwnPropertyDescriptor(i,e);t&&Object.defineProperty(a,e,t)}for(let e of Object.getOwnPropertySymbols(i)){let t=Object.getOwnPropertyDescriptor(i,e);t&&Object.defineProperty(a,e,t)}return(0,p.markRaw)(a)}},y=(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,m.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,p.h)(p.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,p.h)(p.Fragment,null,...e)}return i.isSimple?i.parts:(0,p.h)(p.Fragment,null,i.parts)},b=process.env.INTLAYER_NODE_TYPE_INSERTION===`false`?m.fallbackPlugin:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===g.INSERTION,transform:(e,t,n)=>{let r=[...t.keyPath,{type:g.INSERTION}],i=e[g.INSERTION],a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`||(0,m.isInterpolableWrapperNode)(e),transform:(e,n,r)=>{if((0,m.isInterpolableWrapperNode)(e))return i=>(0,m.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=y(i,e);return r(a,{...n,plugins:t.plugins,children:a})}}};return n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]})}},x=process.env.INTLAYER_NODE_TYPE_MARKDOWN===`false`?m.fallbackPlugin:{id:`markdown-string-plugin`,canHandle:e=>typeof e==`string`,transform:(e,t,n)=>{let{plugins:r,...i}=t,a=n((0,h.getMarkdownMetadata)(e)??{},{plugins:[{id:`markdown-metadata-plugin`,canHandle:e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`||!e,transform:(t,n)=>d.renderIntlayerNode({...n,value:t,children:e})}],dictionaryKey:i.dictionaryKey,keyPath:[]}),o=n=>d.renderIntlayerNode({...t,value:e,children:()=>{let{renderMarkdown:t,components:r}=u.useMarkdown(),a=t(e,void 0,{...r??{},...n??{}});return process.env.INTLAYER_EDITOR_ENABLED!==`false`&&f.editor.enabled?(0,p.h)(_,{dictionaryKey:i.dictionaryKey,keyPath:i.keyPath},{default:()=>a}):a},additionalProps:{metadata:a,use:e=>o(e)}});return o()}},S=process.env.INTLAYER_NODE_TYPE_MARKDOWN===`false`?m.fallbackPlugin:{id:`markdown-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===g.MARKDOWN,transform:(e,t,n)=>{let r=[...t.keyPath,{type:g.MARKDOWN}],i=e[g.MARKDOWN];return n(i,{...t,children:i,keyPath:r,plugins:[x,...t.plugins??[]]})}},C=process.env.INTLAYER_NODE_TYPE_HTML===`false`?m.fallbackPlugin:{id:`html-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===g.HTML,transform:(e,t)=>{let n=e[g.HTML];e.tags;let r=(e={})=>{let i=l.renderHTML(n,{components:e});return d.renderIntlayerNode({...t,value:n,children:process.env.INTLAYER_EDITOR_ENABLED!==`false`&&f.editor.enabled?()=>(0,p.h)(_,{dictionaryKey:t.dictionaryKey,keyPath:t.keyPath,...e},{default:()=>i}):i,additionalProps:{use:e=>r(e)}})};return r()}},w=new Map,T=(e,t=!0)=>{let n=`${e??f.internationalization.defaultLocale}_${t}`;if(w.has(n))return w.get(n);let r=[(0,m.translationPlugin)(e??f.internationalization.defaultLocale,t?f.internationalization.defaultLocale:void 0),m.enumerationPlugin,(0,m.pluralPlugin)(e??f.internationalization.defaultLocale),m.conditionPlugin,(0,m.nestedPlugin)(e??f.internationalization.defaultLocale),m.filePlugin,m.genderPlugin,m.selectPlugin,v,b,S,C];return w.set(n,r),r};exports.getPlugins=T,exports.htmlPlugin=C,exports.insertionPlugin=b,exports.intlayerNodePlugins=v,exports.markdownPlugin=S,exports.markdownStringPlugin=x;
@@ -1,42 +1,42 @@
1
- import { setExposureSink as e } from "./exposureSink.mjs";
2
- import { t } from "../../isEnabled-BbWU6Ox5.mjs";
3
- import { INTLAYER_SYMBOL as n } from "../client/installIntlayer.mjs";
1
+ import { t as e } from "../../isEnabled-BbWU6Ox5.mjs";
2
+ import { INTLAYER_SYMBOL as t } from "../client/installIntlayer.mjs";
3
+ import { setExposureSink as n } from "./exposureSink.mjs";
4
4
  import { inject as r, onMounted as i, onUnmounted as a, watch as o } from "vue";
5
5
  //#region src/analytics/useAnalytics.ts
6
- var s = (t) => {
7
- let n = null, r = !1, i = !1;
6
+ var s = (e) => {
7
+ let t = null, r = !1, i = !1;
8
8
  return import("../../esm-DZ1bEPA6.mjs").then(({ initAnalyticsClient: a, buildContentExposure: s }) => {
9
9
  if (r) return;
10
10
  let c = a();
11
- i = !0, t?.value && c.setLocale(t.value), c.trackPageView({ reason: "initial" }), e((e) => c.trackContentExposure(s(e))), t && (n = o(t, (e) => {
11
+ i = !0, e?.value && c.setLocale(e.value), c.trackPageView({ reason: "initial" }), n((e) => c.trackContentExposure(s(e))), e && (t = o(e, (e) => {
12
12
  e && (c.setLocale(e), c.trackPageView({ reason: "locale_change" }));
13
13
  }));
14
14
  }).catch(() => {}), () => {
15
- r = !0, n?.(), e(null), import("../../esm-DZ1bEPA6.mjs").then(({ stopAnalyticsClient: e }) => {
15
+ r = !0, t?.(), n(null), import("../../esm-DZ1bEPA6.mjs").then(({ stopAnalyticsClient: e }) => {
16
16
  i && e();
17
17
  }).catch(() => {});
18
18
  };
19
- }, c = (e) => {
20
- if (process.env.INTLAYER_ANALYTICS_ENABLED === "false" || !t) return;
21
- if (e) {
22
- let t = null;
23
- e.mixin({
19
+ }, c = (n) => {
20
+ if (process.env.INTLAYER_ANALYTICS_ENABLED === "false" || !e) return;
21
+ if (n) {
22
+ let e = null;
23
+ n.mixin({
24
24
  inject: { _intlayerClient: {
25
- from: n,
25
+ from: t,
26
26
  default: null
27
27
  } },
28
28
  mounted() {
29
29
  if (this.$parent !== null) return;
30
- let e = this._intlayerClient;
31
- t = s(e?.locale);
30
+ let t = this._intlayerClient;
31
+ e = s(t?.locale);
32
32
  },
33
33
  unmounted() {
34
- this.$parent === null && t?.();
34
+ this.$parent === null && e?.();
35
35
  }
36
36
  });
37
37
  return;
38
38
  }
39
- let o = r(n), c = null;
39
+ let o = r(t), c = null;
40
40
  i(() => {
41
41
  c = s(o?.locale);
42
42
  }), a(() => {
@@ -1,17 +1,17 @@
1
- import { readonly as e, ref as t } from "vue";
2
- import { internationalization as n } from "@intlayer/config/built";
1
+ import { internationalization as e } from "@intlayer/config/built";
2
+ import { readonly as t, ref as n } from "vue";
3
3
  import { setIntlayerIdentifier as r } from "@intlayer/config/client";
4
4
  //#region src/client/installIntlayer.ts
5
5
  var i = Symbol("intlayer"), a = null, o = (i, o = !0, s) => {
6
6
  if (a) return a;
7
7
  r();
8
- let { defaultLocale: c } = n ?? {}, l = t(i ?? c), u = (e) => {
8
+ let { defaultLocale: c } = e ?? {}, l = n(i ?? c), u = (e) => {
9
9
  l.value = e;
10
- }, d = t(s);
10
+ }, d = n(s);
11
11
  return a = {
12
- locale: e(l),
12
+ locale: t(l),
13
13
  setLocale: u,
14
- variant: e(d),
14
+ variant: t(d),
15
15
  setVariant: (e) => {
16
16
  d.value = e;
17
17
  },
@@ -1,15 +1,15 @@
1
- import { getDictionary as e } from "../getDictionary.mjs";
2
- import { INTLAYER_SYMBOL as t } from "./installIntlayer.mjs";
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 { internationalization as p } from "@intlayer/config/built";
1
+ import { INTLAYER_SYMBOL as e } from "./installIntlayer.mjs";
2
+ import { getDictionary as t } from "../getDictionary.mjs";
3
+ import { internationalization as n } from "@intlayer/config/built";
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
5
  import { parseDictionarySelector as m, resolveDictionaryArgument as h } from "@intlayer/core/dictionaryManipulator";
6
6
  //#region 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) => c(r({
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({
8
8
  name: "IntlayerLeaf",
9
9
  setup() {
10
10
  return () => {
11
11
  let t = e();
12
- return t == null ? null : v(t) ? a(t) : Array.isArray(t) ? a("span", t) : t;
12
+ return t == null ? null : v(t) ? o(t) : Array.isArray(t) ? o("span", t) : t;
13
13
  };
14
14
  }
15
15
  })), x = (e) => new Proxy({}, {
@@ -34,15 +34,15 @@ 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 = (r, a) => {
38
- let c = i() ? o(t) : void 0, S = s(c?.locale) ? c.locale : l(c?.locale ?? p.defaultLocale), C = n(() => {
39
- let e = a === void 0 ? void 0 : d(a);
37
+ }), S = (i, o) => {
38
+ let l = a() ? s(e) : void 0, S = c(l?.locale) ? l.locale : u(l?.locale ?? n.defaultLocale), C = r(() => {
39
+ let e = o === void 0 ? void 0 : f(o);
40
40
  if (process.env.INTLAYER_DICTIONARY_SELECTOR !== "false") {
41
41
  let t = h({
42
42
  localeOrSelector: e,
43
43
  contextLocale: S.value,
44
- contextVariant: c?.variant?.value,
45
- dictionaryKey: d(r).key
44
+ contextVariant: l?.variant?.value,
45
+ dictionaryKey: f(i).key
46
46
  });
47
47
  return m(t);
48
48
  }
@@ -50,35 +50,35 @@ var g = (e, t) => t.reduce((e, t) => e?.[t], e), _ = (e) => typeof e == "object"
50
50
  selector: void 0,
51
51
  locale: e
52
52
  };
53
- }), w = n(() => C.value.locale ?? S.value), T = u({});
54
- f([
55
- () => d(r),
53
+ }), w = r(() => C.value.locale ?? S.value), T = d({});
54
+ p([
55
+ () => f(i),
56
56
  () => w.value,
57
57
  () => C.value.selector
58
- ], ([t, n, r]) => {
59
- T.value = r ? e(t, {
58
+ ], ([e, n, r]) => {
59
+ T.value = r ? t(e, {
60
60
  ...r,
61
61
  locale: n
62
- }) : e(t, n);
62
+ }) : t(e, n);
63
63
  }, {
64
64
  immediate: !0,
65
65
  flush: "sync"
66
66
  });
67
67
  let E = (e) => new Proxy({}, {
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);
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);
75
75
  if (s === void 0 || _(s) && !v(s)) return E(o);
76
- if (y(s)) return x(n(() => g(T.value, o)));
76
+ if (y(s)) return x(r(() => 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, r) ? s.bind(t) : (...e) => g(T.value, o)?.(...e);
79
+ return t != null && !Object.hasOwn(t, n) ? s.bind(t) : (...e) => g(T.value, o)?.(...e);
80
80
  }
81
- let c = n(() => g(T.value, o));
81
+ let c = r(() => 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 { computed as n, inject as r, ref as i, watch as a } from "vue";
4
- import { internationalization as o } from "@intlayer/config/built";
3
+ import { internationalization as n } from "@intlayer/config/built";
4
+ import { computed as r, inject as i, ref as a, watch as o } from "vue";
5
5
  import { getPreloadedDictionary as s } from "@intlayer/core/dictionaryManipulator";
6
6
  //#region src/client/useDictionaryAsync.ts
7
7
  var c = async (c, l) => {
8
- let u = r(e), d = n(() => l ?? u?.locale?.value ?? o.defaultLocale), f = s(c, d.value), p = i(f ?? await c[d.value]?.());
9
- return a(() => d.value, async (e) => {
8
+ let u = i(e), d = r(() => l ?? u?.locale?.value ?? n.defaultLocale), f = s(c, d.value), p = a(f ?? await c[d.value]?.());
9
+ return o(() => d.value, async (e) => {
10
10
  let t = await c[e]?.();
11
11
  t && (p.value = t);
12
12
  }), t(p, d);
@@ -1,24 +1,24 @@
1
- import { getDictionary as e } from "../getDictionary.mjs";
2
- import { INTLAYER_SYMBOL as t } from "./installIntlayer.mjs";
1
+ import { INTLAYER_SYMBOL as e } from "./installIntlayer.mjs";
2
+ import { getDictionary as t } from "../getDictionary.mjs";
3
3
  import { useDictionaryAsync as n } from "./useDictionaryAsync.mjs";
4
- import { inject as r, toValue as i } from "vue";
5
- import { internationalization as a } from "@intlayer/config/built";
4
+ import { internationalization as r } from "@intlayer/config/built";
5
+ import { inject as i, toValue as a } from "vue";
6
6
  import { isQualifiedDynamicLoaderMap as o, parseDictionarySelector as s, resolveDictionaryArgument as c, resolveQualifiedDynamicContentAsync as l } from "@intlayer/core/dictionaryManipulator";
7
7
  //#region src/client/useDictionaryDynamic.ts
8
8
  var u = async (u, d, f) => {
9
9
  if (process.env.INTLAYER_DICTIONARY_SELECTOR !== "false" && o(u)) {
10
- let n = r(t), o = f === void 0 ? void 0 : i(f), { locale: p, selector: m } = s(c({
10
+ let n = i(e), o = f === void 0 ? void 0 : a(f), { locale: p, selector: m } = s(c({
11
11
  localeOrSelector: o ?? 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 ?? a.defaultLocale;
15
+ })), h = p ?? n?.locale?.value ?? r.defaultLocale;
16
16
  return l({
17
17
  loaderMap: u,
18
18
  key: String(d),
19
19
  locale: h,
20
20
  selector: m,
21
- transform: (t) => e(t, h)
21
+ transform: (e) => t(e, h)
22
22
  });
23
23
  }
24
24
  return n(u, f);
@@ -1,19 +1,19 @@
1
- import { getIntlayer as e } from "../getIntlayer.mjs";
2
- import { INTLAYER_SYMBOL as t } from "./installIntlayer.mjs";
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 { 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 { internationalization as h } from "@intlayer/config/built";
1
+ import { INTLAYER_SYMBOL as e } from "./installIntlayer.mjs";
2
+ import { atPath as t, createIntlayerLeafProxy as n, isComponentLike as r, isIntlayerNode as i, isObjectLike as a, toComponent as o } from "./useDictionary.mjs";
3
+ import { getIntlayer as s } from "../getIntlayer.mjs";
4
+ import { internationalization as c } from "@intlayer/config/built";
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
6
  import { parseDictionarySelector as g, resolveDictionaryArgument as _ } from "@intlayer/core/dictionaryManipulator";
7
7
  //#region src/client/useIntlayer.ts
8
8
  var v = (v, y) => {
9
- let b = l(t), x = u(b?.locale) ? b.locale : d(b?.locale ?? h.defaultLocale), S = c(() => {
10
- let e = y === void 0 ? void 0 : p(y);
9
+ let b = u(e), x = d(b?.locale) ? b.locale : f(b?.locale ?? c.defaultLocale), S = l(() => {
10
+ let e = y === void 0 ? void 0 : m(y);
11
11
  if (process.env.INTLAYER_DICTIONARY_SELECTOR !== "false") {
12
12
  let t = _({
13
13
  localeOrSelector: e,
14
14
  contextLocale: x.value,
15
15
  contextVariant: b?.variant?.value,
16
- dictionaryKey: p(v)
16
+ dictionaryKey: m(v)
17
17
  });
18
18
  return g(t);
19
19
  }
@@ -21,45 +21,45 @@ var v = (v, y) => {
21
21
  selector: void 0,
22
22
  locale: e
23
23
  };
24
- }), C = c(() => S.value.locale ?? x.value), w = f({});
25
- m([
26
- () => p(v),
24
+ }), C = l(() => S.value.locale ?? x.value), w = p({});
25
+ h([
26
+ () => m(v),
27
27
  () => C.value,
28
28
  () => S.value.selector
29
- ], ([t, n, r]) => {
30
- w.value = r ? e(t, {
31
- ...r,
32
- locale: n
33
- }) : e(t, n);
29
+ ], ([e, t, n]) => {
30
+ w.value = n ? s(e, {
31
+ ...n,
32
+ locale: t
33
+ }) : s(e, t);
34
34
  }, {
35
35
  immediate: !0,
36
36
  flush: "sync"
37
37
  });
38
38
  let T = /* @__PURE__ */ new Map(), E = (e) => {
39
- let t = e.join(".");
40
- if (T.has(t)) return T.get(t);
41
- let l = c(() => n(w.value, e)), u = new Proxy({}, {
42
- get(t, u, d) {
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 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
- let f = e.concat(u), p = n(w.value, f);
49
- if (p === void 0 || o(p) && !i(p)) return E(f);
50
- if (a(p)) return r(c(() => n(w.value, f)));
39
+ let s = e.join(".");
40
+ if (T.has(s)) return T.get(s);
41
+ let c = l(() => t(w.value, e)), u = new Proxy({}, {
42
+ get(s, u, d) {
43
+ if (typeof u == "symbol" || typeof u == "string" && (u.startsWith("__") || u.startsWith("$"))) return u === "__v_isRef" ? !0 : u === "then" ? void 0 : Reflect.get(s, u, d);
44
+ if (u === "value") return c.value ?? "";
45
+ if (u === "c" || u === "asComponent") return o(() => c.value);
46
+ if (u === "$raw") return c;
47
+ if (u === Symbol.toPrimitive) return () => String(c.value ?? "");
48
+ let f = e.concat(u), p = t(w.value, f);
49
+ if (p === void 0 || a(p) && !r(p)) return E(f);
50
+ if (i(p)) return n(l(() => t(w.value, f)));
51
51
  if (typeof p == "function") {
52
- let t = n(w.value, e);
53
- return t != null && !Object.hasOwn(t, u) ? p.bind(t) : (...e) => n(w.value, f)?.(...e);
52
+ let n = t(w.value, e);
53
+ return n != null && !Object.hasOwn(n, u) ? p.bind(n) : (...e) => t(w.value, f)?.(...e);
54
54
  }
55
- let m = c(() => n(w.value, f));
55
+ let m = l(() => t(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
  } });
59
59
  },
60
60
  ownKeys() {
61
- let t = n(w.value, e);
62
- return o(t) ? Reflect.ownKeys(t) : [];
61
+ let n = t(w.value, e);
62
+ return a(n) ? Reflect.ownKeys(n) : [];
63
63
  },
64
64
  getOwnPropertyDescriptor() {
65
65
  return {
@@ -68,7 +68,7 @@ var v = (v, y) => {
68
68
  };
69
69
  }
70
70
  });
71
- return T.set(t, u), u;
71
+ return T.set(s, u), u;
72
72
  };
73
73
  return E([]);
74
74
  };
@@ -1,12 +1,12 @@
1
1
  import { INTLAYER_SYMBOL as e } from "./installIntlayer.mjs";
2
2
  import { setLocaleInStorage as t } from "./useLocaleStorage.mjs";
3
- import { computed as n, inject as r } from "vue";
4
- import { internationalization as i } from "@intlayer/config/built";
3
+ import { internationalization as n } from "@intlayer/config/built";
4
+ import { computed as r, inject as i } from "vue";
5
5
  //#region src/client/useLocale.ts
6
- var { defaultLocale: a, locales: o } = i ?? {}, s = ({ isCookieEnabled: i, onLocaleChange: s } = {}) => {
7
- let c = r(e);
6
+ var { defaultLocale: a, locales: o } = n ?? {}, s = ({ isCookieEnabled: n, onLocaleChange: s } = {}) => {
7
+ let c = i(e);
8
8
  return {
9
- locale: n(() => c?.locale?.value ?? a),
9
+ locale: r(() => c?.locale?.value ?? a),
10
10
  defaultLocale: a,
11
11
  availableLocales: o,
12
12
  setLocale: (e) => {
@@ -14,7 +14,7 @@ var { defaultLocale: a, locales: o } = i ?? {}, s = ({ isCookieEnabled: i, onLoc
14
14
  console.error(`Locale ${e} is not available`);
15
15
  return;
16
16
  }
17
- c && c.setLocale(e), t(e, i ?? c?.isCookieEnabled ?? !0), s?.(e);
17
+ c && c.setLocale(e), t(e, n ?? c?.isCookieEnabled ?? !0), s?.(e);
18
18
  }
19
19
  };
20
20
  };
@@ -1,11 +1,11 @@
1
1
  import { useLocale as e } from "./useLocale.mjs";
2
- import { watch as t } from "vue";
3
- import { routing as n } from "@intlayer/config/built";
2
+ import { routing as t } from "@intlayer/config/built";
3
+ import { watch as n } from "vue";
4
4
  import { getRewritePath as r } from "@intlayer/core/localization";
5
5
  //#region src/client/useRewriteURL.ts
6
6
  var i = () => {
7
- let { locale: i } = e(), a = n?.rewrite;
8
- t(i, (e) => {
7
+ let { locale: i } = e(), a = t?.rewrite;
8
+ n(i, (e) => {
9
9
  if (typeof window > "u" || !a) return;
10
10
  let t = window.location.pathname, n = r(t, e, a);
11
11
  n && n !== t && window.history.replaceState(window.history.state, "", n + window.location.search + window.location.hash);
@@ -2,14 +2,14 @@ import { formatDictionaryForInspector as e } from "./formatDictionaryForInspecto
2
2
  import { getDictionaries as t } from "@intlayer/dictionaries-entry";
3
3
  import { setupDevtoolsPlugin as n } from "@vue/devtools-api";
4
4
  //#region src/devtools/index.ts
5
- var r = "intlayer", i = "intlayer-dictionaries-inspector", a = (a) => {
6
- n({
5
+ var r = "intlayer", i = "intlayer-dictionaries-inspector", a = n, o = (n) => {
6
+ a({
7
7
  id: r,
8
8
  label: "Intlayer",
9
9
  packageName: "vue-intlayer",
10
10
  homepage: "https://intlayer.org",
11
11
  componentStateTypes: [r],
12
- app: a
12
+ app: n
13
13
  }, (n) => {
14
14
  n.addInspector({
15
15
  id: i,
@@ -62,4 +62,4 @@ var r = "intlayer", i = "intlayer-dictionaries-inspector", a = (a) => {
62
62
  });
63
63
  };
64
64
  //#endregion
65
- export { r as INTLAYER_DEVTOOLS_PLUGIN_ID, i as INTLAYER_DICTIONARIES_INSPECTOR_ID, a as enableIntlayerDevtools };
65
+ export { r as INTLAYER_DEVTOOLS_PLUGIN_ID, i as INTLAYER_DICTIONARIES_INSPECTOR_ID, o as enableIntlayerDevtools };
@@ -1,10 +1,10 @@
1
- import { useUnit as e } from "./useUnit.mjs";
2
- import { useDate as t } from "./useDate.mjs";
3
- import { useNumber as n } from "./useNumber.mjs";
4
- import { useRelativeTime as r } from "./useRelativeTime.mjs";
5
- import { useCompact as i } from "./useCompact.mjs";
6
- import { useIntl as a } from "./useIntl.mjs";
7
- import { useList as o } from "./useList.mjs";
1
+ import { useCurrency as e } from "./useCurrency.mjs";
2
+ import { useUnit as t } from "./useUnit.mjs";
3
+ import { useDate as n } from "./useDate.mjs";
4
+ import { useCompact as r } from "./useCompact.mjs";
5
+ import { useIntl as i } from "./useIntl.mjs";
6
+ import { useList as a } from "./useList.mjs";
7
+ import { useNumber as o } from "./useNumber.mjs";
8
8
  import { usePercentage as s } from "./usePercentage.mjs";
9
- import { useCurrency as c } from "./useCurrency.mjs";
10
- export { i as useCompact, c as useCurrency, t as useDate, a as useIntl, o as useList, n as useNumber, s as usePercentage, r as useRelativeTime, e as useUnit };
9
+ import { useRelativeTime as c } from "./useRelativeTime.mjs";
10
+ export { r as useCompact, e as useCurrency, n as useDate, i as useIntl, a as useList, o as useNumber, s as usePercentage, c as useRelativeTime, t as useUnit };
@@ -1,14 +1,14 @@
1
- import { getPlugins as e, htmlPlugin as t, insertionPlugin as n, intlayerNodePlugins as r, markdownPlugin as i, markdownStringPlugin as a } from "./plugins.mjs";
2
- import { getIntlayer as o } from "./getIntlayer.mjs";
3
- import { getDictionary as s } from "./getDictionary.mjs";
4
- import { INTLAYER_SYMBOL as c, createIntlayerClient as l, installIntlayer as u, intlayer as d } from "./client/installIntlayer.mjs";
5
- import { useAnalytics as f } from "./analytics/useAnalytics.mjs";
6
- import { useConversion as p } from "./analytics/useConversion.mjs";
7
- import { useExperiment as m } 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";
8
5
  import "./analytics/index.mjs";
9
- import { atPath as h, createIntlayerLeafProxy as g, isComponentLike as _, isIntlayerNode as v, isObjectLike as y, toComponent as b, useDictionary as x } from "./client/useDictionary.mjs";
10
- import { useDictionaryAsync as S } from "./client/useDictionaryAsync.mjs";
11
- import { useDictionaryDynamic as C } from "./client/useDictionaryDynamic.mjs";
6
+ import { getPlugins as s, htmlPlugin as c, insertionPlugin as l, intlayerNodePlugins as u, markdownPlugin as d, markdownStringPlugin as f } from "./plugins.mjs";
7
+ import { getDictionary as p } from "./getDictionary.mjs";
8
+ import { atPath as m, createIntlayerLeafProxy as h, isComponentLike as g, isIntlayerNode as _, isObjectLike as v, toComponent as y, useDictionary as b } from "./client/useDictionary.mjs";
9
+ import { useDictionaryAsync as x } from "./client/useDictionaryAsync.mjs";
10
+ import { useDictionaryDynamic as S } from "./client/useDictionaryDynamic.mjs";
11
+ import { getIntlayer as C } from "./getIntlayer.mjs";
12
12
  import { useIntlayer as w } from "./client/useIntlayer.mjs";
13
13
  import { useLoadDynamic as T } from "./client/useLoadDynamic.mjs";
14
14
  import { useLocale as E } from "./client/useLocale.mjs";
@@ -16,4 +16,4 @@ import { usePathname as D } from "./client/usePathname.mjs";
16
16
  import { useRewriteURL as O } from "./client/useRewriteURL.mjs";
17
17
  import "./client/index.mjs";
18
18
  import { useEditor as k } from "./editor/useEditor.mjs";
19
- export { c as INTLAYER_SYMBOL, h as atPath, l as createIntlayerClient, g as createIntlayerLeafProxy, s as getDictionary, o as getIntlayer, e as getPlugins, t as htmlPlugin, n as insertionPlugin, u as installIntlayer, d as intlayer, r as intlayerNodePlugins, _ as isComponentLike, v as isIntlayerNode, y as isObjectLike, i as markdownPlugin, a as markdownStringPlugin, b as toComponent, f as useAnalytics, p as useConversion, x as useDictionary, S as useDictionaryAsync, C as useDictionaryDynamic, k as useEditor, m as useExperiment, w as useIntlayer, T as useLoadDynamic, E as useLocale, D as usePathname, O as useRewriteURL };
19
+ export { e as INTLAYER_SYMBOL, m as atPath, t as createIntlayerClient, h as createIntlayerLeafProxy, p as getDictionary, C as getIntlayer, s as getPlugins, c as htmlPlugin, l as insertionPlugin, n as installIntlayer, r as intlayer, u as intlayerNodePlugins, g as isComponentLike, _ as isIntlayerNode, v as isObjectLike, d as markdownPlugin, f as markdownStringPlugin, y as toComponent, i as useAnalytics, a as useConversion, b as useDictionary, x as useDictionaryAsync, S as useDictionaryDynamic, k as useEditor, o as useExperiment, w as useIntlayer, T as useLoadDynamic, E as useLocale, D as usePathname, O as useRewriteURL };
@@ -1,62 +1,62 @@
1
- import { renderIntlayerNode as e } from "./renderIntlayerNode.mjs";
2
- import { reportExposure as t } from "./analytics/exposureSink.mjs";
3
- import { renderHTML as n } from "./html/HTMLRenderer.mjs";
4
- import { useMarkdown as r } from "./markdown/installIntlayerMarkdown.mjs";
5
- import { Fragment as i, defineAsyncComponent as a, h as o, markRaw as s } from "vue";
6
- import { conditionPlugin as c, enumerationPlugin as l, fallbackPlugin as u, filePlugin as d, genderPlugin as f, isInterpolableWrapperNode as p, nestedPlugin as m, pluralPlugin as h, selectPlugin as g, splitInsertionTemplate as _, transformInterpolableNode as v, translationPlugin as y } from "@intlayer/core/interpreter";
7
- import { editor as b, internationalization as x } from "@intlayer/config/built";
1
+ import { reportExposure as e } from "./analytics/exposureSink.mjs";
2
+ import { renderHTML as t } from "./html/HTMLRenderer.mjs";
3
+ import { useMarkdown as n } from "./markdown/installIntlayerMarkdown.mjs";
4
+ import { renderIntlayerNode as r } from "./renderIntlayerNode.mjs";
5
+ import { editor as i, internationalization as a } from "@intlayer/config/built";
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 _, selectPlugin as v, splitInsertionTemplate as y, transformInterpolableNode as b, translationPlugin as x } from "@intlayer/core/interpreter";
8
8
  import { getMarkdownMetadata as S } from "@intlayer/core/markdown";
9
9
  import * as C from "@intlayer/types/nodeType";
10
10
  //#region src/plugins.ts
11
- var w = process.env.INTLAYER_EDITOR_ENABLED === "false" ? null : a(() => import("./editor/ContentSelector.mjs")), T = {
11
+ var w = process.env.INTLAYER_EDITOR_ENABLED === "false" ? null : s(() => import("./editor/ContentSelector.mjs")), T = {
12
12
  id: "intlayer-node-plugin",
13
13
  canHandle: (e) => typeof e == "bigint" || typeof e == "string" || typeof e == "number",
14
- transform: (n, { children: r, ...i }) => {
15
- process.env.INTLAYER_ANALYTICS_ENABLED !== "false" && t({
16
- dictionaryKey: i.dictionaryKey,
17
- keyPath: i.keyPath,
18
- locale: i.locale,
14
+ transform: (t, { children: n, ...a }) => {
15
+ process.env.INTLAYER_ANALYTICS_ENABLED !== "false" && e({
16
+ dictionaryKey: a.dictionaryKey,
17
+ keyPath: a.keyPath,
18
+ locale: a.locale,
19
19
  nodeType: "text"
20
20
  });
21
- let a = (t) => e({
22
- ...i,
23
- value: t,
24
- children: process.env.INTLAYER_EDITOR_ENABLED !== "false" && b.enabled ? () => o(w, {
25
- dictionaryKey: i.dictionaryKey,
26
- keyPath: i.keyPath
27
- }, { default: () => typeof t == "function" ? t() : t }) : t
28
- }), c = a(r);
29
- if (typeof r != "function") return c;
30
- let l = (...e) => {
31
- let t = r(...e);
32
- return a(t);
21
+ let o = (e) => r({
22
+ ...a,
23
+ value: e,
24
+ children: process.env.INTLAYER_EDITOR_ENABLED !== "false" && i.enabled ? () => c(w, {
25
+ dictionaryKey: a.dictionaryKey,
26
+ keyPath: a.keyPath
27
+ }, { default: () => typeof e == "function" ? e() : e }) : e
28
+ }), s = o(n);
29
+ if (typeof n != "function") return s;
30
+ let u = (...e) => {
31
+ let t = n(...e);
32
+ return o(t);
33
33
  };
34
- Object.setPrototypeOf(l, Object.getPrototypeOf(c));
35
- for (let e of Object.getOwnPropertyNames(c)) {
36
- let t = Object.getOwnPropertyDescriptor(c, e);
37
- t && Object.defineProperty(l, e, t);
34
+ Object.setPrototypeOf(u, Object.getPrototypeOf(s));
35
+ for (let e of Object.getOwnPropertyNames(s)) {
36
+ let t = Object.getOwnPropertyDescriptor(s, e);
37
+ t && Object.defineProperty(u, e, t);
38
38
  }
39
- for (let e of Object.getOwnPropertySymbols(c)) {
40
- let t = Object.getOwnPropertyDescriptor(c, e);
41
- t && Object.defineProperty(l, e, t);
39
+ for (let e of Object.getOwnPropertySymbols(s)) {
40
+ let t = Object.getOwnPropertyDescriptor(s, e);
41
+ t && Object.defineProperty(u, e, t);
42
42
  }
43
- return s(l);
43
+ return l(u);
44
44
  }
45
45
  }, E = (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 a = _(e, r);
48
+ let i = y(e, r);
49
49
  if (n.size > 0) {
50
50
  let e = [];
51
- if (a.isSimple) {
52
- let t = a.parts, r = 0;
51
+ if (i.isSimple) {
52
+ let t = i.parts, r = 0;
53
53
  for (let [i] of n) {
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)), o(i, null, ...e);
57
+ return r < t.length && e.push(t.substring(r)), c(o, null, ...e);
58
58
  }
59
- return a.parts.forEach((t) => {
59
+ return i.parts.forEach((t) => {
60
60
  if (typeof t == "string") {
61
61
  let r = t;
62
62
  for (let [t] of n) {
@@ -65,18 +65,18 @@ var w = process.env.INTLAYER_EDITOR_ENABLED === "false" ? null : a(() => import(
65
65
  }
66
66
  r.length > 0 && e.push(r);
67
67
  } else e.push(t);
68
- }), o(i, null, ...e);
68
+ }), c(o, null, ...e);
69
69
  }
70
- return a.isSimple ? a.parts : o(i, null, a.parts);
71
- }, D = process.env.INTLAYER_NODE_TYPE_INSERTION === "false" ? u : {
70
+ return i.isSimple ? i.parts : c(o, null, i.parts);
71
+ }, D = process.env.INTLAYER_NODE_TYPE_INSERTION === "false" ? f : {
72
72
  id: "insertion-plugin",
73
73
  canHandle: (e) => typeof e == "object" && e?.nodeType === C.INSERTION,
74
74
  transform: (e, t, n) => {
75
75
  let r = [...t.keyPath, { type: C.INSERTION }], i = e[C.INSERTION], a = {
76
76
  id: "insertion-string-plugin",
77
- canHandle: (e) => typeof e == "string" || p(e),
77
+ canHandle: (e) => typeof e == "string" || h(e),
78
78
  transform: (e, n, r) => {
79
- if (p(e)) return (i) => v(e, i, n, t.plugins, r);
79
+ if (h(e)) return (i) => b(e, i, n, t.plugins, r);
80
80
  let i = r(e, {
81
81
  ...n,
82
82
  children: e,
@@ -99,43 +99,43 @@ var w = process.env.INTLAYER_EDITOR_ENABLED === "false" ? null : a(() => import(
99
99
  plugins: [a, ...t.plugins ?? []]
100
100
  });
101
101
  }
102
- }, O = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? u : {
102
+ }, O = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? f : {
103
103
  id: "markdown-string-plugin",
104
104
  canHandle: (e) => typeof e == "string",
105
- transform: (t, n, i) => {
106
- let { plugins: a, ...s } = n, c = i(S(t) ?? {}, {
105
+ transform: (e, t, a) => {
106
+ let { plugins: o, ...s } = t, l = a(S(e) ?? {}, {
107
107
  plugins: [{
108
108
  id: "markdown-metadata-plugin",
109
109
  canHandle: (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || !e,
110
- transform: (n, r) => e({
111
- ...r,
112
- value: n,
113
- children: t
110
+ transform: (t, n) => r({
111
+ ...n,
112
+ value: t,
113
+ children: e
114
114
  })
115
115
  }],
116
116
  dictionaryKey: s.dictionaryKey,
117
117
  keyPath: []
118
- }), l = (i) => e({
119
- ...n,
120
- value: t,
118
+ }), u = (a) => r({
119
+ ...t,
120
+ value: e,
121
121
  children: () => {
122
- let { renderMarkdown: e, components: n } = r(), a = e(t, void 0, {
123
- ...n ?? {},
124
- ...i ?? {}
122
+ let { renderMarkdown: t, components: r } = n(), o = t(e, void 0, {
123
+ ...r ?? {},
124
+ ...a ?? {}
125
125
  });
126
- return process.env.INTLAYER_EDITOR_ENABLED !== "false" && b.enabled ? o(w, {
126
+ return process.env.INTLAYER_EDITOR_ENABLED !== "false" && i.enabled ? c(w, {
127
127
  dictionaryKey: s.dictionaryKey,
128
128
  keyPath: s.keyPath
129
- }, { default: () => a }) : a;
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
- }, k = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? u : {
138
+ }, k = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? f : {
139
139
  id: "markdown-plugin",
140
140
  canHandle: (e) => typeof e == "object" && e?.nodeType === C.MARKDOWN,
141
141
  transform: (e, t, n) => {
@@ -147,39 +147,39 @@ var w = process.env.INTLAYER_EDITOR_ENABLED === "false" ? null : a(() => import(
147
147
  plugins: [O, ...t.plugins ?? []]
148
148
  });
149
149
  }
150
- }, A = process.env.INTLAYER_NODE_TYPE_HTML === "false" ? u : {
150
+ }, A = process.env.INTLAYER_NODE_TYPE_HTML === "false" ? f : {
151
151
  id: "html-plugin",
152
152
  canHandle: (e) => typeof e == "object" && e?.nodeType === C.HTML,
153
- transform: (t, r) => {
154
- let i = t[C.HTML];
155
- t.tags;
156
- let a = (t = {}) => {
157
- let s = n(i, { components: t });
158
- return e({
159
- ...r,
160
- value: i,
161
- children: process.env.INTLAYER_EDITOR_ENABLED !== "false" && b.enabled ? () => o(w, {
162
- dictionaryKey: r.dictionaryKey,
163
- keyPath: r.keyPath,
164
- ...t
153
+ transform: (e, n) => {
154
+ let a = e[C.HTML];
155
+ e.tags;
156
+ let o = (e = {}) => {
157
+ let s = t(a, { components: e });
158
+ return r({
159
+ ...n,
160
+ value: a,
161
+ children: process.env.INTLAYER_EDITOR_ENABLED !== "false" && i.enabled ? () => c(w, {
162
+ dictionaryKey: n.dictionaryKey,
163
+ keyPath: n.keyPath,
164
+ ...e
165
165
  }, { default: () => s }) : s,
166
- additionalProps: { use: (e) => a(e) }
166
+ additionalProps: { use: (e) => o(e) }
167
167
  });
168
168
  };
169
- return a();
169
+ return o();
170
170
  }
171
171
  }, j = /* @__PURE__ */ new Map(), M = (e, t = !0) => {
172
- let n = `${e ?? x.defaultLocale}_${t}`;
172
+ let n = `${e ?? a.defaultLocale}_${t}`;
173
173
  if (j.has(n)) return j.get(n);
174
174
  let r = [
175
- y(e ?? x.defaultLocale, t ? x.defaultLocale : void 0),
176
- l,
177
- h(e ?? x.defaultLocale),
178
- c,
179
- m(e ?? x.defaultLocale),
175
+ x(e ?? a.defaultLocale, t ? a.defaultLocale : void 0),
180
176
  d,
181
- f,
182
- g,
177
+ _(e ?? a.defaultLocale),
178
+ u,
179
+ g(e ?? a.defaultLocale),
180
+ p,
181
+ m,
182
+ v,
183
183
  T,
184
184
  D,
185
185
  k,
@@ -2,13 +2,13 @@ import { LocalesValues } from '@intlayer/types/module_augmentation';
2
2
  /**
3
3
  * Get the locale cookie
4
4
  */
5
- export declare const localeInStorage: import('@intlayer/types').Locale | undefined;
5
+ export declare const localeInStorage: import('intlayer').Locale | undefined;
6
6
  /**
7
7
  * @deprecated Use localeInStorage instead
8
8
  *
9
9
  * Get the locale cookie
10
10
  */
11
- export declare const localeCookie: import('@intlayer/types').Locale | undefined;
11
+ export declare const localeCookie: import('intlayer').Locale | undefined;
12
12
  /**
13
13
  * Set the locale cookie
14
14
  */
@@ -23,7 +23,7 @@ export declare const setLocaleCookie: (locale: LocalesValues, isCookieEnabled: b
23
23
  * Composable that provides the locale storage and a function to set it
24
24
  */
25
25
  export declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
26
- localeStorage: import('vue').ComputedRef<import('@intlayer/types').Locale>;
26
+ localeStorage: import('vue').ComputedRef<import('intlayer').Locale>;
27
27
  setLocaleStorage: (locale: LocalesValues) => void;
28
28
  };
29
29
  /**
@@ -34,6 +34,6 @@ export declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
34
34
  * Composable that provides the locale cookie and a function to set it
35
35
  */
36
36
  export declare const useLocaleCookie: (isCookieEnabled?: boolean) => {
37
- localeStorage: import('vue').ComputedRef<import('@intlayer/types').Locale>;
37
+ localeStorage: import('vue').ComputedRef<import('intlayer').Locale>;
38
38
  setLocaleStorage: (locale: LocalesValues) => void;
39
39
  };
@@ -9,5 +9,5 @@
9
9
  * ```
10
10
  */
11
11
  export declare const useCompact: () => import('vue').ComputedRef<(value: string | number, options?: (Intl.NumberFormatOptions & {
12
- locale?: import('@intlayer/types').LocalesValues;
12
+ locale?: import('intlayer').LocalesValues;
13
13
  }) | undefined) => string>;
@@ -20,5 +20,5 @@
20
20
  * ```
21
21
  */
22
22
  export declare const useCurrency: () => import('vue').ComputedRef<(value: string | number, options?: (Intl.NumberFormatOptions & {
23
- locale?: import('@intlayer/types').LocalesValues;
23
+ locale?: import('intlayer').LocalesValues;
24
24
  }) | undefined) => string>;
@@ -18,5 +18,5 @@
18
18
  * ```
19
19
  */
20
20
  export declare const useDate: () => import('vue').ComputedRef<(date: string | number | Date, options?: (Intl.DateTimeFormatOptions & {
21
- locale?: import('@intlayer/types').LocalesValues;
21
+ locale?: import('intlayer').LocalesValues;
22
22
  }) | import('@intlayer/core/formatters').DateTimePreset | undefined) => string>;
@@ -17,5 +17,5 @@
17
17
  * ```
18
18
  */
19
19
  export declare const useList: () => import('vue').ComputedRef<(values: (string | number)[], options?: (import('@intlayer/core/formatters').ListFormatOptions & {
20
- locale?: import('@intlayer/types').LocalesValues;
20
+ locale?: import('intlayer').LocalesValues;
21
21
  }) | undefined) => string>;
@@ -18,5 +18,5 @@
18
18
  * ```
19
19
  */
20
20
  export declare const useNumber: () => import('vue').ComputedRef<(value: string | number, args_1?: (Intl.NumberFormatOptions & {
21
- locale?: import('@intlayer/types').LocalesValues;
21
+ locale?: import('intlayer').LocalesValues;
22
22
  }) | undefined) => string>;
@@ -12,5 +12,5 @@
12
12
  * ```
13
13
  */
14
14
  export declare const usePercentage: () => import('vue').ComputedRef<(value: string | number, args_1?: (Intl.NumberFormatOptions & {
15
- locale?: import('@intlayer/types').LocalesValues;
15
+ locale?: import('intlayer').LocalesValues;
16
16
  }) | undefined) => string>;
@@ -15,6 +15,6 @@
15
15
  * ```
16
16
  */
17
17
  export declare const useRelativeTime: () => import('vue').ComputedRef<(from: string | number | Date, to?: string | number | Date | undefined, options?: (Intl.RelativeTimeFormatOptions & {
18
- locale?: import('@intlayer/types').LocalesValues;
18
+ locale?: import('intlayer').LocalesValues;
19
19
  unit?: Intl.RelativeTimeFormatUnit;
20
20
  }) | undefined) => string>;
@@ -14,5 +14,5 @@
14
14
  * ```
15
15
  */
16
16
  export declare const useUnit: () => import('vue').ComputedRef<(value: string | number, options?: (Intl.NumberFormatOptions & {
17
- locale?: import('@intlayer/types').LocalesValues;
17
+ locale?: import('intlayer').LocalesValues;
18
18
  }) | undefined) => string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-intlayer",
3
- "version": "9.5.3",
3
+ "version": "9.5.4-canary.0",
4
4
  "private": false,
5
5
  "description": "Easily internationalize i18n your Vue applications with type-safe multilingual content management.",
6
6
  "keywords": [
@@ -96,18 +96,19 @@
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",
99
+ "publish:ci": "bun ../../scripts/publish-package.mjs",
99
100
  "publish:latest": "bun publish --access public --tag latest || true",
100
101
  "test": "bun --bun vitest run",
101
102
  "test:watch": "bun --bun vitest",
102
103
  "typecheck": "vue-tsc --noEmit --project tsconfig.types.json"
103
104
  },
104
105
  "dependencies": {
105
- "@intlayer/api": "9.5.3",
106
- "@intlayer/config": "9.5.3",
107
- "@intlayer/core": "9.5.3",
108
- "@intlayer/dictionaries-entry": "9.5.3",
109
- "@intlayer/editor": "9.5.3",
110
- "@intlayer/types": "9.5.3",
106
+ "@intlayer/api": "9.5.4-canary.0",
107
+ "@intlayer/config": "9.5.4-canary.0",
108
+ "@intlayer/core": "9.5.4-canary.0",
109
+ "@intlayer/dictionaries-entry": "9.5.4-canary.0",
110
+ "@intlayer/editor": "9.5.4-canary.0",
111
+ "@intlayer/types": "9.5.4-canary.0",
111
112
  "@vue/devtools-api": "^6.6.4"
112
113
  },
113
114
  "devDependencies": {
@@ -123,11 +124,11 @@
123
124
  "typescript": "7.0.2",
124
125
  "vite": "8.3.0",
125
126
  "vite-plugin-dts": "5.1.0",
126
- "vitest": "5.0.0",
127
+ "vitest": "5.0.1",
127
128
  "vue-tsc": "3.3.9"
128
129
  },
129
130
  "peerDependencies": {
130
- "intlayer": "9.5.3",
131
+ "intlayer": "9.5.4-canary.0",
131
132
  "vue": ">=3.0.0"
132
133
  },
133
134
  "peerDependenciesMeta": {
@@ -136,7 +137,7 @@
136
137
  }
137
138
  },
138
139
  "optionalDependencies": {
139
- "@intlayer/analytics": "9.5.3"
140
+ "@intlayer/analytics": "9.5.4-canary.0"
140
141
  },
141
142
  "engines": {
142
143
  "node": ">=14.18"