react-intlayer 8.0.0-canary.1 → 8.0.0-canary.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/client/useLocale.cjs +6 -6
- package/dist/cjs/client/useLocale.cjs.map +1 -1
- package/dist/cjs/getDictionary.cjs +1 -0
- package/dist/cjs/getDictionary.cjs.map +1 -1
- package/dist/cjs/getIntlayer.cjs +1 -0
- package/dist/cjs/getIntlayer.cjs.map +1 -1
- package/dist/cjs/html/HTMLRenderer.cjs +59 -0
- package/dist/cjs/html/HTMLRenderer.cjs.map +1 -0
- package/dist/cjs/html/HTMLRendererPlugin.cjs +3 -9
- package/dist/cjs/html/HTMLRendererPlugin.cjs.map +1 -1
- package/dist/cjs/html/index.cjs +6 -2
- package/dist/cjs/html/types.cjs +0 -0
- package/dist/cjs/index.cjs +7 -1
- package/dist/cjs/markdown/MarkdownProvider.cjs +62 -23
- package/dist/cjs/markdown/MarkdownProvider.cjs.map +1 -1
- package/dist/cjs/markdown/MarkdownRenderer.cjs +176 -6
- package/dist/cjs/markdown/MarkdownRenderer.cjs.map +1 -1
- package/dist/cjs/markdown/MarkdownRendererPlugin.cjs.map +1 -1
- package/dist/cjs/markdown/index.cjs +3 -1
- package/dist/cjs/markdown/processor.cjs +0 -5
- package/dist/cjs/markdown/processor.cjs.map +1 -1
- package/dist/cjs/plugins.cjs +50 -5
- package/dist/cjs/plugins.cjs.map +1 -1
- package/dist/cjs/reactElement/renderReactElement.cjs +8 -8
- package/dist/cjs/reactElement/renderReactElement.cjs.map +1 -1
- package/dist/cjs/server/IntlayerServerProvider.cjs +2 -2
- package/dist/cjs/server/IntlayerServerProvider.cjs.map +1 -1
- package/dist/esm/client/useLocale.mjs +6 -6
- package/dist/esm/client/useLocale.mjs.map +1 -1
- package/dist/esm/getDictionary.mjs +2 -1
- package/dist/esm/getDictionary.mjs.map +1 -1
- package/dist/esm/getIntlayer.mjs +2 -1
- package/dist/esm/getIntlayer.mjs.map +1 -1
- package/dist/esm/html/HTMLRenderer.mjs +55 -0
- package/dist/esm/html/HTMLRenderer.mjs.map +1 -0
- package/dist/esm/html/HTMLRendererPlugin.mjs +4 -9
- package/dist/esm/html/HTMLRendererPlugin.mjs.map +1 -1
- package/dist/esm/html/index.mjs +3 -2
- package/dist/esm/html/types.mjs +0 -0
- package/dist/esm/index.mjs +3 -2
- package/dist/esm/markdown/MarkdownProvider.mjs +62 -23
- package/dist/esm/markdown/MarkdownProvider.mjs.map +1 -1
- package/dist/esm/markdown/MarkdownRenderer.mjs +175 -7
- package/dist/esm/markdown/MarkdownRenderer.mjs.map +1 -1
- package/dist/esm/markdown/MarkdownRendererPlugin.mjs.map +1 -1
- package/dist/esm/markdown/index.mjs +2 -2
- package/dist/esm/markdown/processor.mjs +0 -5
- package/dist/esm/markdown/processor.mjs.map +1 -1
- package/dist/esm/plugins.mjs +52 -8
- package/dist/esm/plugins.mjs.map +1 -1
- package/dist/esm/reactElement/renderReactElement.mjs +8 -8
- package/dist/esm/reactElement/renderReactElement.mjs.map +1 -1
- package/dist/esm/server/IntlayerServerProvider.mjs +2 -2
- package/dist/esm/server/IntlayerServerProvider.mjs.map +1 -1
- package/dist/types/IntlayerNode.d.ts.map +1 -1
- package/dist/types/UI/ContentSelector.d.ts.map +1 -1
- package/dist/types/client/IntlayerProvider.d.ts.map +1 -1
- package/dist/types/client/format/useCompact.d.ts +2 -3
- package/dist/types/client/format/useCompact.d.ts.map +1 -1
- package/dist/types/client/format/useCurrency.d.ts +2 -3
- package/dist/types/client/format/useCurrency.d.ts.map +1 -1
- package/dist/types/client/format/useDate.d.ts +0 -1
- package/dist/types/client/format/useDate.d.ts.map +1 -1
- package/dist/types/client/format/useIntl.d.ts +0 -1
- package/dist/types/client/format/useIntl.d.ts.map +1 -1
- package/dist/types/client/format/useList.d.ts +2 -3
- package/dist/types/client/format/useList.d.ts.map +1 -1
- package/dist/types/client/format/useNumber.d.ts +2 -3
- package/dist/types/client/format/useNumber.d.ts.map +1 -1
- package/dist/types/client/format/usePercentage.d.ts +2 -3
- package/dist/types/client/format/usePercentage.d.ts.map +1 -1
- package/dist/types/client/format/useRelativeTime.d.ts +2 -3
- package/dist/types/client/format/useRelativeTime.d.ts.map +1 -1
- package/dist/types/client/format/useUnit.d.ts +2 -3
- package/dist/types/client/format/useUnit.d.ts.map +1 -1
- package/dist/types/client/t.d.ts +0 -1
- package/dist/types/client/t.d.ts.map +1 -1
- package/dist/types/client/useDictionary.d.ts +2 -3
- package/dist/types/client/useDictionary.d.ts.map +1 -1
- package/dist/types/client/useDictionaryAsync.d.ts +0 -1
- package/dist/types/client/useDictionaryAsync.d.ts.map +1 -1
- package/dist/types/client/useDictionaryDynamic.d.ts +2 -3
- package/dist/types/client/useDictionaryDynamic.d.ts.map +1 -1
- package/dist/types/client/useI18n.d.ts +0 -1
- package/dist/types/client/useI18n.d.ts.map +1 -1
- package/dist/types/client/useIntlayer.d.ts +3 -4
- package/dist/types/client/useIntlayer.d.ts.map +1 -1
- package/dist/types/client/useLoadDynamic.d.ts.map +1 -1
- package/dist/types/client/useLocale.d.ts.map +1 -1
- package/dist/types/client/useLocaleBase.d.ts +5 -5
- package/dist/types/client/useLocaleBase.d.ts.map +1 -1
- package/dist/types/client/useLocaleStorage.d.ts +5 -6
- package/dist/types/client/useLocaleStorage.d.ts.map +1 -1
- package/dist/types/client/useTraduction.d.ts +0 -1
- package/dist/types/client/useTraduction.d.ts.map +1 -1
- package/dist/types/editor/ContentSelectorWrapper.d.ts.map +1 -1
- package/dist/types/editor/IntlayerEditorProvider.d.ts.map +1 -1
- package/dist/types/editor/useEditedContentRenderer.d.ts.map +1 -1
- package/dist/types/getDictionary.d.ts.map +1 -1
- package/dist/types/getIntlayer.d.ts.map +1 -1
- package/dist/types/html/HTMLProvider.d.ts.map +1 -1
- package/dist/types/html/HTMLRenderer.d.ts +46 -0
- package/dist/types/html/HTMLRenderer.d.ts.map +1 -0
- package/dist/types/html/HTMLRendererPlugin.d.ts +2 -7
- package/dist/types/html/HTMLRendererPlugin.d.ts.map +1 -1
- package/dist/types/html/index.d.ts +4 -2
- package/dist/types/html/types.d.ts +26 -0
- package/dist/types/html/types.d.ts.map +1 -0
- package/dist/types/index.d.ts +4 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/markdown/MarkdownProvider.d.ts +34 -36
- package/dist/types/markdown/MarkdownProvider.d.ts.map +1 -1
- package/dist/types/markdown/MarkdownRenderer.d.ts +235 -13
- package/dist/types/markdown/MarkdownRenderer.d.ts.map +1 -1
- package/dist/types/markdown/MarkdownRendererPlugin.d.ts.map +1 -1
- package/dist/types/markdown/index.d.ts +2 -2
- package/dist/types/markdown/processor.d.ts +0 -1
- package/dist/types/markdown/processor.d.ts.map +1 -1
- package/dist/types/markdown/runtime.d.ts +0 -1
- package/dist/types/markdown/runtime.d.ts.map +1 -1
- package/dist/types/plugins.d.ts +17 -4
- package/dist/types/plugins.d.ts.map +1 -1
- package/dist/types/reactElement/renderReactElement.d.ts +2 -2
- package/dist/types/reactElement/renderReactElement.d.ts.map +1 -1
- package/dist/types/server/IntlayerServerProvider.d.ts +2 -2
- package/dist/types/server/IntlayerServerProvider.d.ts.map +1 -1
- package/dist/types/server/format/useCompact.d.ts +0 -1
- package/dist/types/server/format/useCompact.d.ts.map +1 -1
- package/dist/types/server/format/useCurrency.d.ts +0 -1
- package/dist/types/server/format/useCurrency.d.ts.map +1 -1
- package/dist/types/server/format/useDate.d.ts +0 -1
- package/dist/types/server/format/useDate.d.ts.map +1 -1
- package/dist/types/server/format/useIntl.d.ts +0 -1
- package/dist/types/server/format/useIntl.d.ts.map +1 -1
- package/dist/types/server/format/useList.d.ts +0 -1
- package/dist/types/server/format/useList.d.ts.map +1 -1
- package/dist/types/server/format/useNumber.d.ts +0 -1
- package/dist/types/server/format/useNumber.d.ts.map +1 -1
- package/dist/types/server/format/usePercentage.d.ts +0 -1
- package/dist/types/server/format/usePercentage.d.ts.map +1 -1
- package/dist/types/server/format/useRelativeTime.d.ts +0 -1
- package/dist/types/server/format/useRelativeTime.d.ts.map +1 -1
- package/dist/types/server/format/useUnit.d.ts +0 -1
- package/dist/types/server/format/useUnit.d.ts.map +1 -1
- package/dist/types/server/serverContext.d.ts +0 -1
- package/dist/types/server/serverContext.d.ts.map +1 -1
- package/dist/types/server/t.d.ts +0 -1
- package/dist/types/server/t.d.ts.map +1 -1
- package/dist/types/server/useDictionary.d.ts +2 -3
- package/dist/types/server/useDictionary.d.ts.map +1 -1
- package/dist/types/server/useDictionaryAsync.d.ts +2 -3
- package/dist/types/server/useDictionaryAsync.d.ts.map +1 -1
- package/dist/types/server/useDictionaryDynamic.d.ts +2 -3
- package/dist/types/server/useDictionaryDynamic.d.ts.map +1 -1
- package/dist/types/server/useI18n.d.ts +0 -1
- package/dist/types/server/useI18n.d.ts.map +1 -1
- package/dist/types/server/useIntlayer.d.ts +3 -3
- package/dist/types/server/useIntlayer.d.ts.map +1 -1
- package/dist/types/server/useLoadDynamic.d.ts.map +1 -1
- package/dist/types/server/useLocale.d.ts.map +1 -1
- package/package.json +11 -11
|
@@ -3,10 +3,10 @@ import { createElement } from "react";
|
|
|
3
3
|
//#region src/reactElement/renderReactElement.ts
|
|
4
4
|
const renderReactElement = (element) => {
|
|
5
5
|
if (typeof element === "string") return element;
|
|
6
|
-
const convertChildrenAsArray = (element
|
|
7
|
-
if (element
|
|
6
|
+
const convertChildrenAsArray = (element) => {
|
|
7
|
+
if (element?.props && typeof element.props.children === "object") {
|
|
8
8
|
const childrenResult = [];
|
|
9
|
-
const { children } = element
|
|
9
|
+
const { children } = element.props;
|
|
10
10
|
Object.keys(children ?? {}).forEach((key) => {
|
|
11
11
|
const childElement = renderReactElement(children?.[key]);
|
|
12
12
|
if (typeof childElement === "object" && childElement !== null && "type" in childElement) childrenResult.push(createElement(childElement.type, {
|
|
@@ -16,18 +16,18 @@ const renderReactElement = (element) => {
|
|
|
16
16
|
else childrenResult.push(childElement);
|
|
17
17
|
});
|
|
18
18
|
return {
|
|
19
|
-
...element
|
|
19
|
+
...element,
|
|
20
20
|
props: {
|
|
21
|
-
...element
|
|
21
|
+
...element.props,
|
|
22
22
|
children: childrenResult
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
return {
|
|
27
|
-
...element
|
|
27
|
+
...element,
|
|
28
28
|
props: {
|
|
29
|
-
...element
|
|
30
|
-
children: element
|
|
29
|
+
...element.props,
|
|
30
|
+
children: element.props?.children ?? []
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderReactElement.mjs","names":[
|
|
1
|
+
{"version":3,"file":"renderReactElement.mjs","names":[],"sources":["../../../src/reactElement/renderReactElement.ts"],"sourcesContent":["import { createElement, type ReactElement, type ReactNode } from 'react';\n\n// This function recursively creates React elements from a given JSON-like structure\nexport const renderReactElement = (element: ReactElement<any>) => {\n if (typeof element === 'string') {\n // If it's a string, simply return it (used for text content)\n return element;\n }\n\n const convertChildrenAsArray = (\n element: ReactElement<{ children?: ReactNode }>\n ): ReactElement<{ children?: ReactNode }> => {\n if (element?.props && typeof element.props.children === 'object') {\n const childrenResult: ReactNode[] = [];\n const { children } = element.props;\n\n // Create the children elements recursively, if any\n Object.keys(children ?? {}).forEach((key) => {\n const childElement = renderReactElement(\n children?.[\n key as keyof typeof children\n ] as unknown as ReactElement<any>\n );\n\n // Add key prop if the child is a React element\n if (\n typeof childElement === 'object' &&\n childElement !== null &&\n 'type' in childElement\n ) {\n childrenResult.push(\n createElement(\n childElement.type,\n { ...childElement.props, key },\n ...(Array.isArray(childElement.props?.children)\n ? childElement.props.children\n : [childElement.props?.children])\n )\n );\n } else {\n childrenResult.push(childElement);\n }\n });\n\n return {\n ...element,\n props: { ...element.props, children: childrenResult },\n };\n }\n\n return {\n ...element,\n props: { ...element.props, children: element.props?.children ?? [] },\n };\n };\n\n const fixedElement = convertChildrenAsArray(\n element as ReactElement<{ children?: ReactNode }>\n );\n\n const { type, props } = fixedElement;\n\n // Create and return the React element\n return createElement(\n type ?? 'span',\n props,\n ...(props.children as ReactNode[])\n );\n};\n"],"mappings":";;;AAGA,MAAa,sBAAsB,YAA+B;AAChE,KAAI,OAAO,YAAY,SAErB,QAAO;CAGT,MAAM,0BACJ,YAC2C;AAC3C,MAAI,SAAS,SAAS,OAAO,QAAQ,MAAM,aAAa,UAAU;GAChE,MAAM,iBAA8B,EAAE;GACtC,MAAM,EAAE,aAAa,QAAQ;AAG7B,UAAO,KAAK,YAAY,EAAE,CAAC,CAAC,SAAS,QAAQ;IAC3C,MAAM,eAAe,mBACnB,WACE,KAEH;AAGD,QACE,OAAO,iBAAiB,YACxB,iBAAiB,QACjB,UAAU,aAEV,gBAAe,KACb,cACE,aAAa,MACb;KAAE,GAAG,aAAa;KAAO;KAAK,EAC9B,GAAI,MAAM,QAAQ,aAAa,OAAO,SAAS,GAC3C,aAAa,MAAM,WACnB,CAAC,aAAa,OAAO,SAAS,CACnC,CACF;QAED,gBAAe,KAAK,aAAa;KAEnC;AAEF,UAAO;IACL,GAAG;IACH,OAAO;KAAE,GAAG,QAAQ;KAAO,UAAU;KAAgB;IACtD;;AAGH,SAAO;GACL,GAAG;GACH,OAAO;IAAE,GAAG,QAAQ;IAAO,UAAU,QAAQ,OAAO,YAAY,EAAE;IAAE;GACrE;;CAOH,MAAM,EAAE,MAAM,UAJO,uBACnB,QACD;AAKD,QAAO,cACL,QAAQ,QACR,OACA,GAAI,MAAM,SACX"}
|
|
@@ -19,8 +19,8 @@ const locale = getServerContext(IntlayerServerContext);
|
|
|
19
19
|
/**
|
|
20
20
|
* Provider that store the current locale on the server side
|
|
21
21
|
*/
|
|
22
|
-
const IntlayerServerProvider = ({ children, locale
|
|
23
|
-
value: locale
|
|
22
|
+
const IntlayerServerProvider = ({ children, locale = defaultLocale }) => /* @__PURE__ */ jsx(IntlayerServerContext.Provider, {
|
|
23
|
+
value: locale,
|
|
24
24
|
children
|
|
25
25
|
});
|
|
26
26
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntlayerServerProvider.mjs","names":[
|
|
1
|
+
{"version":3,"file":"IntlayerServerProvider.mjs","names":[],"sources":["../../../src/server/IntlayerServerProvider.tsx"],"sourcesContent":["import configuration from '@intlayer/config/built';\nimport type { LocalesValues } from '@intlayer/types';\n\nimport type { FC, PropsWithChildren } from 'react';\nimport { createServerContext, getServerContext } from './serverContext';\n\nconst { defaultLocale } = configuration?.internationalization ?? {};\n\n/**\n * Context that store the current locale on the server side\n */\nexport const IntlayerServerContext =\n createServerContext<LocalesValues>(defaultLocale);\n\n/**\n * Hook that provides the current locale\n */\nexport const useIntlayer = () => getServerContext(IntlayerServerContext);\n\n/**\n * Get the current locale\n */\nexport const locale = getServerContext(IntlayerServerContext);\n\nexport type IntlayerServerProviderProps = PropsWithChildren & {\n locale?: LocalesValues;\n};\n\n/**\n * Provider that store the current locale on the server side\n */\nexport const IntlayerServerProvider: FC<IntlayerServerProviderProps> = ({\n children,\n locale = defaultLocale,\n}) => (\n <IntlayerServerContext.Provider value={locale}>\n {children}\n </IntlayerServerContext.Provider>\n);\n"],"mappings":";;;;;AAMA,MAAM,EAAE,kBAAkB,eAAe,wBAAwB,EAAE;;;;AAKnE,MAAa,wBACX,oBAAmC,cAAc;;;;AAKnD,MAAa,oBAAoB,iBAAiB,sBAAsB;;;;AAKxE,MAAa,SAAS,iBAAiB,sBAAsB;;;;AAS7D,MAAa,0BAA2D,EACtE,UACA,SAAS,oBAET,oBAAC,sBAAsB;CAAS,OAAO;CACpC;EAC8B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntlayerNode.d.ts","names":[],"sources":["../../src/IntlayerNode.tsx"],"
|
|
1
|
+
{"version":3,"file":"IntlayerNode.d.ts","names":[],"sources":["../../src/IntlayerNode.tsx"],"mappings":";;;;KAQY,YAAA,KACN,SAAA,gCACc,MAAA,mBAChB,SAAA;EACF,KAAA,EAAO,CAAA;AAAA,IACL,eAAA;AAAA,KAEC,uBAAA,MAA6B,iBAAA;EAChC,KAAA,EAAO,CAAA;EACP,QAAA,EAAU,SAAA;EACV,eAAA;IAAA,CAAqB,GAAA;EAAA;AAAA;AAAA,cAGV,kBAAA;EAEX,QAAA;EAAA,KAAA;EAAA;AAAA,GAIC,uBAAA,CAAwB,CAAA,MAAK,YAAA,CAAa,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentSelector.d.ts","names":[],"sources":["../../../src/UI/ContentSelector.tsx"],"
|
|
1
|
+
{"version":3,"file":"ContentSelector.d.ts","names":[],"sources":["../../../src/UI/ContentSelector.tsx"],"mappings":";;;KAcK,oBAAA;EACH,OAAA;EACA,OAAA;EACA,SAAA;EACA,cAAA;EACA,aAAA;EACA,WAAA;AAAA,IACE,IAAA,CAAK,cAAA,CAAe,cAAA;AAAA,cAEX,eAAA,EAAiB,EAAA,CAAG,oBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntlayerProvider.d.ts","names":[],"sources":["../../../src/client/IntlayerProvider.tsx"],"
|
|
1
|
+
{"version":3,"file":"IntlayerProvider.d.ts","names":[],"sources":["../../../src/client/IntlayerProvider.tsx"],"mappings":";;;;;KAgBK,aAAA;EACH,MAAA,EAAQ,aAAA;EACR,SAAA,GAAY,SAAA,EAAW,aAAA;EACvB,aAAA;EACA,eAAA;AAAA;;;;cAMW,qBAAA,EAAqB,MAAA,CAAA,OAAA,CAAA,aAAA;;;;;;cAYrB,kBAAA,QAAkB,aAAA;AAZ/B;;;AAAA,KAiBY,qBAAA,GAAwB,iBAAA;EAjBF;AAYlC;;EASE,MAAA,GAAS,aAAA;EAToB;;AAK/B;EAQE,aAAA,GAAgB,aAAA;;;;EAIhB,SAAA,IAAa,MAAA,EAAQ,aAAA;EAZa;;;EAgBlC,aAAA;EAZA;;;EAgBA,eAAA;AAAA;;;;;;;AAWF;;cAAa,uBAAA,EAAyB,EAAA,CAAG,qBAAA;;;AA6EzC;;;;;;;;;;;;;;;;;;cAAa,gBAAA,EAAkB,EAAA,CAAG,qBAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types10 from "@intlayer/types";
|
|
2
2
|
|
|
3
3
|
//#region src/client/format/useCompact.d.ts
|
|
4
|
-
|
|
5
4
|
/**
|
|
6
5
|
* React client hook that provides a compact number formatter
|
|
7
6
|
* bound to the current application locale.
|
|
@@ -13,7 +12,7 @@ import * as _intlayer_types7 from "@intlayer/types";
|
|
|
13
12
|
* ```
|
|
14
13
|
*/
|
|
15
14
|
declare const useCompact: () => (value: string | number, options?: Intl.NumberFormatOptions & {
|
|
16
|
-
locale?:
|
|
15
|
+
locale?: _intlayer_types10.LocalesValues;
|
|
17
16
|
}) => string;
|
|
18
17
|
//#endregion
|
|
19
18
|
export { useCompact };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCompact.d.ts","names":[],"sources":["../../../../src/client/format/useCompact.ts"],"
|
|
1
|
+
{"version":3,"file":"useCompact.d.ts","names":[],"sources":["../../../../src/client/format/useCompact.ts"],"mappings":";;;;;;AAgBA;;;;;;;cAAa,UAAA,SAAU,KAAA,mBAAA,OAAA,GAAA,IAAA,CAAA,mBAAA;WAAA,iBAAA,CAAA,aAAA;AAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types12 from "@intlayer/types";
|
|
2
2
|
|
|
3
3
|
//#region src/client/format/useCurrency.d.ts
|
|
4
|
-
|
|
5
4
|
/**
|
|
6
5
|
* React client hook that provides a currency formatter
|
|
7
6
|
* bound to the current application locale.
|
|
@@ -27,7 +26,7 @@ import * as _intlayer_types5 from "@intlayer/types";
|
|
|
27
26
|
* ```
|
|
28
27
|
*/
|
|
29
28
|
declare const useCurrency: () => (value: string | number, options?: Intl.NumberFormatOptions & {
|
|
30
|
-
locale?:
|
|
29
|
+
locale?: _intlayer_types12.LocalesValues;
|
|
31
30
|
}) => string;
|
|
32
31
|
//#endregion
|
|
33
32
|
export { useCurrency };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCurrency.d.ts","names":[],"sources":["../../../../src/client/format/useCurrency.ts"],"
|
|
1
|
+
{"version":3,"file":"useCurrency.d.ts","names":[],"sources":["../../../../src/client/format/useCurrency.ts"],"mappings":";;;;;;AA8BA;;;;;;;;;;;;;;;;;;;;;cAAa,WAAA,SAAW,KAAA,mBAAA,OAAA,GAAA,IAAA,CAAA,mBAAA;WAAA,iBAAA,CAAA,aAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDate.d.ts","names":[],"sources":["../../../../src/client/format/useDate.ts"],"
|
|
1
|
+
{"version":3,"file":"useDate.d.ts","names":[],"sources":["../../../../src/client/format/useDate.ts"],"mappings":";;;;;AAgCA;;;;;;;;;;;;;;;;;;;;;;;;cAAa,OAAA,YAGA,IAAA,EAAM,UAAA,QAAkB,IAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIntl.d.ts","names":[],"sources":["../../../../src/client/format/useIntl.ts"],"
|
|
1
|
+
{"version":3,"file":"useIntl.d.ts","names":[],"sources":["../../../../src/client/format/useIntl.ts"],"mappings":";;;;;AAmCA;;;;;;;;;;;;;;;;;;;;;;;;;;cAAa,OAAA,GAAW,MAAA,GAAS,aAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types11 from "@intlayer/types";
|
|
2
2
|
|
|
3
3
|
//#region src/client/format/useList.d.ts
|
|
4
|
-
|
|
5
4
|
/**
|
|
6
5
|
* React client hook that provides a list formatter
|
|
7
6
|
* bound to the current application locale.
|
|
@@ -24,7 +23,7 @@ import * as _intlayer_types15 from "@intlayer/types";
|
|
|
24
23
|
* ```
|
|
25
24
|
*/
|
|
26
25
|
declare const useList: () => (values: (string | number)[], options?: Intl.ListFormatOptions & {
|
|
27
|
-
locale?:
|
|
26
|
+
locale?: _intlayer_types11.LocalesValues;
|
|
28
27
|
}) => string;
|
|
29
28
|
//#endregion
|
|
30
29
|
export { useList };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useList.d.ts","names":[],"sources":["../../../../src/client/format/useList.ts"],"
|
|
1
|
+
{"version":3,"file":"useList.d.ts","names":[],"sources":["../../../../src/client/format/useList.ts"],"mappings":";;;;;;AA2BA;;;;;;;;;;;;;;;;;;cAAa,OAAA,SAAO,MAAA,uBAAA,OAAA,GAAA,IAAA,CAAA,iBAAA;WAAA,iBAAA,CAAA,aAAA;AAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types13 from "@intlayer/types";
|
|
2
2
|
|
|
3
3
|
//#region src/client/format/useNumber.d.ts
|
|
4
|
-
|
|
5
4
|
/**
|
|
6
5
|
* React client hook that provides a localized number formatter.
|
|
7
6
|
*
|
|
@@ -25,7 +24,7 @@ import * as _intlayer_types6 from "@intlayer/types";
|
|
|
25
24
|
* A number formatting function bound to the active locale.
|
|
26
25
|
*/
|
|
27
26
|
declare const useNumber: () => (value: string | number, options?: Intl.NumberFormatOptions & {
|
|
28
|
-
locale?:
|
|
27
|
+
locale?: _intlayer_types13.LocalesValues;
|
|
29
28
|
}) => string;
|
|
30
29
|
//#endregion
|
|
31
30
|
export { useNumber };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNumber.d.ts","names":[],"sources":["../../../../src/client/format/useNumber.ts"],"
|
|
1
|
+
{"version":3,"file":"useNumber.d.ts","names":[],"sources":["../../../../src/client/format/useNumber.ts"],"mappings":";;;;;;AA4BA;;;;;;;;;;;;;;;;;;;cAAa,SAAA,SAAS,KAAA,mBAAA,OAAA,GAAA,IAAA,CAAA,mBAAA;WAAA,iBAAA,CAAA,aAAA;AAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types15 from "@intlayer/types";
|
|
2
2
|
|
|
3
3
|
//#region src/client/format/usePercentage.d.ts
|
|
4
|
-
|
|
5
4
|
/**
|
|
6
5
|
* React hook to provide a percentage formatter function
|
|
7
6
|
* based on the current application locale.
|
|
@@ -21,7 +20,7 @@ import * as _intlayer_types9 from "@intlayer/types";
|
|
|
21
20
|
* A function that formats numbers or numeric strings into localized percentages.
|
|
22
21
|
*/
|
|
23
22
|
declare const usePercentage: () => (value: string | number, options?: Intl.NumberFormatOptions & {
|
|
24
|
-
locale?:
|
|
23
|
+
locale?: _intlayer_types15.LocalesValues;
|
|
25
24
|
}) => string;
|
|
26
25
|
//#endregion
|
|
27
26
|
export { usePercentage };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePercentage.d.ts","names":[],"sources":["../../../../src/client/format/usePercentage.ts"],"
|
|
1
|
+
{"version":3,"file":"usePercentage.d.ts","names":[],"sources":["../../../../src/client/format/usePercentage.ts"],"mappings":";;;;;;AAwBA;;;;;;;;;;;;;;;cAAa,aAAA,SAAa,KAAA,mBAAA,OAAA,GAAA,IAAA,CAAA,mBAAA;WAAA,iBAAA,CAAA,aAAA;AAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types14 from "@intlayer/types";
|
|
2
2
|
|
|
3
3
|
//#region src/client/format/useRelativeTime.d.ts
|
|
4
|
-
|
|
5
4
|
/**
|
|
6
5
|
* Client-side React hook for accessing a localized relative time formatter.
|
|
7
6
|
*
|
|
@@ -21,7 +20,7 @@ import * as _intlayer_types8 from "@intlayer/types";
|
|
|
21
20
|
* bound to the current client locale.
|
|
22
21
|
*/
|
|
23
22
|
declare const useRelativeTime: () => (from: string | number | Date, to?: string | number | Date, options?: Intl.RelativeTimeFormatOptions & {
|
|
24
|
-
locale?:
|
|
23
|
+
locale?: _intlayer_types14.LocalesValues;
|
|
25
24
|
unit?: Intl.RelativeTimeFormatUnit;
|
|
26
25
|
}) => string;
|
|
27
26
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRelativeTime.d.ts","names":[],"sources":["../../../../src/client/format/useRelativeTime.ts"],"
|
|
1
|
+
{"version":3,"file":"useRelativeTime.d.ts","names":[],"sources":["../../../../src/client/format/useRelativeTime.ts"],"mappings":";;;;;;AAwBA;;;;;;;;;;;;;;;cAAa,eAAA,SAAe,IAAA,oBAAA,IAAA,EAAA,EAAA,qBAAA,IAAA,EAAA,OAAA,GAAA,IAAA,CAAA,yBAAA;WAAA,iBAAA,CAAA,aAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types0 from "@intlayer/types";
|
|
2
2
|
|
|
3
3
|
//#region src/client/format/useUnit.d.ts
|
|
4
|
-
|
|
5
4
|
/**
|
|
6
5
|
* React hook that provides a unit formatting function
|
|
7
6
|
* based on the current locale from {@link useLocaleBase}.
|
|
@@ -20,7 +19,7 @@ import * as _intlayer_types10 from "@intlayer/types";
|
|
|
20
19
|
* @returns {Function} A unit formatting function that accepts a value and optional formatting options.
|
|
21
20
|
*/
|
|
22
21
|
declare const useUnit: () => (value: string | number, options?: Intl.NumberFormatOptions & {
|
|
23
|
-
locale?:
|
|
22
|
+
locale?: _intlayer_types0.LocalesValues;
|
|
24
23
|
}) => string;
|
|
25
24
|
//#endregion
|
|
26
25
|
export { useUnit };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUnit.d.ts","names":[],"sources":["../../../../src/client/format/useUnit.ts"],"
|
|
1
|
+
{"version":3,"file":"useUnit.d.ts","names":[],"sources":["../../../../src/client/format/useUnit.ts"],"mappings":";;;;;;AAuBA;;;;;;;;;;;;;;cAAa,OAAA,SAAO,KAAA,mBAAA,OAAA,GAAA,IAAA,CAAA,mBAAA;WAAA,gBAAA,CAAA,aAAA;AAAA"}
|
package/dist/types/client/t.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"t.d.ts","names":[],"sources":["../../../src/client/t.ts"],"
|
|
1
|
+
{"version":3,"file":"t.d.ts","names":[],"sources":["../../../src/client/t.ts"],"mappings":";;;;;AA+BA;;;;;;;;;;;;;;;;;;;;;;cAAa,CAAA,qBACX,gBAAA,EAAkB,mBAAA,CAAoB,OAAA,GACtC,MAAA,GAAS,aAAA,KAAa,OAAA"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { IInterpreterPluginState as IInterpreterPluginState$1 } from "../plugins.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _intlayer_core0 from "@intlayer/core";
|
|
3
3
|
import { DeclaredLocales, Dictionary, LocalesValues } from "@intlayer/types";
|
|
4
4
|
|
|
5
5
|
//#region src/client/useDictionary.d.ts
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* On the server side, Hook that transform a dictionary and return the content
|
|
9
8
|
*
|
|
10
9
|
* If the locale is not provided, it will use the locale from the client context
|
|
11
10
|
*/
|
|
12
|
-
declare const useDictionary: <T extends Dictionary, L extends LocalesValues = DeclaredLocales>(dictionary: T, locale?: L) =>
|
|
11
|
+
declare const useDictionary: <T extends Dictionary, L extends LocalesValues = DeclaredLocales>(dictionary: T, locale?: L) => _intlayer_core0.DeepTransformContent<T["content"], IInterpreterPluginState$1, L>;
|
|
13
12
|
//#endregion
|
|
14
13
|
export { useDictionary };
|
|
15
14
|
//# sourceMappingURL=useDictionary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDictionary.d.ts","names":[],"sources":["../../../src/client/useDictionary.ts"],"
|
|
1
|
+
{"version":3,"file":"useDictionary.d.ts","names":[],"sources":["../../../src/client/useDictionary.ts"],"mappings":";;;;;;;;;AAgBA;cAAa,aAAA,aACD,UAAA,YACA,aAAA,GAAgB,eAAA,EAE1B,UAAA,EAAY,CAAA,EACZ,MAAA,GAAS,CAAA,KAAC,eAAA,CAAA,oBAAA,CAAA,CAAA,aAAA,yBAAA,EAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDictionaryAsync.d.ts","names":[],"sources":["../../../src/client/useDictionaryAsync.ts"],"
|
|
1
|
+
{"version":3,"file":"useDictionaryAsync.d.ts","names":[],"sources":["../../../src/client/useDictionaryAsync.ts"],"mappings":";;;;;AAkBA;;;cAAa,kBAAA,aACD,UAAA,YACA,aAAA,GAAgB,eAAA,EAE1B,iBAAA,EAAmB,mBAAA,OAA0B,OAAA,CAAQ,CAAA,IACrD,MAAA,GAAS,CAAA,KACR,OAAA,CAAQ,CAAA"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { IInterpreterPluginState as IInterpreterPluginState$1 } from "../plugins.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _intlayer_core0 from "@intlayer/core";
|
|
3
3
|
import { Dictionary, DictionaryKeys, LocalesValues, StrictModeLocaleMap } from "@intlayer/types";
|
|
4
4
|
|
|
5
5
|
//#region src/client/useDictionaryDynamic.d.ts
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* On the server side, Hook that transform a dictionary and return the content
|
|
9
8
|
*
|
|
10
9
|
* If the locale is not provided, it will use the locale from the client context
|
|
11
10
|
*/
|
|
12
|
-
declare const useDictionaryDynamic: <T extends Dictionary, K extends DictionaryKeys>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, key: K, locale?: LocalesValues) =>
|
|
11
|
+
declare const useDictionaryDynamic: <T extends Dictionary, K extends DictionaryKeys>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, key: K, locale?: LocalesValues) => _intlayer_core0.DeepTransformContent<T["content"], IInterpreterPluginState$1, "af" | "af-ZA" | "ar" | "ar-AE" | "ar-BH" | "ar-DZ" | "ar-EG" | "ar-IQ" | "ar-JO" | "ar-KW" | "ar-LB" | "ar-LY" | "ar-MA" | "ar-OM" | "ar-QA" | "ar-SA" | "ar-SY" | "ar-TN" | "ar-YE" | "az" | "az-AZ" | "be" | "be-BY" | "bg" | "bg-BG" | "bs" | "bs-BA" | "ca" | "ca-ES" | "cs" | "cs-CZ" | "cy" | "cy-GB" | "da" | "da-DK" | "de" | "de-AT" | "de-CH" | "de-DE" | "de-LI" | "de-LU" | "dv" | "dv-MV" | "el" | "el-GR" | "en" | "en-AU" | "en-BZ" | "en-CA" | "en-CB" | "en-GB" | "en-IE" | "en-JM" | "en-NZ" | "en-PH" | "en-TT" | "en-US" | "en-ZA" | "en-ZW" | "eo" | "es" | "es-AR" | "es-BO" | "es-CL" | "es-CO" | "es-CR" | "es-DO" | "es-EC" | "es-ES" | "es-GT" | "es-HN" | "es-MX" | "es-NI" | "es-PA" | "es-PE" | "es-PR" | "es-PY" | "es-SV" | "es-UY" | "es-VE" | "et" | "et-EE" | "eu" | "eu-ES" | "fa" | "fa-IR" | "fi" | "fi-FI" | "fo" | "fo-FO" | "fr" | "fr-BE" | "fr-CA" | "fr-CH" | "fr-FR" | "fr-LU" | "fr-MC" | "ga" | "ga-IE" | "gd" | "gd-GB" | "gl" | "gl-ES" | "gu" | "gu-IN" | "he" | "he-IL" | "hi" | "hi-IN" | "hr" | "hr-BA" | "hr-HR" | "hu" | "hu-HU" | "hy" | "hy-AM" | "id" | "id-ID" | "is" | "is-IS" | "it" | "it-CH" | "it-IT" | "ja" | "ja-JP" | "ka" | "ka-GE" | "kk" | "kk-KZ" | "kn" | "kn-IN" | "ko" | "ko-KR" | "kok" | "kok-IN" | "ku" | "ku-TR" | "ky" | "ky-KG" | "lt" | "lt-LT" | "lv" | "lv-LV" | "mi" | "mi-NZ" | "mk" | "mk-MK" | "mn" | "mn-MN" | "mr" | "mr-IN" | "ms" | "ms-BN" | "ms-MY" | "mt" | "mt-MT" | "ml" | "ml-IN" | "no" | "nb" | "nb-NO" | "nl" | "nl-BE" | "nl-NL" | "nn" | "nn-NO" | "ns" | "ns-ZA" | "pa" | "pa-IN" | "pl" | "pl-PL" | "ps" | "ps-AR" | "pt" | "pt-BR" | "pt-PT" | "qu" | "qu-BO" | "qu-EC" | "qu-PE" | "ro" | "ro-RO" | "ro-MD" | "rm" | "rm-CH" | "ru" | "ru-RU" | "ru-MD" | "sa" | "sa-IN" | "se" | "se-FI" | "se-NO" | "se-SE" | "hsb" | "hsb-DE" | "dsb" | "dsb-DE" | "sk" | "sk-SK" | "sl" | "sl-SI" | "sq" | "sq-AL" | "sr" | "sr-BA" | "sr-SP" | "sv" | "sv-FI" | "sv-SE" | "sw" | "sw-KE" | "syr" | "syr-SY" | "ta" | "ta-IN" | "te" | "te-IN" | "th" | "th-TH" | "tl" | "tl-PH" | "tn" | "tn-ZA" | "tr" | "tr-TR" | "tt" | "tt-RU" | "ts" | "uk" | "uk-UA" | "ur" | "ur-PK" | "uz" | "uz-UZ" | "vi" | "vi-VN" | "ve" | "ve-ZA" | "xh" | "xh-ZA" | "zh" | "zh-Hans" | "zh-CN" | "zh-HK" | "zh-MO" | "zh-SG" | "zh-Hant" | "zu" | "zu-ZA" | "bn" | "bn-BD" | "bn-IN" | "bn-MM" | "my" | "my-MM" | "km" | "km-KH" | "lo" | "lo-LA" | "yo" | "yo-NG" | "yi" | "yi-001" | "am" | "am-ET" | "ne" | "ne-NP" | "si" | "si-LK" | "sr-Cyrl" | "sr-RS" | "en-IN" | "en-SG" | "en-HK" | "en-NG" | "en-PK" | "en-MY" | "en-BW" | "en-KE" | "en-TZ" | "en-GH" | "en-UG" | "es-CU" | "es-US" | "pt-GW" | "pt-MZ" | "pt-ST" | "pt-CV" | "pt-TL" | "pt-MO" | "zh-TW" | "ar-MR" | "ar-PS" | "ar-SD" | "ar-DJ" | "ar-SO" | "ar-TD" | "ar-KM" | (string & {})>;
|
|
13
12
|
//#endregion
|
|
14
13
|
export { useDictionaryDynamic };
|
|
15
14
|
//# sourceMappingURL=useDictionaryDynamic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDictionaryDynamic.d.ts","names":[],"sources":["../../../src/client/useDictionaryDynamic.ts"],"
|
|
1
|
+
{"version":3,"file":"useDictionaryDynamic.d.ts","names":[],"sources":["../../../src/client/useDictionaryDynamic.ts"],"mappings":";;;;;;;;;AAmBA;cAAa,oBAAA,aACD,UAAA,YACA,cAAA,EAEV,iBAAA,EAAmB,mBAAA,OAA0B,OAAA,CAAQ,CAAA,IACrD,GAAA,EAAK,CAAA,EACL,MAAA,GAAS,aAAA,KAAa,eAAA,CAAA,oBAAA,CAAA,CAAA,aAAA,yBAAA"}
|
|
@@ -3,7 +3,6 @@ import { ValidDotPathsFor } from "@intlayer/core";
|
|
|
3
3
|
import { DeclaredLocales, DictionaryKeys, DictionaryRegistryContent, GetSubPath, LocalesValues } from "@intlayer/types";
|
|
4
4
|
|
|
5
5
|
//#region src/client/useI18n.d.ts
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* Hook that provides a translation function `t()` for accessing nested content by key.
|
|
9
8
|
* This hook mimics the pattern found in libraries like i18next, next-intl, and vue-i18n.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useI18n.d.ts","names":[],"sources":["../../../src/client/useI18n.ts"],"
|
|
1
|
+
{"version":3,"file":"useI18n.d.ts","names":[],"sources":["../../../src/client/useI18n.ts"],"mappings":";;;;;;;AA+BA;;;;;;;;;;;;;;;cAAa,OAAA,aACD,cAAA,YACA,aAAA,GAAgB,eAAA,EAE1B,SAAA,EAAW,CAAA,EACX,MAAA,GAAS,CAAA,gBAkBY,gBAAA,CAAiB,CAAA,GAAE,IAAA,EAChC,CAAA,KAEL,UAAA,CAAW,sBAAA,CAAqB,yBAAA,CAA0B,CAAA,IAAK,CAAA"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { IInterpreterPluginState as IInterpreterPluginState$1 } from "../plugins.js";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as _intlayer_core1 from "@intlayer/core";
|
|
3
|
+
import * as _intlayer_types0 from "@intlayer/types";
|
|
4
4
|
import { DeclaredLocales, DictionaryKeys, LocalesValues } from "@intlayer/types";
|
|
5
5
|
|
|
6
6
|
//#region src/client/useIntlayer.d.ts
|
|
7
|
-
|
|
8
7
|
/**
|
|
9
8
|
* Client-side hook that picks one dictionary by its key and returns its content.
|
|
10
9
|
*
|
|
@@ -25,7 +24,7 @@ import { DeclaredLocales, DictionaryKeys, LocalesValues } from "@intlayer/types"
|
|
|
25
24
|
* };
|
|
26
25
|
* ```
|
|
27
26
|
*/
|
|
28
|
-
declare const useIntlayer: <T extends DictionaryKeys, L extends LocalesValues = DeclaredLocales>(key: T, locale?: L) =>
|
|
27
|
+
declare const useIntlayer: <T extends DictionaryKeys, L extends LocalesValues = DeclaredLocales>(key: T, locale?: L) => _intlayer_core1.DeepTransformContent<_intlayer_types0.DictionaryRegistryContent<T>, IInterpreterPluginState$1, L>;
|
|
29
28
|
//#endregion
|
|
30
29
|
export { useIntlayer };
|
|
31
30
|
//# sourceMappingURL=useIntlayer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIntlayer.d.ts","names":[],"sources":["../../../src/client/useIntlayer.ts"],"
|
|
1
|
+
{"version":3,"file":"useIntlayer.d.ts","names":[],"sources":["../../../src/client/useIntlayer.ts"],"mappings":";;;;;;;;;;;AA+BA;;;;;;;;;;;;;;;cAAa,WAAA,aACD,cAAA,YACA,aAAA,GAAgB,eAAA,EAE1B,GAAA,EAAK,CAAA,EACL,MAAA,GAAS,CAAA,KAAC,eAAA,CAAA,oBAAA,CAAA,gBAAA,CAAA,yBAAA,CAAA,CAAA,GAAA,yBAAA,EAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLoadDynamic.d.ts","names":[],"sources":["../../../src/client/useLoadDynamic.ts"],"
|
|
1
|
+
{"version":3,"file":"useLoadDynamic.d.ts","names":[],"sources":["../../../src/client/useLoadDynamic.ts"],"mappings":";cA2Ba,cAAA,MAAqB,GAAA,UAAa,OAAA,EAAS,OAAA,CAAQ,CAAA,MAAK,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocale.d.ts","names":[],"sources":["../../../src/client/useLocale.ts"],"
|
|
1
|
+
{"version":3,"file":"useLocale.d.ts","names":[],"sources":["../../../src/client/useLocale.ts"],"mappings":";;;KAQK,cAAA;EACH,eAAA;EACA,cAAA,IAAkB,MAAA,EAAQ,aAAA;AAAA;AAAA,KAGvB,eAAA;EACH,MAAA,EAAQ,eAAA;EACR,aAAA,EAAe,eAAA;EACf,gBAAA,EAAkB,eAAA;EAClB,SAAA,GAAY,MAAA,EAAQ,aAAA;AAAA;;;AAPmB;;;;;;;;;;;;;;;;;;;;AAiCzC;cAAa,SAAA;EAAa,eAAA;EAAA;AAAA,IAGvB,cAAA,KAAsB,eAAA"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types1 from "@intlayer/types";
|
|
2
2
|
|
|
3
3
|
//#region src/client/useLocaleBase.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* On the client side, hook to get the current locale and all related fields
|
|
6
6
|
*/
|
|
7
7
|
declare const useLocaleBase: () => {
|
|
8
|
-
locale:
|
|
9
|
-
defaultLocale:
|
|
10
|
-
availableLocales:
|
|
11
|
-
setLocale: (newLocale:
|
|
8
|
+
locale: _intlayer_types1.LocalesValues;
|
|
9
|
+
defaultLocale: _intlayer_types1.Locale;
|
|
10
|
+
availableLocales: _intlayer_types1.Locale[];
|
|
11
|
+
setLocale: (newLocale: _intlayer_types1.LocalesValues) => void;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
14
14
|
export { useLocaleBase };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocaleBase.d.ts","names":[],"sources":["../../../src/client/useLocaleBase.ts"],"
|
|
1
|
+
{"version":3,"file":"useLocaleBase.d.ts","names":[],"sources":["../../../src/client/useLocaleBase.ts"],"mappings":";;;;;;cAYa,aAAA;UASZ,gBAAA,CAAA,aAAA"}
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types5 from "@intlayer/types";
|
|
2
2
|
import { LocalesValues } from "@intlayer/types";
|
|
3
3
|
|
|
4
4
|
//#region src/client/useLocaleStorage.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* Get the locale cookie
|
|
8
7
|
*/
|
|
9
8
|
/**
|
|
10
9
|
* Get the locale cookie
|
|
11
10
|
*/
|
|
12
|
-
declare const localeInStorage:
|
|
11
|
+
declare const localeInStorage: _intlayer_types5.Locale;
|
|
13
12
|
/**
|
|
14
13
|
* @deprecated Use localeInStorage instead
|
|
15
14
|
*
|
|
16
15
|
* Get the locale cookie
|
|
17
16
|
*/
|
|
18
|
-
declare const localeCookie:
|
|
17
|
+
declare const localeCookie: _intlayer_types5.Locale;
|
|
19
18
|
/**
|
|
20
19
|
* Set the locale cookie
|
|
21
20
|
*/
|
|
@@ -30,7 +29,7 @@ declare const setLocaleCookie: (locale: LocalesValues, isCookieEnabled?: boolean
|
|
|
30
29
|
* Hook that provides the locale cookie and a function to set it
|
|
31
30
|
*/
|
|
32
31
|
declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
|
|
33
|
-
getLocale: () =>
|
|
32
|
+
getLocale: () => _intlayer_types5.Locale;
|
|
34
33
|
setLocale: (locale: LocalesValues) => void;
|
|
35
34
|
};
|
|
36
35
|
/**
|
|
@@ -41,7 +40,7 @@ declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
|
|
|
41
40
|
* Hook that provides the locale cookie and a function to set it
|
|
42
41
|
*/
|
|
43
42
|
declare const useLocaleCookie: (isCookieEnabled?: boolean) => {
|
|
44
|
-
localeCookie:
|
|
43
|
+
localeCookie: _intlayer_types5.Locale;
|
|
45
44
|
setLocaleCookie: (locale: LocalesValues) => void;
|
|
46
45
|
};
|
|
47
46
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocaleStorage.d.ts","names":[],"sources":["../../../src/client/useLocaleStorage.ts"],"
|
|
1
|
+
{"version":3,"file":"useLocaleStorage.d.ts","names":[],"sources":["../../../src/client/useLocaleStorage.ts"],"mappings":";;;;;;;AAeA;;;AAAA,cAAa,eAAA,EAA4D,gBAAA,CAA7C,MAAA;;AAM5B;;;;cAAa,YAAA,EAA8B,gBAAA,CAAlB,MAAA;AAKzB;;;AAAA,cAAa,kBAAA,GACX,MAAA,EAAQ,aAAA,EACR,eAAA;;;;;;cAYW,eAAA,GAAe,MAAA,EAblB,aAAA,EAAa,eAAA;;;;cAkBV,gBAAA,GAAoB,eAAA;mBAQ9B,gBAAA,CAAA,MAAA;sBAAA,aAAA;AAAA;;AARH;;;;;;cAiBa,eAAA,GAAmB,eAAA;gBAO/B,gBAAA,CAAA,MAAA;4BAAA,aAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTraduction.d.ts","names":[],"sources":["../../../src/client/useTraduction.ts"],"
|
|
1
|
+
{"version":3,"file":"useTraduction.d.ts","names":[],"sources":["../../../src/client/useTraduction.ts"],"mappings":";;;;;AA0BA;;;;;;;;;;;;;;;;;;;cAAa,cAAA,qBACX,eAAA,EAAiB,mBAAA,CAAoB,OAAA,MACpC,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentSelectorWrapper.d.ts","names":[],"sources":["../../../src/editor/ContentSelectorWrapper.tsx"],"
|
|
1
|
+
{"version":3,"file":"ContentSelectorWrapper.d.ts","names":[],"sources":["../../../src/editor/ContentSelectorWrapper.tsx"],"mappings":";;;;KAcY,2BAAA,GAA8B,SAAA,GACxC,IAAA,CAAK,cAAA,CAAe,cAAA;AAAA,cAqET,uBAAA,EAAyB,EAAA,CAAG,2BAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntlayerEditorProvider.d.ts","names":[],"sources":["../../../src/editor/IntlayerEditorProvider.tsx"],"
|
|
1
|
+
{"version":3,"file":"IntlayerEditorProvider.d.ts","names":[],"sources":["../../../src/editor/IntlayerEditorProvider.tsx"],"mappings":";;;cAqDa,sBAAA,EAAwB,EAAA,CAAG,iBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEditedContentRenderer.d.ts","names":[],"sources":["../../../src/editor/useEditedContentRenderer.tsx"],"
|
|
1
|
+
{"version":3,"file":"useEditedContentRenderer.d.ts","names":[],"sources":["../../../src/editor/useEditedContentRenderer.tsx"],"mappings":";;;;KAQK,0BAAA;EACH,aAAA;EACA,OAAA,EAAS,OAAA;EACT,QAAA;EACA,MAAA,GAAS,MAAA;AAAA;AAAA,cAGE,wBAAA;EAA4B,aAAA;EAAA,OAAA;EAAA;AAAA,GAItC,0BAAA;AAAA,cAiBU,qBAAA,EAAuB,EAAA,CAAG,0BAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDictionary.d.ts","names":[],"sources":["../../src/getDictionary.ts"],"
|
|
1
|
+
{"version":3,"file":"getDictionary.d.ts","names":[],"sources":["../../src/getDictionary.ts"],"mappings":";;;;;cAkBa,aAAA,aACD,UAAA,YACA,aAAA,GAAgB,eAAA,EAE1B,UAAA,EAAY,CAAA,EACZ,MAAA,GAAS,CAAA,EACT,iBAAA,GAAoB,OAAA,OACnB,sBAAA,CAAqB,CAAA,aAAc,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getIntlayer.d.ts","names":[],"sources":["../../src/getIntlayer.ts"],"
|
|
1
|
+
{"version":3,"file":"getIntlayer.d.ts","names":[],"sources":["../../src/getIntlayer.ts"],"mappings":";;;;;cAgBa,WAAA,aACD,cAAA,YACA,aAAA,GAAgB,eAAA,EAE1B,GAAA,EAAK,CAAA,EACL,MAAA,GAAS,CAAA,EACT,iBAAA,GAAoB,OAAA,OACnB,sBAAA,CAAqB,yBAAA,CAA0B,CAAA,GAAI,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HTMLProvider.d.ts","names":[],"sources":["../../../src/html/HTMLProvider.tsx"],"
|
|
1
|
+
{"version":3,"file":"HTMLProvider.d.ts","names":[],"sources":["../../../src/html/HTMLProvider.tsx"],"mappings":";;;KASK,gBAAA;EACH,UAAA,GAAa,MAAA;AAAA;AAAA,KAGV,iBAAA,GAAoB,iBAAA;;;;EAIvB,UAAA,GAAa,MAAA;AAAA;AAAA,cAKF,cAAA,QAAc,gBAAA;AAAA,cAEd,YAAA,EAAc,EAAA,CAAG,iBAAA"}
|