vue-intlayer 8.4.10 → 8.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ContentSelector-CUggT4wa.mjs +25 -0
- package/dist/ContentSelector-CghEoylg.js +1 -0
- 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/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/html/index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/markdown/MarkdownRenderer.cjs +1 -1
- package/dist/cjs/markdown/index.cjs +1 -1
- package/dist/cjs/plugins.cjs +1 -1
- package/dist/cjs/vue-shims.d.cjs +0 -0
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/installIntlayer.mjs +1 -1
- package/dist/esm/client/useDictionary.mjs +21 -21
- 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 +1 -1
- package/dist/esm/editor/useEditor.mjs +1 -1
- package/dist/esm/format/useCompact.mjs +1 -1
- package/dist/esm/format/useCurrency.mjs +1 -1
- package/dist/esm/format/useDate.mjs +1 -1
- package/dist/esm/format/useIntl.mjs +1 -1
- package/dist/esm/format/useList.mjs +1 -1
- package/dist/esm/format/useNumber.mjs +1 -1
- package/dist/esm/format/usePercentage.mjs +1 -1
- package/dist/esm/format/useRelativeTime.mjs +1 -1
- package/dist/esm/format/useUnit.mjs +1 -1
- package/dist/esm/html/index.mjs +3 -3
- package/dist/esm/index.mjs +13 -21
- package/dist/esm/markdown/MarkdownRenderer.mjs +25 -23
- package/dist/esm/markdown/index.mjs +4 -5
- package/dist/esm/plugins.mjs +36 -38
- package/dist/esm/vue-shims.d.mjs +0 -0
- package/dist/installIntlayer-CC0nWTSX.js +1 -0
- package/dist/{installIntlayer-BYkHxJSX.mjs → installIntlayer-CLmf4gtH.mjs} +15 -15
- package/dist/types/{src/client → client}/installIntlayer.d.ts +4 -1
- package/dist/types/editor/ContentSelector.vue.d.ts +24 -0
- package/dist/types/html/index.d.ts +3 -0
- package/dist/types/{src/index.d.ts → index.d.ts} +0 -2
- package/dist/types/{src/markdown → markdown}/MarkdownRenderer.d.ts +107 -107
- package/dist/types/markdown/index.d.ts +3 -0
- package/dist/types/{src/markdown → markdown}/installIntlayerMarkdown.d.ts +4 -4
- package/package.json +15 -7
- package/dist/ContentSelector-4HDV-6f8.mjs +0 -31
- package/dist/ContentSelector-CAg85Zo3.js +0 -1
- package/dist/installIntlayer-C59abOKv.js +0 -1
- package/dist/types/src/editor/ContentSelector.vue.d.ts +0 -21
- package/dist/types/src/html/index.d.ts +0 -3
- package/dist/types/src/markdown/index.d.ts +0 -4
- package/dist/types/{src/client → client}/index.d.ts +0 -0
- package/dist/types/{src/client → client}/useDictionary.d.ts +0 -0
- package/dist/types/{src/client → client}/useDictionaryAsync.d.ts +0 -0
- package/dist/types/{src/client → client}/useDictionaryDynamic.d.ts +0 -0
- package/dist/types/{src/client → client}/useIntlayer.d.ts +0 -0
- package/dist/types/{src/client → client}/useLoadDynamic.d.ts +0 -0
- package/dist/types/{src/client → client}/useLocale.d.ts +0 -0
- package/dist/types/{src/client → client}/useLocaleStorage.d.ts +0 -0
- package/dist/types/{src/client → client}/useRewriteURL.d.ts +0 -0
- package/dist/types/{src/editor → editor}/useEditor.d.ts +0 -0
- package/dist/types/{src/format → format}/index.d.ts +0 -0
- package/dist/types/{src/format → format}/useCompact.d.ts +0 -0
- package/dist/types/{src/format → format}/useCurrency.d.ts +0 -0
- package/dist/types/{src/format → format}/useDate.d.ts +0 -0
- package/dist/types/{src/format → format}/useIntl.d.ts +0 -0
- package/dist/types/{src/format → format}/useList.d.ts +0 -0
- package/dist/types/{src/format → format}/useNumber.d.ts +0 -0
- package/dist/types/{src/format → format}/usePercentage.d.ts +0 -0
- package/dist/types/{src/format → format}/useRelativeTime.d.ts +0 -0
- package/dist/types/{src/format → format}/useUnit.d.ts +0 -0
- package/dist/types/{src/getDictionary.d.ts → getDictionary.d.ts} +0 -0
- package/dist/types/{src/getIntlayer.d.ts → getIntlayer.d.ts} +0 -0
- package/dist/types/{src/html → html}/HTMLRenderer.d.ts +99 -99
- /package/dist/types/{src/html → html}/installIntlayerHTML.d.ts +0 -0
- /package/dist/types/{src/html → html}/types.d.ts +0 -0
- /package/dist/types/{src/markdown → markdown}/compiler.d.ts +0 -0
- /package/dist/types/{src/markdown → markdown}/runtime.d.ts +0 -0
- /package/dist/types/{src/plugins.d.ts → plugins.d.ts} +0 -0
- /package/dist/types/{src/renderIntlayerNode.d.ts → renderIntlayerNode.d.ts} +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { isEnabled as e } from "@intlayer/editor/isEnabled";
|
|
2
|
+
import { defineComponent as t, h as n } from "vue";
|
|
3
|
+
//#endregion
|
|
4
|
+
//#region src/editor/ContentSelector.vue
|
|
5
|
+
var r = t({
|
|
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(t, { slots: r }) {
|
|
18
|
+
return () => e ? n("intlayer-content-selector-wrapper", {
|
|
19
|
+
"key-path": JSON.stringify(t.keyPath),
|
|
20
|
+
"dictionary-key": t.dictionaryKey
|
|
21
|
+
}, r.default?.()) : r.default?.();
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
//#endregion
|
|
25
|
+
export { r as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`./chunk-C91j1N6u.js`);let e=require(`@intlayer/editor/isEnabled`),t=require(`vue`);var n=(0,t.defineComponent)({name:`ContentSelector`,props:{dictionaryKey:{type:String,required:!0},keyPath:{type:Array,required:!0}},setup(n,{slots:r}){return()=>e.isEnabled?(0,t.h)(`intlayer-content-selector-wrapper`,{"key-path":JSON.stringify(n.keyPath),"dictionary-key":n.dictionaryKey},r.default?.()):r.default?.()}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}});
|
|
@@ -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-CC0nWTSX.js`),t=require(`./useDictionary.cjs`),n=require(`./useDictionaryAsync.cjs`),r=require(`./useDictionaryDynamic.cjs`),i=require(`./useIntlayer.cjs`),a=require(`./useLoadDynamic.cjs`),o=require(`./useLocale.cjs`),s=require(`./useRewriteURL.cjs`);exports.INTLAYER_SYMBOL=e.t,exports.atPath=t.atPath,exports.createIntlayerClient=e.n,exports.createIntlayerLeafProxy=t.createIntlayerLeafProxy,exports.installIntlayer=e.r,exports.isComponentLike=t.isComponentLike,exports.isIntlayerNode=t.isIntlayerNode,exports.isObjectLike=t.isObjectLike,exports.toComponent=t.toComponent,exports.useDictionary=t.useDictionary,exports.useDictionaryAsync=n.useDictionaryAsync,exports.useDictionaryDynamic=r.useDictionaryDynamic,exports.useIntlayer=i.useIntlayer,exports.useLoadDynamic=a.useLoadDynamic,exports.useLocale=o.useLocale,exports.useRewriteURL=s.useRewriteURL;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../installIntlayer-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../installIntlayer-CC0nWTSX.js`);exports.INTLAYER_SYMBOL=e.t,exports.createIntlayerClient=e.n,exports.installIntlayer=e.r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../chunk-C91j1N6u.js`),t=require(`../getDictionary.cjs`),n=require(`../../installIntlayer-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../chunk-C91j1N6u.js`),t=require(`../getDictionary.cjs`),n=require(`../../installIntlayer-CC0nWTSX.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-CC0nWTSX.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-CC0nWTSX.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-CC0nWTSX.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.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../ContentSelector-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../ContentSelector-CghEoylg.js`);exports.default=e.t;
|
|
@@ -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-CC0nWTSX.js`);exports.useEditor=e.i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-CC0nWTSX.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-CC0nWTSX.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-CC0nWTSX.js`);let t=require(`vue`),n=require(`@intlayer/core/formatters`);var r=()=>{let r=(0,t.inject)(e.t);return(0,t.computed)(()=>{let e=r.locale.value;return(...t)=>(0,n.date)(t[0],{...t[1],locale:t[1]?.locale??e})})};exports.useDate=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-CC0nWTSX.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-CC0nWTSX.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-CC0nWTSX.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-CC0nWTSX.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-CC0nWTSX.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-CC0nWTSX.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.
|
|
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;
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`})
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./plugins.cjs`),t=require(`./getDictionary.cjs`),n=require(`./getIntlayer.cjs`),r=require(`../installIntlayer-CC0nWTSX.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`);const d=require(`./format/useIntl.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.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.i,exports.useIntl=d.useIntl,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(`../../chunk-C91j1N6u.js`);const e=require(`./
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.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`})
|
|
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;
|
package/dist/cjs/plugins.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../chunk-C91j1N6u.js`),t=require(`../ContentSelector-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../chunk-C91j1N6u.js`),t=require(`../ContentSelector-CghEoylg.js`),n=require(`./markdown/installIntlayerMarkdown.cjs`),r=require(`./renderIntlayerNode.cjs`);let i=require(`@intlayer/core/interpreter`),a=require(`@intlayer/config/built`);a=e.t(a);let o=require(`@intlayer/core/markdown`),s=require(`@intlayer/core/transpiler`),c=require(`@intlayer/editor/isEnabled`),l=require(`@intlayer/types/nodeType`);l=e.t(l);let u=require(`vue`);var d={id:`intlayer-node-plugin`,canHandle:e=>typeof e==`bigint`||typeof e==`string`||typeof e==`number`,transform:(e,{children:n,...i})=>{let a=e=>r.renderIntlayerNode({...i,value:e,children:c.isEnabled?()=>(0,u.h)(t.t,{dictionaryKey:i.dictionaryKey,keyPath:i.keyPath},{default:()=>typeof e==`function`?e():e}):e}),o=a(n);if(typeof n!=`function`)return o;let s=(...e)=>a(n(...e));Object.setPrototypeOf(s,Object.getPrototypeOf(o));for(let e of Object.getOwnPropertyNames(o)){let t=Object.getOwnPropertyDescriptor(o,e);t&&Object.defineProperty(s,e,t)}for(let e of Object.getOwnPropertySymbols(o)){let t=Object.getOwnPropertyDescriptor(o,e);t&&Object.defineProperty(s,e,t)}return(0,u.markRaw)(s)}},f=(e,t)=>{let n=new Map,r={};for(let[e,i]of Object.entries(t))typeof i==`string`||typeof i==`number`?r[e]=i:(n.set(e,i),r[e]=`__VNODE_${e}__`);let a=(0,i.splitInsertionTemplate)(e,r);if(n.size>0){let e=[];if(a.isSimple){let t=a.parts,r=0;for(let[i]of n){let a=`__VNODE_${i}__`,o=t.indexOf(a);o!==-1&&(o>r&&e.push(t.substring(r,o)),e.push(n.get(i)),r=o+a.length)}return r<t.length&&e.push(t.substring(r)),(0,u.h)(u.Fragment,null,...e)}else return a.parts.forEach(t=>{if(typeof t==`string`){let r=t;for(let[t]of n){let i=`__VNODE_${t}__`,a=r.indexOf(i);a!==-1&&(a>0&&e.push(r.substring(0,a)),e.push(n.get(t)),r=r.substring(a+i.length))}r.length>0&&e.push(r)}else e.push(t)}),(0,u.h)(u.Fragment,null,...e)}return a.isSimple?a.parts:(0,u.h)(u.Fragment,null,a.parts)},p={id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===l.INSERTION,transform:(e,t,n)=>{let r=[...t.keyPath,{type:l.INSERTION}],i=e[l.INSERTION],a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`,transform:(e,n,r)=>{let i=r(e,{...n,children:e,plugins:[...(t.plugins??[]).filter(e=>e.id!==`intlayer-node-plugin`)]});return e=>{let a=f(i,e);return r(a,{...n,plugins:t.plugins,children:a})}}};return n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]})}},m={id:`markdown-string-plugin`,canHandle:e=>typeof e==`string`,transform:(e,i,a)=>{let{plugins:s,...c}=i,l=a((0,o.getMarkdownMetadata)(e)??{},{plugins:[{id:`markdown-metadata-plugin`,canHandle:e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`||!e,transform:(t,n)=>r.renderIntlayerNode({...n,value:t,children:e})}],dictionaryKey:c.dictionaryKey,keyPath:[]}),d=a=>r.renderIntlayerNode({...i,value:e,children:()=>(0,u.h)(t.t,{dictionaryKey:c.dictionaryKey,keyPath:c.keyPath},{default:()=>{let{renderMarkdown:t,components:r}=n.useMarkdown();return t(e,void 0,{...r??{},...a??{}})}}),additionalProps:{metadata:l}}),f=d();return new Proxy(f,{get(t,n,r){return n===`value`?e:n===`metadata`?l:n===`use`?e=>d(e):Reflect.get(t,n,r)}})}},h={id:`markdown-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===l.MARKDOWN,transform:(e,t,n)=>{let r=[...t.keyPath,{type:l.MARKDOWN}],i=e[l.MARKDOWN];return n(i,{...t,children:i,keyPath:r,plugins:[m,...t.plugins??[]]})}},g=()=>{let e={};for(let t of s.HTML_TAGS)e[t]=({children:e,...n})=>(0,u.h)(t,n,e);return e},_=null,v=()=>(_||=g(),_),y={id:`html-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===l.HTML,transform:(e,t)=>{let n=e[l.HTML];e.tags;let a=e=>(0,i.getHTML)(n,{...v(),...e});return r.renderIntlayerNode({...t,value:n,children:e=>a(e)})}},b=(e,t=!0)=>[(0,i.translationPlugin)(e??a.default.internationalization.defaultLocale,t?a.default.internationalization.defaultLocale:void 0),i.enumerationPlugin,i.conditionPlugin,(0,i.nestedPlugin)(e??a.default.internationalization.defaultLocale),i.filePlugin,i.genderPlugin,d,p,h,y];exports.getPlugins=b,exports.htmlPlugin=y,exports.insertionPlugin=p,exports.intlayerNodePlugins=d,exports.markdownPlugin=h,exports.markdownStringPlugin=m;
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "../../installIntlayer-
|
|
1
|
+
import { n as e, r as t, t as n } from "../../installIntlayer-CLmf4gtH.mjs";
|
|
2
2
|
import { atPath as r, createIntlayerLeafProxy as i, isComponentLike as a, isIntlayerNode as o, isObjectLike as s, toComponent as c, useDictionary as l } from "./useDictionary.mjs";
|
|
3
3
|
import { useDictionaryAsync as u } from "./useDictionaryAsync.mjs";
|
|
4
4
|
import { useDictionaryDynamic as d } from "./useDictionaryDynamic.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "../../installIntlayer-
|
|
1
|
+
import { n as e, r as t, t as n } from "../../installIntlayer-CLmf4gtH.mjs";
|
|
2
2
|
export { n as INTLAYER_SYMBOL, e as createIntlayerClient, t as installIntlayer };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { getDictionary as e } from "../getDictionary.mjs";
|
|
2
|
-
import { t } from "../../installIntlayer-
|
|
2
|
+
import { t } from "../../installIntlayer-CLmf4gtH.mjs";
|
|
3
3
|
import n from "@intlayer/config/built";
|
|
4
|
-
import { computed as r, defineComponent as i,
|
|
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
|
|
6
|
-
var
|
|
6
|
+
var m = (e, t) => t.reduce((e, t) => e?.[t], e), h = (e) => typeof e == "object" && !!e, g = (e) => typeof e == "function" || h(e) && ("render" in e || "setup" in e), _ = (e) => e != null && (typeof e == "object" || typeof e == "function") && "__update" in e && "render" in e && "raw" in e, v = (e) => l(i({
|
|
7
7
|
name: "IntlayerLeaf",
|
|
8
8
|
setup() {
|
|
9
9
|
return () => {
|
|
10
10
|
let t = e();
|
|
11
|
-
return t == null ? null :
|
|
11
|
+
return t == null ? null : g(t) ? o(t) : Array.isArray(t) ? o("span", t) : t;
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
})),
|
|
14
|
+
})), y = (e) => new Proxy({}, {
|
|
15
15
|
get(t, n) {
|
|
16
16
|
let r = e.value;
|
|
17
17
|
if (n === "__v_isRef") return !0;
|
|
18
18
|
if (n === "value") return r ?? "";
|
|
19
19
|
if (n === "$raw") return e;
|
|
20
20
|
if (n === "__v_skip") return !0;
|
|
21
|
-
if (n === "c" || n === "asComponent") return
|
|
21
|
+
if (n === "c" || n === "asComponent") return v(() => e.value);
|
|
22
22
|
if (r == null) return n === Symbol.toPrimitive || n === "toString" ? () => "" : void 0;
|
|
23
23
|
let i = r[n];
|
|
24
24
|
return typeof i == "function" ? i.bind(r) : i;
|
|
@@ -33,34 +33,34 @@ var p = (e, t) => t.reduce((e, t) => e?.[t], e), m = (e) => typeof e == "object"
|
|
|
33
33
|
configurable: !0
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
}),
|
|
37
|
-
let
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
}), b = (i, o) => {
|
|
37
|
+
let l = a() ? s(t) : void 0, b = c(l?.locale) ? l.locale : u(l?.locale ?? n.internationalization.defaultLocale), x = r(() => (o === void 0 ? void 0 : f(o)) ?? b.value), S = d({});
|
|
38
|
+
p([() => f(i), () => x.value], ([t, n]) => {
|
|
39
|
+
S.value = e(t, n);
|
|
40
40
|
}, {
|
|
41
41
|
immediate: !0,
|
|
42
42
|
flush: "sync"
|
|
43
43
|
});
|
|
44
|
-
let
|
|
44
|
+
let C = (e) => new Proxy({}, {
|
|
45
45
|
get(t, n, i) {
|
|
46
46
|
if (n === "__v_isRef") return !0;
|
|
47
|
-
let a = r(() =>
|
|
47
|
+
let a = r(() => m(S.value, e));
|
|
48
48
|
if (n === "value") return a.value ?? "";
|
|
49
49
|
if (n === "then") return;
|
|
50
|
-
if (n === "c" || n === "asComponent") return
|
|
50
|
+
if (n === "c" || n === "asComponent") return v(() => a.value);
|
|
51
51
|
if (n === "$raw") return a;
|
|
52
52
|
if (n === Symbol.toPrimitive) return () => a.value;
|
|
53
|
-
let o = e.concat(n), s =
|
|
54
|
-
if (s === void 0 ||
|
|
55
|
-
if (
|
|
56
|
-
let c = r(() =>
|
|
53
|
+
let o = e.concat(n), s = m(S.value, o);
|
|
54
|
+
if (s === void 0 || h(s) && !g(s)) return C(o);
|
|
55
|
+
if (_(s)) return y(r(() => m(S.value, o)));
|
|
56
|
+
let c = r(() => m(S.value, o));
|
|
57
57
|
return new Proxy(c, { get(e, t, n) {
|
|
58
58
|
return t === "value" ? e.value ?? "" : Reflect.get(e, t, n);
|
|
59
59
|
} });
|
|
60
60
|
},
|
|
61
61
|
ownKeys() {
|
|
62
|
-
let t =
|
|
63
|
-
return
|
|
62
|
+
let t = m(S.value, e);
|
|
63
|
+
return h(t) ? Reflect.ownKeys(t) : [];
|
|
64
64
|
},
|
|
65
65
|
getOwnPropertyDescriptor() {
|
|
66
66
|
return {
|
|
@@ -69,7 +69,7 @@ var p = (e, t) => t.reduce((e, t) => e?.[t], e), m = (e) => typeof e == "object"
|
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
|
-
return
|
|
72
|
+
return C([]);
|
|
73
73
|
};
|
|
74
74
|
//#endregion
|
|
75
|
-
export {
|
|
75
|
+
export { m as atPath, y as createIntlayerLeafProxy, g as isComponentLike, _ as isIntlayerNode, h as isObjectLike, v as toComponent, b as useDictionary };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../installIntlayer-
|
|
1
|
+
import { t as e } from "../../installIntlayer-CLmf4gtH.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-CLmf4gtH.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-CLmf4gtH.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 { t as e } from "../../ContentSelector-
|
|
1
|
+
import { t as e } from "../../ContentSelector-CUggT4wa.mjs";
|
|
2
2
|
export { e as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as e } from "../../installIntlayer-
|
|
1
|
+
import { i as e } from "../../installIntlayer-CLmf4gtH.mjs";
|
|
2
2
|
export { e as useEditor };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../installIntlayer-
|
|
1
|
+
import { t as e } from "../../installIntlayer-CLmf4gtH.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-CLmf4gtH.mjs";
|
|
2
2
|
import { computed as t, inject as n } from "vue";
|
|
3
3
|
import { currency as r } from "@intlayer/core/formatters";
|
|
4
4
|
//#region src/format/useCurrency.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../installIntlayer-
|
|
1
|
+
import { t as e } from "../../installIntlayer-CLmf4gtH.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-CLmf4gtH.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 {
|
|
2
|
-
import { HTMLRenderer as
|
|
3
|
-
export {
|
|
1
|
+
import { installIntlayerHTML as e, useHTML as t } from "./installIntlayerHTML.mjs";
|
|
2
|
+
import { HTMLRenderer as n, renderHTML as r, useHTMLRenderer as i } from "./HTMLRenderer.mjs";
|
|
3
|
+
export { n as HTMLRenderer, e as installIntlayerHTML, r as renderHTML, t as useHTML, i as useHTMLRenderer };
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,22 +1,14 @@
|
|
|
1
|
-
import e,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { useLoadDynamic as P } from "./client/useLoadDynamic.mjs";
|
|
13
|
-
import { useLocale as F } from "./client/useLocale.mjs";
|
|
14
|
-
import { useRewriteURL as I } from "./client/useRewriteURL.mjs";
|
|
1
|
+
import { getPlugins as e, htmlPlugin as t, insertionPlugin as n, intlayerNodePlugins as r, markdownPlugin as i, markdownStringPlugin as a } from "./plugins.mjs";
|
|
2
|
+
import { getDictionary as o } from "./getDictionary.mjs";
|
|
3
|
+
import { getIntlayer as s } from "./getIntlayer.mjs";
|
|
4
|
+
import { i as c, n as l, r as u, t as d } from "../installIntlayer-CLmf4gtH.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";
|
|
15
12
|
import "./client/index.mjs";
|
|
16
|
-
import { useIntl as
|
|
17
|
-
|
|
18
|
-
import { HTMLRenderer as H, renderHTML as U, useHTMLRenderer as W } from "./html/HTMLRenderer.mjs";
|
|
19
|
-
import "./html/index.mjs";
|
|
20
|
-
import { MarkdownRenderer as G, renderMarkdown as K, useMarkdownRenderer as q } from "./markdown/MarkdownRenderer.mjs";
|
|
21
|
-
import "./markdown/index.mjs";
|
|
22
|
-
export { H as HTMLRenderer, R as INTLAYER_HTML_SYMBOL, c as INTLAYER_MARKDOWN_SYMBOL, C as INTLAYER_SYMBOL, G as MarkdownRenderer, n as RuleType, w as atPath, r as compile, i as compileMarkdown, a as compiler, x as createIntlayerClient, z as createIntlayerHTMLClient, T as createIntlayerLeafProxy, l as createIntlayerMarkdownClient, t as createVueRuntime, v as getDictionary, y as getIntlayer, f as getPlugins, p as htmlPlugin, m as insertionPlugin, S as installIntlayer, B as installIntlayerHTML, u as installIntlayerMarkdown, h as intlayerNodePlugins, E as isComponentLike, D as isIntlayerNode, O as isObjectLike, g as markdownPlugin, _ as markdownStringPlugin, U as renderHTML, K as renderMarkdown, o as sanitizer, s as slugify, k as toComponent, A as useDictionary, j as useDictionaryAsync, M as useDictionaryDynamic, b as useEditor, V as useHTML, W as useHTMLRenderer, L as useIntl, N as useIntlayer, P as useLoadDynamic, F as useLocale, d as useMarkdown, q as useMarkdownRenderer, I as useRewriteURL, e as vueRuntime };
|
|
13
|
+
import { useIntl as T } from "./format/useIntl.mjs";
|
|
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 };
|
|
@@ -1,38 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { defineComponent as n } from "vue";
|
|
1
|
+
import { useMarkdown as e } from "./installIntlayerMarkdown.mjs";
|
|
2
|
+
import { defineComponent as t } from "vue";
|
|
4
3
|
//#region src/markdown/MarkdownRenderer.ts
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
var n = async (e, { components: t, wrapper: n, forceBlock: r, forceInline: i, preserveFrontmatter: a, tagfilter: o } = {}) => {
|
|
5
|
+
let s = {
|
|
6
|
+
components: t,
|
|
7
|
+
forceBlock: r,
|
|
8
|
+
forceInline: i,
|
|
9
|
+
wrapper: n,
|
|
10
|
+
forceWrapper: !!n,
|
|
11
|
+
preserveFrontmatter: a,
|
|
12
|
+
tagfilter: o
|
|
13
|
+
}, { compileMarkdown: c } = await import("./compiler.mjs");
|
|
14
|
+
return c(e, s);
|
|
15
|
+
}, r = ({ components: t, wrapper: r, forceBlock: i, forceInline: a, preserveFrontmatter: o, tagfilter: s } = {}) => {
|
|
14
16
|
try {
|
|
15
|
-
let { renderMarkdown:
|
|
16
|
-
return (
|
|
17
|
+
let { renderMarkdown: n, components: c } = e();
|
|
18
|
+
return (e) => n(e, {
|
|
17
19
|
forceBlock: i,
|
|
18
20
|
forceInline: a,
|
|
19
21
|
preserveFrontmatter: o,
|
|
20
22
|
tagfilter: s
|
|
21
23
|
}, {
|
|
22
24
|
...c ?? {},
|
|
23
|
-
...
|
|
24
|
-
},
|
|
25
|
+
...t ?? {}
|
|
26
|
+
}, r);
|
|
25
27
|
} catch {
|
|
26
|
-
return (
|
|
27
|
-
components:
|
|
28
|
-
wrapper:
|
|
28
|
+
return (e) => n(e, {
|
|
29
|
+
components: t,
|
|
30
|
+
wrapper: r,
|
|
29
31
|
forceBlock: i,
|
|
30
32
|
forceInline: a,
|
|
31
33
|
preserveFrontmatter: o,
|
|
32
34
|
tagfilter: s
|
|
33
35
|
});
|
|
34
36
|
}
|
|
35
|
-
},
|
|
37
|
+
}, i = t({
|
|
36
38
|
name: "Markdown",
|
|
37
39
|
props: {
|
|
38
40
|
content: {
|
|
@@ -81,7 +83,7 @@ var r = (t, { components: n, wrapper: r, forceBlock: i, forceInline: a, preserve
|
|
|
81
83
|
tagfilter: e.tagfilter
|
|
82
84
|
}, e.components, e.wrapper);
|
|
83
85
|
try {
|
|
84
|
-
let t =
|
|
86
|
+
let t = r({
|
|
85
87
|
components: e.components,
|
|
86
88
|
wrapper: e.wrapper,
|
|
87
89
|
forceBlock: e.forceBlock,
|
|
@@ -91,7 +93,7 @@ var r = (t, { components: n, wrapper: r, forceBlock: i, forceInline: a, preserve
|
|
|
91
93
|
});
|
|
92
94
|
return () => t(e.content);
|
|
93
95
|
} catch {
|
|
94
|
-
return () =>
|
|
96
|
+
return () => n(e.content, {
|
|
95
97
|
components: e.components,
|
|
96
98
|
wrapper: e.wrapper,
|
|
97
99
|
forceBlock: e.forceBlock,
|
|
@@ -103,4 +105,4 @@ var r = (t, { components: n, wrapper: r, forceBlock: i, forceInline: a, preserve
|
|
|
103
105
|
}
|
|
104
106
|
});
|
|
105
107
|
//#endregion
|
|
106
|
-
export {
|
|
108
|
+
export { i as MarkdownRenderer, n as renderMarkdown, r as useMarkdownRenderer };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
export { c as INTLAYER_MARKDOWN_SYMBOL, f as MarkdownRenderer, n as RuleType, r as compile, i as compileMarkdown, a as compiler, l as createIntlayerMarkdownClient, t as createVueRuntime, u as installIntlayerMarkdown, p as renderMarkdown, o as sanitizer, s as slugify, d as useMarkdown, m as useMarkdownRenderer, e as vueRuntime };
|
|
1
|
+
import { compileMarkdown as e } from "./compiler.mjs";
|
|
2
|
+
import { installIntlayerMarkdown as t, useMarkdown as n } from "./installIntlayerMarkdown.mjs";
|
|
3
|
+
import { MarkdownRenderer as r, renderMarkdown as i, useMarkdownRenderer as a } from "./MarkdownRenderer.mjs";
|
|
4
|
+
export { r as MarkdownRenderer, e as compileMarkdown, t as installIntlayerMarkdown, i as renderMarkdown, n as useMarkdown, a as useMarkdownRenderer };
|