@curvenote/theme-ui 2.0.1 → 2.0.2
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/dist/components/index.d.ts +3 -3
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +3 -3
- package/dist/components/layout/app-layout.d.ts +3 -3
- package/dist/components/layout/app-layout.d.ts.map +1 -1
- package/dist/components/layout/app-layout.js +19 -15
- package/dist/components/layout/app-sidebar.d.ts +2 -1
- package/dist/components/layout/app-sidebar.d.ts.map +1 -1
- package/dist/components/layout/app-sidebar.js +8 -8
- package/dist/components/layout/article-layout.d.ts +3 -3
- package/dist/components/layout/article-layout.d.ts.map +1 -1
- package/dist/components/layout/article-layout.js +17 -10
- package/dist/components/layout/grid.d.ts +1 -1
- package/dist/components/layout/grid.d.ts.map +1 -1
- package/dist/components/layout/header.d.ts +5 -3
- package/dist/components/layout/header.d.ts.map +1 -1
- package/dist/components/layout/header.js +6 -3
- package/dist/components/layout/index.d.ts +7 -7
- package/dist/components/layout/index.d.ts.map +1 -1
- package/dist/components/layout/index.js +7 -7
- package/dist/components/layout/layout-header.d.ts +9 -0
- package/dist/components/layout/layout-header.d.ts.map +1 -0
- package/dist/components/layout/layout-header.js +13 -0
- package/dist/components/layout/loading-bar.d.ts +1 -1
- package/dist/components/layout/loading-bar.d.ts.map +1 -1
- package/dist/components/layout/loading-bar.js +1 -1
- package/dist/components/layout/site-header.d.ts +1 -1
- package/dist/components/layout/site-header.d.ts.map +1 -1
- package/dist/components/layout/site-header.js +18 -8
- package/dist/components/layout/types.d.ts +6 -0
- package/dist/components/layout/types.d.ts.map +1 -1
- package/dist/components/providers/analytics-boundary.d.ts +1 -1
- package/dist/components/providers/analytics-boundary.d.ts.map +1 -1
- package/dist/components/providers/analytics-boundary.js +3 -3
- package/dist/components/providers/analytics-dev-tray.d.ts +1 -1
- package/dist/components/providers/analytics-dev-tray.d.ts.map +1 -1
- package/dist/components/providers/analytics-dev-tray.js +3 -3
- package/dist/components/providers/article-versions-provider.d.ts +1 -1
- package/dist/components/providers/article-versions-provider.d.ts.map +1 -1
- package/dist/components/providers/compute.d.ts +1 -1
- package/dist/components/providers/compute.d.ts.map +1 -1
- package/dist/components/providers/curvenote-providers.d.ts +14 -18
- package/dist/components/providers/curvenote-providers.d.ts.map +1 -1
- package/dist/components/providers/curvenote-providers.js +10 -10
- package/dist/components/providers/design.d.ts +1 -1
- package/dist/components/providers/design.d.ts.map +1 -1
- package/dist/components/providers/design.js +2 -1
- package/dist/components/providers/index.d.ts +11 -11
- package/dist/components/providers/index.d.ts.map +1 -1
- package/dist/components/providers/index.js +11 -11
- package/dist/components/providers/lightbox-provider.d.ts +1 -1
- package/dist/components/providers/lightbox-provider.d.ts.map +1 -1
- package/dist/components/providers/myst-providers.d.ts +1 -1
- package/dist/components/providers/myst-providers.d.ts.map +1 -1
- package/dist/components/providers/overlay-depth.d.ts +1 -1
- package/dist/components/providers/overlay-depth.d.ts.map +1 -1
- package/dist/components/providers/page-providers.d.ts +2 -2
- package/dist/components/providers/page-providers.d.ts.map +1 -1
- package/dist/components/providers/ping-boundary.d.ts +1 -1
- package/dist/components/providers/ping-boundary.d.ts.map +1 -1
- package/dist/components/providers/platform-providers.d.ts +1 -1
- package/dist/components/providers/platform-providers.d.ts.map +1 -1
- package/dist/components/ui/Callout.d.ts +1 -1
- package/dist/components/ui/Callout.d.ts.map +1 -1
- package/dist/components/ui/Callout.js +1 -1
- package/dist/components/ui/PageCards.d.ts +2 -1
- package/dist/components/ui/PageCards.d.ts.map +1 -1
- package/dist/components/ui/abbreviations.d.ts +2 -1
- package/dist/components/ui/abbreviations.d.ts.map +1 -1
- package/dist/components/ui/abbreviations.js +7 -14
- package/dist/components/ui/abstract.d.ts +1 -1
- package/dist/components/ui/abstract.d.ts.map +1 -1
- package/dist/components/ui/accessibility-skip-to.d.ts +3 -3
- package/dist/components/ui/accessibility-skip-to.d.ts.map +1 -1
- package/dist/components/ui/accessibility-skip-to.js +1 -1
- package/dist/components/ui/acknowledgements.d.ts +1 -1
- package/dist/components/ui/acknowledgements.d.ts.map +1 -1
- package/dist/components/ui/acknowledgements.js +4 -4
- package/dist/components/ui/arrow.d.ts +3 -3
- package/dist/components/ui/arrow.d.ts.map +1 -1
- package/dist/components/ui/article-actions-downloads.d.ts +24 -3
- package/dist/components/ui/article-actions-downloads.d.ts.map +1 -1
- package/dist/components/ui/article-actions-downloads.js +58 -16
- package/dist/components/ui/article-actions-dropdown.d.ts +1 -1
- package/dist/components/ui/article-actions-dropdown.d.ts.map +1 -1
- package/dist/components/ui/article-actions-dropdown.js +9 -9
- package/dist/components/ui/article-actions-share.d.ts +1 -1
- package/dist/components/ui/article-actions-share.d.ts.map +1 -1
- package/dist/components/ui/article-actions-share.js +2 -2
- package/dist/components/ui/article-actions.d.ts +1 -1
- package/dist/components/ui/article-actions.d.ts.map +1 -1
- package/dist/components/ui/article-actions.js +29 -8
- package/dist/components/ui/article-bar.d.ts +16 -3
- package/dist/components/ui/article-bar.d.ts.map +1 -1
- package/dist/components/ui/article-bar.js +9 -7
- package/dist/components/ui/article-card.d.ts +1 -1
- package/dist/components/ui/article-card.d.ts.map +1 -1
- package/dist/components/ui/article-card.js +2 -2
- package/dist/components/ui/article-footer.d.ts +1 -1
- package/dist/components/ui/article-footer.d.ts.map +1 -1
- package/dist/components/ui/article-footer.js +1 -1
- package/dist/components/ui/author-popover.d.ts +1 -1
- package/dist/components/ui/author-popover.d.ts.map +1 -1
- package/dist/components/ui/author-popover.js +3 -3
- package/dist/components/ui/backmatter.d.ts +41 -3
- package/dist/components/ui/backmatter.d.ts.map +1 -1
- package/dist/components/ui/backmatter.js +117 -34
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/badge.js +1 -1
- package/dist/components/ui/banner.d.ts +22 -1
- package/dist/components/ui/banner.d.ts.map +1 -1
- package/dist/components/ui/banner.js +44 -3
- package/dist/components/ui/bibliography.d.ts +1 -1
- package/dist/components/ui/bibliography.d.ts.map +1 -1
- package/dist/components/ui/bibliography.js +3 -3
- package/dist/components/ui/breadcrumb.d.ts +7 -7
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.js +1 -1
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +2 -2
- package/dist/components/ui/calendar.d.ts +1 -1
- package/dist/components/ui/calendar.d.ts.map +1 -1
- package/dist/components/ui/calendar.js +2 -2
- package/dist/components/ui/citation.d.ts +2 -2
- package/dist/components/ui/citation.d.ts.map +1 -1
- package/dist/components/ui/citation.js +5 -5
- package/dist/components/ui/collapsible-backmatter-section.d.ts +2 -2
- package/dist/components/ui/collapsible-backmatter-section.d.ts.map +1 -1
- package/dist/components/ui/collapsible-backmatter-section.js +3 -3
- package/dist/components/ui/collapsible.d.ts +3 -3
- package/dist/components/ui/collapsible.d.ts.map +1 -1
- package/dist/components/ui/cookie-banner.d.ts +2 -1
- package/dist/components/ui/cookie-banner.d.ts.map +1 -1
- package/dist/components/ui/cookie-banner.js +4 -4
- package/dist/components/ui/data-availability.d.ts +1 -1
- package/dist/components/ui/data-availability.d.ts.map +1 -1
- package/dist/components/ui/data-availability.js +4 -4
- package/dist/components/ui/dhr-cta-buttons.d.ts +30 -0
- package/dist/components/ui/dhr-cta-buttons.d.ts.map +1 -0
- package/dist/components/ui/dhr-cta-buttons.js +40 -0
- package/dist/components/ui/dialog.d.ts +10 -10
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +1 -1
- package/dist/components/ui/document-outline.d.ts +11 -2
- package/dist/components/ui/document-outline.d.ts.map +1 -1
- package/dist/components/ui/document-outline.js +101 -54
- package/dist/components/ui/dropdown-menu.d.ts +15 -15
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.js +1 -1
- package/dist/components/ui/error-page.d.ts +1 -1
- package/dist/components/ui/error-page.d.ts.map +1 -1
- package/dist/components/ui/error-page.js +1 -1
- package/dist/components/ui/font-styles.d.ts +23 -0
- package/dist/components/ui/font-styles.d.ts.map +1 -0
- package/dist/components/ui/font-styles.js +39 -0
- package/dist/components/ui/footer-links.d.ts +1 -1
- package/dist/components/ui/footer-links.d.ts.map +1 -1
- package/dist/components/ui/footer-links.js +2 -2
- package/dist/components/ui/footnotes.d.ts +1 -1
- package/dist/components/ui/footnotes.d.ts.map +1 -1
- package/dist/components/ui/footnotes.js +3 -2
- package/dist/components/ui/frontmatter-badges.d.ts +7 -7
- package/dist/components/ui/frontmatter-badges.d.ts.map +1 -1
- package/dist/components/ui/frontmatter-badges.js +5 -5
- package/dist/components/ui/frontmatter.d.ts +1 -1
- package/dist/components/ui/frontmatter.d.ts.map +1 -1
- package/dist/components/ui/frontmatter.js +1 -1
- package/dist/components/ui/hash-link.d.ts.map +1 -1
- package/dist/components/ui/hash-link.js +2 -1
- package/dist/components/ui/image.d.ts +2 -2
- package/dist/components/ui/image.d.ts.map +1 -1
- package/dist/components/ui/image.js +3 -3
- package/dist/components/ui/index.d.ts +61 -57
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +58 -56
- package/dist/components/ui/input.d.ts +1 -1
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/input.js +1 -1
- package/dist/components/ui/keywords.d.ts +1 -1
- package/dist/components/ui/keywords.d.ts.map +1 -1
- package/dist/components/ui/keywords.js +3 -3
- package/dist/components/ui/label.js +1 -1
- package/dist/components/ui/license-description.d.ts +1 -1
- package/dist/components/ui/license-description.d.ts.map +1 -1
- package/dist/components/ui/license-description.js +3 -3
- package/dist/components/ui/license-frontmatter.d.ts +2 -2
- package/dist/components/ui/license-frontmatter.d.ts.map +1 -1
- package/dist/components/ui/license-frontmatter.js +4 -4
- package/dist/components/ui/lightbox-container.d.ts +2 -2
- package/dist/components/ui/lightbox-container.d.ts.map +1 -1
- package/dist/components/ui/lightbox-container.js +2 -2
- package/dist/components/ui/lightbox.d.ts +3 -2
- package/dist/components/ui/lightbox.d.ts.map +1 -1
- package/dist/components/ui/lightbox.js +6 -6
- package/dist/components/ui/link-card.d.ts +1 -1
- package/dist/components/ui/link-card.d.ts.map +1 -1
- package/dist/components/ui/link-card.js +1 -1
- package/dist/components/ui/pagination.d.ts +7 -7
- package/dist/components/ui/pagination.d.ts.map +1 -1
- package/dist/components/ui/pagination.js +1 -1
- package/dist/components/ui/popover.d.ts +4 -4
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/popover.js +1 -1
- package/dist/components/ui/search.d.ts +1 -1
- package/dist/components/ui/search.d.ts.map +1 -1
- package/dist/components/ui/search.js +2 -2
- package/dist/components/ui/select.d.ts +10 -10
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/select.js +1 -1
- package/dist/components/ui/separator.d.ts +1 -1
- package/dist/components/ui/separator.d.ts.map +1 -1
- package/dist/components/ui/separator.js +1 -1
- package/dist/components/ui/sheet.d.ts +8 -8
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet.js +1 -1
- package/dist/components/ui/sidebar.d.ts +23 -23
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/sidebar.js +3 -3
- package/dist/components/ui/skeleton.d.ts +1 -1
- package/dist/components/ui/skeleton.d.ts.map +1 -1
- package/dist/components/ui/skeleton.js +1 -1
- package/dist/components/ui/sonner.d.ts +1 -1
- package/dist/components/ui/sonner.d.ts.map +1 -1
- package/dist/components/ui/theme-button.d.ts +1 -1
- package/dist/components/ui/theme-button.d.ts.map +1 -1
- package/dist/components/ui/theme-button.js +3 -3
- package/dist/components/ui/tooltip.d.ts +4 -4
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip.js +2 -2
- package/dist/components/ui/types.d.ts +1 -0
- package/dist/components/ui/types.d.ts.map +1 -1
- package/dist/components/ui/types.js +1 -0
- package/dist/hooks/index.d.ts +4 -4
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +4 -4
- package/dist/hooks/use-theme.d.ts +1 -1
- package/dist/hooks/use-theme.d.ts.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/lib/dedupeAbbreviations.d.ts +11 -0
- package/dist/lib/dedupeAbbreviations.d.ts.map +1 -1
- package/dist/lib/dedupeAbbreviations.js +17 -0
- package/dist/lib/fonts.d.ts +29 -0
- package/dist/lib/fonts.d.ts.map +1 -0
- package/dist/lib/fonts.js +148 -0
- package/dist/lib/index.d.ts +6 -5
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +6 -5
- package/package.json +22 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../../src/components/ui/banner.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../../src/components/ui/banner.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAOvD;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC,GAAG,MAAM,CAAC;AAY9E;;GAEG;AACH,wBAAgB,cAAc,IAAI,WAAW,CAE5C;AAwBD,wBAAgB,MAAM,CAAC,EACrB,MAAM,EACN,eAAe,EACf,KAAa,EACb,IAAY,GACb,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,+BAoEA;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,sCA8BjE"}
|
|
@@ -1,7 +1,26 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useEffect } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { useProjectManifest } from '@myst-theme/providers';
|
|
4
|
+
import { useImageLoad } from '../../hooks/index.js';
|
|
5
|
+
import { useDesign } from '../providers/design.js';
|
|
6
|
+
import { useIsIndexPage } from '../providers/page-providers.js';
|
|
4
7
|
import { cn } from '@curvenote/react-utils';
|
|
8
|
+
/**
|
|
9
|
+
* Resolve the banner placement from the design options, filling in the `inset` default whenever
|
|
10
|
+
* the banner has not been hidden. This only answers "where would a banner go" — callers still
|
|
11
|
+
* check that the project actually has a banner image.
|
|
12
|
+
*/
|
|
13
|
+
function resolveBannerStyle(design) {
|
|
14
|
+
if (design.hide_banner)
|
|
15
|
+
return 'none';
|
|
16
|
+
return design.banner_style ?? 'inset';
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Banner placement for the current page, e.g. `useBannerStyle() === 'inset' && !!project.banner`.
|
|
20
|
+
*/
|
|
21
|
+
export function useBannerStyle() {
|
|
22
|
+
return resolveBannerStyle(useDesign());
|
|
23
|
+
}
|
|
5
24
|
function useParallaxEffect() {
|
|
6
25
|
const [scrollOffset, setScrollOffset] = useState(0);
|
|
7
26
|
useEffect(() => {
|
|
@@ -38,7 +57,29 @@ export function Banner({ banner, bannerOptimized, inset = false, thin = false, }
|
|
|
38
57
|
'opacity-100 grayscale-0': imageLoaded,
|
|
39
58
|
}), style: {
|
|
40
59
|
transform: `translateY(${scrollOffset}px)`,
|
|
41
|
-
}, onLoad: handleImageLoad }) })), banner && inset && (_jsxs("div", { className: "
|
|
60
|
+
}, onLoad: handleImageLoad }) })), banner && inset && (_jsxs("div", { className: "mb-8 h-0 col-body-outset", children: [_jsx("div", { className: cn('overflow-hidden transition-shadow pointer-events-none h-[200px] mb-[-200px] dark:shadow-accent-foreground lg:rounded-t', duration, {
|
|
42
61
|
'shadow-2xl': imageLoaded,
|
|
43
|
-
}) }), _jsx("div", { className: cn('overflow-hidden
|
|
62
|
+
}) }), _jsx("div", { className: cn('overflow-hidden pointer-events-none bg-background h-[300px] lg:rounded-t') })] }))] }));
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Banner rendered in the flow of the article (`banner_style: 'inline'`), sized to the body
|
|
66
|
+
* column, with an optional attribution line underneath (`banner_attribution`).
|
|
67
|
+
*
|
|
68
|
+
* Renders nothing unless the design opts in and the project actually has a banner. Like the
|
|
69
|
+
* project banner it draws from, it only appears on the project's index page — not on the other
|
|
70
|
+
* pages of a multi-page project.
|
|
71
|
+
*/
|
|
72
|
+
export function InlineBanner({ className }) {
|
|
73
|
+
const project = useProjectManifest();
|
|
74
|
+
const design = useDesign();
|
|
75
|
+
const bannerStyle = useBannerStyle();
|
|
76
|
+
const isIndexPage = useIsIndexPage();
|
|
77
|
+
if (bannerStyle !== 'inline' || !isIndexPage || !project?.banner)
|
|
78
|
+
return null;
|
|
79
|
+
return (_jsxs("figure", { className: cn('my-8', className), children: [_jsx("img", { src: project.bannerOptimized ?? project.banner, alt: "", role: "presentation", "aria-hidden": "true", className: cn(
|
|
80
|
+
// The manifest carries no image dimensions, so reserve the box up front: a 16:9
|
|
81
|
+
// banner capped at 420px, cropped with object-cover. Without this the image is
|
|
82
|
+
// 0px tall until it loads and everything below it — the sticky article bar
|
|
83
|
+
// included — jumps down by its height.
|
|
84
|
+
'object-cover object-center mt-0 mb-0 w-full aspect-video max-h-[420px] rounded-xs transition-[opacity,filter] duration-500') }), design.banner_attribution && (_jsx("figcaption", { className: "mt-2 text-xs text-muted-foreground", children: design.banner_attribution }))] }));
|
|
44
85
|
}
|
|
@@ -2,5 +2,5 @@ export declare function Bibliography({ className, innerClassName, hideManyRefere
|
|
|
2
2
|
className?: string;
|
|
3
3
|
innerClassName?: string;
|
|
4
4
|
hideManyReferences?: boolean | number;
|
|
5
|
-
}): import("react
|
|
5
|
+
}): import("react").JSX.Element | null;
|
|
6
6
|
//# sourceMappingURL=bibliography.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bibliography.d.ts","sourceRoot":"","sources":["../../../src/components/ui/bibliography.tsx"],"names":[],"mappings":"AAWA,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,cAAc,EACd,kBAA4C,GAC7C,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CACvC,
|
|
1
|
+
{"version":3,"file":"bibliography.d.ts","sourceRoot":"","sources":["../../../src/components/ui/bibliography.tsx"],"names":[],"mappings":"AAWA,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,cAAc,EACd,kBAA4C,GAC7C,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CACvC,sCAoDA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useReferences } from '@myst-theme/providers';
|
|
3
3
|
import { cn } from '@curvenote/react-utils';
|
|
4
|
-
import { PART_IDS } from './types';
|
|
5
|
-
import { useCollapsibleBackmatter, CollapsibleBackmatterHeader, CollapsibleBackmatterFooterButton, } from './collapsible-backmatter-section';
|
|
4
|
+
import { PART_IDS } from './types.js';
|
|
5
|
+
import { useCollapsibleBackmatter, CollapsibleBackmatterHeader, CollapsibleBackmatterFooterButton, } from './collapsible-backmatter-section.js';
|
|
6
6
|
const DEFAULT_MANY_REFERENCES = 15;
|
|
7
7
|
export function Bibliography({ className, innerClassName, hideManyReferences = DEFAULT_MANY_REFERENCES, }) {
|
|
8
8
|
if (hideManyReferences === true)
|
|
@@ -14,7 +14,7 @@ export function Bibliography({ className, innerClassName, hideManyReferences = D
|
|
|
14
14
|
return null;
|
|
15
15
|
const { hidden, toggle, displayedCount, isCollapsible } = useCollapsibleBackmatter(filtered.length, hideManyReferences, DEFAULT_MANY_REFERENCES);
|
|
16
16
|
const refs = filtered.slice(0, displayedCount);
|
|
17
|
-
return (_jsxs("section", { id: PART_IDS.bibliography, className: cn(className), children: [_jsx("div", { className: innerClassName, children: _jsx(CollapsibleBackmatterHeader, { id: PART_IDS.bibliography, title: "References", linkTitle: "Link to References", hidden: hidden, onToggle: toggle, isCollapsible: isCollapsible }) }), _jsx("div", { className: cn('pl-3 mb-8 text-xs text-stone-500 dark:text-stone-300', innerClassName), children: _jsxs("ol", { children: [refs.map((label) => {
|
|
17
|
+
return (_jsxs("section", { id: PART_IDS.bibliography, className: cn('font-small', className), children: [_jsx("div", { className: innerClassName, children: _jsx(CollapsibleBackmatterHeader, { id: PART_IDS.bibliography, title: "References", linkTitle: "Link to References", hidden: hidden, onToggle: toggle, isCollapsible: isCollapsible }) }), _jsx("div", { className: cn('pl-3 mb-8 text-xs text-stone-500 dark:text-stone-300', innerClassName), children: _jsxs("ol", { children: [refs.map((label) => {
|
|
18
18
|
const { html } = data[label];
|
|
19
19
|
return (_jsx("li", { className: "wrap-break-words", id: `cite-${label}`, dangerouslySetInnerHTML: { __html: html || '' } }, label));
|
|
20
20
|
}), isCollapsible && (_jsx(CollapsibleBackmatterFooterButton, { hidden: hidden, onToggle: toggle, totalCount: filtered.length, itemLabel: "references", sectionId: PART_IDS.bibliography, className: "list-none text-center", as: "li" }))] }) })] }));
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
declare function Breadcrumb({ ...props }: React.ComponentProps<'nav'>):
|
|
3
|
-
declare function BreadcrumbList({ className, ...props }: React.ComponentProps<'ol'>):
|
|
4
|
-
declare function BreadcrumbItem({ className, ...props }: React.ComponentProps<'li'>):
|
|
2
|
+
declare function Breadcrumb({ ...props }: React.ComponentProps<'nav'>): React.JSX.Element;
|
|
3
|
+
declare function BreadcrumbList({ className, ...props }: React.ComponentProps<'ol'>): React.JSX.Element;
|
|
4
|
+
declare function BreadcrumbItem({ className, ...props }: React.ComponentProps<'li'>): React.JSX.Element;
|
|
5
5
|
declare function BreadcrumbLink({ asChild, className, ...props }: React.ComponentProps<'a'> & {
|
|
6
6
|
asChild?: boolean;
|
|
7
|
-
}):
|
|
8
|
-
declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<'span'>):
|
|
9
|
-
declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<'li'>):
|
|
10
|
-
declare function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<'span'>):
|
|
7
|
+
}): React.JSX.Element;
|
|
8
|
+
declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
9
|
+
declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<'li'>): React.JSX.Element;
|
|
10
|
+
declare function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
11
11
|
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
|
|
12
12
|
//# sourceMappingURL=breadcrumb.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../../src/components/ui/breadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,iBAAS,UAAU,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../../src/components/ui/breadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,iBAAS,UAAU,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAE5D;AAED,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAW1E;AAED,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAQ1E;AAED,iBAAS,cAAc,CAAC,EACtB,OAAO,EACP,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,qBAUA;AAED,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAW5E;AAED,iBAAS,mBAAmB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAYzF;AAED,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAahF;AAED,OAAO,EACL,UAAU,EACV,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,kBAAkB,GACnB,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { Slot } from '@radix-ui/react-slot';
|
|
4
4
|
import { ChevronRight, MoreHorizontal } from 'lucide-react';
|
|
5
|
-
import { cn } from '../../lib/utils';
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
6
|
function Breadcrumb({ ...props }) {
|
|
7
7
|
return _jsx("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
|
|
8
8
|
}
|
|
@@ -6,6 +6,6 @@ declare const buttonVariants: (props?: ({
|
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
|
|
8
8
|
asChild?: boolean;
|
|
9
|
-
}):
|
|
9
|
+
}): React.JSX.Element;
|
|
10
10
|
export { Button, buttonVariants };
|
|
11
11
|
//# sourceMappingURL=button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,cAAc;;;8EA8BnB,CAAC;AAEF,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAO,EACP,IAAI,EACJ,OAAe,EACf,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,GAC/B,YAAY,CAAC,OAAO,cAAc,CAAC,GAAG;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,cAAc;;;8EA8BnB,CAAC;AAEF,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAO,EACP,IAAI,EACJ,OAAe,EACf,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,GAC/B,YAAY,CAAC,OAAO,cAAc,CAAC,GAAG;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,qBAUF;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -2,8 +2,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { Slot } from '@radix-ui/react-slot';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
|
-
import { cn } from '../../lib/utils';
|
|
6
|
-
const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-sm text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
|
+
const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-sm text-sm font-medium transition-all cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
|
|
7
7
|
variants: {
|
|
8
8
|
variant: {
|
|
9
9
|
default: 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { DayPicker } from 'react-day-picker';
|
|
3
3
|
export type CalendarProps = React.ComponentProps<typeof DayPicker>;
|
|
4
4
|
export type { DateRange } from 'react-day-picker';
|
|
5
|
-
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, numberOfMonths, components: componentsProp, ...props }: CalendarProps):
|
|
5
|
+
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, numberOfMonths, components: componentsProp, ...props }: CalendarProps): React.JSX.Element;
|
|
6
6
|
declare namespace Calendar {
|
|
7
7
|
var displayName: string;
|
|
8
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../src/components/ui/calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAM7C,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;AACnE,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAoDlD,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,UAAU,EACV,eAAsB,EACtB,aAAa,EACb,cAAc,EACd,UAAU,EAAE,cAAc,EAC1B,GAAG,KAAK,EACT,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../src/components/ui/calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAM7C,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;AACnE,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAoDlD,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,UAAU,EACV,eAAsB,EACtB,aAAa,EACb,cAAc,EACd,UAAU,EAAE,cAAc,EAC1B,GAAG,KAAK,EACT,EAAE,aAAa,qBAmEf;kBA3EQ,QAAQ;;;AA8EjB,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -2,8 +2,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { ChevronDown, ChevronLeft, ChevronRight } from 'lucide-react';
|
|
4
4
|
import { DayPicker } from 'react-day-picker';
|
|
5
|
-
import { cn } from '../../lib/utils';
|
|
6
|
-
import { buttonVariants } from './button';
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
|
+
import { buttonVariants } from './button.js';
|
|
7
7
|
/** Shared shell for each month/year `<select>` (invisible select over a text label). */
|
|
8
8
|
const dropdownFieldShell = 'relative inline-flex h-7 items-center';
|
|
9
9
|
const dropdownCaptionLabel = cn('relative z-[1] inline-flex h-7 w-auto items-center gap-1 px-1 text-sm', 'pointer-events-none select-none');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare function useShowCitation(): boolean;
|
|
2
|
-
export declare function BibTeXCitationMenuItem(): import("react
|
|
2
|
+
export declare function BibTeXCitationMenuItem(): import("react").JSX.Element | null;
|
|
3
3
|
export declare function Citation({ children, onOpenChange, }: {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
onOpenChange?: (open: boolean) => void;
|
|
6
|
-
}): import("react
|
|
6
|
+
}): import("react").JSX.Element | null;
|
|
7
7
|
//# sourceMappingURL=citation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"citation.d.ts","sourceRoot":"","sources":["../../../src/components/ui/citation.tsx"],"names":[],"mappings":"AAgFA,wBAAgB,eAAe,YAI9B;AAeD,wBAAgB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"citation.d.ts","sourceRoot":"","sources":["../../../src/components/ui/citation.tsx"],"names":[],"mappings":"AAgFA,wBAAgB,eAAe,YAI9B;AAeD,wBAAgB,sBAAsB,uCAuBrC;AAED,wBAAgB,QAAQ,CAAC,EACvB,QAAQ,EACR,YAAY,GACb,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC,sCA8GA"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger, DropdownMenuItem, } from '.';
|
|
2
|
+
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger, DropdownMenuItem, } from './index.js';
|
|
3
3
|
import { useFrontmatter, useProjectManifest } from '@myst-theme/providers';
|
|
4
|
-
import { getYear } from '../../lib/parse-date';
|
|
4
|
+
import { getYear } from '../../lib/parse-date.js';
|
|
5
5
|
import { doi } from 'doi-utils';
|
|
6
|
-
import { triggerBlobDownload } from './article-actions-downloads';
|
|
6
|
+
import { triggerBlobDownload } from './article-actions-downloads.js';
|
|
7
7
|
import { DownloadIcon, Copy, FileHeart } from 'lucide-react';
|
|
8
|
-
import { Button } from './button';
|
|
8
|
+
import { Button } from './button.js';
|
|
9
9
|
import { toast } from 'sonner';
|
|
10
|
-
import { useAnalytics } from '../providers';
|
|
10
|
+
import { useAnalytics } from '../providers/index.js';
|
|
11
11
|
function useCitationMetadata() {
|
|
12
12
|
const project = useProjectManifest();
|
|
13
13
|
const frontmatter = useFrontmatter();
|
|
@@ -15,7 +15,7 @@ export declare function CollapsibleBackmatterHeader({ id, title, linkTitle, hidd
|
|
|
15
15
|
isCollapsible: boolean;
|
|
16
16
|
className?: string;
|
|
17
17
|
buttonClassName?: string;
|
|
18
|
-
}):
|
|
18
|
+
}): React.JSX.Element;
|
|
19
19
|
export declare function CollapsibleBackmatterFooterButton({ hidden, onToggle, totalCount, itemLabel, sectionId, className, as: Wrapper, }: {
|
|
20
20
|
hidden: boolean;
|
|
21
21
|
onToggle: () => void;
|
|
@@ -24,5 +24,5 @@ export declare function CollapsibleBackmatterFooterButton({ hidden, onToggle, to
|
|
|
24
24
|
sectionId?: string;
|
|
25
25
|
className?: string;
|
|
26
26
|
as?: React.ElementType;
|
|
27
|
-
}):
|
|
27
|
+
}): React.JSX.Element;
|
|
28
28
|
//# sourceMappingURL=collapsible-backmatter-section.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapsible-backmatter-section.d.ts","sourceRoot":"","sources":["../../../src/components/ui/collapsible-backmatter-section.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AA+BxC,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,MAAM,EAClB,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,EACxB,YAAY,SAAK,GAChB;IACD,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,OAAO,CAAC;IACvB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B,CAcA;AAED,wBAAgB,2BAA2B,CAAC,EAC1C,EAAE,EACF,KAAK,EACL,SAAS,EACT,MAAM,EACN,QAAQ,EACR,aAAa,EACb,SAAS,EACT,eAAe,GAChB,EAAE;IACD,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,
|
|
1
|
+
{"version":3,"file":"collapsible-backmatter-section.d.ts","sourceRoot":"","sources":["../../../src/components/ui/collapsible-backmatter-section.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AA+BxC,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,MAAM,EAClB,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,EACxB,YAAY,SAAK,GAChB;IACD,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,OAAO,CAAC;IACvB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B,CAcA;AAED,wBAAgB,2BAA2B,CAAC,EAC1C,EAAE,EACF,KAAK,EACL,SAAS,EACT,MAAM,EACN,QAAQ,EACR,aAAa,EACb,SAAS,EACT,eAAe,GAChB,EAAE;IACD,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,qBA6BA;AAED,wBAAgB,iCAAiC,CAAC,EAChD,MAAM,EACN,QAAQ,EACR,UAAU,EACV,SAAS,EACT,SAAS,EACT,SAAS,EACT,EAAE,EAAE,OAAe,GACpB,EAAE;IACD,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;CACxB,qBAuBA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React, { useState } from 'react';
|
|
3
3
|
import { HashLink } from 'myst-to-react';
|
|
4
|
-
import { cn } from '../../lib/utils';
|
|
5
|
-
import { useAnalytics } from '../providers';
|
|
6
|
-
import { Button } from './button';
|
|
4
|
+
import { cn } from '../../lib/utils.js';
|
|
5
|
+
import { useAnalytics } from '../providers/index.js';
|
|
6
|
+
import { Button } from './button.js';
|
|
7
7
|
function trackBackmatterToggle(capture, { hidden, toggleLocation, sectionId, itemCount, itemLabel, }) {
|
|
8
8
|
capture(hidden ? 'content_backmatter_expanded' : 'content_backmatter_collapsed', {
|
|
9
9
|
surface: 'content',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
2
|
-
declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): import("react
|
|
3
|
-
declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): import("react
|
|
4
|
-
declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): import("react
|
|
2
|
+
declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): import("react").JSX.Element;
|
|
3
|
+
declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): import("react").JSX.Element;
|
|
4
|
+
declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): import("react").JSX.Element;
|
|
5
5
|
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
6
6
|
//# sourceMappingURL=collapsible.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../../../src/components/ui/collapsible.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,oBAAoB,MAAM,6BAA6B,CAAC;AAEpE,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC
|
|
1
|
+
{"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../../../src/components/ui/collapsible.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,oBAAoB,MAAM,6BAA6B,CAAC;AAEpE,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,+BAExF;AAED,iBAAS,kBAAkB,CAAC,EAC1B,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,kBAAkB,CAAC,+BAEtE;AAED,iBAAS,kBAAkB,CAAC,EAC1B,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,kBAAkB,CAAC,+BAEtE;AAED,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
interface CookieBannerProps {
|
|
2
3
|
className?: string;
|
|
3
4
|
message?: string;
|
|
4
5
|
privacyLink?: string;
|
|
5
6
|
}
|
|
6
|
-
export declare function CookieBanner({ className, message: messageProp, privacyLink: privacyLinkProp, }: CookieBannerProps):
|
|
7
|
+
export declare function CookieBanner({ className, message: messageProp, privacyLink: privacyLinkProp, }: CookieBannerProps): React.JSX.Element | null;
|
|
7
8
|
export {};
|
|
8
9
|
//# sourceMappingURL=cookie-banner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cookie-banner.d.ts","sourceRoot":"","sources":["../../../src/components/ui/cookie-banner.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cookie-banner.d.ts","sourceRoot":"","sources":["../../../src/components/ui/cookie-banner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,UAAU,iBAAiB;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,OAAO,EAAE,WAAW,EACpB,WAAW,EAAE,eAAe,GAC7B,EAAE,iBAAiB,4BAkEnB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { Button } from '.';
|
|
4
|
-
import { cn } from '../../lib/utils';
|
|
5
|
-
import { usePlatformSite } from '../providers/platform-providers';
|
|
3
|
+
import { Button } from './index.js';
|
|
4
|
+
import { cn } from '../../lib/utils.js';
|
|
5
|
+
import { usePlatformSite } from '../providers/platform-providers.js';
|
|
6
6
|
const DEFAULT_MESSAGE = 'We use cookies to enhance your experience on our website. By continuing to use this site, you consent to our use of cookies.';
|
|
7
7
|
const DEFAULT_PRIVACY_URL = 'https://curvenote.com/legal';
|
|
8
8
|
export function CookieBanner({ className, message: messageProp, privacyLink: privacyLinkProp, }) {
|
|
@@ -34,5 +34,5 @@ export function CookieBanner({ className, message: messageProp, privacyLink: pri
|
|
|
34
34
|
// };
|
|
35
35
|
if (!isVisible)
|
|
36
36
|
return null;
|
|
37
|
-
return (_jsx("div", { className: cn('fixed right-0 bottom-0 left-0 z-50 border-t shadow-lg backdrop-blur-md bg-background/60 dark:bg-background/50 border-border/50 dark:border-border/30', className), role: "banner", "aria-label": "Cookie consent", children: _jsx("div", { className: "container px-4 py-4 mx-auto", children: _jsxs("div", { className: "flex flex-col gap-4 justify-between items-start sm:flex-row sm:items-center", children: [_jsx("div", { className: "flex-1", children: _jsxs("p", { className: "text-sm text-muted-foreground", children: [message, ' ', _jsx("a", { href: privacyLink, className: "text-primary hover:underline underline-offset-4", children: "Learn more" }), "."] }) }), _jsx("div", { className: "flex flex-col gap-2 sm:flex-row shrink-0", children: _jsx(Button, { size: "sm", variant: "secondary", onClick: handleAccept, className: "whitespace-nowrap
|
|
37
|
+
return (_jsx("div", { className: cn('fixed right-0 bottom-0 left-0 z-50 border-t shadow-lg backdrop-blur-md bg-background/60 dark:bg-background/50 border-border/50 dark:border-border/30', className), role: "banner", "aria-label": "Cookie consent", children: _jsx("div", { className: "container px-4 py-4 mx-auto", children: _jsxs("div", { className: "flex flex-col gap-4 justify-between items-start sm:flex-row sm:items-center", children: [_jsx("div", { className: "flex-1", children: _jsxs("p", { className: "text-sm text-muted-foreground", children: [message, ' ', _jsx("a", { href: privacyLink, className: "text-primary hover:underline underline-offset-4", children: "Learn more" }), "."] }) }), _jsx("div", { className: "flex flex-col gap-2 sm:flex-row shrink-0", children: _jsx(Button, { size: "sm", variant: "secondary", onClick: handleAccept, className: "whitespace-nowrap", children: "Accept Cookies" }) })] }) }) }));
|
|
38
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-availability.d.ts","sourceRoot":"","sources":["../../../src/components/ui/data-availability.tsx"],"names":[],"mappings":"AAeA,wBAAgB,gBAAgB,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"data-availability.d.ts","sourceRoot":"","sources":["../../../src/components/ui/data-availability.tsx"],"names":[],"mappings":"AAeA,wBAAgB,gBAAgB,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,sCAuBrE"}
|
|
@@ -2,9 +2,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useFrontmatter, useReferences } from '@myst-theme/providers';
|
|
3
3
|
import { copyNode } from 'myst-common';
|
|
4
4
|
import { MyST, HashLink } from 'myst-to-react';
|
|
5
|
-
import { cn } from '../../lib/utils';
|
|
6
|
-
import { extractKnownParts } from '../../lib/knownParts';
|
|
7
|
-
import { PART_IDS } from './types';
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
|
+
import { extractKnownParts } from '../../lib/knownParts.js';
|
|
7
|
+
import { PART_IDS } from './types.js';
|
|
8
8
|
function useDataAvailability() {
|
|
9
9
|
const frontmatter = useFrontmatter();
|
|
10
10
|
const references = useReferences();
|
|
@@ -16,5 +16,5 @@ export function DataAvailability({ className }) {
|
|
|
16
16
|
const dataAvailability = useDataAvailability();
|
|
17
17
|
if (!dataAvailability)
|
|
18
18
|
return null;
|
|
19
|
-
return (_jsxs("section", { id: PART_IDS.data_availability, className: cn('min-w-full prose dark:prose-invert prose-sm', className), children: [_jsxs("header", { className: "text-lg font-semibold text-stone-900 dark:text-white group", children: ["Data Availability", _jsx(HashLink, { id: PART_IDS.data_availability, title: "Link to Data Availability", hover: true, className: "ml-2" })] }), _jsx("div", { className: cn('pl-3 mb-8 text-sm text-stone-500 dark:text-stone-300'), children: _jsx(MyST, { ast: dataAvailability }) })] }));
|
|
19
|
+
return (_jsxs("section", { id: PART_IDS.data_availability, className: cn('min-w-full prose dark:prose-invert prose-sm font-small', className), children: [_jsxs("header", { className: "text-lg font-semibold text-stone-900 dark:text-white group", children: ["Data Availability", _jsx(HashLink, { id: PART_IDS.data_availability, title: "Link to Data Availability", hover: true, className: "ml-2" })] }), _jsx("div", { className: cn('pl-3 mb-8 text-sm text-stone-500 dark:text-stone-300'), children: _jsx(MyST, { ast: dataAvailability }) })] }));
|
|
20
20
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UNSTABLE — hard-coded call-to-action button for Digital Hate Review, enabled with the
|
|
3
|
+
* `unstable_dhr_cta_buttons` design option. It renders above the title block, in the position
|
|
4
|
+
* breadcrumbs would occupy.
|
|
5
|
+
*
|
|
6
|
+
* Expect the option name and the button to change once this generalizes beyond a single
|
|
7
|
+
* journal.
|
|
8
|
+
*/
|
|
9
|
+
/** Degrees to rotate the natively left-pointing arrow, clockwise in SVG coordinates. */
|
|
10
|
+
declare const ROTATION: {
|
|
11
|
+
readonly left: 0;
|
|
12
|
+
readonly up: 90;
|
|
13
|
+
readonly right: 180;
|
|
14
|
+
readonly down: 270;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* A blocky, pixel-art arrow in a filled circle, drawn pointing left and rotated to face any of
|
|
18
|
+
* the four directions.
|
|
19
|
+
*/
|
|
20
|
+
export declare function PixelArrow({ direction, color, background, className, }: {
|
|
21
|
+
direction?: keyof typeof ROTATION;
|
|
22
|
+
color?: string;
|
|
23
|
+
background?: string;
|
|
24
|
+
className?: string;
|
|
25
|
+
}): import("react").JSX.Element;
|
|
26
|
+
export declare function DhrCtaButtons({ className }: {
|
|
27
|
+
className?: string;
|
|
28
|
+
}): import("react").JSX.Element | null;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=dhr-cta-buttons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dhr-cta-buttons.d.ts","sourceRoot":"","sources":["../../../src/components/ui/dhr-cta-buttons.tsx"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AAEH,wFAAwF;AACxF,QAAA,MAAM,QAAQ;;;;;CAAsD,CAAC;AAErE;;;GAGG;AACH,wBAAgB,UAAU,CAAC,EACzB,SAAkB,EAClB,KAAsB,EACtB,UAAoB,EACpB,SAAS,GACV,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,OAAO,QAAQ,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,+BAgCA;AAQD,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,sCAwBlE"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useBaseurl } from '@myst-theme/providers';
|
|
3
|
+
import { cn } from '../../lib/utils.js';
|
|
4
|
+
import { useDesign } from '../providers/design.js';
|
|
5
|
+
import { useIsIndexPage } from '../providers/page-providers.js';
|
|
6
|
+
/**
|
|
7
|
+
* UNSTABLE — hard-coded call-to-action button for Digital Hate Review, enabled with the
|
|
8
|
+
* `unstable_dhr_cta_buttons` design option. It renders above the title block, in the position
|
|
9
|
+
* breadcrumbs would occupy.
|
|
10
|
+
*
|
|
11
|
+
* Expect the option name and the button to change once this generalizes beyond a single
|
|
12
|
+
* journal.
|
|
13
|
+
*/
|
|
14
|
+
/** Degrees to rotate the natively left-pointing arrow, clockwise in SVG coordinates. */
|
|
15
|
+
const ROTATION = { left: 0, up: 90, right: 180, down: 270 };
|
|
16
|
+
/**
|
|
17
|
+
* A blocky, pixel-art arrow in a filled circle, drawn pointing left and rotated to face any of
|
|
18
|
+
* the four directions.
|
|
19
|
+
*/
|
|
20
|
+
export function PixelArrow({ direction = 'left', color = 'currentColor', background = 'white', className, }) {
|
|
21
|
+
return (_jsxs("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", focusable: "false", className: className, children: [_jsx("rect", { x: "24", y: "24", width: "24", height: "24", rx: "12", transform: "rotate(180 24 24)", fill: background }), _jsxs("g", { fill: color, transform: `rotate(${ROTATION[direction]} 12 12)`, children: [_jsx("path", { d: "M12.7969 16L11.1972 16L11.1972 14.4002L12.7969 14.4002L12.7969 16Z" }), _jsx("path", { d: "M11.2031 14.4001L9.60341 14.4001L9.60341 12.8003L11.2031 12.8003L11.2031 14.4001Z" }), _jsx("path", { d: "M12.7969 9.60071L11.1972 9.60071L11.1972 8.00089L12.7969 8.00089L12.7969 9.60071Z" }), _jsx("path", { d: "M11.2031 11.2006L9.60341 11.2006L9.60341 9.60075L11.2031 9.60075L11.2031 11.2006Z" }), _jsx("path", { d: "M9.60156 12.8003L8.00185 12.8003L8.00185 11.2005L9.60156 11.2005L9.60156 12.8003Z" }), _jsx("path", { d: "M11.2031 12.8003L9.60341 12.8003L9.60341 11.2005L11.2031 11.2005L11.2031 12.8003Z" }), _jsx("path", { d: "M12.7969 12.8003L11.1972 12.8003L11.1972 11.2005L12.7969 11.2005L12.7969 12.8003Z" }), _jsx("path", { d: "M14.3984 12.8004L12.7987 12.8004L12.7987 11.2005L14.3984 11.2005L14.3984 12.8004Z" }), _jsx("path", { d: "M16 12.8003L14.4003 12.8003L14.4003 11.2005L16 11.2005L16 12.8003Z" })] })] }));
|
|
22
|
+
}
|
|
23
|
+
/** Fill a `{slug}` placeholder in a URL template with the article's slug. */
|
|
24
|
+
function fillTemplate(template, baseurl) {
|
|
25
|
+
const slug = baseurl?.split('/').filter(Boolean).pop() ?? '';
|
|
26
|
+
return template.replace(/\{slug\}/g, slug);
|
|
27
|
+
}
|
|
28
|
+
export function DhrCtaButtons({ className }) {
|
|
29
|
+
const design = useDesign();
|
|
30
|
+
const isIndexPage = useIsIndexPage();
|
|
31
|
+
const baseurl = useBaseurl();
|
|
32
|
+
const option = design.unstable_dhr_cta_buttons;
|
|
33
|
+
if (!option)
|
|
34
|
+
return null;
|
|
35
|
+
// the article's main page goes back out to the site; its other pages go back to the main page
|
|
36
|
+
const { href, label } = isIndexPage
|
|
37
|
+
? { href: typeof option === 'string' ? fillTemplate(option, baseurl) : '/', label: 'Back' }
|
|
38
|
+
: { href: baseurl || '/', label: 'Full text' };
|
|
39
|
+
return (_jsx("nav", { "aria-label": "Article actions", className: cn('flex gap-3 mb-8', className), children: _jsxs("a", { href: href, className: "inline-flex gap-3 items-center py-1.5 pr-4 pl-1.5 font-mono text-sm text-black no-underline rounded-xs transition-opacity cursor-pointer bg-[#CACEE1] hover:opacity-90", children: [_jsx(PixelArrow, { direction: "left", className: "w-7 h-7 shrink-0" }), _jsx("span", { children: label })] }) }));
|
|
40
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
3
|
-
declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>):
|
|
4
|
-
declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>):
|
|
5
|
-
declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>):
|
|
6
|
-
declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>):
|
|
7
|
-
declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>):
|
|
3
|
+
declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): React.JSX.Element;
|
|
5
|
+
declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): React.JSX.Element;
|
|
6
|
+
declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): React.JSX.Element;
|
|
7
|
+
declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): React.JSX.Element;
|
|
8
8
|
declare function DialogContent({ className, children, showCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
9
9
|
showCloseButton?: boolean;
|
|
10
|
-
}):
|
|
11
|
-
declare function DialogHeader({ className, ...props }: React.ComponentProps<'div'>):
|
|
12
|
-
declare function DialogFooter({ className, ...props }: React.ComponentProps<'div'>):
|
|
13
|
-
declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>):
|
|
14
|
-
declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>):
|
|
10
|
+
}): React.JSX.Element;
|
|
11
|
+
declare function DialogHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
12
|
+
declare function DialogFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
13
|
+
declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): React.JSX.Element;
|
|
14
|
+
declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): React.JSX.Element;
|
|
15
15
|
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
16
16
|
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/components/ui/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAK1D,iBAAS,MAAM,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/components/ui/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAK1D,iBAAS,MAAM,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,qBAE9E;AAED,iBAAS,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,qBAExF;AAED,iBAAS,YAAY,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,MAAM,CAAC,qBAEtF;AAED,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,qBAEpF;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,qBAWtD;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,eAAsB,EACtB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,GAAG;IACxD,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,qBAyBA;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQzE;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQzE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,qBAQ/F;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,WAAW,CAAC,qBAQ1D;AAED,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
4
4
|
import { XIcon } from 'lucide-react';
|
|
5
|
-
import { cn } from '../../lib/utils';
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
6
|
function Dialog({ ...props }) {
|
|
7
7
|
return _jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
|
|
8
8
|
}
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
interface DocumentOutlineProps {
|
|
2
2
|
mdast: any;
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* How many levels of the outline to show, counted from the shallowest heading in the document
|
|
5
|
+
* rather than from `h1` — `1` lists only the top level. Acts as the layout's default; the
|
|
6
|
+
* `outline_maxdepth` design option takes precedence when a site sets one.
|
|
7
|
+
*/
|
|
8
|
+
maxLevels?: number;
|
|
4
9
|
className?: string;
|
|
5
10
|
}
|
|
6
|
-
|
|
11
|
+
/** Show the outline whenever there is at least one entry (heading or backmatter). */
|
|
12
|
+
export declare function shouldRenderDocumentOutline(itemCount: number): boolean;
|
|
13
|
+
/** Shallowest heading depth, or a stable fallback for backmatter-only outlines. */
|
|
14
|
+
export declare function resolveOutlineBaseDepth(headerDepths: number[]): number;
|
|
15
|
+
export declare function DocumentOutline({ mdast, maxLevels, className }: DocumentOutlineProps): import("react").JSX.Element | null;
|
|
7
16
|
export {};
|
|
8
17
|
//# sourceMappingURL=document-outline.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-outline.d.ts","sourceRoot":"","sources":["../../../src/components/ui/document-outline.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"document-outline.d.ts","sourceRoot":"","sources":["../../../src/components/ui/document-outline.tsx"],"names":[],"mappings":"AA8BA,UAAU,oBAAoB;IAC5B,KAAK,EAAE,GAAG,CAAC;IACX;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAMD,qFAAqF;AACrF,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAEtE;AAED,mFAAmF;AACnF,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,MAAM,CAGtE;AAqBD,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,oBAAoB,sCAwQpF"}
|