vue-intlayer 8.5.0 → 8.5.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/index.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/html/index.cjs +1 -1
- package/dist/cjs/html/installIntlayerHTML.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/markdown/index.cjs +1 -1
- package/dist/cjs/markdown/installIntlayerMarkdown.cjs +1 -1
- package/dist/esm/client/index.mjs +9 -9
- package/dist/esm/client/installIntlayer.mjs +2 -2
- 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/index.mjs +5 -5
- package/dist/esm/format/useCompact.mjs +1 -1
- package/dist/esm/format/useCurrency.mjs +1 -1
- package/dist/esm/format/useDate.mjs +16 -10
- 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/html/index.mjs +3 -3
- package/dist/esm/html/installIntlayerHTML.mjs +2 -2
- package/dist/esm/index.mjs +9 -10
- package/dist/esm/markdown/index.mjs +3 -3
- package/dist/esm/markdown/installIntlayerMarkdown.mjs +2 -2
- package/dist/{installIntlayer-CC0nWTSX.js → installIntlayer-2WeJUqHz.js} +1 -1
- package/dist/{installIntlayer-CLmf4gtH.mjs → installIntlayer-CWrg7I9r.mjs} +2 -2
- package/dist/types/client/installIntlayer.d.ts +20 -1
- package/dist/types/format/useDate.d.ts +1 -1
- package/dist/types/html/index.d.ts +2 -2
- package/dist/types/html/installIntlayerHTML.d.ts +31 -0
- package/dist/types/index.d.ts +0 -1
- package/dist/types/markdown/index.d.ts +1 -1
- package/dist/types/markdown/installIntlayerMarkdown.d.ts +31 -0
- package/package.json +7 -7
|
@@ -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-2WeJUqHz.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.intlayer=e.i,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-2WeJUqHz.js`);exports.INTLAYER_SYMBOL=e.t,exports.createIntlayerClient=e.n,exports.installIntlayer=e.r,exports.intlayer=e.i;
|
|
@@ -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-2WeJUqHz.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=>e!=null&&(typeof e==`object`||typeof e==`function`)&&`__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.getCurrentInstance)()?(0,i.inject)(n.t):void 0,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-2WeJUqHz.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-2WeJUqHz.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-2WeJUqHz.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-2WeJUqHz.js`);exports.useEditor=e.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./useCompact.cjs`),t=require(`./useCurrency.cjs`),n=require(`./useDate.cjs`),r=require(`./useIntl.cjs`),i=require(`./useList.cjs`),a=require(`./useNumber.cjs`),o=require(`./usePercentage.cjs`),s=require(`./useRelativeTime.cjs`),c=require(`./useUnit.cjs`);exports.useCompact=e.useCompact,exports.useCurrency=t.useCurrency,exports.useDate=n.useDate,exports.useIntl=r.useIntl,exports.useList=i.useList,exports.useNumber=a.useNumber,exports.usePercentage=o.usePercentage,exports.useRelativeTime=s.useRelativeTime,exports.useUnit=c.useUnit;
|
|
@@ -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-2WeJUqHz.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-2WeJUqHz.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-2WeJUqHz.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)=>{let r=typeof t[1]==`string`?{...n.presets[t[1]],locale:e}:{...t[1],locale:t[1]?.locale??e};return(0,n.date)(t[0],r)}})};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-2WeJUqHz.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-2WeJUqHz.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-2WeJUqHz.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-2WeJUqHz.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-2WeJUqHz.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-2WeJUqHz.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/html/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./installIntlayerHTML.cjs`),t=require(`./HTMLRenderer.cjs`);exports.HTMLRenderer=t.HTMLRenderer,exports.installIntlayerHTML=e.installIntlayerHTML,exports.renderHTML=t.renderHTML,exports.useHTML=e.useHTML,exports.useHTMLRenderer=t.useHTMLRenderer;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./installIntlayerHTML.cjs`),t=require(`./HTMLRenderer.cjs`);exports.HTMLRenderer=t.HTMLRenderer,exports.installIntlayerHTML=e.installIntlayerHTML,exports.intlayerHTML=e.intlayerHTML,exports.renderHTML=t.renderHTML,exports.useHTML=e.useHTML,exports.useHTMLRenderer=t.useHTMLRenderer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);let e=require(`@intlayer/core/interpreter`),t=require(`vue`);var n=Symbol(`intlayerHTML`),r=null,i=e=>r||(r={renderHTML:e},r),a=(r,a)=>{let o;if(typeof a==`function`)o=a;else{let{components:t,renderHTML:n}=a??{};o=n||((n,r)=>{let{components:i,...a}=r&&typeof r==`object`&&`components`in r?r:{components:r},o=i||a;return(0,e.getHTML)(n,{...t,...o})})}let s=i((e,r)=>typeof a==`function`||typeof a==`object`&&a?.renderHTML?{setup(){return(0,t.provide)(n,{renderHTML:void 0}),()=>o(e,r)}}:o(e,r));r.provide(n,s)},o=()=>(0,t.inject)(n);exports.INTLAYER_HTML_SYMBOL=n,exports.createIntlayerHTMLClient=i,exports.installIntlayerHTML=a,exports.useHTML=
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);let e=require(`@intlayer/core/interpreter`),t=require(`vue`);var n=Symbol(`intlayerHTML`),r=null,i=e=>r||(r={renderHTML:e},r),a=(r,a)=>{let o;if(typeof a==`function`)o=a;else{let{components:t,renderHTML:n}=a??{};o=n||((n,r)=>{let{components:i,...a}=r&&typeof r==`object`&&`components`in r?r:{components:r},o=i||a;return(0,e.getHTML)(n,{...t,...o})})}let s=i((e,r)=>typeof a==`function`||typeof a==`object`&&a?.renderHTML?{setup(){return(0,t.provide)(n,{renderHTML:void 0}),()=>o(e,r)}}:o(e,r));r.provide(n,s)},o={install:a},s=()=>(0,t.inject)(n);exports.INTLAYER_HTML_SYMBOL=n,exports.createIntlayerHTMLClient=i,exports.installIntlayerHTML=a,exports.intlayerHTML=o,exports.useHTML=s;
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./plugins.cjs`),t=require(`./getDictionary.cjs`),n=require(`./getIntlayer.cjs`),r=require(`../installIntlayer-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./plugins.cjs`),t=require(`./getDictionary.cjs`),n=require(`./getIntlayer.cjs`),r=require(`../installIntlayer-2WeJUqHz.js`),i=require(`./client/useDictionary.cjs`),a=require(`./client/useDictionaryAsync.cjs`),o=require(`./client/useDictionaryDynamic.cjs`),s=require(`./client/useIntlayer.cjs`),c=require(`./client/useLoadDynamic.cjs`),l=require(`./client/useLocale.cjs`),u=require(`./client/useRewriteURL.cjs`);require(`./client/index.cjs`),exports.INTLAYER_SYMBOL=r.t,exports.atPath=i.atPath,exports.createIntlayerClient=r.n,exports.createIntlayerLeafProxy=i.createIntlayerLeafProxy,exports.getDictionary=t.getDictionary,exports.getIntlayer=n.getIntlayer,exports.getPlugins=e.getPlugins,exports.htmlPlugin=e.htmlPlugin,exports.insertionPlugin=e.insertionPlugin,exports.installIntlayer=r.r,exports.intlayer=r.i,exports.intlayerNodePlugins=e.intlayerNodePlugins,exports.isComponentLike=i.isComponentLike,exports.isIntlayerNode=i.isIntlayerNode,exports.isObjectLike=i.isObjectLike,exports.markdownPlugin=e.markdownPlugin,exports.markdownStringPlugin=e.markdownStringPlugin,exports.toComponent=i.toComponent,exports.useDictionary=i.useDictionary,exports.useDictionaryAsync=a.useDictionaryAsync,exports.useDictionaryDynamic=o.useDictionaryDynamic,exports.useEditor=r.a,exports.useIntlayer=s.useIntlayer,exports.useLoadDynamic=c.useLoadDynamic,exports.useLocale=l.useLocale,exports.useRewriteURL=u.useRewriteURL;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./compiler.cjs`),t=require(`./installIntlayerMarkdown.cjs`),n=require(`./MarkdownRenderer.cjs`);exports.MarkdownRenderer=n.MarkdownRenderer,exports.compileMarkdown=e.compileMarkdown,exports.installIntlayerMarkdown=t.installIntlayerMarkdown,exports.renderMarkdown=n.renderMarkdown,exports.useMarkdown=t.useMarkdown,exports.useMarkdownRenderer=n.useMarkdownRenderer;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./compiler.cjs`),t=require(`./installIntlayerMarkdown.cjs`),n=require(`./MarkdownRenderer.cjs`);exports.MarkdownRenderer=n.MarkdownRenderer,exports.compileMarkdown=e.compileMarkdown,exports.installIntlayerMarkdown=t.installIntlayerMarkdown,exports.intlayerMarkdown=t.intlayerMarkdown,exports.renderMarkdown=n.renderMarkdown,exports.useMarkdown=t.useMarkdown,exports.useMarkdownRenderer=n.useMarkdownRenderer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`./compiler.cjs`);let t=require(`vue`);var n=Symbol(`intlayerMarkdown`),r=null,i=(e,t)=>r||(r={components:t,renderMarkdown:e},r),a=(r,a)=>{let o,s;if(typeof a==`function`)o=a;else{let{components:t,wrapper:n,forceBlock:r,forceInline:i,preserveFrontmatter:c,tagfilter:l,renderMarkdown:u}=a??{};if(s=t,u)o=u;else{let a={components:t,forceBlock:r,forceInline:i,wrapper:n,forceWrapper:!!n,preserveFrontmatter:c,tagfilter:l};o=(t,n,r,i)=>e.compileMarkdown(t,{...a,forceBlock:n?.forceBlock??a.forceBlock,forceInline:n?.forceInline??a.forceInline,preserveFrontmatter:n?.preserveFrontmatter??a.preserveFrontmatter,tagfilter:n?.tagfilter??a.tagfilter,wrapper:i||a.wrapper,forceWrapper:!!(i||a.wrapper),components:{...a.components,...r??{}}})}}let c=i((e,r,i,s)=>typeof a==`function`||typeof a==`object`&&a?.renderMarkdown?{setup(){return(0,t.provide)(n,{renderMarkdown:void 0}),()=>o(e,r,i,s)}}:o(e,r,i,s),s);r.provide(n,c)},o=()=>{let e=(0,t.inject)(n,{renderMarkdown:e=>e});if(!e)throw Error(`useMarkdown must be used within a MarkdownProvider`);return e};exports.INTLAYER_MARKDOWN_SYMBOL=n,exports.createIntlayerMarkdownClient=i,exports.installIntlayerMarkdown=a,exports.useMarkdown=
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`./compiler.cjs`);let t=require(`vue`);var n=Symbol(`intlayerMarkdown`),r=null,i=(e,t)=>r||(r={components:t,renderMarkdown:e},r),a=(r,a)=>{let o,s;if(typeof a==`function`)o=a;else{let{components:t,wrapper:n,forceBlock:r,forceInline:i,preserveFrontmatter:c,tagfilter:l,renderMarkdown:u}=a??{};if(s=t,u)o=u;else{let a={components:t,forceBlock:r,forceInline:i,wrapper:n,forceWrapper:!!n,preserveFrontmatter:c,tagfilter:l};o=(t,n,r,i)=>e.compileMarkdown(t,{...a,forceBlock:n?.forceBlock??a.forceBlock,forceInline:n?.forceInline??a.forceInline,preserveFrontmatter:n?.preserveFrontmatter??a.preserveFrontmatter,tagfilter:n?.tagfilter??a.tagfilter,wrapper:i||a.wrapper,forceWrapper:!!(i||a.wrapper),components:{...a.components,...r??{}}})}}let c=i((e,r,i,s)=>typeof a==`function`||typeof a==`object`&&a?.renderMarkdown?{setup(){return(0,t.provide)(n,{renderMarkdown:void 0}),()=>o(e,r,i,s)}}:o(e,r,i,s),s);r.provide(n,c)},o={install:a},s=()=>{let e=(0,t.inject)(n,{renderMarkdown:e=>e});if(!e)throw Error(`useMarkdown must be used within a MarkdownProvider`);return e};exports.INTLAYER_MARKDOWN_SYMBOL=n,exports.createIntlayerMarkdownClient=i,exports.installIntlayerMarkdown=a,exports.intlayerMarkdown=o,exports.useMarkdown=s;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { atPath as
|
|
3
|
-
import { useDictionaryAsync as
|
|
4
|
-
import { useDictionaryDynamic as
|
|
5
|
-
import { useIntlayer as
|
|
6
|
-
import { useLoadDynamic as
|
|
7
|
-
import { useLocale as
|
|
8
|
-
import { useRewriteURL as
|
|
9
|
-
export {
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "../../installIntlayer-CWrg7I9r.mjs";
|
|
2
|
+
import { atPath as i, createIntlayerLeafProxy as a, isComponentLike as o, isIntlayerNode as s, isObjectLike as c, toComponent as l, useDictionary as u } from "./useDictionary.mjs";
|
|
3
|
+
import { useDictionaryAsync as d } from "./useDictionaryAsync.mjs";
|
|
4
|
+
import { useDictionaryDynamic as f } from "./useDictionaryDynamic.mjs";
|
|
5
|
+
import { useIntlayer as p } from "./useIntlayer.mjs";
|
|
6
|
+
import { useLoadDynamic as m } from "./useLoadDynamic.mjs";
|
|
7
|
+
import { useLocale as h } from "./useLocale.mjs";
|
|
8
|
+
import { useRewriteURL as g } from "./useRewriteURL.mjs";
|
|
9
|
+
export { r as INTLAYER_SYMBOL, i as atPath, t as createIntlayerClient, a as createIntlayerLeafProxy, n as installIntlayer, e as intlayer, o as isComponentLike, s as isIntlayerNode, c as isObjectLike, l as toComponent, u as useDictionary, d as useDictionaryAsync, f as useDictionaryDynamic, p as useIntlayer, m as useLoadDynamic, h as useLocale, g as useRewriteURL };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "../../installIntlayer-CWrg7I9r.mjs";
|
|
2
|
+
export { r as INTLAYER_SYMBOL, t as createIntlayerClient, n as installIntlayer, e as intlayer };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDictionary as e } from "../getDictionary.mjs";
|
|
2
|
-
import { t } from "../../installIntlayer-
|
|
2
|
+
import { t } from "../../installIntlayer-CWrg7I9r.mjs";
|
|
3
3
|
import n from "@intlayer/config/built";
|
|
4
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
|
//#region src/client/useDictionary.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../installIntlayer-
|
|
1
|
+
import { t as e } from "../../installIntlayer-CWrg7I9r.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-CWrg7I9r.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-CWrg7I9r.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 {
|
|
1
|
+
import { a as e } from "../../installIntlayer-CWrg7I9r.mjs";
|
|
2
2
|
export { e as useEditor };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { useCompact as e } from "./useCompact.mjs";
|
|
2
|
+
import { useCurrency as t } from "./useCurrency.mjs";
|
|
3
|
+
import { useDate as n } from "./useDate.mjs";
|
|
4
|
+
import { useIntl as r } from "./useIntl.mjs";
|
|
5
5
|
import { useList as i } from "./useList.mjs";
|
|
6
6
|
import { useNumber as a } from "./useNumber.mjs";
|
|
7
7
|
import { usePercentage as o } from "./usePercentage.mjs";
|
|
8
8
|
import { useRelativeTime as s } from "./useRelativeTime.mjs";
|
|
9
9
|
import { useUnit as c } from "./useUnit.mjs";
|
|
10
|
-
export {
|
|
10
|
+
export { e as useCompact, t as useCurrency, n as useDate, r as useIntl, i as useList, a as useNumber, o as usePercentage, s as useRelativeTime, c as useUnit };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../installIntlayer-
|
|
1
|
+
import { t as e } from "../../installIntlayer-CWrg7I9r.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-CWrg7I9r.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,16 +1,22 @@
|
|
|
1
|
-
import { t as e } from "../../installIntlayer-
|
|
1
|
+
import { t as e } from "../../installIntlayer-CWrg7I9r.mjs";
|
|
2
2
|
import { computed as t, inject as n } from "vue";
|
|
3
|
-
import { date as r } from "@intlayer/core/formatters";
|
|
3
|
+
import { date as r, presets as i } from "@intlayer/core/formatters";
|
|
4
4
|
//#region src/format/useDate.ts
|
|
5
|
-
var
|
|
6
|
-
let
|
|
5
|
+
var a = () => {
|
|
6
|
+
let a = n(e);
|
|
7
7
|
return t(() => {
|
|
8
|
-
let e =
|
|
9
|
-
return (...t) =>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
let e = a.locale.value;
|
|
9
|
+
return (...t) => {
|
|
10
|
+
let n = typeof t[1] == "string" ? {
|
|
11
|
+
...i[t[1]],
|
|
12
|
+
locale: e
|
|
13
|
+
} : {
|
|
14
|
+
...t[1],
|
|
15
|
+
locale: t[1]?.locale ?? e
|
|
16
|
+
};
|
|
17
|
+
return r(t[0], n);
|
|
18
|
+
};
|
|
13
19
|
});
|
|
14
20
|
};
|
|
15
21
|
//#endregion
|
|
16
|
-
export {
|
|
22
|
+
export { a as useDate };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../installIntlayer-
|
|
1
|
+
import { t as e } from "../../installIntlayer-CWrg7I9r.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-CWrg7I9r.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/html/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { installIntlayerHTML as e,
|
|
2
|
-
import { HTMLRenderer as
|
|
3
|
-
export {
|
|
1
|
+
import { installIntlayerHTML as e, intlayerHTML as t, useHTML as n } from "./installIntlayerHTML.mjs";
|
|
2
|
+
import { HTMLRenderer as r, renderHTML as i, useHTMLRenderer as a } from "./HTMLRenderer.mjs";
|
|
3
|
+
export { r as HTMLRenderer, e as installIntlayerHTML, t as intlayerHTML, i as renderHTML, n as useHTML, a as useHTMLRenderer };
|
|
@@ -18,6 +18,6 @@ var r = Symbol("intlayerHTML"), i = null, a = (e) => i || (i = { renderHTML: e }
|
|
|
18
18
|
return n(r, { renderHTML: void 0 }), () => o(e, t);
|
|
19
19
|
} } : o(e, t));
|
|
20
20
|
t.provide(r, s);
|
|
21
|
-
}, s = () => t(r);
|
|
21
|
+
}, s = { install: o }, c = () => t(r);
|
|
22
22
|
//#endregion
|
|
23
|
-
export { r as INTLAYER_HTML_SYMBOL, a as createIntlayerHTMLClient, o as installIntlayerHTML, s as useHTML };
|
|
23
|
+
export { r as INTLAYER_HTML_SYMBOL, a as createIntlayerHTMLClient, o as installIntlayerHTML, s as intlayerHTML, c as useHTML };
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { getPlugins as e, htmlPlugin as t, insertionPlugin as n, intlayerNodePlugins as r, markdownPlugin as i, markdownStringPlugin as a } from "./plugins.mjs";
|
|
2
2
|
import { getDictionary as o } from "./getDictionary.mjs";
|
|
3
3
|
import { getIntlayer as s } from "./getIntlayer.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { atPath as
|
|
6
|
-
import { useDictionaryAsync as
|
|
7
|
-
import { useDictionaryDynamic as
|
|
8
|
-
import { useIntlayer as
|
|
9
|
-
import { useLoadDynamic as
|
|
10
|
-
import { useLocale as
|
|
11
|
-
import { useRewriteURL as
|
|
4
|
+
import { a as c, i as l, n as u, r as d, t as f } from "../installIntlayer-CWrg7I9r.mjs";
|
|
5
|
+
import { atPath as p, createIntlayerLeafProxy as m, isComponentLike as h, isIntlayerNode as g, isObjectLike as _, toComponent as v, useDictionary as y } from "./client/useDictionary.mjs";
|
|
6
|
+
import { useDictionaryAsync as b } from "./client/useDictionaryAsync.mjs";
|
|
7
|
+
import { useDictionaryDynamic as x } from "./client/useDictionaryDynamic.mjs";
|
|
8
|
+
import { useIntlayer as S } from "./client/useIntlayer.mjs";
|
|
9
|
+
import { useLoadDynamic as C } from "./client/useLoadDynamic.mjs";
|
|
10
|
+
import { useLocale as w } from "./client/useLocale.mjs";
|
|
11
|
+
import { useRewriteURL as T } from "./client/useRewriteURL.mjs";
|
|
12
12
|
import "./client/index.mjs";
|
|
13
|
-
|
|
14
|
-
export { d as INTLAYER_SYMBOL, f as atPath, l as createIntlayerClient, p as createIntlayerLeafProxy, o as getDictionary, s as getIntlayer, e as getPlugins, t as htmlPlugin, n as insertionPlugin, u as installIntlayer, r as intlayerNodePlugins, m as isComponentLike, h as isIntlayerNode, g as isObjectLike, i as markdownPlugin, a as markdownStringPlugin, _ as toComponent, v as useDictionary, y as useDictionaryAsync, b as useDictionaryDynamic, c as useEditor, T as useIntl, x as useIntlayer, S as useLoadDynamic, C as useLocale, w as useRewriteURL };
|
|
13
|
+
export { f as INTLAYER_SYMBOL, p as atPath, u as createIntlayerClient, m as createIntlayerLeafProxy, o as getDictionary, s as getIntlayer, e as getPlugins, t as htmlPlugin, n as insertionPlugin, d as installIntlayer, l as intlayer, r as intlayerNodePlugins, h as isComponentLike, g as isIntlayerNode, _ as isObjectLike, i as markdownPlugin, a as markdownStringPlugin, v as toComponent, y as useDictionary, b as useDictionaryAsync, x as useDictionaryDynamic, c as useEditor, S as useIntlayer, C as useLoadDynamic, w as useLocale, T as useRewriteURL };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { compileMarkdown as e } from "./compiler.mjs";
|
|
2
|
-
import { installIntlayerMarkdown as t,
|
|
3
|
-
import { MarkdownRenderer as
|
|
4
|
-
export {
|
|
2
|
+
import { installIntlayerMarkdown as t, intlayerMarkdown as n, useMarkdown as r } from "./installIntlayerMarkdown.mjs";
|
|
3
|
+
import { MarkdownRenderer as i, renderMarkdown as a, useMarkdownRenderer as o } from "./MarkdownRenderer.mjs";
|
|
4
|
+
export { i as MarkdownRenderer, e as compileMarkdown, t as installIntlayerMarkdown, n as intlayerMarkdown, a as renderMarkdown, r as useMarkdown, o as useMarkdownRenderer };
|
|
@@ -39,10 +39,10 @@ var r = Symbol("intlayerMarkdown"), i = null, a = (e, t) => i || (i = {
|
|
|
39
39
|
return n(r, { renderMarkdown: void 0 }), () => o(e, t, a, s);
|
|
40
40
|
} } : o(e, t, a, s), s);
|
|
41
41
|
t.provide(r, c);
|
|
42
|
-
}, s = () => {
|
|
42
|
+
}, s = { install: o }, c = () => {
|
|
43
43
|
let e = t(r, { renderMarkdown: (e) => e });
|
|
44
44
|
if (!e) throw Error("useMarkdown must be used within a MarkdownProvider");
|
|
45
45
|
return e;
|
|
46
46
|
};
|
|
47
47
|
//#endregion
|
|
48
|
-
export { r as INTLAYER_MARKDOWN_SYMBOL, a as createIntlayerMarkdownClient, o as installIntlayerMarkdown, s as useMarkdown };
|
|
48
|
+
export { r as INTLAYER_MARKDOWN_SYMBOL, a as createIntlayerMarkdownClient, o as installIntlayerMarkdown, s as intlayerMarkdown, c as useMarkdown };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`./chunk-C91j1N6u.js`);let t=require(`@intlayer/config/built`);t=e.t(t);let n=require(`@intlayer/editor/isEnabled`),r=require(`vue`);var i=e=>{let t=null,n=!1;return import(`@intlayer/editor`).then(({initEditorClient:i})=>{if(n)return;let a=i();e&&(t=(0,r.watchEffect)(()=>{let t=e.value;t&&a.currentLocale.set(t)}))}),()=>{n=!0,t?.(),import(`@intlayer/editor`).then(({stopEditorClient:e})=>{e()})}},a=e=>{if(process.env.INTLAYER_EDITOR_ENABLED===`false`||!n.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,r.inject)(o),a=null;(0,r.onMounted)(()=>{a=i(t?.locale)}),(0,r.onUnmounted)(()=>{a?.()})},o=Symbol(`intlayer`),s=null,c=(e,n=!0)=>{if(s)return s;let{defaultLocale:i}=t.default.internationalization??{},a=(0,r.ref)(e??i);return s={locale:(0,r.readonly)(a),setLocale:e=>{a.value=e},isCookieEnabled:n},s},l=(e,t)=>{let{locale:n,isCookieEnabled:r}=t??{},i=c(n,r);return e.provide(o,i),a(e),e};Object.defineProperty(exports,`
|
|
1
|
+
const e=require(`./chunk-C91j1N6u.js`);let t=require(`@intlayer/config/built`);t=e.t(t);let n=require(`@intlayer/editor/isEnabled`),r=require(`vue`);var i=e=>{let t=null,n=!1;return import(`@intlayer/editor`).then(({initEditorClient:i})=>{if(n)return;let a=i();e&&(t=(0,r.watchEffect)(()=>{let t=e.value;t&&a.currentLocale.set(t)}))}),()=>{n=!0,t?.(),import(`@intlayer/editor`).then(({stopEditorClient:e})=>{e()})}},a=e=>{if(process.env.INTLAYER_EDITOR_ENABLED===`false`||!n.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,r.inject)(o),a=null;(0,r.onMounted)(()=>{a=i(t?.locale)}),(0,r.onUnmounted)(()=>{a?.()})},o=Symbol(`intlayer`),s=null,c=(e,n=!0)=>{if(s)return s;let{defaultLocale:i}=t.default.internationalization??{},a=(0,r.ref)(e??i);return s={locale:(0,r.readonly)(a),setLocale:e=>{a.value=e},isCookieEnabled:n},s},l=(e,t)=>{let{locale:n,isCookieEnabled:r}=t??{},i=c(n,r);return e.provide(o,i),a(e),e},u={install:l};Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return u}}),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}});
|
|
@@ -55,6 +55,6 @@ var c = (e) => {
|
|
|
55
55
|
}, p = (e, t) => {
|
|
56
56
|
let { locale: n, isCookieEnabled: r } = t ?? {}, i = f(n, r);
|
|
57
57
|
return e.provide(u, i), l(e), e;
|
|
58
|
-
};
|
|
58
|
+
}, m = { install: p };
|
|
59
59
|
//#endregion
|
|
60
|
-
export { l as i, f as n, p as r, u as t };
|
|
60
|
+
export { l as a, m as i, f as n, p as r, u as t };
|
|
@@ -29,7 +29,9 @@ export declare const createIntlayerClient: (locale?: LocalesValues, isCookieEnab
|
|
|
29
29
|
* import App from './App.vue';
|
|
30
30
|
*
|
|
31
31
|
* const app = createApp(App);
|
|
32
|
-
*
|
|
32
|
+
*
|
|
33
|
+
* installIntlayer(app);
|
|
34
|
+
*
|
|
33
35
|
* app.mount('#app');
|
|
34
36
|
* ```
|
|
35
37
|
*/
|
|
@@ -37,3 +39,20 @@ export declare const installIntlayer: (app: App, options?: {
|
|
|
37
39
|
locale?: LocalesValues;
|
|
38
40
|
isCookieEnabled?: boolean;
|
|
39
41
|
}) => App<any>;
|
|
42
|
+
/**
|
|
43
|
+
* Vue plugin object for Intlayer. Can be used with `app.use(intlayer)`.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* import { createApp } from 'vue';
|
|
48
|
+
* import { intlayer } from 'vue-intlayer';
|
|
49
|
+
* import App from './App.vue';
|
|
50
|
+
*
|
|
51
|
+
* const app = createApp(App);
|
|
52
|
+
* app.use(intlayer);
|
|
53
|
+
* app.mount('#app');
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
export declare const intlayer: {
|
|
57
|
+
install: typeof installIntlayer;
|
|
58
|
+
};
|
|
@@ -19,4 +19,4 @@
|
|
|
19
19
|
*/
|
|
20
20
|
export declare const useDate: () => import('vue').ComputedRef<(date: string | number | Date, options?: (Intl.DateTimeFormatOptions & {
|
|
21
21
|
locale?: import('intlayer').LocalesValues;
|
|
22
|
-
}) | undefined) => string>;
|
|
22
|
+
}) | import('@intlayer/core/formatters').DateTimePreset | undefined) => string>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { HTMLRenderer, type
|
|
2
|
-
export { type IntlayerHTMLPluginOptions, type IntlayerHTMLProvider, installIntlayerHTML, type RenderHTMLFunction, type RenderHTMLOptions, useHTML, } from './installIntlayerHTML';
|
|
1
|
+
export { HTMLRenderer, type RenderHTMLProps, renderHTML, useHTMLRenderer, } from './HTMLRenderer';
|
|
2
|
+
export { type IntlayerHTMLPluginOptions, type IntlayerHTMLProvider, installIntlayerHTML, intlayerHTML, type RenderHTMLFunction, type RenderHTMLOptions, useHTML, } from './installIntlayerHTML';
|
|
3
3
|
export type { HTMLComponents } from './types';
|
|
@@ -27,6 +27,37 @@ export type IntlayerHTMLPluginOptions = {
|
|
|
27
27
|
export declare const createIntlayerHTMLClient: (renderHTML: RenderHTMLFunction) => IntlayerHTMLProvider;
|
|
28
28
|
/**
|
|
29
29
|
* Helper to install the IntlayerHTML provider into the app
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* import { createApp } from 'vue';
|
|
34
|
+
* import { installIntlayerHTML } from 'vue-intlayer/html';
|
|
35
|
+
* import App from './App.vue';
|
|
36
|
+
*
|
|
37
|
+
* const app = createApp(App);
|
|
38
|
+
*
|
|
39
|
+
* installIntlayerHTML(app);
|
|
40
|
+
*
|
|
41
|
+
* app.mount('#app');
|
|
42
|
+
* ```
|
|
30
43
|
*/
|
|
31
44
|
export declare const installIntlayerHTML: (app: App<any>, pluginOptions?: IntlayerHTMLPluginOptions | RenderHTMLFunction) => void;
|
|
45
|
+
/**
|
|
46
|
+
* Vue plugin object for IntlayerHTML. Can be used with `app.use(intlayerHTML)`.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* import { createApp } from 'vue';
|
|
51
|
+
* import { intlayerHTML } from 'vue-intlayer/html';
|
|
52
|
+
*
|
|
53
|
+
* const app = createApp(App);
|
|
54
|
+
*
|
|
55
|
+
* app.use(intlayerHTML, { components: { p: MyP } });
|
|
56
|
+
*
|
|
57
|
+
* app.mount('#app');
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
export declare const intlayerHTML: {
|
|
61
|
+
install: typeof installIntlayerHTML;
|
|
62
|
+
};
|
|
32
63
|
export declare const useHTML: () => IntlayerHTMLProvider | undefined;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { compileMarkdown } from './compiler';
|
|
2
|
-
export { type IntlayerMarkdownPluginOptions, type IntlayerMarkdownProvider, installIntlayerMarkdown, type MarkdownProviderOptions, type RenderMarkdownFunction, useMarkdown, } from './installIntlayerMarkdown';
|
|
2
|
+
export { type IntlayerMarkdownPluginOptions, type IntlayerMarkdownProvider, installIntlayerMarkdown, intlayerMarkdown, type MarkdownProviderOptions, type RenderMarkdownFunction, useMarkdown, } from './installIntlayerMarkdown';
|
|
3
3
|
export { MarkdownRenderer, type MarkdownRendererProps, type RenderMarkdownProps, renderMarkdown, useMarkdownRenderer, } from './MarkdownRenderer';
|
|
@@ -41,6 +41,37 @@ export type IntlayerMarkdownPluginOptions = MarkdownPluginOptions & {
|
|
|
41
41
|
export declare const createIntlayerMarkdownClient: (renderMarkdown: RenderMarkdownFunction, components?: HTMLComponents<"permissive", {}>) => IntlayerMarkdownProvider;
|
|
42
42
|
/**
|
|
43
43
|
* Helper to install the IntlayerMarkdown provider into the app
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* import { createApp } from 'vue';
|
|
48
|
+
* import { installIntlayerMarkdown } from 'vue-intlayer/markdown';
|
|
49
|
+
* import App from './App.vue';
|
|
50
|
+
*
|
|
51
|
+
* const app = createApp(App);
|
|
52
|
+
*
|
|
53
|
+
* installIntlayerMarkdown(app);
|
|
54
|
+
*
|
|
55
|
+
* app.mount('#app');
|
|
56
|
+
* ```
|
|
44
57
|
*/
|
|
45
58
|
export declare const installIntlayerMarkdown: (app: App<any>, pluginOptions?: IntlayerMarkdownPluginOptions | RenderMarkdownFunction) => void;
|
|
59
|
+
/**
|
|
60
|
+
* Vue plugin object for IntlayerMarkdown. Can be used with `app.use(intlayerMarkdown)`.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* import { createApp } from 'vue';
|
|
65
|
+
* import { intlayerMarkdown } from 'vue-intlayer/markdown';
|
|
66
|
+
*
|
|
67
|
+
* const app = createApp(App);
|
|
68
|
+
*
|
|
69
|
+
* app.use(intlayerMarkdown, { forceBlock: true });
|
|
70
|
+
*
|
|
71
|
+
* app.mount('#app');
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
export declare const intlayerMarkdown: {
|
|
75
|
+
install: typeof installIntlayerMarkdown;
|
|
76
|
+
};
|
|
46
77
|
export declare const useMarkdown: () => IntlayerMarkdownProvider;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-intlayer",
|
|
3
|
-
"version": "8.5.
|
|
3
|
+
"version": "8.5.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Easily internationalize i18n your Vue applications with type-safe multilingual content management.",
|
|
6
6
|
"keywords": [
|
|
@@ -102,11 +102,11 @@
|
|
|
102
102
|
"typecheck": "vue-tsc --noEmit --project tsconfig.types.json"
|
|
103
103
|
},
|
|
104
104
|
"dependencies": {
|
|
105
|
-
"@intlayer/api": "8.5.
|
|
106
|
-
"@intlayer/config": "8.5.
|
|
107
|
-
"@intlayer/core": "8.5.
|
|
108
|
-
"@intlayer/editor": "8.5.
|
|
109
|
-
"@intlayer/types": "8.5.
|
|
105
|
+
"@intlayer/api": "8.5.2",
|
|
106
|
+
"@intlayer/config": "8.5.2",
|
|
107
|
+
"@intlayer/core": "8.5.2",
|
|
108
|
+
"@intlayer/editor": "8.5.2",
|
|
109
|
+
"@intlayer/types": "8.5.2"
|
|
110
110
|
},
|
|
111
111
|
"devDependencies": {
|
|
112
112
|
"@types/node": "25.5.0",
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
"vue-tsc": "3.1.5"
|
|
126
126
|
},
|
|
127
127
|
"peerDependencies": {
|
|
128
|
-
"intlayer": "8.5.
|
|
128
|
+
"intlayer": "8.5.2",
|
|
129
129
|
"vue": ">=3.0.0"
|
|
130
130
|
},
|
|
131
131
|
"peerDependenciesMeta": {
|