vue-intlayer 8.7.11 → 8.7.13
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/README.md +27 -1
- package/dist/cjs/UI/ContentSelector.cjs +1 -1
- 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/useLoadDynamic.cjs +1 -1
- package/dist/cjs/client/useLocale.cjs +1 -1
- package/dist/cjs/client/useLocaleStorage.cjs +1 -1
- package/dist/cjs/client/useRewriteURL.cjs +1 -1
- package/dist/cjs/editor/ContentSelector.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/getDictionary.cjs +1 -1
- package/dist/cjs/getIntlayer.cjs +1 -1
- package/dist/cjs/html/HTMLRenderer.cjs +1 -1
- package/dist/cjs/html/installIntlayerHTML.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/markdown/MarkdownRenderer.cjs +1 -1
- package/dist/cjs/markdown/compiler.cjs +1 -1
- package/dist/cjs/markdown/installIntlayerMarkdown.cjs +1 -1
- package/dist/cjs/markdown/runtime.cjs +1 -1
- package/dist/cjs/plugins.cjs +1 -1
- package/dist/cjs/renderIntlayerNode.cjs +1 -1
- package/dist/{types/editor → editor}/ContentSelector.vue.d.ts +3 -2
- package/dist/esm/client/index.mjs +2 -2
- package/dist/esm/client/installIntlayer.mjs +23 -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/ContentSelector.mjs +25 -2
- package/dist/esm/editor/useEditor.mjs +47 -2
- 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 +10 -9
- package/dist/esm/plugins.mjs +80 -81
- package/dist/plugins-DCpi7fYK.js +1 -0
- package/package.json +8 -8
- package/dist/ContentSelector-BUs8zVld.js +0 -1
- package/dist/ContentSelector-CJ8wOzKS.mjs +0 -24
- package/dist/installIntlayer-BkiEiexB.mjs +0 -62
- package/dist/installIntlayer-mdeEN-3u.js +0 -1
- package/dist/plugins-DqGu9jRk.js +0 -1
- package/dist/{types/client → client}/index.d.ts +0 -0
- package/dist/{types/client → client}/installIntlayer.d.ts +0 -0
- package/dist/{types/client → client}/useDictionary.d.ts +0 -0
- package/dist/{types/client → client}/useDictionaryAsync.d.ts +0 -0
- package/dist/{types/client → client}/useDictionaryDynamic.d.ts +0 -0
- package/dist/{types/client → client}/useIntlayer.d.ts +0 -0
- package/dist/{types/client → client}/useLoadDynamic.d.ts +0 -0
- package/dist/{types/client → client}/useLocale.d.ts +0 -0
- package/dist/{types/client → client}/useLocaleStorage.d.ts +0 -0
- package/dist/{types/client → client}/useRewriteURL.d.ts +0 -0
- package/dist/{types/editor → editor}/useEditor.d.ts +0 -0
- package/dist/{types/format → format}/index.d.ts +0 -0
- package/dist/{types/format → format}/useCompact.d.ts +0 -0
- package/dist/{types/format → format}/useCurrency.d.ts +0 -0
- package/dist/{types/format → format}/useDate.d.ts +0 -0
- package/dist/{types/format → format}/useIntl.d.ts +0 -0
- package/dist/{types/format → format}/useList.d.ts +0 -0
- package/dist/{types/format → format}/useNumber.d.ts +0 -0
- package/dist/{types/format → format}/usePercentage.d.ts +0 -0
- package/dist/{types/format → format}/useRelativeTime.d.ts +0 -0
- package/dist/{types/format → format}/useUnit.d.ts +0 -0
- package/dist/{types/getDictionary.d.ts → getDictionary.d.ts} +0 -0
- package/dist/{types/getIntlayer.d.ts → getIntlayer.d.ts} +0 -0
- package/dist/{types/html → html}/HTMLRenderer.d.ts +98 -98
- package/dist/{types/html → html}/index.d.ts +0 -0
- package/dist/{types/html → html}/installIntlayerHTML.d.ts +0 -0
- package/dist/{types/html → html}/types.d.ts +0 -0
- package/dist/{types/index.d.ts → index.d.ts} +0 -0
- package/dist/{types/markdown → markdown}/MarkdownRenderer.d.ts +98 -98
- /package/dist/{types/markdown → markdown}/compiler.d.ts +0 -0
- /package/dist/{types/markdown → markdown}/index.d.ts +0 -0
- /package/dist/{types/markdown → markdown}/installIntlayerMarkdown.d.ts +0 -0
- /package/dist/{types/markdown → markdown}/runtime.d.ts +0 -0
- /package/dist/{types/plugins.d.ts → plugins.d.ts} +0 -0
- /package/dist/{types/renderIntlayerNode.d.ts → renderIntlayerNode.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -190,7 +190,22 @@ Explore our comprehensive documentation to get started with Intlayer and learn h
|
|
|
190
190
|
<li><a href="https://intlayer.org/doc/environment/vite-and-react" rel=''>Vite + React</a></li>
|
|
191
191
|
<li><a href="https://intlayer.org/doc/environment/vite-and-react" rel=''>Vite + React using Compiler</a></li>
|
|
192
192
|
<li><a href="https://intlayer.org/doc/environment/vite-and-react/compiler" rel=''>React-router-v7</a></li>
|
|
193
|
-
<li><a href="https://intlayer.org/doc/environment/
|
|
193
|
+
<li><a href="https://intlayer.org/doc/environment/tanstack-start" rel=''>Tanstack start</a>
|
|
194
|
+
<ul>
|
|
195
|
+
<li><a href="https://intlayer.org/doc/environment/tanstack-start/solid" rel=''>Solid</a></li>
|
|
196
|
+
</ul>
|
|
197
|
+
</li>
|
|
198
|
+
<li><a href="https://intlayer.org/doc/environment/astro" rel=''>Astro</a>
|
|
199
|
+
<ul>
|
|
200
|
+
<li><a href="https://intlayer.org/doc/environment/astro/react" rel=''>React</a></li>
|
|
201
|
+
<li><a href="https://intlayer.org/doc/environment/astro/vue" rel=''>Vue</a></li>
|
|
202
|
+
<li><a href="https://intlayer.org/doc/environment/astro/svelte" rel=''>Svelte</a></li>
|
|
203
|
+
<li><a href="https://intlayer.org/doc/environment/astro/solid" rel=''>Solid</a></li>
|
|
204
|
+
<li><a href="https://intlayer.org/doc/environment/astro/vanilla" rel=''>Vanilla JS</a></li>
|
|
205
|
+
<li><a href="https://intlayer.org/doc/environment/astro/lit" rel=''>Lit</a></li>
|
|
206
|
+
</ul>
|
|
207
|
+
</li>
|
|
208
|
+
|
|
194
209
|
<li><a href="https://intlayer.org/doc/environment/react-native-and-expo" rel=''>React Native</a></li>
|
|
195
210
|
<li><a href="https://intlayer.org/doc/environment/vite-and-svelte" rel=''>Vite + Svelte</a></li>
|
|
196
211
|
<li><a href="https://intlayer.org/doc/environment/sveltekit" rel=''>SvelteKit</a></li>
|
|
@@ -212,6 +227,17 @@ Explore our comprehensive documentation to get started with Intlayer and learn h
|
|
|
212
227
|
</ul>
|
|
213
228
|
</details>
|
|
214
229
|
|
|
230
|
+
<details>
|
|
231
|
+
<summary style="font-size:16px; font-weight:bold;">📊 Benchmark</summary>
|
|
232
|
+
<ul>
|
|
233
|
+
<li><a href="https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/benchmark/nextjs.md" rel=''>Next.js</a></li>
|
|
234
|
+
<li><a href="https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/benchmark/tanstack.md" rel=''>TanStack Start</a></li>
|
|
235
|
+
<li><a href="https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/benchmark/vue.md" rel=''>Vue</a></li>
|
|
236
|
+
<li><a href="https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/benchmark/solid.md" rel=''>Solid</a></li>
|
|
237
|
+
<li><a href="https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/benchmark/svelte.md" rel=''>Svelte</a></li>
|
|
238
|
+
</ul>
|
|
239
|
+
</details>
|
|
240
|
+
|
|
215
241
|
<details>
|
|
216
242
|
<summary style="font-size:16px; font-weight:bold;">📰 Blog</summary>
|
|
217
243
|
<ul>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../plugins-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../plugins-DCpi7fYK.js`);let e=require(`vue`);var t=250,n=(0,e.defineComponent)({__name:`ContentSelector`,props:{onClickOutside:{type:Function},pressDuration:{},isSelecting:{type:Boolean}},emits:[`click`,`press`,`hover`,`unhover`],setup(n,{emit:r}){let i=n,a=r,o=(0,e.ref)(null),s=(0,e.ref)(!1),c=(0,e.ref)(i.isSelecting??!1),l=(0,e.ref)(null),u=(0,e.computed)(()=>i.isSelecting??c.value),d=(0,e.computed)(()=>{let t=(0,e.useSlots)().default?.();return t?.length===1&&typeof t[0].children==`string`}),f=()=>{c.value=!0,a(`press`)},p=()=>{l.value=setTimeout(()=>{f()},i.pressDuration??t)},m=()=>{l.value&&=(clearTimeout(l.value),null)},h=()=>{m(),p()},g=()=>{s.value&&(s.value=!1,a(`unhover`)),m()},_=()=>{s.value&&(s.value=!1,a(`unhover`)),m()},v=e=>{o.value&&!o.value.contains(e.target)&&(c.value=!1,i.onClickOutside?.())},y=e=>{u.value&&(e.preventDefault(),e.stopPropagation())},b=()=>{c.value=!1};return(0,e.onMounted)(()=>{document.addEventListener(`mousedown`,v)}),(0,e.onBeforeUnmount)(()=>{document.removeEventListener(`mousedown`,v),m()}),(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`span`,{ref_key:`containerRef`,ref:o,role:`button`,tabindex:`0`,onClick:y,onMousedown:h,onMouseup:g,onMouseleave:_,onTouchstart:h,onTouchend:g,onTouchcancel:_,onBlur:b,onMouseenter:n[0]||=()=>{s.value=!0,a(`hover`)},style:(0,e.normalizeStyle)({display:d.value?`inline`:`inline-block`,cursor:`pointer`,userSelect:`none`,borderRadius:`0.375rem`,outlineWidth:`2px`,outlineOffset:`4px`,outlineStyle:`solid`,outlineColor:u.value||s.value?`inherit`:`transparent`,transition:`all 100ms 50ms ease-in-out`})},[(0,e.renderSlot)(t.$slots,`default`)],36))}});exports.default=n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./installIntlayer.cjs`),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.INTLAYER_SYMBOL,exports.atPath=t.atPath,exports.createIntlayerClient=e.createIntlayerClient,exports.createIntlayerLeafProxy=t.createIntlayerLeafProxy,exports.installIntlayer=e.installIntlayer,exports.intlayer=e.intlayer,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`})
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-DCpi7fYK.js`);let e=require(`vue`),t=require(`@intlayer/config/built`),n=require(`@intlayer/config/client`);var r=Symbol(`intlayer`),i=null,a=(r,a=!0)=>{if(i)return i;(0,n.setIntlayerIdentifier)();let{defaultLocale:o}=t.internationalization??{},s=(0,e.ref)(r??o);return i={locale:(0,e.readonly)(s),setLocale:e=>{s.value=e},isCookieEnabled:a},i},o=(e,t)=>{let{locale:n,isCookieEnabled:i}=t??{},o=a(n,i);return e.provide(r,o),process.env.INTLAYER_EDITOR_ENABLED!==`false`&&Promise.resolve().then(()=>require(`../editor/useEditor.cjs`)).then(({useEditor:t})=>{t(e)}),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`}),require(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-DCpi7fYK.js`);const e=require(`../getDictionary.cjs`),t=require(`./installIntlayer.cjs`);let n=require(`vue`),r=require(`@intlayer/config/built`);var i=(e,t)=>t.reduce((e,t)=>e?.[t],e),a=e=>typeof e==`object`&&!!e,o=e=>typeof e==`function`||a(e)&&(`render`in e||`setup`in e),s=e=>e!=null&&(typeof e==`object`||typeof e==`function`)&&`__update`in e&&`render`in e&&`raw`in e,c=e=>(0,n.markRaw)((0,n.defineComponent)({name:`IntlayerLeaf`,setup(){return()=>{let t=e();return t==null?null:o(t)?(0,n.h)(t):Array.isArray(t)?(0,n.h)(`span`,t):t}}})),l=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 c(()=>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}}}),u=(u,d)=>{let f=(0,n.getCurrentInstance)()?(0,n.inject)(t.INTLAYER_SYMBOL):void 0,p=(0,n.isRef)(f?.locale)?f.locale:(0,n.ref)(f?.locale??r.internationalization.defaultLocale),m=(0,n.computed)(()=>(d===void 0?void 0:(0,n.toValue)(d))??p.value),h=(0,n.shallowRef)({});(0,n.watch)([()=>(0,n.toValue)(u),()=>m.value],([t,n])=>{h.value=e.getDictionary(t,n)},{immediate:!0,flush:`sync`});let g=e=>new Proxy({},{get(t,r,u){if(r===`__v_isRef`)return!0;let d=(0,n.computed)(()=>i(h.value,e));if(r===`value`)return d.value??``;if(r===`then`)return;if(r===`c`||r===`asComponent`)return c(()=>d.value);if(r===`$raw`)return d;if(r===Symbol.toPrimitive)return()=>d.value;let f=e.concat(r),p=i(h.value,f);if(p===void 0||a(p)&&!o(p))return g(f);if(s(p))return l((0,n.computed)(()=>i(h.value,f)));let m=(0,n.computed)(()=>i(h.value,f));return new Proxy(m,{get(e,t,n){return t===`value`?e.value??``:Reflect.get(e,t,n)}})},ownKeys(){let t=i(h.value,e);return a(t)?Reflect.ownKeys(t):[]},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return g([])};exports.atPath=i,exports.createIntlayerLeafProxy=l,exports.isComponentLike=o,exports.isIntlayerNode=s,exports.isObjectLike=a,exports.toComponent=c,exports.useDictionary=u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-DCpi7fYK.js`);const e=require(`./installIntlayer.cjs`),t=require(`./useDictionary.cjs`);let n=require(`vue`),r=require(`@intlayer/config/built`);var i=async(i,a)=>{let o=(0,n.inject)(e.INTLAYER_SYMBOL),s=(0,n.computed)(()=>a??o?.locale?.value??r.internationalization.defaultLocale),c=(0,n.ref)(await i[s.value]?.());return(0,n.watch)(()=>s.value,async e=>{let t=await i[e]?.();t&&(c.value=t)}),t.useDictionary(c,s)};exports.useDictionaryAsync=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-DCpi7fYK.js`);const e=require(`../getIntlayer.cjs`),t=require(`./installIntlayer.cjs`),n=require(`./useDictionary.cjs`);let r=require(`vue`),i=require(`@intlayer/config/built`);var a=(a,o)=>{let s=(0,r.inject)(t.INTLAYER_SYMBOL),c=(0,r.isRef)(s?.locale)?s.locale:(0,r.ref)(s?.locale??i.internationalization.defaultLocale),l=(0,r.computed)(()=>(o===void 0?void 0:(0,r.toValue)(o))??c.value),u=(0,r.shallowRef)({});(0,r.watch)([()=>(0,r.toValue)(a),()=>l.value],([t,n])=>{u.value=e.getIntlayer(t,n)},{immediate:!0,flush:`sync`});let d=new Map,f=e=>{let t=e.join(`.`);if(d.has(t))return d.get(t);let i=(0,r.computed)(()=>n.atPath(u.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(u.value,s);if(c===void 0||n.isObjectLike(c)&&!n.isComponentLike(c))return f(s);if(n.isIntlayerNode(c))return n.createIntlayerLeafProxy((0,r.computed)(()=>n.atPath(u.value,s)));let l=(0,r.computed)(()=>n.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=n.atPath(u.value,e);return n.isObjectLike(t)?Reflect.ownKeys(t):[]},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return d.set(t,a),a};return f([])};exports.useIntlayer=a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-DCpi7fYK.js`);let e=require(`vue`);var t=(n,r)=>{let i=t._cache??=new Map,a=(0,e.reactive)({});if(i.has(n))i.get(n)?.then(e=>{Object.assign(a,e)});else{let e=r.then(e=>(Object.assign(a,e),e));i.set(n,e)}return a};exports.useLoadDynamic=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-DCpi7fYK.js`);const e=require(`./installIntlayer.cjs`),t=require(`./useLocaleStorage.cjs`);let n=require(`vue`),r=require(`@intlayer/config/built`);var i=({isCookieEnabled:i,onLocaleChange:a}={})=>{let{defaultLocale:o,locales:s}=r.internationalization??{},c=(0,n.inject)(e.INTLAYER_SYMBOL);return{locale:(0,n.computed)(()=>c?.locale?.value??o),defaultLocale:o,availableLocales:s,setLocale:e=>{if(!s?.map(String).includes(e)){console.error(`Locale ${e} is not available`);return}c&&c.setLocale(e),t.setLocaleInStorage(e,i??c?.isCookieEnabled??!0),a?.(e)}}};exports.useLocale=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-DCpi7fYK.js`);let e=require(`vue`),t=require(`@intlayer/core/localization`),n=require(`@intlayer/core/utils`);var r=(0,n.getLocaleFromStorageClient)(t.localeStorageOptions),i=r,a=(e,r)=>(0,n.setLocaleInStorageClient)(e,{...t.localeStorageOptions,isCookieEnabled:r}),o=a,s=r=>{let i=(0,n.LocaleStorageClient)({...t.localeStorageOptions,isCookieEnabled:r});return{localeStorage:(0,e.computed)(()=>i.getLocale()),setLocaleStorage:i.setLocale}},c=s;exports.localeCookie=i,exports.localeInStorage=r,exports.setLocaleCookie=o,exports.setLocaleInStorage=a,exports.useLocaleCookie=c,exports.useLocaleStorage=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-DCpi7fYK.js`);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 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../plugins-DCpi7fYK.js`);let e=require(`vue`),t=require(`@intlayer/editor/isEnabled`);var n=(0,e.defineComponent)({name:`ContentSelector`,props:{dictionaryKey:{type:String,required:!0},keyPath:{type:Array,required:!0}},setup(n,{slots:r}){return()=>process.env.INTLAYER_EDITOR_ENABLED===`false`||!t.isEnabled?r.default?.():(0,e.h)(`intlayer-content-selector-wrapper`,{"key-path":JSON.stringify(n.keyPath),"dictionary-key":n.dictionaryKey},r.default?.())}});exports.default=n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-DCpi7fYK.js`);const e=require(`../client/installIntlayer.cjs`);let t=require(`vue`),n=require(`@intlayer/editor/isEnabled`);var r=e=>{let n=null,r=!1;return import(`@intlayer/editor`).then(({initEditorClient:i})=>{if(r)return;let a=i();e&&(n=(0,t.watchEffect)(()=>{let t=e.value;t&&a.currentLocale.set(t)}))}),()=>{r=!0,n?.(),import(`@intlayer/editor`).then(({stopEditorClient:e})=>{e()})}},i=i=>{if(process.env.INTLAYER_EDITOR_ENABLED===`false`||!n.isEnabled)return;if(i){let t=null;i.mixin({inject:{_intlayerClient:{from:e.INTLAYER_SYMBOL,default:null}},mounted(){if(this.$parent!==null)return;let e=this._intlayerClient;t=r(e?.locale)},unmounted(){this.$parent===null&&t?.()}});return}let a=(0,t.inject)(e.INTLAYER_SYMBOL),o=null;(0,t.onMounted)(()=>{o=r(a?.locale)}),(0,t.onUnmounted)(()=>{o?.()})};exports.useEditor=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-DCpi7fYK.js`);const e=require(`../client/installIntlayer.cjs`);let t=require(`vue`),n=require(`@intlayer/core/formatters`);var r=()=>{let r=(0,t.inject)(e.INTLAYER_SYMBOL);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(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-DCpi7fYK.js`);const e=require(`../client/installIntlayer.cjs`);let t=require(`vue`),n=require(`@intlayer/core/formatters`);var r=()=>{let r=(0,t.inject)(e.INTLAYER_SYMBOL);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(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-DCpi7fYK.js`);const e=require(`../client/installIntlayer.cjs`);let t=require(`vue`),n=require(`@intlayer/core/formatters`);var r=()=>{let r=(0,t.inject)(e.INTLAYER_SYMBOL);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(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-DCpi7fYK.js`);const e=require(`../client/installIntlayer.cjs`);let t=require(`vue`),n=require(`@intlayer/core/utils`);var r=r=>{let i=(0,t.inject)(e.INTLAYER_SYMBOL);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(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-DCpi7fYK.js`);const e=require(`../client/installIntlayer.cjs`);let t=require(`vue`),n=require(`@intlayer/core/formatters`);var r=()=>{let r=(0,t.inject)(e.INTLAYER_SYMBOL);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(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-DCpi7fYK.js`);const e=require(`../client/installIntlayer.cjs`);let t=require(`vue`),n=require(`@intlayer/core/formatters`);var r=()=>{let r=(0,t.inject)(e.INTLAYER_SYMBOL);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(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-DCpi7fYK.js`);const e=require(`../client/installIntlayer.cjs`);let t=require(`vue`),n=require(`@intlayer/core/formatters`);var r=()=>{let r=(0,t.inject)(e.INTLAYER_SYMBOL);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(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-DCpi7fYK.js`);const e=require(`../client/installIntlayer.cjs`);let t=require(`vue`),n=require(`@intlayer/core/formatters`);var r=()=>{let r=(0,t.inject)(e.INTLAYER_SYMBOL);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(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-DCpi7fYK.js`);const e=require(`../client/installIntlayer.cjs`);let t=require(`vue`),n=require(`@intlayer/core/formatters`);var r=()=>{let r=(0,t.inject)(e.INTLAYER_SYMBOL);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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../plugins-DCpi7fYK.js`);let t=require(`@intlayer/core/interpreter`);var n=(n,r)=>(0,t.getDictionary)(n,r,e.t(r));exports.getDictionary=n;
|
package/dist/cjs/getIntlayer.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../plugins-DCpi7fYK.js`);let t=require(`@intlayer/core/interpreter`);var n=(n,r)=>(0,t.getIntlayer)(n,r,e.t(r));exports.getIntlayer=n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-DCpi7fYK.js`);const e=require(`./installIntlayerHTML.cjs`);let t=require(`vue`),n=require(`@intlayer/core/interpreter`);var r=(e,{components:r={}}={})=>{let i=Object.fromEntries(Object.entries(r).filter(([,e])=>e).map(([e,n])=>[e,e=>(0,t.h)(n,e,e?.children)]));return(0,n.getHTML)(e,new Proxy(i,{get(e,n){if(typeof n==`string`&&n in e)return e[n];if(typeof n==`string`&&/^[a-z][a-z0-9]*$/.test(n))return e=>(0,t.h)(n,e,e?.children)}}))},i=({components:t}={})=>{let n=e.useHTML();return e=>n?n.renderHTML(e,{components:t}):r(e,{components:t})},a=(0,t.defineComponent)({name:`HTMLRenderer`,props:{content:{type:String,required:!0},components:{type:Object,default:void 0}},setup(e){let t=i({components:e.components});return()=>t(e.content)}});exports.HTMLRenderer=a,exports.renderHTML=r,exports.useHTMLRenderer=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-DCpi7fYK.js`);let e=require(`vue`),t=require(`@intlayer/core/interpreter`);var n=Symbol(`intlayerHTML`),r=null,i=e=>r||(r={renderHTML:e},r),a=(r,a)=>{let o;if(typeof a==`function`)o=a;else{let{components:e,renderHTML:n}=a??{};o=n||((n,r)=>{let{components:i,...a}=r&&typeof r==`object`&&`components`in r?r:{components:r},o=i||a;return(0,t.getHTML)(n,{...e,...o})})}let s=i((t,r)=>typeof a==`function`||typeof a==`object`&&a?.renderHTML?{setup(){return(0,e.provide)(n,{renderHTML:void 0}),()=>o(t,r)}}:o(t,r));r.provide(n,s)},o={install:a},s=()=>(0,e.inject)(n);exports.INTLAYER_HTML_SYMBOL=n,exports.createIntlayerHTMLClient=i,exports.installIntlayerHTML=a,exports.intlayerHTML=o,exports.useHTML=s;
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../plugins-DCpi7fYK.js`),t=require(`./getIntlayer.cjs`),n=require(`./getDictionary.cjs`),r=require(`./client/installIntlayer.cjs`),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`);const d=require(`./editor/useEditor.cjs`);exports.INTLAYER_SYMBOL=r.INTLAYER_SYMBOL,exports.atPath=i.atPath,exports.createIntlayerClient=r.createIntlayerClient,exports.createIntlayerLeafProxy=i.createIntlayerLeafProxy,exports.getDictionary=n.getDictionary,exports.getIntlayer=t.getIntlayer,exports.getPlugins=e.t,exports.htmlPlugin=e.n,exports.insertionPlugin=e.r,exports.installIntlayer=r.installIntlayer,exports.intlayer=r.intlayer,exports.intlayerNodePlugins=e.i,exports.isComponentLike=i.isComponentLike,exports.isIntlayerNode=i.isIntlayerNode,exports.isObjectLike=i.isObjectLike,exports.markdownPlugin=e.a,exports.markdownStringPlugin=e.o,exports.toComponent=i.toComponent,exports.useDictionary=i.useDictionary,exports.useDictionaryAsync=a.useDictionaryAsync,exports.useDictionaryDynamic=o.useDictionaryDynamic,exports.useEditor=d.useEditor,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`}),require(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-DCpi7fYK.js`);const e=require(`./installIntlayerMarkdown.cjs`);let t=require(`vue`);var n=async(e,{components:t,wrapper:n,forceBlock:r,forceInline:i,preserveFrontmatter:a,tagfilter:o}={})=>{let s={components:t,forceBlock:r,forceInline:i,wrapper:n,forceWrapper:!!n,preserveFrontmatter:a,tagfilter:o},{compileMarkdown:c}=await Promise.resolve().then(()=>require(`./compiler.cjs`));return c(e,s)},r=({components:t,wrapper:r,forceBlock:i,forceInline:a,preserveFrontmatter:o,tagfilter:s}={})=>{try{let{renderMarkdown:n,components:c}=e.useMarkdown();return e=>n(e,{forceBlock:i,forceInline:a,preserveFrontmatter:o,tagfilter:s},{...c??{},...t??{}},r)}catch{return e=>n(e,{components:t,wrapper:r,forceBlock:i,forceInline:a,preserveFrontmatter:o,tagfilter:s})}},i=(0,t.defineComponent)({name:`Markdown`,props:{content:{type:String,default:``},components:{type:Object,default:void 0},wrapper:{type:[String,Object,Function],default:void 0},forceBlock:{type:Boolean,default:void 0},forceInline:{type:Boolean,default:void 0},preserveFrontmatter:{type:Boolean,default:void 0},tagfilter:{type:Boolean,default:void 0},renderMarkdown:{type:Function,default:void 0}},setup(e){let{renderMarkdown:t}=e;if(t)return()=>t(e.content,{forceBlock:e.forceBlock,forceInline:e.forceInline,preserveFrontmatter:e.preserveFrontmatter,tagfilter:e.tagfilter},e.components,e.wrapper);try{let t=r({components:e.components,wrapper:e.wrapper,forceBlock:e.forceBlock,forceInline:e.forceInline,preserveFrontmatter:e.preserveFrontmatter,tagfilter:e.tagfilter});return()=>t(e.content)}catch{return()=>n(e.content,{components:e.components,wrapper:e.wrapper,forceBlock:e.forceBlock,forceInline:e.forceInline,preserveFrontmatter:e.preserveFrontmatter,tagfilter:e.tagfilter})}}});exports.MarkdownRenderer=i,exports.renderMarkdown=n,exports.useMarkdownRenderer=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-DCpi7fYK.js`);const e=require(`./runtime.cjs`);let t=require(`@intlayer/core/markdown`);var n=(n=``,r={})=>(0,t.compileWithOptions)(n,e.default,r),r=n,i=n;exports.RuleType=t.RuleType,exports.compile=i,exports.compileMarkdown=n,exports.compiler=r,exports.sanitizer=t.sanitizer,exports.slugify=t.slugify;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../plugins-DCpi7fYK.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 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../plugins-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../plugins-DCpi7fYK.js`);let e=require(`vue`);var t=e=>typeof e==`string`||typeof e==`symbol`?!1:typeof e==`function`||typeof e==`object`,n={createElement:(n,r,...i)=>i.length===0?(0,e.h)(n,r):t(n)?(0,e.h)(n,r,{default:()=>i}):i.length===1?(0,e.h)(n,r,i[0]):(0,e.h)(n,r,i),cloneElement:(t,n,...r)=>(0,e.cloneVNode)(t,n),Fragment:e.Fragment,normalizeProps:(e,t)=>{let n={};for(let[e,r]of Object.entries(t))e===`className`?n.class=r:e===`htmlFor`?n.for=r:e===`dangerouslySetInnerHTML`&&r?.__html?n.innerHTML=r.__html:n[e]=r;return n}},r=(e={})=>{let{onCreateElement:t}=e;return t?{...n,createElement:(e,n,...r)=>t(e,n,r)}:n};exports.createVueRuntime=r,exports.default=n,exports.vueRuntime=n;
|
package/dist/cjs/plugins.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../plugins-DCpi7fYK.js`);exports.getPlugins=e.t,exports.htmlPlugin=e.n,exports.insertionPlugin=e.r,exports.intlayerNodePlugins=e.i,exports.markdownPlugin=e.a,exports.markdownStringPlugin=e.o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../plugins-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../plugins-DCpi7fYK.js`);let e=require(`vue`);var t=({value:n,children:r,additionalProps:i={}})=>{let a=(0,e.ref)(n),o=typeof r==`function`?e=>r(e):()=>r,s=e=>(a.value,o(e)),c=(e=>s(e));return Object.setPrototypeOf(c,String.prototype),Object.assign(c,{render:s,toString:()=>String(a.value??``),valueOf:()=>a.value,[Symbol.toPrimitive]:()=>a.value,toJSON:()=>a.value,get raw(){return a.value},set raw(e){a.value=e},get value(){return a.value},use(e){return t({value:a.value,children:()=>o(e),additionalProps:i})},__update(e){o=e.render,this.raw=e.raw},...i}),(0,e.markRaw)(c)};exports.renderIntlayerNode=t;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
4
|
dictionaryKey: {
|
|
3
5
|
type: StringConstructor;
|
|
4
6
|
required: true;
|
|
@@ -21,4 +23,3 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
21
23
|
required: true;
|
|
22
24
|
};
|
|
23
25
|
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
24
|
-
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { INTLAYER_SYMBOL as e, createIntlayerClient as t, installIntlayer as n, intlayer as r } from "./installIntlayer.mjs";
|
|
2
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
3
|
import { useDictionaryAsync as d } from "./useDictionaryAsync.mjs";
|
|
4
4
|
import { useDictionaryDynamic as f } from "./useDictionaryDynamic.mjs";
|
|
@@ -6,4 +6,4 @@ import { useIntlayer as p } from "./useIntlayer.mjs";
|
|
|
6
6
|
import { useLoadDynamic as m } from "./useLoadDynamic.mjs";
|
|
7
7
|
import { useLocale as h } from "./useLocale.mjs";
|
|
8
8
|
import { useRewriteURL as g } from "./useRewriteURL.mjs";
|
|
9
|
-
export {
|
|
9
|
+
export { e as INTLAYER_SYMBOL, i as atPath, t as createIntlayerClient, a as createIntlayerLeafProxy, n as installIntlayer, r 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,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { readonly as e, ref as t } from "vue";
|
|
2
|
+
import { internationalization as n } from "@intlayer/config/built";
|
|
3
|
+
import { setIntlayerIdentifier as r } from "@intlayer/config/client";
|
|
4
|
+
//#region src/client/installIntlayer.ts
|
|
5
|
+
var i = Symbol("intlayer"), a = null, o = (i, o = !0) => {
|
|
6
|
+
if (a) return a;
|
|
7
|
+
r();
|
|
8
|
+
let { defaultLocale: s } = n ?? {}, c = t(i ?? s);
|
|
9
|
+
return a = {
|
|
10
|
+
locale: e(c),
|
|
11
|
+
setLocale: (e) => {
|
|
12
|
+
c.value = e;
|
|
13
|
+
},
|
|
14
|
+
isCookieEnabled: o
|
|
15
|
+
}, a;
|
|
16
|
+
}, s = (e, t) => {
|
|
17
|
+
let { locale: n, isCookieEnabled: r } = t ?? {}, a = o(n, r);
|
|
18
|
+
return e.provide(i, a), process.env.INTLAYER_EDITOR_ENABLED !== "false" && import("../editor/useEditor.mjs").then(({ useEditor: t }) => {
|
|
19
|
+
t(e);
|
|
20
|
+
}), e;
|
|
21
|
+
}, c = { install: s };
|
|
22
|
+
//#endregion
|
|
23
|
+
export { i as INTLAYER_SYMBOL, o as createIntlayerClient, s as installIntlayer, c as intlayer };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDictionary as e } from "../getDictionary.mjs";
|
|
2
|
-
import { t } from "
|
|
2
|
+
import { INTLAYER_SYMBOL as t } from "./installIntlayer.mjs";
|
|
3
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
4
|
import { internationalization as p } from "@intlayer/config/built";
|
|
5
5
|
//#region src/client/useDictionary.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { INTLAYER_SYMBOL as e } from "./installIntlayer.mjs";
|
|
2
2
|
import { useDictionary as t } from "./useDictionary.mjs";
|
|
3
3
|
import { computed as n, inject as r, ref as i, watch as a } from "vue";
|
|
4
4
|
import { internationalization as o } from "@intlayer/config/built";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getIntlayer as e } from "../getIntlayer.mjs";
|
|
2
|
-
import { t } from "
|
|
2
|
+
import { INTLAYER_SYMBOL as t } from "./installIntlayer.mjs";
|
|
3
3
|
import { atPath as n, createIntlayerLeafProxy as r, isComponentLike as i, isIntlayerNode as a, isObjectLike as o, toComponent as s } from "./useDictionary.mjs";
|
|
4
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
5
|
import { internationalization as h } from "@intlayer/config/built";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { INTLAYER_SYMBOL as e } from "./installIntlayer.mjs";
|
|
2
2
|
import { setLocaleInStorage as t } from "./useLocaleStorage.mjs";
|
|
3
3
|
import { computed as n, inject as r } from "vue";
|
|
4
4
|
import { internationalization as i } from "@intlayer/config/built";
|
|
@@ -1,2 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { defineComponent as e, h as t } from "vue";
|
|
2
|
+
import { isEnabled as n } from "@intlayer/editor/isEnabled";
|
|
3
|
+
//#endregion
|
|
4
|
+
//#region src/editor/ContentSelector.vue
|
|
5
|
+
var r = e({
|
|
6
|
+
name: "ContentSelector",
|
|
7
|
+
props: {
|
|
8
|
+
dictionaryKey: {
|
|
9
|
+
type: String,
|
|
10
|
+
required: !0
|
|
11
|
+
},
|
|
12
|
+
keyPath: {
|
|
13
|
+
type: Array,
|
|
14
|
+
required: !0
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
setup(e, { slots: r }) {
|
|
18
|
+
return () => process.env.INTLAYER_EDITOR_ENABLED === "false" || !n ? r.default?.() : t("intlayer-content-selector-wrapper", {
|
|
19
|
+
"key-path": JSON.stringify(e.keyPath),
|
|
20
|
+
"dictionary-key": e.dictionaryKey
|
|
21
|
+
}, r.default?.());
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
//#endregion
|
|
25
|
+
export { r as default };
|
|
@@ -1,2 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { INTLAYER_SYMBOL as e } from "../client/installIntlayer.mjs";
|
|
2
|
+
import { inject as t, onMounted as n, onUnmounted as r, watchEffect as i } from "vue";
|
|
3
|
+
import { isEnabled as a } from "@intlayer/editor/isEnabled";
|
|
4
|
+
//#region src/editor/useEditor.ts
|
|
5
|
+
var o = (e) => {
|
|
6
|
+
let t = null, n = !1;
|
|
7
|
+
return import("@intlayer/editor").then(({ initEditorClient: r }) => {
|
|
8
|
+
if (n) return;
|
|
9
|
+
let a = r();
|
|
10
|
+
e && (t = i(() => {
|
|
11
|
+
let t = e.value;
|
|
12
|
+
t && a.currentLocale.set(t);
|
|
13
|
+
}));
|
|
14
|
+
}), () => {
|
|
15
|
+
n = !0, t?.(), import("@intlayer/editor").then(({ stopEditorClient: e }) => {
|
|
16
|
+
e();
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
}, s = (i) => {
|
|
20
|
+
if (process.env.INTLAYER_EDITOR_ENABLED === "false" || !a) return;
|
|
21
|
+
if (i) {
|
|
22
|
+
let t = null;
|
|
23
|
+
i.mixin({
|
|
24
|
+
inject: { _intlayerClient: {
|
|
25
|
+
from: e,
|
|
26
|
+
default: null
|
|
27
|
+
} },
|
|
28
|
+
mounted() {
|
|
29
|
+
if (this.$parent !== null) return;
|
|
30
|
+
let e = this._intlayerClient;
|
|
31
|
+
t = o(e?.locale);
|
|
32
|
+
},
|
|
33
|
+
unmounted() {
|
|
34
|
+
this.$parent === null && t?.();
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
let s = t(e), c = null;
|
|
40
|
+
n(() => {
|
|
41
|
+
c = o(s?.locale);
|
|
42
|
+
}), r(() => {
|
|
43
|
+
c?.();
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
//#endregion
|
|
47
|
+
export { s as useEditor };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { INTLAYER_SYMBOL as e } from "../client/installIntlayer.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 {
|
|
1
|
+
import { INTLAYER_SYMBOL as e } from "../client/installIntlayer.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 {
|
|
1
|
+
import { INTLAYER_SYMBOL as e } from "../client/installIntlayer.mjs";
|
|
2
2
|
import { computed as t, inject as n } from "vue";
|
|
3
3
|
import { date as r, presets as i } from "@intlayer/core/formatters";
|
|
4
4
|
//#region src/format/useDate.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { INTLAYER_SYMBOL as e } from "../client/installIntlayer.mjs";
|
|
2
2
|
import { computed as t, inject as n } from "vue";
|
|
3
3
|
import { bindIntl as r } from "@intlayer/core/utils";
|
|
4
4
|
//#region src/format/useIntl.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { INTLAYER_SYMBOL as e } from "../client/installIntlayer.mjs";
|
|
2
2
|
import { computed as t, inject as n } from "vue";
|
|
3
3
|
import { list as r } from "@intlayer/core/formatters";
|
|
4
4
|
//#region src/format/useList.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { INTLAYER_SYMBOL as e } from "../client/installIntlayer.mjs";
|
|
2
2
|
import { computed as t, inject as n } from "vue";
|
|
3
3
|
import { number as r } from "@intlayer/core/formatters";
|
|
4
4
|
//#region src/format/useNumber.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { INTLAYER_SYMBOL as e } from "../client/installIntlayer.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 {
|
|
1
|
+
import { INTLAYER_SYMBOL as e } from "../client/installIntlayer.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
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { INTLAYER_SYMBOL as e } from "../client/installIntlayer.mjs";
|
|
2
2
|
import { computed as t, inject as n } from "vue";
|
|
3
3
|
import { units as r } from "@intlayer/core/formatters";
|
|
4
4
|
//#region src/format/useUnit.ts
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
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 { getIntlayer as o } from "./getIntlayer.mjs";
|
|
3
3
|
import { getDictionary as s } from "./getDictionary.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 { INTLAYER_SYMBOL as c, createIntlayerClient as l, installIntlayer as u, intlayer as d } from "./client/installIntlayer.mjs";
|
|
5
|
+
import { atPath as f, createIntlayerLeafProxy as p, isComponentLike as m, isIntlayerNode as h, isObjectLike as g, toComponent as _, useDictionary as v } from "./client/useDictionary.mjs";
|
|
6
|
+
import { useDictionaryAsync as y } from "./client/useDictionaryAsync.mjs";
|
|
7
|
+
import { useDictionaryDynamic as b } from "./client/useDictionaryDynamic.mjs";
|
|
8
|
+
import { useIntlayer as x } from "./client/useIntlayer.mjs";
|
|
9
|
+
import { useLoadDynamic as S } from "./client/useLoadDynamic.mjs";
|
|
10
|
+
import { useLocale as C } from "./client/useLocale.mjs";
|
|
11
|
+
import { useRewriteURL as w } from "./client/useRewriteURL.mjs";
|
|
12
12
|
import "./client/index.mjs";
|
|
13
|
-
|
|
13
|
+
import { useEditor as T } from "./editor/useEditor.mjs";
|
|
14
|
+
export { c as INTLAYER_SYMBOL, f as atPath, l as createIntlayerClient, p 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, 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, T as useEditor, x as useIntlayer, S as useLoadDynamic, C as useLocale, w as useRewriteURL };
|