@cbnventures/docusaurus-preset-nova 0.22.6 → 0.24.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/blog-preview/index.d.ts.map +1 -1
- package/build/src/blocks/blog-preview/index.js +2 -0
- package/build/src/blocks/blog-preview/index.js.map +1 -1
- package/build/src/blocks/canvas/index.d.ts +4 -0
- package/build/src/blocks/canvas/index.d.ts.map +1 -0
- package/build/src/blocks/canvas/index.js +9 -0
- package/build/src/blocks/canvas/index.js.map +1 -0
- 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/blocks/index.d.ts +1 -0
- package/build/src/blocks/index.d.ts.map +1 -1
- package/build/src/blocks/index.js +1 -0
- package/build/src/blocks/index.js.map +1 -1
- package/build/src/blocks/install-strip/index.d.ts.map +1 -1
- package/build/src/blocks/install-strip/index.js +8 -0
- package/build/src/blocks/install-strip/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/styles/blocks/canvas/style.css +3 -0
- package/build/src/styles/presets/envoy/blocks/canvas/style.css +0 -0
- package/build/src/styles/presets/envoy/theme/Navbar/Bridge/style.css +2 -0
- package/build/src/styles/presets/foundry/blocks/canvas/style.css +0 -0
- package/build/src/styles/presets/lantern/blocks/canvas/style.css +0 -0
- package/build/src/styles/presets/marshal/blocks/canvas/style.css +0 -0
- package/build/src/styles/presets/sample/blocks/canvas/style.css +0 -0
- package/build/src/styles/presets/sentinel/blocks/canvas/style.css +0 -0
- package/build/src/styles/presets/sentinel/theme/Navbar/Bridge/style.css +2 -0
- package/build/src/styles/presets/sentinel/theme/Navbar/Canopy/style.css +2 -0
- package/build/src/styles/presets/sentinel/theme/Navbar/Compass/style.css +2 -0
- package/build/src/styles/presets/sentinel/theme/Navbar/Monolith/style.css +2 -0
- package/build/src/styles/presets/signal/blocks/canvas/style.css +0 -0
- package/build/src/styles/presets/signal/theme/Navbar/Bridge/style.css +2 -0
- package/build/src/styles/theme/Navbar/Bridge/style.css +26 -1
- package/build/src/styles/theme/Navbar/Canopy/style.css +29 -0
- package/build/src/styles/theme/Navbar/Compass/style.css +26 -0
- package/build/src/styles/theme/Navbar/Monolith/style.css +15 -1
- package/build/src/styles/theme/NavbarItem/style.css +3 -0
- package/build/src/theme/BlogPostItem/index.d.ts.map +1 -1
- package/build/src/theme/BlogPostItem/index.js +1 -0
- package/build/src/theme/BlogPostItem/index.js.map +1 -1
- 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/canvas/index.d.ts +28 -0
- package/build/src/types/blocks/hero/index.d.ts +2 -0
- package/build/src/types/blocks/install-strip/index.d.ts +1 -1
- package/build/src/types/blocks/stats/index.d.ts +1 -1
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/theme/BlogPostItem/index.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,kBAAkB,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,oBAAoB,MAAM,kCAAkC,CAAC;AACpE,OAAO,aAAa,MAAM,sBAAsB,CAAC;AACjD,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAmD3C,SAAS,oBAAoB;IAC3B,MAAM,UAAU,GAA6D,aAAa,EAAE,CAAC;IAE7F,OAAO,CAAC,WAAsE,EAAE,EAAE;QAChF,MAAM,UAAU,GAA6D,SAAS,CACpF;YACE,OAAO,EAAE,qCAAqC;YAC9C,EAAE,EAAE,qCAAqC;YACzC,WAAW,EAAE,0DAA0D;SACxE,EACD,EAAE,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CACxC,CAAC;QAEF,OAAO,UAAU,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC,CAAC;IACtE,CAAC,CAAC;AACJ,CAAC;AAaD,SAAS,YAAY,CAAC,KAAkD;IACtE,MAAM,OAAO,GAAkD,oBAAoB,EAAE,CAAC;IACtF,MAAM,aAAa,GAAwD,OAAO,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,CAAC;IAC5G,MAAM,QAAQ,GAAmD,WAAW,EAAE,CAAC;IAC/E,MAAM,cAAc,GAAyD,QAAQ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AC,WAAW,CAAC,CAE/D,CACR,CAAC,GACE,CACP,EACA,CAAC,iBAAiB,KAAK,IAAI,CAAC,IAAI,CAC/B,KAAC,IAAI,IAAC,SAAS,EAAC,+BAA+B,EAAC,EAAE,EAAE,SAAS,gBAAc,iBAAiB,YACzF,aAAa,GACT,CACR,IACM,CACV,IACO,CACX,CAAC;AACJ,CAAC;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/theme/BlogSidebarMobile/index.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/theme/BlogSidebarMobile/index.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAcV,qDAAqD,EAItD,MAAM,gDAAgD,CAAC;AAaxD,iBAAS,iBAAiB,CAAC,KAAK,EAAE,qDAAqD,uDAgItF;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -3,57 +3,25 @@ import { useLocation } from '@docusaurus/router';
|
|
|
3
3
|
import { translate } from '@docusaurus/Translate';
|
|
4
4
|
import { Icon } from '@iconify/react/offline';
|
|
5
5
|
import BlogSidebar from '@theme/BlogSidebar';
|
|
6
|
-
import {
|
|
6
|
+
import { useEffect, useState, } from 'react';
|
|
7
7
|
import { createPortal } from 'react-dom';
|
|
8
|
+
import { useOverlayPanel } from '../../lib/use-overlay-panel.js';
|
|
8
9
|
function BlogSidebarMobile(props) {
|
|
9
10
|
const pathname = useLocation()['pathname'];
|
|
10
11
|
const isOpenState = useState(false);
|
|
11
12
|
const isOpen = isOpenState[0];
|
|
12
13
|
const setIsOpen = isOpenState[1];
|
|
13
|
-
const
|
|
14
|
-
const isClosing =
|
|
15
|
-
const setIsClosing =
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
if (event.key === 'Escape') {
|
|
19
|
-
setIsClosing(true);
|
|
20
|
-
}
|
|
21
|
-
return undefined;
|
|
22
|
-
}, []);
|
|
23
|
-
const handleClickOutside = useCallback((event) => {
|
|
24
|
-
const mouseTarget = event.target;
|
|
25
|
-
if (mouseTarget === event.currentTarget) {
|
|
26
|
-
setIsClosing(true);
|
|
27
|
-
}
|
|
28
|
-
return undefined;
|
|
29
|
-
}, []);
|
|
30
|
-
useEffect(() => {
|
|
31
|
-
if (isOpen === true) {
|
|
32
|
-
document.addEventListener('keydown', handleEscape);
|
|
33
|
-
}
|
|
34
|
-
return () => {
|
|
35
|
-
document.removeEventListener('keydown', handleEscape);
|
|
36
|
-
return undefined;
|
|
37
|
-
};
|
|
38
|
-
}, [
|
|
39
|
-
isOpen,
|
|
40
|
-
handleEscape,
|
|
41
|
-
]);
|
|
14
|
+
const overlayPanel = useOverlayPanel(isOpen, '.nova-sidebar-mobile-close');
|
|
15
|
+
const isClosing = overlayPanel['isClosing'];
|
|
16
|
+
const setIsClosing = overlayPanel['setIsClosing'];
|
|
17
|
+
const handleClickOutside = overlayPanel['handleClickOutside'];
|
|
18
|
+
const panelRef = overlayPanel['panelRef'];
|
|
42
19
|
useEffect(() => {
|
|
43
20
|
if (isOpen === true) {
|
|
44
21
|
setIsClosing(true);
|
|
45
22
|
}
|
|
46
23
|
return undefined;
|
|
47
24
|
}, [pathname]);
|
|
48
|
-
useEffect(() => {
|
|
49
|
-
if (isOpen === true && panelRef['current'] !== null) {
|
|
50
|
-
const focusTarget = panelRef['current'].querySelector('.nova-sidebar-mobile-close');
|
|
51
|
-
if (focusTarget !== null) {
|
|
52
|
-
focusTarget.focus();
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return undefined;
|
|
56
|
-
}, [isOpen]);
|
|
57
25
|
if (props['sidebar'] === undefined
|
|
58
26
|
|| props['sidebar']['items']['length'] === 0) {
|
|
59
27
|
return undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/theme/BlogSidebarMobile/index.tsx"],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AAE;4CACZ,YAAY,CAAC,IAAI,CAAC,CAAC;4CAEnB,OAAO,SAAS,CAAC;wCACnB,CAAC,gBACW,cAAc,YAE1B,KAAC,IAAI,IAAC,IAAI,EAAC,UAAU,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,iBAAa,MAAM,GAAG,GAC3D,IACL,EACN,cAAK,SAAS,EAAC,6BAA6B,YAC1C,KAAC,WAAW,IAAC,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,GAAI,GACtC,IACF,GACF,EACN,QAAQ,CAAC,IAAI,CACd,CAAC;YACJ,CAAC,CAAC,EAAE,IACH,CACJ,CAAC;AACJ,CAAC;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../../src/theme/DocSidebarMobile/panel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../../src/theme/DocSidebarMobile/panel.tsx"],"names":[],"mappings":"AAyCA,iBAAS,qBAAqB,uCA2F7B;AAED,eAAe,qBAAqB,CAAC"}
|
|
@@ -4,51 +4,19 @@ import { useLocation } from '@docusaurus/router';
|
|
|
4
4
|
import { translate } from '@docusaurus/Translate';
|
|
5
5
|
import { Icon } from '@iconify/react/offline';
|
|
6
6
|
import DocSidebar from '@theme/DocSidebar';
|
|
7
|
-
import {
|
|
7
|
+
import { useSyncExternalStore } from 'react';
|
|
8
8
|
import { createPortal } from 'react-dom';
|
|
9
9
|
import { sidebarMobileGetSnapshot, sidebarMobileSetOpen, sidebarMobileSubscribe, } from '../../lib/sidebar-mobile-store.js';
|
|
10
|
+
import { useOverlayPanel } from '../../lib/use-overlay-panel.js';
|
|
10
11
|
function DocSidebarMobilePanel() {
|
|
11
12
|
const sidebar = useDocsSidebar();
|
|
12
13
|
const pathname = useLocation()['pathname'];
|
|
13
14
|
const isOpen = useSyncExternalStore(sidebarMobileSubscribe, sidebarMobileGetSnapshot, sidebarMobileGetSnapshot);
|
|
14
|
-
const
|
|
15
|
-
const isClosing =
|
|
16
|
-
const setIsClosing =
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
if (event.key === 'Escape') {
|
|
20
|
-
setIsClosing(true);
|
|
21
|
-
}
|
|
22
|
-
return undefined;
|
|
23
|
-
}, []);
|
|
24
|
-
const handleClickOutside = useCallback((event) => {
|
|
25
|
-
const mouseTarget = event.target;
|
|
26
|
-
if (mouseTarget === event.currentTarget) {
|
|
27
|
-
setIsClosing(true);
|
|
28
|
-
}
|
|
29
|
-
return undefined;
|
|
30
|
-
}, []);
|
|
31
|
-
useEffect(() => {
|
|
32
|
-
if (isOpen === true) {
|
|
33
|
-
document.addEventListener('keydown', handleEscape);
|
|
34
|
-
}
|
|
35
|
-
return () => {
|
|
36
|
-
document.removeEventListener('keydown', handleEscape);
|
|
37
|
-
return undefined;
|
|
38
|
-
};
|
|
39
|
-
}, [
|
|
40
|
-
isOpen,
|
|
41
|
-
handleEscape,
|
|
42
|
-
]);
|
|
43
|
-
useEffect(() => {
|
|
44
|
-
if (isOpen === true && panelRef['current'] !== null) {
|
|
45
|
-
const focusTarget = panelRef['current'].querySelector('.nova-sidebar-mobile-close');
|
|
46
|
-
if (focusTarget !== null) {
|
|
47
|
-
focusTarget.focus();
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return undefined;
|
|
51
|
-
}, [isOpen]);
|
|
15
|
+
const overlayPanel = useOverlayPanel(isOpen, '.nova-sidebar-mobile-close');
|
|
16
|
+
const isClosing = overlayPanel['isClosing'];
|
|
17
|
+
const setIsClosing = overlayPanel['setIsClosing'];
|
|
18
|
+
const handleClickOutside = overlayPanel['handleClickOutside'];
|
|
19
|
+
const panelRef = overlayPanel['panelRef'];
|
|
52
20
|
if (isOpen !== true
|
|
53
21
|
|| sidebar === null) {
|
|
54
22
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel.js","sourceRoot":"","sources":["../../../../src/theme/DocSidebarMobile/panel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAC3C,OAAO,
|
|
1
|
+
{"version":3,"file":"panel.js","sourceRoot":"","sources":["../../../../src/theme/DocSidebarMobile/panel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AA4BjE,SAAS,qBAAqB;IAC5B,MAAM,OAAO,GAA+D,cAAc,EAAgE,CAAC;IAC3J,MAAM,QAAQ,GAAgE,WAAW,EAAE,CAAC,UAAU,CAAC,CAAC;IAExG,MAAM,MAAM,GAA8D,oBAAoB,CAAC,sBAAsB,EAAE,wBAAwB,EAAE,wBAAwB,CAAC,CAAC;IAE3K,MAAM,YAAY,GAAoE,eAAe,CAAC,MAAM,EAAE,4BAA4B,CAAC,CAAC;IAC5I,MAAM,SAAS,GAAiE,YAAY,CAAC,WAAW,CA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AAG,EAAE,QAAQ,EACb,IAAI,EAAC,QAAQ,gBACF,MAAM,gBACL,cAAc,aAE1B,eAAK,SAAS,EAAC,4BAA4B,aACzC,eAAM,SAAS,EAAC,kCAAkC,YAAE,WAAW,GAAQ,EACvE,iBACE,SAAS,EAAC,2BAA2B,EACrC,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,GAAG,EAAE;gCACZ,YAAY,CAAC,IAAI,CAAC,CAAC;gCAEnB,OAAO,SAAS,CAAC;4BACnB,CAAC,gBACW,cAAc,YAE1B,KAAC,IAAI,IAAC,IAAI,EAAC,UAAU,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,iBAAa,MAAM,GAAG,GAC3D,IACL,EACN,cAAK,SAAS,EAAC,6BAA6B,YAC1C,KAAC,UAAU,IACT,OAAO,EAAE,YAAY,EACrB,IAAI,EAAE,QAAQ,EACd,UAAU,EAAE,GAAG,EAAE,CAAC,SAAS,EAC3B,QAAQ,EAAE,KAAK,GACf,GACE,IACF,GACF,EACN,QAAQ,CAAC,IAAI,CACd,CAAC;AACJ,CAAC;AAED,eAAe,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/theme/Mermaid/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/theme/Mermaid/index.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAEV,iCAAiC,EACjC,mCAAmC,EAMpC,MAAM,sCAAsC,CAAC;AAsD9C,iBAAS,OAAO,CAAC,KAAK,EAAE,iCAAiC,GAAG,mCAAmC,CAoB9F;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import ErrorBoundary from '@docusaurus/ErrorBoundary';
|
|
3
3
|
import ErrorPageContent from '@theme/ErrorPageContent';
|
|
4
|
-
import { useEffect, useRef
|
|
4
|
+
import { useEffect, useRef } from 'react';
|
|
5
5
|
import { MERMAID_CONTAINER_CLASS_NAME, useMermaidRenderResult, } from '../../lib/mermaid.js';
|
|
6
|
+
import { useColorModeObserver } from '../../lib/use-color-mode-observer.js';
|
|
6
7
|
function MermaidContent(props) {
|
|
7
8
|
const renderResult = useMermaidRenderResult({ text: props['value'] });
|
|
8
9
|
const containerRef = useRef(null);
|
|
@@ -21,30 +22,7 @@ function MermaidContent(props) {
|
|
|
21
22
|
return (_jsx("div", { ref: containerRef, className: className, style: props['style'], dangerouslySetInnerHTML: { __html: renderResult['svg'] } }));
|
|
22
23
|
}
|
|
23
24
|
function Mermaid(props) {
|
|
24
|
-
const
|
|
25
|
-
const colorMode = colorModeState[0];
|
|
26
|
-
const setColorMode = colorModeState[1];
|
|
27
|
-
useEffect(() => {
|
|
28
|
-
const currentTheme = document.documentElement.getAttribute('data-theme');
|
|
29
|
-
if (currentTheme !== null) {
|
|
30
|
-
setColorMode(currentTheme);
|
|
31
|
-
}
|
|
32
|
-
const observer = new MutationObserver(() => {
|
|
33
|
-
const theme = document.documentElement.getAttribute('data-theme');
|
|
34
|
-
if (theme !== null) {
|
|
35
|
-
setColorMode(theme);
|
|
36
|
-
}
|
|
37
|
-
return undefined;
|
|
38
|
-
});
|
|
39
|
-
observer.observe(document.documentElement, {
|
|
40
|
-
attributes: true,
|
|
41
|
-
attributeFilter: ['data-theme'],
|
|
42
|
-
});
|
|
43
|
-
return () => {
|
|
44
|
-
observer.disconnect();
|
|
45
|
-
return undefined;
|
|
46
|
-
};
|
|
47
|
-
}, []);
|
|
25
|
+
const colorMode = useColorModeObserver();
|
|
48
26
|
return (_jsx(ErrorBoundary, { fallback: (params) => (_jsx(ErrorPageContent, { error: params['error'], tryAgain: params['tryAgain'] })), children: _jsx(MermaidContent, { value: props['value'], className: props['className'], style: props['style'] }, colorMode) }));
|
|
49
27
|
}
|
|
50
28
|
export default Mermaid;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/theme/Mermaid/index.tsx"],"names":[],"mappings":";AAAA,OAAO,aAAa,MAAM,2BAA2B,CAAC;AACtD,OAAO,gBAAgB,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/theme/Mermaid/index.tsx"],"names":[],"mappings":";AAAA,OAAO,aAAa,MAAM,2BAA2B,CAAC;AACtD,OAAO,gBAAgB,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EACL,4BAA4B,EAC5B,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAuB5E,SAAS,cAAc,CAAC,KAA+C;IACrE,MAAM,YAAY,GAAoD,sBAAsB,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACvH,MAAM,YAAY,GAAoD,MAAM,CAAwB,IAAI,CAAC,CAAC;IAE1G,SAAS,CAAC,GAAG,EAAE;QACb,IACE,YAAY,KAAK,IAAI;eAClB,YAAY,CAAC,OAAO,KAAK,IAAI;eAC7B,YAAY,CAAC,eAAe,CAAC,KAAK,SAAS,EAC9C,CAAC;YACD,YAAY,CAAC,aAAa,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QACnD,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnB,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;QAC1B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,SAAS,GAAiD,CAAC,KAAK,CAAC,WAAW,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,4BAA4B,IAAI,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC,4BAA4B,CAAC;IAE5L,OAAO,CACL,cACE,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,EACrB,uBAAuB,EAAE,EAAE,MAAM,EAAE,YAAY,CAAC,KAAK,CAAC,EAAE,GACxD,CACH,CAAC;AACJ,CAAC;AAYD,SAAS,OAAO,CAAC,KAAwC;IACvD,MAAM,SAAS,GAA0C,oBAAoB,EAAE,CAAC;IAEhF,OAAO,CACL,KAAC,aAAa,IACZ,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CACpB,KAAC,gBAAgB,IACf,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,EACtB,QAAQ,EAAE,MAAM,CAAC,UAAU,CAAC,GAC5B,CACH,YAED,KAAC,cAAc,IAEb,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,EACrB,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,EAC7B,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAHhB,SAAS,CAId,GACY,CACjB,CAAC;AACJ,CAAC;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mobile-menu.d.ts","sourceRoot":"","sources":["../../../../../src/theme/Navbar/Bridge/mobile-menu.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mobile-menu.d.ts","sourceRoot":"","sources":["../../../../../src/theme/Navbar/Bridge/mobile-menu.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,+CAA+C,EAC/C,iDAAiD,EAElD,MAAM,qDAAqD,CAAC;AAmB7D,iBAAS,UAAU,CAAC,KAAK,EAAE,+CAA+C,GAAG,iDAAiD,CA0C7H;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -1,132 +1,18 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
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
3
|
import Logo from '@theme/Logo';
|
|
7
|
-
import { SearchInput
|
|
8
|
-
import
|
|
9
|
-
import { createPortal } from 'react-dom';
|
|
4
|
+
import { SearchInput } from '@theme/SearchBar';
|
|
5
|
+
import MobileMenuBase from '../shared/mobile-menu-base.js';
|
|
10
6
|
function MobileMenu(props) {
|
|
11
|
-
const isOpen = props['isOpen'];
|
|
12
|
-
const onClose = props['onClose'];
|
|
13
|
-
const items = props['items'];
|
|
14
7
|
const siteLogo = props['siteLogo'];
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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 focusTarget = panelRef['current'].querySelector('.nova-navbar-bridge-menu-close');
|
|
49
|
-
if (focusTarget !== null) {
|
|
50
|
-
focusTarget.focus();
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return undefined;
|
|
54
|
-
}, [isOpen]);
|
|
55
|
-
const mobileMenuAriaLabel = translate({
|
|
56
|
-
id: 'theme.navbar.mobileMenuAriaLabel',
|
|
57
|
-
message: 'Navigation menu',
|
|
58
|
-
description: 'The ARIA label for the mobile navigation menu dialog',
|
|
59
|
-
});
|
|
60
|
-
const closeMenuAriaLabel = translate({
|
|
61
|
-
id: 'theme.navbar.closeMenuAriaLabel',
|
|
62
|
-
message: 'Close menu',
|
|
63
|
-
description: 'The ARIA label for the button that closes the mobile navigation menu',
|
|
64
|
-
});
|
|
65
|
-
if (isOpen === false) {
|
|
66
|
-
return null;
|
|
67
|
-
}
|
|
68
|
-
let overlayClassName = 'nova-navbar-bridge-menu-overlay nova-navbar-bridge-menu-open';
|
|
69
|
-
if (isClosing === true) {
|
|
70
|
-
overlayClassName = 'nova-navbar-bridge-menu-overlay nova-navbar-bridge-menu-closing';
|
|
71
|
-
}
|
|
72
|
-
return createPortal(_jsx("div", { className: overlayClassName, onClick: handleClickOutside, role: "presentation", onAnimationEnd: (_event) => {
|
|
73
|
-
if (isClosing === true) {
|
|
74
|
-
onClose();
|
|
75
|
-
setIsClosing(false);
|
|
76
|
-
}
|
|
77
|
-
return undefined;
|
|
78
|
-
}, children: _jsx("div", { className: "nova-navbar-bridge-menu-panel nova-mobile-menu-panel", ref: panelRef, role: "dialog", "aria-modal": "true", "aria-label": mobileMenuAriaLabel, children: _jsxs(SearchProvider, { children: [_jsxs("div", { className: "nova-navbar-bridge-menu-header", children: [_jsx("div", { className: "nova-navbar-bridge-menu-brand", children: _jsx(Link, { to: siteLogo['href'] ?? '/', target: siteLogo['target'], rel: siteLogo['rel'], "aria-label": siteLogo['ariaLabel'], onClick: () => {
|
|
79
|
-
setIsClosing(true);
|
|
8
|
+
return (_jsx(MobileMenuBase, { variantPrefix: "nova-navbar-bridge-menu", renderHeader: (renderHeaderProps) => {
|
|
9
|
+
const closeButton = renderHeaderProps['closeButton'];
|
|
10
|
+
const startClosing = renderHeaderProps['startClosing'];
|
|
11
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "nova-navbar-bridge-menu-header", children: [_jsx("div", { className: "nova-navbar-bridge-menu-brand", children: _jsx(Link, { to: siteLogo['href'] ?? '/', target: siteLogo['target'], rel: siteLogo['rel'], "aria-label": siteLogo['ariaLabel'], onClick: () => {
|
|
12
|
+
startClosing();
|
|
80
13
|
return undefined;
|
|
81
|
-
}, children: _jsx(Logo, { siteLogo: siteLogo }) }) }), _jsx("
|
|
82
|
-
|
|
83
|
-
return undefined;
|
|
84
|
-
}, "aria-label": closeMenuAriaLabel, children: _jsx(Icon, { icon: "lucide:x", width: "20", height: "20", "aria-hidden": "true" }) })] }), _jsx("div", { className: "nova-navbar-bridge-menu-search nova-mobile-menu-search", children: _jsx(SearchInput, {}) }), _jsxs("div", { className: "nova-navbar-bridge-menu-body nova-mobile-menu-body", children: [_jsx(SearchResults, {}), _jsx("div", { className: "nova-navbar-bridge-menu-items nova-mobile-menu-items", children: items.map((navItem, itemIndex) => {
|
|
85
|
-
const navItemType = navItem['type'];
|
|
86
|
-
const navItemChildren = navItem['items'];
|
|
87
|
-
const itemStyle = { '--nova-item-index': itemIndex };
|
|
88
|
-
if (navItemType === 'dropdown'
|
|
89
|
-
|| (navItemType === undefined
|
|
90
|
-
&& Array.isArray(navItemChildren) === true)) {
|
|
91
|
-
const dropdownIcon = navItem['icon'];
|
|
92
|
-
return (_jsxs("details", { className: "nova-navbar-bridge-menu-dropdown", style: itemStyle, children: [_jsxs("summary", { className: "nova-navbar-bridge-menu-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: "nova-navbar-bridge-menu-dropdown-children", children: (navItemChildren ?? []).map((childItem) => {
|
|
93
|
-
const childIcon = childItem['icon'];
|
|
94
|
-
const childLinkProps = {};
|
|
95
|
-
const childTo = childItem['to'];
|
|
96
|
-
const childIsActive = (typeof childTo === 'string' && pathname.startsWith(childTo) === true);
|
|
97
|
-
if (childTo !== undefined) {
|
|
98
|
-
Reflect.set(childLinkProps, 'to', childTo);
|
|
99
|
-
}
|
|
100
|
-
if (childItem['href'] !== undefined) {
|
|
101
|
-
Reflect.set(childLinkProps, 'href', childItem['href']);
|
|
102
|
-
}
|
|
103
|
-
if (childIsActive === true) {
|
|
104
|
-
Reflect.set(childLinkProps, 'aria-current', 'page');
|
|
105
|
-
}
|
|
106
|
-
return (_jsxs(Link, { className: "nova-navbar-bridge-menu-item", ...childLinkProps, onClick: () => {
|
|
107
|
-
setIsClosing(true);
|
|
108
|
-
return undefined;
|
|
109
|
-
}, children: [_jsx(Icon, { icon: childIcon ?? 'lucide:link', width: "18", height: "18", "aria-hidden": "true" }), _jsx("span", { children: childItem['label'] })] }, childItem['label']));
|
|
110
|
-
}) })] }, navItem['label']));
|
|
111
|
-
}
|
|
112
|
-
const itemIcon = navItem['icon'];
|
|
113
|
-
const defaultIcon = 'lucide:link';
|
|
114
|
-
const linkProps = {};
|
|
115
|
-
const isActive = navItem['label'] === activeItemLabel;
|
|
116
|
-
if (navItem['to'] !== undefined) {
|
|
117
|
-
Reflect.set(linkProps, 'to', navItem['to']);
|
|
118
|
-
}
|
|
119
|
-
if (navItem['href'] !== undefined) {
|
|
120
|
-
Reflect.set(linkProps, 'href', navItem['href']);
|
|
121
|
-
}
|
|
122
|
-
if (isActive === true) {
|
|
123
|
-
Reflect.set(linkProps, 'aria-current', 'page');
|
|
124
|
-
}
|
|
125
|
-
return (_jsxs(Link, { className: "nova-navbar-bridge-menu-item", style: itemStyle, ...linkProps, onClick: () => {
|
|
126
|
-
setIsClosing(true);
|
|
127
|
-
return undefined;
|
|
128
|
-
}, children: [_jsx(Icon, { icon: itemIcon ?? defaultIcon, width: "18", height: "18", "aria-hidden": "true" }), _jsx("span", { children: navItem['label'] })] }, navItem['label']));
|
|
129
|
-
}) })] })] }) }) }), document.body);
|
|
14
|
+
}, children: _jsx(Logo, { siteLogo: siteLogo }) }) }), closeButton] }), _jsx("div", { className: "nova-navbar-bridge-menu-search nova-mobile-menu-search", children: _jsx(SearchInput, {}) })] }));
|
|
15
|
+
}, isOpen: props['isOpen'], onClose: props['onClose'], items: props['items'], activeItemLabel: props['activeItemLabel'] }));
|
|
130
16
|
}
|
|
131
17
|
export default MobileMenu;
|
|
132
18
|
//# sourceMappingURL=mobile-menu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mobile-menu.js","sourceRoot":"","sources":["../../../../../src/theme/Navbar/Bridge/mobile-menu.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,kBAAkB,CAAC;AACpC,OAAO,
|
|
1
|
+
{"version":3,"file":"mobile-menu.js","sourceRoot":"","sources":["../../../../../src/theme/Navbar/Bridge/mobile-menu.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,kBAAkB,CAAC;AACpC,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAyB3D,SAAS,UAAU,CAAC,KAAsD;IACxE,MAAM,QAAQ,GAAuD,KAAK,CAAC,UAAU,CAAC,CAAC;IAEvF,OAAO,CACL,KAAC,cAAc,IACb,aAAa,EAAC,yBAAyB,EACvC,YAAY,EAAE,CAAC,iBAAsF,EAAE,EAAE;YACvG,MAAM,WAAW,GAAoF,iBAAiB,CAAC,aAAa,CAAC,CAAC;YACtI,MAAM,YAAY,GAAqF,iBAAiB,CAAC,cAAc,CAAC,CAAC;YAEzI,OAAO,CACL,8BACE,eAAK,SAAS,EAAC,gCAAgC,aAC7C,cAAK,SAAS,EAAC,+BAA+B,YAC5C,KAAC,IAAI,IACH,EAAE,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,GAAG,EAC3B,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAC1B,GAAG,EAAE,QAAQ,CAAC,KAAK,CAAC,gBACR,QAAQ,CAAC,WAAW,CAAC,EACjC,OAAO,EAAE,GAAG,EAAE;wCACZ,YAAY,EAAE,CAAC;wCAEf,OAAO,SAAS,CAAC;oCACnB,CAAC,YAED,KAAC,IAAI,IAAC,QAAQ,EAAE,QAAQ,GAAI,GACvB,GACH,EACL,WAAW,IACR,EACN,cAAK,SAAS,EAAC,wDAAwD,YACrE,KAAC,WAAW,KAAG,GACX,IACL,CACJ,CAAC;QACJ,CAAC,EACD,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,EACvB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,EACzB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,EACrB,eAAe,EAAE,KAAK,CAAC,iBAAiB,CAAC,GACzC,CACH,CAAC;AACJ,CAAC;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mobile-menu.d.ts","sourceRoot":"","sources":["../../../../../src/theme/Navbar/Canopy/mobile-menu.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mobile-menu.d.ts","sourceRoot":"","sources":["../../../../../src/theme/Navbar/Canopy/mobile-menu.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,+CAA+C,EAC/C,iDAAiD,EAElD,MAAM,qDAAqD,CAAC;AAmB7D,iBAAS,UAAU,CAAC,KAAK,EAAE,+CAA+C,GAAG,iDAAiD,CAwC7H;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -1,132 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
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
3
|
import Logo from '@theme/Logo';
|
|
7
|
-
import { SearchInput
|
|
8
|
-
import
|
|
9
|
-
import { createPortal } from 'react-dom';
|
|
4
|
+
import { SearchInput } from '@theme/SearchBar';
|
|
5
|
+
import MobileMenuBase from '../shared/mobile-menu-base.js';
|
|
10
6
|
function MobileMenu(props) {
|
|
11
|
-
const isOpen = props['isOpen'];
|
|
12
|
-
const onClose = props['onClose'];
|
|
13
|
-
const items = props['items'];
|
|
14
7
|
const siteLogo = props['siteLogo'];
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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 focusTarget = panelRef['current'].querySelector('.nova-navbar-canopy-menu-close');
|
|
49
|
-
if (focusTarget !== null) {
|
|
50
|
-
focusTarget.focus();
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return undefined;
|
|
54
|
-
}, [isOpen]);
|
|
55
|
-
const mobileMenuAriaLabel = translate({
|
|
56
|
-
id: 'theme.navbar.mobileMenuAriaLabel',
|
|
57
|
-
message: 'Navigation menu',
|
|
58
|
-
description: 'The ARIA label for the mobile navigation menu dialog',
|
|
59
|
-
});
|
|
60
|
-
const closeMenuAriaLabel = translate({
|
|
61
|
-
id: 'theme.navbar.closeMenuAriaLabel',
|
|
62
|
-
message: 'Close menu',
|
|
63
|
-
description: 'The ARIA label for the button that closes the mobile navigation menu',
|
|
64
|
-
});
|
|
65
|
-
if (isOpen === false) {
|
|
66
|
-
return null;
|
|
67
|
-
}
|
|
68
|
-
let overlayClassName = 'nova-navbar-canopy-menu-overlay nova-navbar-canopy-menu-open';
|
|
69
|
-
if (isClosing === true) {
|
|
70
|
-
overlayClassName = 'nova-navbar-canopy-menu-overlay nova-navbar-canopy-menu-closing';
|
|
71
|
-
}
|
|
72
|
-
return createPortal(_jsx("div", { className: overlayClassName, onClick: handleClickOutside, role: "presentation", onAnimationEnd: (_event) => {
|
|
73
|
-
if (isClosing === true) {
|
|
74
|
-
onClose();
|
|
75
|
-
setIsClosing(false);
|
|
76
|
-
}
|
|
77
|
-
return undefined;
|
|
78
|
-
}, children: _jsx("div", { className: "nova-navbar-canopy-menu-panel nova-mobile-menu-panel", ref: panelRef, role: "dialog", "aria-modal": "true", "aria-label": mobileMenuAriaLabel, children: _jsxs(SearchProvider, { children: [_jsxs("div", { className: "nova-navbar-canopy-menu-header", children: [_jsx("div", { className: "nova-navbar-canopy-menu-brand", children: _jsx(Link, { to: siteLogo['href'] ?? '/', target: siteLogo['target'], rel: siteLogo['rel'], "aria-label": siteLogo['ariaLabel'], onClick: () => {
|
|
79
|
-
setIsClosing(true);
|
|
80
|
-
return undefined;
|
|
81
|
-
}, children: _jsx(Logo, { siteLogo: siteLogo, iconFirst: true }) }) }), _jsx("div", { className: "nova-navbar-canopy-menu-search nova-mobile-menu-search", children: _jsx(SearchInput, {}) }), _jsx("button", { className: "nova-navbar-canopy-menu-close", type: "button", onClick: () => {
|
|
82
|
-
setIsClosing(true);
|
|
83
|
-
return undefined;
|
|
84
|
-
}, "aria-label": closeMenuAriaLabel, children: _jsx(Icon, { icon: "lucide:x", width: "20", height: "20", "aria-hidden": "true" }) })] }), _jsxs("div", { className: "nova-navbar-canopy-menu-body nova-mobile-menu-body", children: [_jsx(SearchResults, {}), _jsx("div", { className: "nova-navbar-canopy-menu-items nova-mobile-menu-items", children: items.map((navItem, itemIndex) => {
|
|
85
|
-
const navItemType = navItem['type'];
|
|
86
|
-
const navItemChildren = navItem['items'];
|
|
87
|
-
const itemStyle = { '--nova-item-index': itemIndex };
|
|
88
|
-
if (navItemType === 'dropdown'
|
|
89
|
-
|| (navItemType === undefined
|
|
90
|
-
&& Array.isArray(navItemChildren) === true)) {
|
|
91
|
-
const dropdownIcon = navItem['icon'];
|
|
92
|
-
return (_jsxs("details", { className: "nova-navbar-canopy-menu-dropdown", style: itemStyle, children: [_jsxs("summary", { className: "nova-navbar-canopy-menu-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: "nova-navbar-canopy-menu-dropdown-children", children: (navItemChildren ?? []).map((childItem) => {
|
|
93
|
-
const childIcon = childItem['icon'];
|
|
94
|
-
const childLinkProps = {};
|
|
95
|
-
const childTo = childItem['to'];
|
|
96
|
-
const childIsActive = (typeof childTo === 'string' && pathname.startsWith(childTo) === true);
|
|
97
|
-
if (childTo !== undefined) {
|
|
98
|
-
Reflect.set(childLinkProps, 'to', childTo);
|
|
99
|
-
}
|
|
100
|
-
if (childItem['href'] !== undefined) {
|
|
101
|
-
Reflect.set(childLinkProps, 'href', childItem['href']);
|
|
102
|
-
}
|
|
103
|
-
if (childIsActive === true) {
|
|
104
|
-
Reflect.set(childLinkProps, 'aria-current', 'page');
|
|
105
|
-
}
|
|
106
|
-
return (_jsxs(Link, { className: "nova-navbar-canopy-menu-item", ...childLinkProps, onClick: () => {
|
|
107
|
-
setIsClosing(true);
|
|
108
|
-
return undefined;
|
|
109
|
-
}, children: [_jsx(Icon, { icon: childIcon ?? 'lucide:link', width: "18", height: "18", "aria-hidden": "true" }), _jsx("span", { children: childItem['label'] })] }, childItem['label']));
|
|
110
|
-
}) })] }, navItem['label']));
|
|
111
|
-
}
|
|
112
|
-
const itemIcon = navItem['icon'];
|
|
113
|
-
const defaultIcon = 'lucide:link';
|
|
114
|
-
const linkProps = {};
|
|
115
|
-
const isActive = navItem['label'] === activeItemLabel;
|
|
116
|
-
if (navItem['to'] !== undefined) {
|
|
117
|
-
Reflect.set(linkProps, 'to', navItem['to']);
|
|
118
|
-
}
|
|
119
|
-
if (navItem['href'] !== undefined) {
|
|
120
|
-
Reflect.set(linkProps, 'href', navItem['href']);
|
|
121
|
-
}
|
|
122
|
-
if (isActive === true) {
|
|
123
|
-
Reflect.set(linkProps, 'aria-current', 'page');
|
|
124
|
-
}
|
|
125
|
-
return (_jsxs(Link, { className: "nova-navbar-canopy-menu-item", style: itemStyle, ...linkProps, onClick: () => {
|
|
126
|
-
setIsClosing(true);
|
|
127
|
-
return undefined;
|
|
128
|
-
}, children: [_jsx(Icon, { icon: itemIcon ?? defaultIcon, width: "18", height: "18", "aria-hidden": "true" }), _jsx("span", { children: navItem['label'] })] }, navItem['label']));
|
|
129
|
-
}) })] })] }) }) }), document.body);
|
|
8
|
+
return (_jsx(MobileMenuBase, { variantPrefix: "nova-navbar-canopy-menu", renderHeader: (renderHeaderProps) => {
|
|
9
|
+
const closeButton = renderHeaderProps['closeButton'];
|
|
10
|
+
const startClosing = renderHeaderProps['startClosing'];
|
|
11
|
+
return (_jsxs("div", { className: "nova-navbar-canopy-menu-header", children: [_jsx("div", { className: "nova-navbar-canopy-menu-brand", children: _jsx(Link, { to: siteLogo['href'] ?? '/', target: siteLogo['target'], rel: siteLogo['rel'], "aria-label": siteLogo['ariaLabel'], onClick: () => {
|
|
12
|
+
startClosing();
|
|
13
|
+
return undefined;
|
|
14
|
+
}, children: _jsx(Logo, { siteLogo: siteLogo, iconFirst: true }) }) }), _jsx("div", { className: "nova-navbar-canopy-menu-search nova-mobile-menu-search", children: _jsx(SearchInput, {}) }), closeButton] }));
|
|
15
|
+
}, isOpen: props['isOpen'], onClose: props['onClose'], items: props['items'], activeItemLabel: props['activeItemLabel'] }));
|
|
130
16
|
}
|
|
131
17
|
export default MobileMenu;
|
|
132
18
|
//# sourceMappingURL=mobile-menu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mobile-menu.js","sourceRoot":"","sources":["../../../../../src/theme/Navbar/Canopy/mobile-menu.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,kBAAkB,CAAC;AACpC,OAAO,
|
|
1
|
+
{"version":3,"file":"mobile-menu.js","sourceRoot":"","sources":["../../../../../src/theme/Navbar/Canopy/mobile-menu.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,kBAAkB,CAAC;AACpC,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAyB3D,SAAS,UAAU,CAAC,KAAsD;IACxE,MAAM,QAAQ,GAAuD,KAAK,CAAC,UAAU,CAAC,CAAC;IAEvF,OAAO,CACL,KAAC,cAAc,IACb,aAAa,EAAC,yBAAyB,EACvC,YAAY,EAAE,CAAC,iBAAsF,EAAE,EAAE;YACvG,MAAM,WAAW,GAAoF,iBAAiB,CAAC,aAAa,CAAC,CAAC;YACtI,MAAM,YAAY,GAAqF,iBAAiB,CAAC,cAAc,CAAC,CAAC;YAEzI,OAAO,CACL,eAAK,SAAS,EAAC,gCAAgC,aAC7C,cAAK,SAAS,EAAC,+BAA+B,YAC5C,KAAC,IAAI,IACH,E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