@cbnventures/docusaurus-preset-nova 0.22.5 → 0.23.0
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/build/package.json +2 -2
- package/build/src/blocks/hero/index.d.ts.map +1 -1
- package/build/src/blocks/hero/index.js +5 -3
- package/build/src/blocks/hero/index.js.map +1 -1
- package/build/src/lib/use-color-mode-observer.d.ts +3 -0
- package/build/src/lib/use-color-mode-observer.d.ts.map +1 -0
- package/build/src/lib/use-color-mode-observer.js +32 -0
- package/build/src/lib/use-color-mode-observer.js.map +1 -0
- package/build/src/lib/use-overlay-panel.d.ts +3 -0
- package/build/src/lib/use-overlay-panel.d.ts.map +1 -0
- package/build/src/lib/use-overlay-panel.js +54 -0
- package/build/src/lib/use-overlay-panel.js.map +1 -0
- package/build/src/theme/BlogSidebarMobile/index.d.ts.map +1 -1
- package/build/src/theme/BlogSidebarMobile/index.js +7 -39
- package/build/src/theme/BlogSidebarMobile/index.js.map +1 -1
- package/build/src/theme/DocSidebarMobile/panel.d.ts.map +1 -1
- package/build/src/theme/DocSidebarMobile/panel.js +7 -39
- package/build/src/theme/DocSidebarMobile/panel.js.map +1 -1
- package/build/src/theme/Mermaid/index.d.ts.map +1 -1
- package/build/src/theme/Mermaid/index.js +3 -25
- package/build/src/theme/Mermaid/index.js.map +1 -1
- package/build/src/theme/Navbar/Bridge/mobile-menu.d.ts.map +1 -1
- package/build/src/theme/Navbar/Bridge/mobile-menu.js +10 -124
- package/build/src/theme/Navbar/Bridge/mobile-menu.js.map +1 -1
- package/build/src/theme/Navbar/Canopy/mobile-menu.d.ts.map +1 -1
- package/build/src/theme/Navbar/Canopy/mobile-menu.js +10 -124
- package/build/src/theme/Navbar/Canopy/mobile-menu.js.map +1 -1
- package/build/src/theme/Navbar/Compass/mobile-menu.d.ts.map +1 -1
- package/build/src/theme/Navbar/Compass/mobile-menu.js +10 -124
- package/build/src/theme/Navbar/Compass/mobile-menu.js.map +1 -1
- package/build/src/theme/Navbar/Monolith/mobile-menu.d.ts.map +1 -1
- package/build/src/theme/Navbar/Monolith/mobile-menu.js +6 -122
- package/build/src/theme/Navbar/Monolith/mobile-menu.js.map +1 -1
- package/build/src/theme/Navbar/index.d.ts.map +1 -1
- package/build/src/theme/Navbar/index.js +1 -6
- package/build/src/theme/Navbar/index.js.map +1 -1
- package/build/src/theme/Navbar/shared/mobile-menu-base.d.ts +4 -0
- package/build/src/theme/Navbar/shared/mobile-menu-base.d.ts.map +1 -0
- package/build/src/theme/Navbar/shared/mobile-menu-base.js +138 -0
- package/build/src/theme/Navbar/shared/mobile-menu-base.js.map +1 -0
- package/build/src/theme/TOCCollapsible/panel.d.ts.map +1 -1
- package/build/src/theme/TOCCollapsible/panel.js +7 -39
- package/build/src/theme/TOCCollapsible/panel.js.map +1 -1
- package/build/src/theme/ThemedImage/index.d.ts.map +1 -1
- package/build/src/theme/ThemedImage/index.js +2 -25
- package/build/src/theme/ThemedImage/index.js.map +1 -1
- package/build/src/types/blocks/hero/index.d.ts +2 -0
- package/build/src/types/lib/use-color-mode-observer.d.ts +23 -0
- package/build/src/types/lib/use-overlay-panel.d.ts +50 -0
- package/build/src/types/theme/BlogSidebarMobile/index.d.ts +8 -26
- package/build/src/types/theme/DocSidebarMobile/panel.d.ts +6 -26
- package/build/src/types/theme/Mermaid/index.d.ts +0 -10
- package/build/src/types/theme/Navbar/Bridge/mobile-menu.d.ts +0 -70
- package/build/src/types/theme/Navbar/Canopy/mobile-menu.d.ts +0 -80
- package/build/src/types/theme/Navbar/Compass/mobile-menu.d.ts +0 -80
- package/build/src/types/theme/Navbar/Monolith/mobile-menu.d.ts +0 -80
- package/build/src/types/theme/Navbar/shared/mobile-menu-base.d.ts +128 -0
- package/build/src/types/theme/TOCCollapsible/panel.d.ts +6 -17
- package/build/src/types/theme/ThemedImage/index.d.ts +0 -10
- package/package.json +2 -2
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Link from '@docusaurus/Link';
|
|
3
|
+
import { useLocation } from '@docusaurus/router';
|
|
4
|
+
import { translate } from '@docusaurus/Translate';
|
|
5
|
+
import { Icon } from '@iconify/react/offline';
|
|
6
|
+
import { SearchProvider, SearchResults } from '@theme/SearchBar';
|
|
7
|
+
import { useCallback, useEffect, useRef, useState, } from 'react';
|
|
8
|
+
import { createPortal } from 'react-dom';
|
|
9
|
+
function MobileMenuBase(props) {
|
|
10
|
+
const variantPrefix = props['variantPrefix'];
|
|
11
|
+
const renderHeader = props['renderHeader'];
|
|
12
|
+
const isOpen = props['isOpen'];
|
|
13
|
+
const onClose = props['onClose'];
|
|
14
|
+
const items = props['items'];
|
|
15
|
+
const activeItemLabel = props['activeItemLabel'];
|
|
16
|
+
const pathname = useLocation()['pathname'];
|
|
17
|
+
const panelRef = useRef(null);
|
|
18
|
+
const isClosingState = useState(false);
|
|
19
|
+
const isClosing = isClosingState[0];
|
|
20
|
+
const setIsClosing = isClosingState[1];
|
|
21
|
+
const handleEscape = useCallback((event) => {
|
|
22
|
+
if (event.key === 'Escape') {
|
|
23
|
+
setIsClosing(true);
|
|
24
|
+
}
|
|
25
|
+
return undefined;
|
|
26
|
+
}, []);
|
|
27
|
+
const handleClickOutside = useCallback((event) => {
|
|
28
|
+
const mouseTarget = event.target;
|
|
29
|
+
if (mouseTarget === event.currentTarget) {
|
|
30
|
+
setIsClosing(true);
|
|
31
|
+
}
|
|
32
|
+
return undefined;
|
|
33
|
+
}, []);
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
if (isOpen === true) {
|
|
36
|
+
document.addEventListener('keydown', handleEscape);
|
|
37
|
+
}
|
|
38
|
+
return () => {
|
|
39
|
+
document.removeEventListener('keydown', handleEscape);
|
|
40
|
+
return undefined;
|
|
41
|
+
};
|
|
42
|
+
}, [
|
|
43
|
+
isOpen,
|
|
44
|
+
handleEscape,
|
|
45
|
+
]);
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
if (isOpen === true && panelRef['current'] !== null) {
|
|
48
|
+
const focusSelector = `.${variantPrefix}-close`;
|
|
49
|
+
const focusTarget = panelRef['current'].querySelector(focusSelector);
|
|
50
|
+
if (focusTarget !== null) {
|
|
51
|
+
focusTarget.focus();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return undefined;
|
|
55
|
+
}, [isOpen]);
|
|
56
|
+
const mobileMenuAriaLabel = translate({
|
|
57
|
+
id: 'theme.navbar.mobileMenuAriaLabel',
|
|
58
|
+
message: 'Navigation menu',
|
|
59
|
+
description: 'The ARIA label for the mobile navigation menu dialog',
|
|
60
|
+
});
|
|
61
|
+
const closeMenuAriaLabel = translate({
|
|
62
|
+
id: 'theme.navbar.closeMenuAriaLabel',
|
|
63
|
+
message: 'Close menu',
|
|
64
|
+
description: 'The ARIA label for the button that closes the mobile navigation menu',
|
|
65
|
+
});
|
|
66
|
+
if (isOpen === false) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
let overlayClassName = `${variantPrefix}-overlay ${variantPrefix}-open`;
|
|
70
|
+
if (isClosing === true) {
|
|
71
|
+
overlayClassName = `${variantPrefix}-overlay ${variantPrefix}-closing`;
|
|
72
|
+
}
|
|
73
|
+
const startClosing = () => {
|
|
74
|
+
setIsClosing(true);
|
|
75
|
+
return undefined;
|
|
76
|
+
};
|
|
77
|
+
const closeButton = (_jsx("button", { className: `${variantPrefix}-close`, type: "button", onClick: () => {
|
|
78
|
+
setIsClosing(true);
|
|
79
|
+
return undefined;
|
|
80
|
+
}, "aria-label": closeMenuAriaLabel, children: _jsx(Icon, { icon: "lucide:x", width: "20", height: "20", "aria-hidden": "true" }) }));
|
|
81
|
+
return createPortal(_jsx("div", { className: overlayClassName, onClick: handleClickOutside, role: "presentation", onAnimationEnd: (_event) => {
|
|
82
|
+
if (isClosing === true) {
|
|
83
|
+
onClose();
|
|
84
|
+
setIsClosing(false);
|
|
85
|
+
}
|
|
86
|
+
return undefined;
|
|
87
|
+
}, children: _jsx("div", { className: `${variantPrefix}-panel nova-mobile-menu-panel`, ref: panelRef, role: "dialog", "aria-modal": "true", "aria-label": mobileMenuAriaLabel, children: _jsxs(SearchProvider, { children: [renderHeader({
|
|
88
|
+
closeButton,
|
|
89
|
+
startClosing,
|
|
90
|
+
}), _jsxs("div", { className: `${variantPrefix}-body nova-mobile-menu-body`, children: [_jsx(SearchResults, {}), _jsx("div", { className: `${variantPrefix}-items nova-mobile-menu-items`, children: items.map((navItem, itemIndex) => {
|
|
91
|
+
const navItemType = navItem['type'];
|
|
92
|
+
const navItemChildren = navItem['items'];
|
|
93
|
+
const itemStyle = { '--nova-item-index': itemIndex };
|
|
94
|
+
if (navItemType === 'dropdown'
|
|
95
|
+
|| (navItemType === undefined
|
|
96
|
+
&& Array.isArray(navItemChildren) === true)) {
|
|
97
|
+
const dropdownIcon = navItem['icon'];
|
|
98
|
+
return (_jsxs("details", { className: `${variantPrefix}-dropdown`, style: itemStyle, children: [_jsxs("summary", { className: `${variantPrefix}-dropdown-summary`, children: [_jsx(Icon, { icon: dropdownIcon ?? 'lucide:chevron-down', width: "18", height: "18", "aria-hidden": "true" }), _jsx("span", { children: navItem['label'] })] }), _jsx("div", { className: `${variantPrefix}-dropdown-children`, children: (navItemChildren ?? []).map((childItem) => {
|
|
99
|
+
const childIcon = childItem['icon'];
|
|
100
|
+
const childLinkProps = {};
|
|
101
|
+
const childTo = childItem['to'];
|
|
102
|
+
const childIsActive = (typeof childTo === 'string' && pathname.startsWith(childTo) === true);
|
|
103
|
+
if (childTo !== undefined) {
|
|
104
|
+
Reflect.set(childLinkProps, 'to', childTo);
|
|
105
|
+
}
|
|
106
|
+
if (childItem['href'] !== undefined) {
|
|
107
|
+
Reflect.set(childLinkProps, 'href', childItem['href']);
|
|
108
|
+
}
|
|
109
|
+
if (childIsActive === true) {
|
|
110
|
+
Reflect.set(childLinkProps, 'aria-current', 'page');
|
|
111
|
+
}
|
|
112
|
+
return (_jsxs(Link, { className: `${variantPrefix}-item`, ...childLinkProps, onClick: () => {
|
|
113
|
+
setIsClosing(true);
|
|
114
|
+
return undefined;
|
|
115
|
+
}, children: [_jsx(Icon, { icon: childIcon ?? 'lucide:link', width: "18", height: "18", "aria-hidden": "true" }), _jsx("span", { children: childItem['label'] })] }, childItem['label']));
|
|
116
|
+
}) })] }, navItem['label']));
|
|
117
|
+
}
|
|
118
|
+
const itemIcon = navItem['icon'];
|
|
119
|
+
const defaultIcon = 'lucide:link';
|
|
120
|
+
const linkProps = {};
|
|
121
|
+
const isActive = navItem['label'] === activeItemLabel;
|
|
122
|
+
if (navItem['to'] !== undefined) {
|
|
123
|
+
Reflect.set(linkProps, 'to', navItem['to']);
|
|
124
|
+
}
|
|
125
|
+
if (navItem['href'] !== undefined) {
|
|
126
|
+
Reflect.set(linkProps, 'href', navItem['href']);
|
|
127
|
+
}
|
|
128
|
+
if (isActive === true) {
|
|
129
|
+
Reflect.set(linkProps, 'aria-current', 'page');
|
|
130
|
+
}
|
|
131
|
+
return (_jsxs(Link, { className: `${variantPrefix}-item`, style: itemStyle, ...linkProps, onClick: () => {
|
|
132
|
+
setIsClosing(true);
|
|
133
|
+
return undefined;
|
|
134
|
+
}, children: [_jsx(Icon, { icon: itemIcon ?? defaultIcon, width: "18", height: "18", "aria-hidden": "true" }), _jsx("span", { children: navItem['label'] })] }, navItem['label']));
|
|
135
|
+
}) })] })] }) }) }), document.body);
|
|
136
|
+
}
|
|
137
|
+
export default MobileMenuBase;
|
|
138
|
+
//# sourceMappingURL=mobile-menu-base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mobile-menu-base.js","sourceRoot":"","sources":["../../../../../src/theme/Navbar/shared/mobile-menu-base.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,kBAAkB,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;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AAI,CAAC,CAAC,CAAC;oCAC9C,CAAC;oCAED,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,SAAS,EAAE,CAAC;wCAClC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;oCAClD,CAAC;oCAED,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;wCACtB,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,cAAc,EAAE,MAAM,CAAC,CAAC;oCACjD,CAAC;oCAED,OAAO,CACL,MAAC,IAAI,IACH,SAAS,EAAE,GAAG,aAAa,OAAO,EAElC,KAAK,EAAE,SAAS,KACX,SAA0E,EAC/E,OAAO,EAAE,GAAG,EAAE;4CACZ,YAAY,CAAC,IAAI,CAAC,CAAC;4CAEnB,OAAO,SAAS,CAAC;wCACnB,CAAC,aAED,KAAC,IAAI,IAAC,IAAI,EAAE,QAAQ,IAAI,WAAW,EAAE,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,iBAAa,MAAM,GAAG,EACjF,yBAAO,OAAO,CAAC,OAAO,CAAC,GAAQ,KAV1B,OAAO,CAAC,OAAO,CAAC,CAWhB,CACR,CAAC;gCACJ,CAAC,CAAC,GAEA,IACF,IACS,GACb,GACF,EACN,QAAQ,CAAC,IAAI,CACd,CAAC;AACJ,CAAC;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../../src/theme/TOCCollapsible/panel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../../src/theme/TOCCollapsible/panel.tsx"],"names":[],"mappings":"AAuEA,iBAAS,mBAAmB,uCAmF3B;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { translate } from '@docusaurus/Translate';
|
|
3
3
|
import { Icon } from '@iconify/react/offline';
|
|
4
|
-
import {
|
|
4
|
+
import { useSyncExternalStore } from 'react';
|
|
5
5
|
import { createPortal } from 'react-dom';
|
|
6
6
|
import { tocCollapsibleGetOpenSnapshot, tocCollapsibleGetPayloadSnapshot, tocCollapsibleSetOpen, tocCollapsibleSubscribe, } from '../../lib/toc-collapsible-store.js';
|
|
7
|
+
import { useOverlayPanel } from '../../lib/use-overlay-panel.js';
|
|
7
8
|
function TocList(items) {
|
|
8
9
|
if (items === undefined || items['length'] === 0) {
|
|
9
10
|
return undefined;
|
|
@@ -13,44 +14,11 @@ function TocList(items) {
|
|
|
13
14
|
function TOCCollapsiblePanel() {
|
|
14
15
|
const isOpen = useSyncExternalStore(tocCollapsibleSubscribe, tocCollapsibleGetOpenSnapshot, tocCollapsibleGetOpenSnapshot);
|
|
15
16
|
const payload = useSyncExternalStore(tocCollapsibleSubscribe, tocCollapsibleGetPayloadSnapshot, tocCollapsibleGetPayloadSnapshot);
|
|
16
|
-
const
|
|
17
|
-
const isClosing =
|
|
18
|
-
const setIsClosing =
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
if (event.key === 'Escape') {
|
|
22
|
-
setIsClosing(true);
|
|
23
|
-
}
|
|
24
|
-
return undefined;
|
|
25
|
-
}, []);
|
|
26
|
-
const handleClickOutside = useCallback((event) => {
|
|
27
|
-
const mouseTarget = event.target;
|
|
28
|
-
if (mouseTarget === event.currentTarget) {
|
|
29
|
-
setIsClosing(true);
|
|
30
|
-
}
|
|
31
|
-
return undefined;
|
|
32
|
-
}, []);
|
|
33
|
-
useEffect(() => {
|
|
34
|
-
if (isOpen === true) {
|
|
35
|
-
document.addEventListener('keydown', handleEscape);
|
|
36
|
-
}
|
|
37
|
-
return () => {
|
|
38
|
-
document.removeEventListener('keydown', handleEscape);
|
|
39
|
-
return undefined;
|
|
40
|
-
};
|
|
41
|
-
}, [
|
|
42
|
-
isOpen,
|
|
43
|
-
handleEscape,
|
|
44
|
-
]);
|
|
45
|
-
useEffect(() => {
|
|
46
|
-
if (isOpen === true && panelRef['current'] !== null) {
|
|
47
|
-
const focusTarget = panelRef['current'].querySelector('.nova-toc-collapsible-close');
|
|
48
|
-
if (focusTarget !== null) {
|
|
49
|
-
focusTarget.focus();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return undefined;
|
|
53
|
-
}, [isOpen]);
|
|
17
|
+
const overlayPanel = useOverlayPanel(isOpen, '.nova-toc-collapsible-close');
|
|
18
|
+
const isClosing = overlayPanel['isClosing'];
|
|
19
|
+
const setIsClosing = overlayPanel['setIsClosing'];
|
|
20
|
+
const handleClickOutside = overlayPanel['handleClickOutside'];
|
|
21
|
+
const panelRef = overlayPanel['panelRef'];
|
|
54
22
|
if (isOpen !== true
|
|
55
23
|
|| payload === undefined
|
|
56
24
|
|| payload['treeItems']['length'] === 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel.js","sourceRoot":"","sources":["../../../../src/theme/TOCCollapsible/panel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,
|
|
1
|
+
{"version":3,"file":"panel.js","sourceRoot":"","sources":["../../../../src/theme/TOCCollapsible/panel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EACL,6BAA6B,EAC7B,gCAAgC,EAChC,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,gCA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,YAE1B,KAAC,IAAI,IAAC,IAAI,EAAC,UAAU,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,iBAAa,MAAM,GAAG,GAC3D,IACL,EACN,cAAK,SAAS,EAAC,8BAA8B,YAC1C,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,GAC1B,IACF,GACF,EACN,QAAQ,CAAC,IAAI,CACd,CAAC;AACJ,CAAC;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/theme/ThemedImage/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/theme/ThemedImage/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,yCAAyC,EACzC,2CAA2C,EAE5C,MAAM,0CAA0C,CAAC;AAalD,iBAAS,WAAW,CAAC,KAAK,EAAE,yCAAyC,GAAG,2CAA2C,CAelH;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -1,30 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useColorModeObserver } from '../../lib/use-color-mode-observer.js';
|
|
3
3
|
function ThemedImage(props) {
|
|
4
|
-
const
|
|
5
|
-
const colorMode = colorModeState[0];
|
|
6
|
-
const setColorMode = colorModeState[1];
|
|
7
|
-
useEffect(() => {
|
|
8
|
-
const currentTheme = document.documentElement.getAttribute('data-theme');
|
|
9
|
-
if (currentTheme !== null) {
|
|
10
|
-
setColorMode(currentTheme);
|
|
11
|
-
}
|
|
12
|
-
const observer = new MutationObserver(() => {
|
|
13
|
-
const theme = document.documentElement.getAttribute('data-theme');
|
|
14
|
-
if (theme !== null) {
|
|
15
|
-
setColorMode(theme);
|
|
16
|
-
}
|
|
17
|
-
return undefined;
|
|
18
|
-
});
|
|
19
|
-
observer.observe(document.documentElement, {
|
|
20
|
-
attributes: true,
|
|
21
|
-
attributeFilter: ['data-theme'],
|
|
22
|
-
});
|
|
23
|
-
return () => {
|
|
24
|
-
observer.disconnect();
|
|
25
|
-
return undefined;
|
|
26
|
-
};
|
|
27
|
-
}, []);
|
|
4
|
+
const colorMode = useColorModeObserver();
|
|
28
5
|
const src = (colorMode === 'dark') ? props['sources']['dark'] : props['sources']['light'];
|
|
29
6
|
return (_jsx("img", { className: (props['className'] !== undefined) ? `nova-themed-image ${props['className']}` : 'nova-themed-image', style: props['style'], src: src, alt: props['alt'], width: props['width'], height: props['height'] }));
|
|
30
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/theme/ThemedImage/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/theme/ThemedImage/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAoB5E,SAAS,WAAW,CAAC,KAAgD;IACnE,MAAM,SAAS,GAAkD,oBAAoB,EAAE,CAAC;IAExF,MAAM,GAAG,GAA4C,CAAC,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC;IAEnI,OAAO,CACL,cACE,SAAS,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,qBAAqB,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC,mBAAmB,EAC/G,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,EACrB,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,EACjB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,EACrB,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,GACvB,CACH,CAAC;AACJ,CAAC;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lib - Use Color Mode Observer.
|
|
3
|
+
*
|
|
4
|
+
* @since 0.23.0
|
|
5
|
+
*/
|
|
6
|
+
export type Lib_UseColorModeObserver_Returns = string;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Lib - Use Color Mode Observer - Use Color Mode Observer.
|
|
10
|
+
*
|
|
11
|
+
* @since 0.23.0
|
|
12
|
+
*/
|
|
13
|
+
export type Lib_UseColorModeObserver_UseColorModeObserver_ColorModeState = [Lib_UseColorModeObserver_UseColorModeObserver_ColorMode, Lib_UseColorModeObserver_UseColorModeObserver_SetColorMode];
|
|
14
|
+
|
|
15
|
+
export type Lib_UseColorModeObserver_UseColorModeObserver_ColorMode = string;
|
|
16
|
+
|
|
17
|
+
export type Lib_UseColorModeObserver_UseColorModeObserver_SetColorMode = React.Dispatch<React.SetStateAction<Lib_UseColorModeObserver_UseColorModeObserver_ColorMode>>;
|
|
18
|
+
|
|
19
|
+
export type Lib_UseColorModeObserver_UseColorModeObserver_CurrentTheme = string | null;
|
|
20
|
+
|
|
21
|
+
export type Lib_UseColorModeObserver_UseColorModeObserver_Observer = MutationObserver;
|
|
22
|
+
|
|
23
|
+
export type Lib_UseColorModeObserver_UseColorModeObserver_Theme = string | null;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { MouseEvent, RefObject } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Lib - Use Overlay Panel.
|
|
5
|
+
*
|
|
6
|
+
* @since 0.23.0
|
|
7
|
+
*/
|
|
8
|
+
export type Lib_UseOverlayPanel_IsOpen = boolean;
|
|
9
|
+
|
|
10
|
+
export type Lib_UseOverlayPanel_FocusSelector = string;
|
|
11
|
+
|
|
12
|
+
export type Lib_UseOverlayPanel_Returns_IsClosing = boolean;
|
|
13
|
+
|
|
14
|
+
export type Lib_UseOverlayPanel_Returns_SetIsClosing = React.Dispatch<React.SetStateAction<boolean>>;
|
|
15
|
+
|
|
16
|
+
export type Lib_UseOverlayPanel_Returns_HandleClickOutside = (event: MouseEvent<HTMLDivElement>) => undefined;
|
|
17
|
+
|
|
18
|
+
export type Lib_UseOverlayPanel_Returns_PanelRef = RefObject<HTMLDivElement | null>;
|
|
19
|
+
|
|
20
|
+
export type Lib_UseOverlayPanel_Returns = {
|
|
21
|
+
isClosing: Lib_UseOverlayPanel_Returns_IsClosing;
|
|
22
|
+
setIsClosing: Lib_UseOverlayPanel_Returns_SetIsClosing;
|
|
23
|
+
handleClickOutside: Lib_UseOverlayPanel_Returns_HandleClickOutside;
|
|
24
|
+
panelRef: Lib_UseOverlayPanel_Returns_PanelRef;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Lib - Use Overlay Panel - Use Overlay Panel.
|
|
29
|
+
*
|
|
30
|
+
* @since 0.23.0
|
|
31
|
+
*/
|
|
32
|
+
export type Lib_UseOverlayPanel_UseOverlayPanel_IsClosingState = [Lib_UseOverlayPanel_UseOverlayPanel_IsClosing, Lib_UseOverlayPanel_UseOverlayPanel_SetIsClosing];
|
|
33
|
+
|
|
34
|
+
export type Lib_UseOverlayPanel_UseOverlayPanel_IsClosing = boolean;
|
|
35
|
+
|
|
36
|
+
export type Lib_UseOverlayPanel_UseOverlayPanel_SetIsClosing = React.Dispatch<React.SetStateAction<boolean>>;
|
|
37
|
+
|
|
38
|
+
export type Lib_UseOverlayPanel_UseOverlayPanel_PanelRef = RefObject<HTMLDivElement | null>;
|
|
39
|
+
|
|
40
|
+
export type Lib_UseOverlayPanel_UseOverlayPanel_HandleEscape = (event: Lib_UseOverlayPanel_UseOverlayPanel_HandleEscapeKeyboardEvent) => undefined;
|
|
41
|
+
|
|
42
|
+
export type Lib_UseOverlayPanel_UseOverlayPanel_HandleEscapeKeyboardEvent = KeyboardEvent;
|
|
43
|
+
|
|
44
|
+
export type Lib_UseOverlayPanel_UseOverlayPanel_HandleClickOutside = (event: Lib_UseOverlayPanel_UseOverlayPanel_HandleClickOutsideMouseEvent) => undefined;
|
|
45
|
+
|
|
46
|
+
export type Lib_UseOverlayPanel_UseOverlayPanel_HandleClickOutsideMouseEvent = MouseEvent<HTMLDivElement>;
|
|
47
|
+
|
|
48
|
+
export type Lib_UseOverlayPanel_UseOverlayPanel_MouseTarget = EventTarget;
|
|
49
|
+
|
|
50
|
+
export type Lib_UseOverlayPanel_UseOverlayPanel_FocusTarget = HTMLButtonElement | null;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { BlogSidebar } from '@docusaurus/plugin-content-blog';
|
|
2
|
-
import type { CSSProperties
|
|
2
|
+
import type { CSSProperties } from 'react';
|
|
3
|
+
|
|
4
|
+
import type { Lib_UseOverlayPanel_Returns } from '../../lib/use-overlay-panel.d.ts';
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* Theme - Blog Sidebar Mobile - Blog Sidebar Mobile.
|
|
@@ -27,35 +29,15 @@ export type Theme_BlogSidebarMobile_Index_BlogSidebarMobile_IsOpen = boolean;
|
|
|
27
29
|
|
|
28
30
|
export type Theme_BlogSidebarMobile_Index_BlogSidebarMobile_SetIsOpen = React.Dispatch<React.SetStateAction<boolean>>;
|
|
29
31
|
|
|
30
|
-
export type
|
|
31
|
-
|
|
32
|
-
export type Theme_BlogSidebarMobile_Index_BlogSidebarMobile_IsClosing = boolean;
|
|
33
|
-
|
|
34
|
-
export type Theme_BlogSidebarMobile_Index_BlogSidebarMobile_SetIsClosing = React.Dispatch<React.SetStateAction<boolean>>;
|
|
35
|
-
|
|
36
|
-
export type Theme_BlogSidebarMobile_Index_BlogSidebarMobile_PanelRef = RefObject<HTMLDivElement | null>;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Theme - Blog Sidebar Mobile - Blog Sidebar Mobile - Handle Escape.
|
|
40
|
-
*
|
|
41
|
-
* @since 0.15.0
|
|
42
|
-
*/
|
|
43
|
-
export type Theme_BlogSidebarMobile_Index_BlogSidebarMobile_HandleEscapeFunction = (event: Theme_BlogSidebarMobile_Index_BlogSidebarMobile_HandleEscapeKeyboardEvent) => void;
|
|
44
|
-
|
|
45
|
-
export type Theme_BlogSidebarMobile_Index_BlogSidebarMobile_HandleEscapeKeyboardEvent = KeyboardEvent;
|
|
32
|
+
export type Theme_BlogSidebarMobile_Index_BlogSidebarMobile_OverlayPanel = Lib_UseOverlayPanel_Returns;
|
|
46
33
|
|
|
47
|
-
|
|
48
|
-
* Theme - Blog Sidebar Mobile - Blog Sidebar Mobile - Handle Click Outside.
|
|
49
|
-
*
|
|
50
|
-
* @since 0.15.0
|
|
51
|
-
*/
|
|
52
|
-
export type Theme_BlogSidebarMobile_Index_BlogSidebarMobile_HandleClickOutsideFunction = (event: Theme_BlogSidebarMobile_Index_BlogSidebarMobile_HandleClickOutsideMouseEvent) => void;
|
|
34
|
+
export type Theme_BlogSidebarMobile_Index_BlogSidebarMobile_IsClosing = Lib_UseOverlayPanel_Returns['isClosing'];
|
|
53
35
|
|
|
54
|
-
export type
|
|
36
|
+
export type Theme_BlogSidebarMobile_Index_BlogSidebarMobile_SetIsClosing = Lib_UseOverlayPanel_Returns['setIsClosing'];
|
|
55
37
|
|
|
56
|
-
export type
|
|
38
|
+
export type Theme_BlogSidebarMobile_Index_BlogSidebarMobile_HandleClickOutsideFunction = Lib_UseOverlayPanel_Returns['handleClickOutside'];
|
|
57
39
|
|
|
58
|
-
export type
|
|
40
|
+
export type Theme_BlogSidebarMobile_Index_BlogSidebarMobile_PanelRef = Lib_UseOverlayPanel_Returns['panelRef'];
|
|
59
41
|
|
|
60
42
|
export type Theme_BlogSidebarMobile_Index_BlogSidebarMobile_TriggerLabel = string;
|
|
61
43
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Lib_UseOverlayPanel_Returns } from '../../lib/use-overlay-panel.d.ts';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Theme - Doc Sidebar Mobile - Panel - Doc Sidebar Mobile Panel.
|
|
@@ -11,35 +11,15 @@ export type Theme_DocSidebarMobile_Panel_DocSidebarMobilePanel_Pathname = string
|
|
|
11
11
|
|
|
12
12
|
export type Theme_DocSidebarMobile_Panel_DocSidebarMobilePanel_IsOpen = boolean;
|
|
13
13
|
|
|
14
|
-
export type
|
|
14
|
+
export type Theme_DocSidebarMobile_Panel_DocSidebarMobilePanel_OverlayPanel = Lib_UseOverlayPanel_Returns;
|
|
15
15
|
|
|
16
|
-
export type Theme_DocSidebarMobile_Panel_DocSidebarMobilePanel_IsClosing =
|
|
16
|
+
export type Theme_DocSidebarMobile_Panel_DocSidebarMobilePanel_IsClosing = Lib_UseOverlayPanel_Returns['isClosing'];
|
|
17
17
|
|
|
18
|
-
export type Theme_DocSidebarMobile_Panel_DocSidebarMobilePanel_SetIsClosing =
|
|
18
|
+
export type Theme_DocSidebarMobile_Panel_DocSidebarMobilePanel_SetIsClosing = Lib_UseOverlayPanel_Returns['setIsClosing'];
|
|
19
19
|
|
|
20
|
-
export type
|
|
20
|
+
export type Theme_DocSidebarMobile_Panel_DocSidebarMobilePanel_HandleClickOutsideFunction = Lib_UseOverlayPanel_Returns['handleClickOutside'];
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
* Theme - Doc Sidebar Mobile - Panel - Doc Sidebar Mobile Panel - Handle Escape.
|
|
24
|
-
*
|
|
25
|
-
* @since 0.21.0
|
|
26
|
-
*/
|
|
27
|
-
export type Theme_DocSidebarMobile_Panel_DocSidebarMobilePanel_HandleEscapeFunction = (event: Theme_DocSidebarMobile_Panel_DocSidebarMobilePanel_HandleEscapeKeyboardEvent) => void;
|
|
28
|
-
|
|
29
|
-
export type Theme_DocSidebarMobile_Panel_DocSidebarMobilePanel_HandleEscapeKeyboardEvent = KeyboardEvent;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Theme - Doc Sidebar Mobile - Panel - Doc Sidebar Mobile Panel - Handle Click Outside.
|
|
33
|
-
*
|
|
34
|
-
* @since 0.21.0
|
|
35
|
-
*/
|
|
36
|
-
export type Theme_DocSidebarMobile_Panel_DocSidebarMobilePanel_HandleClickOutsideFunction = (event: Theme_DocSidebarMobile_Panel_DocSidebarMobilePanel_HandleClickOutsideMouseEvent) => void;
|
|
37
|
-
|
|
38
|
-
export type Theme_DocSidebarMobile_Panel_DocSidebarMobilePanel_HandleClickOutsideMouseEvent = MouseEvent<HTMLDivElement>;
|
|
39
|
-
|
|
40
|
-
export type Theme_DocSidebarMobile_Panel_DocSidebarMobilePanel_HandleClickOutsideMouseTarget = EventTarget;
|
|
41
|
-
|
|
42
|
-
export type Theme_DocSidebarMobile_Panel_DocSidebarMobilePanel_FocusTarget = HTMLButtonElement | null;
|
|
22
|
+
export type Theme_DocSidebarMobile_Panel_DocSidebarMobilePanel_PanelRef = Lib_UseOverlayPanel_Returns['panelRef'];
|
|
43
23
|
|
|
44
24
|
export type Theme_DocSidebarMobile_Panel_DocSidebarMobilePanel_PanelAriaLabel = string;
|
|
45
25
|
|
|
@@ -22,18 +22,8 @@ export type Theme_Mermaid_Index_Mermaid_Props = {
|
|
|
22
22
|
|
|
23
23
|
export type Theme_Mermaid_Index_Mermaid_Returns = React.JSX.Element;
|
|
24
24
|
|
|
25
|
-
export type Theme_Mermaid_Index_Mermaid_ColorModeState = [Theme_Mermaid_Index_Mermaid_ColorMode, Theme_Mermaid_Index_Mermaid_SetColorMode];
|
|
26
|
-
|
|
27
25
|
export type Theme_Mermaid_Index_Mermaid_ColorMode = string;
|
|
28
26
|
|
|
29
|
-
export type Theme_Mermaid_Index_Mermaid_SetColorMode = React.Dispatch<React.SetStateAction<Theme_Mermaid_Index_Mermaid_ColorMode>>;
|
|
30
|
-
|
|
31
|
-
export type Theme_Mermaid_Index_Mermaid_CurrentTheme = string | null;
|
|
32
|
-
|
|
33
|
-
export type Theme_Mermaid_Index_Mermaid_Observer = MutationObserver;
|
|
34
|
-
|
|
35
|
-
export type Theme_Mermaid_Index_Mermaid_Theme = string | null;
|
|
36
|
-
|
|
37
27
|
/**
|
|
38
28
|
* Theme - Mermaid - Content.
|
|
39
29
|
*
|
|
@@ -68,12 +68,6 @@ export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_Props = {
|
|
|
68
68
|
|
|
69
69
|
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_Returns = React.JSX.Element | null;
|
|
70
70
|
|
|
71
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_IsOpen = boolean;
|
|
72
|
-
|
|
73
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_OnClose = () => void;
|
|
74
|
-
|
|
75
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_Items = Theme_Navbar_Index_Navbar_Item[];
|
|
76
|
-
|
|
77
71
|
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_SiteLogo_Alt = string;
|
|
78
72
|
|
|
79
73
|
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_SiteLogo_Src_Value_Light = string | undefined;
|
|
@@ -118,67 +112,3 @@ export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_SiteLogo = {
|
|
|
118
112
|
rel: Theme_Navbar_Bridge_MobileMenu_MobileMenu_SiteLogo_Rel;
|
|
119
113
|
ariaLabel: Theme_Navbar_Bridge_MobileMenu_MobileMenu_SiteLogo_AriaLabel;
|
|
120
114
|
};
|
|
121
|
-
|
|
122
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_ActiveItemLabel = string | null;
|
|
123
|
-
|
|
124
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_Pathname = string;
|
|
125
|
-
|
|
126
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_PanelRef = React.RefObject<HTMLDivElement | null>;
|
|
127
|
-
|
|
128
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_IsClosing = boolean;
|
|
129
|
-
|
|
130
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_IsClosingState = [Theme_Navbar_Bridge_MobileMenu_MobileMenu_IsClosing, Theme_Navbar_Bridge_MobileMenu_MobileMenu_SetIsClosing];
|
|
131
|
-
|
|
132
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_SetIsClosing = React.Dispatch<React.SetStateAction<Theme_Navbar_Bridge_MobileMenu_MobileMenu_IsClosing>>;
|
|
133
|
-
|
|
134
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_HandleEscapeFunction = (event: Theme_Navbar_Bridge_MobileMenu_MobileMenu_HandleEscapeKeyboardEvent) => void;
|
|
135
|
-
|
|
136
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_HandleEscapeKeyboardEvent = KeyboardEvent;
|
|
137
|
-
|
|
138
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_HandleClickOutsideFunction = (event: Theme_Navbar_Bridge_MobileMenu_MobileMenu_HandleClickOutsideMouseEvent) => void;
|
|
139
|
-
|
|
140
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_HandleClickOutsideMouseEvent = React.MouseEvent<HTMLDivElement>;
|
|
141
|
-
|
|
142
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_HandleClickOutsideMouseTarget = EventTarget | null;
|
|
143
|
-
|
|
144
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_FocusTarget = HTMLButtonElement | null;
|
|
145
|
-
|
|
146
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_AriaLabel = string;
|
|
147
|
-
|
|
148
|
-
export type Theme_Navbar_Bridge_MobileMenu_CloseMenuAriaLabel = string;
|
|
149
|
-
|
|
150
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_OverlayClassName = string;
|
|
151
|
-
|
|
152
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_AnimationEvent = React.AnimationEvent<HTMLDivElement>;
|
|
153
|
-
|
|
154
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_ItemIndex = number;
|
|
155
|
-
|
|
156
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_NavItemType = string | undefined;
|
|
157
|
-
|
|
158
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_NavItemChildren = Record<string, unknown>[] | undefined;
|
|
159
|
-
|
|
160
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_ItemStyle = React.CSSProperties;
|
|
161
|
-
|
|
162
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_ItemIcon = string | undefined;
|
|
163
|
-
|
|
164
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_ChildItem = Record<string, unknown>;
|
|
165
|
-
|
|
166
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_LinkProps = Record<string, string>;
|
|
167
|
-
|
|
168
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_ChildTo = string | undefined;
|
|
169
|
-
|
|
170
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_ChildIsActive = boolean;
|
|
171
|
-
|
|
172
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_ChildKey = string;
|
|
173
|
-
|
|
174
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_LinkSpread = Record<string, string>;
|
|
175
|
-
|
|
176
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_ChildLabel = string;
|
|
177
|
-
|
|
178
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_DefaultIcon = string;
|
|
179
|
-
|
|
180
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_ItemTo = string;
|
|
181
|
-
|
|
182
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_ItemHref = string;
|
|
183
|
-
|
|
184
|
-
export type Theme_Navbar_Bridge_MobileMenu_MobileMenu_ItemIsActive = boolean;
|