@redocly/theme 0.44.4 → 0.44.5
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/lib/components/VersionPicker/VersionPicker.js +1 -2
- package/lib/core/hooks/use-codeblock-tabs-controls.js +0 -1
- package/lib/core/utils/args-typecheck.js +0 -2
- package/package.json +1 -3
- package/src/components/VersionPicker/VersionPicker.tsx +1 -1
- package/src/core/hooks/use-codeblock-tabs-controls.ts +0 -1
- package/src/core/utils/args-typecheck.ts +0 -2
|
@@ -34,7 +34,6 @@ const hooks_1 = require("../../core/hooks");
|
|
|
34
34
|
const Select_1 = require("../../components/Select/Select");
|
|
35
35
|
const SelectInput_1 = require("../../components/Select/SelectInput");
|
|
36
36
|
function VersionPicker(props) {
|
|
37
|
-
var _a;
|
|
38
37
|
const themeConfig = (0, hooks_1.useThemeConfig)();
|
|
39
38
|
const { versionPicker } = themeConfig;
|
|
40
39
|
const { useTranslate } = (0, hooks_1.useThemeHooks)();
|
|
@@ -45,7 +44,7 @@ function VersionPicker(props) {
|
|
|
45
44
|
value: version,
|
|
46
45
|
active: active,
|
|
47
46
|
}));
|
|
48
|
-
const value =
|
|
47
|
+
const value = options.find((item) => item.active);
|
|
49
48
|
if (versionPicker === null || versionPicker === void 0 ? void 0 : versionPicker.hide) {
|
|
50
49
|
return null;
|
|
51
50
|
}
|
|
@@ -20,7 +20,6 @@ function useCodeBlockTabsControls({ tabs, containerRef, tabRefs }) {
|
|
|
20
20
|
isFirstTab: currentIndex === 0,
|
|
21
21
|
isLastTab: currentIndex === tabs.files.length - 1,
|
|
22
22
|
};
|
|
23
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
24
23
|
}, [tabs]);
|
|
25
24
|
(0, react_1.useEffect)(() => {
|
|
26
25
|
if (containerRef.current) {
|
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isEmptyArray = isEmptyArray;
|
|
4
4
|
exports.isPrimitive = isPrimitive;
|
|
5
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
6
5
|
function isEmptyArray(items) {
|
|
7
6
|
return Array.isArray(items) && !(items === null || items === void 0 ? void 0 : items.length);
|
|
8
7
|
}
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
10
8
|
function isPrimitive(arg) {
|
|
11
9
|
return ['string', 'boolean', 'number', 'undefined'].includes(typeof arg);
|
|
12
10
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/theme",
|
|
3
|
-
"version": "0.44.
|
|
3
|
+
"version": "0.44.5",
|
|
4
4
|
"description": "Shared UI components lib",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"theme",
|
|
@@ -62,8 +62,6 @@
|
|
|
62
62
|
"@types/styled-components": "5.1.34",
|
|
63
63
|
"@types/styled-system": "5.1.22",
|
|
64
64
|
"@types/nprogress": "0.2.3",
|
|
65
|
-
"@typescript-eslint/eslint-plugin": "8.6.0",
|
|
66
|
-
"@typescript-eslint/parser": "8.6.0",
|
|
67
65
|
"chromatic": "6.17.2",
|
|
68
66
|
"concurrently": "7.6.0",
|
|
69
67
|
"jest": "29.5.0",
|
|
@@ -21,7 +21,7 @@ export function VersionPicker(props: { versions?: Version[]; onChange: (v: Versi
|
|
|
21
21
|
value: version,
|
|
22
22
|
active: active,
|
|
23
23
|
}));
|
|
24
|
-
const value = options.find((item) => item.active)
|
|
24
|
+
const value = options.find((item) => item.active);
|
|
25
25
|
|
|
26
26
|
if (versionPicker?.hide) {
|
|
27
27
|
return null;
|
|
@@ -27,7 +27,6 @@ export function useCodeBlockTabsControls({ tabs, containerRef, tabRefs }: CodeBl
|
|
|
27
27
|
isFirstTab: currentIndex === 0,
|
|
28
28
|
isLastTab: currentIndex === tabs.files.length - 1,
|
|
29
29
|
};
|
|
30
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
31
30
|
}, [tabs]);
|
|
32
31
|
|
|
33
32
|
useEffect(() => {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
2
1
|
export function isEmptyArray(items: any): boolean {
|
|
3
2
|
return Array.isArray(items) && !items?.length;
|
|
4
3
|
}
|
|
5
4
|
|
|
6
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
7
5
|
export function isPrimitive(arg: any): boolean {
|
|
8
6
|
return ['string', 'boolean', 'number', 'undefined'].includes(typeof arg);
|
|
9
7
|
}
|