vue-intlayer 8.4.0 → 8.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/client/index.cjs +1 -1
- package/dist/cjs/client/installIntlayer.cjs +1 -1
- package/dist/cjs/client/useDictionary.cjs +1 -1
- package/dist/cjs/client/useDictionaryAsync.cjs +1 -1
- package/dist/cjs/client/useIntlayer.cjs +1 -1
- package/dist/cjs/client/useLocale.cjs +1 -1
- package/dist/cjs/editor/useEditor.cjs +1 -1
- package/dist/cjs/format/useCompact.cjs +1 -1
- package/dist/cjs/format/useCurrency.cjs +1 -1
- package/dist/cjs/format/useDate.cjs +1 -1
- package/dist/cjs/format/useIntl.cjs +1 -1
- package/dist/cjs/format/useList.cjs +1 -1
- package/dist/cjs/format/useNumber.cjs +1 -1
- package/dist/cjs/format/usePercentage.cjs +1 -1
- package/dist/cjs/format/useRelativeTime.cjs +1 -1
- package/dist/cjs/format/useUnit.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/installIntlayer.mjs +1 -1
- package/dist/esm/client/useDictionary.mjs +1 -1
- package/dist/esm/client/useDictionaryAsync.mjs +1 -1
- package/dist/esm/client/useIntlayer.mjs +1 -1
- package/dist/esm/client/useLocale.mjs +1 -1
- package/dist/esm/editor/useEditor.mjs +1 -1
- package/dist/esm/format/useCompact.mjs +1 -1
- package/dist/esm/format/useCurrency.mjs +1 -1
- package/dist/esm/format/useDate.mjs +1 -1
- package/dist/esm/format/useIntl.mjs +1 -1
- package/dist/esm/format/useList.mjs +1 -1
- package/dist/esm/format/useNumber.mjs +1 -1
- package/dist/esm/format/usePercentage.mjs +1 -1
- package/dist/esm/format/useRelativeTime.mjs +1 -1
- package/dist/esm/format/useUnit.mjs +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/{installIntlayer-CJaEylqu.mjs → installIntlayer-BYkHxJSX.mjs} +1 -1
- package/dist/installIntlayer-C59abOKv.js +1 -0
- package/dist/types/format/useIntl.d.ts +2 -59
- package/dist/types/format/useList.d.ts +5 -1
- package/package.json +7 -7
- package/dist/installIntlayer-DXaXXzB5.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../installIntlayer-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../installIntlayer-C59abOKv.js`),t=require(`./useDictionary.cjs`),n=require(`./useDictionaryAsync.cjs`),r=require(`./useDictionaryDynamic.cjs`),i=require(`./useIntlayer.cjs`),a=require(`./useLoadDynamic.cjs`),o=require(`./useLocale.cjs`),s=require(`./useRewriteURL.cjs`);exports.INTLAYER_SYMBOL=e.t,exports.atPath=t.atPath,exports.createIntlayerClient=e.n,exports.createIntlayerLeafProxy=t.createIntlayerLeafProxy,exports.installIntlayer=e.r,exports.isComponentLike=t.isComponentLike,exports.isIntlayerNode=t.isIntlayerNode,exports.isObjectLike=t.isObjectLike,exports.toComponent=t.toComponent,exports.useDictionary=t.useDictionary,exports.useDictionaryAsync=n.useDictionaryAsync,exports.useDictionaryDynamic=r.useDictionaryDynamic,exports.useIntlayer=i.useIntlayer,exports.useLoadDynamic=a.useLoadDynamic,exports.useLocale=o.useLocale,exports.useRewriteURL=s.useRewriteURL;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../installIntlayer-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../installIntlayer-C59abOKv.js`);exports.INTLAYER_SYMBOL=e.t,exports.createIntlayerClient=e.n,exports.installIntlayer=e.r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../chunk-C91j1N6u.js`),t=require(`../getDictionary.cjs`),n=require(`../../installIntlayer-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../chunk-C91j1N6u.js`),t=require(`../getDictionary.cjs`),n=require(`../../installIntlayer-C59abOKv.js`);let r=require(`@intlayer/config/built`);r=e.t(r);let i=require(`vue`);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=>typeof e==`object`&&!!e&&`__update`in e&&`render`in e&&`raw`in e,l=e=>(0,i.markRaw)((0,i.defineComponent)({name:`IntlayerLeaf`,setup(){return()=>{let t=e();return t==null?null:s(t)?(0,i.h)(t):Array.isArray(t)?(0,i.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=(e,d)=>{let f=(0,i.inject)(n.t),p=(0,i.isRef)(f?.locale)?f.locale:(0,i.ref)(f?.locale??r.default.internationalization.defaultLocale),m=(0,i.computed)(()=>(d===void 0?void 0:(0,i.toValue)(d))??p.value),h=(0,i.shallowRef)({});(0,i.watch)([()=>(0,i.toValue)(e),()=>m.value],([e,n])=>{h.value=t.getDictionary(e,n)},{immediate:!0,flush:`sync`});let g=e=>new Proxy({},{get(t,n,r){if(n===`__v_isRef`)return!0;let d=(0,i.computed)(()=>a(h.value,e));if(n===`value`)return d.value??``;if(n===`then`)return;if(n===`c`||n===`asComponent`)return l(()=>d.value);if(n===`$raw`)return d;if(n===Symbol.toPrimitive)return()=>d.value;let f=e.concat(n),p=a(h.value,f);if(p===void 0||o(p)&&!s(p))return g(f);if(c(p))return u((0,i.computed)(()=>a(h.value,f)));let m=(0,i.computed)(()=>a(h.value,f));return new Proxy(m,{get(e,t,n){return t===`value`?e.value??``:Reflect.get(e,t,n)}})},ownKeys(){let t=a(h.value,e);return o(t)?Reflect.ownKeys(t):[]},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return g([])};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(`../../chunk-C91j1N6u.js`),t=require(`../../installIntlayer-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../chunk-C91j1N6u.js`),t=require(`../../installIntlayer-C59abOKv.js`),n=require(`./useDictionary.cjs`);let r=require(`@intlayer/config/built`);r=e.t(r);let i=require(`vue`);var a=async(e,a)=>{let o=(0,i.inject)(t.t),s=(0,i.computed)(()=>a??o?.locale?.value??r.default?.internationalization.defaultLocale),c=(0,i.ref)(await e[s.value]?.());return(0,i.watch)(()=>s.value,async t=>{let n=await e[t]?.();n&&(c.value=n)}),n.useDictionary(c,s)};exports.useDictionaryAsync=a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../chunk-C91j1N6u.js`),t=require(`../getIntlayer.cjs`),n=require(`../../installIntlayer-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../chunk-C91j1N6u.js`),t=require(`../getIntlayer.cjs`),n=require(`../../installIntlayer-C59abOKv.js`),r=require(`./useDictionary.cjs`);let i=require(`@intlayer/config/built`);i=e.t(i);let a=require(`vue`);var o=(e,o)=>{let s=(0,a.inject)(n.t),c=(0,a.isRef)(s?.locale)?s.locale:(0,a.ref)(s?.locale??i.default.internationalization.defaultLocale),l=(0,a.computed)(()=>(o===void 0?void 0:(0,a.toValue)(o))??c.value),u=(0,a.shallowRef)({});(0,a.watch)([()=>(0,a.toValue)(e),()=>l.value],([e,n])=>{u.value=t.getIntlayer(e,n)},{immediate:!0,flush:`sync`});let d=new Map,f=e=>{let t=e.join(`.`);if(d.has(t))return d.get(t);let n=(0,a.computed)(()=>r.atPath(u.value,e)),i=new Proxy({},{get(t,i,o){if(typeof i==`symbol`||typeof i==`string`&&(i.startsWith(`__`)||i.startsWith(`$`)))return i===`__v_isRef`?!0:i===`then`?void 0:Reflect.get(t,i,o);if(i===`value`)return n.value??``;if(i===`c`||i===`asComponent`)return r.toComponent(()=>n.value);if(i===`$raw`)return n;if(i===Symbol.toPrimitive)return()=>String(n.value??``);let s=e.concat(i),c=r.atPath(u.value,s);if(c===void 0||r.isObjectLike(c)&&!r.isComponentLike(c))return f(s);if(r.isIntlayerNode(c))return r.createIntlayerLeafProxy((0,a.computed)(()=>r.atPath(u.value,s)));let l=(0,a.computed)(()=>r.atPath(u.value,s));return new Proxy(l,{get(e,t,n){return t===`value`?e.value??``:t===`__v_isRef`?!0:Reflect.get(e,t,n)}})},ownKeys(){let t=r.atPath(u.value,e);return r.isObjectLike(t)?Reflect.ownKeys(t):[]},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return d.set(t,i),i};return f([])};exports.useIntlayer=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../chunk-C91j1N6u.js`),t=require(`../../installIntlayer-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../chunk-C91j1N6u.js`),t=require(`../../installIntlayer-C59abOKv.js`),n=require(`./useLocaleStorage.cjs`);let r=require(`@intlayer/config/built`);r=e.t(r);let i=require(`vue`);var a=({isCookieEnabled:e,onLocaleChange:a}={})=>{let{defaultLocale:o,locales:s}=r.default?.internationalization??{},c=(0,i.inject)(t.t);return{locale:(0,i.computed)(()=>c?.locale?.value??o),defaultLocale:o,availableLocales:s,setLocale:t=>{if(!s?.map(String).includes(t)){console.error(`Locale ${t} is not available`);return}c&&c.setLocale(t),n.setLocaleInStorage(t,e??c?.isCookieEnabled??!0),a?.(t)}}};exports.useLocale=a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../installIntlayer-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../installIntlayer-C59abOKv.js`);exports.useEditor=e.i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-C59abOKv.js`);let t=require(`vue`),n=require(`@intlayer/core/formatters`);var r=()=>{let r=(0,t.inject)(e.t);return(0,t.computed)(()=>{let e=r.locale.value;return(...t)=>(0,n.compact)(t[0],{...t[1],locale:t[1]?.locale??e})})};exports.useCompact=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-C59abOKv.js`);let t=require(`vue`),n=require(`@intlayer/core/formatters`);var r=()=>{let r=(0,t.inject)(e.t);return(0,t.computed)(()=>{let e=r.locale.value;return(...t)=>(0,n.currency)(t[0],{...t[1],locale:t[1]?.locale??e})})};exports.useCurrency=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-C59abOKv.js`);let t=require(`vue`),n=require(`@intlayer/core/formatters`);var r=()=>{let r=(0,t.inject)(e.t);return(0,t.computed)(()=>{let e=r.locale.value;return(...t)=>(0,n.date)(t[0],{...t[1],locale:t[1]?.locale??e})})};exports.useDate=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-C59abOKv.js`);let t=require(`vue`),n=require(`@intlayer/core/utils`);var r=r=>{let i=(0,t.inject)(e.t);return(0,t.computed)(()=>(0,n.bindIntl)(r??i.locale.value))};exports.useIntl=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-C59abOKv.js`);let t=require(`vue`),n=require(`@intlayer/core/formatters`);var r=()=>{let r=(0,t.inject)(e.t);return(0,t.computed)(()=>{let e=r.locale.value;return(...t)=>(0,n.list)(t[0],{...t[1],locale:t[1]?.locale??e})})};exports.useList=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-C59abOKv.js`);let t=require(`vue`),n=require(`@intlayer/core/formatters`);var r=()=>{let r=(0,t.inject)(e.t);return(0,t.computed)(()=>{let e=r.locale.value;return(...t)=>(0,n.number)(t[0],{...t[1],locale:t[1]?.locale??e})})};exports.useNumber=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-C59abOKv.js`);let t=require(`vue`),n=require(`@intlayer/core/formatters`);var r=()=>{let r=(0,t.inject)(e.t);return(0,t.computed)(()=>{let e=r.locale.value;return(...t)=>(0,n.percentage)(t[0],{...t[1],locale:t[1]?.locale??e})})};exports.usePercentage=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-C59abOKv.js`);let t=require(`vue`),n=require(`@intlayer/core/formatters`);var r=()=>{let r=(0,t.inject)(e.t);return(0,t.computed)(()=>{let e=r.locale.value;return(...t)=>(0,n.relativeTime)(t[0],t[1],{...t[2],locale:t[2]?.locale??e})})};exports.useRelativeTime=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-C59abOKv.js`);let t=require(`vue`),n=require(`@intlayer/core/formatters`);var r=()=>{let r=(0,t.inject)(e.t);return(0,t.computed)(()=>{let e=r.locale.value;return(...t)=>(0,n.units)(t[0],{...t[1],locale:t[1]?.locale??e})})};exports.useUnit=r;
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../chunk-C91j1N6u.js`);const e=require(`./markdown/runtime.cjs`),t=require(`./markdown/compiler.cjs`),n=require(`./markdown/installIntlayerMarkdown.cjs`),r=require(`./plugins.cjs`),i=require(`./getDictionary.cjs`),a=require(`./getIntlayer.cjs`),o=require(`../installIntlayer-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../chunk-C91j1N6u.js`);const e=require(`./markdown/runtime.cjs`),t=require(`./markdown/compiler.cjs`),n=require(`./markdown/installIntlayerMarkdown.cjs`),r=require(`./plugins.cjs`),i=require(`./getDictionary.cjs`),a=require(`./getIntlayer.cjs`),o=require(`../installIntlayer-C59abOKv.js`),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/useRewriteURL.cjs`);require(`./client/index.cjs`);const m=require(`./format/useIntl.cjs`),h=require(`./html/installIntlayerHTML.cjs`),g=require(`./html/HTMLRenderer.cjs`);require(`./html/index.cjs`);const _=require(`./markdown/MarkdownRenderer.cjs`);require(`./markdown/index.cjs`);let v=require(`@intlayer/core/markdown`);exports.HTMLRenderer=g.HTMLRenderer,exports.INTLAYER_HTML_SYMBOL=h.INTLAYER_HTML_SYMBOL,exports.INTLAYER_MARKDOWN_SYMBOL=n.INTLAYER_MARKDOWN_SYMBOL,exports.INTLAYER_SYMBOL=o.t,exports.MarkdownRenderer=_.MarkdownRenderer,exports.RuleType=v.RuleType,exports.atPath=s.atPath,exports.compile=t.compile,exports.compileMarkdown=t.compileMarkdown,exports.compiler=t.compiler,exports.createIntlayerClient=o.n,exports.createIntlayerHTMLClient=h.createIntlayerHTMLClient,exports.createIntlayerLeafProxy=s.createIntlayerLeafProxy,exports.createIntlayerMarkdownClient=n.createIntlayerMarkdownClient,exports.createVueRuntime=e.createVueRuntime,exports.getDictionary=i.getDictionary,exports.getIntlayer=a.getIntlayer,exports.getPlugins=r.getPlugins,exports.htmlPlugin=r.htmlPlugin,exports.insertionPlugin=r.insertionPlugin,exports.installIntlayer=o.r,exports.installIntlayerHTML=h.installIntlayerHTML,exports.installIntlayerMarkdown=n.installIntlayerMarkdown,exports.intlayerNodePlugins=r.intlayerNodePlugins,exports.isComponentLike=s.isComponentLike,exports.isIntlayerNode=s.isIntlayerNode,exports.isObjectLike=s.isObjectLike,exports.markdownPlugin=r.markdownPlugin,exports.markdownStringPlugin=r.markdownStringPlugin,exports.renderHTML=g.renderHTML,exports.renderMarkdown=_.renderMarkdown,exports.sanitizer=v.sanitizer,exports.slugify=v.slugify,exports.toComponent=s.toComponent,exports.useDictionary=s.useDictionary,exports.useDictionaryAsync=c.useDictionaryAsync,exports.useDictionaryDynamic=l.useDictionaryDynamic,exports.useEditor=o.i,exports.useHTML=h.useHTML,exports.useHTMLRenderer=g.useHTMLRenderer,exports.useIntl=m.useIntl,exports.useIntlayer=u.useIntlayer,exports.useLoadDynamic=d.useLoadDynamic,exports.useLocale=f.useLocale,exports.useMarkdown=n.useMarkdown,exports.useMarkdownRenderer=_.useMarkdownRenderer,exports.useRewriteURL=p.useRewriteURL,exports.vueRuntime=e.default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "../../installIntlayer-
|
|
1
|
+
import { n as e, r as t, t as n } from "../../installIntlayer-BYkHxJSX.mjs";
|
|
2
2
|
import { atPath as r, createIntlayerLeafProxy as i, isComponentLike as a, isIntlayerNode as o, isObjectLike as s, toComponent as c, useDictionary as l } from "./useDictionary.mjs";
|
|
3
3
|
import { useDictionaryAsync as u } from "./useDictionaryAsync.mjs";
|
|
4
4
|
import { useDictionaryDynamic as d } from "./useDictionaryDynamic.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "../../installIntlayer-
|
|
1
|
+
import { n as e, r as t, t as n } from "../../installIntlayer-BYkHxJSX.mjs";
|
|
2
2
|
export { n as INTLAYER_SYMBOL, e as createIntlayerClient, t as installIntlayer };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDictionary as e } from "../getDictionary.mjs";
|
|
2
|
-
import { t } from "../../installIntlayer-
|
|
2
|
+
import { t } from "../../installIntlayer-BYkHxJSX.mjs";
|
|
3
3
|
import n from "@intlayer/config/built";
|
|
4
4
|
import { computed as r, defineComponent 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";
|
|
5
5
|
//#region src/client/useDictionary.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../installIntlayer-
|
|
1
|
+
import { t as e } from "../../installIntlayer-BYkHxJSX.mjs";
|
|
2
2
|
import { useDictionary as t } from "./useDictionary.mjs";
|
|
3
3
|
import n from "@intlayer/config/built";
|
|
4
4
|
import { computed as r, inject as i, ref as a, watch as o } from "vue";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getIntlayer as e } from "../getIntlayer.mjs";
|
|
2
|
-
import { t } from "../../installIntlayer-
|
|
2
|
+
import { t } from "../../installIntlayer-BYkHxJSX.mjs";
|
|
3
3
|
import { atPath as n, createIntlayerLeafProxy as r, isComponentLike as i, isIntlayerNode as a, isObjectLike as o, toComponent as s } from "./useDictionary.mjs";
|
|
4
4
|
import c from "@intlayer/config/built";
|
|
5
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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../installIntlayer-
|
|
1
|
+
import { t as e } from "../../installIntlayer-BYkHxJSX.mjs";
|
|
2
2
|
import { setLocaleInStorage as t } from "./useLocaleStorage.mjs";
|
|
3
3
|
import n from "@intlayer/config/built";
|
|
4
4
|
import { computed as r, inject as i } from "vue";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as e } from "../../installIntlayer-
|
|
1
|
+
import { i as e } from "../../installIntlayer-BYkHxJSX.mjs";
|
|
2
2
|
export { e as useEditor };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../installIntlayer-
|
|
1
|
+
import { t as e } from "../../installIntlayer-BYkHxJSX.mjs";
|
|
2
2
|
import { computed as t, inject as n } from "vue";
|
|
3
3
|
import { compact as r } from "@intlayer/core/formatters";
|
|
4
4
|
//#region src/format/useCompact.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../installIntlayer-
|
|
1
|
+
import { t as e } from "../../installIntlayer-BYkHxJSX.mjs";
|
|
2
2
|
import { computed as t, inject as n } from "vue";
|
|
3
3
|
import { currency as r } from "@intlayer/core/formatters";
|
|
4
4
|
//#region src/format/useCurrency.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../installIntlayer-
|
|
1
|
+
import { t as e } from "../../installIntlayer-BYkHxJSX.mjs";
|
|
2
2
|
import { computed as t, inject as n } from "vue";
|
|
3
3
|
import { percentage as r } from "@intlayer/core/formatters";
|
|
4
4
|
//#region src/format/usePercentage.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../installIntlayer-
|
|
1
|
+
import { t as e } from "../../installIntlayer-BYkHxJSX.mjs";
|
|
2
2
|
import { computed as t, inject as n } from "vue";
|
|
3
3
|
import { relativeTime as r } from "@intlayer/core/formatters";
|
|
4
4
|
//#region src/format/useRelativeTime.ts
|
package/dist/esm/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { INTLAYER_MARKDOWN_SYMBOL as c, createIntlayerMarkdownClient as l, insta
|
|
|
4
4
|
import { getPlugins as f, htmlPlugin as p, insertionPlugin as m, intlayerNodePlugins as h, markdownPlugin as g, markdownStringPlugin as _ } from "./plugins.mjs";
|
|
5
5
|
import { getDictionary as v } from "./getDictionary.mjs";
|
|
6
6
|
import { getIntlayer as y } from "./getIntlayer.mjs";
|
|
7
|
-
import { i as b, n as x, r as S, t as C } from "../installIntlayer-
|
|
7
|
+
import { i as b, n as x, r as S, t as C } from "../installIntlayer-BYkHxJSX.mjs";
|
|
8
8
|
import { atPath as w, createIntlayerLeafProxy as T, isComponentLike as E, isIntlayerNode as D, isObjectLike as O, toComponent as k, useDictionary as A } from "./client/useDictionary.mjs";
|
|
9
9
|
import { useDictionaryAsync as j } from "./client/useDictionaryAsync.mjs";
|
|
10
10
|
import { useDictionaryDynamic as M } from "./client/useDictionaryDynamic.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./chunk-C91j1N6u.js`);let t=require(`@intlayer/config/built`);t=e.t(t);let n=require(`vue`),r=require(`@intlayer/editor/isEnabled`);var i=e=>{let t=null,r=!1;return import(`@intlayer/editor`).then(({initEditorClient:i})=>{if(r)return;let a=i();e&&(t=(0,n.watchEffect)(()=>{let t=e.value;t&&a.currentLocale.set(t)}))}),()=>{r=!0,t?.(),import(`@intlayer/editor`).then(({stopEditorClient:e})=>{e()})}},a=e=>{if(process.env.INTLAYER_EDITOR_ENABLED===`false`||!r.isEnabled)return;if(e){let t=null;e.mixin({inject:{_intlayerClient:{from:o,default:null}},mounted(){if(this.$parent!==null)return;let e=this._intlayerClient;t=i(e?.locale)},unmounted(){this.$parent===null&&t?.()}});return}let t=(0,n.inject)(o),a=null;(0,n.onMounted)(()=>{a=i(t?.locale)}),(0,n.onUnmounted)(()=>{a?.()})},o=Symbol(`intlayer`),s=null,c=(e,r=!0)=>{if(s)return s;let{defaultLocale:i}=t.default.internationalization??{},a=(0,n.ref)(e??i);return s={locale:(0,n.readonly)(a),setLocale:e=>{a.value=e},isCookieEnabled:r},s},l=(e,t,n=!0)=>{let r=c(t,n);return e.provide(o,r),a(e),e};Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { WrappedIntl } from '@intlayer/core/utils';
|
|
1
2
|
import { LocalesValues } from '@intlayer/types/module_augmentation';
|
|
2
3
|
/**
|
|
3
4
|
* Vue composable that provides a locale-bound `Intl` object.
|
|
@@ -35,62 +36,4 @@ import { LocalesValues } from '@intlayer/types/module_augmentation';
|
|
|
35
36
|
* </script>
|
|
36
37
|
* ```
|
|
37
38
|
*/
|
|
38
|
-
export declare const useIntl: (locale?: LocalesValues) => import('vue').ComputedRef<
|
|
39
|
-
Collator: {
|
|
40
|
-
new (locales?: LocalesValues, options?: Intl.CollatorOptions | undefined): Intl.Collator;
|
|
41
|
-
new (options?: (Intl.CollatorOptions & {
|
|
42
|
-
locale?: LocalesValues;
|
|
43
|
-
}) | undefined): Intl.Collator;
|
|
44
|
-
};
|
|
45
|
-
NumberFormat: {
|
|
46
|
-
new (locales?: LocalesValues, options?: Intl.NumberFormatOptions | undefined): Intl.NumberFormat;
|
|
47
|
-
new (options?: (Intl.NumberFormatOptions & {
|
|
48
|
-
locale?: LocalesValues;
|
|
49
|
-
}) | undefined): Intl.NumberFormat;
|
|
50
|
-
};
|
|
51
|
-
DateTimeFormat: {
|
|
52
|
-
new (locales?: LocalesValues, options?: Intl.DateTimeFormatOptions | undefined): Intl.DateTimeFormat;
|
|
53
|
-
new (options?: (Intl.DateTimeFormatOptions & {
|
|
54
|
-
locale?: LocalesValues;
|
|
55
|
-
}) | undefined): Intl.DateTimeFormat;
|
|
56
|
-
};
|
|
57
|
-
getCanonicalLocales: typeof Intl.getCanonicalLocales;
|
|
58
|
-
readonly PluralRules: {
|
|
59
|
-
new (locales?: LocalesValues, options?: Intl.PluralRulesOptions | undefined): Intl.PluralRules;
|
|
60
|
-
new (options?: (Intl.PluralRulesOptions & {
|
|
61
|
-
locale?: LocalesValues;
|
|
62
|
-
}) | undefined): Intl.PluralRules;
|
|
63
|
-
};
|
|
64
|
-
readonly RelativeTimeFormat: {
|
|
65
|
-
new (locales?: LocalesValues, options?: Intl.RelativeTimeFormatOptions | undefined): Intl.RelativeTimeFormat;
|
|
66
|
-
new (options?: (Intl.RelativeTimeFormatOptions & {
|
|
67
|
-
locale?: LocalesValues;
|
|
68
|
-
}) | undefined): Intl.RelativeTimeFormat;
|
|
69
|
-
};
|
|
70
|
-
readonly Locale: {
|
|
71
|
-
new (locales?: LocalesValues, options?: Intl.LocaleOptions | undefined): Intl.Locale;
|
|
72
|
-
new (options?: (Intl.LocaleOptions & {
|
|
73
|
-
locale?: LocalesValues;
|
|
74
|
-
}) | undefined): Intl.Locale;
|
|
75
|
-
};
|
|
76
|
-
readonly DisplayNames: {
|
|
77
|
-
prototype: Intl.DisplayNames;
|
|
78
|
-
new (locales: Intl.LocalesArgument, options: Intl.DisplayNamesOptions): Intl.DisplayNames;
|
|
79
|
-
supportedLocalesOf(locales?: Intl.LocalesArgument, options?: {
|
|
80
|
-
localeMatcher?: Intl.RelativeTimeFormatLocaleMatcher;
|
|
81
|
-
}): Intl.UnicodeBCP47LocaleIdentifier[];
|
|
82
|
-
};
|
|
83
|
-
readonly ListFormat: {
|
|
84
|
-
new (locales?: LocalesValues, options?: Intl.ListFormatOptions | undefined): Intl.ListFormat;
|
|
85
|
-
new (options?: (Intl.ListFormatOptions & {
|
|
86
|
-
locale?: LocalesValues;
|
|
87
|
-
}) | undefined): Intl.ListFormat;
|
|
88
|
-
};
|
|
89
|
-
supportedValuesOf: typeof Intl.supportedValuesOf;
|
|
90
|
-
readonly Segmenter: {
|
|
91
|
-
new (locales?: LocalesValues, options?: Intl.SegmenterOptions | undefined): Intl.Segmenter;
|
|
92
|
-
new (options?: (Intl.SegmenterOptions & {
|
|
93
|
-
locale?: LocalesValues;
|
|
94
|
-
}) | undefined): Intl.Segmenter;
|
|
95
|
-
};
|
|
96
|
-
}>;
|
|
39
|
+
export declare const useIntl: (locale?: LocalesValues) => import('vue').ComputedRef<WrappedIntl>;
|
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
* // "1, 2 und 3"
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
|
-
export declare const useList: () => import('vue').ComputedRef<(values: (string | number)[], options?: (
|
|
19
|
+
export declare const useList: () => import('vue').ComputedRef<(values: (string | number)[], options?: ({
|
|
20
|
+
localeMatcher?: "lookup" | "best fit";
|
|
21
|
+
type?: "conjunction" | "disjunction" | "unit";
|
|
22
|
+
style?: "long" | "short" | "narrow";
|
|
23
|
+
} & {
|
|
20
24
|
locale?: import('intlayer').LocalesValues;
|
|
21
25
|
}) | undefined) => string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-intlayer",
|
|
3
|
-
"version": "8.4.
|
|
3
|
+
"version": "8.4.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Easily internationalize i18n your Vue applications with type-safe multilingual content management.",
|
|
6
6
|
"keywords": [
|
|
@@ -94,11 +94,11 @@
|
|
|
94
94
|
"typecheck": "vue-tsc --noEmit --project tsconfig.types.json"
|
|
95
95
|
},
|
|
96
96
|
"dependencies": {
|
|
97
|
-
"@intlayer/api": "8.4.
|
|
98
|
-
"@intlayer/config": "8.4.
|
|
99
|
-
"@intlayer/core": "8.4.
|
|
100
|
-
"@intlayer/editor": "8.4.
|
|
101
|
-
"@intlayer/types": "8.4.
|
|
97
|
+
"@intlayer/api": "8.4.2",
|
|
98
|
+
"@intlayer/config": "8.4.2",
|
|
99
|
+
"@intlayer/core": "8.4.2",
|
|
100
|
+
"@intlayer/editor": "8.4.2",
|
|
101
|
+
"@intlayer/types": "8.4.2"
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
104
104
|
"@types/node": "25.5.0",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"vue-tsc": "3.1.5"
|
|
118
118
|
},
|
|
119
119
|
"peerDependencies": {
|
|
120
|
-
"intlayer": "8.4.
|
|
120
|
+
"intlayer": "8.4.2",
|
|
121
121
|
"vue": ">=3.0.0"
|
|
122
122
|
},
|
|
123
123
|
"peerDependenciesMeta": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./chunk-C91j1N6u.js`);let t=require(`@intlayer/config/built`);t=e.t(t);let n=require(`vue`),r=require(`@intlayer/editor/isEnabled`);var i=e=>{let t=null,r=!1;return import(`@intlayer/editor`).then(({initEditorClient:i})=>{if(r)return;let a=i();e&&(t=(0,n.watchEffect)(()=>{let t=e.value;t&&a.currentLocale.set(t)}))}),()=>{r=!0,t?.(),import(`@intlayer/editor`).then(({stopEditorClient:e})=>{e()})}},a=e=>{if(!r.isEnabled)return;if(e){let t=null;e.mixin({inject:{_intlayerClient:{from:o,default:null}},mounted(){if(this.$parent!==null)return;let e=this._intlayerClient;t=i(e?.locale)},unmounted(){this.$parent===null&&t?.()}});return}let t=(0,n.inject)(o),a=null;(0,n.onMounted)(()=>{a=i(t?.locale)}),(0,n.onUnmounted)(()=>{a?.()})},o=Symbol(`intlayer`),s=null,c=(e,r=!0)=>{if(s)return s;let{defaultLocale:i}=t.default.internationalization??{},a=(0,n.ref)(e??i);return s={locale:(0,n.readonly)(a),setLocale:e=>{a.value=e},isCookieEnabled:r},s},l=(e,t,n=!0)=>{let r=c(t,n);return e.provide(o,r),a(e),e};Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
|