react-intlayer 5.0.0 → 5.0.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/IntlayerProvider.cjs +13 -9
- package/dist/cjs/client/IntlayerProvider.cjs.map +1 -1
- package/dist/cjs/client/index.cjs +2 -0
- package/dist/cjs/client/index.cjs.map +1 -1
- package/dist/cjs/client/useIntlayerAsync.cjs.map +1 -1
- package/dist/cjs/client/useLocale.cjs.map +1 -1
- package/dist/cjs/client/useLocaleCookie.cjs.map +1 -1
- package/dist/cjs/editor/ContentSelectorWrapper.cjs +4 -2
- package/dist/cjs/editor/ContentSelectorWrapper.cjs.map +1 -1
- package/dist/cjs/getDictionary.cjs.map +1 -1
- package/dist/cjs/getIntlayer.cjs.map +1 -1
- package/dist/cjs/index.cjs +2 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/plugins.cjs +2 -35
- package/dist/cjs/plugins.cjs.map +1 -1
- package/dist/cjs/reactElement/renderReactElement.cjs +62 -0
- package/dist/cjs/reactElement/renderReactElement.cjs.map +1 -0
- package/dist/cjs/server/IntlayerServerProvider.cjs.map +1 -1
- package/dist/cjs/server/t.cjs +1 -3
- package/dist/cjs/server/t.cjs.map +1 -1
- package/dist/cjs/server/useDictionary.cjs.map +1 -1
- package/dist/cjs/server/useIntlayer.cjs.map +1 -1
- package/dist/esm/client/IntlayerProvider.mjs +12 -9
- package/dist/esm/client/IntlayerProvider.mjs.map +1 -1
- package/dist/esm/client/index.mjs +2 -0
- package/dist/esm/client/index.mjs.map +1 -1
- package/dist/esm/client/useIntlayerAsync.mjs.map +1 -1
- package/dist/esm/client/useLocale.mjs.map +1 -1
- package/dist/esm/client/useLocaleCookie.mjs.map +1 -1
- package/dist/esm/editor/ContentSelectorWrapper.mjs +4 -2
- package/dist/esm/editor/ContentSelectorWrapper.mjs.map +1 -1
- package/dist/esm/getDictionary.mjs.map +1 -1
- package/dist/esm/getIntlayer.mjs.map +1 -1
- package/dist/esm/index.mjs +2 -0
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/plugins.mjs +2 -35
- package/dist/esm/plugins.mjs.map +1 -1
- package/dist/esm/reactElement/renderReactElement.mjs +38 -0
- package/dist/esm/reactElement/renderReactElement.mjs.map +1 -0
- package/dist/esm/server/IntlayerServerProvider.mjs.map +1 -1
- package/dist/esm/server/t.mjs +1 -3
- package/dist/esm/server/t.mjs.map +1 -1
- package/dist/esm/server/useDictionary.mjs.map +1 -1
- package/dist/esm/server/useIntlayer.mjs.map +1 -1
- package/dist/types/client/IntlayerProvider.d.ts +12 -6
- package/dist/types/client/IntlayerProvider.d.ts.map +1 -1
- package/dist/types/client/index.d.ts +1 -1
- package/dist/types/client/index.d.ts.map +1 -1
- package/dist/types/client/useContent.d.ts +1 -1
- package/dist/types/client/useIntlayerAsync.d.ts +2 -2
- package/dist/types/client/useIntlayerAsync.d.ts.map +1 -1
- package/dist/types/client/useLocale.d.ts +7 -7
- package/dist/types/client/useLocale.d.ts.map +1 -1
- package/dist/types/client/useLocaleBase.d.ts +2 -2
- package/dist/types/client/useLocaleCookie.d.ts +5 -5
- package/dist/types/client/useLocaleCookie.d.ts.map +1 -1
- package/dist/types/editor/ContentSelectorWrapper.d.ts.map +1 -1
- package/dist/types/getDictionary.d.ts +2 -2
- package/dist/types/getDictionary.d.ts.map +1 -1
- package/dist/types/getIntlayer.d.ts +2 -2
- package/dist/types/getIntlayer.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/plugins.d.ts +1 -1
- package/dist/types/plugins.d.ts.map +1 -1
- package/dist/types/reactElement/renderReactElement.d.ts +3 -0
- package/dist/types/reactElement/renderReactElement.d.ts.map +1 -0
- package/dist/types/server/IntlayerServerProvider.d.ts +8 -8
- package/dist/types/server/IntlayerServerProvider.d.ts.map +1 -1
- package/dist/types/server/t.d.ts +2 -2
- package/dist/types/server/t.d.ts.map +1 -1
- package/dist/types/server/useDictionary.d.ts +2 -2
- package/dist/types/server/useDictionary.d.ts.map +1 -1
- package/dist/types/server/useIntlayer.d.ts +2 -2
- package/dist/types/server/useIntlayer.d.ts.map +1 -1
- package/package.json +15 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/client/useLocaleCookie.ts"],"sourcesContent":["import { type
|
|
1
|
+
{"version":3,"sources":["../../../src/client/useLocaleCookie.ts"],"sourcesContent":["import { type LocalesValues, getConfiguration } from '@intlayer/config/client';\nimport Cookies from 'js-cookie';\n\nconst { cookieName } = getConfiguration().middleware;\n\nconst cookieAttributes: Cookies.CookieAttributes = {\n path: '/',\n expires: undefined,\n domain: undefined,\n secure: false,\n sameSite: 'strict',\n};\n\n/**\n * Get the locale cookie\n */\nexport const localeCookie = Cookies.get(cookieName) as unknown as\n | LocalesValues\n | undefined;\n\n/**\n * Set the locale cookie\n */\nexport const setLocaleCookie = (locale: LocalesValues) => {\n Cookies.set(cookieName, locale, cookieAttributes);\n};\n\n/**\n * Hook that provides the locale cookie and a function to set it\n */\nexport const useLocaleCookie = () => ({\n localeCookie,\n setLocaleCookie,\n});\n"],"mappings":"AAAA,SAA6B,wBAAwB;AACrD,OAAO,aAAa;AAEpB,MAAM,EAAE,WAAW,IAAI,iBAAiB,EAAE;AAE1C,MAAM,mBAA6C;AAAA,EACjD,MAAM;AAAA,EACN,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,UAAU;AACZ;AAKO,MAAM,eAAe,QAAQ,IAAI,UAAU;AAO3C,MAAM,kBAAkB,CAAC,WAA0B;AACxD,UAAQ,IAAI,YAAY,QAAQ,gBAAgB;AAClD;AAKO,MAAM,kBAAkB,OAAO;AAAA,EACpC;AAAA,EACA;AACF;","names":[]}
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
useMemo
|
|
14
14
|
} from "react";
|
|
15
15
|
import { ContentSelector } from "../UI/ContentSelector.mjs";
|
|
16
|
+
import { useIntlayerContext } from "../client/index.mjs";
|
|
16
17
|
const ContentSelectorWrapperContent = ({
|
|
17
18
|
children,
|
|
18
19
|
dictionaryKey,
|
|
@@ -35,7 +36,7 @@ const ContentSelectorWrapperContent = ({
|
|
|
35
36
|
);
|
|
36
37
|
const isSelected = useMemo(
|
|
37
38
|
() => (focusedContent?.dictionaryKey === dictionaryKey && (focusedContent?.keyPath?.length ?? 0) > 0 && isSameKeyPath(focusedContent?.keyPath ?? [], keyPath)) ?? false,
|
|
38
|
-
[focusedContent, keyPath]
|
|
39
|
+
[focusedContent, keyPath, dictionaryKey]
|
|
39
40
|
);
|
|
40
41
|
useEffect(() => {
|
|
41
42
|
if (editedValue && typeof editedValue === "string") {
|
|
@@ -51,7 +52,8 @@ const ContentSelectorWrapper = ({
|
|
|
51
52
|
...props
|
|
52
53
|
}) => {
|
|
53
54
|
const { enabled } = useEditorEnabled();
|
|
54
|
-
|
|
55
|
+
const { disableEditor } = useIntlayerContext();
|
|
56
|
+
if (enabled && !disableEditor) {
|
|
55
57
|
return /* @__PURE__ */ jsx(ContentSelectorWrapperContent, { ...props, children });
|
|
56
58
|
}
|
|
57
59
|
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/editor/ContentSelectorWrapper.tsx"],"sourcesContent":["'use client';\n\nimport { type NodeProps, isSameKeyPath } from '@intlayer/core';\nimport {\n useFocusDictionary,\n useEditedContentActions,\n useEditorEnabled,\n} from '@intlayer/editor-react';\nimport {\n useCallback,\n useEffect,\n useState,\n useMemo,\n type FC,\n type ReactNode,\n HTMLAttributes,\n} from 'react';\nimport { ContentSelector } from '../UI/ContentSelector';\n\nexport type ContentSelectorWrapperProps = NodeProps &\n Omit<HTMLAttributes<HTMLDivElement>, 'content'>;\n\nconst ContentSelectorWrapperContent: FC<ContentSelectorWrapperProps> = ({\n children,\n dictionaryKey,\n keyPath,\n ...props\n}) => {\n const { focusedContent, setFocusedContent } = useFocusDictionary();\n const { getEditedContentValue } = useEditedContentActions();\n\n const editedValue = useMemo(\n () => getEditedContentValue(dictionaryKey, keyPath),\n [dictionaryKey, keyPath, getEditedContentValue]\n );\n\n const [displayedChildren, setDisplayedChildren] =\n useState<ReactNode>(children);\n\n const handleSelect = useCallback(\n () =>\n setFocusedContent({\n dictionaryKey,\n keyPath,\n }),\n [dictionaryKey, keyPath, setFocusedContent]\n );\n\n const isSelected = useMemo(\n () =>\n (focusedContent?.dictionaryKey === dictionaryKey &&\n (focusedContent?.keyPath?.length ?? 0) > 0 &&\n isSameKeyPath(focusedContent?.keyPath ?? [], keyPath)) ??\n false,\n [focusedContent, keyPath]\n );\n\n useEffect(() => {\n // Use useEffect to avoid 'Text content does not match server-rendered HTML' error\n if (editedValue && typeof editedValue === 'string') {\n setDisplayedChildren(editedValue);\n } else {\n setDisplayedChildren(children);\n }\n }, [editedValue, focusedContent, children]);\n\n return (\n <ContentSelector onPress={handleSelect} isSelecting={isSelected} {...props}>\n {displayedChildren}\n </ContentSelector>\n );\n};\n\nexport const ContentSelectorWrapper: FC<ContentSelectorWrapperProps> = ({\n children,\n ...props\n}) => {\n const { enabled } = useEditorEnabled();\n\n if (enabled) {\n return (\n <ContentSelectorWrapperContent {...props}>\n {children}\n </ContentSelectorWrapperContent>\n );\n }\n\n return <>{children}</>;\n};\n"],"mappings":";
|
|
1
|
+
{"version":3,"sources":["../../../src/editor/ContentSelectorWrapper.tsx"],"sourcesContent":["'use client';\n\nimport { type NodeProps, isSameKeyPath } from '@intlayer/core';\nimport {\n useFocusDictionary,\n useEditedContentActions,\n useEditorEnabled,\n} from '@intlayer/editor-react';\nimport {\n useCallback,\n useEffect,\n useState,\n useMemo,\n type FC,\n type ReactNode,\n HTMLAttributes,\n} from 'react';\nimport { ContentSelector } from '../UI/ContentSelector';\nimport { useIntlayerContext } from '../client';\n\nexport type ContentSelectorWrapperProps = NodeProps &\n Omit<HTMLAttributes<HTMLDivElement>, 'content'>;\n\nconst ContentSelectorWrapperContent: FC<ContentSelectorWrapperProps> = ({\n children,\n dictionaryKey,\n keyPath,\n ...props\n}) => {\n const { focusedContent, setFocusedContent } = useFocusDictionary();\n const { getEditedContentValue } = useEditedContentActions();\n\n const editedValue = useMemo(\n () => getEditedContentValue(dictionaryKey, keyPath),\n [dictionaryKey, keyPath, getEditedContentValue]\n );\n\n const [displayedChildren, setDisplayedChildren] =\n useState<ReactNode>(children);\n\n const handleSelect = useCallback(\n () =>\n setFocusedContent({\n dictionaryKey,\n keyPath,\n }),\n [dictionaryKey, keyPath, setFocusedContent]\n );\n\n const isSelected = useMemo(\n () =>\n (focusedContent?.dictionaryKey === dictionaryKey &&\n (focusedContent?.keyPath?.length ?? 0) > 0 &&\n isSameKeyPath(focusedContent?.keyPath ?? [], keyPath)) ??\n false,\n [focusedContent, keyPath, dictionaryKey]\n );\n\n useEffect(() => {\n // Use useEffect to avoid 'Text content does not match server-rendered HTML' error\n if (editedValue && typeof editedValue === 'string') {\n setDisplayedChildren(editedValue);\n } else {\n setDisplayedChildren(children);\n }\n }, [editedValue, focusedContent, children]);\n\n return (\n <ContentSelector onPress={handleSelect} isSelecting={isSelected} {...props}>\n {displayedChildren}\n </ContentSelector>\n );\n};\n\nexport const ContentSelectorWrapper: FC<ContentSelectorWrapperProps> = ({\n children,\n ...props\n}) => {\n const { enabled } = useEditorEnabled();\n const { disableEditor } = useIntlayerContext();\n\n if (enabled && !disableEditor) {\n return (\n <ContentSelectorWrapperContent {...props}>\n {children}\n </ContentSelectorWrapperContent>\n );\n }\n\n return <>{children}</>;\n};\n"],"mappings":";AAoEI,SAqBK,UArBL;AAlEJ,SAAyB,qBAAqB;AAC9C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AACP,SAAS,uBAAuB;AAChC,SAAS,0BAA0B;AAKnC,MAAM,gCAAiE,CAAC;AAAA,EACtE;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,gBAAgB,kBAAkB,IAAI,mBAAmB;AACjE,QAAM,EAAE,sBAAsB,IAAI,wBAAwB;AAE1D,QAAM,cAAc;AAAA,IAClB,MAAM,sBAAsB,eAAe,OAAO;AAAA,IAClD,CAAC,eAAe,SAAS,qBAAqB;AAAA,EAChD;AAEA,QAAM,CAAC,mBAAmB,oBAAoB,IAC5C,SAAoB,QAAQ;AAE9B,QAAM,eAAe;AAAA,IACnB,MACE,kBAAkB;AAAA,MAChB;AAAA,MACA;AAAA,IACF,CAAC;AAAA,IACH,CAAC,eAAe,SAAS,iBAAiB;AAAA,EAC5C;AAEA,QAAM,aAAa;AAAA,IACjB,OACG,gBAAgB,kBAAkB,kBAChC,gBAAgB,SAAS,UAAU,KAAK,KACzC,cAAc,gBAAgB,WAAW,CAAC,GAAG,OAAO,MACtD;AAAA,IACF,CAAC,gBAAgB,SAAS,aAAa;AAAA,EACzC;AAEA,YAAU,MAAM;AAEd,QAAI,eAAe,OAAO,gBAAgB,UAAU;AAClD,2BAAqB,WAAW;AAAA,IAClC,OAAO;AACL,2BAAqB,QAAQ;AAAA,IAC/B;AAAA,EACF,GAAG,CAAC,aAAa,gBAAgB,QAAQ,CAAC;AAE1C,SACE,oBAAC,mBAAgB,SAAS,cAAc,aAAa,YAAa,GAAG,OAClE,6BACH;AAEJ;AAEO,MAAM,yBAA0D,CAAC;AAAA,EACtE;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,QAAQ,IAAI,iBAAiB;AACrC,QAAM,EAAE,cAAc,IAAI,mBAAmB;AAE7C,MAAI,WAAW,CAAC,eAAe;AAC7B,WACE,oBAAC,iCAA+B,GAAG,OAChC,UACH;AAAA,EAEJ;AAEA,SAAO,gCAAG,UAAS;AACrB;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/getDictionary.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport {\n type Dictionary,\n type Plugins,\n getDictionary as getDictionaryCore,\n} from '@intlayer/core';\nimport {\n type DeepTransformContent,\n intlayerNodePlugins,\n markdownPlugin,\n reactNodePlugins,\n} from './plugins';\nimport type { Locales } from '@intlayer/config/client';\n\nexport const getDictionary = <\n T extends Dictionary
|
|
1
|
+
{"version":3,"sources":["../../src/getDictionary.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport {\n type Dictionary,\n type Plugins,\n getDictionary as getDictionaryCore,\n} from '@intlayer/core';\nimport {\n type DeepTransformContent,\n intlayerNodePlugins,\n markdownPlugin,\n reactNodePlugins,\n} from './plugins';\nimport type { Locales, LocalesValues } from '@intlayer/config/client';\n\nexport const getDictionary = <\n T extends Dictionary<unknown, false>,\n L extends LocalesValues = Locales,\n>(\n dictionary: T,\n locale?: L,\n additionalPlugins?: Plugins[]\n) => {\n const plugins: Plugins[] = [\n intlayerNodePlugins,\n reactNodePlugins,\n markdownPlugin,\n ...(additionalPlugins ?? []),\n ];\n\n return getDictionaryCore(\n dictionary,\n locale,\n plugins\n ) as any as DeepTransformContent<T['content']>;\n};\n"],"mappings":"AACA;AAAA,EAGE,iBAAiB;AAAA,OACZ;AACP;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGA,MAAM,gBAAgB,CAI3B,YACA,QACA,sBACG;AACH,QAAM,UAAqB;AAAA,IACzB;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAI,qBAAqB,CAAC;AAAA,EAC5B;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/getIntlayer.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport {\n type DictionaryKeys,\n type Plugins,\n getIntlayer as getIntlayerCore,\n} from '@intlayer/core';\nimport {\n type DeepTransformContent,\n intlayerNodePlugins,\n markdownPlugin,\n reactNodePlugins,\n} from './plugins';\nimport type { IntlayerDictionaryTypesConnector,
|
|
1
|
+
{"version":3,"sources":["../../src/getIntlayer.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport {\n type DictionaryKeys,\n type Plugins,\n getIntlayer as getIntlayerCore,\n} from '@intlayer/core';\nimport {\n type DeepTransformContent,\n intlayerNodePlugins,\n markdownPlugin,\n reactNodePlugins,\n} from './plugins';\nimport type { IntlayerDictionaryTypesConnector, LocalesValues } from 'intlayer';\n\nexport const getIntlayer = <T extends DictionaryKeys, L extends LocalesValues>(\n key: T,\n locale?: L,\n additionalPlugins?: Plugins[]\n) => {\n const plugins: Plugins[] = [\n intlayerNodePlugins,\n reactNodePlugins,\n markdownPlugin,\n ...(additionalPlugins ?? []),\n ];\n\n return getIntlayerCore(key, locale, plugins) as any as DeepTransformContent<\n IntlayerDictionaryTypesConnector[T]['content']\n >;\n};\n"],"mappings":"AAEA;AAAA,EAGE,eAAe;AAAA,OACV;AACP;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGA,MAAM,cAAc,CACzB,KACA,QACA,sBACG;AACH,QAAM,UAAqB;AAAA,IACzB;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAI,qBAAqB,CAAC;AAAA,EAC5B;AAEA,SAAO,gBAAgB,KAAK,QAAQ,OAAO;AAG7C;","names":[]}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
IntlayerProvider,
|
|
3
|
+
IntlayerProviderContent,
|
|
3
4
|
IntlayerClientContext,
|
|
4
5
|
useIntlayer,
|
|
5
6
|
useIntlayerAsync,
|
|
@@ -17,6 +18,7 @@ import { MarkdownProvider } from "./markdown/index.mjs";
|
|
|
17
18
|
export {
|
|
18
19
|
IntlayerClientContext,
|
|
19
20
|
IntlayerProvider,
|
|
21
|
+
IntlayerProviderContent,
|
|
20
22
|
MarkdownProvider,
|
|
21
23
|
getBrowserLocale,
|
|
22
24
|
localeCookie,
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import { IInterpreterPluginReact } from './plugins';\n\ndeclare module '@intlayer/core' {\n interface IInterpreterPlugin<T, S> extends IInterpreterPluginReact<T, S> {}\n}\n\nexport {\n IntlayerProvider,\n type IntlayerProviderProps,\n IntlayerClientContext,\n useIntlayer,\n useIntlayerAsync,\n useDictionary,\n useLocale,\n useLocaleCookie,\n useIntlayerContext,\n localeCookie,\n setLocaleCookie,\n getBrowserLocale,\n useLocaleBase,\n t,\n} from './client/index';\nexport { type IntlayerNode } from './IntlayerNode';\nexport { MarkdownProvider } from './markdown/index';\n"],"mappings":"AAMA;AAAA,EACE;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,wBAAwB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import { IInterpreterPluginReact } from './plugins';\n\ndeclare module '@intlayer/core' {\n interface IInterpreterPlugin<T, S> extends IInterpreterPluginReact<T, S> {}\n}\n\nexport {\n IntlayerProvider,\n IntlayerProviderContent,\n type IntlayerProviderProps,\n IntlayerClientContext,\n useIntlayer,\n useIntlayerAsync,\n useDictionary,\n useLocale,\n useLocaleCookie,\n useIntlayerContext,\n localeCookie,\n setLocaleCookie,\n getBrowserLocale,\n useLocaleBase,\n t,\n} from './client/index';\nexport { type IntlayerNode } from './IntlayerNode';\nexport { MarkdownProvider } from './markdown/index';\n"],"mappings":"AAMA;AAAA,EACE;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,wBAAwB;","names":[]}
|
package/dist/esm/plugins.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NodeType
|
|
3
3
|
} from "@intlayer/core";
|
|
4
|
-
import { createElement } from "react";
|
|
5
4
|
import { renderIntlayerEditor } from "./editor/index.mjs";
|
|
6
5
|
import { renderMarkdown } from "./markdown/renderMarkdown.mjs";
|
|
6
|
+
import { renderReactElement } from "./reactElement/renderReactElement.mjs";
|
|
7
7
|
const intlayerNodePlugins = {
|
|
8
8
|
canHandle: (node) => typeof node === "bigint" || typeof node === "string" || typeof node === "number",
|
|
9
9
|
transform: (_node, {
|
|
@@ -12,42 +12,9 @@ const intlayerNodePlugins = {
|
|
|
12
12
|
...rest
|
|
13
13
|
}) => renderIntlayerEditor(rest)
|
|
14
14
|
};
|
|
15
|
-
const createReactElement = (element) => {
|
|
16
|
-
if (typeof element === "string") {
|
|
17
|
-
return element;
|
|
18
|
-
}
|
|
19
|
-
const convertChildrenAsArray = (element2) => {
|
|
20
|
-
if (element2?.props && typeof element2.props.children === "object") {
|
|
21
|
-
const childrenResult = [];
|
|
22
|
-
const { children } = element2.props;
|
|
23
|
-
Object.keys(children ?? {}).forEach((key) => {
|
|
24
|
-
childrenResult.push(
|
|
25
|
-
createReactElement((children ?? {})[key])
|
|
26
|
-
);
|
|
27
|
-
});
|
|
28
|
-
return {
|
|
29
|
-
...element2,
|
|
30
|
-
props: { ...element2.props, children: childrenResult }
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
return {
|
|
34
|
-
...element2,
|
|
35
|
-
props: { ...element2.props, children: element2.props.children }
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
const fixedElement = convertChildrenAsArray(
|
|
39
|
-
element
|
|
40
|
-
);
|
|
41
|
-
const { type, props } = fixedElement;
|
|
42
|
-
return createElement(
|
|
43
|
-
type ?? "div",
|
|
44
|
-
props,
|
|
45
|
-
...props.children
|
|
46
|
-
);
|
|
47
|
-
};
|
|
48
15
|
const reactNodePlugins = {
|
|
49
16
|
canHandle: (node) => typeof node === "object" && typeof node.ref !== "undefined" && typeof node.props !== "undefined" && typeof node.key !== "undefined",
|
|
50
|
-
transform:
|
|
17
|
+
transform: renderReactElement
|
|
51
18
|
};
|
|
52
19
|
const markdownPlugin = {
|
|
53
20
|
canHandle: (node) => typeof node === "object" && node?.nodeType === NodeType.Markdown,
|
package/dist/esm/plugins.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/plugins.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport {\n type Plugins,\n type IInterpreterPluginState as IInterpreterPluginStateCore,\n type DeepTransformContent as DeepTransformContentCore,\n type MarkdownContent,\n NodeType,\n} from '@intlayer/core';\nimport
|
|
1
|
+
{"version":3,"sources":["../../src/plugins.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport {\n type Plugins,\n type IInterpreterPluginState as IInterpreterPluginStateCore,\n type DeepTransformContent as DeepTransformContentCore,\n type MarkdownContent,\n NodeType,\n} from '@intlayer/core';\nimport type { ReactNode } from 'react';\nimport { renderIntlayerEditor } from './editor';\nimport type { IntlayerNode } from './IntlayerNode';\nimport { renderMarkdown } from './markdown/renderMarkdown';\nimport { renderReactElement } from './reactElement/renderReactElement';\n\n/** ---------------------------------------------\n * INTLAYER NODE PLUGIN\n * --------------------------------------------- */\n\nexport type IntlayerNodeCond<T, _S> = T extends number | string\n ? IntlayerNode<T>\n : never;\n\n/** Translation plugin. Replaces node with a locale string if nodeType = Translation. */\nexport const intlayerNodePlugins: Plugins = {\n canHandle: (node) =>\n typeof node === 'bigint' ||\n typeof node === 'string' ||\n typeof node === 'number',\n transform: (\n _node,\n {\n plugins, // Removed to avoid next error - Functions cannot be passed directly to Client Components\n ...rest\n }\n ) => renderIntlayerEditor(rest),\n};\n\n/** ---------------------------------------------\n * REACT NODE PLUGIN\n * --------------------------------------------- */\n\nexport type ReactNodeCond<T, _S> = T extends {\n ref: any;\n props: any;\n key: any;\n}\n ? ReactNode\n : never;\n\n/** Translation plugin. Replaces node with a locale string if nodeType = Translation. */\nexport const reactNodePlugins: Plugins = {\n canHandle: (node) =>\n typeof node === 'object' &&\n typeof node.ref !== 'undefined' &&\n typeof node.props !== 'undefined' &&\n typeof node.key !== 'undefined',\n\n transform: renderReactElement,\n};\n\n/**\n * MARKDOWN PLUGIN\n */\n\nexport type MarkdownCond<T, _S> = T extends {\n nodeType: NodeType | string;\n [NodeType.Markdown]: string;\n}\n ? IntlayerNode<string>\n : never;\n\n/** Markdown plugin. Replaces node with a function that takes quantity => string. */\nexport const markdownPlugin: Plugins = {\n canHandle: (node) =>\n typeof node === 'object' && node?.nodeType === NodeType.Markdown,\n transform: (node: MarkdownContent) => renderMarkdown(node[NodeType.Markdown]),\n};\n\n/** ---------------------------------------------\n * PLUGINS RESULT\n * --------------------------------------------- */\n\nexport interface IInterpreterPluginReact<T, _S> {\n reactNode: ReactNodeCond<T, _S>;\n intlayerNode: IntlayerNodeCond<T, _S>;\n markdown: MarkdownCond<T, _S>;\n}\n\n/**\n * Insert this type as param of `DeepTransformContent` to avoid `intlayer` package pollution.\n *\n * Otherwise the the `react-intlayer` plugins will override the types of `intlayer` functions.\n */\nexport type IInterpreterPluginState = IInterpreterPluginStateCore & {\n reactNode: true;\n intlayerNode: true;\n markdown: true;\n};\n\nexport type DeepTransformContent<T> = DeepTransformContentCore<\n T,\n IInterpreterPluginState\n>;\n"],"mappings":"AACA;AAAA,EAKE;AAAA,OACK;AAEP,SAAS,4BAA4B;AAErC,SAAS,sBAAsB;AAC/B,SAAS,0BAA0B;AAW5B,MAAM,sBAA+B;AAAA,EAC1C,WAAW,CAAC,SACV,OAAO,SAAS,YAChB,OAAO,SAAS,YAChB,OAAO,SAAS;AAAA,EAClB,WAAW,CACT,OACA;AAAA,IACE;AAAA;AAAA,IACA,GAAG;AAAA,EACL,MACG,qBAAqB,IAAI;AAChC;AAeO,MAAM,mBAA4B;AAAA,EACvC,WAAW,CAAC,SACV,OAAO,SAAS,YAChB,OAAO,KAAK,QAAQ,eACpB,OAAO,KAAK,UAAU,eACtB,OAAO,KAAK,QAAQ;AAAA,EAEtB,WAAW;AACb;AAcO,MAAM,iBAA0B;AAAA,EACrC,WAAW,CAAC,SACV,OAAO,SAAS,YAAY,MAAM,aAAa,SAAS;AAAA,EAC1D,WAAW,CAAC,SAA0B,eAAe,KAAK,SAAS,QAAQ,CAAC;AAC9E;","names":[]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { createElement } from "react";
|
|
2
|
+
const renderReactElement = (element) => {
|
|
3
|
+
if (typeof element === "string") {
|
|
4
|
+
return element;
|
|
5
|
+
}
|
|
6
|
+
const convertChildrenAsArray = (element2) => {
|
|
7
|
+
if (element2?.props && typeof element2.props.children === "object") {
|
|
8
|
+
const childrenResult = [];
|
|
9
|
+
const { children } = element2.props;
|
|
10
|
+
Object.keys(children ?? {}).forEach((key) => {
|
|
11
|
+
childrenResult.push(
|
|
12
|
+
renderReactElement((children ?? {})[key])
|
|
13
|
+
);
|
|
14
|
+
});
|
|
15
|
+
return {
|
|
16
|
+
...element2,
|
|
17
|
+
props: { ...element2.props, children: childrenResult }
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
...element2,
|
|
22
|
+
props: { ...element2.props, children: element2.props.children }
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
const fixedElement = convertChildrenAsArray(
|
|
26
|
+
element
|
|
27
|
+
);
|
|
28
|
+
const { type, props } = fixedElement;
|
|
29
|
+
return createElement(
|
|
30
|
+
type ?? "div",
|
|
31
|
+
props,
|
|
32
|
+
...props.children
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
renderReactElement
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=renderReactElement.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/reactElement/renderReactElement.ts"],"sourcesContent":["import { type ReactElement, type ReactNode, createElement } from 'react';\n\n// This function recursively creates React elements from a given JSON-like structure\nexport const renderReactElement = (element: ReactElement) => {\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 childrenResult.push(\n renderReactElement((children ?? {})[key as keyof typeof children])\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 ?? 'div',\n props,\n ...(props.children as ReactNode[])\n );\n};\n"],"mappings":"AAAA,SAA4C,qBAAqB;AAG1D,MAAM,qBAAqB,CAAC,YAA0B;AAC3D,MAAI,OAAO,YAAY,UAAU;AAE/B,WAAO;AAAA,EACT;AAEA,QAAM,yBAAyB,CAC7BA,aAC2C;AAC3C,QAAIA,UAAS,SAAS,OAAOA,SAAQ,MAAM,aAAa,UAAU;AAChE,YAAM,iBAA8B,CAAC;AACrC,YAAM,EAAE,SAAS,IAAIA,SAAQ;AAG7B,aAAO,KAAK,YAAY,CAAC,CAAC,EAAE,QAAQ,CAAC,QAAQ;AAC3C,uBAAe;AAAA,UACb,oBAAoB,YAAY,CAAC,GAAG,GAA4B,CAAC;AAAA,QACnE;AAAA,MACF,CAAC;AAED,aAAO;AAAA,QACL,GAAGA;AAAA,QACH,OAAO,EAAE,GAAGA,SAAQ,OAAO,UAAU,eAAe;AAAA,MACtD;AAAA,IACF;AAEA,WAAO;AAAA,MACL,GAAGA;AAAA,MACH,OAAO,EAAE,GAAGA,SAAQ,OAAO,UAAUA,SAAQ,MAAM,SAAS;AAAA,IAC9D;AAAA,EACF;AAEA,QAAM,eAAe;AAAA,IACnB;AAAA,EACF;AAEA,QAAM,EAAE,MAAM,MAAM,IAAI;AAGxB,SAAO;AAAA,IACL,QAAQ;AAAA,IACR;AAAA,IACA,GAAI,MAAM;AAAA,EACZ;AACF;","names":["element"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/server/IntlayerServerProvider.tsx"],"sourcesContent":["import { type
|
|
1
|
+
{"version":3,"sources":["../../../src/server/IntlayerServerProvider.tsx"],"sourcesContent":["import { type LocalesValues, getConfiguration } from '@intlayer/config/client';\nimport type { FC, PropsWithChildren } from 'react';\nimport { createServerContext, getServerContext } from './serverContext';\n\nconst { defaultLocale } = getConfiguration().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":"AAiCE;AAjCF,SAA6B,wBAAwB;AAErD,SAAS,qBAAqB,wBAAwB;AAEtD,MAAM,EAAE,cAAc,IAAI,iBAAiB,EAAE;AAKtC,MAAM,wBACX,oBAAmC,aAAa;AAK3C,MAAM,cAAc,MAAM,iBAAiB,qBAAqB;AAKhE,MAAM,SAAS,iBAAiB,qBAAqB;AASrD,MAAM,yBAA0D,CAAC;AAAA,EACtE;AAAA,EACA,QAAAA,UAAS;AACX,MACE,oBAAC,sBAAsB,UAAtB,EAA+B,OAAOA,SACpC,UACH;","names":["locale"]}
|
package/dist/esm/server/t.mjs
CHANGED
|
@@ -2,9 +2,7 @@ import { IntlayerServerContext } from "./IntlayerServerProvider.mjs";
|
|
|
2
2
|
import { getServerContext } from "./serverContext.mjs";
|
|
3
3
|
import { getTranslation } from "@intlayer/core";
|
|
4
4
|
const t = (multilangContent, locale) => {
|
|
5
|
-
const currentLocale = getServerContext(
|
|
6
|
-
IntlayerServerContext
|
|
7
|
-
);
|
|
5
|
+
const currentLocale = getServerContext(IntlayerServerContext);
|
|
8
6
|
const localeTarget = locale ?? currentLocale;
|
|
9
7
|
return getTranslation(multilangContent, localeTarget);
|
|
10
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/server/t.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"sources":["../../../src/server/t.ts"],"sourcesContent":["import type { LocalesValues } from '@intlayer/config/client';\nimport { IntlayerServerContext } from './IntlayerServerProvider';\nimport { getServerContext } from './serverContext';\nimport { type LanguageContent, getTranslation } from '@intlayer/core';\n\n/**\n * On the server side, hook to get the translation content based on the locale\n *\n * If not locale found, it will return the content related to the default locale.\n *\n * Return either the content editor, or the content itself depending on the configuration.\n *\n * Usage:\n *\n * ```ts\n * const content = t<string>({\n * en: 'Hello',\n * fr: 'Bonjour',\n * }, 'fr');\n * // 'Bonjour'\n * ```\n *\n * Using TypeScript:\n * - this function will require each locale to be defined if defined in the project configuration.\n * - If a locale is missing, it will make each existing locale optional and raise an error if the locale is not found.\n */\nexport const t = <Content = string>(\n multilangContent: LanguageContent<Content>,\n locale?: LocalesValues\n) => {\n const currentLocale = getServerContext<LocalesValues>(IntlayerServerContext);\n const localeTarget = locale ?? currentLocale;\n\n return getTranslation<Content>(multilangContent, localeTarget);\n};\n"],"mappings":"AACA,SAAS,6BAA6B;AACtC,SAAS,wBAAwB;AACjC,SAA+B,sBAAsB;AAuB9C,MAAM,IAAI,CACf,kBACA,WACG;AACH,QAAM,gBAAgB,iBAAgC,qBAAqB;AAC3E,QAAM,eAAe,UAAU;AAE/B,SAAO,eAAwB,kBAAkB,YAAY;AAC/D;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/server/useDictionary.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"sources":["../../../src/server/useDictionary.ts"],"sourcesContent":["import type { LocalesValues } from '@intlayer/config/client';\nimport { type Dictionary } from '@intlayer/core';\nimport { IntlayerServerContext } from './IntlayerServerProvider';\nimport { getServerContext } from './serverContext';\nimport { getDictionary } from '../getDictionary';\n\n/**\n * On the server side, Hook that transform a dictionary and return the content\n *\n * If the locale is not provided, it will use the locale from the server context\n */\nexport const useDictionary = <T extends Dictionary>(\n dictionary: T,\n locale?: LocalesValues,\n isRenderEditor = false\n) => {\n const localeTarget =\n locale ?? getServerContext<LocalesValues>(IntlayerServerContext);\n\n return getDictionary(dictionary, localeTarget);\n};\n"],"mappings":"AAEA,SAAS,6BAA6B;AACtC,SAAS,wBAAwB;AACjC,SAAS,qBAAqB;AAOvB,MAAM,gBAAgB,CAC3B,YACA,QACA,iBAAiB,UACd;AACH,QAAM,eACJ,UAAU,iBAAgC,qBAAqB;AAEjE,SAAO,cAAc,YAAY,YAAY;AAC/C;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/server/useIntlayer.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"sources":["../../../src/server/useIntlayer.ts"],"sourcesContent":["import type { LocalesValues } from '@intlayer/config/client';\nimport { IntlayerServerContext } from './IntlayerServerProvider';\nimport { getServerContext } from './serverContext';\nimport { type DictionaryKeys } from '@intlayer/core';\nimport { getIntlayer } from '../getIntlayer';\n\n/**\n * On the server side, Hook that picking one dictionary by its key and return the content\n *\n * If the locale is not provided, it will use the locale from the server context\n */\nexport const useIntlayer = <T extends DictionaryKeys, K extends LocalesValues>(\n key: T,\n locale?: K,\n isRenderEditor = true\n) => {\n const localeTarget =\n locale ?? getServerContext<LocalesValues>(IntlayerServerContext);\n\n return getIntlayer(key, localeTarget);\n};\n"],"mappings":"AACA,SAAS,6BAA6B;AACtC,SAAS,wBAAwB;AAEjC,SAAS,mBAAmB;AAOrB,MAAM,cAAc,CACzB,KACA,QACA,iBAAiB,SACd;AACH,QAAM,eACJ,UAAU,iBAAgC,qBAAqB;AAEjE,SAAO,YAAY,KAAK,YAAY;AACtC;","names":[]}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type
|
|
1
|
+
import { type LocalesValues } from '@intlayer/config/client';
|
|
2
|
+
import { type FC, type PropsWithChildren } from 'react';
|
|
3
3
|
type IntlayerValue = {
|
|
4
|
-
locale:
|
|
5
|
-
setLocale: (newLocale:
|
|
4
|
+
locale: LocalesValues;
|
|
5
|
+
setLocale: (newLocale: LocalesValues) => void;
|
|
6
|
+
disableEditor?: boolean;
|
|
6
7
|
};
|
|
7
8
|
/**
|
|
8
9
|
* Context that store the current locale on the client side
|
|
@@ -13,9 +14,14 @@ export declare const IntlayerClientContext: import("react").Context<IntlayerValu
|
|
|
13
14
|
*/
|
|
14
15
|
export declare const useIntlayerContext: () => IntlayerValue;
|
|
15
16
|
export type IntlayerProviderProps = PropsWithChildren & {
|
|
16
|
-
locale?:
|
|
17
|
-
setLocale?: (locale:
|
|
17
|
+
locale?: LocalesValues;
|
|
18
|
+
setLocale?: (locale: LocalesValues) => void;
|
|
19
|
+
disableEditor?: boolean;
|
|
18
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* Provider that store the current locale on the client side
|
|
23
|
+
*/
|
|
24
|
+
export declare const IntlayerProviderContent: FC<IntlayerProviderProps>;
|
|
19
25
|
export declare const IntlayerProvider: FC<IntlayerProviderProps>;
|
|
20
26
|
export {};
|
|
21
27
|
//# sourceMappingURL=IntlayerProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntlayerProvider.d.ts","sourceRoot":"","sources":["../../../src/client/IntlayerProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAoB,KAAK,
|
|
1
|
+
{"version":3,"file":"IntlayerProvider.d.ts","sourceRoot":"","sources":["../../../src/client/IntlayerProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAoB,KAAK,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAK/E,OAAO,EACL,KAAK,EAAE,EACP,KAAK,iBAAiB,EAKvB,MAAM,OAAO,CAAC;AAKf,KAAK,aAAa,GAAG;IACnB,MAAM,EAAE,aAAa,CAAC;IACtB,SAAS,EAAE,CAAC,SAAS,EAAE,aAAa,KAAK,IAAI,CAAC;IAC9C,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,wCAIhC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB,qBAA0C,CAAC;AAE1E,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,GAAG;IACtD,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;IAC5C,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,qBAAqB,CA6C7D,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAMtD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { type IntlayerProviderProps, IntlayerClientContext, useIntlayerContext, IntlayerProvider, } from './IntlayerProvider';
|
|
1
|
+
export { type IntlayerProviderProps, IntlayerClientContext, IntlayerProviderContent, useIntlayerContext, IntlayerProvider, } from './IntlayerProvider';
|
|
2
2
|
export { useIntlayer } from './useIntlayer';
|
|
3
3
|
export { useIntlayerAsync } from './useIntlayerAsync';
|
|
4
4
|
export { useDictionary } from './useDictionary';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,EAC1B,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EACL,eAAe,EACf,YAAY,EACZ,eAAe,GAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,EAC1B,qBAAqB,EACrB,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EACL,eAAe,EACf,YAAY,EACZ,eAAe,GAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC"}
|
|
@@ -3,7 +3,7 @@ import type { LanguageContent } from '@intlayer/core';
|
|
|
3
3
|
* On the client side, hook to get the translation content based on the locale
|
|
4
4
|
*/
|
|
5
5
|
export declare const useContent: <Content>(languageContent: LanguageContent<Content>) => {
|
|
6
|
-
locale:
|
|
6
|
+
locale: import("intlayer").LocalesValues;
|
|
7
7
|
content: Content;
|
|
8
8
|
t: <Content_1 = string>(languageContent: LanguageContent<Content_1>) => Content_1;
|
|
9
9
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { LocalesValues } from '@intlayer/config/client';
|
|
2
2
|
import { type DictionaryKeys } from '@intlayer/core';
|
|
3
3
|
/**
|
|
4
4
|
* On the client side, Hook that picking one dictionary by its key and return the content
|
|
@@ -8,7 +8,7 @@ import { type DictionaryKeys } from '@intlayer/core';
|
|
|
8
8
|
*
|
|
9
9
|
* If the locale is not provided, it will use the locale from the client context
|
|
10
10
|
*/
|
|
11
|
-
export declare const useIntlayerAsync: <T extends DictionaryKeys>(key: T, locale?:
|
|
11
|
+
export declare const useIntlayerAsync: <T extends DictionaryKeys>(key: T, locale?: LocalesValues, isRenderEditor?: boolean) => import("@intlayer/core").DeepTransformContent<import("intlayer").IntlayerDictionaryTypesConnector[T]["content"], import("@intlayer/core").IInterpreterPluginState> & {
|
|
12
12
|
isLoading: boolean;
|
|
13
13
|
};
|
|
14
14
|
//# sourceMappingURL=useIntlayerAsync.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIntlayerAsync.d.ts","sourceRoot":"","sources":["../../../src/client/useIntlayerAsync.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"useIntlayerAsync.d.ts","sourceRoot":"","sources":["../../../src/client/useIntlayerAsync.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,EACL,KAAK,cAAc,EAGpB,MAAM,gBAAgB,CAAC;AAExB;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,cAAc,OAClD,CAAC,WACG,aAAa,+BA8B6B,qKAA0B;IAC3E,SAAS,EAAE,OAAO,CAAC;CAEtB,CAAC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type LocalesValues } from '@intlayer/config/client';
|
|
2
2
|
type useLocaleProps = {
|
|
3
|
-
onLocaleChange?: (locale:
|
|
3
|
+
onLocaleChange?: (locale: LocalesValues) => void;
|
|
4
4
|
};
|
|
5
5
|
/**
|
|
6
6
|
* On the client side, hook to get the current locale and all related fields
|
|
7
7
|
*/
|
|
8
8
|
export declare const useLocale: ({ onLocaleChange }?: useLocaleProps) => {
|
|
9
|
-
locale:
|
|
10
|
-
defaultLocale: Locales;
|
|
11
|
-
availableLocales: Locales[];
|
|
12
|
-
localeList: Locales[];
|
|
13
|
-
setLocale: (locale:
|
|
9
|
+
locale: LocalesValues;
|
|
10
|
+
defaultLocale: import("intlayer").Locales;
|
|
11
|
+
availableLocales: import("intlayer").Locales[];
|
|
12
|
+
localeList: import("intlayer").Locales[];
|
|
13
|
+
setLocale: (locale: LocalesValues) => void;
|
|
14
14
|
};
|
|
15
15
|
export {};
|
|
16
16
|
//# sourceMappingURL=useLocale.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocale.d.ts","sourceRoot":"","sources":["../../../src/client/useLocale.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"useLocale.d.ts","sourceRoot":"","sources":["../../../src/client/useLocale.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAoB,MAAM,yBAAyB,CAAC;AAM/E,KAAK,cAAc,GAAG;IACpB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;CAClD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,wBAAwB,cAAc;;;;;wBAsB/C,aAAa;CA0BzB,CAAC"}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* On the client side, hook to get the current locale and all related fields
|
|
3
3
|
*/
|
|
4
4
|
export declare const useLocaleBase: () => {
|
|
5
|
-
locale:
|
|
5
|
+
locale: import("intlayer").LocalesValues;
|
|
6
6
|
defaultLocale: import("intlayer").Locales;
|
|
7
7
|
availableLocales: import("intlayer").Locales[];
|
|
8
8
|
localeList: import("intlayer").Locales[];
|
|
9
|
-
setLocale: (newLocale: import("intlayer").
|
|
9
|
+
setLocale: (newLocale: import("intlayer").LocalesValues) => void;
|
|
10
10
|
};
|
|
11
11
|
//# sourceMappingURL=useLocaleBase.d.ts.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type LocalesValues } from '@intlayer/config/client';
|
|
2
2
|
/**
|
|
3
3
|
* Get the locale cookie
|
|
4
4
|
*/
|
|
5
|
-
export declare const localeCookie:
|
|
5
|
+
export declare const localeCookie: LocalesValues | undefined;
|
|
6
6
|
/**
|
|
7
7
|
* Set the locale cookie
|
|
8
8
|
*/
|
|
9
|
-
export declare const setLocaleCookie: (locale:
|
|
9
|
+
export declare const setLocaleCookie: (locale: LocalesValues) => void;
|
|
10
10
|
/**
|
|
11
11
|
* Hook that provides the locale cookie and a function to set it
|
|
12
12
|
*/
|
|
13
13
|
export declare const useLocaleCookie: () => {
|
|
14
|
-
localeCookie:
|
|
15
|
-
setLocaleCookie: (locale:
|
|
14
|
+
localeCookie: LocalesValues;
|
|
15
|
+
setLocaleCookie: (locale: LocalesValues) => void;
|
|
16
16
|
};
|
|
17
17
|
//# sourceMappingURL=useLocaleCookie.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocaleCookie.d.ts","sourceRoot":"","sources":["../../../src/client/useLocaleCookie.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"useLocaleCookie.d.ts","sourceRoot":"","sources":["../../../src/client/useLocaleCookie.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAoB,MAAM,yBAAyB,CAAC;AAa/E;;GAEG;AACH,eAAO,MAAM,YAAY,EACrB,aAAa,GACb,SAAS,CAAC;AAEd;;GAEG;AACH,eAAO,MAAM,eAAe,WAAY,aAAa,SAEpD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;;8BAPY,aAAa;CAUnD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentSelectorWrapper.d.ts","sourceRoot":"","sources":["../../../src/editor/ContentSelectorWrapper.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAiB,MAAM,gBAAgB,CAAC;AAM/D,OAAO,EAKL,KAAK,EAAE,EAEP,cAAc,EACf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ContentSelectorWrapper.d.ts","sourceRoot":"","sources":["../../../src/editor/ContentSelectorWrapper.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAiB,MAAM,gBAAgB,CAAC;AAM/D,OAAO,EAKL,KAAK,EAAE,EAEP,cAAc,EACf,MAAM,OAAO,CAAC;AAIf,MAAM,MAAM,2BAA2B,GAAG,SAAS,GACjD,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,SAAS,CAAC,CAAC;AAqDlD,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,2BAA2B,CAgBlE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Dictionary, type Plugins } from '@intlayer/core';
|
|
2
2
|
import { type DeepTransformContent } from './plugins';
|
|
3
|
-
import type { Locales } from '@intlayer/config/client';
|
|
4
|
-
export declare const getDictionary: <T extends Dictionary, L extends
|
|
3
|
+
import type { Locales, LocalesValues } from '@intlayer/config/client';
|
|
4
|
+
export declare const getDictionary: <T extends Dictionary<unknown, false>, L extends LocalesValues = Locales>(dictionary: T, locale?: L, additionalPlugins?: Plugins[]) => DeepTransformContent<T["content"]>;
|
|
5
5
|
//# sourceMappingURL=getDictionary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDictionary.d.ts","sourceRoot":"","sources":["../../src/getDictionary.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,OAAO,EAEb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,KAAK,oBAAoB,EAI1B,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"getDictionary.d.ts","sourceRoot":"","sources":["../../src/getDictionary.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,OAAO,EAEb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,KAAK,oBAAoB,EAI1B,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAEtE,eAAO,MAAM,aAAa,GACxB,CAAC,SAAS,UAAU,CAAC,OAAO,EAAE,KAAK,CAAC,EACpC,CAAC,SAAS,aAAa,wBAEX,CAAC,WACJ,CAAC,sBACU,OAAO,EAAE,KAajB,oBAAoB,CAAC,CAAC,CAAC,SAAS,CAAC,CAC9C,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type DictionaryKeys, type Plugins } from '@intlayer/core';
|
|
2
2
|
import { type DeepTransformContent } from './plugins';
|
|
3
|
-
import type { IntlayerDictionaryTypesConnector,
|
|
4
|
-
export declare const getIntlayer: <T extends DictionaryKeys, L extends
|
|
3
|
+
import type { IntlayerDictionaryTypesConnector, LocalesValues } from 'intlayer';
|
|
4
|
+
export declare const getIntlayer: <T extends DictionaryKeys, L extends LocalesValues>(key: T, locale?: L, additionalPlugins?: Plugins[]) => DeepTransformContent<IntlayerDictionaryTypesConnector[T]["content"]>;
|
|
5
5
|
//# sourceMappingURL=getIntlayer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getIntlayer.d.ts","sourceRoot":"","sources":["../../src/getIntlayer.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,OAAO,EAEb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,KAAK,oBAAoB,EAI1B,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,gCAAgC,EAAE,
|
|
1
|
+
{"version":3,"file":"getIntlayer.d.ts","sourceRoot":"","sources":["../../src/getIntlayer.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,OAAO,EAEb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,KAAK,oBAAoB,EAI1B,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,gCAAgC,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEhF,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,cAAc,EAAE,CAAC,SAAS,aAAa,OACtE,CAAC,WACG,CAAC,sBACU,OAAO,EAAE,KAS0B,oBAAoB,CACzE,gCAAgC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAEjD,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ declare module '@intlayer/core' {
|
|
|
3
3
|
interface IInterpreterPlugin<T, S> extends IInterpreterPluginReact<T, S> {
|
|
4
4
|
}
|
|
5
5
|
}
|
|
6
|
-
export { IntlayerProvider, type IntlayerProviderProps, IntlayerClientContext, useIntlayer, useIntlayerAsync, useDictionary, useLocale, useLocaleCookie, useIntlayerContext, localeCookie, setLocaleCookie, getBrowserLocale, useLocaleBase, t, } from './client/index';
|
|
6
|
+
export { IntlayerProvider, IntlayerProviderContent, type IntlayerProviderProps, IntlayerClientContext, useIntlayer, useIntlayerAsync, useDictionary, useLocale, useLocaleCookie, useIntlayerContext, localeCookie, setLocaleCookie, getBrowserLocale, useLocaleBase, t, } from './client/index';
|
|
7
7
|
export { type IntlayerNode } from './IntlayerNode';
|
|
8
8
|
export { MarkdownProvider } from './markdown/index';
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAEpD,OAAO,QAAQ,gBAAgB,CAAC;IAC9B,UAAU,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAE,SAAQ,uBAAuB,CAAC,CAAC,EAAE,CAAC,CAAC;KAAG;CAC5E;AAED,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,qBAAqB,EACrB,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,CAAC,GACF,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAEpD,OAAO,QAAQ,gBAAgB,CAAC;IAC9B,UAAU,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAE,SAAQ,uBAAuB,CAAC,CAAC,EAAE,CAAC,CAAC;KAAG;CAC5E;AAED,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,KAAK,qBAAqB,EAC1B,qBAAqB,EACrB,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,CAAC,GACF,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/types/plugins.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Plugins, type IInterpreterPluginState as IInterpreterPluginStateCore, type DeepTransformContent as DeepTransformContentCore, NodeType } from '@intlayer/core';
|
|
2
|
-
import {
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
3
|
import type { IntlayerNode } from './IntlayerNode';
|
|
4
4
|
/** ---------------------------------------------
|
|
5
5
|
* INTLAYER NODE PLUGIN
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../src/plugins.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,uBAAuB,IAAI,2BAA2B,EAC3D,KAAK,oBAAoB,IAAI,wBAAwB,EAErD,QAAQ,EACT,MAAM,gBAAgB,CAAC;AACxB,OAAO,
|
|
1
|
+
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../src/plugins.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,uBAAuB,IAAI,2BAA2B,EAC3D,KAAK,oBAAoB,IAAI,wBAAwB,EAErD,QAAQ,EACT,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAInD;;oDAEoD;AAEpD,MAAM,MAAM,gBAAgB,CAAC,CAAC,EAAE,EAAE,IAAI,CAAC,SAAS,MAAM,GAAG,MAAM,GAC3D,YAAY,CAAC,CAAC,CAAC,GACf,KAAK,CAAC;AAEV,wFAAwF;AACxF,eAAO,MAAM,mBAAmB,EAAE,OAYjC,CAAC;AAEF;;oDAEoD;AAEpD,MAAM,MAAM,aAAa,CAAC,CAAC,EAAE,EAAE,IAAI,CAAC,SAAS;IAC3C,GAAG,EAAE,GAAG,CAAC;IACT,KAAK,EAAE,GAAG,CAAC;IACX,GAAG,EAAE,GAAG,CAAC;CACV,GACG,SAAS,GACT,KAAK,CAAC;AAEV,wFAAwF;AACxF,eAAO,MAAM,gBAAgB,EAAE,OAQ9B,CAAC;AAEF;;GAEG;AAEH,MAAM,MAAM,YAAY,CAAC,CAAC,EAAE,EAAE,IAAI,CAAC,SAAS;IAC1C,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAAC;IAC5B,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC7B,GACG,YAAY,CAAC,MAAM,CAAC,GACpB,KAAK,CAAC;AAEV,oFAAoF;AACpF,eAAO,MAAM,cAAc,EAAE,OAI5B,CAAC;AAEF;;oDAEoD;AAEpD,MAAM,WAAW,uBAAuB,CAAC,CAAC,EAAE,EAAE;IAC5C,SAAS,EAAE,aAAa,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAChC,YAAY,EAAE,gBAAgB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACtC,QAAQ,EAAE,YAAY,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;CAC/B;AAED;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,2BAA2B,GAAG;IAClE,SAAS,EAAE,IAAI,CAAC;IAChB,YAAY,EAAE,IAAI,CAAC;IACnB,QAAQ,EAAE,IAAI,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,oBAAoB,CAAC,CAAC,IAAI,wBAAwB,CAC5D,CAAC,EACD,uBAAuB,CACxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderReactElement.d.ts","sourceRoot":"","sources":["../../../src/reactElement/renderReactElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAiC,MAAM,OAAO,CAAC;AAGzE,eAAO,MAAM,kBAAkB,YAAa,YAAY,2EA4CvD,CAAC"}
|