@mui/internal-core-docs 0.0.1 → 9.0.0-canary.1
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/Ad/Ad.d.ts +5 -0
- package/Ad/Ad.js +226 -0
- package/Ad/AdCarbon.d.ts +2 -0
- package/Ad/AdCarbon.js +125 -0
- package/Ad/AdDisplay.d.ts +16 -0
- package/Ad/AdDisplay.js +86 -0
- package/Ad/AdGuest.d.ts +10 -0
- package/Ad/AdGuest.js +29 -0
- package/Ad/AdInHouse.d.ts +4 -0
- package/Ad/AdInHouse.js +14 -0
- package/Ad/AdManager.d.ts +19 -0
- package/Ad/AdManager.js +36 -0
- package/Ad/AdProvider.d.ts +15 -0
- package/Ad/AdProvider.js +24 -0
- package/Ad/ad.styles.d.ts +4 -0
- package/Ad/ad.styles.js +91 -0
- package/Ad/index.d.ts +5 -0
- package/Ad/index.js +7 -0
- package/ApiPage/ApiWarningAlert.d.ts +10 -0
- package/ApiPage/ApiWarningAlert.js +22 -0
- package/ApiPage/definitions/classes.d.ts +18 -0
- package/ApiPage/definitions/classes.js +54 -0
- package/ApiPage/definitions/index.d.ts +4 -0
- package/ApiPage/definitions/index.js +4 -0
- package/ApiPage/definitions/properties.d.ts +58 -0
- package/ApiPage/definitions/properties.js +110 -0
- package/ApiPage/definitions/slots.d.ts +16 -0
- package/ApiPage/definitions/slots.js +39 -0
- package/ApiPage/definitions/types.d.ts +53 -0
- package/ApiPage/definitions/types.js +1 -0
- package/ApiPage/index.d.ts +2 -0
- package/ApiPage/index.js +2 -0
- package/ApiPage/list/ClassesList.d.ts +11 -0
- package/ApiPage/list/ClassesList.js +103 -0
- package/ApiPage/list/ExpandableApiItem.d.ts +18 -0
- package/ApiPage/list/ExpandableApiItem.js +241 -0
- package/ApiPage/list/PropertiesList.d.ts +7 -0
- package/ApiPage/list/PropertiesList.js +263 -0
- package/ApiPage/list/SlotsList.d.ts +7 -0
- package/ApiPage/list/SlotsList.js +93 -0
- package/ApiPage/list/index.d.ts +1 -0
- package/ApiPage/list/index.js +1 -0
- package/ApiPage/private.d.ts +3 -0
- package/ApiPage/private.js +3 -0
- package/ApiPage/sections/ClassesSection.d.ts +34 -0
- package/ApiPage/sections/ClassesSection.js +76 -0
- package/ApiPage/sections/PropertiesSection.d.ts +45 -0
- package/ApiPage/sections/PropertiesSection.js +59 -0
- package/ApiPage/sections/SlotsSection.d.ts +24 -0
- package/ApiPage/sections/SlotsSection.js +61 -0
- package/ApiPage/sections/ToggleDisplayOption.d.ts +17 -0
- package/ApiPage/sections/ToggleDisplayOption.js +161 -0
- package/ApiPage/sections/index.d.ts +4 -0
- package/ApiPage/sections/index.js +4 -0
- package/ApiPage/table/ClassesTable.d.ts +7 -0
- package/ApiPage/table/ClassesTable.js +116 -0
- package/ApiPage/table/PropertiesTable.d.ts +6 -0
- package/ApiPage/table/PropertiesTable.js +286 -0
- package/ApiPage/table/SlotsTable.d.ts +6 -0
- package/ApiPage/table/SlotsTable.js +126 -0
- package/ApiPage/table/StyledTableContainer.d.ts +1 -0
- package/ApiPage/table/StyledTableContainer.js +42 -0
- package/ApiPage/types.d.ts +11 -0
- package/ApiPage/types.js +1 -0
- package/CHANGELOG.md +1651 -0
- package/CodeCopy/CodeCopy.d.ts +22 -0
- package/CodeCopy/CodeCopy.js +172 -0
- package/CodeCopy/CodeCopyButton.d.ts +4 -0
- package/CodeCopy/CodeCopyButton.js +40 -0
- package/CodeCopy/index.d.ts +3 -0
- package/CodeCopy/index.js +3 -0
- package/CodeCopy/useClipboardCopy.d.ts +4 -0
- package/CodeCopy/useClipboardCopy.js +21 -0
- package/ComponentLinkHeader/ComponentLinkHeader.d.ts +8 -0
- package/ComponentLinkHeader/ComponentLinkHeader.js +197 -0
- package/ComponentLinkHeader/index.d.ts +2 -0
- package/ComponentLinkHeader/index.js +2 -0
- package/DemoContext/DemoContext.d.ts +86 -0
- package/DemoContext/DemoContext.js +13 -0
- package/DemoContext/index.d.ts +2 -0
- package/DemoContext/index.js +1 -0
- package/DocsApp/AnalyticsProvider.d.ts +17 -0
- package/DocsApp/AnalyticsProvider.js +229 -0
- package/DocsApp/DocsApp.d.ts +79 -0
- package/DocsApp/DocsApp.js +105 -0
- package/DocsApp/GoogleAnalytics.d.ts +9 -0
- package/DocsApp/GoogleAnalytics.js +129 -0
- package/DocsApp/StyledEngineProvider.d.ts +8 -0
- package/DocsApp/StyledEngineProvider.js +38 -0
- package/DocsApp/consoleBanner.d.ts +1 -0
- package/DocsApp/consoleBanner.js +18 -0
- package/DocsApp/createEmotionCache.d.ts +1 -0
- package/DocsApp/createEmotionCache.js +12 -0
- package/DocsApp/createGetInitialProps.d.ts +30 -0
- package/DocsApp/createGetInitialProps.js +29 -0
- package/DocsApp/index.d.ts +5 -0
- package/DocsApp/index.js +4 -0
- package/DocsApp/loadDependencies.d.ts +1 -0
- package/DocsApp/loadDependencies.js +9 -0
- package/DocsApp/reportWebVitals.d.ts +13 -0
- package/DocsApp/reportWebVitals.js +22 -0
- package/DocsApp/serviceWorker.d.ts +1 -0
- package/DocsApp/serviceWorker.js +59 -0
- package/DocsProvider/DocsProvider.d.ts +24 -0
- package/DocsProvider/DocsProvider.js +31 -0
- package/DocsProvider/index.d.ts +1 -0
- package/DocsProvider/index.js +1 -0
- package/Document/Document.d.ts +16 -0
- package/Document/Document.js +147 -0
- package/Document/getInitialProps.d.ts +18 -0
- package/Document/getInitialProps.js +60 -0
- package/Document/index.d.ts +2 -0
- package/Document/index.js +2 -0
- package/HighlightedCode/HighlightedCode.d.ts +14 -0
- package/HighlightedCode/HighlightedCode.js +67 -0
- package/HighlightedCode/index.d.ts +1 -0
- package/HighlightedCode/index.js +1 -0
- package/HighlightedCodeWithTabs/HighlightedCodeWithTabs.d.ts +28 -0
- package/HighlightedCodeWithTabs/HighlightedCodeWithTabs.js +362 -0
- package/HighlightedCodeWithTabs/index.d.ts +2 -0
- package/HighlightedCodeWithTabs/index.js +2 -0
- package/IconImage/IconImage.d.ts +11 -0
- package/IconImage/IconImage.js +83 -0
- package/IconImage/index.d.ts +1 -0
- package/IconImage/index.js +1 -0
- package/InfoCard/InfoCard.d.ts +22 -0
- package/InfoCard/InfoCard.js +91 -0
- package/InfoCard/index.d.ts +1 -0
- package/InfoCard/index.js +1 -0
- package/LICENSE +21 -0
- package/Link/Link.d.ts +25 -0
- package/Link/Link.js +75 -0
- package/Link/MarkdownLinks.d.ts +2 -0
- package/Link/MarkdownLinks.js +84 -0
- package/Link/SkipLink.d.ts +1 -0
- package/Link/SkipLink.js +64 -0
- package/Link/index.d.ts +3 -0
- package/Link/index.js +3 -0
- package/MarkdownElement/MarkdownElement.d.ts +7 -0
- package/MarkdownElement/MarkdownElement.js +847 -0
- package/MarkdownElement/index.d.ts +1 -0
- package/MarkdownElement/index.js +1 -0
- package/MuiPage/MuiPage.d.ts +67 -0
- package/MuiPage/MuiPage.js +1 -0
- package/MuiPage/index.d.ts +1 -0
- package/MuiPage/index.js +1 -0
- package/NextNProgressBar/NProgressBar.d.ts +6 -0
- package/NextNProgressBar/NProgressBar.js +91 -0
- package/NextNProgressBar/NextNProgressBar.d.ts +1 -0
- package/NextNProgressBar/NextNProgressBar.js +42 -0
- package/NextNProgressBar/index.d.ts +1 -0
- package/NextNProgressBar/index.js +1 -0
- package/PageContext/PageContext.d.ts +32 -0
- package/PageContext/PageContext.js +6 -0
- package/PageContext/index.d.ts +2 -0
- package/PageContext/index.js +1 -0
- package/README.md +26 -0
- package/SectionHeadline/SectionHeadline.d.ts +13 -0
- package/SectionHeadline/SectionHeadline.js +81 -0
- package/SectionHeadline/index.d.ts +2 -0
- package/SectionHeadline/index.js +2 -0
- package/SectionTitle/SectionTitle.d.ts +6 -0
- package/SectionTitle/SectionTitle.js +29 -0
- package/SectionTitle/index.d.ts +1 -0
- package/SectionTitle/index.js +1 -0
- package/ThemeContext/ThemeContext.d.ts +92 -0
- package/ThemeContext/ThemeContext.js +200 -0
- package/ThemeContext/index.d.ts +1 -0
- package/ThemeContext/index.js +1 -0
- package/branding/BrandingCssVarsProvider.d.ts +27 -0
- package/branding/BrandingCssVarsProvider.js +170 -0
- package/branding/BrandingProvider.d.ts +9 -0
- package/branding/BrandingProvider.js +17 -0
- package/branding/brandingTheme.d.ts +147 -0
- package/branding/brandingTheme.js +1534 -0
- package/branding/index.d.ts +3 -0
- package/branding/index.js +3 -0
- package/codeStyling/codeStyling.d.ts +7 -0
- package/codeStyling/codeStyling.js +80 -0
- package/codeStyling/index.d.ts +1 -0
- package/codeStyling/index.js +1 -0
- package/codeVariant/codeVariant.d.ts +7 -0
- package/codeVariant/codeVariant.js +69 -0
- package/codeVariant/index.d.ts +1 -0
- package/codeVariant/index.js +1 -0
- package/constants/constants.d.ts +13 -0
- package/constants/constants.js +15 -0
- package/constants/index.d.ts +1 -0
- package/constants/index.js +1 -0
- package/findActivePage/findActivePage.d.ts +5 -0
- package/findActivePage/findActivePage.js +35 -0
- package/findActivePage/index.d.ts +1 -0
- package/findActivePage/index.js +1 -0
- package/getProductInfoFromUrl/getProductInfoFromUrl.d.ts +8 -0
- package/getProductInfoFromUrl/getProductInfoFromUrl.js +50 -0
- package/getProductInfoFromUrl/index.d.ts +2 -0
- package/getProductInfoFromUrl/index.js +1 -0
- package/globalSelector/globalSelector.d.ts +2 -0
- package/globalSelector/globalSelector.js +17 -0
- package/globalSelector/index.d.ts +1 -0
- package/globalSelector/index.js +1 -0
- package/helpers/helpers.d.ts +31 -0
- package/helpers/helpers.js +87 -0
- package/helpers/index.d.ts +2 -0
- package/helpers/index.js +1 -0
- package/i18n/i18n.d.ts +27 -0
- package/i18n/i18n.js +111 -0
- package/i18n/index.d.ts +1 -0
- package/i18n/index.js +1 -0
- package/mapApiPageTranslations/index.d.ts +1 -0
- package/mapApiPageTranslations/index.js +1 -0
- package/mapApiPageTranslations/mapApiPageTranslations.d.ts +11 -0
- package/mapApiPageTranslations/mapApiPageTranslations.js +46 -0
- package/nextFonts/fonts/GeneralSans-Bold.ttf +0 -0
- package/nextFonts/fonts/GeneralSans-Bold.woff2 +0 -0
- package/nextFonts/fonts/GeneralSans-Medium.ttf +0 -0
- package/nextFonts/fonts/GeneralSans-Medium.woff2 +0 -0
- package/nextFonts/fonts/GeneralSans-Regular.ttf +0 -0
- package/nextFonts/fonts/GeneralSans-Regular.woff2 +0 -0
- package/nextFonts/fonts/GeneralSans-Semibold-subset.woff2 +0 -0
- package/nextFonts/fonts/GeneralSans-Semibold.ttf +0 -0
- package/nextFonts/fonts/GeneralSans-Semibold.woff2 +0 -0
- package/nextFonts/fonts/IBMPlexSans-Bold.ttf +0 -0
- package/nextFonts/fonts/IBMPlexSans-Bold.woff +0 -0
- package/nextFonts/fonts/IBMPlexSans-Bold.woff2 +0 -0
- package/nextFonts/fonts/IBMPlexSans-Medium.ttf +0 -0
- package/nextFonts/fonts/IBMPlexSans-Medium.woff +0 -0
- package/nextFonts/fonts/IBMPlexSans-Medium.woff2 +0 -0
- package/nextFonts/fonts/IBMPlexSans-Regular-subset.woff2 +0 -0
- package/nextFonts/fonts/IBMPlexSans-Regular.ttf +0 -0
- package/nextFonts/fonts/IBMPlexSans-Regular.woff +0 -0
- package/nextFonts/fonts/IBMPlexSans-Regular.woff2 +0 -0
- package/nextFonts/fonts/IBMPlexSans-SemiBold.ttf +0 -0
- package/nextFonts/fonts/IBMPlexSans-SemiBold.woff +0 -0
- package/nextFonts/fonts/IBMPlexSans-SemiBold.woff2 +0 -0
- package/nextFonts/index.d.ts +6 -0
- package/nextFonts/index.js +59 -0
- package/package.json +426 -3
- package/svgIcons/BundleSizeIcon.d.ts +4 -0
- package/svgIcons/BundleSizeIcon.js +13 -0
- package/svgIcons/FigmaIcon.d.ts +4 -0
- package/svgIcons/FigmaIcon.js +22 -0
- package/svgIcons/FileDownload.d.ts +6 -0
- package/svgIcons/FileDownload.js +13 -0
- package/svgIcons/JavaScript.d.ts +6 -0
- package/svgIcons/JavaScript.js +13 -0
- package/svgIcons/MarkdownIcon.d.ts +2 -0
- package/svgIcons/MarkdownIcon.js +22 -0
- package/svgIcons/MaterialDesignIcon.d.ts +4 -0
- package/svgIcons/MaterialDesignIcon.js +18 -0
- package/svgIcons/SketchIcon.d.ts +4 -0
- package/svgIcons/SketchIcon.js +27 -0
- package/svgIcons/TypeScript.d.ts +6 -0
- package/svgIcons/TypeScript.js +13 -0
- package/svgIcons/W3CIcon.d.ts +4 -0
- package/svgIcons/W3CIcon.js +15 -0
- package/translations/index.d.ts +3 -0
- package/translations/index.js +4 -0
- package/translations/translations.json +222 -0
- package/useLazyCSS/index.d.ts +1 -0
- package/useLazyCSS/index.js +1 -0
- package/useLazyCSS/useLazyCSS.d.ts +11 -0
- package/useLazyCSS/useLazyCSS.js +70 -0
- package/utils/index.d.ts +1 -0
- package/utils/index.js +1 -0
- package/utils/loadScript.d.ts +1 -0
- package/utils/loadScript.js +7 -0
- package/webpack/index.d.ts +17 -0
- package/webpack/index.js +1 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare function CodeStylingProvider(props: {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function useCodeStyling(): string;
|
|
6
|
+
export declare function useNoSsrCodeStyling(): string | undefined;
|
|
7
|
+
export declare function useSetCodeStyling(): React.Dispatch<React.SetStateAction<string>>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { CODE_STYLING } from "../constants/index.js";
|
|
3
|
+
import { getCookie } from "../helpers/index.js";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
const CodeStylingContext = /*#__PURE__*/React.createContext({
|
|
6
|
+
codeStyling: CODE_STYLING.SYSTEM,
|
|
7
|
+
setCodeStyling: () => {}
|
|
8
|
+
});
|
|
9
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
10
|
+
CodeStylingContext.displayName = 'CodeStyling';
|
|
11
|
+
}
|
|
12
|
+
function useFirstRender() {
|
|
13
|
+
const firstRenderRef = React.useRef(true);
|
|
14
|
+
React.useEffect(() => {
|
|
15
|
+
firstRenderRef.current = false;
|
|
16
|
+
}, []);
|
|
17
|
+
return firstRenderRef.current;
|
|
18
|
+
}
|
|
19
|
+
export function CodeStylingProvider(props) {
|
|
20
|
+
const {
|
|
21
|
+
children
|
|
22
|
+
} = props;
|
|
23
|
+
const [codeStyling, setCodeStyling] = React.useState(CODE_STYLING.SYSTEM);
|
|
24
|
+
const navigatedCodeStyling = React.useMemo(() => {
|
|
25
|
+
const navigatedCodeMatch = typeof window !== 'undefined' ? window.location.hash.match(/\.(js|tsx)$/) : null;
|
|
26
|
+
if (navigatedCodeMatch === null) {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
if (typeof window !== 'undefined') {
|
|
30
|
+
if (window.location.hash.includes('tailwind-')) {
|
|
31
|
+
return CODE_STYLING.TAILWIND;
|
|
32
|
+
}
|
|
33
|
+
if (window.location.hash.includes('css-')) {
|
|
34
|
+
return CODE_STYLING.CSS;
|
|
35
|
+
}
|
|
36
|
+
if (window.location.hash.includes('system-')) {
|
|
37
|
+
return CODE_STYLING.SYSTEM;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return undefined;
|
|
41
|
+
}, []);
|
|
42
|
+
const persistedCodeStyling = React.useMemo(() => {
|
|
43
|
+
if (typeof window === 'undefined') {
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
46
|
+
return getCookie('codeStyling');
|
|
47
|
+
}, []);
|
|
48
|
+
const isFirstRender = useFirstRender();
|
|
49
|
+
|
|
50
|
+
// We initialize from navigation or cookies. on subsequent renders the store is the truth
|
|
51
|
+
const noSsrCodeStyling = isFirstRender === true ? navigatedCodeStyling || persistedCodeStyling || codeStyling : codeStyling;
|
|
52
|
+
React.useEffect(() => {
|
|
53
|
+
if (codeStyling !== noSsrCodeStyling) {
|
|
54
|
+
setCodeStyling(noSsrCodeStyling);
|
|
55
|
+
}
|
|
56
|
+
}, [codeStyling, noSsrCodeStyling]);
|
|
57
|
+
React.useEffect(() => {
|
|
58
|
+
document.cookie = `codeStyling=${codeStyling};path=/;max-age=31536000`;
|
|
59
|
+
}, [codeStyling]);
|
|
60
|
+
const contextValue = React.useMemo(() => {
|
|
61
|
+
return {
|
|
62
|
+
codeStyling,
|
|
63
|
+
noSsrCodeStyling,
|
|
64
|
+
setCodeStyling
|
|
65
|
+
};
|
|
66
|
+
}, [codeStyling, noSsrCodeStyling]);
|
|
67
|
+
return /*#__PURE__*/_jsx(CodeStylingContext.Provider, {
|
|
68
|
+
value: contextValue,
|
|
69
|
+
children: children
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
export function useCodeStyling() {
|
|
73
|
+
return React.useContext(CodeStylingContext).codeStyling;
|
|
74
|
+
}
|
|
75
|
+
export function useNoSsrCodeStyling() {
|
|
76
|
+
return React.useContext(CodeStylingContext).noSsrCodeStyling;
|
|
77
|
+
}
|
|
78
|
+
export function useSetCodeStyling() {
|
|
79
|
+
return React.useContext(CodeStylingContext).setCodeStyling;
|
|
80
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CodeStylingProvider, useCodeStyling, useNoSsrCodeStyling, useSetCodeStyling } from "./codeStyling.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CodeStylingProvider, useCodeStyling, useNoSsrCodeStyling, useSetCodeStyling } from "./codeStyling.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare function CodeVariantProvider(props: {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function useCodeVariant(): string;
|
|
6
|
+
export declare function useNoSsrCodeVariant(): string | undefined;
|
|
7
|
+
export declare function useSetCodeVariant(): React.Dispatch<React.SetStateAction<string>>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { CODE_VARIANTS } from "../constants/index.js";
|
|
3
|
+
import { getCookie } from "../helpers/index.js";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
const CodeVariantContext = /*#__PURE__*/React.createContext({
|
|
6
|
+
codeVariant: CODE_VARIANTS.TS,
|
|
7
|
+
setCodeVariant: () => {}
|
|
8
|
+
});
|
|
9
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
10
|
+
CodeVariantContext.displayName = 'CodeVariant';
|
|
11
|
+
}
|
|
12
|
+
function useFirstRender() {
|
|
13
|
+
const firstRenderRef = React.useRef(true);
|
|
14
|
+
React.useEffect(() => {
|
|
15
|
+
firstRenderRef.current = false;
|
|
16
|
+
}, []);
|
|
17
|
+
return firstRenderRef.current;
|
|
18
|
+
}
|
|
19
|
+
export function CodeVariantProvider(props) {
|
|
20
|
+
const {
|
|
21
|
+
children
|
|
22
|
+
} = props;
|
|
23
|
+
const [codeVariant, setCodeVariant] = React.useState(CODE_VARIANTS.TS);
|
|
24
|
+
const navigatedCodeVariant = React.useMemo(() => {
|
|
25
|
+
const navigatedCodeVariantMatch = typeof window !== 'undefined' ? window.location.hash.match(/\.(js|tsx)$/) : null;
|
|
26
|
+
if (navigatedCodeVariantMatch === null) {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
return navigatedCodeVariantMatch[1] === 'tsx' ? CODE_VARIANTS.TS : CODE_VARIANTS.JS;
|
|
30
|
+
}, []);
|
|
31
|
+
const persistedCodeVariant = React.useMemo(() => {
|
|
32
|
+
if (typeof window === 'undefined') {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
return getCookie('codeVariant');
|
|
36
|
+
}, []);
|
|
37
|
+
const isFirstRender = useFirstRender();
|
|
38
|
+
|
|
39
|
+
// We initialize from navigation or cookies. on subsequent renders the store is the truth
|
|
40
|
+
const noSsrCodeVariant = isFirstRender === true ? navigatedCodeVariant || persistedCodeVariant || codeVariant : codeVariant;
|
|
41
|
+
React.useEffect(() => {
|
|
42
|
+
if (codeVariant !== noSsrCodeVariant) {
|
|
43
|
+
setCodeVariant(noSsrCodeVariant);
|
|
44
|
+
}
|
|
45
|
+
}, [codeVariant, noSsrCodeVariant]);
|
|
46
|
+
React.useEffect(() => {
|
|
47
|
+
document.cookie = `codeVariant=${codeVariant};path=/;max-age=31536000`;
|
|
48
|
+
}, [codeVariant]);
|
|
49
|
+
const contextValue = React.useMemo(() => {
|
|
50
|
+
return {
|
|
51
|
+
codeVariant,
|
|
52
|
+
noSsrCodeVariant,
|
|
53
|
+
setCodeVariant
|
|
54
|
+
};
|
|
55
|
+
}, [codeVariant, noSsrCodeVariant]);
|
|
56
|
+
return /*#__PURE__*/_jsx(CodeVariantContext.Provider, {
|
|
57
|
+
value: contextValue,
|
|
58
|
+
children: children
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
export function useCodeVariant() {
|
|
62
|
+
return React.useContext(CodeVariantContext).codeVariant;
|
|
63
|
+
}
|
|
64
|
+
export function useNoSsrCodeVariant() {
|
|
65
|
+
return React.useContext(CodeVariantContext).noSsrCodeVariant;
|
|
66
|
+
}
|
|
67
|
+
export function useSetCodeVariant() {
|
|
68
|
+
return React.useContext(CodeVariantContext).setCodeVariant;
|
|
69
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CodeVariantProvider, useCodeVariant, useNoSsrCodeVariant, useSetCodeVariant } from "./codeVariant.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CodeVariantProvider, useCodeVariant, useNoSsrCodeVariant, useSetCodeVariant } from "./codeVariant.js";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export const CODE_VARIANTS = {
|
|
2
|
+
JS: 'JS',
|
|
3
|
+
TS: 'TS'
|
|
4
|
+
};
|
|
5
|
+
export const CODE_STYLING = {
|
|
6
|
+
SYSTEM: 'MUI System',
|
|
7
|
+
TAILWIND: 'Tailwind',
|
|
8
|
+
CSS: 'CSS'
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
// Valid languages to use in production
|
|
12
|
+
export const LANGUAGES_LABEL = [{
|
|
13
|
+
code: 'en',
|
|
14
|
+
text: 'English'
|
|
15
|
+
}];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./constants.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./constants.js";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export default function findActivePage(currentPages, currentPathname) {
|
|
2
|
+
const map = {};
|
|
3
|
+
const mapParent = {};
|
|
4
|
+
const pathname = currentPathname.replace('/[docsTab]', '').replace('components-api', '').replace('hooks-api', '');
|
|
5
|
+
const traverse = parent => {
|
|
6
|
+
(parent.children || []).forEach(child => {
|
|
7
|
+
const childPathname = child.pathname.replace('/[docsTab]', '').replace('components-api', '').replace('hooks-api', '');
|
|
8
|
+
map[childPathname] = child;
|
|
9
|
+
const isChildApiPathname = child.pathname.includes('components-api') || child.pathname.includes('hooks-api');
|
|
10
|
+
if (!isChildApiPathname && mapParent[childPathname]) {
|
|
11
|
+
throw new Error(`Duplicated pathname ${child.pathname} in pages`);
|
|
12
|
+
}
|
|
13
|
+
if (!isChildApiPathname) {
|
|
14
|
+
mapParent[childPathname] = parent;
|
|
15
|
+
}
|
|
16
|
+
traverse(child);
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
traverse({
|
|
20
|
+
pathname: '/',
|
|
21
|
+
children: currentPages
|
|
22
|
+
});
|
|
23
|
+
const activePage = map[pathname] || null;
|
|
24
|
+
const activePageParents = [];
|
|
25
|
+
let traversePage = activePage;
|
|
26
|
+
while (traversePage && traversePage.pathname !== '/') {
|
|
27
|
+
const parent = mapParent[traversePage.pathname];
|
|
28
|
+
activePageParents.push(parent);
|
|
29
|
+
traversePage = parent;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
activePage,
|
|
33
|
+
activePageParents
|
|
34
|
+
};
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./findActivePage.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./findActivePage.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type MuiProductId = 'null' | 'base-ui' | 'material-ui' | 'system' | 'docs-infra' | 'docs' | 'x-data-grid' | 'x-date-pickers' | 'x-charts' | 'x-tree-view' | 'toolpad-studio' | 'toolpad-core';
|
|
2
|
+
type MuiProductCategoryId = 'null' | 'core' | 'x';
|
|
3
|
+
interface MuiProductInfo {
|
|
4
|
+
productId: MuiProductId;
|
|
5
|
+
productCategoryId: MuiProductCategoryId;
|
|
6
|
+
}
|
|
7
|
+
export default function getProductInfoFromUrl(asPath: string): MuiProductInfo;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { pathnameToLanguage } from "../helpers/helpers.js";
|
|
2
|
+
// This is a fallback logic to define the productId and productCategoryId of the page.
|
|
3
|
+
// Markdown pages can override this value when the URL patterns they follow are a bit strange,
|
|
4
|
+
// which should stay the rare exception.
|
|
5
|
+
export default function getProductInfoFromUrl(asPath) {
|
|
6
|
+
const asPathWithoutLang = pathnameToLanguage(asPath).canonicalAsServer;
|
|
7
|
+
const firstFolder = asPathWithoutLang.replace(/^\/+([^/]+)\/.*/, '$1');
|
|
8
|
+
|
|
9
|
+
// When serialized undefined/null are the same, so we encode null as 'null' to be
|
|
10
|
+
// able to differentiate when the value isn't set vs. set to the right null value.
|
|
11
|
+
let productCategoryId = 'null';
|
|
12
|
+
let productId = 'null';
|
|
13
|
+
if (firstFolder === 'material-ui' || firstFolder === 'joy-ui' || firstFolder === 'base-ui' || firstFolder === 'system') {
|
|
14
|
+
productCategoryId = 'core';
|
|
15
|
+
productId = firstFolder;
|
|
16
|
+
}
|
|
17
|
+
if (firstFolder === 'x') {
|
|
18
|
+
productCategoryId = 'x';
|
|
19
|
+
productId = `x-${asPathWithoutLang.replace('/x/react-', '').replace(/\/.*/, '')}`;
|
|
20
|
+
|
|
21
|
+
// No match, give up on it.
|
|
22
|
+
if (productId === 'x-') {
|
|
23
|
+
productId = 'null';
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (firstFolder === 'toolpad') {
|
|
27
|
+
productCategoryId = 'toolpad';
|
|
28
|
+
const secondFolder = asPathWithoutLang.replace(/^\/+[^/]+\/([^/]+)\/.*/, '$1');
|
|
29
|
+
if (secondFolder === 'studio') {
|
|
30
|
+
productId = 'toolpad-studio';
|
|
31
|
+
} else {
|
|
32
|
+
productId = 'toolpad-core';
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
if (firstFolder === 'docs') {
|
|
36
|
+
productId = firstFolder;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// TODO remove, legacy
|
|
40
|
+
if (firstFolder === 'versions' || firstFolder === 'production-error') {
|
|
41
|
+
productId = 'docs';
|
|
42
|
+
}
|
|
43
|
+
if (asPathWithoutLang.startsWith('/experiments/docs/')) {
|
|
44
|
+
productId = 'docs-infra';
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
productCategoryId,
|
|
48
|
+
productId
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./getProductInfoFromUrl.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* eslint-disable default-case */
|
|
2
|
+
import { RULESET } from 'stylis';
|
|
3
|
+
|
|
4
|
+
// A workaround to https://github.com/emotion-js/emotion/issues/2836
|
|
5
|
+
// to be able to use `:where` selector for styling.
|
|
6
|
+
export default function globalSelector(element) {
|
|
7
|
+
switch (element.type) {
|
|
8
|
+
case RULESET:
|
|
9
|
+
element.props = element.props.map(value => {
|
|
10
|
+
if (value.match(/(:where|:is)\(/)) {
|
|
11
|
+
value = value.replace(/\.[^:]+(:where|:is)/, '$1');
|
|
12
|
+
return value;
|
|
13
|
+
}
|
|
14
|
+
return value;
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./globalSelector.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./globalSelector.js";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Translate } from "../i18n/index.js";
|
|
2
|
+
export declare function pascalCase(str: string): string;
|
|
3
|
+
export interface Page {
|
|
4
|
+
pathname: string;
|
|
5
|
+
query?: object;
|
|
6
|
+
subheader?: string;
|
|
7
|
+
title?: string | false;
|
|
8
|
+
}
|
|
9
|
+
export declare function pageToTitle(page: Page): string | null;
|
|
10
|
+
export declare function pageToTitleI18n(page: Page, t: Translate): string | null;
|
|
11
|
+
/**
|
|
12
|
+
* Get the value of a cookie
|
|
13
|
+
* Source: https://vanillajstoolkit.com/helpers/getcookie/
|
|
14
|
+
* @param name - The name of the cookie
|
|
15
|
+
* @return The cookie value
|
|
16
|
+
*/
|
|
17
|
+
export declare function getCookie(name: string): string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* as is a reference to Next.js's as, the path in the URL
|
|
20
|
+
* pathname is a reference to Next.js's pathname, the name of page in the filesystem
|
|
21
|
+
* https://nextjs.org/docs/api-reference/next/router
|
|
22
|
+
*
|
|
23
|
+
* @param pathname - The URL pathname
|
|
24
|
+
* @param languages - List of supported language codes. Defaults to `['en']`.
|
|
25
|
+
*/
|
|
26
|
+
export declare function pathnameToLanguage(pathname: string, languages?: string[]): {
|
|
27
|
+
userLanguage: string;
|
|
28
|
+
canonicalAs: string;
|
|
29
|
+
canonicalAsServer: string;
|
|
30
|
+
canonicalPathname: string;
|
|
31
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { camelCase, upperFirst } from 'es-toolkit/string';
|
|
2
|
+
export function pascalCase(str) {
|
|
3
|
+
return upperFirst(camelCase(str));
|
|
4
|
+
}
|
|
5
|
+
function titleize(hyphenedString) {
|
|
6
|
+
return upperFirst(hyphenedString.split('-').join(' '));
|
|
7
|
+
}
|
|
8
|
+
export function pageToTitle(page) {
|
|
9
|
+
if (page.title === false) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
if (page.title) {
|
|
13
|
+
return page.title;
|
|
14
|
+
}
|
|
15
|
+
const path = page.subheader || page.pathname;
|
|
16
|
+
const name = path.replace(/.*\//, '').replace('react-', '').replace(/\..*/, '');
|
|
17
|
+
|
|
18
|
+
// TODO remove post migration
|
|
19
|
+
if (path.includes('/api-docs/')) {
|
|
20
|
+
return pascalCase(name);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// TODO support more than React component API (PascalCase)
|
|
24
|
+
if (path.includes('/api/')) {
|
|
25
|
+
return name.startsWith('use') ? camelCase(name) : pascalCase(name);
|
|
26
|
+
}
|
|
27
|
+
return titleize(name);
|
|
28
|
+
}
|
|
29
|
+
export function pageToTitleI18n(page, t) {
|
|
30
|
+
const path = page.subheader || page.pathname;
|
|
31
|
+
return page.query ? pageToTitle(page) : t(`pages.${path}`, {
|
|
32
|
+
ignoreWarning: true
|
|
33
|
+
}) || pageToTitle(page);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Get the value of a cookie
|
|
38
|
+
* Source: https://vanillajstoolkit.com/helpers/getcookie/
|
|
39
|
+
* @param name - The name of the cookie
|
|
40
|
+
* @return The cookie value
|
|
41
|
+
*/
|
|
42
|
+
export function getCookie(name) {
|
|
43
|
+
if (typeof document === 'undefined') {
|
|
44
|
+
throw new Error('getCookie() is not supported on the server. Fallback to a different value when rendering on the server.');
|
|
45
|
+
}
|
|
46
|
+
const value = `; ${document.cookie}`;
|
|
47
|
+
const parts = value.split(`; ${name}=`);
|
|
48
|
+
if (parts.length === 2) {
|
|
49
|
+
return parts[1].split(';').shift();
|
|
50
|
+
}
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* as is a reference to Next.js's as, the path in the URL
|
|
56
|
+
* pathname is a reference to Next.js's pathname, the name of page in the filesystem
|
|
57
|
+
* https://nextjs.org/docs/api-reference/next/router
|
|
58
|
+
*
|
|
59
|
+
* @param pathname - The URL pathname
|
|
60
|
+
* @param languages - List of supported language codes. Defaults to `['en']`.
|
|
61
|
+
*/
|
|
62
|
+
export function pathnameToLanguage(pathname, languages = ['en']) {
|
|
63
|
+
let userLanguage;
|
|
64
|
+
const userLanguageCandidate = pathname.substring(1, 3);
|
|
65
|
+
if ([...languages, 'zh'].includes(userLanguageCandidate) && pathname.startsWith(`/${userLanguageCandidate}/`)) {
|
|
66
|
+
userLanguage = userLanguageCandidate;
|
|
67
|
+
} else {
|
|
68
|
+
userLanguage = 'en';
|
|
69
|
+
}
|
|
70
|
+
const canonicalAs = userLanguage === 'en' ? pathname : pathname.substring(3);
|
|
71
|
+
// Remove hash as it's never sent to the server
|
|
72
|
+
// https://github.com/vercel/next.js/issues/25202
|
|
73
|
+
const canonicalAsServer = canonicalAs.replace(/#(.*)$/, '');
|
|
74
|
+
let canonicalPathname = canonicalAsServer.replace(/^\/api/, '/api-docs');
|
|
75
|
+
|
|
76
|
+
// Remove trailing slash as Next.js doesn't expect it here
|
|
77
|
+
// https://nextjs.org/docs/pages/api-reference/functions/use-router#router-object
|
|
78
|
+
if (canonicalPathname !== '/') {
|
|
79
|
+
canonicalPathname = canonicalPathname.replace(/\/$/, '');
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
userLanguage,
|
|
83
|
+
canonicalAs,
|
|
84
|
+
canonicalAsServer,
|
|
85
|
+
canonicalPathname
|
|
86
|
+
};
|
|
87
|
+
}
|
package/helpers/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { pascalCase, pageToTitle, pageToTitleI18n, getCookie, pathnameToLanguage } from "./helpers.js";
|
package/i18n/i18n.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
export interface UserLanguageProviderProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
translations?: Translations;
|
|
6
|
+
defaultUserLanguage: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function UserLanguageProvider(props: UserLanguageProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare namespace UserLanguageProvider {
|
|
10
|
+
var propTypes: {
|
|
11
|
+
children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
12
|
+
defaultUserLanguage: PropTypes.Requireable<string>;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export declare function useUserLanguage(): string;
|
|
16
|
+
export declare function useSetUserLanguage(): React.Dispatch<React.SetStateAction<string>>;
|
|
17
|
+
export interface TranslateOptions {
|
|
18
|
+
ignoreWarning?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export type Translate = (key: string, options?: TranslateOptions) => any;
|
|
21
|
+
export declare function useTranslate(): Translate;
|
|
22
|
+
export type Translations = { [key in string]?: string | Translations };
|
|
23
|
+
export interface RequireContext {
|
|
24
|
+
(req: string): string;
|
|
25
|
+
keys: () => string[];
|
|
26
|
+
}
|
|
27
|
+
export declare function mapTranslations(req: RequireContext): Translations;
|
package/i18n/i18n.js
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import deepmerge from '@mui/utils/deepmerge';
|
|
4
|
+
import defaultTranslations from "../translations/index.js";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
const TranslationsContext = /*#__PURE__*/React.createContext(defaultTranslations);
|
|
7
|
+
function TranslationsProvider({
|
|
8
|
+
translations = {},
|
|
9
|
+
children
|
|
10
|
+
}) {
|
|
11
|
+
const currentTranslations = React.useContext(TranslationsContext);
|
|
12
|
+
const mergedTranslations = React.useMemo(() => deepmerge(currentTranslations, translations), [currentTranslations, translations]);
|
|
13
|
+
return /*#__PURE__*/_jsx(TranslationsContext.Provider, {
|
|
14
|
+
value: mergedTranslations,
|
|
15
|
+
children: children
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function getPath(obj, path) {
|
|
19
|
+
if (!path || typeof path !== 'string') {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
const translation = path.split('.').reduce((acc, item) => acc && typeof acc === 'object' && acc[item] || null, obj);
|
|
23
|
+
if (typeof translation === 'object') {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
return translation;
|
|
27
|
+
}
|
|
28
|
+
const UserLanguageContext = /*#__PURE__*/React.createContext({
|
|
29
|
+
userLanguage: '',
|
|
30
|
+
setUserLanguage: () => {}
|
|
31
|
+
});
|
|
32
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
33
|
+
UserLanguageContext.displayName = 'UserLanguage';
|
|
34
|
+
}
|
|
35
|
+
export function UserLanguageProvider(props) {
|
|
36
|
+
const {
|
|
37
|
+
children,
|
|
38
|
+
translations,
|
|
39
|
+
defaultUserLanguage
|
|
40
|
+
} = props;
|
|
41
|
+
const [userLanguage, setUserLanguage] = React.useState(defaultUserLanguage);
|
|
42
|
+
const contextValue = React.useMemo(() => {
|
|
43
|
+
return {
|
|
44
|
+
userLanguage,
|
|
45
|
+
setUserLanguage
|
|
46
|
+
};
|
|
47
|
+
}, [userLanguage]);
|
|
48
|
+
return /*#__PURE__*/_jsx(TranslationsProvider, {
|
|
49
|
+
translations: translations,
|
|
50
|
+
children: /*#__PURE__*/_jsx(UserLanguageContext.Provider, {
|
|
51
|
+
value: contextValue,
|
|
52
|
+
children: children
|
|
53
|
+
})
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
process.env.NODE_ENV !== "production" ? UserLanguageProvider.propTypes = {
|
|
57
|
+
children: PropTypes.node.isRequired,
|
|
58
|
+
defaultUserLanguage: PropTypes.string
|
|
59
|
+
} : void 0;
|
|
60
|
+
export function useUserLanguage() {
|
|
61
|
+
return React.useContext(UserLanguageContext).userLanguage;
|
|
62
|
+
}
|
|
63
|
+
export function useSetUserLanguage() {
|
|
64
|
+
return React.useContext(UserLanguageContext).setUserLanguage;
|
|
65
|
+
}
|
|
66
|
+
const warnedOnce = {};
|
|
67
|
+
|
|
68
|
+
// TODO, migrate to use warnOnce() helper
|
|
69
|
+
const warn = (userLanguage, key, ignoreWarning) => {
|
|
70
|
+
const fullKey = `${userLanguage}:${key}`;
|
|
71
|
+
// No warnings in CI env
|
|
72
|
+
if (!ignoreWarning && !warnedOnce[fullKey] && typeof window !== 'undefined') {
|
|
73
|
+
console.warn(`Missing translation for ${fullKey}`);
|
|
74
|
+
warnedOnce[fullKey] = true;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
export function useTranslate() {
|
|
78
|
+
const userLanguage = useUserLanguage();
|
|
79
|
+
const translations = React.useContext(TranslationsContext);
|
|
80
|
+
return React.useMemo(() => function translate(key, options = {}) {
|
|
81
|
+
const {
|
|
82
|
+
ignoreWarning = false
|
|
83
|
+
} = options;
|
|
84
|
+
const wordings = translations[userLanguage];
|
|
85
|
+
if (!wordings) {
|
|
86
|
+
console.error(`Missing language: ${userLanguage}.`);
|
|
87
|
+
return '…';
|
|
88
|
+
}
|
|
89
|
+
const translation = getPath(wordings, key);
|
|
90
|
+
if (!translation) {
|
|
91
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
92
|
+
warn(userLanguage, key, ignoreWarning);
|
|
93
|
+
}
|
|
94
|
+
const enTranslation = getPath(translations.en, key);
|
|
95
|
+
return enTranslation ?? null;
|
|
96
|
+
}
|
|
97
|
+
return translation;
|
|
98
|
+
}, [userLanguage, translations]);
|
|
99
|
+
}
|
|
100
|
+
export function mapTranslations(req) {
|
|
101
|
+
const result = {};
|
|
102
|
+
req.keys().forEach(filename => {
|
|
103
|
+
const match = filename.match(/-([a-z]{2}).json$/);
|
|
104
|
+
if (match) {
|
|
105
|
+
result[match[1]] = req(filename);
|
|
106
|
+
} else {
|
|
107
|
+
result.en = req(filename);
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
return result;
|
|
111
|
+
}
|
package/i18n/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./i18n.js";
|
package/i18n/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./i18n.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./mapApiPageTranslations.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./mapApiPageTranslations.js";
|