@mui/docs 9.0.0-alpha.2 → 9.0.0-alpha.3
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.js +33 -42
- package/Ad/AdCarbon.js +18 -27
- package/Ad/AdDisplay.js +22 -29
- package/Ad/AdGuest.js +8 -15
- package/Ad/AdInHouse.js +4 -11
- package/Ad/AdManager.js +8 -17
- package/Ad/AdProvider.js +5 -13
- package/Ad/ad.styles.js +5 -13
- package/Ad/index.js +6 -62
- package/AnalyticsProvider/AnalyticsProvider.d.ts +17 -0
- package/AnalyticsProvider/AnalyticsProvider.js +225 -0
- package/AnalyticsProvider/index.d.ts +1 -0
- package/AnalyticsProvider/index.js +1 -0
- package/CHANGELOG.md +37 -0
- package/CodeCopy/CodeCopy.js +10 -19
- package/CodeCopy/CodeCopyButton.js +9 -16
- package/CodeCopy/index.js +3 -40
- package/CodeCopy/useClipboardCopy.js +4 -12
- package/ComponentLinkHeader/ComponentLinkHeader.js +46 -54
- package/ComponentLinkHeader/index.js +2 -24
- 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/DocsProvider/DocsProvider.js +9 -17
- package/DocsProvider/index.js +1 -16
- package/Document/Document.d.ts +16 -0
- package/Document/Document.js +147 -0
- package/Document/getInitialProps.d.ts +18 -0
- package/Document/getInitialProps.js +62 -0
- package/Document/index.d.ts +2 -0
- package/Document/index.js +2 -0
- package/GoogleAnalytics/GoogleAnalytics.d.ts +9 -0
- package/GoogleAnalytics/GoogleAnalytics.js +129 -0
- package/GoogleAnalytics/index.d.ts +1 -0
- package/GoogleAnalytics/index.js +1 -0
- package/HighlightedCode/HighlightedCode.js +18 -26
- package/HighlightedCode/index.js +1 -16
- package/HighlightedCodeWithTabs/HighlightedCodeWithTabs.js +22 -31
- package/HighlightedCodeWithTabs/index.js +2 -24
- package/IconImage/IconImage.js +13 -21
- package/IconImage/index.js +1 -13
- package/InfoCard/InfoCard.js +20 -29
- package/InfoCard/index.js +1 -16
- package/Link/Link.js +17 -25
- package/Link/MarkdownLinks.d.ts +2 -0
- package/Link/MarkdownLinks.js +84 -0
- package/Link/SkipLink.d.ts +1 -0
- package/Link/SkipLink.js +66 -0
- package/Link/index.d.ts +3 -1
- package/Link/index.js +3 -16
- package/MarkdownElement/MarkdownElement.js +178 -186
- package/MarkdownElement/index.js +1 -16
- 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/NextNProgressBar.d.ts +1 -0
- package/NextNProgressBar/NextNProgressBar.js +44 -0
- package/NextNProgressBar/index.d.ts +1 -0
- package/NextNProgressBar/index.js +1 -0
- package/PageContext/PageContext.d.ts +31 -0
- package/PageContext/PageContext.js +6 -0
- package/PageContext/index.d.ts +2 -0
- package/PageContext/index.js +1 -0
- package/SectionHeadline/SectionHeadline.js +9 -17
- package/SectionHeadline/index.js +2 -25
- package/SectionTitle/SectionTitle.js +7 -13
- package/SectionTitle/index.js +1 -16
- package/StyledEngineProvider/StyledEngineProvider.d.ts +9 -0
- package/StyledEngineProvider/StyledEngineProvider.js +44 -0
- package/StyledEngineProvider/index.d.ts +1 -0
- package/StyledEngineProvider/index.js +1 -0
- package/ThemeContext/ThemeContext.js +26 -38
- package/ThemeContext/index.js +1 -42
- package/branding/BrandingCssVarsProvider.d.ts +23 -0
- package/branding/BrandingCssVarsProvider.js +170 -0
- package/branding/BrandingProvider.js +8 -15
- package/branding/brandingTheme.js +115 -126
- package/branding/index.d.ts +2 -1
- package/branding/index.js +3 -27
- package/codeStyling/codeStyling.d.ts +10 -0
- package/codeStyling/codeStyling.js +84 -0
- package/codeStyling/index.d.ts +1 -0
- package/codeStyling/index.js +1 -0
- package/codeVariant/codeVariant.d.ts +10 -0
- package/codeVariant/codeVariant.js +73 -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/createEmotionCache/createEmotionCache.d.ts +1 -0
- package/createEmotionCache/createEmotionCache.js +12 -0
- package/createEmotionCache/index.d.ts +1 -0
- package/createEmotionCache/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.js +17 -29
- package/i18n/index.js +1 -16
- 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/index.js +8 -15
- package/package.json +231 -126
- package/svgIcons/BundleSizeIcon.js +5 -11
- package/svgIcons/FigmaIcon.js +8 -14
- package/svgIcons/FileDownload.js +5 -12
- package/svgIcons/JavaScript.js +5 -12
- package/svgIcons/MarkdownIcon.js +7 -14
- package/svgIcons/MaterialDesignIcon.js +6 -12
- package/svgIcons/SketchIcon.js +10 -16
- package/svgIcons/TypeScript.js +5 -12
- package/svgIcons/W3CIcon.js +6 -12
- package/translations/index.js +3 -10
- package/translations/translations.json +0 -1
- package/useLazyCSS/index.js +1 -13
- package/useLazyCSS/useLazyCSS.js +5 -11
- package/utils/index.d.ts +1 -0
- package/utils/index.js +2 -0
- package/utils/loadScript.js +1 -7
- package/Ad/Ad.d.mts +0 -5
- package/Ad/Ad.mjs +0 -226
- package/Ad/AdCarbon.d.mts +0 -2
- package/Ad/AdCarbon.mjs +0 -125
- package/Ad/AdDisplay.d.mts +0 -16
- package/Ad/AdDisplay.mjs +0 -86
- package/Ad/AdGuest.d.mts +0 -10
- package/Ad/AdGuest.mjs +0 -29
- package/Ad/AdInHouse.d.mts +0 -4
- package/Ad/AdInHouse.mjs +0 -14
- package/Ad/AdManager.d.mts +0 -19
- package/Ad/AdManager.mjs +0 -36
- package/Ad/AdProvider.d.mts +0 -15
- package/Ad/AdProvider.mjs +0 -24
- package/Ad/ad.styles.d.mts +0 -4512
- package/Ad/ad.styles.mjs +0 -91
- package/Ad/index.d.mts +0 -5
- package/Ad/index.mjs +0 -7
- package/CodeCopy/CodeCopy.d.mts +0 -22
- package/CodeCopy/CodeCopy.mjs +0 -172
- package/CodeCopy/CodeCopyButton.d.mts +0 -4
- package/CodeCopy/CodeCopyButton.mjs +0 -40
- package/CodeCopy/index.d.mts +0 -3
- package/CodeCopy/index.mjs +0 -3
- package/CodeCopy/useClipboardCopy.d.mts +0 -4
- package/CodeCopy/useClipboardCopy.mjs +0 -21
- package/ComponentLinkHeader/ComponentLinkHeader.d.mts +0 -8
- package/ComponentLinkHeader/ComponentLinkHeader.mjs +0 -197
- package/ComponentLinkHeader/index.d.mts +0 -2
- package/ComponentLinkHeader/index.mjs +0 -2
- package/DocsProvider/DocsProvider.d.mts +0 -24
- package/DocsProvider/DocsProvider.mjs +0 -31
- package/DocsProvider/index.d.mts +0 -1
- package/DocsProvider/index.mjs +0 -1
- package/HighlightedCode/HighlightedCode.d.mts +0 -14
- package/HighlightedCode/HighlightedCode.mjs +0 -67
- package/HighlightedCode/index.d.mts +0 -1
- package/HighlightedCode/index.mjs +0 -1
- package/HighlightedCodeWithTabs/HighlightedCodeWithTabs.d.mts +0 -28
- package/HighlightedCodeWithTabs/HighlightedCodeWithTabs.mjs +0 -362
- package/HighlightedCodeWithTabs/index.d.mts +0 -2
- package/HighlightedCodeWithTabs/index.mjs +0 -2
- package/IconImage/IconImage.d.mts +0 -11
- package/IconImage/IconImage.mjs +0 -83
- package/IconImage/index.d.mts +0 -1
- package/IconImage/index.mjs +0 -1
- package/InfoCard/InfoCard.d.mts +0 -22
- package/InfoCard/InfoCard.mjs +0 -87
- package/InfoCard/index.d.mts +0 -1
- package/InfoCard/index.mjs +0 -1
- package/Link/Link.d.mts +0 -25
- package/Link/Link.mjs +0 -75
- package/Link/index.d.mts +0 -1
- package/Link/index.mjs +0 -1
- package/MarkdownElement/MarkdownElement.d.mts +0 -7
- package/MarkdownElement/MarkdownElement.mjs +0 -847
- package/MarkdownElement/index.d.mts +0 -1
- package/MarkdownElement/index.mjs +0 -1
- package/NProgressBar/NProgressBar.d.mts +0 -6
- package/NProgressBar/NProgressBar.js +0 -98
- package/NProgressBar/index.d.mts +0 -2
- package/NProgressBar/index.d.ts +0 -2
- package/NProgressBar/index.js +0 -13
- package/NProgressBar/index.mjs +0 -1
- package/SectionHeadline/SectionHeadline.d.mts +0 -13
- package/SectionHeadline/SectionHeadline.mjs +0 -81
- package/SectionHeadline/index.d.mts +0 -2
- package/SectionHeadline/index.mjs +0 -2
- package/SectionTitle/SectionTitle.d.mts +0 -6
- package/SectionTitle/SectionTitle.mjs +0 -29
- package/SectionTitle/index.d.mts +0 -1
- package/SectionTitle/index.mjs +0 -1
- package/ThemeContext/ThemeContext.d.mts +0 -92
- package/ThemeContext/ThemeContext.mjs +0 -200
- package/ThemeContext/index.d.mts +0 -1
- package/ThemeContext/index.mjs +0 -1
- package/branding/BrandingProvider.d.mts +0 -9
- package/branding/BrandingProvider.mjs +0 -17
- package/branding/brandingTheme.d.mts +0 -147
- package/branding/brandingTheme.mjs +0 -1527
- package/branding/index.d.mts +0 -2
- package/branding/index.mjs +0 -2
- package/i18n/i18n.d.mts +0 -27
- package/i18n/i18n.mjs +0 -111
- package/i18n/index.d.mts +0 -1
- package/i18n/index.mjs +0 -1
- package/nextFonts/index.d.mts +0 -6
- package/nextFonts/index.mjs +0 -59
- package/svgIcons/BundleSizeIcon.d.mts +0 -4
- package/svgIcons/BundleSizeIcon.mjs +0 -13
- package/svgIcons/FigmaIcon.d.mts +0 -4
- package/svgIcons/FigmaIcon.mjs +0 -22
- package/svgIcons/FileDownload.d.mts +0 -6
- package/svgIcons/FileDownload.mjs +0 -13
- package/svgIcons/JavaScript.d.mts +0 -6
- package/svgIcons/JavaScript.mjs +0 -13
- package/svgIcons/MarkdownIcon.d.mts +0 -2
- package/svgIcons/MarkdownIcon.mjs +0 -22
- package/svgIcons/MaterialDesignIcon.d.mts +0 -4
- package/svgIcons/MaterialDesignIcon.mjs +0 -18
- package/svgIcons/SketchIcon.d.mts +0 -4
- package/svgIcons/SketchIcon.mjs +0 -27
- package/svgIcons/TypeScript.d.mts +0 -6
- package/svgIcons/TypeScript.mjs +0 -13
- package/svgIcons/W3CIcon.d.mts +0 -4
- package/svgIcons/W3CIcon.mjs +0 -15
- package/translations/index.d.mts +0 -3
- package/translations/index.mjs +0 -4
- package/useLazyCSS/index.d.mts +0 -1
- package/useLazyCSS/index.mjs +0 -1
- package/useLazyCSS/useLazyCSS.d.mts +0 -11
- package/useLazyCSS/useLazyCSS.mjs +0 -70
- package/utils/loadScript.d.mts +0 -1
- package/utils/loadScript.mjs +0 -7
- /package/{NProgressBar → NextNProgressBar}/NProgressBar.d.ts +0 -0
- /package/{NProgressBar/NProgressBar.mjs → NextNProgressBar/NProgressBar.js} +0 -0
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _utils = require("@mui/material/utils");
|
|
8
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
-
var _default = exports.default = (0, _utils.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsxs)("g", {
|
|
1
|
+
import { createSvgIcon } from '@mui/material/utils';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
export default createSvgIcon(/*#__PURE__*/_jsxs("g", {
|
|
10
4
|
fill: "currentColor",
|
|
11
5
|
fillRule: "nonzero",
|
|
12
|
-
children: [/*#__PURE__*/(
|
|
6
|
+
children: [/*#__PURE__*/_jsx("path", {
|
|
13
7
|
d: "M5.84 3c-.52 0-1 .25-1.3.67l-1.4 2.05c-.06.09-.1.19-.14.28h8V3H5.84zM20.86 5.72l-1.4-2.05c-.3-.42-.81-.67-1.33-.67H13v3h8c-.05-.1-.08-.2-.14-.28z",
|
|
14
8
|
fillOpacity: ".79"
|
|
15
|
-
}), /*#__PURE__*/(
|
|
9
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
16
10
|
d: "M20.98 7H3.02L3 7.11V19.4c0 .89.71 1.61 1.58 1.61h14.84A1.6 1.6 0 0021 19.4V7.1L20.98 7zm-6.87 5.36H9.89a1.6 1.6 0 01-1.58-1.61c0-.89.7-1.6 1.58-1.6h4.22c.87 0 1.58.71 1.58 1.6 0 .89-.7 1.6-1.58 1.6z",
|
|
17
11
|
fillOpacity: ".87"
|
|
18
12
|
})]
|
package/svgIcons/FigmaIcon.js
CHANGED
|
@@ -1,27 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _utils = require("@mui/material/utils");
|
|
8
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
-
var _default = exports.default = (0, _utils.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsxs)("g", {
|
|
1
|
+
import { createSvgIcon } from '@mui/material/utils';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
export default createSvgIcon(/*#__PURE__*/_jsxs("g", {
|
|
10
4
|
fillRule: "nonzero",
|
|
11
5
|
fill: "none",
|
|
12
|
-
children: [/*#__PURE__*/(
|
|
6
|
+
children: [/*#__PURE__*/_jsx("path", {
|
|
13
7
|
d: "M8 24a4 4 0 004-4v-4H8a4 4 0 000 8z",
|
|
14
8
|
fill: "#0ACF83"
|
|
15
|
-
}), /*#__PURE__*/(
|
|
9
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
16
10
|
d: "M4 12a4 4 0 014-4h4v8H8a4 4 0 01-4-4z",
|
|
17
11
|
fill: "#A259FF"
|
|
18
|
-
}), /*#__PURE__*/(
|
|
12
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
19
13
|
d: "M4 4a4 4 0 014-4h4v8H8a4 4 0 01-4-4z",
|
|
20
14
|
fill: "#F24E1E"
|
|
21
|
-
}), /*#__PURE__*/(
|
|
15
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
22
16
|
d: "M12 0h4a4 4 0 010 8h-4V0z",
|
|
23
17
|
fill: "#FF7262"
|
|
24
|
-
}), /*#__PURE__*/(
|
|
18
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
25
19
|
d: "M20 12a4 4 0 11-8 0 4 4 0 018 0z",
|
|
26
20
|
fill: "#1ABCFE"
|
|
27
21
|
})]
|
package/svgIcons/FileDownload.js
CHANGED
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _SvgIcon = _interopRequireDefault(require("@mui/material/SvgIcon"));
|
|
9
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
1
|
var _path;
|
|
2
|
+
import SvgIcon from '@mui/material/SvgIcon';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
4
|
function FileDownload(props) {
|
|
12
|
-
return /*#__PURE__*/(
|
|
5
|
+
return /*#__PURE__*/_jsx(SvgIcon, {
|
|
13
6
|
...props,
|
|
14
|
-
children: _path || (_path = /*#__PURE__*/(
|
|
7
|
+
children: _path || (_path = /*#__PURE__*/_jsx("path", {
|
|
15
8
|
d: "M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"
|
|
16
9
|
}))
|
|
17
10
|
});
|
|
18
11
|
}
|
|
19
12
|
FileDownload.muiName = 'SvgIcon';
|
|
20
|
-
|
|
13
|
+
export default FileDownload;
|
package/svgIcons/JavaScript.js
CHANGED
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _SvgIcon = _interopRequireDefault(require("@mui/material/SvgIcon"));
|
|
9
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
1
|
var _path;
|
|
2
|
+
import SvgIcon from '@mui/material/SvgIcon';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
4
|
function JavaScript(props) {
|
|
12
|
-
return /*#__PURE__*/(
|
|
5
|
+
return /*#__PURE__*/_jsx(SvgIcon, {
|
|
13
6
|
...props,
|
|
14
|
-
children: _path || (_path = /*#__PURE__*/(
|
|
7
|
+
children: _path || (_path = /*#__PURE__*/_jsx("path", {
|
|
15
8
|
d: "M3,3H21V21H3V3M7.73,18.04C8.13,18.89 8.92,19.59 10.27,19.59C11.77,19.59 12.8,18.79 12.8,17.04V11.26H11.1V17C11.1,17.86 10.75,18.08 10.2,18.08C9.62,18.08 9.38,17.68 9.11,17.21L7.73,18.04M13.71,17.86C14.21,18.84 15.22,19.59 16.8,19.59C18.4,19.59 19.6,18.76 19.6,17.23C19.6,15.82 18.79,15.19 17.35,14.57L16.93,14.39C16.2,14.08 15.89,13.87 15.89,13.37C15.89,12.96 16.2,12.64 16.7,12.64C17.18,12.64 17.5,12.85 17.79,13.37L19.1,12.5C18.55,11.54 17.77,11.17 16.7,11.17C15.19,11.17 14.22,12.13 14.22,13.4C14.22,14.78 15.03,15.43 16.25,15.95L16.67,16.13C17.45,16.47 17.91,16.68 17.91,17.26C17.91,17.74 17.46,18.09 16.76,18.09C15.93,18.09 15.45,17.66 15.09,17.06L13.71,17.86Z"
|
|
16
9
|
}))
|
|
17
10
|
});
|
|
18
11
|
}
|
|
19
12
|
JavaScript.muiName = 'SvgIcon';
|
|
20
|
-
|
|
13
|
+
export default JavaScript;
|
package/svgIcons/MarkdownIcon.js
CHANGED
|
@@ -1,26 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = MarkdownIcon;
|
|
8
|
-
var _SvgIcon = _interopRequireDefault(require("@mui/material/SvgIcon"));
|
|
9
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
1
|
var _svg;
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
import SvgIcon from '@mui/material/SvgIcon';
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
+
export default function MarkdownIcon(props) {
|
|
5
|
+
return /*#__PURE__*/_jsx(SvgIcon, {
|
|
13
6
|
...props,
|
|
14
|
-
children: _svg || (_svg = /*#__PURE__*/(
|
|
7
|
+
children: _svg || (_svg = /*#__PURE__*/_jsxs("svg", {
|
|
15
8
|
width: "16",
|
|
16
9
|
height: "16",
|
|
17
10
|
viewBox: "0 0 24 24",
|
|
18
11
|
fill: "none",
|
|
19
12
|
xmlns: "http://www.w3.org/2000/svg",
|
|
20
13
|
"aria-hidden": "true",
|
|
21
|
-
children: [/*#__PURE__*/(
|
|
14
|
+
children: [/*#__PURE__*/_jsx("title", {
|
|
22
15
|
children: "Markdown"
|
|
23
|
-
}), /*#__PURE__*/(
|
|
16
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
24
17
|
d: "M22.269 19.385H1.731a1.73 1.73 0 0 1-1.73-1.73V6.345a1.73 1.73 0 0 1 1.73-1.73h20.538a1.73 1.73 0 0 1 1.73 1.73v11.308a1.73 1.73 0 0 1-1.73 1.731zm-16.5-3.462v-4.5l2.308 2.885 2.307-2.885v4.5h2.308V8.078h-2.308l-2.307 2.885-2.308-2.885H3.461v7.847zM21.231 12h-2.308V8.077h-2.307V12h-2.308l3.461 4.039z",
|
|
25
18
|
fill: "currentColor"
|
|
26
19
|
})]
|
|
@@ -1,23 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _utils = require("@mui/material/utils");
|
|
8
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
-
var _default = exports.default = (0, _utils.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsxs)("g", {
|
|
1
|
+
import { createSvgIcon } from '@mui/material/utils';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
export default createSvgIcon(/*#__PURE__*/_jsxs("g", {
|
|
10
4
|
fill: "none",
|
|
11
5
|
fillRule: "evenodd",
|
|
12
|
-
children: [/*#__PURE__*/(
|
|
6
|
+
children: [/*#__PURE__*/_jsx("circle", {
|
|
13
7
|
fill: "#737373",
|
|
14
8
|
cx: "12",
|
|
15
9
|
cy: "12",
|
|
16
10
|
r: "12"
|
|
17
|
-
}), /*#__PURE__*/(
|
|
11
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
18
12
|
fill: "#BDBDBD",
|
|
19
13
|
d: "M4 4h16v16H4z"
|
|
20
|
-
}), /*#__PURE__*/(
|
|
14
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
21
15
|
fill: "#FFF",
|
|
22
16
|
d: "M12 20l8-16H4z"
|
|
23
17
|
})]
|
package/svgIcons/SketchIcon.js
CHANGED
|
@@ -1,31 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _utils = require("@mui/material/utils");
|
|
8
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
-
var _default = exports.default = (0, _utils.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsxs)("g", {
|
|
1
|
+
import { createSvgIcon } from '@mui/material/utils';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
export default createSvgIcon(/*#__PURE__*/_jsxs("g", {
|
|
10
4
|
fillRule: "nonzero",
|
|
11
5
|
fill: "none",
|
|
12
|
-
children: [/*#__PURE__*/(
|
|
6
|
+
children: [/*#__PURE__*/_jsx("path", {
|
|
13
7
|
fill: "#FDB300",
|
|
14
8
|
d: "M5.24 2.7L12 2l6.76.7L24 9.48 12 23 0 9.49z"
|
|
15
|
-
}), /*#__PURE__*/(
|
|
9
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
16
10
|
fill: "#EA6C00",
|
|
17
11
|
d: "M4.85 9l7.13 14L0 9zM19.1 9l-7.12 14L23.95 9z"
|
|
18
|
-
}), /*#__PURE__*/(
|
|
12
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
19
13
|
fill: "#FDAD00",
|
|
20
14
|
d: "M4.85 9H19.1l-7.12 14z"
|
|
21
|
-
}), /*#__PURE__*/(
|
|
22
|
-
children: [/*#__PURE__*/(
|
|
15
|
+
}), /*#__PURE__*/_jsxs("g", {
|
|
16
|
+
children: [/*#__PURE__*/_jsx("path", {
|
|
23
17
|
fill: "#FDD231",
|
|
24
18
|
d: "M11.98 2l-6.75.65-.38 6.34zM11.98 2l6.75.65.37 6.34z"
|
|
25
|
-
}), /*#__PURE__*/(
|
|
19
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
26
20
|
fill: "#FDAD00",
|
|
27
21
|
d: "M23.95 9l-5.22-6.35.37 6.34zM0 9l5.23-6.35-.38 6.34z"
|
|
28
|
-
}), /*#__PURE__*/(
|
|
22
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
29
23
|
fill: "#FEEEB7",
|
|
30
24
|
d: "M11.98 2L4.85 9H19.1z"
|
|
31
25
|
})]
|
package/svgIcons/TypeScript.js
CHANGED
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _SvgIcon = _interopRequireDefault(require("@mui/material/SvgIcon"));
|
|
9
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
1
|
var _path;
|
|
2
|
+
import SvgIcon from '@mui/material/SvgIcon';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
4
|
function TypeScript(props) {
|
|
12
|
-
return /*#__PURE__*/(
|
|
5
|
+
return /*#__PURE__*/_jsx(SvgIcon, {
|
|
13
6
|
...props,
|
|
14
|
-
children: _path || (_path = /*#__PURE__*/(
|
|
7
|
+
children: _path || (_path = /*#__PURE__*/_jsx("path", {
|
|
15
8
|
d: "M3,3H21V21H3V3M13.71,17.86C14.21,18.84 15.22,19.59 16.8,19.59C18.4,19.59 19.6,18.76 19.6,17.23C19.6,15.82 18.79,15.19 17.35,14.57L16.93,14.39C16.2,14.08 15.89,13.87 15.89,13.37C15.89,12.96 16.2,12.64 16.7,12.64C17.18,12.64 17.5,12.85 17.79,13.37L19.1,12.5C18.55,11.54 17.77,11.17 16.7,11.17C15.19,11.17 14.22,12.13 14.22,13.4C14.22,14.78 15.03,15.43 16.25,15.95L16.67,16.13C17.45,16.47 17.91,16.68 17.91,17.26C17.91,17.74 17.46,18.09 16.76,18.09C15.93,18.09 15.45,17.66 15.09,17.06L13.71,17.86M13,11.25H8V12.75H9.5V20H11.25V12.75H13V11.25Z"
|
|
16
9
|
}))
|
|
17
10
|
});
|
|
18
11
|
}
|
|
19
12
|
TypeScript.muiName = 'SvgIcon';
|
|
20
|
-
|
|
13
|
+
export default TypeScript;
|
package/svgIcons/W3CIcon.js
CHANGED
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _utils = require("@mui/material/utils");
|
|
8
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
-
var _default = exports.default = (0, _utils.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsxs)("g", {
|
|
1
|
+
import { createSvgIcon } from '@mui/material/utils';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
export default createSvgIcon(/*#__PURE__*/_jsxs("g", {
|
|
10
4
|
fillRule: "nonzero",
|
|
11
5
|
fill: "none",
|
|
12
|
-
children: [/*#__PURE__*/(
|
|
6
|
+
children: [/*#__PURE__*/_jsx("path", {
|
|
13
7
|
d: "M6.92 6.1l2.33 7.99 2.32-8h6.3v.8l-2.37 4.14c.83.27 1.46.76 1.89 1.47.43.71.64 1.55.64 2.51 0 1.2-.31 2.2-.94 3a2.93 2.93 0 01-2.42 1.22 2.9 2.9 0 01-1.96-.72 4.25 4.25 0 01-1.23-1.96l1.31-.55c.2.5.45.9.76 1.18.32.28.69.43 1.12.43.44 0 .82-.26 1.13-.76.31-.51.47-1.12.47-1.84 0-.79-.17-1.4-.5-1.83-.38-.5-.99-.76-1.81-.76h-.64v-.78l2.24-3.92h-2.7l-.16.26-3.3 11.25h-.15l-2.4-8.14-2.41 8.14h-.16L.43 6.1H2.1l2.33 7.99L6 8.71 5.24 6.1h1.68z",
|
|
14
8
|
fill: "#005A9C"
|
|
15
|
-
}), /*#__PURE__*/(
|
|
9
|
+
}), /*#__PURE__*/_jsx("g", {
|
|
16
10
|
fill: "currentColor",
|
|
17
|
-
children: /*#__PURE__*/(
|
|
11
|
+
children: /*#__PURE__*/_jsx("path", {
|
|
18
12
|
d: "M23.52 6.25l.28 1.62-.98 1.8s-.38-.76-1.01-1.19c-.53-.35-.87-.43-1.41-.33-.7.14-1.48.93-1.82 1.9-.41 1.18-.42 1.74-.43 2.26a4.9 4.9 0 00.11 1.33s-.6-1.06-.59-2.61c0-1.1.19-2.11.72-3.1.47-.87 1.17-1.4 1.8-1.45.63-.07 1.14.23 1.53.55.42.33.83 1.07.83 1.07l.97-1.85zM23.64 15.4s-.43.75-.7 1.04c-.27.28-.76.79-1.36 1.04-.6.25-.91.3-1.5.25a3.03 3.03 0 01-1.34-.52 5.08 5.08 0 01-1.67-2.04s.24.75.39 1.07c.09.18.36.74.74 1.23a3.5 3.5 0 002.1 1.42c1.04.18 1.76-.27 1.94-.38a5.32 5.32 0 001.4-1.43c.1-.14.25-.43.25-.43l-.25-1.25z"
|
|
19
13
|
})
|
|
20
14
|
})]
|
package/translations/index.js
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _translations = _interopRequireDefault(require("./translations.json"));
|
|
9
|
-
var _default = exports.default = {
|
|
10
|
-
en: _translations.default
|
|
1
|
+
import en from "./translations.json";
|
|
2
|
+
export default {
|
|
3
|
+
en
|
|
11
4
|
};
|
|
@@ -53,7 +53,6 @@
|
|
|
53
53
|
"spreadHint": "Props of the {{spreadHintElement}} component are also available.",
|
|
54
54
|
"state": "STATE",
|
|
55
55
|
"styleOverrides": "The name <code>{{componentStyles.name}}</code> can be used when providing <a href={{defaultPropsLink}}>default props</a> or <a href={{styleOverridesLink}}>style overrides</a> in the theme.",
|
|
56
|
-
"slotDescription": "To learn how to customize the slot, check out the <a href={{slotGuideLink}}>Overriding component structure</a> guide.",
|
|
57
56
|
"slotName": "Slot name",
|
|
58
57
|
"source-code": "Source code",
|
|
59
58
|
"type": "Type",
|
package/useLazyCSS/index.js
CHANGED
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
Object.defineProperty(exports, "default", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function () {
|
|
10
|
-
return _useLazyCSS.default;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
var _useLazyCSS = _interopRequireDefault(require("./useLazyCSS"));
|
|
1
|
+
export { default } from "./useLazyCSS.js";
|
package/useLazyCSS/useLazyCSS.js
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { loadCSS } from 'fg-loadcss';
|
|
2
3
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = useLazyCSS;
|
|
8
|
-
var React = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _fgLoadcss = require("fg-loadcss");
|
|
10
4
|
/**
|
|
11
5
|
* Enhanced lazy CSS loader that wraps CSS in a layer using fetch to avoid CORS issues
|
|
12
6
|
* @param {string} href - URL of the CSS file to load
|
|
@@ -15,11 +9,11 @@ var _fgLoadcss = require("fg-loadcss");
|
|
|
15
9
|
* @param {string} options.layer - Optional CSS layer name to wrap the CSS in
|
|
16
10
|
* @returns {() => void} cleanup function
|
|
17
11
|
*/
|
|
18
|
-
function useLazyCSS(href, before, options = {}) {
|
|
12
|
+
export default function useLazyCSS(href, before, options = {}) {
|
|
19
13
|
React.useEffect(() => {
|
|
20
14
|
// If no layer is specified, add style and clean it on unmount
|
|
21
15
|
if (!options.layer) {
|
|
22
|
-
const link =
|
|
16
|
+
const link = loadCSS(href, document.querySelector(before));
|
|
23
17
|
return () => {
|
|
24
18
|
link.parentElement?.removeChild(link);
|
|
25
19
|
};
|
|
@@ -58,7 +52,7 @@ function useLazyCSS(href, before, options = {}) {
|
|
|
58
52
|
}
|
|
59
53
|
|
|
60
54
|
// Fall back to regular link element if fetch fails
|
|
61
|
-
styleElement =
|
|
55
|
+
styleElement = loadCSS(href, document.querySelector(before));
|
|
62
56
|
}
|
|
63
57
|
});
|
|
64
58
|
|
package/utils/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as loadScript } from "./loadScript.js";
|
package/utils/index.js
ADDED
package/utils/loadScript.js
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = loadScript;
|
|
7
|
-
function loadScript(src, position) {
|
|
1
|
+
export default function loadScript(src, position) {
|
|
8
2
|
const script = document.createElement('script');
|
|
9
3
|
script.setAttribute('async', '');
|
|
10
4
|
script.src = src;
|
package/Ad/Ad.d.mts
DELETED
package/Ad/Ad.mjs
DELETED
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
var _span, _PleaseDisableAdblock, _AdCarbon;
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import Typography from '@mui/material/Typography';
|
|
4
|
-
import Box from '@mui/material/Box';
|
|
5
|
-
import Paper from '@mui/material/Paper';
|
|
6
|
-
import { useTranslate } from "../i18n/index.mjs";
|
|
7
|
-
import AdCarbon from "./AdCarbon.mjs";
|
|
8
|
-
import AdInHouse from "./AdInHouse.mjs";
|
|
9
|
-
import { AdContext, adShape } from "./AdManager.mjs";
|
|
10
|
-
import { useAdConfig } from "./AdProvider.mjs";
|
|
11
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
-
function PleaseDisableAdblock() {
|
|
13
|
-
const t = useTranslate();
|
|
14
|
-
return /*#__PURE__*/_jsxs(Paper, {
|
|
15
|
-
component: "span",
|
|
16
|
-
elevation: 0,
|
|
17
|
-
sx: {
|
|
18
|
-
display: 'block',
|
|
19
|
-
p: 1.5,
|
|
20
|
-
border: '2px solid',
|
|
21
|
-
borderColor: 'primary.main'
|
|
22
|
-
},
|
|
23
|
-
children: [/*#__PURE__*/_jsx(Typography, {
|
|
24
|
-
variant: "body2",
|
|
25
|
-
component: "span",
|
|
26
|
-
gutterBottom: true,
|
|
27
|
-
sx: {
|
|
28
|
-
display: 'block'
|
|
29
|
-
},
|
|
30
|
-
children: t('likeMui')
|
|
31
|
-
}), /*#__PURE__*/_jsx(Typography, {
|
|
32
|
-
variant: "body2",
|
|
33
|
-
component: "span",
|
|
34
|
-
gutterBottom: true,
|
|
35
|
-
sx: {
|
|
36
|
-
display: 'block'
|
|
37
|
-
},
|
|
38
|
-
children: t('adblock')
|
|
39
|
-
}), /*#__PURE__*/_jsxs(Typography, {
|
|
40
|
-
variant: "body2",
|
|
41
|
-
component: "span",
|
|
42
|
-
sx: {
|
|
43
|
-
display: 'block'
|
|
44
|
-
},
|
|
45
|
-
children: [t('thanks'), ' ', /*#__PURE__*/_jsx("span", {
|
|
46
|
-
role: "img",
|
|
47
|
-
"aria-label": t('emojiLove'),
|
|
48
|
-
children: "\u2764\uFE0F"
|
|
49
|
-
})]
|
|
50
|
-
})]
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
const disableAd = process.env.NODE_ENV !== 'production' && process.env.ENABLE_AD_IN_DEV_MODE !== 'true';
|
|
54
|
-
const inHouseAds = [{
|
|
55
|
-
name: 'templates',
|
|
56
|
-
link: 'https://mui.com/store/?utm_source=docs&utm_medium=referral&utm_campaign=in-house-templates',
|
|
57
|
-
img: '/static/ads-in-house/themes-2.jpg',
|
|
58
|
-
descriptionHeader: 'Premium Templates',
|
|
59
|
-
description: 'Start your project with the best templates for admins, dashboards, and more.'
|
|
60
|
-
}, {
|
|
61
|
-
name: 'themes',
|
|
62
|
-
link: 'https://mui.com/store/?utm_source=docs&utm_medium=referral&utm_campaign=in-house-themes',
|
|
63
|
-
img: '/static/ads-in-house/themes.png',
|
|
64
|
-
descriptionHeader: 'Premium Themes',
|
|
65
|
-
description: 'Kickstart your application development with a ready-made theme.'
|
|
66
|
-
}, {
|
|
67
|
-
name: 'tidelift',
|
|
68
|
-
link: 'https://tidelift.com/',
|
|
69
|
-
img: '/static/ads-in-house/tidelift.png',
|
|
70
|
-
descriptionHeader: 'MUI for enterprise',
|
|
71
|
-
description: 'Save time and reduce risk. Managed open source — backed by maintainers.'
|
|
72
|
-
}, {
|
|
73
|
-
name: 'figma',
|
|
74
|
-
link: 'https://mui.com/store/items/figma-react/?utm_source=docs&utm_medium=referral&utm_campaign=in-house-figma',
|
|
75
|
-
img: '/static/ads-in-house/figma.png',
|
|
76
|
-
descriptionHeader: 'For Figma',
|
|
77
|
-
description: 'A large UI kit with over 600 handcrafted Material UI, MUI X, Joy UI components 🎨.'
|
|
78
|
-
}];
|
|
79
|
-
class AdErrorBoundary extends React.Component {
|
|
80
|
-
state = {
|
|
81
|
-
didError: false
|
|
82
|
-
};
|
|
83
|
-
static getDerivedStateFromError() {
|
|
84
|
-
return {
|
|
85
|
-
didError: true
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
componentDidCatch() {
|
|
89
|
-
// send explicit `'null'`
|
|
90
|
-
const eventLabel = String(this.props.eventLabel);
|
|
91
|
-
// TODO: Use proper error monitoring service (for example Sentry) instead
|
|
92
|
-
|
|
93
|
-
window.gtag('event', 'ad', {
|
|
94
|
-
eventAction: 'crash',
|
|
95
|
-
eventLabel
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
render() {
|
|
99
|
-
const {
|
|
100
|
-
didError
|
|
101
|
-
} = this.state;
|
|
102
|
-
const {
|
|
103
|
-
children
|
|
104
|
-
} = this.props;
|
|
105
|
-
if (didError) {
|
|
106
|
-
return null;
|
|
107
|
-
}
|
|
108
|
-
return children;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
export const AD_MARGIN_TOP = 3;
|
|
112
|
-
export const AD_MARGIN_BOTTOM = 3;
|
|
113
|
-
export const AD_HEIGHT = 126;
|
|
114
|
-
// Add more height on mobile as the text tends to wrap beyond the image height.
|
|
115
|
-
export const AD_HEIGHT_MOBILE = 126 + 16;
|
|
116
|
-
|
|
117
|
-
// https://stackoverflow.com/a/20084661
|
|
118
|
-
function isBot() {
|
|
119
|
-
return /bot|googlebot|crawler|spider|robot|crawling/i.test(navigator.userAgent);
|
|
120
|
-
}
|
|
121
|
-
export function Ad() {
|
|
122
|
-
const [adblock, setAdblock] = React.useState(null);
|
|
123
|
-
const [carbonOut, setCarbonOut] = React.useState(null);
|
|
124
|
-
const {
|
|
125
|
-
current: randomAdblock
|
|
126
|
-
} = React.useRef(Math.random());
|
|
127
|
-
const {
|
|
128
|
-
current: randomInHouse
|
|
129
|
-
} = React.useRef(Math.random());
|
|
130
|
-
let children;
|
|
131
|
-
let label;
|
|
132
|
-
// Hide the content to google bot to avoid its indexation.
|
|
133
|
-
if (typeof window !== 'undefined' && isBot() || disableAd) {
|
|
134
|
-
children = _span || (_span = /*#__PURE__*/_jsx("span", {}));
|
|
135
|
-
} else if (adblock) {
|
|
136
|
-
if (randomAdblock < 0.2) {
|
|
137
|
-
children = _PleaseDisableAdblock || (_PleaseDisableAdblock = /*#__PURE__*/_jsx(PleaseDisableAdblock, {}));
|
|
138
|
-
label = 'in-house-adblock';
|
|
139
|
-
} else {
|
|
140
|
-
children = /*#__PURE__*/_jsx(AdInHouse, {
|
|
141
|
-
ad: inHouseAds[Math.floor(inHouseAds.length * randomInHouse)]
|
|
142
|
-
});
|
|
143
|
-
label = 'in-house';
|
|
144
|
-
}
|
|
145
|
-
} else if (carbonOut) {
|
|
146
|
-
children = /*#__PURE__*/_jsx(AdInHouse, {
|
|
147
|
-
ad: inHouseAds[Math.floor(inHouseAds.length * randomInHouse)]
|
|
148
|
-
});
|
|
149
|
-
label = 'in-house-carbon';
|
|
150
|
-
} else {
|
|
151
|
-
children = _AdCarbon || (_AdCarbon = /*#__PURE__*/_jsx(AdCarbon, {}));
|
|
152
|
-
label = 'carbon';
|
|
153
|
-
}
|
|
154
|
-
const ad = React.useContext(AdContext);
|
|
155
|
-
const eventLabel = label ? `${label}-${ad.placement}-${adShape}` : null;
|
|
156
|
-
const timerAdblock = React.useRef(undefined);
|
|
157
|
-
const checkAdblock = React.useCallback((attempt = 1) => {
|
|
158
|
-
if (document.querySelector('.ea-placement') || document.querySelector('#carbonads') || document.querySelector('.carbonads') || carbonOut) {
|
|
159
|
-
if (document.querySelector('#carbonads a') && document.querySelector('#carbonads a')?.getAttribute('href') === 'https://material-ui-next.com/discover-more/backers') {
|
|
160
|
-
setCarbonOut(true);
|
|
161
|
-
}
|
|
162
|
-
setAdblock(false);
|
|
163
|
-
return;
|
|
164
|
-
}
|
|
165
|
-
if (attempt < 30) {
|
|
166
|
-
timerAdblock.current = setTimeout(() => {
|
|
167
|
-
checkAdblock(attempt + 1);
|
|
168
|
-
}, 500);
|
|
169
|
-
}
|
|
170
|
-
if (attempt > 6) {
|
|
171
|
-
setAdblock(true);
|
|
172
|
-
}
|
|
173
|
-
}, [carbonOut]);
|
|
174
|
-
React.useEffect(() => {
|
|
175
|
-
if (disableAd) {
|
|
176
|
-
return undefined;
|
|
177
|
-
}
|
|
178
|
-
checkAdblock();
|
|
179
|
-
return () => {
|
|
180
|
-
clearTimeout(timerAdblock.current);
|
|
181
|
-
};
|
|
182
|
-
}, [checkAdblock]);
|
|
183
|
-
const {
|
|
184
|
-
GADisplayRatio
|
|
185
|
-
} = useAdConfig();
|
|
186
|
-
React.useEffect(() => {
|
|
187
|
-
// Avoid an exceed on the Google Analytics quotas.
|
|
188
|
-
if (Math.random() > (GADisplayRatio ?? 0.1) || !eventLabel) {
|
|
189
|
-
return undefined;
|
|
190
|
-
}
|
|
191
|
-
const delay = setTimeout(() => {
|
|
192
|
-
window.gtag('event', 'ad', {
|
|
193
|
-
eventAction: 'display',
|
|
194
|
-
eventLabel
|
|
195
|
-
});
|
|
196
|
-
}, 2500);
|
|
197
|
-
return () => {
|
|
198
|
-
clearTimeout(delay);
|
|
199
|
-
};
|
|
200
|
-
}, [GADisplayRatio, eventLabel]);
|
|
201
|
-
return /*#__PURE__*/_jsx(Box, {
|
|
202
|
-
component: "span",
|
|
203
|
-
sx: theme => ({
|
|
204
|
-
position: 'relative',
|
|
205
|
-
display: 'block',
|
|
206
|
-
mt: AD_MARGIN_TOP,
|
|
207
|
-
mb: AD_MARGIN_BOTTOM,
|
|
208
|
-
minHeight: AD_HEIGHT_MOBILE,
|
|
209
|
-
[theme.breakpoints.up('sm')]: {
|
|
210
|
-
minHeight: AD_HEIGHT
|
|
211
|
-
},
|
|
212
|
-
...(adShape === 'image' && {}),
|
|
213
|
-
...(adShape === 'inline' && {
|
|
214
|
-
display: 'flex',
|
|
215
|
-
alignItems: 'flex-end'
|
|
216
|
-
})
|
|
217
|
-
}),
|
|
218
|
-
"data-ga-event-category": "ad",
|
|
219
|
-
"data-ga-event-action": "click",
|
|
220
|
-
"data-ga-event-label": eventLabel,
|
|
221
|
-
children: /*#__PURE__*/_jsx(AdErrorBoundary, {
|
|
222
|
-
eventLabel: eventLabel,
|
|
223
|
-
children: children
|
|
224
|
-
})
|
|
225
|
-
});
|
|
226
|
-
}
|
package/Ad/AdCarbon.d.mts
DELETED