vanilla-intlayer 8.5.0 → 8.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/format/index.cjs +1 -1
- package/dist/cjs/format/useCompact.cjs +1 -0
- package/dist/cjs/format/useCurrency.cjs +1 -0
- package/dist/cjs/format/useDate.cjs +1 -0
- package/dist/cjs/format/useList.cjs +1 -0
- package/dist/cjs/format/useNumber.cjs +1 -0
- package/dist/cjs/format/usePercentage.cjs +1 -0
- package/dist/cjs/format/useRelativeTime.cjs +1 -0
- package/dist/cjs/format/useUnit.cjs +1 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/esm/format/index.mjs +10 -2
- package/dist/esm/format/useCompact.mjs +12 -0
- package/dist/esm/format/useCurrency.mjs +12 -0
- package/dist/esm/format/useDate.mjs +18 -0
- package/dist/esm/format/useList.mjs +12 -0
- package/dist/esm/format/useNumber.mjs +12 -0
- package/dist/esm/format/usePercentage.mjs +12 -0
- package/dist/esm/format/useRelativeTime.mjs +12 -0
- package/dist/esm/format/useUnit.mjs +12 -0
- package/dist/esm/index.mjs +1 -2
- package/dist/types/format/index.d.ts +9 -1
- package/dist/types/format/useCompact.d.ts +2 -0
- package/dist/types/format/useCurrency.d.ts +2 -0
- package/dist/types/format/useDate.d.ts +5 -0
- package/dist/types/format/useList.d.ts +2 -0
- package/dist/types/format/useNumber.d.ts +5 -0
- package/dist/types/format/usePercentage.d.ts +2 -0
- package/dist/types/format/useRelativeTime.d.ts +2 -0
- package/dist/types/format/useUnit.d.ts +2 -0
- package/dist/types/index.d.ts +0 -1
- package/dist/types/markdown/MarkdownRenderer.d.ts +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./useIntl.cjs`);exports.
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./useCompact.cjs`),t=require(`./useCurrency.cjs`),n=require(`./useDate.cjs`),r=require(`./useIntl.cjs`),i=require(`./useList.cjs`),a=require(`./useNumber.cjs`),o=require(`./usePercentage.cjs`),s=require(`./useRelativeTime.cjs`),c=require(`./useUnit.cjs`);exports.useCompact=e.useCompact,exports.useCurrency=t.useCurrency,exports.useDate=n.useDate,exports.useIntl=r.useIntl,exports.useList=i.useList,exports.useNumber=a.useNumber,exports.usePercentage=o.usePercentage,exports.useRelativeTime=s.useRelativeTime,exports.useUnit=c.useUnit;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-CieE91lh.js`);let t=require(`@intlayer/core/formatters`);var n=()=>{let n=e.r();return(...e)=>(0,t.compact)(e[0],{...e[1],locale:e[1]?.locale??n.locale})};exports.useCompact=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-CieE91lh.js`);let t=require(`@intlayer/core/formatters`);var n=()=>{let n=e.r();return(...e)=>(0,t.currency)(e[0],{...e[1],locale:e[1]?.locale??n.locale})};exports.useCurrency=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-CieE91lh.js`);let t=require(`@intlayer/core/formatters`);var n=()=>{let n=e.r();return(...e)=>{let r=typeof e[1]==`string`?{...t.presets[e[1]],locale:n.locale}:{...e[1],locale:e[1]?.locale??n.locale};return(0,t.date)(e[0],r)}};exports.useDate=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-CieE91lh.js`);let t=require(`@intlayer/core/formatters`);var n=()=>{let n=e.r();return(...e)=>(0,t.list)(e[0],{...e[1],locale:e[1]?.locale??n.locale})};exports.useList=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-CieE91lh.js`);let t=require(`@intlayer/core/formatters`);var n=()=>{let n=e.r();return(...e)=>(0,t.number)(e[0],{...e[1],locale:e[1]?.locale??n.locale})};exports.useNumber=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-CieE91lh.js`);let t=require(`@intlayer/core/formatters`);var n=()=>{let n=e.r();return(...e)=>(0,t.percentage)(e[0],{...e[1],locale:e[1]?.locale??n.locale})};exports.usePercentage=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-CieE91lh.js`);let t=require(`@intlayer/core/formatters`);var n=()=>{let n=e.r();return(...e)=>(0,t.relativeTime)(e[0],e[1],{...e[2],locale:e[2]?.locale??n.locale})};exports.useRelativeTime=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-CieE91lh.js`);let t=require(`@intlayer/core/formatters`);var n=()=>{let n=e.r();return(...e)=>(0,t.units)(e[0],{...e[1],locale:e[1]?.locale??n.locale})};exports.useUnit=n;
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./plugins.cjs`),t=require(`./getDictionary.cjs`),n=require(`./getIntlayer.cjs`),r=require(`../installIntlayer-CieE91lh.js`),i=require(`./client/useDictionary.cjs`),a=require(`./client/useDictionaryDynamic.cjs`),o=require(`./client/useIntlayer.cjs`),s=require(`./client/useLocaleStorage.cjs`),c=require(`./client/useLocale.cjs`),l=require(`./client/useRewriteURL.cjs`);require(`./client/index.cjs`)
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./plugins.cjs`),t=require(`./getDictionary.cjs`),n=require(`./getIntlayer.cjs`),r=require(`../installIntlayer-CieE91lh.js`),i=require(`./client/useDictionary.cjs`),a=require(`./client/useDictionaryDynamic.cjs`),o=require(`./client/useIntlayer.cjs`),s=require(`./client/useLocaleStorage.cjs`),c=require(`./client/useLocale.cjs`),l=require(`./client/useRewriteURL.cjs`);require(`./client/index.cjs`),exports.IntlayerClient=r.t,exports.createIntlayerClient=r.n,exports.getDictionary=t.getDictionary,exports.getIntlayer=n.getIntlayer,exports.getIntlayerClient=r.r,exports.getPlugins=e.getPlugins,exports.htmlPlugin=e.htmlPlugin,exports.insertionPlugin=e.insertionPlugin,exports.installIntlayer=r.i,exports.intlayerNodePlugins=e.intlayerNodePlugins,exports.localeCookie=s.localeCookie,exports.localeInStorage=s.localeInStorage,exports.markdownPlugin=e.markdownPlugin,exports.markdownStringPlugin=e.markdownStringPlugin,exports.setLocaleCookie=s.setLocaleCookie,exports.setLocaleInStorage=s.setLocaleInStorage,exports.useDictionary=i.useDictionary,exports.useDictionaryDynamic=a.useDictionaryDynamic,exports.useEditor=r.a,exports.useIntlayer=o.useIntlayer,exports.useLocale=c.useLocale,exports.useLocaleCookie=s.useLocaleCookie,exports.useLocaleStorage=s.useLocaleStorage,exports.useRewriteURL=l.useRewriteURL;
|
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { useCompact as e } from "./useCompact.mjs";
|
|
2
|
+
import { useCurrency as t } from "./useCurrency.mjs";
|
|
3
|
+
import { useDate as n } from "./useDate.mjs";
|
|
4
|
+
import { useIntl as r } from "./useIntl.mjs";
|
|
5
|
+
import { useList as i } from "./useList.mjs";
|
|
6
|
+
import { useNumber as a } from "./useNumber.mjs";
|
|
7
|
+
import { usePercentage as o } from "./usePercentage.mjs";
|
|
8
|
+
import { useRelativeTime as s } from "./useRelativeTime.mjs";
|
|
9
|
+
import { useUnit as c } from "./useUnit.mjs";
|
|
10
|
+
export { e as useCompact, t as useCurrency, n as useDate, r as useIntl, i as useList, a as useNumber, o as usePercentage, s as useRelativeTime, c as useUnit };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { r as e } from "../../installIntlayer-BRDzSdO3.mjs";
|
|
2
|
+
import { compact as t } from "@intlayer/core/formatters";
|
|
3
|
+
//#region src/format/useCompact.ts
|
|
4
|
+
var n = () => {
|
|
5
|
+
let n = e();
|
|
6
|
+
return (...e) => t(e[0], {
|
|
7
|
+
...e[1],
|
|
8
|
+
locale: e[1]?.locale ?? n.locale
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { n as useCompact };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { r as e } from "../../installIntlayer-BRDzSdO3.mjs";
|
|
2
|
+
import { currency as t } from "@intlayer/core/formatters";
|
|
3
|
+
//#region src/format/useCurrency.ts
|
|
4
|
+
var n = () => {
|
|
5
|
+
let n = e();
|
|
6
|
+
return (...e) => t(e[0], {
|
|
7
|
+
...e[1],
|
|
8
|
+
locale: e[1]?.locale ?? n.locale
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { n as useCurrency };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { r as e } from "../../installIntlayer-BRDzSdO3.mjs";
|
|
2
|
+
import { date as t, presets as n } from "@intlayer/core/formatters";
|
|
3
|
+
//#region src/format/useDate.ts
|
|
4
|
+
var r = () => {
|
|
5
|
+
let r = e();
|
|
6
|
+
return (...e) => {
|
|
7
|
+
let i = typeof e[1] == "string" ? {
|
|
8
|
+
...n[e[1]],
|
|
9
|
+
locale: r.locale
|
|
10
|
+
} : {
|
|
11
|
+
...e[1],
|
|
12
|
+
locale: e[1]?.locale ?? r.locale
|
|
13
|
+
};
|
|
14
|
+
return t(e[0], i);
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { r as useDate };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { r as e } from "../../installIntlayer-BRDzSdO3.mjs";
|
|
2
|
+
import { list as t } from "@intlayer/core/formatters";
|
|
3
|
+
//#region src/format/useList.ts
|
|
4
|
+
var n = () => {
|
|
5
|
+
let n = e();
|
|
6
|
+
return (...e) => t(e[0], {
|
|
7
|
+
...e[1],
|
|
8
|
+
locale: e[1]?.locale ?? n.locale
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { n as useList };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { r as e } from "../../installIntlayer-BRDzSdO3.mjs";
|
|
2
|
+
import { number as t } from "@intlayer/core/formatters";
|
|
3
|
+
//#region src/format/useNumber.ts
|
|
4
|
+
var n = () => {
|
|
5
|
+
let n = e();
|
|
6
|
+
return (...e) => t(e[0], {
|
|
7
|
+
...e[1],
|
|
8
|
+
locale: e[1]?.locale ?? n.locale
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { n as useNumber };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { r as e } from "../../installIntlayer-BRDzSdO3.mjs";
|
|
2
|
+
import { percentage as t } from "@intlayer/core/formatters";
|
|
3
|
+
//#region src/format/usePercentage.ts
|
|
4
|
+
var n = () => {
|
|
5
|
+
let n = e();
|
|
6
|
+
return (...e) => t(e[0], {
|
|
7
|
+
...e[1],
|
|
8
|
+
locale: e[1]?.locale ?? n.locale
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { n as usePercentage };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { r as e } from "../../installIntlayer-BRDzSdO3.mjs";
|
|
2
|
+
import { relativeTime as t } from "@intlayer/core/formatters";
|
|
3
|
+
//#region src/format/useRelativeTime.ts
|
|
4
|
+
var n = () => {
|
|
5
|
+
let n = e();
|
|
6
|
+
return (...e) => t(e[0], e[1], {
|
|
7
|
+
...e[2],
|
|
8
|
+
locale: e[2]?.locale ?? n.locale
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { n as useRelativeTime };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { r as e } from "../../installIntlayer-BRDzSdO3.mjs";
|
|
2
|
+
import { units as t } from "@intlayer/core/formatters";
|
|
3
|
+
//#region src/format/useUnit.ts
|
|
4
|
+
var n = () => {
|
|
5
|
+
let n = e();
|
|
6
|
+
return (...e) => t(e[0], {
|
|
7
|
+
...e[1],
|
|
8
|
+
locale: e[1]?.locale ?? n.locale
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { n as useUnit };
|
package/dist/esm/index.mjs
CHANGED
|
@@ -9,5 +9,4 @@ import { localeCookie as g, localeInStorage as _, setLocaleCookie as v, setLocal
|
|
|
9
9
|
import { useLocale as S } from "./client/useLocale.mjs";
|
|
10
10
|
import { useRewriteURL as C } from "./client/useRewriteURL.mjs";
|
|
11
11
|
import "./client/index.mjs";
|
|
12
|
-
|
|
13
|
-
export { f as IntlayerClient, u as createIntlayerClient, o as getDictionary, s as getIntlayer, d as getIntlayerClient, e as getPlugins, t as htmlPlugin, n as insertionPlugin, l as installIntlayer, r as intlayerNodePlugins, g as localeCookie, _ as localeInStorage, i as markdownPlugin, a as markdownStringPlugin, v as setLocaleCookie, y as setLocaleInStorage, p as useDictionary, m as useDictionaryDynamic, c as useEditor, w as useIntl, h as useIntlayer, S as useLocale, b as useLocaleCookie, x as useLocaleStorage, C as useRewriteURL };
|
|
12
|
+
export { f as IntlayerClient, u as createIntlayerClient, o as getDictionary, s as getIntlayer, d as getIntlayerClient, e as getPlugins, t as htmlPlugin, n as insertionPlugin, l as installIntlayer, r as intlayerNodePlugins, g as localeCookie, _ as localeInStorage, i as markdownPlugin, a as markdownStringPlugin, v as setLocaleCookie, y as setLocaleInStorage, p as useDictionary, m as useDictionaryDynamic, c as useEditor, h as useIntlayer, S as useLocale, b as useLocaleCookie, x as useLocaleStorage, C as useRewriteURL };
|
|
@@ -1 +1,9 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { useCompact } from './useCompact';
|
|
2
|
+
export { useCurrency } from './useCurrency';
|
|
3
|
+
export { useDate } from './useDate';
|
|
4
|
+
export { useIntl } from './useIntl';
|
|
5
|
+
export { useList } from './useList';
|
|
6
|
+
export { useNumber } from './useNumber';
|
|
7
|
+
export { usePercentage } from './usePercentage';
|
|
8
|
+
export { useRelativeTime } from './useRelativeTime';
|
|
9
|
+
export { useUnit } from './useUnit';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -19,4 +19,4 @@ export declare const renderMarkdown: (content: string, { forceBlock, forceInline
|
|
|
19
19
|
* Returns a render function that uses the global provider's configuration
|
|
20
20
|
* (installed via `installIntlayerMarkdown`), falling back to `compileMarkdown`.
|
|
21
21
|
*/
|
|
22
|
-
export declare const useMarkdownRenderer: (props?: RenderMarkdownProps) => ((content: string) => string);
|
|
22
|
+
export declare const useMarkdownRenderer: (props?: RenderMarkdownProps) => ((content: string) => string | Promise<string>);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vanilla-intlayer",
|
|
3
|
-
"version": "8.5.
|
|
3
|
+
"version": "8.5.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Easily internationalize i18n your Vanilla JS, HTML, and PHP applications with type-safe multilingual content management.",
|
|
6
6
|
"keywords": [
|
|
@@ -101,11 +101,11 @@
|
|
|
101
101
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
102
102
|
},
|
|
103
103
|
"dependencies": {
|
|
104
|
-
"@intlayer/api": "8.5.
|
|
105
|
-
"@intlayer/config": "8.5.
|
|
106
|
-
"@intlayer/core": "8.5.
|
|
107
|
-
"@intlayer/editor": "8.5.
|
|
108
|
-
"@intlayer/types": "8.5.
|
|
104
|
+
"@intlayer/api": "8.5.2",
|
|
105
|
+
"@intlayer/config": "8.5.2",
|
|
106
|
+
"@intlayer/core": "8.5.2",
|
|
107
|
+
"@intlayer/editor": "8.5.2",
|
|
108
|
+
"@intlayer/types": "8.5.2"
|
|
109
109
|
},
|
|
110
110
|
"devDependencies": {
|
|
111
111
|
"@types/node": "25.5.0",
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
"vitest": "4.1.1"
|
|
122
122
|
},
|
|
123
123
|
"peerDependencies": {
|
|
124
|
-
"intlayer": "8.5.
|
|
124
|
+
"intlayer": "8.5.2"
|
|
125
125
|
},
|
|
126
126
|
"peerDependenciesMeta": {
|
|
127
127
|
"intlayer": {
|