diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 120000 index 00000000..dc482f7c --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1 @@ +src/CHANGELOG.md \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 120000 index 00000000..da348fc8 --- /dev/null +++ b/LICENSE @@ -0,0 +1 @@ +src/LICENSE \ No newline at end of file diff --git a/README.md b/README.md new file mode 120000 index 00000000..351df1da --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +src/README.md \ No newline at end of file diff --git a/_lib/app/components/Authors.css.d.ts b/_lib/app/components/Authors.css.d.ts new file mode 100644 index 00000000..581bc6f0 --- /dev/null +++ b/_lib/app/components/Authors.css.d.ts @@ -0,0 +1,5 @@ +export declare const root: string; +export declare const authors: string; +export declare const link: string; +export declare const separator: string; +//# sourceMappingURL=Authors.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Authors.css.d.ts.map b/_lib/app/components/Authors.css.d.ts.map new file mode 100644 index 00000000..5871b179 --- /dev/null +++ b/_lib/app/components/Authors.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Authors.css.d.ts","sourceRoot":"","sources":["../../../app/components/Authors.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,QAGf,CAAA;AAEF,eAAO,MAAM,OAAO,QAKnB,CAAA;AAED,eAAO,MAAM,IAAI,QAShB,CAAA;AAED,eAAO,MAAM,SAAS,QAKrB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Authors.css.js b/_lib/app/components/Authors.css.js new file mode 100644 index 00000000..1173d5be --- /dev/null +++ b/_lib/app/components/Authors.css.js @@ -0,0 +1,20 @@ +import { style } from '@vanilla-extract/css'; +import { fontSizeVars, primitiveColorVars } from '../styles/vars.css.js'; +export const root = style({ + color: primitiveColorVars.text3, + fontSize: fontSizeVars[14], +}); +export const authors = style({ + color: primitiveColorVars.text, +}, 'authors'); +export const link = style({ + textDecoration: 'underline', + textUnderlineOffset: '2px', + ':hover': { + color: primitiveColorVars.text2, + }, +}, 'link'); +export const separator = style({ + color: primitiveColorVars.text3, +}, 'separator'); +//# sourceMappingURL=Authors.css.js.map \ No newline at end of file diff --git a/_lib/app/components/Authors.css.js.map b/_lib/app/components/Authors.css.js.map new file mode 100644 index 00000000..de13a27c --- /dev/null +++ b/_lib/app/components/Authors.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Authors.css.js","sourceRoot":"","sources":["../../../app/components/Authors.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAExE,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,KAAK,EAAE,kBAAkB,CAAC,KAAK;IAC/B,QAAQ,EAAE,YAAY,CAAC,EAAE,CAAC;CAC3B,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAC1B;IACE,KAAK,EAAE,kBAAkB,CAAC,IAAI;CAC/B,EACD,SAAS,CACV,CAAA;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CACvB;IACE,cAAc,EAAE,WAAW;IAC3B,mBAAmB,EAAE,KAAK;IAC1B,QAAQ,EAAE;QACR,KAAK,EAAE,kBAAkB,CAAC,KAAK;KAChC;CACF,EACD,MAAM,CACP,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAC5B;IACE,KAAK,EAAE,kBAAkB,CAAC,KAAK;CAChC,EACD,WAAW,CACZ,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Authors.d.ts b/_lib/app/components/Authors.d.ts new file mode 100644 index 00000000..b0eaa81e --- /dev/null +++ b/_lib/app/components/Authors.d.ts @@ -0,0 +1,6 @@ +export type AuthorsProps = { + authors?: string | string[]; + date?: string; +}; +export declare function Authors(props: AuthorsProps): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=Authors.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Authors.d.ts.map b/_lib/app/components/Authors.d.ts.map new file mode 100644 index 00000000..f246cd91 --- /dev/null +++ b/_lib/app/components/Authors.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Authors.d.ts","sourceRoot":"","sources":["../../../app/components/Authors.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,8CA6C1C"} \ No newline at end of file diff --git a/_lib/app/components/Authors.js b/_lib/app/components/Authors.js new file mode 100644 index 00000000..6e1bd4df --- /dev/null +++ b/_lib/app/components/Authors.js @@ -0,0 +1,39 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +import { Fragment, useMemo } from 'react'; +import { usePageData } from '../hooks/usePageData.js'; +import * as styles from './Authors.css.js'; +export function Authors(props) { + const { frontmatter } = usePageData(); + const { authors: authors_ = frontmatter?.authors, date = frontmatter?.date } = props; + const authors = useMemo(() => { + if (!authors_) + return undefined; + if (Array.isArray(authors_)) + return authors_; + return authors_.split(',').map((author) => author.trim()); + }, [authors_]); + const formattedDate = useMemo(() => { + if (!date) + return null; + const dateObject = new Date(date); + return dateObject.toLocaleDateString('en-US', { + year: 'numeric', + month: 'long', + day: 'numeric', + }); + }, [date]); + return (_jsxs("div", { className: styles.root, children: [formattedDate, authors && (formattedDate ? ' by ' : 'By '), _jsx("span", { className: styles.authors, children: authors?.map((author, index) => { + const { text, url } = parseAuthor(author); + return (_jsxs(Fragment, { children: [url ? (_jsx("a", { className: styles.link, href: url, target: "_blank", rel: "noopener noreferrer", children: text })) : (text), index < authors.length - 2 && _jsx("span", { className: styles.separator, children: ", " }), index < authors.length - 1 && _jsx("span", { className: styles.separator, children: " & " })] }, index)); + }) })] })); +} +function parseAuthor(author) { + const match = author.match(/\[(.+)\]\((.+)\)/); + if (!match) + return { text: author, url: undefined }; + return { + text: match[1], + url: match[2], + }; +} +//# sourceMappingURL=Authors.js.map \ No newline at end of file diff --git a/_lib/app/components/Authors.js.map b/_lib/app/components/Authors.js.map new file mode 100644 index 00000000..fb72f7d6 --- /dev/null +++ b/_lib/app/components/Authors.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Authors.js","sourceRoot":"","sources":["../../../app/components/Authors.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAA;AAO1C,MAAM,UAAU,OAAO,CAAC,KAAmB;IACzC,MAAM,EAAE,WAAW,EAAE,GAAG,WAAW,EAAE,CAAA;IAErC,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,WAAW,EAAE,OAAO,EAAE,IAAI,GAAG,WAAW,EAAE,IAAI,EAAE,GAAG,KAAK,CAAA;IAEpF,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,EAAE;QAC3B,IAAI,CAAC,QAAQ;YAAE,OAAO,SAAS,CAAA;QAC/B,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC;YAAE,OAAO,QAAQ,CAAA;QAC5C,OAAO,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAA;IAC3D,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAA;IAEd,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,EAAE;QACjC,IAAI,CAAC,IAAI;YAAE,OAAO,IAAI,CAAA;QACtB,MAAM,UAAU,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAA;QACjC,OAAO,UAAU,CAAC,kBAAkB,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CAAC,CAAC,CAAC;QACd,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;KACd,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/Banner.css.d.ts b/_lib/app/components/Banner.css.d.ts new file mode 100644 index 00000000..6f3fd14a --- /dev/null +++ b/_lib/app/components/Banner.css.d.ts @@ -0,0 +1,8 @@ +export declare const bannerBackgroundColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; +export declare const bannerHeight: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; +export declare const bannerTextColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; +export declare const root: string; +export declare const content: string; +export declare const inner: string; +export declare const closeButton: string; +//# sourceMappingURL=Banner.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Banner.css.d.ts.map b/_lib/app/components/Banner.css.d.ts.map new file mode 100644 index 00000000..e1edd351 --- /dev/null +++ b/_lib/app/components/Banner.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Banner.css.d.ts","sourceRoot":"","sources":["../../../app/components/Banner.css.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,qBAAqB,oFAAqC,CAAA;AACvE,eAAO,MAAM,YAAY,oFAA4B,CAAA;AACrD,eAAO,MAAM,eAAe,oFAA+B,CAAA;AAE3D,eAAO,MAAM,IAAI,QAcf,CAAA;AAEF,eAAO,MAAM,OAAO,QAenB,CAAA;AAED,eAAO,MAAM,KAAK,QAUjB,CAAA;AAED,eAAO,MAAM,WAAW,QAYvB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Banner.css.js b/_lib/app/components/Banner.css.js new file mode 100644 index 00000000..b44683da --- /dev/null +++ b/_lib/app/components/Banner.css.js @@ -0,0 +1,57 @@ +import { createVar, fallbackVar, globalStyle, style } from '@vanilla-extract/css'; +import { fontSizeVars, primitiveColorVars, spaceVars, viewportVars, zIndexVars, } from '../styles/vars.css.js'; +export const bannerBackgroundColor = createVar('bannerBackgroundColor'); +export const bannerHeight = createVar('bannerHeight'); +export const bannerTextColor = createVar('bannerTextColor'); +export const root = style({ + backgroundColor: fallbackVar(bannerBackgroundColor, primitiveColorVars.backgroundAccent), + borderBottom: `1px solid ${fallbackVar(bannerBackgroundColor, primitiveColorVars.borderAccent)}`, + color: fallbackVar(bannerTextColor, primitiveColorVars.backgroundAccentText), + height: fallbackVar(bannerHeight, '36px'), + position: 'fixed', + top: 0, + width: '100%', + zIndex: zIndexVars.gutterTop, + '@media': { + [viewportVars['max-1080px']]: { + position: 'initial', + }, + }, +}); +export const content = style({ + fontSize: fontSizeVars[14], + overflowX: 'scroll', + paddingLeft: spaceVars[8], + paddingRight: spaceVars[8], + marginRight: spaceVars[24], + msOverflowStyle: 'none', + scrollbarWidth: 'none', + whiteSpace: 'pre', + '::-webkit-scrollbar': { + display: 'none', + }, +}, 'content'); +export const inner = style({ + alignItems: 'center', + display: 'flex', + height: '100%', + justifyContent: 'center', + position: 'relative', + width: '100%', +}, 'inner'); +export const closeButton = style({ + alignItems: 'center', + backgroundColor: fallbackVar(bannerBackgroundColor, primitiveColorVars.backgroundAccent), + display: 'flex', + justifyContent: 'center', + height: '100%', + position: 'absolute', + right: 0, + width: spaceVars[24], +}, 'closeButton'); +globalStyle(`${content} a`, { + fontWeight: '400', + textUnderlineOffset: '2px', + textDecoration: 'underline', +}); +//# sourceMappingURL=Banner.css.js.map \ No newline at end of file diff --git a/_lib/app/components/Banner.css.js.map b/_lib/app/components/Banner.css.js.map new file mode 100644 index 00000000..1f9b09c2 --- /dev/null +++ b/_lib/app/components/Banner.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Banner.css.js","sourceRoot":"","sources":["../../../app/components/Banner.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AACjF,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,SAAS,EACT,YAAY,E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G,KAAK,CACxB;IACE,UAAU,EAAE,QAAQ;IACpB,OAAO,EAAE,MAAM;IACf,MAAM,EAAE,MAAM;IACd,cAAc,EAAE,QAAQ;IACxB,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,MAAM;CACd,EACD,OAAO,CACR,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAC9B;IACE,UAAU,EAAE,QAAQ;IACpB,eAAe,EAAE,WAAW,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,gBAAgB,CAAC;IACxF,OAAO,EAAE,MAAM;IACf,cAAc,EAAE,QAAQ;IACxB,MAAM,EAAE,MAAM;IACd,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,SAAS,CAAC,EAAE,CAAC;CACrB,EACD,aAAa,CACd,CAAA;AAED,WAAW,CAAC,GAAG,OAAO,IAAI,EAAE;IAC1B,UAAU,EAAE,KAAK;IACjB,mBAAmB,EAAE,KAAK;IAC1B,cAAc,EAAE,WAAW;CAC5B,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Banner.d.ts b/_lib/app/components/Banner.d.ts new file mode 100644 index 00000000..590b480f --- /dev/null +++ b/_lib/app/components/Banner.d.ts @@ -0,0 +1,6 @@ +import * as runtime from 'react/jsx-runtime'; +export type BannerProps = { + hide?: () => void; +}; +export declare function Banner({ hide }: BannerProps): runtime.JSX.Element | null; +//# sourceMappingURL=Banner.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Banner.d.ts.map b/_lib/app/components/Banner.d.ts.map new file mode 100644 index 00000000..de050be8 --- /dev/null +++ b/_lib/app/components/Banner.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../app/components/Banner.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAA;AAM5C,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,CAAC,EAAE,MAAM,IAAI,CAAA;CAClB,CAAA;AAED,wBAAgB,MAAM,CAAC,EAAE,IAAI,EAAE,EAAE,WAAW,8BA+B3C"} \ No newline at end of file diff --git a/_lib/app/components/Banner.js b/_lib/app/components/Banner.js new file mode 100644 index 00000000..9b577dd7 --- /dev/null +++ b/_lib/app/components/Banner.js @@ -0,0 +1,29 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +import { runSync } from '@mdx-js/mdx'; +import { Cross1Icon } from '@radix-ui/react-icons'; +import { assignInlineVars } from '@vanilla-extract/dynamic'; +import clsx from 'clsx'; +import { Fragment, useMemo } from 'react'; +import * as runtime from 'react/jsx-runtime'; +import { useConfig } from '../hooks/useConfig.js'; +import { deserializeElement } from '../utils/deserializeElement.js'; +import * as styles from './Banner.css.js'; +export function Banner({ hide }) { + const { banner } = useConfig(); + const ConsumerBanner = useMemo(() => { + const content = banner?.content ?? ''; + if (!content) + return null; + if (typeof content !== 'string') + return () => deserializeElement(content); + const { default: MDXBanner } = runSync(content, { ...runtime, Fragment }); + return MDXBanner; + }, [banner]); + if (!ConsumerBanner) + return null; + return (_jsx("div", { className: clsx(styles.root), style: assignInlineVars({ + [styles.bannerBackgroundColor]: banner?.backgroundColor, + [styles.bannerTextColor]: banner?.textColor, + }), children: _jsxs("div", { className: clsx(styles.inner), children: [_jsx("div", { className: clsx(styles.content), children: _jsx(ConsumerBanner, {}) }), banner?.dismissable !== 'false' && (_jsx("button", { className: clsx(styles.closeButton), onClick: hide, type: "button", children: _jsx(Cross1Icon, { width: 14, height: 14 }) }))] }) })); +} +//# sourceMappingURL=Banner.js.map \ No newline at end of file diff --git a/_lib/app/components/Banner.js.map b/_lib/app/components/Banner.js.map new file mode 100644 index 00000000..92321cd1 --- /dev/null +++ b/_lib/app/components/Banner.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Banner.js","sourceRoot":"","sources":["../../../app/components/Banner.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa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S;SAC5C,CAAC,YAEF,eAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,aAChC,cAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,YAClC,KAAC,cAAc,KAAG,GACd,EACL,MAAM,EAAE,WAAW,KAAM,OAA8B,IAAI,CAC1D,iBAAQ,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAC,QAAQ,YACvE,KAAC,UAAU,IAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,GAAI,GAC9B,CACV,IACG,GACF,CACP,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/BlogPosts.css.d.ts b/_lib/app/components/BlogPosts.css.d.ts new file mode 100644 index 00000000..7328d174 --- /dev/null +++ b/_lib/app/components/BlogPosts.css.d.ts @@ -0,0 +1,7 @@ +export declare const root: string; +export declare const description: string; +export declare const divider: string; +export declare const post: string; +export declare const readMore: string; +export declare const title: string; +//# sourceMappingURL=BlogPosts.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/BlogPosts.css.d.ts.map b/_lib/app/components/BlogPosts.css.d.ts.map new file mode 100644 index 00000000..de4e1da5 --- /dev/null +++ b/_lib/app/components/BlogPosts.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"BlogPosts.css.d.ts","sourceRoot":"","sources":["../../../app/components/BlogPosts.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,QAIf,CAAA;AAEF,eAAO,MAAM,WAAW,QAKvB,CAAA;AAED,eAAO,MAAM,OAAO,QAKnB,CAAA;AAED,eAAO,MAAM,IAAI,QAAoB,CAAA;AAErC,eAAO,MAAM,QAAQ,QASpB,CAAA;AAED,eAAO,MAAM,KAAK,QAMjB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/BlogPosts.css.js b/_lib/app/components/BlogPosts.css.js new file mode 100644 index 00000000..557679e6 --- /dev/null +++ b/_lib/app/components/BlogPosts.css.js @@ -0,0 +1,26 @@ +import { style } from '@vanilla-extract/css'; +import { fontSizeVars, fontWeightVars, primitiveColorVars, spaceVars } from '../styles/vars.css.js'; +export const root = style({ + display: 'flex', + flexDirection: 'column', + gap: spaceVars['32'], +}); +export const description = style({ + marginTop: spaceVars['16'], +}, 'description'); +export const divider = style({ + borderColor: primitiveColorVars.background4, +}, 'divider'); +export const post = style({}, 'post'); +export const readMore = style({ + selectors: { + [`${post}:hover &`]: { + color: primitiveColorVars.textAccent, + }, + }, +}, 'readMore'); +export const title = style({ + fontSize: fontSizeVars.h2, + fontWeight: fontWeightVars.semibold, +}, 'title'); +//# sourceMappingURL=BlogPosts.css.js.map \ No newline at end of file diff --git a/_lib/app/components/BlogPosts.css.js.map b/_lib/app/components/BlogPosts.css.js.map new file mode 100644 index 00000000..19f31534 --- /dev/null +++ b/_lib/app/components/BlogPosts.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BlogPosts.css.js","sourceRoot":"","sources":["../../../app/components/BlogPosts.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEnG,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,QAAQ;IACvB,GAAG,EAAE,SAAS,CAAC,IAAI,CAAC;CACrB,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAC9B;IACE,SAAS,EAAE,SAAS,CAAC,IAAI,CAAC;CAC3B,EACD,aAAa,CACd,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAC1B;IACE,WAAW,EAAE,kBAAkB,CAAC,WAAW;CAC5C,EACD,SAAS,CACV,CAAA;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC,EAAE,EAAE,MAAM,CAAC,CAAA;AAErC,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAC3B;IACE,SAAS,EAAE;QACT,CAAC,GAAG,IAAI,UAAU,CAAC,EAAE;YACnB,KAAK,EAAE,kBAAkB,CAAC,UAAU;SACrC;KACF;CACF,EACD,UAAU,CACX,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CACxB;IACE,QAAQ,EAAE,YAAY,CAAC,EAAE;IACzB,UAAU,EAAE,cAAc,CAAC,QAAQ;CACpC,EACD,OAAO,CACR,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/BlogPosts.d.ts b/_lib/app/components/BlogPosts.d.ts new file mode 100644 index 00000000..e3bab2b8 --- /dev/null +++ b/_lib/app/components/BlogPosts.d.ts @@ -0,0 +1,2 @@ +export declare function BlogPosts(): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=BlogPosts.d.js.map \ No newline at end of file diff --git a/_lib/app/components/BlogPosts.d.ts.map b/_lib/app/components/BlogPosts.d.ts.map new file mode 100644 index 00000000..1fcf73a9 --- /dev/null +++ b/_lib/app/components/BlogPosts.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"BlogPosts.d.ts","sourceRoot":"","sources":["../../../app/components/BlogPosts.tsx"],"names":[],"mappings":"AAOA,wBAAgB,SAAS,+CAmBxB"} \ No newline at end of file diff --git a/_lib/app/components/BlogPosts.js b/_lib/app/components/BlogPosts.js new file mode 100644 index 00000000..54429b9c --- /dev/null +++ b/_lib/app/components/BlogPosts.js @@ -0,0 +1,10 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +import { Fragment } from 'react'; +import { posts } from 'virtual:blog'; +import { Authors } from './Authors.js'; +import * as styles from './BlogPosts.css.js'; +import { RouterLink } from './RouterLink.js'; +export function BlogPosts() { + return (_jsx("div", { className: styles.root, children: posts.map((post, index) => (_jsxs(Fragment, { children: [_jsx("div", { className: styles.post, children: _jsxs(RouterLink, { to: post.path, children: [_jsx("h2", { className: styles.title, children: post.title }), _jsx(Authors, { authors: post.authors, date: post.date }), _jsxs("p", { className: styles.description, children: [post.description, " ", _jsx("span", { className: styles.readMore, children: "[\u2192]" })] })] }) }), index < posts.length - 1 && _jsx("hr", { className: styles.divider })] }, index))) })); +} +//# sourceMappingURL=BlogPosts.js.map \ No newline at end of file diff --git a/_lib/app/components/BlogPosts.js.map b/_lib/app/components/BlogPosts.js.map new file mode 100644 index 00000000..ff0a0cc6 --- /dev/null +++ b/_lib/app/components/BlogPosts.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BlogPosts.js","sourceRoot":"","sources":["../../../app/components/BlogPosts.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAEpC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,MAAM,UAAU,SAAS;IACvB,OAAO,CACL,cAAK,SAAS,EAAE,MAAM,CAAC,IAAI,YACxB,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC1B,MAAC,QAAQ,eACP,cAAK,SAAS,EAAE,MAAM,CAAC,IAAI,YACzB,MAAC,UAAU,IAAC,EAAE,EAAE,IAAI,CAAC,IAAI,aACvB,aAAI,SAAS,EAAE,MAAM,CAAC,KAAK,YAAG,IAAI,CAAC,KAAK,GAAM,EAC9C,KAAC,OAAO,IAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,EACnD,aAAG,SAAS,EAAE,MAAM,CAAC,WAAW,aAC7B,IAAI,CAAC,WAAW,OAAE,eAAM,SAAS,EAAE,MAAM,CAAC,QAAQ,yBAAY,IAC7D,IACO,GACT,EACL,KAAK,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,aAAI,SAAS,EAAE,MAAM,CAAC,OAAO,GAAI,KAVjD,KAAK,CAWT,CACZ,CAAC,GACE,CACP,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/Button.css.d.ts b/_lib/app/components/Button.css.d.ts new file mode 100644 index 00000000..273c9b94 --- /dev/null +++ b/_lib/app/components/Button.css.d.ts @@ -0,0 +1,3 @@ +export declare const button: string; +export declare const button_accent: string; +//# sourceMappingURL=Button.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Button.css.d.ts.map b/_lib/app/components/Button.css.d.ts.map new file mode 100644 index 00000000..9290bac1 --- /dev/null +++ b/_lib/app/components/Button.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Button.css.d.ts","sourceRoot":"","sources":["../../../app/components/Button.css.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,MAAM,QAsBlB,CAAA;AAED,eAAO,MAAM,aAAa,QAYzB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Button.css.js b/_lib/app/components/Button.css.js new file mode 100644 index 00000000..4e870659 --- /dev/null +++ b/_lib/app/components/Button.css.js @@ -0,0 +1,33 @@ +import { style } from '@vanilla-extract/css'; +import { borderRadiusVars, fontSizeVars, fontWeightVars, primitiveColorVars, spaceVars, } from '../styles/vars.css.js'; +export const button = style({ + alignItems: 'center', + background: primitiveColorVars.background4, + border: `1px solid ${primitiveColorVars.border}`, + borderRadius: borderRadiusVars['4'], + color: primitiveColorVars.text, + display: 'flex', + fontSize: fontSizeVars['14'], + fontWeight: fontWeightVars.medium, + height: '36px', + padding: `0 ${spaceVars['16']}`, + transition: 'background 0.1s', + selectors: { + '&:hover': { + background: primitiveColorVars.background3, + }, + }, + whiteSpace: 'pre', + width: 'fit-content', +}, 'button'); +export const button_accent = style({ + background: primitiveColorVars.backgroundAccent, + color: primitiveColorVars.backgroundAccentText, + border: `1px solid ${primitiveColorVars.borderAccent}`, + selectors: { + '&:hover': { + background: primitiveColorVars.backgroundAccentHover, + }, + }, +}, 'button_accent'); +//# sourceMappingURL=Button.css.js.map \ No newline at end of file diff --git a/_lib/app/components/Button.css.js.map b/_lib/app/components/Button.css.js.map new file mode 100644 index 00000000..b154cbfb --- /dev/null +++ b/_lib/app/components/Button.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Button.css.js","sourceRoot":"","sources":["../../../app/components/Button.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,SAAS,GACV,MAAM,uBAAuB,CAAA;AAE9B,MAAM,CAAC,MAAM,MAAM,GAAG,KAAK,CACzB;IACE,UAAU,EAAE,QAAQ;IACpB,UAAU,EAAE,kBAAkB,CAAC,WAAW;IAC1C,MAAM,EAAE,aAAa,kBAAkB,CAAC,MAAM,EAAE;IAChD,YAAY,EAAE,gBAAgB,CAAC,GAAG,CAAC;IACnC,KAAK,EAAE,kBAAkB,CAAC,IAAI;IAC9B,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC;IAC5B,UAAU,EAAE,cAAc,CAAC,MAAM;IACjC,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,KAAK,SAAS,CAAC,IAAI,CAAC,EAAE;IAC/B,UAAU,EAAE,iBAAiB;IAC7B,SAAS,EAAE;QACT,SAAS,EAAE;YACT,UAAU,EAAE,kBAAkB,CAAC,WAAW;SAC3C;KACF;IACD,UAAU,EAAE,KAAK;IACjB,KAAK,EAAE,aAAa;CACrB,EACD,QAAQ,CACT,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,CAChC;IACE,UAAU,EAAE,kBAAkB,CAAC,gBAAgB;IAC/C,KAAK,EAAE,kBAAkB,CAAC,oBAAoB;IAC9C,MAAM,EAAE,aAAa,kBAAkB,CAAC,YAAY,EAAE;IACtD,SAAS,EAAE;QACT,SAAS,EAAE;YACT,UAAU,EAAE,kBAAkB,CAAC,qBAAqB;SACrD;KACF;CACF,EACD,eAAe,CAChB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Button.d.ts b/_lib/app/components/Button.d.ts new file mode 100644 index 00000000..c6a1edfc --- /dev/null +++ b/_lib/app/components/Button.d.ts @@ -0,0 +1,9 @@ +import type { ReactNode } from 'react'; +export type ButtonProps = { + children: ReactNode; + className?: string; + href?: string; + variant?: 'accent'; +}; +export declare function Button({ children, className, href, variant }: ButtonProps): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=Button.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Button.d.ts.map b/_lib/app/components/Button.d.ts.map new file mode 100644 index 00000000..57118121 --- /dev/null +++ b/_lib/app/components/Button.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../app/components/Button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKtC,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,QAAQ,CAAA;CACnB,CAAA;AAED,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,WAAW,8CAUzE"} \ No newline at end of file diff --git a/_lib/app/components/Button.js b/_lib/app/components/Button.js new file mode 100644 index 00000000..5d19b514 --- /dev/null +++ b/_lib/app/components/Button.js @@ -0,0 +1,8 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import clsx from 'clsx'; +import * as styles from './Button.css.js'; +import { Link } from './Link.js'; +export function Button({ children, className, href, variant }) { + return (_jsx(Link, { className: clsx(className, styles.button, variant === 'accent' && styles.button_accent), href: href, variant: "styleless", children: children })); +} +//# sourceMappingURL=Button.js.map \ No newline at end of file diff --git a/_lib/app/components/Button.js.map b/_lib/app/components/Button.js.map new file mode 100644 index 00000000..6023caf3 --- /dev/null +++ b/_lib/app/components/Button.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../app/components/Button.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAA;AAGvB,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAA;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAShC,MAAM,UAAU,MAAM,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAe;IACxE,OAAO,CACL,KAAC,IAAI,IACH,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,KAAK,QAAQ,IAAI,MAAM,CAAC,aAAa,CAAC,EACvF,IAAI,EAAE,IAAI,EACV,OAAO,EAAC,WAAW,YAElB,QAAQ,GACJ,CACR,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/Callout.css.d.ts b/_lib/app/components/Callout.css.d.ts new file mode 100644 index 00000000..eb398f4e --- /dev/null +++ b/_lib/app/components/Callout.css.d.ts @@ -0,0 +1,8 @@ +export declare const root: string; +export declare const note: string; +export declare const info: string; +export declare const warning: string; +export declare const danger: string; +export declare const tip: string; +export declare const success: string; +//# sourceMappingURL=Callout.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Callout.css.d.ts.map b/_lib/app/components/Callout.css.d.ts.map new file mode 100644 index 00000000..789a58cf --- /dev/null +++ b/_lib/app/components/Callout.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Callout.css.d.ts","sourceRoot":"","sources":["../../../app/components/Callout.css.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,IAAI,QAkBf,CAAA;AAEF,eAAO,MAAM,IAAI,QAOhB,CAAA;AAED,eAAO,MAAM,IAAI,QAOhB,CAAA;AAED,eAAO,MAAM,OAAO,QAOnB,CAAA;AAED,eAAO,MAAM,MAAM,QAOlB,CAAA;AAED,eAAO,MAAM,GAAG,QAOf,CAAA;AAED,eAAO,MAAM,OAAO,QAOnB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Callout.css.js b/_lib/app/components/Callout.css.js new file mode 100644 index 00000000..53f5e9b6 --- /dev/null +++ b/_lib/app/components/Callout.css.js @@ -0,0 +1,53 @@ +import { style } from '@vanilla-extract/css'; +import { borderRadiusVars, fontSizeVars, semanticColorVars, spaceVars, viewportVars, } from '../styles/vars.css.js'; +import { content as stepContent } from './Step.css.js'; +export const root = style({ + borderRadius: borderRadiusVars['4'], + fontSize: fontSizeVars['14'], + padding: `${spaceVars['16']} ${spaceVars['20']}`, + marginBottom: spaceVars['16'], + selectors: { + [`:not(${stepContent}) > &`]: { + '@media': { + [viewportVars['max-720px']]: { + borderRadius: 0, + borderLeftWidth: 0, + borderRightWidth: 0, + marginLeft: `calc(-1 * ${spaceVars['16']})`, + marginRight: `calc(-1 * ${spaceVars['16']})`, + }, + }, + }, + }, +}); +export const note = style({ + backgroundColor: semanticColorVars.noteBackground, + border: `1px solid ${semanticColorVars.noteBorder}`, + color: semanticColorVars.noteText, +}, 'note'); +export const info = style({ + backgroundColor: semanticColorVars.infoBackground, + border: `1px solid ${semanticColorVars.infoBorder}`, + color: semanticColorVars.infoText, +}, 'info'); +export const warning = style({ + backgroundColor: semanticColorVars.warningBackground, + border: `1px solid ${semanticColorVars.warningBorder}`, + color: semanticColorVars.warningText, +}, 'warning'); +export const danger = style({ + backgroundColor: semanticColorVars.dangerBackground, + border: `1px solid ${semanticColorVars.dangerBorder}`, + color: semanticColorVars.dangerText, +}, 'danger'); +export const tip = style({ + backgroundColor: semanticColorVars.tipBackground, + border: `1px solid ${semanticColorVars.tipBorder}`, + color: semanticColorVars.tipText, +}, 'tip'); +export const success = style({ + backgroundColor: semanticColorVars.successBackground, + border: `1px solid ${semanticColorVars.successBorder}`, + color: semanticColorVars.successText, +}, 'success'); +//# sourceMappingURL=Callout.css.js.map \ No newline at end of file diff --git a/_lib/app/components/Callout.css.js.map b/_lib/app/components/Callout.css.js.map new file mode 100644 index 00000000..87177277 --- /dev/null +++ b/_lib/app/components/Callout.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Callout.css.js","sourceRoot":"","sources":["../../../app/components/Callout.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE5C,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,YAAY,GACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAA;AAEtD,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,YAAY,EAAE,gBAAgB,CAAC,GAAG,CAAC;IACnC,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC;IAC5B,OAAO,EAAE,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,EAAE;IAChD,YAAY,EAAE,SAAS,CAAC,IAAI,CAAC;IAC7B,SAAS,EAAE;QACT,CAAC,QAAQ,WAAW,OAAO,CAAC,EAAE;YAC5B,QAAQ,EAAE;gBACR,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,EAAE;oBAC3B,YAAY,EAAE,CAAC;oBACf,eAAe,EAAE,CAAC;oBAClB,gBAAgB,EAAE,CAAC;oBACnB,UAAU,EAAE,aAAa,SAAS,CAAC,IAAI,CAAC,GAAG;oBAC3C,WAAW,EAAE,aAAa,SAAS,CAAC,IAAI,CAAC,GAAG;iBAC7C;aACF;SACF;KACF;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAC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.ts new file mode 100644 index 00000000..494d54b8 --- /dev/null +++ b/_lib/app/components/Callout.d.ts @@ -0,0 +1,9 @@ +import { type ClassValue } from 'clsx'; +import { type ReactNode } from 'react'; +export type CalloutProps = { + className: ClassValue; + children: ReactNode; + type: 'note' | 'info' | 'warning' | 'danger' | 'tip' | 'success'; +}; +export declare function Callout({ className, children, type }: CalloutProps): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=Callout.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Callout.d.ts.map b/_lib/app/components/Callout.d.ts.map new file mode 100644 index 00000000..1ca737a2 --- /dev/null +++ b/_lib/app/components/Callout.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Callout.d.ts","sourceRoot":"","sources":["../../../app/components/Callout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAA;AAC5C,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAItC,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,UAAU,CAAA;IACrB,QAAQ,EAAE,SAAS,CAAA;IACnB,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAA;CACjE,CAAA;AAED,wBAAgB,OAAO,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,YAAY,8CAElE"} \ No newline at end of file diff --git a/_lib/app/components/Callout.js b/_lib/app/components/Callout.js new file mode 100644 index 00000000..cd78cfc6 --- /dev/null +++ b/_lib/app/components/Callout.js @@ -0,0 +1,8 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import * as styles from './Callout.css.js'; +export function Callout({ className, children, type }) { + return _jsx("aside", { className: clsx(className, styles.root, styles[type]), children: children }); +} +//# sourceMappingURL=Callout.js.map \ No newline at end of file diff --git a/_lib/app/components/Callout.js.map b/_lib/app/components/Callout.js.map new file mode 100644 index 00000000..c217bde3 --- /dev/null +++ b/_lib/app/components/Callout.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Callout.js","sourceRoot":"","sources":["../../../app/components/Callout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAmB,IAAI,EAAE,MAAM,MAAM,CAAA;AAC5C,OAAO,EAAkB,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAA;AAQ1C,MAAM,UAAU,OAAO,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAgB;IACjE,OAAO,gBAAO,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,YAAG,QAAQ,GAAS,CAAA;AACzF,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/CalloutTitle.css.d.ts b/_lib/app/components/CalloutTitle.css.d.ts new file mode 100644 index 00000000..00ee4f0a --- /dev/null +++ b/_lib/app/components/CalloutTitle.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=CalloutTitle.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/CalloutTitle.css.d.ts.map b/_lib/app/components/CalloutTitle.css.d.ts.map new file mode 100644 index 00000000..743c4471 --- /dev/null +++ b/_lib/app/components/CalloutTitle.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"CalloutTitle.css.d.ts","sourceRoot":"","sources":["../../../app/components/CalloutTitle.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,QAIf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/CalloutTitle.css.js b/_lib/app/components/CalloutTitle.css.js new file mode 100644 index 00000000..daf89be0 --- /dev/null +++ b/_lib/app/components/CalloutTitle.css.js @@ -0,0 +1,8 @@ +import { style } from '@vanilla-extract/css'; +import { fontSizeVars } from '../styles/vars.css.js'; +export const root = style({ + fontSize: fontSizeVars['12'], + letterSpacing: '0.02em', + textTransform: 'uppercase', +}); +//# sourceMappingURL=CalloutTitle.css.js.map \ No newline at end of file diff --git a/_lib/app/components/CalloutTitle.css.js.map b/_lib/app/components/CalloutTitle.css.js.map new file mode 100644 index 00000000..66128c7b --- /dev/null +++ b/_lib/app/components/CalloutTitle.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CalloutTitle.css.js","sourceRoot":"","sources":["../../../app/components/CalloutTitle.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEpD,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC;IAC5B,aAAa,EAAE,QAAQ;IACvB,aAAa,EAAE,WAAW;CAC3B,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/CalloutTitle.d.ts b/_lib/app/components/CalloutTitle.d.ts new file mode 100644 index 00000000..cb2d1f78 --- /dev/null +++ b/_lib/app/components/CalloutTitle.d.ts @@ -0,0 +1,7 @@ +import { type ClassValue } from 'clsx'; +export type CalloutTitleProps = { + className: ClassValue; + children: string; +}; +export declare function CalloutTitle({ className, children }: CalloutTitleProps): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=CalloutTitle.d.js.map \ No newline at end of file diff --git a/_lib/app/components/CalloutTitle.d.ts.map b/_lib/app/components/CalloutTitle.d.ts.map new file mode 100644 index 00000000..343e45bc --- /dev/null +++ b/_lib/app/components/CalloutTitle.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"CalloutTitle.d.ts","sourceRoot":"","sources":["../../../app/components/CalloutTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAA;AAI5C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,UAAU,CAAA;IACrB,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,iBAAiB,8CAEtE"} \ No newline at end of file diff --git a/_lib/app/components/CalloutTitle.js b/_lib/app/components/CalloutTitle.js new file mode 100644 index 00000000..f5e19f01 --- /dev/null +++ b/_lib/app/components/CalloutTitle.js @@ -0,0 +1,7 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import * as styles from './CalloutTitle.css.js'; +export function CalloutTitle({ className, children }) { + return _jsx("strong", { className: clsx(className, styles.root), children: children }); +} +//# sourceMappingURL=CalloutTitle.js.map \ No newline at end of file diff --git a/_lib/app/components/CalloutTitle.js.map b/_lib/app/components/CalloutTitle.js.map new file mode 100644 index 00000000..cad75c4a --- /dev/null +++ b/_lib/app/components/CalloutTitle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CalloutTitle.js","sourceRoot":"","sources":["../../../app/components/CalloutTitle.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAmB,IAAI,EAAE,MAAM,MAAM,CAAA;AAE5C,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAA;AAO/C,MAAM,UAAU,YAAY,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAqB;IACrE,OAAO,iBAAQ,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,YAAG,QAAQ,GAAU,CAAA;AAC7E,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/Content.css.d.ts b/_lib/app/components/Content.css.d.ts new file mode 100644 index 00000000..a3cb9dc2 --- /dev/null +++ b/_lib/app/components/Content.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=Content.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Content.css.d.ts.map b/_lib/app/components/Content.css.d.ts.map new file mode 100644 index 00000000..b3e7b3cd --- /dev/null +++ b/_lib/app/components/Content.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Content.css.d.ts","sourceRoot":"","sources":["../../../app/components/Content.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,QAKf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Content.css.js b/_lib/app/components/Content.css.js new file mode 100644 index 00000000..4e704171 --- /dev/null +++ b/_lib/app/components/Content.css.js @@ -0,0 +1,9 @@ +import { style } from '@vanilla-extract/css'; +import { contentVars, primitiveColorVars } from '../styles/vars.css.js'; +export const root = style({ + backgroundColor: primitiveColorVars.background, + maxWidth: contentVars.width, + padding: `${contentVars.verticalPadding} ${contentVars.horizontalPadding}`, + width: '100%', +}); +//# sourceMappingURL=Content.css.js.map \ No newline at end of file diff --git a/_lib/app/components/Content.css.js.map b/_lib/app/components/Content.css.js.map new file mode 100644 index 00000000..5d1ed182 --- /dev/null +++ b/_lib/app/components/Content.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Content.css.js","sourceRoot":"","sources":["../../../app/components/Content.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAEvE,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,eAAe,EAAE,kBAAkB,CAAC,UAAU;IAC9C,QAAQ,EAAE,WAAW,CAAC,KAAK;IAC3B,OAAO,EAAE,GAAG,WAAW,CAAC,eAAe,IAAI,WAAW,CAAC,iBAAiB,EAAE;IAC1E,KAAK,EAAE,MAAM;CACd,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Content.d.ts b/_lib/app/components/Content.d.ts new file mode 100644 index 00000000..58c1fec4 --- /dev/null +++ b/_lib/app/components/Content.d.ts @@ -0,0 +1,7 @@ +/// +import { type ClassValue } from 'clsx'; +export declare function Content({ children, className, }: { + children: React.ReactNode; + className?: ClassValue; +}): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=Content.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Content.d.ts.map b/_lib/app/components/Content.d.ts.map new file mode 100644 index 00000000..d0b1a25c --- /dev/null +++ b/_lib/app/components/Content.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Content.d.ts","sourceRoot":"","sources":["../../../app/components/Content.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAA;AAI5C,wBAAgB,OAAO,CAAC,EACtB,QAAQ,EACR,SAAS,GACV,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,UAAU,CAAA;CAAE,8CAEvD"} \ No newline at end of file diff --git a/_lib/app/components/Content.js b/_lib/app/components/Content.js new file mode 100644 index 00000000..15f4b058 --- /dev/null +++ b/_lib/app/components/Content.js @@ -0,0 +1,7 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import * as styles from './Content.css.js'; +export function Content({ children, className, }) { + return _jsx("article", { className: clsx(className, styles.root), children: children }); +} +//# sourceMappingURL=Content.js.map \ No newline at end of file diff --git a/_lib/app/components/Content.js.map b/_lib/app/components/Content.js.map new file mode 100644 index 00000000..53c4df68 --- /dev/null +++ b/_lib/app/components/Content.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Content.js","sourceRoot":"","sources":["../../../app/components/Content.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAmB,IAAI,EAAE,MAAM,MAAM,CAAA;AAE5C,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAA;AAE1C,MAAM,UAAU,OAAO,CAAC,EACtB,QAAQ,EACR,SAAS,GAC6C;IACtD,OAAO,kBAAS,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,YAAG,QAAQ,GAAW,CAAA;AAC/E,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/CopyButton.css.d.ts b/_lib/app/components/CopyButton.css.d.ts new file mode 100644 index 00000000..471c4671 --- /dev/null +++ b/_lib/app/components/CopyButton.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=CopyButton.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/CopyButton.css.d.ts.map b/_lib/app/components/CopyButton.css.d.ts.map new file mode 100644 index 00000000..3c60081d --- /dev/null +++ b/_lib/app/components/CopyButton.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"CopyButton.css.d.ts","sourceRoot":"","sources":["../../../app/components/CopyButton.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI,QAkCf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/CopyButton.css.js b/_lib/app/components/CopyButton.css.js new file mode 100644 index 00000000..0c48fe85 --- /dev/null +++ b/_lib/app/components/CopyButton.css.js @@ -0,0 +1,39 @@ +import { style } from '@vanilla-extract/css'; +import { borderRadiusVars, primitiveColorVars, spaceVars, zIndexVars } from '../styles/vars.css.js'; +import { root as Pre } from './mdx/Pre.css.js'; +export const root = style({ + alignItems: 'center', + backgroundColor: `color-mix(in srgb, ${primitiveColorVars.background2} 75%, transparent)`, + backdropFilter: 'blur(1px)', + border: `1px solid ${primitiveColorVars.border}`, + borderRadius: borderRadiusVars['4'], + color: primitiveColorVars.text3, + display: 'flex', + justifyContent: 'center', + position: 'absolute', + right: spaceVars['18'], + top: spaceVars['18'], + opacity: 0, + height: '32px', + width: '32px', + transition: 'background-color 0.15s, opacity 0.15s', + zIndex: zIndexVars.surface, + selectors: { + '&:hover': { + backgroundColor: primitiveColorVars.background4, + transition: 'background-color 0.05s', + }, + '&:focus-visible': { + backgroundColor: primitiveColorVars.background4, + opacity: 1, + transition: 'background-color 0.05s', + }, + '&:hover:active': { + backgroundColor: primitiveColorVars.background2, + }, + [`${Pre}:hover &`]: { + opacity: 1, + }, + }, +}); +//# sourceMappingURL=CopyButton.css.js.map \ No newline at end of file diff --git a/_lib/app/components/CopyButton.css.js.map b/_lib/app/components/CopyButton.css.js.map new file mode 100644 index 00000000..69ac4d08 --- /dev/null +++ b/_lib/app/components/CopyButton.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CopyButton.css.js","sourceRoot":"","sources":["../../../app/components/CopyButton.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE5C,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACnG,OAAO,EAAE,IAAI,IAAI,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAE9C,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,UAAU,EAAE,QAAQ;IACpB,eAAe,EAAE,sBAAsB,kBAAkB,CAAC,WAAW,oBAAoB;IACzF,cAAc,EAAE,WAAW;IAC3B,MAAM,EAAE,aAAa,kBAAkB,CAAC,MAAM,EAAE;IAChD,YAAY,EAAE,gBAAgB,CAAC,GAAG,CAAC;IACnC,KAAK,EAAE,kBAAkB,CAAC,KAAK;IAC/B,OAAO,EAAE,MAAM;IACf,cAAc,EAAE,QAAQ;IACxB,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC;IACtB,GAAG,EAAE,SAAS,CAAC,IAAI,CAAC;IACpB,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,MAAM;IACb,UAAU,EAAE,uCAAuC;IACnD,MAAM,EAAE,UAAU,CAAC,OAAO;IAC1B,SAAS,EAAE;QACT,SAAS,EAAE;YACT,eAAe,EAAE,kBAAkB,CAAC,WAAW;YAC/C,UAAU,EAAE,wBAAwB;SACrC;QACD,iBAAiB,EAAE;YACjB,eAAe,EAAE,kBAAkB,CAAC,WAAW;YAC/C,OAAO,EAAE,CAAC;YACV,UAAU,EAAE,wBAAwB;SACrC;QACD,gBAAgB,EAAE;YAChB,eAAe,EAAE,kBAAkB,CAAC,WAAW;SAChD;QACD,CAAC,GAAG,GAAG,UAAU,CAAC,EAAE;YAClB,OAAO,EAAE,CAAC;SACX;KACF;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/CopyButton.d.ts b/_lib/app/components/CopyButton.d.ts new file mode 100644 index 00000000..35fc5c2d --- /dev/null +++ b/_lib/app/components/CopyButton.d.ts @@ -0,0 +1,5 @@ +export declare function CopyButton({ copy, copied }: { + copy: () => void; + copied: boolean; +}): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=CopyButton.d.js.map \ No newline at end of file diff --git a/_lib/app/components/CopyButton.d.ts.map b/_lib/app/components/CopyButton.d.ts.map new file mode 100644 index 00000000..8e28be0a --- /dev/null +++ b/_lib/app/components/CopyButton.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"CopyButton.d.ts","sourceRoot":"","sources":["../../../app/components/CopyButton.tsx"],"names":[],"mappings":"AAKA,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,IAAI,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,8CAUjF"} \ No newline at end of file diff --git a/_lib/app/components/CopyButton.js b/_lib/app/components/CopyButton.js new file mode 100644 index 00000000..fc059b90 --- /dev/null +++ b/_lib/app/components/CopyButton.js @@ -0,0 +1,9 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import * as styles from './CopyButton.css.js'; +import { Icon } from './Icon.js'; +import { Checkmark } from './icons/Checkmark.js'; +import { Copy } from './icons/Copy.js'; +export function CopyButton({ copy, copied }) { + return (_jsx("button", { className: styles.root, onClick: copy, type: "button", children: copied ? (_jsx(Icon, { label: "Copied", size: "14px", icon: Checkmark })) : (_jsx(Icon, { label: "Copy", size: "18px", icon: Copy })) })); +} +//# sourceMappingURL=CopyButton.js.map \ No newline at end of file diff --git a/_lib/app/components/CopyButton.js.map b/_lib/app/components/CopyButton.js.map new file mode 100644 index 00000000..62681d16 --- /dev/null +++ b/_lib/app/components/CopyButton.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CopyButton.js","sourceRoot":"","sources":["../../../app/components/CopyButton.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAA;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAEtC,MAAM,UAAU,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAyC;IAChF,OAAO,CACL,iBAAQ,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAC,QAAQ,YACzD,MAAM,CAAC,CAAC,CAAC,CACR,KAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAE,SAAS,GAAI,CACrD,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAE,IAAI,GAAI,CAC9C,GACM,CACV,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/DesktopSearch.css.d.ts b/_lib/app/components/DesktopSearch.css.d.ts new file mode 100644 index 00000000..5106edfe --- /dev/null +++ b/_lib/app/components/DesktopSearch.css.d.ts @@ -0,0 +1,3 @@ +export declare const search: string; +export declare const searchCommand: string; +//# sourceMappingURL=DesktopSearch.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/DesktopSearch.css.d.ts.map b/_lib/app/components/DesktopSearch.css.d.ts.map new file mode 100644 index 00000000..8fd9082b --- /dev/null +++ b/_lib/app/components/DesktopSearch.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"DesktopSearch.css.d.ts","sourceRoot":"","sources":["../../../app/components/DesktopSearch.css.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,MAAM,QA0BlB,CAAA;AAED,eAAO,MAAM,aAAa,QAezB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/DesktopSearch.css.js b/_lib/app/components/DesktopSearch.css.js new file mode 100644 index 00000000..d28b11e4 --- /dev/null +++ b/_lib/app/components/DesktopSearch.css.js @@ -0,0 +1,40 @@ +import { style } from '@vanilla-extract/css'; +import { borderRadiusVars, fontSizeVars, fontWeightVars, primitiveColorVars, spaceVars, } from '../styles/vars.css.js'; +export const search = style({ + alignItems: 'center', + backgroundColor: primitiveColorVars.backgroundDark, + border: `1px solid ${primitiveColorVars.backgroundDark}`, + borderRadius: borderRadiusVars[8], + color: primitiveColorVars.text2, + display: 'flex', + fontSize: fontSizeVars[14], + fontWeight: fontWeightVars.medium, + gap: spaceVars[6], + height: spaceVars[40], + maxWidth: '15.5rem', + paddingLeft: spaceVars[12], + paddingRight: spaceVars[12], + position: 'relative', + width: '100%', + transition: 'color 0.1s, border-color 0.1s', + selectors: { + '&:hover': { + color: primitiveColorVars.text, + borderColor: primitiveColorVars.text3, + }, + }, +}, 'search'); +export const searchCommand = style({ + alignItems: 'center', + border: `1.5px solid ${primitiveColorVars.text3}`, + borderRadius: borderRadiusVars[4], + color: primitiveColorVars.text3, + display: 'flex', + height: spaceVars[12], + justifyContent: 'center', + marginLeft: 'auto', + marginTop: spaceVars[1], + padding: spaceVars[1], + width: spaceVars[12], +}, 'searchCommand'); +//# sourceMappingURL=DesktopSearch.css.js.map \ No newline at end of file diff --git a/_lib/app/components/DesktopSearch.css.js.map b/_lib/app/components/DesktopSearch.css.js.map new file mode 100644 index 00000000..416b3eac --- /dev/null +++ b/_lib/app/components/DesktopSearch.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DesktopSearch.css.js","sourceRoot":"","sources":["../../../app/components/DesktopSearch.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE5C,OAA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AAO,EAAE,SAAS,CAAC,CAAC,CAAC;IACrB,KAAK,EAAE,SAAS,CAAC,EAAE,CAAC;CACrB,EACD,eAAe,CAChB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/DesktopSearch.d.ts b/_lib/app/components/DesktopSearch.d.ts new file mode 100644 index 00000000..af8a6cde --- /dev/null +++ b/_lib/app/components/DesktopSearch.d.ts @@ -0,0 +1,2 @@ +export declare function DesktopSearch(): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=DesktopSearch.d.js.map \ No newline at end of file diff --git a/_lib/app/components/DesktopSearch.d.ts.map b/_lib/app/components/DesktopSearch.d.ts.map new file mode 100644 index 00000000..88a171c8 --- /dev/null +++ b/_lib/app/components/DesktopSearch.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"DesktopSearch.d.ts","sourceRoot":"","sources":["../../../app/components/DesktopSearch.tsx"],"names":[],"mappings":"AAQA,wBAAgB,aAAa,+CAiD5B"} \ No newline at end of file diff --git a/_lib/app/components/DesktopSearch.js b/_lib/app/components/DesktopSearch.js new file mode 100644 index 00000000..fe142989 --- /dev/null +++ b/_lib/app/components/DesktopSearch.js @@ -0,0 +1,38 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +import * as Dialog from '@radix-ui/react-dialog'; +import { MagnifyingGlassIcon } from '@radix-ui/react-icons'; +import { useEffect, useState } from 'react'; +import { useSearchIndex } from '../hooks/useSearchIndex.js'; +import * as styles from './DesktopSearch.css.js'; +import { SearchDialog } from './SearchDialog.js'; +export function DesktopSearch() { + useSearchIndex(); + const [open, setOpen] = useState(false); + useEffect(() => { + function keyDownHandler(event) { + const isInput = document.activeElement instanceof HTMLElement && + (['input', 'select', 'textarea'].includes(document.activeElement.tagName.toLowerCase()) || + document.activeElement.isContentEditable); + if (event.key === '/' && !open && !isInput) { + event.preventDefault(); + setOpen(true); + } + else if (event.metaKey === true && event.key === 'k') { + event.preventDefault(); + setOpen((x) => !x); + } + } + window.addEventListener('keydown', keyDownHandler); + return () => { + window.removeEventListener('keydown', keyDownHandler); + }; + }, [open]); + return (_jsxs(Dialog.Root, { open: open, onOpenChange: setOpen, children: [_jsx(Dialog.Trigger, { asChild: true, children: _jsxs("button", { className: styles.search, type: "button", children: [_jsx(MagnifyingGlassIcon, { style: { marginTop: 2 } }), "Search", _jsx("div", { className: styles.searchCommand, children: _jsx("div", { style: { + background: 'currentColor', + transform: 'rotate(45deg)', + width: 1.5, + borderRadius: 2, + height: '100%', + } }) })] }) }), _jsx(SearchDialog, { open: open, onClose: () => setOpen(false) })] })); +} +//# sourceMappingURL=DesktopSearch.js.map \ No newline at end of file diff --git a/_lib/app/components/DesktopSearch.js.map b/_lib/app/components/DesktopSearch.js.map new file mode 100644 index 00000000..614a4066 --- /dev/null +++ b/_lib/app/components/DesktopSearch.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DesktopSearch.js","sourceRoot":"","sources":["../../../app/components/DesktopSearch.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAA;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE3C,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAA;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEhD,MAAM,UAAU,aAAa;IAC3B,cAAc,EAAE,CAAA;IAChB,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAEvC,SAAS,CAAC,GAAG,EAAE;QACb,SAAS,cAAc,CAAC,KAAoB;YAC1C,MAAM,OAAO,GACX,QAAQ,CAAC,aAAa,YAAY,WAAW;gBAC7C,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC,QA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AAI,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAI,IAC/C,CACf,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/DesktopTopNav.css.d.ts b/_lib/app/components/DesktopTopNav.css.d.ts new file mode 100644 index 00000000..4b6ea91e --- /dev/null +++ b/_lib/app/components/DesktopTopNav.css.d.ts @@ -0,0 +1,14 @@ +export declare const root: string; +export declare const withLogo: string; +export declare const button: string; +export declare const content: string; +export declare const curtain: string; +export declare const divider: string; +export declare const group: string; +export declare const hideCompact: string; +export declare const icon: string; +export declare const item: string; +export declare const logo: string; +export declare const logoWrapper: string; +export declare const section: string; +//# sourceMappingURL=DesktopTopNav.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/DesktopTopNav.css.d.ts.map b/_lib/app/components/DesktopTopNav.css.d.ts.map new file mode 100644 index 00000000..e3fef0b4 --- /dev/null +++ b/_lib/app/components/DesktopTopNav.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"DesktopTopNav.css.d.ts","sourceRoot":"","sources":["../../../app/components/DesktopTopNav.css.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,IAAI,QAWf,CAAA;AAEF,eAAO,MAAM,QAAQ,QAKpB,CAAA;AAED,eAAO,MAAM,MAAM,QAMlB,CAAA;AAED,eAAO,MAAM,OAAO,QAKnB,CAAA;AAED,eAAO,MAAM,OAAO,QAanB,CAAA;AAED,eAAO,MAAM,OAAO,QAOnB,CAAA;AAED,eAAO,MAAM,KAAK,QAA4D,CAAA;AAE9E,eAAO,MAAM,WAAW,QASvB,CAAA;AAED,eAAO,MAAM,IAAI,QAWhB,CAAA;AAED,eAAO,MAAM,IAAI,QAGhB,CAAA;AAED,eAAO,MAAM,IAAI,QAOhB,CAAA;AAED,eAAO,MAAM,WAAW,QAUvB,CAAA;AAED,eAAO,MAAM,OAAO,QAGnB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/DesktopTopNav.css.js b/_lib/app/components/DesktopTopNav.css.js new file mode 100644 index 00000000..7b82541c --- /dev/null +++ b/_lib/app/components/DesktopTopNav.css.js @@ -0,0 +1,74 @@ +import { style } from '@vanilla-extract/css'; +import { leftGutterWidthVar } from '../layouts/DocsLayout.css.js'; +import { borderRadiusVars, contentVars, primitiveColorVars, sidebarVars, spaceVars, topNavVars, viewportVars, } from '../styles/vars.css.js'; +export const root = style({ + alignItems: 'center', + display: 'flex', + justifyContent: 'space-between', + padding: `0 ${topNavVars.horizontalPadding}`, + height: topNavVars.height, + '@media': { + [viewportVars['max-1080px']]: { + display: 'none', + }, + }, +}); +export const withLogo = style({ + paddingLeft: `calc(((100% - ${contentVars.width}) / 2) + ${topNavVars.horizontalPadding})`, +}, 'withLogo'); +export const button = style({ + borderRadius: borderRadiusVars[4], + padding: spaceVars[8], +}, 'button'); +export const content = style({ + right: `calc(-1 * ${spaceVars['24']})`, +}, 'content'); +export const curtain = style({ + background: `linear-gradient(${primitiveColorVars.background}, transparent 70%)`, + height: '30px', + opacity: 0.98, + width: '100%', + '@media': { + [viewportVars['max-1080px']]: { + display: 'none', + }, + }, +}, 'curtain'); +export const divider = style({ + backgroundColor: primitiveColorVars.border, + height: '35%', + width: '1px', +}, 'divider'); +export const group = style({ alignItems: 'center', display: 'flex' }, 'group'); +export const hideCompact = style({ + '@media': { + [viewportVars['max-1280px']]: { + display: 'none', + }, + }, +}, 'hideCompact'); +export const icon = style({ + color: primitiveColorVars.text2, + transition: 'color 0.1s', + selectors: { + [`${button}:hover &`]: { + color: primitiveColorVars.text, + }, + }, +}, 'icon'); +export const item = style({ alignItems: 'center', display: 'flex', height: '100%', position: 'relative' }, 'item'); +export const logo = style({ + paddingLeft: sidebarVars.horizontalPadding, + paddingRight: sidebarVars.horizontalPadding, + width: sidebarVars.width, +}, 'logo'); +export const logoWrapper = style({ + display: 'flex', + height: '100%', + justifyContent: 'flex-end', + left: 0, + position: 'absolute', + width: leftGutterWidthVar, +}, 'logoWrapper'); +export const section = style({ alignItems: 'center', display: 'flex', height: '100%', gap: spaceVars[24] }, 'section'); +//# sourceMappingURL=DesktopTopNav.css.js.map \ No newline at end of file diff --git a/_lib/app/components/DesktopTopNav.css.js.map b/_lib/app/components/DesktopTopNav.css.js.map new file mode 100644 index 00000000..135754f0 --- /dev/null +++ b/_lib/app/components/DesktopTopNav.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DesktopTopNav.css.js","sourceRoot":"","sources":["../../../app/components/DesktopTopNav.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AACjE,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,SAAS,EACT,UAAU,EACV,YAAY,GACb,MAAM,uBAAuB,CAAA;AAE9B,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,UAAU,EAAE,QAAQ;IACpB,OAAO,EAAE,MAAM;IACf,cAAc,EAAE,eAAe;IAC/B,OAAO,EAAE,KAAK,UAAU,CAAC,iBAAiB,EAAE;IAC5C,MAAM,EAAE,UAAU,CAAC,MAAM;IACzB,QAAQ,EAAE;QACR,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,EAAE;YAC5B,OAAO,EAAE,MAAM;SAChB;KACF;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAC3B;IACE,WAAW,EAAE,iBAAiB,WAAW,CAAC,KAAK,YAAY,UAAU,CAAC,iBAAiB,GAAG;CAC3F,EACD,UAAU,CACX,CAAA;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,KAAK,CACzB;IACE,YAAY,EAAE,gBAAgB,CAAC,CAAC,CAAC;IACjC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;CACtB,EACD,QAAQ,CACT,CAAA;AAED,MAAM,CAAC,MAAM,OAA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EAAE,QAAQ,EAAE,UAAU,EAAE,EAC/E,MAAM,CACP,CAAA;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CACvB;IACE,WAAW,EAAE,WAAW,CAAC,iBAAiB;IAC1C,YAAY,EAAE,WAAW,CAAC,iBAAiB;IAC3C,KAAK,EAAE,WAAW,CAAC,KAAK;CACzB,EACD,MAAM,CACP,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAC9B;IACE,OAAO,EAAE,MAAM;IACf,MAAM,EAAE,MAAM;IACd,cAAc,EAAE,UAAU;IAC1B,IAAI,EAAE,CAAC;IACP,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,kBAAkB;CAC1B,EACD,aAAa,CACd,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAC1B,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,CAAC,EAAE,CAAC,EAAE,EAC7E,SAAS,CACV,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/DesktopTopNav.d.ts b/_lib/app/components/DesktopTopNav.d.ts new file mode 100644 index 00000000..67bb9868 --- /dev/null +++ b/_lib/app/components/DesktopTopNav.d.ts @@ -0,0 +1,6 @@ +export declare function DesktopTopNav(): import("react/jsx-runtime.js").JSX.Element; +export declare namespace DesktopTopNav { + var Curtain: typeof import("./DesktopTopNav.js").Curtain; +} +export declare function Curtain(): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=DesktopTopNav.d.js.map \ No newline at end of file diff --git a/_lib/app/components/DesktopTopNav.d.ts.map b/_lib/app/components/DesktopTopNav.d.ts.map new file mode 100644 index 00000000..9dd7e50a --- /dev/null +++ b/_lib/app/components/DesktopTopNav.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"DesktopTopNav.d.ts","sourceRoot":"","sources":["../../../app/components/DesktopTopNav.tsx"],"names":[],"mappings":"AA0BA,wBAAgB,aAAa,+CAwE5B;yBAxEe,aAAa;;;AA0E7B,wBAAgB,OAAO,+CAEtB"} \ No newline at end of file diff --git a/_lib/app/components/DesktopTopNav.js b/_lib/app/components/DesktopTopNav.js new file mode 100644 index 00000000..5d3ae3c7 --- /dev/null +++ b/_lib/app/components/DesktopTopNav.js @@ -0,0 +1,66 @@ +import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime"; +import clsx from 'clsx'; +import {} from 'react'; +import { useLocation } from 'react-router-dom'; +import { useActiveNavIds } from '../hooks/useActiveNavIds.js'; +import { useConfig } from '../hooks/useConfig.js'; +import { useLayout } from '../hooks/useLayout.js'; +import { useTheme } from '../hooks/useTheme.js'; +import { visibleDark, visibleLight } from '../styles/utils.css.js'; +import { DesktopSearch } from './DesktopSearch.js'; +import * as styles from './DesktopTopNav.css.js'; +import { Icon } from './Icon.js'; +import { NavLogo } from './NavLogo.js'; +import * as NavigationMenu from './NavigationMenu.js'; +import { RouterLink } from './RouterLink.js'; +import { Discord } from './icons/Discord.js'; +import { GitHub } from './icons/GitHub.js'; +import { Moon } from './icons/Moon.js'; +import { Sun } from './icons/Sun.js'; +import { Telegram } from './icons/Telegram.js'; +import { Warpcast } from './icons/Warpcast.js'; +import { X } from './icons/X.js'; +DesktopTopNav.Curtain = Curtain; +export function DesktopTopNav() { + const config = useConfig(); + const { showLogo, showSidebar } = useLayout(); + return (_jsxs("div", { className: clsx(styles.root, showLogo && !showSidebar && styles.withLogo), children: [_jsx(DesktopSearch, {}), showLogo && (_jsx("div", { className: styles.logoWrapper, children: _jsx("div", { className: styles.logo, children: _jsx(RouterLink, { to: "/", style: { alignItems: 'center', display: 'flex', height: '56px', marginTop: '4px' }, children: _jsx(NavLogo, {}) }) }) })), _jsx("div", { className: styles.section }), _jsxs("div", { className: styles.section, children: [(config.topNav?.length || 0) > 0 && (_jsxs(_Fragment, { children: [_jsx("div", { className: styles.group, children: _jsx(Navigation, {}) }), _jsx("div", { className: clsx(styles.divider, (config.topNav?.length || 0) > 3 ? styles.hideCompact : null) })] })), config.socials && config.socials?.length > 0 && (_jsxs(_Fragment, { children: [_jsx("div", { className: clsx(styles.group, (config.topNav?.length || 0) > 3 ? styles.hideCompact : null), style: { marginLeft: '-8px', marginRight: '-8px' }, children: config.socials.map((social, i) => (_jsx("div", { className: styles.item, children: _jsx(SocialButton, { ...social }) }, i))) }), !config.theme?.colorScheme && (_jsx("div", { className: clsx(styles.divider, styles.hideCompact) }))] })), !config.theme?.colorScheme && (_jsx("div", { className: clsx(styles.group, styles.hideCompact), style: { marginLeft: '-8px', marginRight: '-8px' }, children: _jsx("div", { className: styles.item, children: _jsx(ThemeToggleButton, {}) }) }))] })] })); +} +export function Curtain() { + return _jsx("div", { className: styles.curtain }); +} +function Navigation() { + const { topNav } = useConfig(); + if (!topNav) + return null; + const { pathname } = useLocation(); + const activeIds = useActiveNavIds({ pathname, items: topNav }); + return (_jsx(NavigationMenu.Root, { delayDuration: 0, children: _jsx(NavigationMenu.List, { children: topNav.map((item, i) => item.link ? (_jsx(NavigationMenu.Link, { active: activeIds.includes(item.id), className: styles.item, href: item.link, children: item.text }, i)) : item.items ? (_jsxs(NavigationMenu.Item, { className: styles.item, children: [_jsx(NavigationMenu.Trigger, { active: activeIds.includes(item.id), children: item.text }), _jsx(NavigationMenu.Content, { className: styles.content, children: _jsx(NavigationMenuContent, { items: item.items }) })] }, i)) : null) }) })); +} +function NavigationMenuContent({ items }) { + const { pathname } = useLocation(); + const activeIds = useActiveNavIds({ pathname, items }); + return (_jsx("ul", { children: items?.map((item, i) => (_jsx(NavigationMenu.Link, { active: activeIds.includes(item.id), href: item.link, children: item.text }, i))) })); +} +function ThemeToggleButton() { + const { toggle } = useTheme(); + return (_jsxs("button", { className: styles.button, onClick: toggle, type: "button", children: [_jsx(Icon, { className: clsx(styles.icon, visibleDark), size: "20px", label: "Light", icon: Sun }), _jsx(Icon, { className: clsx(styles.icon, visibleLight), size: "20px", label: "Dark", icon: Moon, style: { marginTop: '-2px' } })] })); +} +const iconsForIcon = { + discord: Discord, + github: GitHub, + telegram: Telegram, + warpcast: Warpcast, + x: X, +}; +const sizesForType = { + discord: '23px', + github: '20px', + telegram: '21px', + warpcast: '20px', + x: '18px', +}; +function SocialButton({ icon, label, link }) { + return (_jsx("a", { className: styles.button, href: link, target: "_blank", rel: "noopener noreferrer", children: _jsx(Icon, { className: styles.icon, label: label, icon: iconsForIcon[icon], size: sizesForType[icon] || '20px' }) })); +} +//# sourceMappingURL=DesktopTopNav.js.map \ No newline at end of file diff --git a/_lib/app/components/DesktopTopNav.js.map b/_lib/app/components/DesktopTopNav.js.map new file mode 100644 index 00000000..d36cc716 --- /dev/null +++ b/_lib/app/components/DesktopTopNav.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DesktopTopNav.js","sourceRoot":"","sources":["../../../app/components/DesktopTopNav.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAsB,MAAM,OAAO,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAG9C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAA;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,KAAK,cAAc,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM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ClB,CAAC,EAAE,CAAC;CACqD,CAAA;AAE3D,MAAM,YAAY,GAAG;IACnB,OAAO,EAAE,MAAM;IACf,MAAM,EAAE,MAAM;IACd,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE,MAAM;IAChB,CAAC,EAAE,MAAM;CACyC,CAAA;AAEpD,SAAS,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAoB;IAC3D,OAAO,CACL,YAAG,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,qBAAqB,YAChF,KAAC,IAAI,IACH,SAAS,EAAE,MAAM,CAAC,IAAI,EACtB,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,EACxB,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,MAAM,GAClC,GACA,CACL,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/ExternalLink.css.d.ts b/_lib/app/components/ExternalLink.css.d.ts new file mode 100644 index 00000000..5de49584 --- /dev/null +++ b/_lib/app/components/ExternalLink.css.d.ts @@ -0,0 +1,4 @@ +export declare const arrowColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; +export declare const iconUrl: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; +export declare const root: string; +//# sourceMappingURL=ExternalLink.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/ExternalLink.css.d.ts.map b/_lib/app/components/ExternalLink.css.d.ts.map new file mode 100644 index 00000000..51e64236 --- /dev/null +++ b/_lib/app/components/ExternalLink.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ExternalLink.css.d.ts","sourceRoot":"","sources":["../../../app/components/ExternalLink.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,oFAA0B,CAAA;AACjD,eAAO,MAAM,OAAO,oFAAuB,CAAA;AAE3C,eAAO,MAAM,IAAI,QAcf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/ExternalLink.css.js b/_lib/app/components/ExternalLink.css.js new file mode 100644 index 00000000..c2e4e110 --- /dev/null +++ b/_lib/app/components/ExternalLink.css.js @@ -0,0 +1,19 @@ +import { createVar, style } from '@vanilla-extract/css'; +export const arrowColor = createVar('arrowColor'); +export const iconUrl = createVar('iconUrl'); +export const root = style({ + selectors: { + '&::after': { + backgroundColor: 'currentColor', + content: '', + color: arrowColor, + display: 'inline-block', + height: '0.5em', + marginLeft: '0.325em', + marginRight: '0.25em', + width: '0.5em', + mask: `${iconUrl} no-repeat center / contain`, + }, + }, +}); +//# sourceMappingURL=ExternalLink.css.js.map \ No newline at end of file diff --git a/_lib/app/components/ExternalLink.css.js.map b/_lib/app/components/ExternalLink.css.js.map new file mode 100644 index 00000000..4d095498 --- /dev/null +++ b/_lib/app/components/ExternalLink.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ExternalLink.css.js","sourceRoot":"","sources":["../../../app/components/ExternalLink.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAEvD,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,CAAC,YAAY,CAAC,CAAA;AACjD,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC,SAAS,CAAC,CAAA;AAE3C,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,SAAS,EAAE;QACT,UAAU,EAAE;YACV,eAAe,EAAE,cAAc;YAC/B,OAAO,EAAE,EAAE;YACX,KAAK,EAAE,UAAU;YACjB,OAAO,EAAE,cAAc;YACvB,MAAM,EAAE,OAAO;YACf,UAAU,EAAE,SAAS;YACrB,WAAW,EAAE,QAAQ;YACrB,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,GAAG,OAAO,6BAA6B;SAC9C;KACF;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/ExternalLink.d.ts b/_lib/app/components/ExternalLink.d.ts new file mode 100644 index 00000000..83e57b6b --- /dev/null +++ b/_lib/app/components/ExternalLink.d.ts @@ -0,0 +1,6 @@ +/// +export type ExternalLinkProps = React.DetailedHTMLProps, HTMLAnchorElement> & { + hideExternalIcon?: boolean; +}; +export declare const ExternalLink: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; +//# sourceMappingURL=ExternalLink.d.js.map \ No newline at end of file diff --git a/_lib/app/components/ExternalLink.d.ts.map b/_lib/app/components/ExternalLink.d.ts.map new file mode 100644 index 00000000..e7f141c9 --- /dev/null +++ b/_lib/app/components/ExternalLink.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ExternalLink.d.ts","sourceRoot":"","sources":["../../../app/components/ExternalLink.tsx"],"names":[],"mappings":";AAOA,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,CACrD,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAC7C,iBAAiB,CAClB,GAAG;IAAE,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAAE,CAAA;AAElC,eAAO,MAAM,YAAY,oHAuBxB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/ExternalLink.js b/_lib/app/components/ExternalLink.js new file mode 100644 index 00000000..586b4917 --- /dev/null +++ b/_lib/app/components/ExternalLink.js @@ -0,0 +1,14 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import { assignInlineVars } from '@vanilla-extract/dynamic'; +import { forwardRef } from 'react'; +import { useConfig } from '../hooks/useConfig.js'; +import * as styles from './ExternalLink.css.js'; +export const ExternalLink = forwardRef(({ className, children, hideExternalIcon, href, ...props }, ref) => { + const { basePath } = useConfig(); + const assetBasePath = import.meta.env.PROD ? basePath : ''; + return (_jsx("a", { ref: ref, className: clsx(className, hideExternalIcon || typeof children !== 'string' ? undefined : styles.root), href: href, target: "_blank", rel: "noopener noreferrer", style: assignInlineVars({ + [styles.iconUrl]: `url(${assetBasePath}/.vocs/icons/arrow-diagonal.svg)`, + }), ...props, children: children })); +}); +//# sourceMappingURL=ExternalLink.js.map \ No newline at end of file diff --git a/_lib/app/components/ExternalLink.js.map b/_lib/app/components/ExternalLink.js.map new file mode 100644 index 00000000..b830dc98 --- /dev/null +++ b/_lib/app/components/ExternalLink.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ExternalLink.js","sourceRoot":"","sources":["../../../app/components/ExternalLink.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAA;AAO/C,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CACpC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,gBAAgB,EAAE,IAAI,EAAE,GAAG,KAAK,EAAqB,EAAE,GAAG,EAAE,EAAE;IACpF,MAAM,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAE,CAAA;IAChC,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAA;IAC1D,OAAO,CACL,YACE,GAAG,EAAE,GAAU,EACf,SAAS,EAAE,IAAI,CACb,SAAS,EACT,gBAAgB,IAAI,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAC3E,EACD,IAAI,EAAE,IAAI,EACV,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,EACzB,KAAK,EAAE,gBAAgB,CAAC;YACtB,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO,aAAa,kCAAkC;SACzE,CAAC,KACE,KAAK,YAER,QAAQ,GACP,CACL,CAAA;AACH,CAAC,CACF,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Footer.css.d.ts b/_lib/app/components/Footer.css.d.ts new file mode 100644 index 00000000..daf33821 --- /dev/null +++ b/_lib/app/components/Footer.css.d.ts @@ -0,0 +1,14 @@ +export declare const root: string; +export declare const container: string; +export declare const editLink: string; +export declare const lastUpdated: string; +export declare const navigation: string; +export declare const navigationIcon: string; +export declare const navigationIcon_left: string; +export declare const navigationIcon_right: string; +export declare const navigationItem: string; +export declare const navigationItem_left: string; +export declare const navigationItem_right: string; +export declare const navigationText: string; +export declare const navigationTextInner: string; +//# sourceMappingURL=Footer.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Footer.css.d.ts.map b/_lib/app/components/Footer.css.d.ts.map new file mode 100644 index 00000000..dc9ff3a2 --- /dev/null +++ b/_lib/app/components/Footer.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Footer.css.d.ts","sourceRoot":"","sources":["../../../app/components/Footer.css.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,IAAI,QAUf,CAAA;AAEF,eAAO,MAAM,SAAS,QAQrB,CAAA;AAED,eAAO,MAAM,QAAQ,QASpB,CAAA;AAED,eAAO,MAAM,WAAW,QAMvB,CAAA;AAED,eAAO,MAAM,UAAU,QAMtB,CAAA;AAED,eAAO,MAAM,cAAc,QAK1B,CAAA;AAED,eAAO,MAAM,mBAAmB,QAU/B,CAAA;AAED,eAAO,MAAM,oBAAoB,QAWhC,CAAA;AAED,eAAO,MAAM,cAAc,QAO1B,CAAA;AAED,eAAO,MAAM,mBAAmB,QAAmC,CAAA;AAEnE,eAAO,MAAM,oBAAoB,QAKhC,CAAA;AAED,eAAO,MAAM,cAAc,QAa1B,CAAA;AAED,eAAO,MAAM,mBAAmB,QAa/B,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Footer.css.js b/_lib/app/components/Footer.css.js new file mode 100644 index 00000000..ef372d0a --- /dev/null +++ b/_lib/app/components/Footer.css.js @@ -0,0 +1,87 @@ +import { createVar, style } from '@vanilla-extract/css'; +import { contentVars, fontSizeVars, fontWeightVars, primitiveColorVars, spaceVars, viewportVars, } from '../styles/vars.css.js'; +const iconWidthVar = createVar('iconWidth'); +export const root = style({ + display: 'flex', + flexDirection: 'column', + gap: spaceVars['32'], + maxWidth: contentVars.width, + overflowX: 'hidden', + padding: `${spaceVars['28']} ${contentVars.horizontalPadding} ${spaceVars['48']}`, + vars: { + [iconWidthVar]: '24px', + }, +}); +export const container = style({ + borderBottom: `1px solid ${primitiveColorVars.border}`, + display: 'flex', + justifyContent: 'space-between', + paddingBottom: spaceVars['16'], +}, 'container'); +export const editLink = style({ + alignItems: 'center', + display: 'flex', + fontSize: fontSizeVars['14'], + gap: spaceVars['8'], + textDecoration: 'none', +}, 'editLink'); +export const lastUpdated = style({ + color: primitiveColorVars.text3, + fontSize: fontSizeVars['14'], +}, 'lastUpdated'); +export const navigation = style({ + display: 'flex', + justifyContent: 'space-between', +}, 'navigation'); +export const navigationIcon = style({ + width: iconWidthVar, +}, 'navigationIcon'); +export const navigationIcon_left = style({ + display: 'flex', + '@media': { + [viewportVars['max-720px']]: { + justifyContent: 'center', + }, + }, +}, 'navigationIcon_left'); +export const navigationIcon_right = style({ + display: 'flex', + justifyContent: 'flex-end', + '@media': { + [viewportVars['max-720px']]: { + justifyContent: 'center', + }, + }, +}, 'navigationIcon_right'); +export const navigationItem = style({ + display: 'flex', + flexDirection: 'column', + gap: spaceVars['4'], +}, 'navigationItem'); +export const navigationItem_left = style({}, 'navigationItem_left'); +export const navigationItem_right = style({ + alignItems: 'flex-end', +}, 'navigationItem_right'); +export const navigationText = style({ + alignItems: 'center', + display: 'flex', + fontSize: fontSizeVars['18'], + fontWeight: fontWeightVars.medium, + '@media': { + [viewportVars['max-720px']]: { + fontSize: fontSizeVars['12'], + }, + }, +}, 'navigationText'); +export const navigationTextInner = style({ + overflow: 'hidden', + textOverflow: 'ellipsis', + width: '26ch', + whiteSpace: 'pre', + '@media': { + [viewportVars['max-480px']]: { + width: '20ch', + }, + }, +}, 'navigationTextInner'); +//# sourceMappingURL=Footer.css.js.map \ No newline at end of file diff --git a/_lib/app/components/Footer.css.js.map b/_lib/app/components/Footer.css.js.map new file mode 100644 index 00000000..d25460ed --- /dev/null +++ b/_lib/app/components/Footer.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Footer.css.js","sourceRoot":"","sources":["../../../app/components/Footer.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAEvD,OAAO,EACL,WAAW,EACX,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,SAAS,EACT,YAAY,GACb,MAAM,uBAAuB,CAAA;AAE9B,MAAM,YAAY,GAAG,SAAS,CAAC,WAAW,CAAC,CAAA;AAE3C,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,QAAQ;IACvB,GAAG,EAAE,SAAS,CAAC,IAAI,CAAC;IACpB,QAAQ,EAAE,WAAW,CAAC,KAAK;IAC3B,SAAS,EAAE,QAAQ;IACnB,OAAO,EAAE,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,WAAW,CAAC,iBAAiB,IAAI,SAAS,CAAC,IAAI,CAAC,EAAE;IACjF,IAAI,EAAE;QACJ,CAAC,YAAY,CAAC,EAAE,MAAM;KACvB;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAC5B;IACE,YAAY,EAAE,aAAa,kBAAkB,CAAC,MAAM,EAAE;IACtD,OAAO,EAAE,MAAM;IACf,cAAc,EAAE,eAAe;IAC/B,aAAa,EAAE,SAAS,CAAC,IAAI,CAAC;CAC/B,EACD,WAAW,CACZ,CAAA;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAC3B;IACE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B,CAAC,CAAA;AAEnE,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CACvC;IACE,UAAU,EAAE,UAAU;CACvB,EACD,sBAAsB,CACvB,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CACjC;IACE,UAAU,EAAE,QAAQ;IACpB,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC;IAC5B,UAAU,EAAE,cAAc,CAAC,MAAM;IACjC,QAAQ,EAAE;QACR,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,EAAE;YAC3B,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC;SAC7B;KACF;CACF,EACD,gBAAgB,CACjB,CAAA;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,CACtC;IACE,QAAQ,EAAE,QAAQ;IAClB,YAAY,EAAE,UAAU;IACxB,KAAK,EAAE,MAAM;IACb,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE;QACR,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,EAAE;YAC3B,KAAK,EAAE,MAAM;SACd;KACF;CACF,EACD,qBAAqB,CACtB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Footer.d.ts b/_lib/app/components/Footer.d.ts new file mode 100644 index 00000000..60903f35 --- /dev/null +++ b/_lib/app/components/Footer.d.ts @@ -0,0 +1,2 @@ +export declare function Footer(): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=Footer.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Footer.d.ts.map b/_lib/app/components/Footer.d.ts.map new file mode 100644 index 00000000..1b416855 --- /dev/null +++ b/_lib/app/components/Footer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Footer.d.ts","sourceRoot":"","sources":["../../../app/components/Footer.tsx"],"names":[],"mappings":"AAqBA,wBAAgB,MAAM,+CAsCrB"} \ No newline at end of file diff --git a/_lib/app/components/Footer.js b/_lib/app/components/Footer.js new file mode 100644 index 00000000..2f2ec7ed --- /dev/null +++ b/_lib/app/components/Footer.js @@ -0,0 +1,100 @@ +import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime"; +import { Pencil2Icon } from '@radix-ui/react-icons'; +import { assignInlineVars } from '@vanilla-extract/dynamic'; +import clsx from 'clsx'; +import { useEffect, useMemo } from 'react'; +import { useLocation, useNavigate } from 'react-router-dom'; +import { Footer as ConsumerFooter } from 'virtual:consumer-components'; +import { useEditLink } from '../hooks/useEditLink.js'; +import { useLayout } from '../hooks/useLayout.js'; +import { useMounted } from '../hooks/useMounted.js'; +import { usePageData } from '../hooks/usePageData.js'; +import { useSidebar } from '../hooks/useSidebar.js'; +import * as styles from './Footer.css.js'; +import { sizeVar } from './Icon.css.js'; +import { Icon } from './Icon.js'; +import { KeyboardShortcut } from './KeyboardShortcut.js'; +import { Link } from './Link.js'; +import { ArrowLeft } from './icons/ArrowLeft.js'; +import { ArrowRight } from './icons/ArrowRight.js'; +export function Footer() { + const { layout } = useLayout(); + const mounted = useMounted(); + const pageData = usePageData(); + const lastUpdatedAtDate = useMemo(() => (pageData.lastUpdatedAt ? new Date(pageData.lastUpdatedAt) : undefined), [pageData.lastUpdatedAt]); + const lastUpdatedAtISOString = useMemo(() => lastUpdatedAtDate?.toISOString(), [lastUpdatedAtDate]); + return (_jsxs("footer", { className: styles.root, children: [layout === 'docs' && (_jsxs(_Fragment, { children: [_jsxs("div", { className: styles.container, children: [_jsx(EditLink, {}), mounted && pageData.lastUpdatedAt && (_jsxs("div", { className: styles.lastUpdated, children: ["Last updated:", ' ', _jsx("time", { dateTime: lastUpdatedAtISOString, children: new Intl.DateTimeFormat(undefined, { + dateStyle: 'short', + timeStyle: 'short', + }).format(lastUpdatedAtDate) })] }))] }), _jsx(Navigation, {})] })), _jsx(ConsumerFooter, {})] })); +} +function EditLink() { + const editLink = useEditLink(); + if (!editLink.url) + return null; + return (_jsx("div", { children: _jsxs(Link, { className: styles.editLink, href: editLink.url, children: [_jsx(Pencil2Icon, {}), " ", editLink.text] }) })); +} +function Navigation() { + const mounted = useMounted(); + const sidebar = useSidebar(); + const { pathname } = useLocation(); + const flattenedSidebar = useMemo(() => flattenSidebar(sidebar.items || []).filter((item) => item.link), [sidebar]); + const currentPageIndex = useMemo(() => flattenedSidebar.findIndex((item) => item.link === pathname), [flattenedSidebar, pathname]); + const [prevPage, nextPage] = useMemo(() => { + if (currentPageIndex < 0) + return []; + if (currentPageIndex === 0) + return [null, flattenedSidebar[currentPageIndex + 1]]; + if (currentPageIndex === flattenedSidebar.length - 1) + return [flattenedSidebar[currentPageIndex - 1], null]; + return [flattenedSidebar[currentPageIndex - 1], flattenedSidebar[currentPageIndex + 1]]; + }, [currentPageIndex, flattenedSidebar]); + const navigate = useNavigate(); + // biome-ignore lint/correctness/useExhaustiveDependencies: + useEffect(() => { + let index = currentPageIndex; + let isListening = false; + const keydown = (event) => { + if (event.code === 'ShiftLeft') + isListening = true; + if (isListening) { + const nextPage = flattenedSidebar[index + 1]; + const prevPage = flattenedSidebar[index - 1]; + if (event.code === 'ArrowRight' && nextPage?.link) { + navigate(nextPage.link); + index++; + } + if (event.code === 'ArrowLeft' && prevPage?.link) { + navigate(prevPage.link); + index--; + } + } + }; + const keyup = (event) => { + if (event.code === 'ShiftLeft') + isListening = false; + }; + window.addEventListener('keydown', keydown); + window.addEventListener('keyup', keyup); + return () => { + window.removeEventListener('keydown', keydown); + window.removeEventListener('keyup', keyup); + }; + }, []); + if (!mounted) + return null; + return (_jsxs("div", { className: styles.navigation, children: [prevPage ? (_jsxs(Link, { className: clsx(styles.navigationItem, styles.navigationItem_left), href: prevPage.link, variant: "styleless", children: [_jsxs("div", { className: styles.navigationText, children: [_jsx("div", { className: clsx(styles.navigationIcon, styles.navigationIcon_left), style: assignInlineVars({ [sizeVar]: '0.75em' }), children: _jsx(Icon, { label: "Previous", icon: ArrowLeft }) }), _jsx("div", { className: styles.navigationTextInner, children: prevPage.text })] }), _jsx(KeyboardShortcut, { description: "Previous", keys: ['shift', '←'] })] })) : (_jsx("div", {})), nextPage ? (_jsxs(Link, { className: clsx(styles.navigationItem, styles.navigationItem_right), href: nextPage.link, variant: "styleless", children: [_jsxs("div", { className: styles.navigationText, children: [_jsx("div", { className: styles.navigationTextInner, style: { textAlign: 'right' }, children: nextPage.text }), _jsx("div", { className: clsx(styles.navigationIcon, styles.navigationIcon_right), style: assignInlineVars({ [sizeVar]: '0.75em' }), children: _jsx(Icon, { label: "Next", icon: ArrowRight }) })] }), _jsx(KeyboardShortcut, { description: "Next", keys: ['shift', '→'] })] })) : (_jsx("div", {}))] })); +} +function flattenSidebar(sidebar) { + const items = []; + for (const item of sidebar) { + if (item.link) { + items.push(item); + } + if (item.items) { + items.push(...flattenSidebar(item.items)); + } + } + return items; +} +//# sourceMappingURL=Footer.js.map \ No newline at end of file diff --git a/_lib/app/components/Footer.js.map b/_lib/app/components/Footer.js.map new file mode 100644 index 00000000..0bffd9ae --- /dev/null +++ b/_lib/app/components/Footer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Footer.js","sourceRoot":"","sources":["../../../app/components/Footer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC3D,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAGtE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,yBA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ts b/_lib/app/components/HomePage.css.d.ts new file mode 100644 index 00000000..4b03cddb --- /dev/null +++ b/_lib/app/components/HomePage.css.d.ts @@ -0,0 +1,12 @@ +export declare const root: string; +export declare const logo: string; +export declare const title: string; +export declare const tagline: string; +export declare const description: string; +export declare const buttons: string; +export declare const button: string; +export declare const tabs: string; +export declare const tabsList: string; +export declare const tabsContent: string; +export declare const packageManager: string; +//# sourceMappingURL=HomePage.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/HomePage.css.d.ts.map b/_lib/app/components/HomePage.css.d.ts.map new file mode 100644 index 00000000..87480504 --- /dev/null +++ b/_lib/app/components/HomePage.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"HomePage.css.d.ts","sourceRoot":"","sources":["../../../app/components/HomePage.css.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,IAAI,QAYf,CAAA;AAEF,eAAO,MAAM,IAAI,QAYhB,CAAA;AAED,eAAO,MAAM,KAAK,QAOjB,CAAA;AAED,eAAO,MAAM,OAAO,QAanB,CAAA;AAED,eAAO,MAAM,WAAW,QAavB,CAAA;AAED,eAAO,MAAM,OAAO,QAMnB,CAAA;AAED,eAAO,MAAM,MAAM,QAAsB,CAAA;AAEzC,eAAO,MAAM,IAAI,QAKhB,CAAA;AAED,eAAO,MAAM,QAAQ,QAMpB,CAAA;AAED,eAAO,MAAM,WAAW,QAMvB,CAAA;AAED,eAAO,MAAM,cAAc,QAK1B,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/HomePage.css.js b/_lib/app/components/HomePage.css.js new file mode 100644 index 00000000..719056dd --- /dev/null +++ b/_lib/app/components/HomePage.css.js @@ -0,0 +1,72 @@ +import { style } from '@vanilla-extract/css'; +import { fontFamilyVars, fontSizeVars, fontWeightVars, lineHeightVars, primitiveColorVars, spaceVars, viewportVars, } from '../styles/vars.css.js'; +export const root = style({ + alignItems: 'center', + display: 'flex', + flexDirection: 'column', + paddingTop: spaceVars['64'], + textAlign: 'center', + gap: spaceVars['32'], + '@media': { + [viewportVars['max-720px']]: { + paddingTop: spaceVars['32'], + }, + }, +}); +export const logo = style({ + display: 'flex', + justifyContent: 'center', + height: '48px', + '@media': { + [viewportVars['max-720px']]: { + height: '36px', + }, + }, +}, 'logo'); +export const title = style({ + fontSize: fontSizeVars['64'], + fontWeight: fontWeightVars.semibold, + lineHeight: '1em', +}, 'title'); +export const tagline = style({ + color: primitiveColorVars.text2, + fontSize: fontSizeVars['20'], + fontWeight: fontWeightVars.medium, + lineHeight: '1.5em', + selectors: { + [`${title} + &`]: { + marginTop: `calc(-1 * ${spaceVars['8']})`, + }, + }, +}, 'tagline'); +export const description = style({ + color: primitiveColorVars.text, + fontSize: fontSizeVars['16'], + fontWeight: fontWeightVars.regular, + lineHeight: lineHeightVars.paragraph, + selectors: { + [`${tagline} + &`]: { + marginTop: `calc(-1 * ${spaceVars['8']})`, + }, + }, +}, 'description'); +export const buttons = style({ + display: 'flex', + gap: spaceVars['16'], +}, 'buttons'); +export const button = style({}, 'button'); +export const tabs = style({ + minWidth: '300px', +}, 'tabs'); +export const tabsList = style({ + display: 'flex', + justifyContent: 'center', +}, 'tabsList'); +export const tabsContent = style({ + color: primitiveColorVars.text2, + fontFamily: fontFamilyVars.mono, +}, 'tabsContent'); +export const packageManager = style({ + color: primitiveColorVars.textAccent, +}, 'packageManager'); +//# sourceMappingURL=HomePage.css.js.map \ No newline at end of file diff --git a/_lib/app/components/HomePage.css.js.map b/_lib/app/components/HomePage.css.js.map new file mode 100644 index 00000000..5d065150 --- /dev/null +++ b/_lib/app/components/HomePage.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"HomePage.css.js","sourceRoot":"","sources":["../../../app/components/HomePage.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EACL,cAAc,EACd,YAAY,EACZ,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,SAAS,EACT,YAAY,GACb,MAAM,uBAAu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;IAC9B,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC;IAC5B,UAAU,EAAE,cAAc,CAAC,OAAO;IAClC,UAAU,EAAE,cAAc,CAAC,SAAS;IACpC,SAAS,EAAE;QACT,CAAC,GAAG,OAAO,MAAM,CAAC,EAAE;YAClB,SAAS,EAAE,aAAa,SAAS,CAAC,GAAG,CAAC,GAAG;SAC1C;KACF;CACF,EACD,aAAa,CACd,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAC1B;IACE,OAAO,EAAE,MAAM;IACf,GAAG,EAAE,SAAS,CAAC,IAAI,CAAC;CACrB,EACD,SAAS,CACV,CAAA;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,KAAK,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAA;AAEzC,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CACvB;IACE,QAAQ,EAAE,OAAO;CAClB,EACD,MAAM,CACP,CAAA;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAC3B;IACE,OAAO,EAAE,MAAM;IACf,cAAc,EAAE,QAAQ;CACzB,EACD,UAAU,CACX,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAC9B;IACE,KAAK,EAAE,kBAAkB,CAAC,KAAK;IAC/B,UAAU,EAAE,cAAc,CAAC,IAAI;CAChC,EACD,aAAa,CACd,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CACjC;IACE,KAAK,EAAE,kBAAkB,CAAC,UAAU;CACrC,EACD,gBAAgB,CACjB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/HomePage.d.ts b/_lib/app/components/HomePage.d.ts new file mode 100644 index 00000000..b328cd73 --- /dev/null +++ b/_lib/app/components/HomePage.d.ts @@ -0,0 +1,33 @@ +import type { ReactNode } from 'react'; +import { type ButtonProps } from './Button.js'; +export type HomePageProps = { + description?: ReactNode; + tagline?: ReactNode; +}; +export declare function Root({ children, className }: { + children: ReactNode; + className?: string; +}): import("react/jsx-runtime.js").JSX.Element; +export declare function Logo({ className }: { + className?: string; +}): import("react/jsx-runtime.js").JSX.Element; +export declare function Tagline({ children, className }: { + children: ReactNode; + className?: string; +}): import("react/jsx-runtime.js").JSX.Element; +export declare function Description({ children, className }: { + children: ReactNode; + className?: string; +}): import("react/jsx-runtime.js").JSX.Element; +export declare function Buttons({ children, className }: { + children: ReactNode; + className?: string; +}): import("react/jsx-runtime.js").JSX.Element; +export declare function Button(props: ButtonProps): import("react/jsx-runtime.js").JSX.Element; +export declare function InstallPackage({ name, type, }: { + children: ReactNode; + className?: string; + name: string; + type?: 'install' | 'init'; +}): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=HomePage.d.js.map \ No newline at end of file diff --git a/_lib/app/components/HomePage.d.ts.map b/_lib/app/components/HomePage.d.ts.map new file mode 100644 index 00000000..50192690 --- /dev/null +++ b/_lib/app/components/HomePage.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"HomePage.d.ts","sourceRoot":"","sources":["../../../app/components/HomePage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,aAAa,CAAA;AAKjE,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,OAAO,CAAC,EAAE,SAAS,CAAA;CACpB,CAAA;AAED,wBAAgB,IAAI,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,8CAExF;AAED,wBAAgB,IAAI,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,8CASzD;AAED,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,8CAE3F;AAED,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,8CAE/F;AAED,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,8CAE3F;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,8CAExC;AAED,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,IAAgB,GACjB,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;CAAE,8CAsBtF"} \ No newline at end of file diff --git a/_lib/app/components/HomePage.js b/_lib/app/components/HomePage.js new file mode 100644 index 00000000..6319b0bb --- /dev/null +++ b/_lib/app/components/HomePage.js @@ -0,0 +1,30 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +import clsx from 'clsx'; +import { useConfig } from '../hooks/useConfig.js'; +import { Button as Button_ } from './Button.js'; +import * as styles from './HomePage.css.js'; +import { Logo as Logo_ } from './Logo.js'; +import * as Tabs from './Tabs.js'; +export function Root({ children, className }) { + return _jsx("div", { className: clsx(className, styles.root), children: children }); +} +export function Logo({ className }) { + const { logoUrl, title } = useConfig(); + return logoUrl ? (_jsx("div", { className: clsx(className, styles.logo), children: _jsx(Logo_, {}) })) : (_jsx("h1", { className: clsx(className, styles.title), children: title })); +} +export function Tagline({ children, className }) { + return _jsx("div", { className: clsx(className, styles.tagline), children: children }); +} +export function Description({ children, className }) { + return _jsx("div", { className: clsx(className, styles.description), children: children }); +} +export function Buttons({ children, className }) { + return _jsx("div", { className: clsx(className, styles.buttons), children: children }); +} +export function Button(props) { + return _jsx(Button_, { ...props, className: clsx(styles.button, props.className) }); +} +export function InstallPackage({ name, type = 'install', }) { + return (_jsxs(Tabs.Root, { className: styles.tabs, defaultValue: "npm", children: [_jsxs(Tabs.List, { className: styles.tabsList, children: [_jsx(Tabs.Trigger, { value: "npm", children: "npm" }), _jsx(Tabs.Trigger, { value: "pnpm", children: "pnpm" }), _jsx(Tabs.Trigger, { value: "yarn", children: "yarn" })] }), _jsxs(Tabs.Content, { className: styles.tabsContent, value: "npm", children: [_jsx("span", { className: styles.packageManager, children: "npm" }), " ", type === 'init' ? 'init' : 'install', ' ', name] }), _jsxs(Tabs.Content, { className: styles.tabsContent, value: "pnpm", children: [_jsx("span", { className: styles.packageManager, children: "pnpm" }), " ", type === 'init' ? 'create' : 'add', ' ', name] }), _jsxs(Tabs.Content, { className: styles.tabsContent, value: "yarn", children: [_jsx("span", { className: styles.packageManager, children: "yarn" }), " ", type === 'init' ? 'create' : 'add', ' ', name] })] })); +} +//# sourceMappingURL=HomePage.js.map \ No newline at end of file diff --git a/_lib/app/components/HomePage.js.map b/_lib/app/components/HomePage.js.map new file mode 100644 index 00000000..0f693343 --- /dev/null +++ b/_lib/app/components/HomePage.js.map @@ -0,0 +1 @@ +{"version":3,"file":"HomePage.js","sourceRoot":"","sources":["../../../app/components/HomePage.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAA;AAGvB,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,MAAM,IAAI,OAAO,EAAoB,MAAM,aAAa,CAAA;AACjE,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAA;AAC3C,OAAO,EAAE,IAAI,IAAI,KAAK,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AAOjC,MAAM,UAAU,IAAI,CAAC,EAAE,QAAQ,EAAE,S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lib/app/components/Icon.css.d.ts new file mode 100644 index 00000000..a2f768fe --- /dev/null +++ b/_lib/app/components/Icon.css.d.ts @@ -0,0 +1,4 @@ +export declare const sizeVar: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; +export declare const srcVar: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; +export declare const root: string; +//# sourceMappingURL=Icon.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Icon.css.d.ts.map b/_lib/app/components/Icon.css.d.ts.map new file mode 100644 index 00000000..f10a6f6e --- /dev/null +++ b/_lib/app/components/Icon.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Icon.css.d.ts","sourceRoot":"","sources":["../../../app/components/Icon.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,oFAAoB,CAAA;AACxC,eAAO,MAAM,MAAM,oFAAmB,CAAA;AAEtC,eAAO,MAAM,IAAI,QAKf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Icon.css.js b/_lib/app/components/Icon.css.js new file mode 100644 index 00000000..ec0d6d9c --- /dev/null +++ b/_lib/app/components/Icon.css.js @@ -0,0 +1,10 @@ +import { createVar, style } from '@vanilla-extract/css'; +export const sizeVar = createVar('size'); +export const srcVar = createVar('src'); +export const root = style({ + alignItems: 'center', + display: 'flex', + height: sizeVar, + width: sizeVar, +}); +//# sourceMappingURL=Icon.css.js.map \ No newline at end of file diff --git a/_lib/app/components/Icon.css.js.map b/_lib/app/components/Icon.css.js.map new file mode 100644 index 00000000..7912c15e --- /dev/null +++ b/_lib/app/components/Icon.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Icon.css.js","sourceRoot":"","sources":["../../../app/components/Icon.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAEvD,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC,MAAM,CAAC,CAAA;AACxC,MAAM,CAAC,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,CAAC,CAAA;AAEtC,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,UAAU,EAAE,QAAQ;IACpB,OAAO,EAAE,MAAM;IACf,MAAM,EAAE,OAAO;IACf,KAAK,EAAE,OAAO;CACf,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Icon.d.ts b/_lib/app/components/Icon.d.ts new file mode 100644 index 00000000..3b1994b3 --- /dev/null +++ b/_lib/app/components/Icon.d.ts @@ -0,0 +1,10 @@ +/// +export type IconProps = { + className?: string; + label: string; + icon: React.ElementType; + size?: string; + style?: React.CSSProperties; +}; +export declare function Icon({ className, label, icon: Icon, size, style }: IconProps): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=Icon.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Icon.d.ts.map b/_lib/app/components/Icon.d.ts.map new file mode 100644 index 00000000..202c87ab --- /dev/null +++ b/_lib/app/components/Icon.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../app/components/Icon.tsx"],"names":[],"mappings":";AAKA,MAAM,MAAM,SAAS,GAAG;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,KAAK,CAAC,WAAW,CAAA;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAC5B,CAAA;AAED,wBAAgB,IAAI,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,SAAS,8CAc5E"} \ No newline at end of file diff --git a/_lib/app/components/Icon.js b/_lib/app/components/Icon.js new file mode 100644 index 00000000..f3ac52ee --- /dev/null +++ b/_lib/app/components/Icon.js @@ -0,0 +1,11 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { assignInlineVars } from '@vanilla-extract/dynamic'; +import clsx from 'clsx'; +import * as styles from './Icon.css.js'; +export function Icon({ className, label, icon: Icon, size, style }) { + return (_jsx("div", { "aria-label": label, className: clsx(styles.root, className), role: "img", style: { + ...style, + ...assignInlineVars({ [styles.sizeVar]: size }), + }, children: _jsx(Icon, { height: size, width: size }) })); +} +//# sourceMappingURL=Icon.js.map \ No newline at end of file diff --git a/_lib/app/components/Icon.js.map b/_lib/app/components/Icon.js.map new file mode 100644 index 00000000..cb914d26 --- /dev/null +++ b/_lib/app/components/Icon.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Icon.js","sourceRoot":"","sources":["../../../app/components/Icon.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAE3D,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAUvC,MAAM,UAAU,IAAI,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAa;IAC3E,OAAO,CACL,4BACc,KAAK,EACjB,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,EACvC,IAAI,EAAC,KAAK,EACV,KAAK,EAAE;YACL,GAAG,KAAK;YACR,GAAG,gBAAgB,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC;SAChD,YAED,KAAC,IAAI,IAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,GAAI,GAC/B,CACP,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/KeyboardShortcut.css.d.ts b/_lib/app/components/KeyboardShortcut.css.d.ts new file mode 100644 index 00000000..2644e32d --- /dev/null +++ b/_lib/app/components/KeyboardShortcut.css.d.ts @@ -0,0 +1,3 @@ +export declare const root: string; +export declare const kbdGroup: string; +//# sourceMappingURL=KeyboardShortcut.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/KeyboardShortcut.css.d.ts.map b/_lib/app/components/KeyboardShortcut.css.d.ts.map new file mode 100644 index 00000000..8f97e8ee --- /dev/null +++ b/_lib/app/components/KeyboardShortcut.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"KeyboardShortcut.css.d.ts","sourceRoot":"","sources":["../../../app/components/KeyboardShortcut.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,QAUf,CAAA;AAEF,eAAO,MAAM,QAAQ,QAOpB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/KeyboardShortcut.css.js b/_lib/app/components/KeyboardShortcut.css.js new file mode 100644 index 00000000..76fc6640 --- /dev/null +++ b/_lib/app/components/KeyboardShortcut.css.js @@ -0,0 +1,19 @@ +import { style } from '@vanilla-extract/css'; +import { fontSizeVars, spaceVars, viewportVars } from '../styles/vars.css.js'; +export const root = style({ + alignItems: 'center', + display: 'inline-flex', + gap: spaceVars[6], + fontSize: fontSizeVars[12], + '@media': { + [viewportVars['max-720px']]: { + display: 'none', + }, + }, +}); +export const kbdGroup = style({ + alignItems: 'center', + display: 'inline-flex', + gap: spaceVars[3], +}, 'kbdGroup'); +//# sourceMappingURL=KeyboardShortcut.css.js.map \ No newline at end of file diff --git a/_lib/app/components/KeyboardShortcut.css.js.map b/_lib/app/components/KeyboardShortcut.css.js.map new file mode 100644 index 00000000..b4ea3c65 --- /dev/null +++ b/_lib/app/components/KeyboardShortcut.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"KeyboardShortcut.css.js","sourceRoot":"","sources":["../../../app/components/KeyboardShortcut.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE5C,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAE7E,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,UAAU,EAAE,QAAQ;IACpB,OAAO,EAAE,aAAa;IACtB,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC;IACjB,QAAQ,EAAE,YAAY,CAAC,EAAE,CAAC;IAC1B,QAAQ,EAAE;QACR,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,EAAE;YAC3B,OAAO,EAAE,MAAM;SAChB;KACF;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAC3B;IACE,UAAU,EAAE,QAAQ;IACpB,OAAO,EAAE,aAAa;IACtB,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC;CAClB,EACD,UAAU,CACX,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/KeyboardShortcut.d.ts b/_lib/app/components/KeyboardShortcut.d.ts new file mode 100644 index 00000000..1b8c7675 --- /dev/null +++ b/_lib/app/components/KeyboardShortcut.d.ts @@ -0,0 +1,5 @@ +export declare function KeyboardShortcut(props: { + description: string; + keys: string[]; +}): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=KeyboardShortcut.d.js.map \ No newline at end of file diff --git a/_lib/app/components/KeyboardShortcut.d.ts.map b/_lib/app/components/KeyboardShortcut.d.ts.map new file mode 100644 index 00000000..26f44704 --- /dev/null +++ b/_lib/app/components/KeyboardShortcut.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"KeyboardShortcut.d.ts","sourceRoot":"","sources":["../../../app/components/KeyboardShortcut.tsx"],"names":[],"mappings":"AAIA,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IACtC,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,EAAE,CAAA;CACf,8CAaA"} \ No newline at end of file diff --git a/_lib/app/components/KeyboardShortcut.js b/_lib/app/components/KeyboardShortcut.js new file mode 100644 index 00000000..f44827d9 --- /dev/null +++ b/_lib/app/components/KeyboardShortcut.js @@ -0,0 +1,8 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +import { Kbd } from './mdx/Kbd.js'; +import * as styles from './KeyboardShortcut.css.js'; +export function KeyboardShortcut(props) { + const { description, keys } = props; + return (_jsxs("span", { className: styles.root, children: [description, _jsx("span", { className: styles.kbdGroup, children: keys.map((key) => (_jsx(Kbd, { children: key }, key))) })] })); +} +//# sourceMappingURL=KeyboardShortcut.js.map \ No newline at end of file diff --git a/_lib/app/components/KeyboardShortcut.js.map b/_lib/app/components/KeyboardShortcut.js.map new file mode 100644 index 00000000..a6654285 --- /dev/null +++ b/_lib/app/components/KeyboardShortcut.js.map @@ -0,0 +1 @@ +{"version":3,"file":"KeyboardShortcut.js","sourceRoot":"","sources":["../../../app/components/KeyboardShortcut.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAElC,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAA;AAEnD,MAAM,UAAU,gBAAgB,CAAC,KAGhC;IACC,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,KAAK,CAAA;IACnC,OAAO,CACL,gBAAM,SAAS,EAAE,MAAM,CAAC,IAAI,aACzB,WAAW,EAEZ,eAAM,SAAS,EAAE,MAAM,CAAC,QAAQ,YAC7B,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CACjB,KAAC,GAAG,cAAY,GAAG,IAAT,GAAG,CAAa,CAC3B,CAAC,GACG,IACF,CACR,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/Link.css.d.ts b/_lib/app/components/Link.css.d.ts new file mode 100644 index 00000000..064bb21b --- /dev/null +++ b/_lib/app/components/Link.css.d.ts @@ -0,0 +1,4 @@ +export declare const root: string; +export declare const accent_underlined: string; +export declare const styleless: string; +//# sourceMappingURL=Link.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Link.css.d.ts.map b/_lib/app/components/Link.css.d.ts.map new file mode 100644 index 00000000..c983e49f --- /dev/null +++ b/_lib/app/components/Link.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Link.css.d.ts","sourceRoot":"","sources":["../../../app/components/Link.css.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,IAAI,QAAY,CAAA;AAE7B,eAAO,MAAM,iBAAiB,QAc7B,CAAA;AAED,eAAO,MAAM,SAAS,QAOrB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Link.css.js b/_lib/app/components/Link.css.js new file mode 100644 index 00000000..eb06b73e --- /dev/null +++ b/_lib/app/components/Link.css.js @@ -0,0 +1,22 @@ +import { style } from '@vanilla-extract/css'; +import { fontWeightVars, primitiveColorVars, semanticColorVars, spaceVars, } from '../styles/vars.css.js'; +import { arrowColor } from './ExternalLink.css.js'; +export const root = style({}); +export const accent_underlined = style({ + color: semanticColorVars.link, + fontWeight: fontWeightVars.medium, + textUnderlineOffset: spaceVars['2'], + textDecoration: 'underline', + transition: 'color 0.1s', + selectors: { + '&:hover': { + color: semanticColorVars.linkHover, + }, + }, +}, 'accent_underlined'); +export const styleless = style({ + vars: { + [arrowColor]: primitiveColorVars.text3, + }, +}, 'styleless'); +//# sourceMappingURL=Link.css.js.map \ No newline at end of file diff --git a/_lib/app/components/Link.css.js.map b/_lib/app/components/Link.css.js.map new file mode 100644 index 00000000..dff87832 --- /dev/null +++ b/_lib/app/components/Link.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Link.css.js","sourceRoot":"","sources":["../../../app/components/Link.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE5C,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,GACV,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAElD,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC,EAAE,CAAC,CAAA;AAE7B,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CACpC;IACE,KAAK,EAAE,iBAAiB,CAAC,IAAI;IAC7B,UAAU,EAAE,cAAc,CAAC,MAAM;IACjC,mBAAmB,EAAE,SAAS,CAAC,GAAG,CAAC;IACnC,cAAc,EAAE,WAAW;IAC3B,UAAU,EAAE,YAAY;IACxB,SAAS,EAAE;QACT,SAAS,EAAE;YACT,KAAK,EAAE,iBAAiB,CAAC,SAAS;SACnC;KACF;CACF,EACD,mBAAmB,CACpB,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAC5B;IACE,IAAI,EAAE;QACJ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC,KAAK;KACvC;CACF,EACD,WAAW,CACZ,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Link.d.ts b/_lib/app/components/Link.d.ts new file mode 100644 index 00000000..dffa3dfc --- /dev/null +++ b/_lib/app/components/Link.d.ts @@ -0,0 +1,12 @@ +/// +type LinkProps = { + children: React.ReactNode; + className?: string; + hideExternalIcon?: boolean; + onClick?: () => void; + href?: string; + variant?: 'accent underlined' | 'styleless'; +}; +export declare const Link: import("react").ForwardRefExoticComponent>; +export {}; +//# sourceMappingURL=Link.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Link.d.ts.map b/_lib/app/components/Link.d.ts.map new file mode 100644 index 00000000..bea25bf7 --- /dev/null +++ b/_lib/app/components/Link.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../app/components/Link.tsx"],"names":[],"mappings":";AAQA,KAAK,SAAS,GAAG;IACf,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,mBAAmB,GAAG,WAAW,CAAA;CAC5C,CAAA;AAED,eAAO,MAAM,IAAI,+FAqCf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Link.js b/_lib/app/components/Link.js new file mode 100644 index 00000000..ad7de6db --- /dev/null +++ b/_lib/app/components/Link.js @@ -0,0 +1,19 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import { forwardRef } from 'react'; +import { useLocation } from 'react-router-dom'; +import { ExternalLink } from './ExternalLink.js'; +import * as styles from './Link.css.js'; +import { RouterLink } from './RouterLink.js'; +export const Link = forwardRef((props, ref) => { + const { href, variant = 'accent underlined' } = props; + const { pathname } = useLocation(); + // External links + if (href?.match(/^(www|https?)/)) + return (_jsx(ExternalLink, { ...props, ref: ref, className: clsx(props.className, styles.root, variant === 'accent underlined' && styles.accent_underlined, variant === 'styleless' && styles.styleless), hideExternalIcon: props.hideExternalIcon })); + // Internal links + const [before, after] = (href || '').split('#'); + const to = `${before ? before : pathname}${after ? `#${after}` : ''}`; + return (_jsx(RouterLink, { ...props, ref: ref, className: clsx(props.className, styles.root, variant === 'accent underlined' && styles.accent_underlined, variant === 'styleless' && styles.styleless), to: to })); +}); +//# sourceMappingURL=Link.js.map \ No newline at end of file diff --git a/_lib/app/components/Link.js.map b/_lib/app/components/Link.js.map new file mode 100644 index 00000000..77020564 --- /dev/null +++ b/_lib/app/components/Link.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Link.js","sourceRoot":"","sources":["../../../app/components/Link.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,UAAU,EAAwB,MAAM,iBAAiB,CAAA;AAWlE,MAAM,CAAC,MAAM,IAAI,GAAG,UAAU,CAAC,CAAC,KAAgB,EAAE,GAAG,EAAE,EAAE;IACvD,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,mBAAmB,EAAE,GAAG,KAAK,CAAA;IAErD,MAAM,EAAE,QAAQ,EAAE,GAAG,WAAW,EAAE,CAAA;IAElC,iBAAiB;IACjB,IAAI,IAAI,EAAE,KAAK,CAAC,eAAe,CAAC;QAC9B,OAAO,CACL,KAAC,YAAY,OACP,KAAK,EACT,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAI,CACb,KAAK,CAAC,SAAS,EACf,MAAM,CAAC,IAAI,EACX,OAAO,KAAK,mBAAmB,IAAI,MAAM,CAAC,iBAAiB,EAC3D,OAAO,KAAK,WAAW,IAAI,MAAM,CAAC,SAAS,CAC5C,EACD,gBAAgB,EAAE,KAAK,CAAC,gBAAgB,GACxC,CACH,CAAA;IAEH,iBAAiB;IACjB,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAC/C,MAAM,EAAE,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAA;IACrE,OAAO,CACL,KAAC,UAAU,OACJ,KAAyB,EAC9B,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAI,CACb,KAAK,CAAC,SAAS,EACf,MAAM,CAAC,IAAI,EACX,OAAO,KAAK,mBAAmB,IAAI,MAAM,CAAC,iBAAiB,EAC3D,OAAO,KAAK,WAAW,IAAI,MAAM,CAAC,SAAS,CAC5C,EACD,EAAE,EAAE,EAAE,GACN,CACH,CAAA;AACH,CAAC,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Logo.css.d.ts b/_lib/app/components/Logo.css.d.ts new file mode 100644 index 00000000..bed2bcc4 --- /dev/null +++ b/_lib/app/components/Logo.css.d.ts @@ -0,0 +1,4 @@ +export declare const root: string; +export declare const logoDark: string; +export declare const logoLight: string; +//# sourceMappingURL=Logo.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Logo.css.d.ts.map b/_lib/app/components/Logo.css.d.ts.map new file mode 100644 index 00000000..f798cba9 --- /dev/null +++ b/_lib/app/components/Logo.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Logo.css.d.ts","sourceRoot":"","sources":["../../../app/components/Logo.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,QAAY,CAAA;AAE7B,eAAO,MAAM,QAAQ,QAAwB,CAAA;AAK7C,eAAO,MAAM,SAAS,QAAyB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Logo.css.js b/_lib/app/components/Logo.css.js new file mode 100644 index 00000000..99291ef7 --- /dev/null +++ b/_lib/app/components/Logo.css.js @@ -0,0 +1,11 @@ +import { globalStyle, style } from '@vanilla-extract/css'; +export const root = style({}); +export const logoDark = style({}, 'logoDark'); +globalStyle(`:root:not(.dark) ${logoDark}`, { + display: 'none', +}); +export const logoLight = style({}, 'logoLight'); +globalStyle(`:root.dark ${logoLight}`, { + display: 'none', +}); +//# sourceMappingURL=Logo.css.js.map \ No newline at end of file diff --git a/_lib/app/components/Logo.css.js.map b/_lib/app/components/Logo.css.js.map new file mode 100644 index 00000000..b9cfd7cd --- /dev/null +++ b/_lib/app/components/Logo.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Logo.css.js","sourceRoot":"","sources":["../../../app/components/Logo.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAEzD,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC,EAAE,CAAC,CAAA;AAE7B,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC,EAAE,EAAE,UAAU,CAAC,CAAA;AAC7C,WAAW,CAAC,oBAAoB,QAAQ,EAAE,EAAE;IAC1C,OAAO,EAAE,MAAM;CAChB,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC,EAAE,EAAE,WAAW,CAAC,CAAA;AAC/C,WAAW,CAAC,cAAc,SAAS,EAAE,EAAE;IACrC,OAAO,EAAE,MAAM;CAChB,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Logo.d.ts b/_lib/app/components/Logo.d.ts new file mode 100644 index 00000000..a8c22f1a --- /dev/null +++ b/_lib/app/components/Logo.d.ts @@ -0,0 +1,4 @@ +export declare function Logo({ className }: { + className?: string; +}): import("react/jsx-runtime.js").JSX.Element | null; +//# sourceMappingURL=Logo.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Logo.d.ts.map b/_lib/app/components/Logo.d.ts.map new file mode 100644 index 00000000..1eb3ffc3 --- /dev/null +++ b/_lib/app/components/Logo.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Logo.d.ts","sourceRoot":"","sources":["../../../app/components/Logo.tsx"],"names":[],"mappings":"AAKA,wBAAgB,IAAI,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,qDAwBzD"} \ No newline at end of file diff --git a/_lib/app/components/Logo.js b/_lib/app/components/Logo.js new file mode 100644 index 00000000..0ee879bb --- /dev/null +++ b/_lib/app/components/Logo.js @@ -0,0 +1,11 @@ +import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime"; +import clsx from 'clsx'; +import { useConfig } from '../hooks/useConfig.js'; +import * as styles from './Logo.css.js'; +export function Logo({ className }) { + const { logoUrl } = useConfig(); + if (!logoUrl) + return null; + return (_jsx(_Fragment, { children: typeof logoUrl === 'string' ? (_jsx("img", { alt: "Logo", className: clsx(className, styles.root), src: logoUrl })) : (_jsxs(_Fragment, { children: [_jsx("img", { alt: "Logo", className: clsx(className, styles.root, styles.logoDark), src: logoUrl.dark }), _jsx("img", { alt: "Logo", className: clsx(className, styles.root, styles.logoLight), src: logoUrl.light })] })) })); +} +//# sourceMappingURL=Logo.js.map \ No newline at end of file diff --git a/_lib/app/components/Logo.js.map b/_lib/app/components/Logo.js.map new file mode 100644 index 00000000..24b707fd --- /dev/null +++ b/_lib/app/components/Logo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Logo.js","sourceRoot":"","sources":["../../../app/components/Logo.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAA;AAEvB,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,MAAM,UAAU,IAAI,CAAC,EAAE,SAAS,EAA0B;IACxD,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS,EAAE,CAAA;IAE/B,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAA;IACzB,OAAO,CACL,4BACG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,CAC7B,cAAK,GAAG,EAAC,MAAM,EAAC,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,OAAO,GAAI,CAC1E,CAAC,CAAC,CAAC,CACF,8BACE,cACE,GAAG,EAAC,MAAM,EACV,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,EACxD,GAAG,EAAE,OAAO,CAAC,IAAI,GACjB,EACF,cACE,GAAG,EAAC,MAAM,EACV,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,SAAS,CAAC,EACzD,GAAG,EAAE,OAAO,CAAC,KAAK,GAClB,IACD,CACJ,GACA,CACJ,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/MobileSearch.css.d.ts b/_lib/app/components/MobileSearch.css.d.ts new file mode 100644 index 00000000..ba170715 --- /dev/null +++ b/_lib/app/components/MobileSearch.css.d.ts @@ -0,0 +1,2 @@ +export declare const searchButton: string; +//# sourceMappingURL=MobileSearch.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/MobileSearch.css.d.ts.map b/_lib/app/components/MobileSearch.css.d.ts.map new file mode 100644 index 00000000..8826140e --- /dev/null +++ b/_lib/app/components/MobileSearch.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"MobileSearch.css.d.ts","sourceRoot":"","sources":["../../../app/components/MobileSearch.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY,QAUxB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/MobileSearch.css.js b/_lib/app/components/MobileSearch.css.js new file mode 100644 index 00000000..d08df6e3 --- /dev/null +++ b/_lib/app/components/MobileSearch.css.js @@ -0,0 +1,11 @@ +import { style } from '@vanilla-extract/css'; +import { primitiveColorVars, spaceVars } from '../styles/vars.css.js'; +export const searchButton = style({ + alignItems: 'center', + display: 'flex', + color: primitiveColorVars.text, + height: spaceVars[28], + justifyContent: 'center', + width: spaceVars[28], +}, 'searchButton'); +//# sourceMappingURL=MobileSearch.css.js.map \ No newline at end of file diff --git a/_lib/app/components/MobileSearch.css.js.map b/_lib/app/components/MobileSearch.css.js.map new file mode 100644 index 00000000..4d784e7c --- /dev/null +++ b/_lib/app/components/MobileSearch.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MobileSearch.css.js","sourceRoot":"","sources":["../../../app/components/MobileSearch.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE5C,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAErE,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAC/B;IACE,UAAU,EAAE,QAAQ;IACpB,OAAO,EAAE,MAAM;IACf,KAAK,EAAE,kBAAkB,CAAC,IAAI;IAC9B,MAAM,EAAE,SAAS,CAAC,EAAE,CAAC;IACrB,cAAc,EAAE,QAAQ;IACxB,KAAK,EAAE,SAAS,CAAC,EAAE,CAAC;CACrB,EACD,cAAc,CACf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/MobileSearch.d.ts b/_lib/app/components/MobileSearch.d.ts new file mode 100644 index 00000000..d0e79655 --- /dev/null +++ b/_lib/app/components/MobileSearch.d.ts @@ -0,0 +1,2 @@ +export declare function MobileSearch(): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=MobileSearch.d.js.map \ No newline at end of file diff --git a/_lib/app/components/MobileSearch.d.ts.map b/_lib/app/components/MobileSearch.d.ts.map new file mode 100644 index 00000000..08b79c60 --- /dev/null +++ b/_lib/app/components/MobileSearch.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"MobileSearch.d.ts","sourceRoot":"","sources":["../../../app/components/MobileSearch.tsx"],"names":[],"mappings":"AAOA,wBAAgB,YAAY,+CAc3B"} \ No newline at end of file diff --git a/_lib/app/components/MobileSearch.js b/_lib/app/components/MobileSearch.js new file mode 100644 index 00000000..0639e83c --- /dev/null +++ b/_lib/app/components/MobileSearch.js @@ -0,0 +1,11 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +import { useState } from 'react'; +import { MagnifyingGlassIcon } from '@radix-ui/react-icons'; +import * as Dialog from '@radix-ui/react-dialog'; +import * as styles from './MobileSearch.css.js'; +import { SearchDialog } from './SearchDialog.js'; +export function MobileSearch() { + const [open, setOpen] = useState(false); + return (_jsxs(Dialog.Root, { open: open, onOpenChange: setOpen, children: [_jsx(Dialog.Trigger, { asChild: true, children: _jsx("button", { className: styles.searchButton, type: "button", "aria-label": "Search", children: _jsx(MagnifyingGlassIcon, { height: 21, width: 21 }) }) }), _jsx(SearchDialog, { open: open, onClose: () => setOpen(false) })] })); +} +//# sourceMappingURL=MobileSearch.js.map \ No newline at end of file diff --git a/_lib/app/components/MobileSearch.js.map b/_lib/app/components/MobileSearch.js.map new file mode 100644 index 00000000..4370b9f4 --- /dev/null +++ b/_lib/app/components/MobileSearch.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MobileSearch.js","sourceRoot":"","sources":["../../../app/components/MobileSearch.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAA;AAEhD,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEhD,MAAM,UAAU,YAAY;IAC1B,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAEvC,OAAO,CACL,MAAC,MAAM,CAAC,IAAI,IAAC,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,aAC5C,KAAC,MAAM,CAAC,OAAO,IAAC,OAAO,kBACrB,iBAAQ,SAAS,EAAE,MAAM,CAAC,YAAY,EAAE,IAAI,EAAC,QAAQ,gBAAY,QAAQ,YACvE,KAAC,mBAAmB,IAAC,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,GAAI,GACvC,GACM,EAEjB,KAAC,YAAY,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAI,IAC/C,CACf,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/MobileTopNav.css.d.ts b/_lib/app/components/MobileTopNav.css.d.ts new file mode 100644 index 00000000..02b41366 --- /dev/null +++ b/_lib/app/components/MobileTopNav.css.d.ts @@ -0,0 +1,29 @@ +export declare const root: string; +export declare const button: string; +export declare const content: string; +export declare const curtain: string; +export declare const curtainGroup: string; +export declare const curtainItem: string; +export declare const divider: string; +export declare const group: string; +export declare const icon: string; +export declare const item: string; +export declare const logo: string; +export declare const logoImage: string; +export declare const menuTrigger: string; +export declare const menuTitle: string; +export declare const navigation_compact: string; +export declare const navigation: string; +export declare const navigationContent: string; +export declare const navigationItem: string; +export declare const chevronDownIcon: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; +export declare const chevronUpIcon: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; +export declare const navigationTrigger: string; +export declare const outlineTrigger: string; +export declare const outlinePopover: string; +export declare const section: string; +export declare const separator: string; +export declare const sidebarPopover: string; +export declare const title: string; +export declare const topNavPopover: string; +//# sourceMappingURL=MobileTopNav.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/MobileTopNav.css.d.ts.map b/_lib/app/components/MobileTopNav.css.d.ts.map new file mode 100644 index 00000000..c30e23a2 --- /dev/null +++ b/_lib/app/components/MobileTopNav.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"MobileTopNav.css.d.ts","sourceRoot":"","sources":["../../../app/components/MobileTopNav.css.ts"],"names":[],"mappings":"AA0BA,eAAO,MAAM,IAAI,QAcf,CAAA;AAEF,eAAO,MAAM,MAAM,QAMlB,CAAA;AAED,eAAO,MAAM,OAAO,QAKnB,CAAA;AAED,eAAO,MAAM,OAAO,QAmBnB,CAAA;AAED,eAAO,MAAM,YAAY,QAOxB,CAAA;AAED,eAAO,MAAM,WAAW,QAA2B,CAAA;AAEnD,eAAO,MAAM,OAAO,QAOnB,CAAA;AAED,eAAO,MAAM,KAAK,QAA4E,CAAA;AAE9F,eAAO,MAAM,IAAI,QAWhB,CAAA;AAED,eAAO,MAAM,IAAI,QAKhB,CAAA;AAED,eAAO,MAAM,IAAI,QAOhB,CAAA;AAED,eAAO,MAAM,SAAS,QAKrB,CAAA;AAED,eAAO,MAAM,WAAW,QAOvB,CAAA;AAED,eAAO,MAAM,SAAS,QASrB,CAAA;AAED,eAAO,MAAM,kBAAkB,QAAkC,CAAA;AAEjE,eAAO,MAAM,UAAU,QAqBtB,CAAA;AAED,eAAO,MAAM,iBAAiB,QAO7B,CAAA;AAED,eAAO,MAAM,cAAc,QAe1B,CAAA;AAED,eAAO,MAAM,eAAe,oFAA+B,CAAA;AAC3D,eAAO,MAAM,aAAa,oFAA6B,CAAA;AAEvD,eAAO,MAAM,iBAAiB,QAkB7B,CAAA;AAED,eAAO,MAAM,cAAc,QAc1B,CAAA;AAED,eAAO,MAAM,cAAc,QAc1B,CAAA;AAED,eAAO,MAAM,OAAO,QAQnB,CAAA;AAED,eAAO,MAAM,SAAS,QAOrB,CAAA;AAED,eAAO,MAAM,cAAc,QAc1B,CAAA;AAED,eAAO,MAAM,KAAK,QAOjB,CAAA;AAED,eAAO,MAAM,aAAa,QAezB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/MobileTopNav.css.js b/_lib/app/components/MobileTopNav.css.js new file mode 100644 index 00000000..38b316e0 --- /dev/null +++ b/_lib/app/components/MobileTopNav.css.js @@ -0,0 +1,215 @@ +import { createVar, keyframes, style } from '@vanilla-extract/css'; +import { borderRadiusVars, contentVars, fontSizeVars, fontWeightVars, lineHeightVars, primitiveColorVars, sidebarVars, spaceVars, topNavVars, viewportVars, } from '../styles/vars.css.js'; +const fadeIn = keyframes({ + from: { + opacity: 0, + }, + to: { + opacity: 1, + }, +}, 'fadeIn'); +export const root = style({ + alignItems: 'center', + backgroundColor: primitiveColorVars.backgroundDark, + borderBottom: `1px solid ${primitiveColorVars.border}`, + display: 'none', + height: '100%', + justifyContent: 'space-between', + padding: `${spaceVars['0']} ${contentVars.horizontalPadding}`, + width: '100%', + '@media': { + [viewportVars['max-1080px']]: { + display: 'flex', + }, + }, +}); +export const button = style({ + borderRadius: borderRadiusVars[4], + padding: spaceVars[8], +}, 'button'); +export const content = style({ + left: `calc(-1 * ${spaceVars['24']})`, +}, 'content'); +export const curtain = style({ + alignItems: 'center', + backgroundColor: primitiveColorVars.backgroundDark, + borderBottom: `1px solid ${primitiveColorVars.border}`, + display: 'none', + justifyContent: 'space-between', + fontSize: fontSizeVars['13'], + fontWeight: fontWeightVars.medium, + height: '100%', + padding: `${spaceVars['0']} ${contentVars.horizontalPadding}`, + width: '100%', + '@media': { + [viewportVars['max-1080px']]: { + display: 'flex', + }, + }, +}, 'curtain'); +export const curtainGroup = style({ + alignItems: 'center', + display: 'flex', + gap: spaceVars['12'], +}, 'curtainGroup'); +export const curtainItem = style({}, 'curtainItem'); +export const divider = style({ + backgroundColor: primitiveColorVars.border, + height: '35%', + width: '1px', +}, 'divider'); +export const group = style({ alignItems: 'center', display: 'flex', height: '100%' }, 'group'); +export const icon = style({ + color: primitiveColorVars.text2, + transition: 'color 0.1s', + selectors: { + [`${button}:hover &`]: { + color: primitiveColorVars.text, + }, + }, +}, 'icon'); +export const item = style({ + position: 'relative', +}, 'item'); +export const logo = style({ + alignItems: 'center', + display: 'flex', + height: topNavVars.height, +}, 'logo'); +export const logoImage = style({ + height: '30%', +}, 'logoImage'); +export const menuTrigger = style({ + alignItems: 'center', + display: 'flex', + gap: spaceVars['8'], +}, 'menuTrigger'); +export const menuTitle = style({ + maxWidth: '22ch', + overflow: 'hidden', + textAlign: 'left', + textOverflow: 'ellipsis', + whiteSpace: 'pre', +}, 'menuTitle'); +export const navigation_compact = style({}, 'navigation_compact'); +export const navigation = style({ + marginLeft: spaceVars[8], + selectors: { + [`&:not(${navigation_compact})`]: { + '@media': { + [viewportVars['max-720px']]: { + display: 'none', + }, + }, + }, + [`&${navigation_compact}`]: { + '@media': { + [viewportVars['min-720px']]: { + display: 'none', + }, + }, + }, + }, +}, 'navigation'); +export const navigationContent = style({ + display: 'flex', + flexDirection: 'column', + marginLeft: spaceVars[8], +}, 'navigationContent'); +export const navigationItem = style({ + alignItems: 'center', + display: 'flex', + justifyContent: 'flex-start', + fontSize: fontSizeVars[14], + fontWeight: fontWeightVars.medium, + width: '100%', + selectors: { + '&:hover': { color: primitiveColorVars.textAccent }, + '&[data-active="true"]': { color: primitiveColorVars.textAccent }, + '&[data-state="open"]': { color: primitiveColorVars.textAccent }, + }, +}, 'navigationItem'); +export const chevronDownIcon = createVar('chevronDownIcon'); +export const chevronUpIcon = createVar('chevronUpIcon'); +export const navigationTrigger = style({ + selectors: { + '&::after': { + backgroundColor: 'currentColor', + content: '', + display: 'inline-block', + height: '0.625em', + marginLeft: '0.325em', + width: '0.625em', + mask: `${chevronDownIcon} no-repeat center / contain`, + }, + '&[data-state="open"]::after': { + mask: `${chevronUpIcon} no-repeat center / contain`, + }, + }, +}, 'trigger'); +export const outlineTrigger = style({ + animation: `${fadeIn} 500ms cubic-bezier(0.16, 1, 0.3, 1)`, + alignItems: 'center', + color: primitiveColorVars.text2, + display: 'flex', + gap: spaceVars['6'], + selectors: { + '&[data-state="open"]': { + color: primitiveColorVars.textAccent, + }, + }, +}, 'outlineTrigger'); +export const outlinePopover = style({ + display: 'none', + overflowY: 'scroll', + padding: spaceVars['16'], + maxHeight: '80vh', + '@media': { + [viewportVars['max-1080px']]: { + display: 'block', + maxWidth: '300px', + }, + }, +}, 'outlinePopover'); +export const section = style({ + alignItems: 'center', + display: 'flex', + height: '100%', + gap: spaceVars[16], +}, 'section'); +export const separator = style({ + backgroundColor: primitiveColorVars.border, + height: '1.75em', + width: '1px', +}, 'separator'); +export const sidebarPopover = style({ + display: 'none', + overflowY: 'scroll', + padding: `0 ${sidebarVars.horizontalPadding}`, + maxHeight: '80vh', + width: sidebarVars.width, + '@media': { + [viewportVars['max-1080px']]: { + display: 'block', + }, + }, +}, 'sidebarPopover'); +export const title = style({ + fontSize: fontSizeVars['18'], + fontWeight: fontWeightVars.semibold, + lineHeight: lineHeightVars.heading, +}, 'title'); +export const topNavPopover = style({ + display: 'none', + overflowY: 'scroll', + padding: `${sidebarVars.verticalPadding} ${sidebarVars.horizontalPadding}`, + maxHeight: '80vh', + width: sidebarVars.width, + '@media': { + [viewportVars['max-1080px']]: { + display: 'flex', + flexDirection: 'column', + }, + }, +}, 'topNavPopover'); +//# sourceMappingURL=MobileTopNav.css.js.map \ No newline at end of file diff --git a/_lib/app/components/MobileTopNav.css.js.map b/_lib/app/components/MobileTopNav.css.js.map new file mode 100644 index 00000000..33c7a486 --- /dev/null +++ b/_lib/app/components/MobileTopNav.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MobileTopNav.css.js","sourceRoot":"","sources":["../../../app/components/MobileTopNav.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAClE,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,SAAS,EACT,UAAU,EACV,YAAY,GACb,MAAM,uBAAuB,CAAA;AAE9B,MAAM,MAAM,GAAG,SAAS,CACtB;IACE,IAAI,EAAE;QACJ,OAAO,EAAE,CAAC;KACX;IACD,EAAE,EAAE;QACF,OAAO,EAAE,CAAC;KACX;CACF,EACD,QAAQ,CACT,CAAA;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,UAAU,EAAE,QAAQ;IACpB,eAAe,EAAE,kBAAkB,CAAC,cAAc;IAClD,YAAY,EAAE,aAAa,kBAAkB,CAAC,MAAM,EAAE;IACtD,OAAO,EAAE,MAAM;IACf,MAAM,EAAE,MAAM;IACd,cAAc,EAAE,eAAe;IAC/B,OAAO,EAAE,GAAG,SAAS,CAAC,GAAG,CAAC,IAAI,WAAW,CAAC,iBAAiB,EAAE;IAC7D,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE;QACR,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,EAAE;YAC5B,OAAO,EAAE,MAAM;SAChB;KACF;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,KAAK,CACzB;IACE,YAAY,EAAE,gBAAgB,CAAC,CAAC,CAAC;IACjC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;CACtB,EACD,QAAQ,CACT,CAAA;AAED,MAAM,CAAC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ACf,SAAS,EAAE,QAAQ;IACnB,OAAO,EAAE,KAAK,WAAW,CAAC,iBAAiB,EAAE;IAC7C,SAAS,EAAE,MAAM;IACjB,KAAK,EAAE,WAAW,CAAC,KAAK;IACxB,QAAQ,EAAE;QACR,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,EAAE;YAC5B,OAAO,EAAE,OAAO;SACjB;KACF;CACF,EACD,gBAAgB,CACjB,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CACxB;IACE,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC;IAC5B,UAAU,EAAE,cAAc,CAAC,QAAQ;IACnC,UAAU,EAAE,cAAc,CAAC,OAAO;CACnC,EACD,OAAO,CACR,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,CAChC;IACE,OAAO,EAAE,MAAM;IACf,SAAS,EAAE,QAAQ;IACnB,OAAO,EAAE,GAAG,WAAW,CAAC,eAAe,IAAI,WAAW,CAAC,iBAAiB,EAAE;IAC1E,SAAS,EAAE,MAAM;IACjB,KAAK,EAAE,WAAW,CAAC,KAAK;IACxB,QAAQ,EAAE;QACR,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,EAAE;YAC5B,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,QAAQ;SACxB;KACF;CACF,EACD,eAAe,CAChB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/MobileTopNav.d.ts b/_lib/app/components/MobileTopNav.d.ts new file mode 100644 index 00000000..90ae5524 --- /dev/null +++ b/_lib/app/components/MobileTopNav.d.ts @@ -0,0 +1,8 @@ +export declare function MobileTopNav(): import("react/jsx-runtime.js").JSX.Element; +export declare namespace MobileTopNav { + var Curtain: typeof import("./MobileTopNav.js").Curtain; +} +export declare function Curtain({ enableScrollToTop, }: { + enableScrollToTop?: boolean; +}): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=MobileTopNav.d.js.map \ No newline at end of file diff --git a/_lib/app/components/MobileTopNav.d.ts.map b/_lib/app/components/MobileTopNav.d.ts.map new file mode 100644 index 00000000..9b9091d2 --- /dev/null +++ b/_lib/app/components/MobileTopNav.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"MobileTopNav.d.ts","sourceRoot":"","sources":["../../../app/components/MobileTopNav.tsx"],"names":[],"mappings":"AAkCA,wBAAgB,YAAY,+CA2C3B;yBA3Ce,YAAY;;;AA+L5B,wBAAgB,OAAO,CAAC,EACtB,iBAAiB,GAClB,EAAE;IACD,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAC5B,8CA4EA"} \ No newline at end of file diff --git a/_lib/app/components/MobileTopNav.js b/_lib/app/components/MobileTopNav.js new file mode 100644 index 00000000..2c0c7116 --- /dev/null +++ b/_lib/app/components/MobileTopNav.js @@ -0,0 +1,113 @@ +import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime"; +import * as Accordion from '@radix-ui/react-accordion'; +import { assignInlineVars } from '@vanilla-extract/dynamic'; +import clsx from 'clsx'; +import { useMemo, useState } from 'react'; +import { useLocation } from 'react-router-dom'; +import { useActiveNavIds } from '../hooks/useActiveNavIds.js'; +import { useConfig } from '../hooks/useConfig.js'; +import { useLayout } from '../hooks/useLayout.js'; +import { usePageData } from '../hooks/usePageData.js'; +import { useSidebar } from '../hooks/useSidebar.js'; +import { Icon } from './Icon.js'; +import { Link } from './Link.js'; +import { MobileSearch } from './MobileSearch.js'; +import * as styles from './MobileTopNav.css.js'; +import { NavLogo } from './NavLogo.js'; +import * as NavigationMenu from './NavigationMenu.js'; +import { Outline } from './Outline.js'; +import { Popover } from './Popover.js'; +import { RouterLink } from './RouterLink.js'; +import { Sidebar } from './Sidebar.js'; +import { ChevronDown } from './icons/ChevronDown.js'; +import { ChevronRight } from './icons/ChevronRight.js'; +import { ChevronUp } from './icons/ChevronUp.js'; +import { Discord } from './icons/Discord.js'; +import { GitHub } from './icons/GitHub.js'; +import { Menu } from './icons/Menu.js'; +import { Telegram } from './icons/Telegram.js'; +import { Warpcast } from './icons/Warpcast.js'; +import { X } from './icons/X.js'; +MobileTopNav.Curtain = Curtain; +export function MobileTopNav() { + const config = useConfig(); + const { showLogo } = useLayout(); + return (_jsxs("div", { className: styles.root, children: [_jsxs("div", { className: styles.section, children: [showLogo && (_jsx("div", { className: styles.group, children: _jsx("div", { className: styles.logo, children: _jsx(RouterLink, { to: "/", style: { alignItems: 'center', display: 'flex', height: '100%' }, children: _jsx(NavLogo, {}) }) }) })), config.topNav && (_jsx(_Fragment, { children: _jsxs("div", { className: styles.group, children: [_jsx(Navigation, { items: config.topNav }), _jsx(CompactNavigation, { items: config.topNav })] }) }))] }), _jsxs("div", { className: styles.section, children: [_jsx("div", { className: styles.group, style: { marginRight: '-8px' }, children: _jsx(MobileSearch, {}) }), config.socials && config.socials?.length > 0 && (_jsxs(_Fragment, { children: [_jsx("div", { className: styles.divider }), _jsx("div", { className: styles.group, style: { marginLeft: '-8px' }, children: config.socials?.map((social, i) => (_jsx(SocialButton, { ...social }, i))) })] }))] })] })); +} +function Navigation({ items }) { + const { pathname } = useLocation(); + const activeIds = useActiveNavIds({ pathname, items }); + return (_jsx(NavigationMenu.Root, { className: styles.navigation, children: _jsx(NavigationMenu.List, { children: items.map((item, i) => item?.link ? (_jsx(NavigationMenu.Link, { active: activeIds?.includes(item.id), href: item.link, children: item.text }, i)) : (_jsxs(NavigationMenu.Item, { className: styles.item, children: [_jsx(NavigationMenu.Trigger, { active: activeIds?.includes(item.id), children: item.text }), _jsx(NavigationMenu.Content, { className: styles.content, children: _jsx(NavigationMenuContent, { items: item.items || [] }) })] }, i))) }) })); +} +function NavigationMenuContent({ items }) { + const { pathname } = useLocation(); + const activeIds = useActiveNavIds({ pathname, items }); + return (_jsx("ul", { children: items?.map((item, i) => (_jsx(NavigationMenu.Link, { active: activeIds.includes(item.id), href: item.link, children: item.text }, i))) })); +} +function CompactNavigation({ items }) { + const [showPopover, setShowPopover] = useState(false); + const { pathname } = useLocation(); + const activeIds = useActiveNavIds({ pathname, items }); + const activeItem = items.filter((item) => item.id === activeIds[0])[0]; + const { basePath } = useConfig(); + const assetBasePath = import.meta.env.PROD ? basePath : ''; + return (_jsx("div", { className: clsx(styles.navigation, styles.navigation_compact), children: activeItem ? (_jsxs(Popover.Root, { modal: true, open: showPopover, onOpenChange: setShowPopover, children: [_jsxs(Popover.Trigger, { className: clsx(styles.menuTrigger, styles.navigationItem), children: [activeItem.text, _jsx(Icon, { label: "Menu", icon: ChevronDown, size: "11px" })] }), _jsx(Popover, { className: styles.topNavPopover, children: _jsx(Accordion.Root, { type: "single", collapsible: true, style: { display: 'flex', flexDirection: 'column' }, children: items.map((item, i) => item?.link ? (_jsx(Link, { "data-active": activeIds.includes(item.id), className: styles.navigationItem, href: item.link, onClick: () => setShowPopover(false), variant: "styleless", children: item.text }, i)) : (_jsxs(Accordion.Item, { value: i.toString(), children: [_jsx(Accordion.Trigger, { className: clsx(styles.navigationItem, styles.navigationTrigger), "data-active": activeIds.includes(item.id), style: assignInlineVars({ + [styles.chevronDownIcon]: `url(${assetBasePath}/.vocs/icons/chevron-down.svg)`, + [styles.chevronUpIcon]: `url(${assetBasePath}/.vocs/icons/chevron-up.svg)`, + }), children: item.text }), _jsx(Accordion.Content, { className: styles.navigationContent, children: item.items?.map((item, i) => (_jsx(Link, { className: styles.navigationItem, href: item.link, onClick: () => setShowPopover(false), variant: "styleless", children: item.text }, i))) })] }, i))) }) })] })) : items[0]?.link ? (_jsx(Link, { className: styles.navigationItem, href: items[0].link, variant: "styleless", children: items[0].text })) : null })); +} +const iconsForIcon = { + discord: Discord, + github: GitHub, + telegram: Telegram, + warpcast: Warpcast, + x: X, +}; +const sizesForTypes = { + discord: '21px', + github: '18px', + telegram: '21px', + warpcast: '18px', + x: '16px', +}; +function SocialButton({ icon, label, link, type }) { + return (_jsx("a", { className: styles.button, href: link, target: "_blank", rel: "noopener noreferrer", children: _jsx(Icon, { className: styles.icon, label: label, icon: iconsForIcon[icon], size: sizesForTypes[type] || '18px' }) })); +} +export function Curtain({ enableScrollToTop, }) { + const { pathname } = useLocation(); + const { layout, showSidebar } = useLayout(); + const { frontmatter = {} } = usePageData(); + const sidebar = useSidebar(); + const [isOutlineOpen, setOutlineOpen] = useState(false); + const [isSidebarOpen, setSidebarOpen] = useState(false); + const sidebarItemTitle = useMemo(() => { + if (!sidebar || layout === 'minimal') + return; + const sidebarItem = getSidebarItemFromPathname({ + sidebarItems: sidebar.items, + pathname, + }); + return sidebarItem?.text; + }, [layout, pathname, sidebar]); + const contentTitle = useMemo(() => { + if (typeof window === 'undefined') + return; + return document.querySelector('.vocs_Content h1')?.textContent; + }, []); + const title = sidebarItemTitle || frontmatter.title || contentTitle; + return (_jsxs("div", { className: styles.curtain, children: [_jsx("div", { className: styles.curtainGroup, children: _jsx("div", { className: styles.curtainItem, children: showSidebar ? (_jsxs(Popover.Root, { modal: true, open: isSidebarOpen, onOpenChange: setSidebarOpen, children: [_jsxs(Popover.Trigger, { className: styles.menuTrigger, children: [_jsx(Icon, { label: "Menu", icon: Menu, size: "13px" }), _jsx("div", { className: styles.menuTitle, children: title })] }), _jsx(Popover, { className: styles.sidebarPopover, children: _jsx(Sidebar, { onClickItem: () => setSidebarOpen(false) }) })] })) : (title) }) }), _jsxs("div", { className: styles.curtainGroup, children: [enableScrollToTop && (_jsxs(_Fragment, { children: [_jsx("div", { className: styles.curtainItem, children: _jsxs("button", { className: styles.outlineTrigger, onClick: () => window.scrollTo({ behavior: 'smooth', top: 0 }), type: "button", children: ["Top", _jsx(Icon, { label: "Scroll to top", icon: ChevronUp, size: "10px" })] }) }), _jsx("div", { className: styles.separator })] })), layout === 'docs' && (_jsx("div", { className: styles.curtainItem, children: _jsxs(Popover.Root, { modal: true, open: isOutlineOpen, onOpenChange: setOutlineOpen, children: [_jsxs(Popover.Trigger, { className: styles.outlineTrigger, children: ["On this page", _jsx(Icon, { label: "On this page", icon: ChevronRight, size: "10px" })] }), _jsx(Popover, { className: styles.outlinePopover, children: _jsx(Outline, { onClickItem: () => setOutlineOpen(false), showTitle: false }) })] }) }))] })] })); +} +function getSidebarItemFromPathname({ sidebarItems, pathname: pathname_, }) { + const pathname = pathname_.replace(/(.+)\/$/, '$1'); + for (const item of sidebarItems) { + if (item?.link === pathname) + return item; + if (item.items) { + const childItem = getSidebarItemFromPathname({ sidebarItems: item.items, pathname }); + if (childItem) + return childItem; + } + } + return undefined; +} +//# sourceMappingURL=MobileTopNav.js.map \ No newline at end of file diff --git a/_lib/app/components/MobileTopNav.js.map b/_lib/app/components/MobileTopNav.js.map new file mode 100644 index 00000000..abca48a5 --- /dev/null +++ b/_lib/app/components/MobileTopNav.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MobileTopNav.js","sourceRoot":"","sources":["../../../app/components/MobileTopNav.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAA;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAsB,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAG9C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,M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,CAAA;AACH,CAAC;AAED,SAAS,0BAA0B,CAAC,EAClC,YAAY,EACZ,QAAQ,EAAE,SAAS,GACsC;IACzD,MAAM,QAAQ,GAAG,SAAS,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;IACnD,KAAK,MAAM,IAAI,IAAI,YAAY,EAAE;QAC/B,IAAI,IAAI,EAAE,IAAI,KAAK,QAAQ;YAAE,OAAO,IAAI,CAAA;QACxC,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,MAAM,SAAS,GAAG,0BAA0B,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAA;YACpF,IAAI,SAAS;gBAAE,OAAO,SAAS,CAAA;SAChC;KACF;IACD,OAAO,SAAS,CAAA;AAClB,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/NavLogo.css.d.ts b/_lib/app/components/NavLogo.css.d.ts new file mode 100644 index 00000000..92854821 --- /dev/null +++ b/_lib/app/components/NavLogo.css.d.ts @@ -0,0 +1,3 @@ +export declare const logoImage: string; +export declare const title: string; +//# sourceMappingURL=NavLogo.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/NavLogo.css.d.ts.map b/_lib/app/components/NavLogo.css.d.ts.map new file mode 100644 index 00000000..61272352 --- /dev/null +++ b/_lib/app/components/NavLogo.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"NavLogo.css.d.ts","sourceRoot":"","sources":["../../../app/components/NavLogo.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS,QAMrB,CAAA;AAED,eAAO,MAAM,KAAK,QAOjB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/NavLogo.css.js b/_lib/app/components/NavLogo.css.js new file mode 100644 index 00000000..d75b83bf --- /dev/null +++ b/_lib/app/components/NavLogo.css.js @@ -0,0 +1,12 @@ +import { style } from '@vanilla-extract/css'; +import { fontSizeVars, fontWeightVars, lineHeightVars } from '../styles/vars.css.js'; +export const logoImage = style({ + height: '50%', + width: 'auto', +}, 'logoImage'); +export const title = style({ + fontSize: fontSizeVars['18'], + fontWeight: fontWeightVars.semibold, + lineHeight: lineHeightVars.heading, +}, 'title'); +//# sourceMappingURL=NavLogo.css.js.map \ No newline at end of file diff --git a/_lib/app/components/NavLogo.css.js.map b/_lib/app/components/NavLogo.css.js.map new file mode 100644 index 00000000..26f94aaf --- /dev/null +++ b/_lib/app/components/NavLogo.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"NavLogo.css.js","sourceRoot":"","sources":["../../../app/components/NavLogo.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAEpF,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAC5B;IACE,MAAM,EAAE,KAAK;IACb,KAAK,EAAE,MAAM;CACd,EACD,WAAW,CACZ,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CACxB;IACE,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC;IAC5B,UAAU,EAAE,cAAc,CAAC,QAAQ;IACnC,UAAU,EAAE,cAAc,CAAC,OAAO;CACnC,EACD,OAAO,CACR,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/NavLogo.d.ts b/_lib/app/components/NavLogo.d.ts new file mode 100644 index 00000000..1721922e --- /dev/null +++ b/_lib/app/components/NavLogo.d.ts @@ -0,0 +1,2 @@ +export declare function NavLogo(): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=NavLogo.d.js.map \ No newline at end of file diff --git a/_lib/app/components/NavLogo.d.ts.map b/_lib/app/components/NavLogo.d.ts.map new file mode 100644 index 00000000..da67e1b9 --- /dev/null +++ b/_lib/app/components/NavLogo.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"NavLogo.d.ts","sourceRoot":"","sources":["../../../app/components/NavLogo.tsx"],"names":[],"mappings":"AAIA,wBAAgB,OAAO,+CAKtB"} \ No newline at end of file diff --git a/_lib/app/components/NavLogo.js b/_lib/app/components/NavLogo.js new file mode 100644 index 00000000..2179702a --- /dev/null +++ b/_lib/app/components/NavLogo.js @@ -0,0 +1,11 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { useConfig } from '../hooks/useConfig.js'; +import { Logo } from './Logo.js'; +import * as styles from './NavLogo.css.js'; +export function NavLogo() { + const config = useConfig(); + if (config.logoUrl) + return _jsx(Logo, { className: styles.logoImage }); + return _jsx("div", { className: styles.title, children: config.title }); +} +//# sourceMappingURL=NavLogo.js.map \ No newline at end of file diff --git a/_lib/app/components/NavLogo.js.map b/_lib/app/components/NavLogo.js.map new file mode 100644 index 00000000..9b2e77b7 --- /dev/null +++ b/_lib/app/components/NavLogo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"NavLogo.js","sourceRoot":"","sources":["../../../app/components/NavLogo.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAA;AAE1C,MAAM,UAAU,OAAO;IACrB,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAE1B,IAAI,MAAM,CAAC,OAAO;QAAE,OAAO,KAAC,IAAI,IAAC,SAAS,EAAE,MAAM,CAAC,SAAS,GAAI,CAAA;IAChE,OAAO,cAAK,SAAS,EAAE,MAAM,CAAC,KAAK,YAAG,MAAM,CAAC,KAAK,GAAO,CAAA;AAC3D,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/NavigationMenu.css.d.ts b/_lib/app/components/NavigationMenu.css.d.ts new file mode 100644 index 00000000..c26e61fb --- /dev/null +++ b/_lib/app/components/NavigationMenu.css.d.ts @@ -0,0 +1,8 @@ +export declare const root: string; +export declare const list: string; +export declare const link: string; +export declare const item: string; +export declare const chevronDownIcon: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; +export declare const trigger: string; +export declare const content: string; +//# sourceMappingURL=NavigationMenu.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/NavigationMenu.css.d.ts.map b/_lib/app/components/NavigationMenu.css.d.ts.map new file mode 100644 index 00000000..ccb919f0 --- /dev/null +++ b/_lib/app/components/NavigationMenu.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"NavigationMenu.css.d.ts","sourceRoot":"","sources":["../../../app/components/NavigationMenu.css.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,IAAI,QAAY,CAAA;AAE7B,eAAO,MAAM,IAAI,QAMhB,CAAA;AAED,eAAO,MAAM,IAAI,QAahB,CAAA;AAED,eAAO,MAAM,IAAI,QAAoB,CAAA;AAErC,eAAO,MAAM,eAAe,oFAA+B,CAAA;AAE3D,eAAO,MAAM,OAAO,QAmBnB,CAAA;AAED,eAAO,MAAM,OAAO,QAgBnB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/NavigationMenu.css.js b/_lib/app/components/NavigationMenu.css.js new file mode 100644 index 00000000..580031cd --- /dev/null +++ b/_lib/app/components/NavigationMenu.css.js @@ -0,0 +1,62 @@ +import { createVar, keyframes, style } from '@vanilla-extract/css'; +import { borderRadiusVars, fontSizeVars, fontWeightVars, primitiveColorVars, spaceVars, zIndexVars, } from '../styles/vars.css.js'; +const fadeIn = keyframes({ + from: { + opacity: 0, + transform: 'translateY(-6px)', + }, + to: { + opacity: 1, + transform: 'translateY(0px)', + }, +}, 'fadeIn'); +export const root = style({}); +export const list = style({ + display: 'flex', + gap: spaceVars[20], +}, 'list'); +export const link = style({ + alignItems: 'center', + display: 'flex', + fontSize: fontSizeVars[14], + fontWeight: fontWeightVars.medium, + height: '100%', + selectors: { + '&:hover': { color: primitiveColorVars.textAccent }, + '&[data-active="true"]': { color: primitiveColorVars.textAccent }, + }, +}, 'link'); +export const item = style({}, 'item'); +export const chevronDownIcon = createVar('chevronDownIcon'); +export const trigger = style([ + link, + { + selectors: { + '&::after': { + backgroundColor: 'currentColor', + content: '', + color: primitiveColorVars.text3, + display: 'inline-block', + height: '0.625em', + marginLeft: '0.325em', + width: '0.625em', + mask: `${chevronDownIcon} no-repeat center / contain`, + }, + }, + }, +], 'trigger'); +export const content = style({ + backgroundColor: primitiveColorVars.background2, + border: `1px solid ${primitiveColorVars.border}`, + borderRadius: borderRadiusVars[4], + boxShadow: `0 3px 10px ${primitiveColorVars.shadow}`, + display: 'flex', + flexDirection: 'column', + padding: `${spaceVars['12']} ${spaceVars['16']}`, + position: 'absolute', + top: `calc(100% + ${spaceVars['8']})`, + minWidth: '200px', + zIndex: zIndexVars.popover, + animation: `${fadeIn} 500ms cubic-bezier(0.16, 1, 0.3, 1)`, +}, 'content'); +//# sourceMappingURL=NavigationMenu.css.js.map \ No newline at end of file diff --git a/_lib/app/components/NavigationMenu.css.js.map b/_lib/app/components/NavigationMenu.css.js.map new file mode 100644 index 00000000..5e27368d --- /dev/null +++ b/_lib/app/components/NavigationMenu.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"NavigationMenu.css.js","sourceRoot":"","sources":["../../../app/components/NavigationMenu.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAClE,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,SAAS,EACT,UAAU,GACX,MAAM,uBAAuB,CAAA;AAE9B,MAAM,MAAM,GAAG,SAAS,CACtB;IACE,IAAI,EAAE;QACJ,OAAO,EAAE,CAAC;QACV,SAAS,EAAE,kBAAkB;KAC9B;IACD,EAAE,EAAE;QACF,OAAO,EAAE,CAAC;QACV,SAAS,EAAE,iBAAiB;KAC7B;CACF,EACD,QAAQ,CACT,CAAA;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC,EAAE,CAAC,CAAA;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E,cAAc,kBAAkB,CAAC,MAAM,EAAE;IACpD,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,QAAQ;IACvB,OAAO,EAAE,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,EAAE;IAChD,QAAQ,EAAE,UAAU;IACpB,GAAG,EAAE,eAAe,SAAS,CAAC,GAAG,CAAC,GAAG;IACrC,QAAQ,EAAE,OAAO;IACjB,MAAM,EAAE,UAAU,CAAC,OAAO;IAC1B,SAAS,EAAE,GAAG,MAAM,sCAAsC;CAC3D,EACD,SAAS,CACV,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/NavigationMenu.d.ts b/_lib/app/components/NavigationMenu.d.ts new file mode 100644 index 00000000..f5196427 --- /dev/null +++ b/_lib/app/components/NavigationMenu.d.ts @@ -0,0 +1,16 @@ +import * as NavigationMenu from '@radix-ui/react-navigation-menu'; +import type { ReactNode } from 'react'; +export declare const Root: (props: NavigationMenu.NavigationMenuProps) => import("react/jsx-runtime.js").JSX.Element; +export declare const List: (props: NavigationMenu.NavigationMenuListProps) => import("react/jsx-runtime.js").JSX.Element; +export declare const Link: ({ active, children, className, href, }: { + active?: boolean | undefined; + children: ReactNode; + className?: string | undefined; + href?: string | undefined; +}) => import("react/jsx-runtime.js").JSX.Element; +export declare const Item: (props: NavigationMenu.NavigationMenuItemProps) => import("react/jsx-runtime.js").JSX.Element; +export declare const Trigger: ({ active, className, ...props }: NavigationMenu.NavigationMenuTriggerProps & { + active?: boolean | undefined; +}) => import("react/jsx-runtime.js").JSX.Element; +export declare const Content: (props: NavigationMenu.NavigationMenuContentProps) => import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=NavigationMenu.d.js.map \ No newline at end of file diff --git a/_lib/app/components/NavigationMenu.d.ts.map b/_lib/app/components/NavigationMenu.d.ts.map new file mode 100644 index 00000000..c51568a0 --- /dev/null +++ b/_lib/app/components/NavigationMenu.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"NavigationMenu.d.ts","sourceRoot":"","sources":["../../../app/components/NavigationMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,iCAAiC,CAAA;AAGjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMtC,eAAO,MAAM,IAAI,UAAW,eAAe,mBAAmB,+CAE7D,CAAA;AAED,eAAO,MAAM,IAAI,UAAW,eAAe,uBAAuB,+CAEjE,CAAA;AAED,eAAO,MAAM,IAAI;;cAOL,SAAS;;;gDAcpB,CAAA;AAED,eAAO,MAAM,IAAI,UAAW,eAAe,uBAAuB,+CAEjE,CAAA;AAED,eAAO,MAAM,OAAO;;gDAmBnB,CAAA;AAED,eAAO,MAAM,OAAO,UAAW,eAAe,0BAA0B,+CAEvE,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/NavigationMenu.js b/_lib/app/components/NavigationMenu.js new file mode 100644 index 00000000..1c3b95ec --- /dev/null +++ b/_lib/app/components/NavigationMenu.js @@ -0,0 +1,20 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import * as NavigationMenu from '@radix-ui/react-navigation-menu'; +import { assignInlineVars } from '@vanilla-extract/dynamic'; +import clsx from 'clsx'; +import { useConfig } from '../hooks/useConfig.js'; +import { Link as Link_ } from './Link.js'; +import * as styles from './NavigationMenu.css.js'; +export const Root = (props) => (_jsx(NavigationMenu.Root, { ...props, className: clsx(props.className, styles.root) })); +export const List = (props) => (_jsx(NavigationMenu.List, { ...props, className: clsx(props.className, styles.list) })); +export const Link = ({ active, children, className, href, }) => (_jsx(NavigationMenu.Link, { asChild: true, children: _jsx(Link_, { "data-active": active, className: clsx(className, styles.link), href: href, variant: "styleless", children: children }) })); +export const Item = (props) => (_jsx(NavigationMenu.Item, { ...props, className: clsx(props.className, styles.item) })); +export const Trigger = ({ active, className, ...props }) => { + const { basePath } = useConfig(); + const assetBasePath = import.meta.env.PROD ? basePath : ''; + return (_jsx(NavigationMenu.Trigger, { ...props, "data-active": active, className: clsx(className, styles.trigger), style: assignInlineVars({ + [styles.chevronDownIcon]: `url(${assetBasePath}/.vocs/icons/chevron-down.svg)`, + }) })); +}; +export const Content = (props) => (_jsx(NavigationMenu.Content, { ...props, className: clsx(props.className, styles.content) })); +//# sourceMappingURL=NavigationMenu.js.map \ No newline at end of file diff --git a/_lib/app/components/NavigationMenu.js.map b/_lib/app/components/NavigationMenu.js.map new file mode 100644 index 00000000..7beaf15c --- /dev/null +++ b/_lib/app/components/NavigationMenu.js.map @@ -0,0 +1 @@ +{"version":3,"file":"NavigationMenu.js","sourceRoot":"","sources":["../../../app/components/NavigationMenu.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,cAAc,MAAM,iCAAiC,CAAA;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,IAAI,MAAM,MAAM,CAAA;AAGvB,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,IAAI,IAAI,KAAK,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,KAAK,MAAM,MAAM,yBAAyB,CAAA;AAEjD,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,KAAyC,EAAE,EAAE,CAAC,CACjE,KAAC,cAAc,CAAC,IAAI,OAAK,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,GAAI,CAClF,CAAA;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,KAA6C,EAAE,EAAE,CAAC,CACrE,KAAC,cAAc,CAAC,IAAI,OAAK,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,GAAI,CAClF,CAAA;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EACnB,MAAM,EACN,QAAQ,EACR,SAAS,EACT,IAAI,GAML,EAAE,EAAE,CAAC,CACJ,KAA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css.d.ts new file mode 100644 index 00000000..fbbe0680 --- /dev/null +++ b/_lib/app/components/NotFound.css.d.ts @@ -0,0 +1,3 @@ +export declare const root: string; +export declare const divider: string; +//# sourceMappingURL=NotFound.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/NotFound.css.d.ts.map b/_lib/app/components/NotFound.css.d.ts.map new file mode 100644 index 00000000..3ba1210a --- /dev/null +++ b/_lib/app/components/NotFound.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"NotFound.css.d.ts","sourceRoot":"","sources":["../../../app/components/NotFound.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,QAOf,CAAA;AAEF,eAAO,MAAM,OAAO,QAMnB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/NotFound.css.js b/_lib/app/components/NotFound.css.js new file mode 100644 index 00000000..06cd831b --- /dev/null +++ b/_lib/app/components/NotFound.css.js @@ -0,0 +1,15 @@ +import { style } from '@vanilla-extract/css'; +import { primitiveColorVars, spaceVars } from '../styles/vars.css.js'; +export const root = style({ + alignItems: 'center', + display: 'flex', + flexDirection: 'column', + maxWidth: '400px', + margin: '0 auto', + paddingTop: spaceVars['64'], +}); +export const divider = style({ + borderColor: primitiveColorVars.border, + width: '50%', +}, 'divider'); +//# sourceMappingURL=NotFound.css.js.map \ No newline at end of file diff --git a/_lib/app/components/NotFound.css.js.map b/_lib/app/components/NotFound.css.js.map new file mode 100644 index 00000000..69622510 --- /dev/null +++ b/_lib/app/components/NotFound.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"NotFound.css.js","sourceRoot":"","sources":["../../../app/components/NotFound.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAErE,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,UAAU,EAAE,QAAQ;IACpB,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,QAAQ;IACvB,QAAQ,EAAE,OAAO;IACjB,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,SAAS,CAAC,IAAI,CAAC;CAC5B,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAC1B;IACE,WAAW,EAAE,kBAAkB,CAAC,MAAM;IACtC,KAAK,EAAE,KAAK;CACb,EACD,SAAS,CACV,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/NotFound.d.ts b/_lib/app/components/NotFound.d.ts new file mode 100644 index 00000000..26e3e9f7 --- /dev/null +++ b/_lib/app/components/NotFound.d.ts @@ -0,0 +1,2 @@ +export declare function NotFound(): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=NotFound.d.js.map \ No newline at end of file diff --git a/_lib/app/components/NotFound.d.ts.map b/_lib/app/components/NotFound.d.ts.map new file mode 100644 index 00000000..a56868db --- /dev/null +++ b/_lib/app/components/NotFound.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"NotFound.d.ts","sourceRoot":"","sources":["../../../app/components/NotFound.tsx"],"names":[],"mappings":"AAMA,wBAAgB,QAAQ,+CAYvB"} \ No newline at end of file diff --git a/_lib/app/components/NotFound.js b/_lib/app/components/NotFound.js new file mode 100644 index 00000000..32083e9b --- /dev/null +++ b/_lib/app/components/NotFound.js @@ -0,0 +1,10 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +import { spaceVars } from '../styles/vars.css.js'; +import { Link } from './Link.js'; +import * as styles from './NotFound.css.js'; +import { H1 } from './mdx/H1.js'; +import { Paragraph } from './mdx/Paragraph.js'; +export function NotFound() { + return (_jsxs("div", { className: styles.root, children: [_jsx(H1, { children: "Page Not Found" }), _jsx("div", { style: { height: spaceVars['24'] } }), _jsx("hr", { className: styles.divider }), _jsx("div", { style: { height: spaceVars['24'] } }), _jsx(Paragraph, { children: "The page you were looking for could not be found." }), _jsx("div", { style: { height: spaceVars['8'] } }), _jsx(Link, { href: "/", children: "Go to Home Page" })] })); +} +//# sourceMappingURL=NotFound.js.map \ No newline at end of file diff --git a/_lib/app/components/NotFound.js.map b/_lib/app/components/NotFound.js.map new file mode 100644 index 00000000..9645ea29 --- /dev/null +++ b/_lib/app/components/NotFound.js.map @@ -0,0 +1 @@ +{"version":3,"file":"NotFound.js","sourceRoot":"","sources":["../../../app/components/NotFound.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAA;AAC3C,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAA;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C,MAAM,UAAU,QAAQ;IACtB,OAAO,CACL,eAAK,SAAS,EAAE,MAAM,CAAC,IAAI,aACzB,KAAC,EAAE,iCAAoB,EACvB,cAAK,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,GAAI,EAC3C,aAAI,SAAS,EAAE,MAAM,CAAC,OAAO,GAAI,EACjC,cAAK,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,GAAI,EAC3C,KAAC,SAAS,oEAA8D,EACxE,cAAK,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,EAAE,GAAI,EAC1C,KAAC,IAAI,IAAC,IAAI,EAAC,GAAG,gCAAuB,IACjC,CACP,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/Outline.css.d.ts b/_lib/app/components/Outline.css.d.ts new file mode 100644 index 00000000..a2be95aa --- /dev/null +++ b/_lib/app/components/Outline.css.d.ts @@ -0,0 +1,7 @@ +export declare const root: string; +export declare const nav: string; +export declare const heading: string; +export declare const items: string; +export declare const item: string; +export declare const link: string; +//# sourceMappingURL=Outline.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Outline.css.d.ts.map b/_lib/app/components/Outline.css.d.ts.map new file mode 100644 index 00000000..eebc1326 --- /dev/null +++ b/_lib/app/components/Outline.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Outline.css.d.ts","sourceRoot":"","sources":["../../../app/components/Outline.css.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,IAAI,QAEf,CAAA;AAEF,eAAO,MAAM,GAAG,QAaf,CAAA;AAED,eAAO,MAAM,OAAO,QASnB,CAAA;AAED,eAAO,MAAM,KAAK,QASjB,CAAA;AAED,eAAO,MAAM,IAAI,QAUhB,CAAA;AAED,eAAO,MAAM,IAAI,QAmBhB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Outline.css.js b/_lib/app/components/Outline.css.js new file mode 100644 index 00000000..c00097cd --- /dev/null +++ b/_lib/app/components/Outline.css.js @@ -0,0 +1,57 @@ +import { style } from '@vanilla-extract/css'; +import { gutterRight as DocsLayout_gutterRight } from '../layouts/DocsLayout.css.js'; +import { fontSizeVars, fontWeightVars, lineHeightVars, primitiveColorVars, spaceVars, } from '../styles/vars.css.js'; +export const root = style({ + width: '100%', +}); +export const nav = style({ + display: 'flex', + flexDirection: 'column', + gap: spaceVars[8], + selectors: { + [`${DocsLayout_gutterRight} &`]: { + borderLeft: `1px solid ${primitiveColorVars.border}`, + paddingLeft: spaceVars[16], + }, + }, +}, 'nav'); +export const heading = style({ + color: primitiveColorVars.title, + fontSize: fontSizeVars[13], + fontWeight: fontWeightVars.semibold, + lineHeight: lineHeightVars.heading, + letterSpacing: '0.025em', +}, 'heading'); +export const items = style({ + selectors: { + '& &': { + paddingLeft: spaceVars[12], + }, + }, +}, 'items'); +export const item = style({ + lineHeight: lineHeightVars.outlineItem, + marginBottom: spaceVars[8], + overflow: 'hidden', + textOverflow: 'ellipsis', + // @ts-expect-error + textWrap: 'nowrap', +}, 'item'); +export const link = style({ + color: primitiveColorVars.text2, + fontWeight: fontWeightVars.medium, + fontSize: fontSizeVars[13], + transition: 'color 0.1s', + selectors: { + '&[data-active="true"]': { + color: primitiveColorVars.textAccent, + }, + '&[data-active="true"]:hover': { + color: primitiveColorVars.textAccentHover, + }, + '&:hover': { + color: primitiveColorVars.text, + }, + }, +}, 'link'); +//# sourceMappingURL=Outline.css.js.map \ No newline at end of file diff --git a/_lib/app/components/Outline.css.js.map b/_lib/app/components/Outline.css.js.map new file mode 100644 index 00000000..11ec3249 --- /dev/null +++ b/_lib/app/components/Outline.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Outline.css.js","sourceRoot":"","sources":["../../../app/components/Outline.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE5C,OAAO,EAAE,WAAW,IAAI,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AAEpF,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,SAAS,GACV,MAAM,uBAAuB,CAAA;AAE9B,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,KAAK,EAAE,MAAM;CACd,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,GAAG,GAAG,KAAK,CACtB;IACE,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,QAAQ;IACvB,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC;IACjB,SAAS,EAAE;QACT,CAAC,GAAG,sBAAsB,IAAI,CAAC,EAAE;YAC/B,UAAU,EAAE,aAAa,kBAAkB,CAAC,MAAM,EAAE;YACpD,WAAW,EAAE,SAAS,CAAC,EAAE,CAAC;SAC3B;KACF;CACF,EACD,KAAK,CACN,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAC1B;IACE,KAAK,EAAE,kBAAkB,CAAC,KAAK;IAC/B,QAAQ,EAAE,YAAY,CAAC,EAAE,CAAC;IAC1B,UAAU,EAAE,cAAc,CAAC,QAAQ;IACnC,UAAU,EAAE,cAAc,CAAC,OAAO;IAClC,aAAa,EAAE,SAAS;CACzB,EACD,SAAS,CACV,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CACxB;IACE,SAAS,EAAE;QACT,KAAK,EAAE;YACL,WAAW,EAAE,SAAS,CAAC,EAAE,CAAC;SAC3B;KACF;CACF,EACD,OAAO,CACR,CAAA;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CACvB;IACE,UAAU,EAAE,cAAc,CAAC,WAAW;IACtC,YAAY,EAAE,SAAS,CAAC,CAAC,CAAC;IAC1B,QAAQ,EAAE,QAAQ;IAClB,YAAY,EAAE,UAAU;IACxB,mBAAmB;IACnB,QAAQ,EAAE,QAAQ;CACnB,EACD,MAAM,CACP,CAAA;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CACvB;IACE,KAAK,EAAE,kBAAkB,CAAC,KAAK;IAC/B,UAAU,EAAE,cAAc,CAAC,MAAM;IACjC,QAAQ,EAAE,YAAY,CAAC,EAAE,CAAC;IAC1B,UAAU,EAAE,YAAY;IACxB,SAAS,EAAE;QACT,uBAAuB,EAAE;YACvB,KAAK,EAAE,kBAAkB,CAAC,UAAU;SACrC;QACD,6BAA6B,EAAE;YAC7B,KAAK,EAAE,kBAAkB,CAAC,eAAe;SAC1C;QACD,SAAS,EAAE;YACT,KAAK,EAAE,kBAAkB,CAAC,IAAI;SAC/B;KACF;CACF,EACD,MAAM,CACP,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Outline.d.ts b/_lib/app/components/Outline.d.ts new file mode 100644 index 00000000..9ca1911a --- /dev/null +++ b/_lib/app/components/Outline.d.ts @@ -0,0 +1,8 @@ +export declare function Outline({ minLevel, maxLevel: maxLevel_, highlightActive, onClickItem, showTitle, }?: { + minLevel?: number; + maxLevel?: number; + highlightActive?: boolean; + onClickItem?: () => void; + showTitle?: boolean; +}): import("react/jsx-runtime.js").JSX.Element | null; +//# sourceMappingURL=Outline.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Outline.d.ts.map b/_lib/app/components/Outline.d.ts.map new file mode 100644 index 00000000..850ff0c7 --- /dev/null +++ b/_lib/app/components/Outline.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Outline.d.ts","sourceRoot":"","sources":["../../../app/components/Outline.tsx"],"names":[],"mappings":"AAkBA,wBAAgB,OAAO,CAAC,EACtB,QAAY,EACZ,QAAQ,EAAE,SAAa,EACvB,eAAsB,EACtB,WAAW,EACX,SAAgB,GACjB,GAAE;IACD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,SAAS,CAAC,EAAE,OAAO,CAAA;CACf,qDA8JL"} \ No newline at end of file diff --git a/_lib/app/components/Outline.js b/_lib/app/components/Outline.js new file mode 100644 index 00000000..afd66614 --- /dev/null +++ b/_lib/app/components/Outline.js @@ -0,0 +1,160 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +import { Fragment, useEffect, useMemo, useRef, useState } from 'react'; +import { Link, useLocation } from 'react-router-dom'; +import { useConfig } from '../hooks/useConfig.js'; +import { useLayout } from '../hooks/useLayout.js'; +import { debounce } from '../utils/debounce.js'; +import { deserializeElement } from '../utils/deserializeElement.js'; +import * as styles from './Outline.css.js'; +import { root as Heading, slugTarget } from './mdx/Heading.css.js'; +export function Outline({ minLevel = 2, maxLevel: maxLevel_ = 3, highlightActive = true, onClickItem, showTitle = true, } = {}) { + const { outlineFooter } = useConfig(); + const { showOutline } = useLayout(); + const maxLevel = (() => { + if (typeof showOutline === 'number') + return minLevel + showOutline - 1; + return maxLevel_; + })(); + const active = useRef(true); + const { pathname, hash } = useLocation(); + const [headingElements, setHeadingElements] = useState([]); + // biome-ignore lint/correctness/useExhaustiveDependencies: + useEffect(() => { + if (typeof window === 'undefined') + return; + const elements = Array.from(document.querySelectorAll(`.${Heading}`)); + setHeadingElements(elements); + }, [pathname]); + const items = useMemo(() => { + if (!headingElements) + return []; + return headingElements + .map((element) => { + const slugTargetElement = element.querySelector(`.${slugTarget}`); + if (!slugTargetElement) + return null; + const box = slugTargetElement.getBoundingClientRect(); + const id = slugTargetElement.id; + const level = Number(element.tagName[1]); + const text = element.textContent; + const topOffset = window.scrollY + box.top; + if (level < minLevel || level > maxLevel) + return null; + return { + id, + level, + slugTargetElement, + text, + topOffset, + }; + }) + .filter(Boolean); + }, [headingElements, maxLevel, minLevel]); + const [activeId, setActiveId] = useState(hash.replace('#', '')); + // As the user scrolls the page, we want to make the corresponding outline item active. + useEffect(() => { + if (typeof window === 'undefined') + return; + const observer = new IntersectionObserver(([entry]) => { + if (!active.current) + return; + const id = entry.target.id; + if (entry.isIntersecting) + setActiveId(id); + else { + const box = entry.target.getBoundingClientRect(); + const isVisible = box.top > 0; + if (!isVisible) + return; + const activeIndex = items.findIndex((item) => item.id === activeId); + const previousId = items[activeIndex - 1]?.id; + setActiveId(previousId); + } + }, { + rootMargin: '0px 0px -95% 0px', + }); + for (const item of items) + observer.observe(item.slugTargetElement); + return () => observer.disconnect(); + }, [activeId, items]); + // When the user hits the bottom of the page, we want to make the last outline item active. + useEffect(() => { + if (typeof window === 'undefined') + return; + const observer = new IntersectionObserver(([entry]) => { + if (!active.current) + return; + const lastItemId = items[items.length - 1]?.id; + if (entry.isIntersecting) + setActiveId(lastItemId); + else if (activeId === lastItemId) + setActiveId(items[items.length - 2].id); + }); + observer.observe(document.querySelector('[data-bottom-observer]')); + return () => observer.disconnect(); + }, [activeId, items]); + // Intersection observers are a bit unreliable for fast scrolling, + // use scroll event listener to sync active item. + useEffect(() => { + if (typeof window === 'undefined') + return; + const callback = debounce(() => { + if (!active.current) + return; + if (window.scrollY === 0) { + setActiveId(items[0]?.id); + return; + } + if (window.scrollY + document.documentElement.clientHeight >= + document.documentElement.scrollHeight) { + setActiveId(items[items.length - 1]?.id); + return; + } + for (let i = 0; i < items.length; i++) { + const item = items[i]; + if (window.scrollY < item.topOffset) { + setActiveId(items[i - 1]?.id); + break; + } + } + }, 100); + window.addEventListener('scroll', callback); + return () => window.removeEventListener('scroll', callback); + }, [items]); + if (items.length === 0) + return null; + const levelItems = items.filter((item) => item.level === minLevel); + return (_jsxs("aside", { className: styles.root, children: [_jsxs("nav", { className: styles.nav, children: [showTitle && _jsx("h2", { className: styles.heading, children: "On this page" }), _jsx(Items, { activeId: highlightActive ? activeId : null, items: items, onClickItem: () => { + onClickItem?.(); + active.current = false; + setTimeout(() => { + active.current = true; + }, 500); + }, levelItems: levelItems, setActiveId: setActiveId })] }), deserializeElement(outlineFooter)] })); +} +function Items({ activeId, items, levelItems, onClickItem, setActiveId, }) { + return (_jsx("ul", { className: styles.items, children: levelItems.map(({ id, level, text }) => { + const hash = `#${id}`; + const isActive = activeId === id; + const nextLevelItems = (() => { + const itemIndex = items.findIndex((item) => item.id === id); + const nextIndex = itemIndex + 1; + const nextItemLevel = items[nextIndex]?.level; + if (nextItemLevel <= level) + return null; + const nextItems = []; + for (let i = nextIndex; i < items.length; i++) { + const item = items[i]; + if (item.level !== nextItemLevel) + break; + nextItems.push(item); + } + return nextItems; + })(); + return (_jsxs(Fragment, { children: [_jsx("li", { className: styles.item, children: _jsx(Link, { "data-active": isActive, to: hash, onClick: () => { + onClickItem?.(); + setActiveId(id); + }, className: styles.link, children: text }) }), nextLevelItems && (_jsx(Items, { activeId: activeId, levelItems: nextLevelItems, items: items, onClickItem: onClickItem, setActiveId: setActiveId }))] }, id)); + }) })); +} +//# sourceMappingURL=Outline.js.map \ No newline at end of file diff --git a/_lib/app/components/Outline.js.map b/_lib/app/components/Outline.js.map new file mode 100644 index 00000000..1cc9abff --- /dev/null +++ b/_lib/app/components/Outline.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Outline.js","sourceRoot":"","sources":["../../../app/components/Outline.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,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AE,EAAE,CAAA;gCACf,WAAW,CAAC,EAAE,CAAC,CAAA;4BACjB,CAAC,EACD,SAAS,EAAE,MAAM,CAAC,IAAI,YAErB,IAAI,GACA,GACJ,EACJ,cAAc,IAAI,CACjB,KAAC,KAAK,IACJ,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,cAAc,EAC1B,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,WAAW,GACxB,CACH,KAtBY,EAAE,CAuBN,CACZ,CAAA;QACH,CAAC,CAAC,GACC,CACN,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/Popover.css.d.ts b/_lib/app/components/Popover.css.d.ts new file mode 100644 index 00000000..f0a9d945 --- /dev/null +++ b/_lib/app/components/Popover.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=Popover.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Popover.css.d.ts.map b/_lib/app/components/Popover.css.d.ts.map new file mode 100644 index 00000000..989d83e4 --- /dev/null +++ b/_lib/app/components/Popover.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Popover.css.d.ts","sourceRoot":"","sources":["../../../app/components/Popover.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,QAMf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Popover.css.js b/_lib/app/components/Popover.css.js new file mode 100644 index 00000000..af43080f --- /dev/null +++ b/_lib/app/components/Popover.css.js @@ -0,0 +1,10 @@ +import { style } from '@vanilla-extract/css'; +import { borderRadiusVars, primitiveColorVars, spaceVars, zIndexVars } from '../styles/vars.css.js'; +export const root = style({ + backgroundColor: primitiveColorVars.background2, + border: `1px solid ${primitiveColorVars.border}`, + borderRadius: borderRadiusVars[4], + margin: `0 ${spaceVars[6]}`, + zIndex: zIndexVars.popover, +}); +//# sourceMappingURL=Popover.css.js.map \ No newline at end of file diff --git a/_lib/app/components/Popover.css.js.map b/_lib/app/components/Popover.css.js.map new file mode 100644 index 00000000..06b5c313 --- /dev/null +++ b/_lib/app/components/Popover.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Popover.css.js","sourceRoot":"","sources":["../../../app/components/Popover.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAEnG,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,eAAe,EAAE,kBAAkB,CAAC,WAAW;IAC/C,MAAM,EAAE,aAAa,kBAAkB,CAAC,MAAM,EAAE;IAChD,YAAY,EAAE,gBAAgB,CAAC,CAAC,CAAC;IACjC,MAAM,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE;IAC3B,MAAM,EAAE,UAAU,CAAC,OAAO;CAC3B,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Popover.d.ts b/_lib/app/components/Popover.d.ts new file mode 100644 index 00000000..059a45f4 --- /dev/null +++ b/_lib/app/components/Popover.d.ts @@ -0,0 +1,11 @@ +import * as Popover_ from '@radix-ui/react-popover'; +import type { ReactNode } from 'react'; +export declare function Popover({ children, className }: { + children: ReactNode; + className?: string; +}): import("react/jsx-runtime.js").JSX.Element; +export declare namespace Popover { + var Root; + var Trigger; +} +//# sourceMappingURL=Popover.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Popover.d.ts.map b/_lib/app/components/Popover.d.ts.map new file mode 100644 index 00000000..cf0602aa --- /dev/null +++ b/_lib/app/components/Popover.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../app/components/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAA;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAQtC,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,8CAQ3F;yBARe,OAAO"} \ No newline at end of file diff --git a/_lib/app/components/Popover.js b/_lib/app/components/Popover.js new file mode 100644 index 00000000..c43c33d3 --- /dev/null +++ b/_lib/app/components/Popover.js @@ -0,0 +1,10 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import * as Popover_ from '@radix-ui/react-popover'; +import clsx from 'clsx'; +import * as styles from './Popover.css.js'; +Popover.Root = Popover_.Root; +Popover.Trigger = Popover_.Trigger; +export function Popover({ children, className }) { + return (_jsx(Popover_.Portal, { children: _jsx(Popover_.Content, { className: clsx(styles.root, className), sideOffset: 12, children: children }) })); +} +//# sourceMappingURL=Popover.js.map \ No newline at end of file diff --git a/_lib/app/components/Popover.js.map b/_lib/app/components/Popover.js.map new file mode 100644 index 00000000..265cd40c --- /dev/null +++ b/_lib/app/components/Popover.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Popover.js","sourceRoot":"","sources":["../../../app/components/Popover.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAA;AAGnD,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAA;AAE1C,OAAO,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAA;AAC5B,OAAO,CAAC,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAA;AAElC,MAAM,UAAU,OAAO,CAAC,EAAE,QAAQ,EAAE,SAAS,EAA+C;IAC1F,OAAO,CACL,KAAC,QAAQ,CAAC,MAAM,cACd,KAAC,QAAQ,CAAC,OAAO,IAAC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,UAAU,EAAE,EAAE,YACtE,QAAQ,GACQ,GACH,CACnB,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/Raw.d.ts b/_lib/app/components/Raw.d.ts new file mode 100644 index 00000000..8065c5a3 --- /dev/null +++ b/_lib/app/components/Raw.d.ts @@ -0,0 +1,5 @@ +import type { ReactNode } from 'react'; +export declare function Raw({ children }: { + children: ReactNode; +}): import("react/jsx-runtime").JSX.Element; +//# sourceMappingURL=Raw.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Raw.d.ts.map b/_lib/app/components/Raw.d.ts.map new file mode 100644 index 00000000..437c85fc --- /dev/null +++ b/_lib/app/components/Raw.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Raw.d.ts","sourceRoot":"","sources":["../../../app/components/Raw.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,wBAAgB,GAAG,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAExD"} \ No newline at end of file diff --git a/_lib/app/components/Raw.js b/_lib/app/components/Raw.js new file mode 100644 index 00000000..62938ea8 --- /dev/null +++ b/_lib/app/components/Raw.js @@ -0,0 +1,6 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { MDXProvider } from '@mdx-js/react'; +export function Raw({ children }) { + return _jsx(MDXProvider, { disableParentContext: true, children: children }); +} +//# sourceMappingURL=Raw.js.map \ No newline at end of file diff --git a/_lib/app/components/Raw.js.map b/_lib/app/components/Raw.js.map new file mode 100644 index 00000000..b11e981a --- /dev/null +++ b/_lib/app/components/Raw.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Raw.js","sourceRoot":"","sources":["../../../app/components/Raw.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAG3C,MAAM,UAAU,GAAG,CAAC,EAAE,QAAQ,EAA2B;IACvD,OAAO,KAAC,WAAW,IAAC,oBAAoB,kBAAE,QAAQ,GAAe,CAAA;AACnE,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/RouterLink.d.ts b/_lib/app/components/RouterLink.d.ts new file mode 100644 index 00000000..9fe19f42 --- /dev/null +++ b/_lib/app/components/RouterLink.d.ts @@ -0,0 +1,5 @@ +/// +import { type LinkProps } from 'react-router-dom'; +export type RouterLinkProps = LinkProps; +export declare const RouterLink: import("react").ForwardRefExoticComponent>; +//# sourceMappingURL=RouterLink.d.js.map \ No newline at end of file diff --git a/_lib/app/components/RouterLink.d.ts.map b/_lib/app/components/RouterLink.d.ts.map new file mode 100644 index 00000000..faffef30 --- /dev/null +++ b/_lib/app/components/RouterLink.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"RouterLink.d.ts","sourceRoot":"","sources":["../../../app/components/RouterLink.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAKvD,MAAM,MAAM,eAAe,GAAG,SAAS,CAAA;AAEvC,eAAO,MAAM,UAAU,+FASrB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/RouterLink.js b/_lib/app/components/RouterLink.js new file mode 100644 index 00000000..bb1a6aea --- /dev/null +++ b/_lib/app/components/RouterLink.js @@ -0,0 +1,16 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { forwardRef, useEffect } from 'react'; +import { useInView } from 'react-intersection-observer'; +import { Link } from 'react-router-dom'; +import { routes } from 'virtual:routes'; +import { mergeRefs } from '../utils/mergeRefs.js'; +export const RouterLink = forwardRef((props, ref) => { + const loadRoute = () => routes.find((route) => route.path === props.to)?.lazy(); + const { ref: intersectionRef, inView } = useInView(); + useEffect(() => { + if (inView) + loadRoute(); + }, [inView, loadRoute]); + return _jsx(Link, { ref: mergeRefs(ref, intersectionRef), ...props }); +}); +//# sourceMappingURL=RouterLink.js.map \ No newline at end of file diff --git a/_lib/app/components/RouterLink.js.map b/_lib/app/components/RouterLink.js.map new file mode 100644 index 00000000..a2855ffa --- /dev/null +++ b/_lib/app/components/RouterLink.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RouterLink.js","sourceRoot":"","sources":["../../../app/components/RouterLink.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAA;AACvD,OAAO,EAAE,IAAI,EAAkB,MAAM,kBAAkB,CAAA;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAEvC,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAIjD,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAAC,CAAC,KAAsB,EAAE,GAAG,EAAE,EAAE;IACnE,MAAM,SAAS,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,CAAA;IAE/E,MAAM,EAAE,GAAG,EAAE,eAAe,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,CAAA;IACpD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,MAAM;YAAE,SAAS,EAAE,CAAA;IACzB,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAA;IAEvB,OAAO,KAAC,IAAI,IAAC,GAAG,EAAE,SAAS,CAAC,GAAG,EAAE,eAAe,CAAC,KAAM,KAAK,GAAI,CAAA;AAClE,CAAC,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/SearchDialog.css.d.ts b/_lib/app/components/SearchDialog.css.d.ts new file mode 100644 index 00000000..9d6cf91e --- /dev/null +++ b/_lib/app/components/SearchDialog.css.d.ts @@ -0,0 +1,19 @@ +export declare const root: string; +export declare const overlay: string; +export declare const searchBox: string; +export declare const searchInput: string; +export declare const searchInputIcon: string; +export declare const searchInputIconDesktop: string; +export declare const searchInputIconMobile: string; +export declare const results: string; +export declare const result: string; +export declare const resultSelected: string; +export declare const resultIcon: string; +export declare const titles: string; +export declare const title: string; +export declare const titleIcon: string; +export declare const content: string; +export declare const excerpt: string; +export declare const searchShortcuts: string; +export declare const searchShortcutsGroup: string; +//# sourceMappingURL=SearchDialog.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/SearchDialog.css.d.ts.map b/_lib/app/components/SearchDialog.css.d.ts.map new file mode 100644 index 00000000..229af12f --- /dev/null +++ b/_lib/app/components/SearchDialog.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"SearchDialog.css.d.ts","sourceRoot":"","sources":["../../../app/components/SearchDialog.css.ts"],"names":[],"mappings":"AAuCA,eAAO,MAAM,IAAI,QA6Bf,CAAA;AAEF,eAAO,MAAM,OAAO,QAUnB,CAAA;AAED,eAAO,MAAM,SAAS,QAkBrB,CAAA;AAED,eAAO,MAAM,WAAW,QAiBvB,CAAA;AAED,eAAO,MAAM,eAAe,QAK3B,CAAA;AAED,eAAO,MAAM,sBAAsB,QASlC,CAAA;AAED,eAAO,MAAM,qBAAqB,QAUjC,CAAA;AAED,eAAO,MAAM,OAAO,QAWnB,CAAA;AAED,eAAO,MAAM,MAAM,QAYlB,CAAA;AAaD,eAAO,MAAM,cAAc,QAK1B,CAAA;AAED,eAAO,MAAM,UAAU,QAOtB,CAAA;AAED,eAAO,MAAM,MAAM,QAUlB,CAAA;AAED,eAAO,MAAM,KAAK,QAQjB,CAAA;AAED,eAAO,MAAM,SAAS,QAOrB,CAAA;AAMD,eAAO,MAAM,OAAO,QAAmC,CAAA;AAEvD,eAAO,MAAM,OAAO,QAiCnB,CAAA;AAgBD,eAAO,MAAM,eAAe,QAe3B,CAAA;AAED,eAAO,MAAM,oBAAoB,QAQhC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/SearchDialog.css.js b/_lib/app/components/SearchDialog.css.js new file mode 100644 index 00000000..377a155a --- /dev/null +++ b/_lib/app/components/SearchDialog.css.js @@ -0,0 +1,228 @@ +import { globalStyle, keyframes, style } from '@vanilla-extract/css'; +import { borderRadiusVars, fontSizeVars, fontWeightVars, primitiveColorVars, semanticColorVars, spaceVars, viewportVars, zIndexVars, } from '../styles/vars.css.js'; +const fadeIn = keyframes({ + from: { + opacity: 0, + }, + to: { + opacity: 1, + }, +}, 'fadeIn'); +const fadeAndSlideIn = keyframes({ + from: { + opacity: 0, + transform: 'translate(-50%, -5%) scale(0.96)', + }, + to: { + opacity: 1, + transform: 'translate(-50%, 0%) scale(1)', + }, +}, 'fadeAndSlideIn'); +export const root = style({ + animation: `${fadeAndSlideIn} 0.1s ease-in-out`, + background: primitiveColorVars.background, + borderRadius: borderRadiusVars[6], + display: 'flex', + flexDirection: 'column', + gap: spaceVars[8], + height: 'min-content', + left: '50%', + margin: '64px auto', + maxHeight: 'min(100vh - 128px, 900px)', + padding: spaceVars[12], + paddingBottom: spaceVars[8], + position: 'fixed', + top: 0, + transform: 'translate(-50%, 0%)', + width: 'min(100vw - 60px, 775px)', + zIndex: zIndexVars.backdrop, + '@media': { + [viewportVars['max-720px']]: { + borderRadius: 0, + // TODO: Not working + height: 'calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom))', + margin: 0, + maxHeight: 'unset', + width: '100vw', + }, + }, +}); +export const overlay = style({ + animation: `${fadeIn} 0.1s ease-in-out`, + // TODO: Refactor to variable + background: 'rgba(0, 0, 0, .6)', + position: 'fixed', + inset: 0, + zIndex: zIndexVars.backdrop, +}, 'overlay'); +export const searchBox = style({ + alignItems: 'center', + border: `1px solid ${primitiveColorVars.border}`, + borderRadius: borderRadiusVars[4], + display: 'flex', + gap: spaceVars[8], + paddingLeft: spaceVars[8], + paddingRight: spaceVars[8], + marginBottom: spaceVars[8], + width: '100%', + selectors: { + '&:focus-within': { + borderColor: primitiveColorVars.borderAccent, + }, + }, +}, 'searchBox'); +export const searchInput = style({ + background: 'transparent', + display: 'flex', + fontSize: fontSizeVars[16], + height: spaceVars[40], + width: '100%', + selectors: { + '&:focus': { + outline: 'none', + }, + '&::placeholder': { + color: primitiveColorVars.text4, + }, + }, +}, 'searchInput'); +export const searchInputIcon = style({ + color: primitiveColorVars.text3, +}, 'searchInputIcon'); +export const searchInputIconDesktop = style({ + '@media': { + [viewportVars['max-720px']]: { + display: 'none', + }, + }, +}, 'searchInputIconDesktop'); +export const searchInputIconMobile = style({ + display: 'none', + '@media': { + [viewportVars['max-720px']]: { + display: 'block', + }, + }, +}, 'searchInputIconMobile'); +export const results = style({ + display: 'flex', + flexDirection: 'column', + gap: spaceVars[8], + overflowX: 'hidden', + overflowY: 'auto', + overscrollBehavior: 'contain', + width: '100%', +}, 'results'); +export const result = style({ + border: `1.5px solid ${primitiveColorVars.border}`, + borderRadius: borderRadiusVars[4], + width: '100%', + selectors: { + '&:focus-within': { + borderColor: primitiveColorVars.borderAccent, + }, + }, +}, 'result'); +globalStyle(`${result} > a`, { + display: 'flex', + flexDirection: 'column', + gap: spaceVars[8], + minHeight: spaceVars[36], + outline: 'none', + justifyContent: 'center', + padding: spaceVars[12], + width: '100%', +}); +export const resultSelected = style({ + borderColor: primitiveColorVars.borderAccent, +}, 'resultSelected'); +export const resultIcon = style({ + color: primitiveColorVars.textAccent, + marginRight: 1, + width: 15, +}, 'resultIcon'); +export const titles = style({ + alignItems: 'center', + display: 'flex', + flexWrap: 'wrap', + fontWeight: fontWeightVars.medium, + gap: spaceVars[4], + lineHeight: '22px', +}, 'titles'); +export const title = style({ + alignItems: 'center', + display: 'flex', + gap: spaceVars[4], + whiteSpace: 'nowrap', +}, 'title'); +export const titleIcon = style({ + color: primitiveColorVars.text, + display: 'inline-block', + opacity: 0.5, +}, 'titleIcon'); +globalStyle(`${resultSelected} ${title}, ${resultSelected} ${titleIcon}`, { + color: primitiveColorVars.textAccent, +}); +export const content = style({ padding: 0 }, 'content'); +export const excerpt = style({ + maxHeight: '8.75rem', + overflow: 'hidden', + opacity: 0.5, + position: 'relative', + '::before': { + content: '', + position: 'absolute', + top: '-1px', + left: 0, + width: '100%', + height: '8px', + background: `linear-gradient(${primitiveColorVars.background}, transparent)`, + zIndex: '1000', + }, + '::after': { + content: '', + position: 'absolute', + bottom: '-1px', + left: 0, + width: '100%', + height: '12px', + background: `linear-gradient(transparent, ${primitiveColorVars.background})`, + zIndex: '1000', + }, + '@media': { + [viewportVars['max-720px']]: { + opacity: 1, + }, + }, +}, 'excerpt'); +globalStyle(`${title} mark, ${excerpt} mark`, { + backgroundColor: semanticColorVars.searchHighlightBackground, + color: semanticColorVars.searchHighlightText, + borderRadius: borderRadiusVars[2], + paddingBottom: 0, + paddingLeft: spaceVars[2], + paddingRight: spaceVars[2], + paddingTop: 0, +}); +globalStyle(`${resultSelected} ${excerpt}`, { + opacity: 1, +}); +export const searchShortcuts = style({ + alignItems: 'center', + color: primitiveColorVars.text2, + display: 'flex', + gap: spaceVars[20], + fontSize: fontSizeVars[14], + '@media': { + [viewportVars['max-720px']]: { + display: 'none', + }, + }, +}, 'searchShortcuts'); +export const searchShortcutsGroup = style({ + alignItems: 'center', + display: 'inline-flex', + gap: spaceVars[3], + marginRight: spaceVars[6], +}, 'searchShortcutsGroup'); +//# sourceMappingURL=SearchDialog.css.js.map \ No newline at end of file diff --git a/_lib/app/components/SearchDialog.css.js.map b/_lib/app/components/SearchDialog.css.js.map new file mode 100644 index 00000000..20a3bf39 --- /dev/null +++ b/_lib/app/components/SearchDialog.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SearchDialog.css.js","sourceRoot":"","sources":["../../../app/components/SearchDialog.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAEpE,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,EACT,YAAY,EACZ,UAAU,GACX,MAAM,uBAAuB,CAAA;AAE9B,MAAM,MAAM,GAAG,SAAS,CACtB;IACE,IAAI,EAAE;QACJ,O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AC3B,OAAO,EAAE,MAAM;SAChB;KACF;CACF,EACD,iBAAiB,CAClB,CAAA;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CACvC;IACE,UAAU,EAAE,QAAQ;IACpB,OAAO,EAAE,aAAa;IACtB,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC;IACjB,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC;CAC1B,EACD,sBAAsB,CACvB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/SearchDialog.d.ts b/_lib/app/components/SearchDialog.d.ts new file mode 100644 index 00000000..b3309533 --- /dev/null +++ b/_lib/app/components/SearchDialog.d.ts @@ -0,0 +1,5 @@ +export declare function SearchDialog(props: { + open: boolean; + onClose(): void; +}): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=SearchDialog.d.js.map \ No newline at end of file diff --git a/_lib/app/components/SearchDialog.d.ts.map b/_lib/app/components/SearchDialog.d.ts.map new file mode 100644 index 00000000..8698ac2b --- /dev/null +++ b/_lib/app/components/SearchDialog.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"SearchDialog.d.ts","sourceRoot":"","sources":["../../../app/components/SearchDialog.tsx"],"names":[],"mappings":"AAwBA,wBAAgB,YAAY,CAAC,KAAK,EAAE;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,IAAI,IAAI,CAAA;CAAE,8CAsQrE"} \ No newline at end of file diff --git a/_lib/app/components/SearchDialog.js b/_lib/app/components/SearchDialog.js new file mode 100644 index 00000000..fdf49f61 --- /dev/null +++ b/_lib/app/components/SearchDialog.js @@ -0,0 +1,161 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +import * as Dialog from '@radix-ui/react-dialog'; +import { ArrowLeftIcon, ChevronRightIcon, FileIcon, ListBulletIcon, MagnifyingGlassIcon, } from '@radix-ui/react-icons'; +import * as Label from '@radix-ui/react-label'; +import clsx from 'clsx'; +import { default as Mark } from 'mark.js'; +import {} from 'minisearch'; +import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; +import { Link, useNavigate } from 'react-router-dom'; +import { useConfig } from '../hooks/useConfig.js'; +import { useDebounce } from '../hooks/useDebounce.js'; +import { useLocalStorage } from '../hooks/useLocalStorage.js'; +import { useSearchIndex } from '../hooks/useSearchIndex.js'; +import { visuallyHidden } from '../styles/utils.css.js'; +import { Content } from './Content.js'; +import { KeyboardShortcut } from './KeyboardShortcut.js'; +import * as styles from './SearchDialog.css.js'; +export function SearchDialog(props) { + const { search: searchOptions } = useConfig(); + const navigate = useNavigate(); + const inputRef = useRef(null); + const listRef = useRef(null); + const [filterText, setFilterText] = useLocalStorage('filterText', ''); + const searchTerm = useDebounce(filterText, 200); + const searchIndex = useSearchIndex(); + const [selectedIndex, setSelectedIndex] = useState(-1); + const [disableMouseOver, setDisableMouseOver] = useState(false); + const [showDetailView, setShowDetailView] = useLocalStorage('showDetailView', true); + const results = useMemo(() => { + if (!searchIndex) + return []; + if (!searchTerm) { + setSelectedIndex(-1); + return []; + } + setSelectedIndex(0); + return searchIndex.search(searchTerm, searchOptions).slice(0, 16); + }, [searchIndex, searchOptions, searchTerm]); + const resultsCount = results.length; + const selectedResult = results[selectedIndex]; + const highlight = useCallback(() => { + if (!listRef.current) + return; + const terms = new Set(); + for (const result of results) { + for (const term in result.match) { + terms.add(term); + } + } + const mark = new Mark(listRef.current); + mark.unmark({ + done() { + mark?.markRegExp(formMarkRegex(terms)); + }, + }); + const excerptElements = listRef.current.querySelectorAll(`.${styles.excerpt}`); + for (const element of excerptElements) { + element.querySelector('mark[data-markjs="true"]')?.scrollIntoView({ block: 'center' }); + } + listRef.current?.firstElementChild?.scrollIntoView({ block: 'start' }); + }, [results]); + useEffect(() => { + if (!props.open) + return; + function keyDownHandler(event) { + switch (event.key) { + case 'ArrowDown': { + event.preventDefault(); + setSelectedIndex((index) => { + let nextIndex = index + 1; + if (nextIndex >= resultsCount) + nextIndex = 0; + const element = listRef.current?.children[nextIndex]; + element?.scrollIntoView({ block: 'nearest' }); + return nextIndex; + }); + setDisableMouseOver(true); + break; + } + case 'ArrowUp': { + event.preventDefault(); + setSelectedIndex((index) => { + let nextIndex = index - 1; + if (nextIndex < 0) + nextIndex = resultsCount - 1; + const element = listRef.current?.children[nextIndex]; + element?.scrollIntoView({ block: 'nearest' }); + return nextIndex; + }); + setDisableMouseOver(true); + break; + } + case 'Backspace': { + if (!event.metaKey) + return; + event.preventDefault(); + setFilterText(''); + inputRef.current?.focus(); + break; + } + case 'Enter': { + if (event.target instanceof HTMLButtonElement && event.target.type !== 'submit') + return; + if (!selectedResult) + return; + event.preventDefault(); + navigate(selectedResult.href); + props.onClose(); + break; + } + } + } + window.addEventListener('keydown', keyDownHandler); + return () => { + window.removeEventListener('keydown', keyDownHandler); + }; + }, [navigate, resultsCount, setFilterText, selectedResult, props.open, props.onClose]); + useEffect(() => { + if (searchTerm === '') + return; + if (!listRef.current) + return; + highlight(); + }, [highlight, searchTerm]); + return (_jsxs(Dialog.Portal, { children: [_jsx(Dialog.Overlay, { className: styles.overlay }), _jsxs(Dialog.Content, { onOpenAutoFocus: (event) => { + if (inputRef.current) { + event.preventDefault(); + inputRef.current.focus(); + } + highlight(); + }, onCloseAutoFocus: () => { + setSelectedIndex(0); + }, className: styles.root, "aria-describedby": undefined, children: [_jsx(Dialog.Title, { className: visuallyHidden, children: "Search" }), _jsxs("form", { className: styles.searchBox, children: [_jsx("button", { "aria-label": "Close search dialog", type: "button", onClick: () => props.onClose(), className: styles.searchInputIconMobile, children: _jsx(ArrowLeftIcon, { className: styles.searchInputIcon, height: 20, width: 20 }) }), _jsx(Label.Root, { htmlFor: "search-input", children: _jsx(MagnifyingGlassIcon, { "aria-label": "Search", className: clsx(styles.searchInputIcon, styles.searchInputIconDesktop), height: 20, width: 20 }) }), _jsx("input", { ref: inputRef, tabIndex: 0, className: styles.searchInput, id: "search-input", onChange: (event) => setFilterText(event.target.value), placeholder: "Search", type: "search", value: filterText }), _jsx("button", { "aria-label": "Toggle detail view", type: "button", onClick: () => setShowDetailView((x) => !x), children: _jsx(ListBulletIcon, { className: styles.searchInputIcon, height: 20, width: 20 }) }), _jsx("button", { "aria-label": "Reset search", type: "button", className: styles.searchInputIcon, onClick: () => { + setFilterText(''); + inputRef.current?.focus(); + }, children: "\u232B" })] }), _jsxs("ul", { className: styles.results, role: results.length ? 'listbox' : undefined, onMouseMove: () => setDisableMouseOver(false), ref: listRef, children: [searchTerm && results.length === 0 && (_jsxs("li", { children: ["No results for \"", _jsx("span", { children: searchTerm }), "\""] })), results.map((result, index) => (_jsx("li", { + // biome-ignore lint/a11y/noNoninteractiveElementToInteractiveRole: + role: "option", className: clsx(styles.result, index === selectedIndex && styles.resultSelected), "aria-selected": index === selectedIndex, "aria-label": [...result.titles.filter((title) => Boolean(title)), result.title].join(' > '), children: _jsxs(Link, { to: result.href, onClick: (event) => { + // Don't close the dialog if the user is opening the link in a new tab. + if (event.metaKey) + return; + props.onClose(); + }, onMouseEnter: () => !disableMouseOver && setSelectedIndex(index), onFocus: () => setSelectedIndex(index), children: [_jsxs("div", { className: styles.titles, children: [result.isPage ? (_jsx(FileIcon, { className: styles.resultIcon })) : (_jsx("span", { className: styles.resultIcon, children: "#" })), result.titles + .filter((title) => Boolean(title)) + .map((title) => (_jsxs("span", { className: styles.title, children: [_jsx("span", { + // biome-ignore lint/security/noDangerouslySetInnerHtml: + dangerouslySetInnerHTML: { __html: title } }), _jsx(ChevronRightIcon, { className: styles.titleIcon })] }, title))), _jsx("span", { className: styles.title, children: _jsx("span", { + // biome-ignore lint/security/noDangerouslySetInnerHtml: + dangerouslySetInnerHTML: { __html: result.title } }) })] }), showDetailView && result.text?.trim() && (_jsx("div", { className: styles.excerpt, children: _jsx(Content, { className: styles.content, children: _jsx("div", { + // biome-ignore lint/security/noDangerouslySetInnerHtml: + dangerouslySetInnerHTML: { __html: result.html } }) }) }))] }) }, result.id)))] }), _jsxs("div", { className: styles.searchShortcuts, children: [_jsx(KeyboardShortcut, { description: "Navigate", keys: ['↑', '↓'] }), _jsx(KeyboardShortcut, { description: "Select", keys: ['enter'] }), _jsx(KeyboardShortcut, { description: "Close", keys: ['esc'] }), _jsx(KeyboardShortcut, { description: "Reset", keys: ['⌘', '⌫'] })] })] })] })); +} +function formMarkRegex(terms) { + return new RegExp([...terms] + .sort((a, b) => b.length - a.length) + .map((term) => { + return `(${term.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&').replace(/-/g, '\\x2d')})`; + }) + .join('|'), 'gi'); +} +//# sourceMappingURL=SearchDialog.js.map \ No newline at end of file diff --git a/_lib/app/components/SearchDialog.js.map b/_lib/app/components/SearchDialog.js.map new file mode 100644 index 00000000..0283d40d --- /dev/null +++ b/_lib/app/components/SearchDialog.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SearchDialog.js","sourceRoot":"","sources":["../../../app/components/SearchDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAA;AAChD,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,QAAQ,EACR,cAAc,EACd,mBAAmB,GACpB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,KAAK,MAAM,uBAAuB,CAAA;AAC9C,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,EAAqB,MAAM,YAAY,CAAA;AAC9C,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACzE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAC7D,OAAO,EAAe,cAAc,EAAE,MAAM,4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aACpC,KAAC,gBAAgB,IAAC,WAAW,EAAC,UAAU,EAAC,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,GAAI,EAC7D,KAAC,gBAAgB,IAAC,WAAW,EAAC,QAAQ,EAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAI,EAC1D,KAAC,gBAAgB,IAAC,WAAW,EAAC,OAAO,EAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAI,EACvD,KAAC,gBAAgB,IAAC,WAAW,EAAC,OAAO,EAAC,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,GAAI,IACtD,IACS,IACH,CACjB,CAAA;AACH,CAAC;AAED,SAAS,aAAa,CAAC,KAAkB;IACvC,OAAO,IAAI,MAAM,CACf,CAAC,GAAG,KAAK,CAAC;SACP,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;SACnC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACZ,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAA;IAClF,CAAC,CAAC;SACD,IAAI,CAAC,GAAG,CAAC,EACZ,IAAI,CACL,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/Sidebar.css.d.ts b/_lib/app/components/Sidebar.css.d.ts new file mode 100644 index 00000000..fd810532 --- /dev/null +++ b/_lib/app/components/Sidebar.css.d.ts @@ -0,0 +1,21 @@ +export declare const root: string; +export declare const backLink: string; +export declare const divider: string; +export declare const navigation: string; +export declare const group: string; +export declare const logo: string; +export declare const logoWrapper: string; +export declare const section: string; +export declare const level: string; +export declare const levelCollapsed: string; +export declare const levelInset: string; +export declare const items: string; +export declare const item: string; +export declare const sectionHeader: string; +export declare const sectionHeaderActive: string; +export declare const sectionTitle: string; +export declare const sectionTitleActive: string; +export declare const sectionTitleLink: string; +export declare const sectionCollapse: string; +export declare const sectionCollapseActive: string; +//# sourceMappingURL=Sidebar.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Sidebar.css.d.ts.map b/_lib/app/components/Sidebar.css.d.ts.map new file mode 100644 index 00000000..f79ad6a4 --- /dev/null +++ b/_lib/app/components/Sidebar.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Sidebar.css.d.ts","sourceRoot":"","sources":["../../../app/components/Sidebar.css.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,IAAI,QAWf,CAAA;AAEF,eAAO,MAAM,QAAQ,QAKpB,CAAA;AAED,eAAO,MAAM,OAAO,QAOnB,CAAA;AAED,eAAO,MAAM,UAAU,QAUtB,CAAA;AAED,eAAO,MAAM,KAAK,QAMjB,CAAA;AAED,eAAO,MAAM,IAAI,QAQhB,CAAA;AAED,eAAO,MAAM,WAAW,QAavB,CAAA;AAED,eAAO,MAAM,OAAO,QAcnB,CAAA;AAED,eAAO,MAAM,KAAK,QAAqB,CAAA;AAEvC,eAAO,MAAM,cAAc,QAM1B,CAAA;AAED,eAAO,MAAM,UAAU,QAetB,CAAA;AAED,eAAO,MAAM,KAAK,QAejB,CAAA;AAED,eAAO,MAAM,IAAI,QAiBhB,CAAA;AAED,eAAO,MAAM,aAAa,QAYzB,CAAA;AAED,eAAO,MAAM,mBAAmB,QAK/B,CAAA;AAED,eAAO,MAAM,YAAY,QASxB,CAAA;AAED,eAAO,MAAM,kBAAkB,QAS9B,CAAA;AAED,eAAO,MAAM,gBAAgB,QAY5B,CAAA;AAED,eAAO,MAAM,eAAe,QAO3B,CAAA;AAED,eAAO,MAAM,qBAAqB,QAKjC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Sidebar.css.js b/_lib/app/components/Sidebar.css.js new file mode 100644 index 00000000..cb5b36cb --- /dev/null +++ b/_lib/app/components/Sidebar.css.js @@ -0,0 +1,155 @@ +import { style } from '@vanilla-extract/css'; +import { fontSizeVars, fontWeightVars, lineHeightVars, primitiveColorVars, sidebarVars, spaceVars, topNavVars, zIndexVars, } from '../styles/vars.css.js'; +export const root = style({ + display: 'flex', + flexDirection: 'column', + fontSize: fontSizeVars['14'], + overflowY: 'auto', + width: sidebarVars.width, + '@media': { + 'screen and (max-width: 1080px)': { + width: '100%', + }, + }, +}); +export const backLink = style({ + textAlign: 'left', +}, 'backLink'); +export const divider = style({ + backgroundColor: primitiveColorVars.border, + width: '100%', + height: '1px', +}, 'divider'); +export const navigation = style({ + outline: 0, + selectors: { + '&:first-child': { + paddingTop: spaceVars['16'], + }, + }, +}, 'navigation'); +export const group = style({ + display: 'flex', + flexDirection: 'column', +}, 'group'); +export const logo = style({ + alignItems: 'center', + display: 'flex', + height: topNavVars.height, + paddingTop: spaceVars[4], +}, 'logo'); +export const logoWrapper = style({ + backgroundColor: primitiveColorVars.backgroundDark, + position: 'sticky', + top: 0, + zIndex: zIndexVars.gutterTopCurtain, + '@media': { + 'screen and (max-width: 1080px)': { + display: 'none', + }, + }, +}, 'logoWrapper'); +export const section = style({ + display: 'flex', + flexDirection: 'column', + fontSize: '1em', + get selectors() { + return { + [`${navigation} > ${group} > ${section} + ${section}`]: { + borderTop: `1px solid ${primitiveColorVars.border}`, + }, + }; + }, +}, 'section'); +export const level = style({}, 'level'); +export const levelCollapsed = style({ + gap: spaceVars['4'], + paddingBottom: spaceVars['12'], +}, 'levelCollapsed'); +export const levelInset = style({ + borderLeft: `1px solid ${primitiveColorVars.border}`, + fontSize: fontSizeVars['13'], + marginTop: spaceVars['8'], + paddingLeft: spaceVars['12'], + selectors: { + '&&&': { + fontWeight: fontWeightVars.regular, + paddingTop: 0, + paddingBottom: 0, + }, + }, +}, 'levelInset'); +export const items = style({ + display: 'flex', + flexDirection: 'column', + gap: '0.625em', + paddingTop: spaceVars['16'], + paddingBottom: spaceVars['16'], + fontWeight: fontWeightVars.medium, + selectors: { + [`${level} &`]: { + paddingTop: spaceVars['6'], + }, + }, +}, 'items'); +export const item = style({ + color: primitiveColorVars.text3, + letterSpacing: '0.25px', + lineHeight: lineHeightVars.sidebarItem, + width: '100%', + transition: 'color 0.1s', + selectors: { + '&:hover': { + color: primitiveColorVars.text, + }, + '&[data-active="true"]': { + color: primitiveColorVars.textAccent, + }, + }, +}, 'item'); +export const sectionHeader = style({ + alignItems: 'center', + display: 'flex', + justifyContent: 'space-between', + selectors: { + [`${level} > &`]: { + paddingTop: spaceVars['12'], + }, + }, +}, 'sectionHeader'); +export const sectionHeaderActive = style({ + color: primitiveColorVars.text, +}, 'sectionHeaderActive'); +export const sectionTitle = style({ + color: primitiveColorVars.title, + fontSize: fontSizeVars['14'], + fontWeight: fontWeightVars.semibold, + letterSpacing: '0.25px', + width: '100%', +}, 'sectionTitle'); +export const sectionTitleActive = style({ + color: primitiveColorVars.textAccent, + fontSize: fontSizeVars['14'], + fontWeight: fontWeightVars.semibold, + letterSpacing: '0.25px', + width: '100%', +}, 'sectionTitleActive'); +export const sectionTitleLink = style({ + selectors: { + '&:hover': { + color: primitiveColorVars.text, + }, + '&[data-active="true"]': { + color: primitiveColorVars.textAccent, + }, + }, +}, 'sectionTitleLink'); +export const sectionCollapse = style({ + color: primitiveColorVars.text3, + transform: 'rotate(90deg)', + transition: 'transform 0.25s', +}, 'sectionCollapse'); +export const sectionCollapseActive = style({ + transform: 'rotate(0)', +}, 'sectionCollapseActive'); +//# sourceMappingURL=Sidebar.css.js.map \ No newline at end of file diff --git a/_lib/app/components/Sidebar.css.js.map b/_lib/app/components/Sidebar.css.js.map new file mode 100644 index 00000000..29e6782a --- /dev/null +++ b/_lib/app/components/Sidebar.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Sidebar.css.js","sourceRoot":"","sources":["../../../app/components/Sidebar.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,WAAW,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AAc,CACf,CAAA;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CACrC;IACE,KAAK,EAAE,kBAAkB,CAAC,UAAU;IACpC,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC;IAC5B,UAAU,EAAE,cAAc,CAAC,QAAQ;IACnC,aAAa,EAAE,QAAQ;IACvB,KAAK,EAAE,MAAM;CACd,EACD,oBAAoB,CACrB,CAAA;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CACnC;IACE,SAAS,EAAE;QACT,SAAS,EAAE;YACT,KAAK,EAAE,kBAAkB,CAAC,IAAI;SAC/B;QACD,uBAAuB,EAAE;YACvB,KAAK,EAAE,kBAAkB,CAAC,UAAU;SACrC;KACF;CACF,EACD,kBAAkB,CACnB,CAAA;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAClC;IACE,KAAK,EAAE,kBAAkB,CAAC,KAAK;IAC/B,SAAS,EAAE,eAAe;IAC1B,UAAU,EAAE,iBAAiB;CAC9B,EACD,iBAAiB,CAClB,CAAA;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,CACxC;IACE,SAAS,EAAE,WAAW;CACvB,EACD,uBAAuB,CACxB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Sidebar.d.ts b/_lib/app/components/Sidebar.d.ts new file mode 100644 index 00000000..93a031c6 --- /dev/null +++ b/_lib/app/components/Sidebar.d.ts @@ -0,0 +1,6 @@ +import { type MouseEventHandler } from 'react'; +export declare function Sidebar(props: { + className?: string; + onClickItem?: MouseEventHandler; +}): import("react/jsx-runtime.js").JSX.Element | null; +//# sourceMappingURL=Sidebar.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Sidebar.d.ts.map b/_lib/app/components/Sidebar.d.ts.map new file mode 100644 index 00000000..c58c8176 --- /dev/null +++ b/_lib/app/components/Sidebar.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../app/components/Sidebar.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,iBAAiB,EAOvB,MAAM,OAAO,CAAA;AAyBd,wBAAgB,OAAO,CAAC,KAAK,EAAE;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAA;CACnD,qDAyDA"} \ No newline at end of file diff --git a/_lib/app/components/Sidebar.js b/_lib/app/components/Sidebar.js new file mode 100644 index 00000000..c371db15 --- /dev/null +++ b/_lib/app/components/Sidebar.js @@ -0,0 +1,134 @@ +import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime"; +import clsx from 'clsx'; +import { useCallback, useEffect, useMemo, useRef, useState, } from 'react'; +import { matchPath, useLocation, useMatch } from 'react-router-dom'; +import {} from '../../config.js'; +import { usePageData } from '../hooks/usePageData.js'; +import { useSidebar } from '../hooks/useSidebar.js'; +import { Icon } from './Icon.js'; +import { NavLogo } from './NavLogo.js'; +import { RouterLink } from './RouterLink.js'; +import * as styles from './Sidebar.css.js'; +import { ChevronRight } from './icons/ChevronRight.js'; +function checkSectionTitleActive(items, pathname) { + const result = Boolean(items.find((item) => { + if (item.link) { + return item.link === pathname; + } + return false; + })); + return !!result; +} +export function Sidebar(props) { + const { className, onClickItem } = props; + const { previousPath } = usePageData(); + const sidebarRef = useRef(null); + const sidebar = useSidebar(); + const [backPath, setBackPath] = useState('/'); + // biome-ignore lint/correctness/useExhaustiveDependencies: + useEffect(() => { + if (typeof window === 'undefined') + return; + if (!previousPath) + return; + setBackPath(previousPath); + }, [sidebar.key, sidebar.backLink]); + if (!sidebar) + return null; + const groups = getSidebarGroups(sidebar.items); + return (_jsxs("aside", { ref: sidebarRef, className: clsx(styles.root, className), children: [_jsxs("div", { className: styles.logoWrapper, children: [_jsx("div", { className: styles.logo, children: _jsx(RouterLink, { to: "/", style: { alignItems: 'center', display: 'flex', height: '100%' }, children: _jsx(NavLogo, {}) }) }), _jsx("div", { className: styles.divider })] }), _jsx("nav", { className: styles.navigation, children: _jsxs("div", { className: styles.group, children: [sidebar.backLink && (_jsx("section", { className: styles.section, children: _jsx("div", { className: styles.items, children: _jsxs(RouterLink, { className: clsx(styles.item, styles.backLink), to: backPath, children: ["\u2190", ' ', typeof history !== 'undefined' && history.state?.key && backPath !== '/' + ? 'Back' + : 'Home'] }) }) })), groups.map((group, i) => (_jsx(SidebarItem, { depth: 0, item: group, onClick: onClickItem, sidebarRef: sidebarRef }, `${group.text}${i}`)))] }) })] }, sidebar.key)); +} +function getSidebarGroups(sidebar) { + const groups = []; + let lastGroupIndex = 0; + for (const item of sidebar) { + if (item.items) { + lastGroupIndex = groups.push(item); + continue; + } + if (!groups[lastGroupIndex]) + groups.push({ text: '', items: [item] }); + else + groups[lastGroupIndex].items.push(item); + } + return groups; +} +function getActiveChildItem(items, pathname) { + return items.find((item) => { + if (matchPath(pathname, item.link ?? '')) + return true; + if (item.link === pathname) + return true; + if (!item.items) + return false; + return getActiveChildItem(item.items, pathname); + }); +} +function SidebarItem(props) { + const { depth, item, onClick, sidebarRef } = props; + const itemRef = useRef(null); + const { pathname } = useLocation(); + const match = useMatch(item.link ?? ''); + const hasActiveChildItem = useMemo(() => (item.items ? Boolean(getActiveChildItem(item.items, pathname)) : false), [item.items, pathname]); + const [collapsed, setCollapsed] = useState(() => { + if (match) + return false; + if (!item.items) + return false; + if (hasActiveChildItem) + return false; + return Boolean(item.collapsed); + }); + const isCollapsable = item.collapsed !== undefined && item.items !== undefined; + const onCollapseInteraction = useCallback((event) => { + if ('key' in event && event.key !== 'Enter') + return; + if (item.link) + return; + setCollapsed((x) => !x); + }, [item.link]); + const onCollapseTriggerInteraction = useCallback((event) => { + if ('key' in event && event.key !== 'Enter') + return; + if (!item.link) + return; + setCollapsed((x) => !x); + }, [item.link]); + const active = useRef(true); + useEffect(() => { + if (!active.current) + return; + active.current = false; + const match = matchPath(pathname, item.link ?? ''); + if (!match) + return; + requestAnimationFrame(() => { + const offsetTop = itemRef.current?.offsetTop ?? 0; + const sidebarHeight = sidebarRef?.current?.clientHeight ?? 0; + if (offsetTop < sidebarHeight) + return; + sidebarRef?.current?.scrollTo({ top: offsetTop - 100 }); + }); + }, [item, pathname, sidebarRef]); + if (item.items) + return (_jsxs("section", { ref: itemRef, className: clsx(styles.section, depth === 0 && item.text && styles.level, depth === 0 && item.text && collapsed && styles.levelCollapsed), children: [item.text && (_jsxs("div", { className: styles.sectionHeader, ...(isCollapsable && !item.link + ? { + role: 'button', + tabIndex: 0, + onClick: onCollapseInteraction, + onKeyDown: onCollapseInteraction, + } + : {}), children: [item.text && + (item.link ? (_jsx(RouterLink, { "data-active": Boolean(match), onClick: onClick, className: clsx(depth === 0 ? [styles.sectionTitle, styles.sectionTitleLink] : styles.item, hasActiveChildItem && styles.sectionHeaderActive), to: item.link, children: item.text })) : (_jsx("div", { className: clsx(depth === 0 + ? item.items && checkSectionTitleActive(item.items, pathname) + ? styles.sectionTitleActive + : styles.sectionTitle + : styles.item), children: item.items && !checkSectionTitleActive(item.items, pathname) && collapsed ? (_jsx(RouterLink, { "data-active": false, onClick: onClick, to: item.items[0].link, children: item.text })) : (item.text) }))), isCollapsable && (_jsx("div", { role: "button", tabIndex: 0, onClick: onCollapseTriggerInteraction, onKeyDown: onCollapseTriggerInteraction, children: _jsx(Icon, { className: clsx(styles.sectionCollapse, collapsed && styles.sectionCollapseActive), label: "toggle section", icon: ChevronRight, size: "10px" }) }))] })), !collapsed && (_jsx("div", { className: clsx(styles.items, depth !== 0 && styles.levelInset), children: item.items && + item.items.length > 0 && + depth < 5 && + item.items.map((item, i) => (_jsx(SidebarItem, { depth: depth + 1, item: item, onClick: onClick, sidebarRef: sidebarRef }, `${item.text}${i}`))) }))] })); + return (_jsx(_Fragment, { children: item.link ? (_jsx(RouterLink, { ref: itemRef, "data-active": Boolean(match), onClick: onClick, className: styles.item, to: item.link, children: item.text })) : (_jsx("div", { className: styles.item, children: item.text })) })); +} +//# sourceMappingURL=Sidebar.js.map \ No newline at end of file diff --git a/_lib/app/components/Sidebar.js.map b/_lib/app/components/Sidebar.js.map new file mode 100644 index 00000000..1fc50514 --- /dev/null +++ b/_lib/app/components/Sidebar.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Sidebar.js","sourceRoot":"","sources":["../../../app/components/Sidebar.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAKL,WAAW,EACX,SAAS,EACT,OAAO,EACP,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAEnE,OAAO,EAAuC,MAAM,iBAAiB,CAAA;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAEtD,SAAS,uBAAuB,CAAC,KAAY,EAAE,QAAgB;IAC7D,MAAM,MAAM,GAAG,OAAO,CACpB,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;QAClB,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAA;SAC9B;QACD,OAAO,KAAK,CAAA;IACd,CAAC,CAAC,CACH,CAAA;IAED,OAAO,CAAC,CAAC,MAAM,CAAA;AACjB,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,KAGvB;IACC,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,KAAK,CAA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AAC,WAAW,IACV,KAAK,EAAE,KAAK,GAAG,CAAC,EAChB,IAAI,EAAE,IAAI,EAEV,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,IAFjB,GAAG,IAAI,CAAC,IAAI,GAAG,CAAC,EAAE,CAGvB,CACH,CAAC,GACA,CACP,IACO,CACX,CAAA;IAEH,OAAO,CACL,4BACG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CACX,KAAC,UAAU,IACT,GAAG,EAAE,OAAO,iBACC,OAAO,CAAC,KAAK,CAAC,EAC3B,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,MAAM,CAAC,IAAI,EACtB,EAAE,EAAE,IAAI,CAAC,IAAI,YAEZ,IAAI,CAAC,IAAI,GACC,CACd,CAAC,CAAC,CAAC,CACF,cAAK,SAAS,EAAE,MAAM,CAAC,IAAI,YAAG,IAAI,CAAC,IAAI,GAAO,CAC/C,GACA,CACJ,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/SkipLink.css.d.ts b/_lib/app/components/SkipLink.css.d.ts new file mode 100644 index 00000000..2a263d50 --- /dev/null +++ b/_lib/app/components/SkipLink.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=SkipLink.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/SkipLink.css.d.ts.map b/_lib/app/components/SkipLink.css.d.ts.map new file mode 100644 index 00000000..3317b855 --- /dev/null +++ b/_lib/app/components/SkipLink.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"SkipLink.css.d.ts","sourceRoot":"","sources":["../../../app/components/SkipLink.css.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,IAAI,QAkBf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/SkipLink.css.js b/_lib/app/components/SkipLink.css.js new file mode 100644 index 00000000..07aff1b6 --- /dev/null +++ b/_lib/app/components/SkipLink.css.js @@ -0,0 +1,22 @@ +import { style } from '@vanilla-extract/css'; +import { borderRadiusVars, fontSizeVars, fontWeightVars, primitiveColorVars, semanticColorVars, spaceVars, } from '../styles/vars.css.js'; +export const root = style({ + background: primitiveColorVars.background, + borderRadius: borderRadiusVars['4'], + color: semanticColorVars.link, + fontSize: fontSizeVars['14'], + fontWeight: fontWeightVars.semibold, + left: spaceVars[8], + padding: `${spaceVars['8']} ${spaceVars['16']}`, + position: 'fixed', + textDecoration: 'none', + top: spaceVars[8], + zIndex: 999, + ':focus': { + clip: 'auto', + clipPath: 'none', + height: 'auto', + width: 'auto', + }, +}); +//# sourceMappingURL=SkipLink.css.js.map \ No newline at end of file diff --git a/_lib/app/components/SkipLink.css.js.map b/_lib/app/components/SkipLink.css.js.map new file mode 100644 index 00000000..12410ac4 --- /dev/null +++ b/_lib/app/components/SkipLink.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SkipLink.css.js","sourceRoot":"","sources":["../../../app/components/SkipLink.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,GACV,MAAM,uBAAuB,CAAA;AAE9B,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,UAAU,EAAE,kBAAkB,CAAC,UAAU;IACzC,YAAY,EAAE,gBAAgB,CAAC,GAAG,CAAC;IACnC,KAAK,EAAE,iBAAiB,CAAC,IAAI;IAC7B,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC;IAC5B,UAAU,EAAE,cAAc,CAAC,QAAQ;IACnC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;IAClB,OAAO,EAAE,GAAG,SAAS,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,EAAE;IAC/C,QAAQ,EAAE,OAAO;IACjB,cAAc,EAAE,MAAM;IACtB,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC;IACjB,MAAM,EAAE,GAAG;IACX,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,MAAM;QAChB,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,MAAM;KACd;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/SkipLink.d.ts b/_lib/app/components/SkipLink.d.ts new file mode 100644 index 00000000..59e29110 --- /dev/null +++ b/_lib/app/components/SkipLink.d.ts @@ -0,0 +1,3 @@ +export declare const skipLinkId = "vocs-content"; +export declare function SkipLink(): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=SkipLink.d.js.map \ No newline at end of file diff --git a/_lib/app/components/SkipLink.d.ts.map b/_lib/app/components/SkipLink.d.ts.map new file mode 100644 index 00000000..4afad8e7 --- /dev/null +++ b/_lib/app/components/SkipLink.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"SkipLink.d.ts","sourceRoot":"","sources":["../../../app/components/SkipLink.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,UAAU,iBAAiB,CAAA;AAExC,wBAAgB,QAAQ,+CAOvB"} \ No newline at end of file diff --git a/_lib/app/components/SkipLink.js b/_lib/app/components/SkipLink.js new file mode 100644 index 00000000..3ac71e67 --- /dev/null +++ b/_lib/app/components/SkipLink.js @@ -0,0 +1,11 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import clsx from 'clsx'; +import { useLocation } from 'react-router-dom'; +import { visuallyHidden } from '../styles/utils.css.js'; +import * as styles from './SkipLink.css.js'; +export const skipLinkId = 'vocs-content'; +export function SkipLink() { + const { pathname } = useLocation(); + return (_jsx("a", { className: clsx(styles.root, visuallyHidden), href: `${pathname}#${skipLinkId}`, children: "Skip to content" })); +} +//# sourceMappingURL=SkipLink.js.map \ No newline at end of file diff --git a/_lib/app/components/SkipLink.js.map b/_lib/app/components/SkipLink.js.map new file mode 100644 index 00000000..53b819f8 --- /dev/null +++ b/_lib/app/components/SkipLink.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SkipLink.js","sourceRoot":"","sources":["../../../app/components/SkipLink.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAA;AAE3C,MAAM,CAAC,MAAM,UAAU,GAAG,cAAc,CAAA;AAExC,MAAM,UAAU,QAAQ;IACtB,MAAM,EAAE,QAAQ,EAAE,GAAG,WAAW,EAAE,CAAA;IAClC,OAAO,CACL,YAAG,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,cAAc,CAAC,EAAE,IAAI,EAAE,GAAG,QAAQ,IAAI,UAAU,EAAE,gCAE9E,CACL,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/Sponsors.css.d.ts b/_lib/app/components/Sponsors.css.d.ts new file mode 100644 index 00000000..5feb4ed0 --- /dev/null +++ b/_lib/app/components/Sponsors.css.d.ts @@ -0,0 +1,9 @@ +export declare const columnsVar: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; +export declare const heightVar: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; +export declare const root: string; +export declare const title: string; +export declare const row: string; +export declare const column: string; +export declare const sponsor: string; +export declare const image: string; +//# sourceMappingURL=Sponsors.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Sponsors.css.d.ts.map b/_lib/app/components/Sponsors.css.d.ts.map new file mode 100644 index 00000000..437f80cb --- /dev/null +++ b/_lib/app/components/Sponsors.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Sponsors.css.d.ts","sourceRoot":"","sources":["../../../app/components/Sponsors.css.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,UAAU,oFAAuB,CAAA;AAC9C,eAAO,MAAM,SAAS,oFAAsB,CAAA;AAE5C,eAAO,MAAM,IAAI,QAMf,CAAA;AAEF,eAAO,MAAM,KAAK,QAUjB,CAAA;AAED,eAAO,MAAM,GAAG,QAOf,CAAA;AAED,eAAO,MAAM,MAAM,QAUlB,CAAA;AAED,eAAO,MAAM,OAAO,QAanB,CAAA;AAED,eAAO,MAAM,KAAK,QAejB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Sponsors.css.js b/_lib/app/components/Sponsors.css.js new file mode 100644 index 00000000..5a43bbff --- /dev/null +++ b/_lib/app/components/Sponsors.css.js @@ -0,0 +1,57 @@ +import { createVar, style } from '@vanilla-extract/css'; +import { borderRadiusVars, fontSizeVars, fontWeightVars, primitiveColorVars, spaceVars, } from '../styles/vars.css.js'; +export const columnsVar = createVar('columns'); +export const heightVar = createVar('height'); +export const root = style({ + borderRadius: borderRadiusVars['8'], + display: 'flex', + flexDirection: 'column', + gap: spaceVars['4'], + overflow: 'hidden', +}); +export const title = style({ + backgroundColor: primitiveColorVars.background3, + color: primitiveColorVars.text3, + fontSize: fontSizeVars['13'], + fontWeight: fontWeightVars.medium, + padding: `${spaceVars['4']} 0`, + textAlign: 'center', +}, 'title'); +export const row = style({ + display: 'flex', + flexDirection: 'row', + gap: spaceVars['4'], +}, 'row'); +export const column = style({ + alignItems: 'center', + backgroundColor: primitiveColorVars.background3, + display: 'flex', + justifyContent: 'center', + padding: spaceVars['32'], + width: `calc(${columnsVar} * 100%)`, +}, 'column'); +export const sponsor = style({ + transition: 'background-color 0.1s', + selectors: { + '&:hover': { + backgroundColor: primitiveColorVars.background5, + }, + '.dark &:hover': { + backgroundColor: primitiveColorVars.white, + }, + }, +}, 'sponsor'); +export const image = style({ + filter: 'grayscale(1)', + height: heightVar, + transition: 'filter 0.1s', + selectors: { + '.dark &': { + filter: 'grayscale(1) invert(1)', + }, + [`${column}:hover &`]: { + filter: 'none', + }, + }, +}, 'image'); +//# sourceMappingURL=Sponsors.css.js.map \ No newline at end of file diff --git a/_lib/app/components/Sponsors.css.js.map b/_lib/app/components/Sponsors.css.js.map new file mode 100644 index 00000000..af5f5b68 --- /dev/null +++ b/_lib/app/components/Sponsors.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Sponsors.css.js","sourceRoot":"","sources":["../../../app/components/Sponsors.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,SAAS,GACV,MAAM,uBAAuB,CAAA;AAE9B,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,CAAC,SAAS,CAAC,CAAA;AAC9C,MAAM,CAAC,MAAM,SAAS,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAA;AAE5C,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,YAAY,EAAE,gBAAgB,CAAC,GAAG,CAAC;IACnC,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,QAAQ;IACvB,GAAG,EAAE,SAAS,CAAC,GAAG,CAAC;IACnB,QAAQ,EAAE,QAAQ;CACnB,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CACxB;IACE,eAAe,EAAE,kBAAkB,CAAC,WAAW;IAC/C,KAAK,EAAE,kBAAkB,CAAC,KAAK;IAC/B,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC;IAC5B,UAAU,EAAE,cAAc,CAAC,MAAM;IACjC,OAAO,EAAE,GAAG,SAAS,CAAC,GAAG,CAAC,IAAI;IAC9B,SAAS,EAAE,QAAQ;CACpB,EACD,OAAO,CACR,CAAA;AAED,MAAM,CAAC,MAAM,GAAG,GAAG,KAAK,CACtB;IACE,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,KAAK;IACpB,GAAG,EAAE,SAAS,CAAC,GAAG,CAAC;CACpB,EACD,KAAK,CACN,CAAA;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,KAAK,CACzB;IACE,UAAU,EAAE,QAAQ;IACpB,eAAe,EAAE,kBAAkB,CAAC,WAAW;IAC/C,OAAO,EAAE,MAAM;IACf,cAAc,EAAE,QAAQ;IACxB,OAAO,EAAE,SAAS,CAAC,IAAI,CAAC;IACxB,KAAK,EAAE,QAAQ,UAAU,UAAU;CACpC,EACD,QAAQ,CACT,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAC1B;IACE,UAAU,EAAE,uBAAuB;IACnC,SAAS,EAAE;QACT,SAAS,EAAE;YACT,eAAe,EAAE,kBAAkB,CAAC,WAAW;SAChD;QACD,eAAe,EAAE;YACf,eAAe,EAAE,kBAAkB,CAAC,KAAK;SAC1C;KACF;CACF,EACD,SAAS,CACV,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CACxB;IACE,MAAM,EAAE,cAAc;IACtB,MAAM,EAAE,SAAS;IACjB,UAAU,EAAE,aAAa;IACzB,SAAS,EAAE;QACT,SAAS,EAAE;YACT,MAAM,EAAE,wBAAwB;SACjC;QACD,CAAC,GAAG,MAAM,UAAU,CAAC,EAAE;YACrB,MAAM,EAAE,MAAM;SACf;KACF;CACF,EACD,OAAO,CACR,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Sponsors.d.ts b/_lib/app/components/Sponsors.d.ts new file mode 100644 index 00000000..b12f0186 --- /dev/null +++ b/_lib/app/components/Sponsors.d.ts @@ -0,0 +1,2 @@ +export declare function Sponsors(): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=Sponsors.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Sponsors.d.ts.map b/_lib/app/components/Sponsors.d.ts.map new file mode 100644 index 00000000..f5983a2d --- /dev/null +++ b/_lib/app/components/Sponsors.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Sponsors.d.ts","sourceRoot":"","sources":["../../../app/components/Sponsors.tsx"],"names":[],"mappings":"AAOA,wBAAgB,QAAQ,+CAiCvB"} \ No newline at end of file diff --git a/_lib/app/components/Sponsors.js b/_lib/app/components/Sponsors.js new file mode 100644 index 00000000..13c807c1 --- /dev/null +++ b/_lib/app/components/Sponsors.js @@ -0,0 +1,15 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +import { assignInlineVars } from '@vanilla-extract/dynamic'; +import clsx from 'clsx'; +import { Fragment } from 'react'; +import { useConfig } from '../hooks/useConfig.js'; +import { Link } from './Link.js'; +import * as styles from './Sponsors.css.js'; +export function Sponsors() { + const { sponsors } = useConfig(); + return (_jsx("div", { className: styles.root, children: sponsors?.map((sponsorSet, i) => (_jsxs(Fragment, { children: [_jsx("div", { className: styles.title, children: sponsorSet.name }), sponsorSet.items.map((sponsorRow, i) => (_jsx("div", { className: styles.row, style: assignInlineVars({ + [styles.columnsVar]: sponsorRow.length.toString(), + [styles.heightVar]: `${sponsorSet.height?.toString() ?? '40'}px`, + }), children: sponsorRow.map((sponsor, i) => (_jsx(Link, { className: clsx(styles.column, sponsor ? styles.sponsor : undefined), hideExternalIcon: true, href: sponsor?.link, variant: "styleless", children: _jsx("img", { className: styles.image, src: sponsor?.image, alt: sponsor?.name }) }, i))) }, i)))] }, i))) })); +} +//# sourceMappingURL=Sponsors.js.map \ No newline at end of file diff --git a/_lib/app/components/Sponsors.js.map b/_lib/app/components/Sponsors.js.map new file mode 100644 index 00000000..d7158aad --- /dev/null +++ b/_lib/app/components/Sponsors.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Sponsors.js","sourceRoot":"","sources":["../../../app/components/Sponsors.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,KAAK,MAAM,MAAM,mBAA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ts b/_lib/app/components/Step.css.d.ts new file mode 100644 index 00000000..c4ede14d --- /dev/null +++ b/_lib/app/components/Step.css.d.ts @@ -0,0 +1,4 @@ +export declare const root: string; +export declare const title: string; +export declare const content: string; +//# sourceMappingURL=Step.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Step.css.d.ts.map b/_lib/app/components/Step.css.d.ts.map new file mode 100644 index 00000000..e3b974ed --- /dev/null +++ b/_lib/app/components/Step.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Step.css.d.ts","sourceRoot":"","sources":["../../../app/components/Step.css.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,IAAI,QAMf,CAAA;AAEF,eAAO,MAAM,KAAK,QAyBjB,CAAA;AAED,eAAO,MAAM,OAAO,QASnB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Step.css.js b/_lib/app/components/Step.css.js new file mode 100644 index 00000000..5f6a2375 --- /dev/null +++ b/_lib/app/components/Step.css.js @@ -0,0 +1,69 @@ +import { globalStyle, style } from '@vanilla-extract/css'; +import { fontWeightVars, primitiveColorVars, spaceVars, viewportVars } from '../styles/vars.css.js'; +import { root as Tabs } from './Tabs.css.js'; +import { root as CodeBlock } from './mdx/CodeBlock.css.js'; +import { root as H2 } from './mdx/H2.css.js'; +import { root as H3 } from './mdx/H3.css.js'; +import { root as H4 } from './mdx/H4.css.js'; +import { root as H5 } from './mdx/H5.css.js'; +import { root as H6 } from './mdx/H6.css.js'; +export const root = style({ + selectors: { + '&:not(:last-child)': { + marginBottom: spaceVars['24'], + }, + }, +}); +export const title = style({ + marginBottom: spaceVars['8'], + position: 'relative', + '::before': { + alignItems: 'center', + backgroundColor: primitiveColorVars.background5, + borderRadius: '100%', + border: `0.5em solid ${primitiveColorVars.background}`, + boxSizing: 'content-box', + color: primitiveColorVars.text2, + content: 'counter(step)', + counterIncrement: 'step', + display: 'flex', + fontSize: '0.625em', + fontWeight: fontWeightVars.regular, + height: '2em', + justifyContent: 'center', + left: 'calc(-25.125px - 1.45em)', + position: 'absolute', + top: '-0.25em', + width: '2em', + }, +}, 'title'); +export const content = style({ + selectors: { + [`${H2}+&,${H3}+&,${H4}+&,${H5}+&,${H6}+&`]: { + marginTop: `calc(${spaceVars['8']} * -1)`, + }, + }, +}, 'content'); +globalStyle(`${content} > *:not(:last-child)`, { + marginBottom: spaceVars['16'], +}); +globalStyle(`${content} > *:last-child`, { + marginBottom: spaceVars['0'], +}); +globalStyle(`${content} > ${Tabs}, ${content} > ${CodeBlock}`, { + '@media': { + [viewportVars['max-720px']]: { + outline: `6px solid ${primitiveColorVars.background}`, + marginLeft: `calc(-1 * ${spaceVars['44']} - 2px)`, + marginRight: `calc(-1 * ${spaceVars['16']})`, + }, + }, +}); +globalStyle(`${content} ${Tabs} pre.shiki`, { + '@media': { + [viewportVars['max-720px']]: { + borderTop: 'none', + }, + }, +}); +//# sourceMappingURL=Step.css.js.map \ No newline at end of file diff --git a/_lib/app/components/Step.css.js.map b/_lib/app/components/Step.css.js.map new file mode 100644 index 00000000..0a3f8b48 --- /dev/null +++ b/_lib/app/components/Step.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Step.css.js","sourceRoot":"","sources":["../../../app/components/Step.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAEzD,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACnG,OAAO,EAAE,IAAI,IAAI,IAAI,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,IAAI,IAAI,EAAE,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,IAAI,IAAI,EAAE,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,IAAI,IAAI,EAAE,EAAE,MAAM,iBAAiB,C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IAC7C,YAAY,EAAE,SAAS,CAAC,IAAI,CAAC;CAC9B,CAAC,CAAA;AAEF,WAAW,CAAC,GAAG,OAAO,iBAAiB,EAAE;IACvC,YAAY,EAAE,SAAS,CAAC,GAAG,CAAC;CAC7B,CAAC,CAAA;AAEF,WAAW,CAAC,GAAG,OAAO,MAAM,IAAI,KAAK,OAAO,MAAM,SAAS,EAAE,EAAE;IAC7D,QAAQ,EAAE;QACR,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,EAAE;YAC3B,OAAO,EAAE,aAAa,kBAAkB,CAAC,UAAU,EAAE;YACrD,UAAU,EAAE,aAAa,SAAS,CAAC,IAAI,CAAC,SAAS;YACjD,WAAW,EAAE,aAAa,SAAS,CAAC,IAAI,CAAC,GAAG;SAC7C;KACF;CACF,CAAC,CAAA;AAEF,WAAW,CAAC,GAAG,OAAO,IAAI,IAAI,YAAY,EAAE;IAC1C,QAAQ,EAAE;QACR,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,EAAE;YAC3B,SAAS,EAAE,MAAM;SAClB;KACF;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Step.d.ts b/_lib/app/components/Step.d.ts new file mode 100644 index 00000000..519e7ab8 --- /dev/null +++ b/_lib/app/components/Step.d.ts @@ -0,0 +1,10 @@ +import { type ClassValue } from 'clsx'; +import type { ReactNode } from 'react'; +export type StepProps = { + children: ReactNode; + className?: ClassValue; + title: ReactNode | string; + titleLevel?: 2 | 3 | 4 | 5 | 6; +}; +export declare function Step({ children, className, title, titleLevel }: StepProps): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=Step.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Step.d.ts.map b/_lib/app/components/Step.d.ts.map new file mode 100644 index 00000000..b0d57b60 --- /dev/null +++ b/_lib/app/components/Step.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Step.d.ts","sourceRoot":"","sources":["../../../app/components/Step.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAA;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAStC,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,UAAU,CAAA;IACtB,KAAK,EAAE,SAAS,GAAG,MAAM,CAAA;IACzB,UAAU,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;CAC/B,CAAA;AAED,wBAAgB,IAAI,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,UAAc,EAAE,EAAE,SAAS,8CAgB7E"} \ No newline at end of file diff --git a/_lib/app/components/Step.js b/_lib/app/components/Step.js new file mode 100644 index 00000000..45ddc5af --- /dev/null +++ b/_lib/app/components/Step.js @@ -0,0 +1,25 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import * as styles from './Step.css.js'; +import { H2 } from './mdx/H2.js'; +import { H3 } from './mdx/H3.js'; +import { H4 } from './mdx/H4.js'; +import { H5 } from './mdx/H5.js'; +import { H6 } from './mdx/H6.js'; +export function Step({ children, className, title, titleLevel = 2 }) { + const Element = (() => { + if (titleLevel === 2) + return H2; + if (titleLevel === 3) + return H3; + if (titleLevel === 4) + return H4; + if (titleLevel === 5) + return H5; + if (titleLevel === 6) + return H6; + throw new Error('Invalid.'); + })(); + return (_jsxs("div", { className: clsx(className, styles.root), children: [typeof title === 'string' ? _jsx(Element, { className: styles.title, children: title }) : title, _jsx("div", { className: styles.content, children: children })] })); +} +//# sourceMappingURL=Step.js.map \ No newline at end of file diff --git a/_lib/app/components/Step.js.map b/_lib/app/components/Step.js.map new file mode 100644 index 00000000..90d02331 --- /dev/null +++ b/_lib/app/components/Step.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Step.js","sourceRoot":"","sources":["../../../app/components/Step.tsx"],"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 00000000..afcc5cbb --- /dev/null +++ b/_lib/app/components/Steps.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=Steps.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Steps.css.d.ts.map b/_lib/app/components/Steps.css.d.ts.map new file mode 100644 index 00000000..4725db76 --- /dev/null +++ b/_lib/app/components/Steps.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Steps.css.d.ts","sourceRoot":"","sources":["../../../app/components/Steps.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,QAWf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Steps.css.js b/_lib/app/components/Steps.css.js new file mode 100644 index 00000000..df3986db --- /dev/null +++ b/_lib/app/components/Steps.css.js @@ -0,0 +1,15 @@ +import { style } from '@vanilla-extract/css'; +import { primitiveColorVars, spaceVars, viewportVars } from '../styles/vars.css.js'; +export const root = style({ + borderLeft: `1.5px solid ${primitiveColorVars.border}`, + counterReset: 'step', + paddingLeft: spaceVars['24'], + marginLeft: spaceVars['12'], + marginTop: spaceVars['24'], + '@media': { + [viewportVars['max-720px']]: { + marginLeft: spaceVars['4'], + }, + }, +}); +//# sourceMappingURL=Steps.css.js.map \ No newline at end of file diff --git a/_lib/app/components/Steps.css.js.map b/_lib/app/components/Steps.css.js.map new file mode 100644 index 00000000..43d62c25 --- /dev/null +++ b/_lib/app/components/Steps.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Steps.css.js","sourceRoot":"","sources":["../../../app/components/Steps.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE5C,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEnF,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,UAAU,EAAE,eAAe,kBAAkB,CAAC,MAAM,EAAE;IACtD,YAAY,EAAE,MAAM;IACpB,WAAW,EAAE,SAAS,CAAC,IAAI,CAAC;IAC5B,UAAU,EAAE,SAAS,CAAC,IAAI,CAAC;IAC3B,SAAS,EAAE,SAAS,CAAC,IAAI,CAAC;IAC1B,QAAQ,EAAE;QACR,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,EAAE;YAC3B,UAAU,EAAE,SAAS,CAAC,GAAG,CAAC;SAC3B;KACF;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Steps.d.ts b/_lib/app/components/Steps.d.ts new file mode 100644 index 00000000..9dda9cce --- /dev/null +++ b/_lib/app/components/Steps.d.ts @@ -0,0 +1,8 @@ +import { type ClassValue } from 'clsx'; +import type { ReactNode } from 'react'; +export type StepsProps = { + children: ReactNode; + className?: ClassValue; +}; +export declare function Steps({ children, className }: StepsProps): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=Steps.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Steps.d.ts.map b/_lib/app/components/Steps.d.ts.map new file mode 100644 index 00000000..4c54c3dd --- /dev/null +++ b/_lib/app/components/Steps.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Steps.d.ts","sourceRoot":"","sources":["../../../app/components/Steps.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAA;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItC,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,UAAU,CAAA;CACvB,CAAA;AAED,wBAAgB,KAAK,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,UAAU,8CAExD"} \ No newline at end of file diff --git a/_lib/app/components/Steps.js b/_lib/app/components/Steps.js new file mode 100644 index 00000000..2145d3b6 --- /dev/null +++ b/_lib/app/components/Steps.js @@ -0,0 +1,7 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import * as styles from './Steps.css.js'; +export function Steps({ children, className }) { + return _jsx("div", { className: clsx(className, styles.root), children: children }); +} +//# sourceMappingURL=Steps.js.map \ No newline at end of file diff --git a/_lib/app/components/Steps.js.map b/_lib/app/components/Steps.js.map new file mode 100644 index 00000000..7bdaad4d --- /dev/null +++ b/_lib/app/components/Steps.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Steps.js","sourceRoot":"","sources":["../../../app/components/Steps.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAmB,IAAI,EAAE,MAAM,MAAM,CAAA;AAG5C,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAA;AAOxC,MAAM,UAAU,KAAK,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAc;IACvD,OAAO,cAAK,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,YAAG,QAAQ,GAAO,CAAA;AACvE,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/Tabs.css.d.ts b/_lib/app/components/Tabs.css.d.ts new file mode 100644 index 00000000..77e7ca6c --- /dev/null +++ b/_lib/app/components/Tabs.css.d.ts @@ -0,0 +1,5 @@ +export declare const root: string; +export declare const list: string; +export declare const trigger: string; +export declare const content: string; +//# sourceMappingURL=Tabs.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Tabs.css.d.ts.map b/_lib/app/components/Tabs.css.d.ts.map new file mode 100644 index 00000000..f90f3207 --- /dev/null +++ b/_lib/app/components/Tabs.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Tabs.css.d.ts","sourceRoot":"","sources":["../../../app/components/Tabs.css.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,IAAI,QAIf,CAAA;AAEF,eAAO,MAAM,IAAI,QAgBhB,CAAA;AAED,eAAO,MAAM,OAAO,QAmBnB,CAAA;AAED,eAAO,MAAM,OAAO,QAenB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Tabs.css.js b/_lib/app/components/Tabs.css.js new file mode 100644 index 00000000..444a4665 --- /dev/null +++ b/_lib/app/components/Tabs.css.js @@ -0,0 +1,60 @@ +import { globalStyle, style } from '@vanilla-extract/css'; +import { borderRadiusVars, fontSizeVars, fontWeightVars, primitiveColorVars, semanticColorVars, spaceVars, viewportVars, } from '../styles/vars.css.js'; +export const root = style({ + backgroundColor: semanticColorVars.codeBlockBackground, + border: `1px solid ${semanticColorVars.codeInlineBorder}`, + borderRadius: borderRadiusVars['4'], +}); +export const list = style({ + backgroundColor: semanticColorVars.codeTitleBackground, + borderBottom: `1px solid ${primitiveColorVars.border}`, + borderTopLeftRadius: borderRadiusVars['4'], + borderTopRightRadius: borderRadiusVars['4'], + display: 'flex', + padding: `${spaceVars['0']} ${spaceVars['14']}`, + '@media': { + [viewportVars['max-720px']]: { + borderRadius: 0, + padding: `${spaceVars['0']} ${spaceVars['8']}`, + }, + }, +}, 'list'); +export const trigger = style({ + borderBottom: '2px solid transparent', + color: primitiveColorVars.text3, + fontSize: fontSizeVars['14'], + fontWeight: fontWeightVars.medium, + padding: `${spaceVars['8']} ${spaceVars['8']} ${spaceVars['6']} ${spaceVars['8']}`, + transition: 'color 0.1s', + selectors: { + '&:hover': { + color: primitiveColorVars.text, + }, + '&[data-state="active"]': { + borderBottom: `2px solid ${primitiveColorVars.borderAccent}`, + color: primitiveColorVars.text, + }, + }, +}, 'trigger'); +export const content = style({ + backgroundColor: semanticColorVars.codeBlockBackground, + selectors: { + '&:not([data-shiki="true"])': { + padding: `${spaceVars['20']} ${spaceVars['22']}`, + '@media': { + [viewportVars['max-720px']]: { + padding: `${spaceVars['20']} ${spaceVars['16']}`, + }, + }, + }, + }, +}, 'content'); +globalStyle(`${root} pre`, { + marginBottom: spaceVars['0'], + '@media': { + [viewportVars['max-720px']]: { + margin: 'unset', + }, + }, +}); +//# sourceMappingURL=Tabs.css.js.map \ No newline at end of file diff --git a/_lib/app/components/Tabs.css.js.map b/_lib/app/components/Tabs.css.js.map new file mode 100644 index 00000000..6cc9d64a --- /dev/null +++ b/_lib/app/components/Tabs.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Tabs.css.js","sourceRoot":"","sources":["../../../app/components/Tabs.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,EACT,YAAY,GACb,MAAM,uBAAuB,CAAA;AAE9B,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,eAAe,EAAE,iBAAiB,CAAC,mBAAmB;IACtD,MAAM,EAAE,aAAa,iBAAiB,CAAC,gBAAgB,EAAE;IACzD,YAAY,EAAE,gBAAgB,CAAC,GAAG,CAAC;CACpC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CACvB;IACE,eAAe,EAAE,iBAAiB,CAAC,mBAAmB;IACtD,YAAY,EAAE,aAAa,kBAAkB,CAAC,MAAM,EAAE;IACtD,mBAAmB,EAAE,gBAAgB,CAAC,GAAG,CAAC;IAC1C,oBAAoB,EAAE,gBAAgB,CAAC,GAAG,CAAC;IAC3C,OAAO,EAAE,MAAM;IACf,OAAO,EAAE,GAAG,SAAS,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,EAAE;IAC/C,QAAQ,EAAE;QACR,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,EAAE;YAC3B,YAAY,EAAE,CAAC;YACf,OAAO,EAAE,GAAG,SAAS,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC,EAAE;SAC/C;KACF;CACF,EACD,MAAM,CACP,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAC1B;IACE,YAAY,EAAE,uBAAuB;IACrC,KAAK,EAAE,kBAAkB,CAAC,KAAK;IAC/B,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC;IAC5B,UAAU,EAAE,cAAc,CAAC,MAAM;IACjC,OAAO,EAAE,GAAG,SAAS,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC,EAAE;IAClF,UAAU,EAAE,YAAY;IACxB,SAAS,EAAE;QACT,SAAS,EAAE;YACT,KAAK,EAAE,kBAAkB,CAAC,IAAI;SAC/B;QACD,wBAAwB,EAAE;YACxB,YAAY,EAAE,aAAa,kBAAkB,CAAC,YAAY,EAAE;YAC5D,KAAK,EAAE,kBAAkB,CAAC,IAAI;SAC/B;KACF;CACF,EACD,SAAS,CACV,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAC1B;IACE,eAAe,EAAE,iBAAiB,CAAC,mBAAmB;IACtD,SAAS,EAAE;QACT,4BAA4B,EAAE;YAC5B,OAAO,EAAE,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,EAAE;YAChD,QAAQ,EAAE;gBACR,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,EAAE;oBAC3B,OAAO,EAAE,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,EAAE;iBACjD;aACF;SACF;KACF;CACF,EACD,SAAS,CACV,CAAA;AAED,WAAW,CAAC,GAAG,IAAI,MAAM,EAAE;IACzB,YAAY,EAAE,SAAS,CAAC,GAAG,CAAC;IAC5B,QAAQ,EAAE;QACR,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,EAAE;YAC3B,MAAM,EAAE,OAAO;SAChB;KACF;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/Tabs.d.ts b/_lib/app/components/Tabs.d.ts new file mode 100644 index 00000000..1b0ded8d --- /dev/null +++ b/_lib/app/components/Tabs.d.ts @@ -0,0 +1,6 @@ +import * as Tabs from '@radix-ui/react-tabs'; +export declare function Root(props: Tabs.TabsProps): import("react/jsx-runtime.js").JSX.Element; +export declare function List(props: Tabs.TabsListProps): import("react/jsx-runtime.js").JSX.Element; +export declare function Trigger(props: Tabs.TabsTriggerProps): import("react/jsx-runtime.js").JSX.Element; +export declare function Content(props: Tabs.TabsContentProps): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=Tabs.d.js.map \ No newline at end of file diff --git a/_lib/app/components/Tabs.d.ts.map b/_lib/app/components/Tabs.d.ts.map new file mode 100644 index 00000000..81b10f45 --- /dev/null +++ b/_lib/app/components/Tabs.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../app/components/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,sBAAsB,CAAA;AAK5C,wBAAgB,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,8CAEzC;AAED,wBAAgB,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,aAAa,8CAE7C;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,gBAAgB,8CAEnD;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,gBAAgB,8CAEnD"} \ No newline at end of file diff --git a/_lib/app/components/Tabs.js b/_lib/app/components/Tabs.js new file mode 100644 index 00000000..d4c62c5c --- /dev/null +++ b/_lib/app/components/Tabs.js @@ -0,0 +1,17 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import * as Tabs from '@radix-ui/react-tabs'; +import clsx from 'clsx'; +import * as styles from './Tabs.css.js'; +export function Root(props) { + return _jsx(Tabs.Root, { ...props, className: clsx(props.className, styles.root) }); +} +export function List(props) { + return _jsx(Tabs.List, { ...props, className: clsx(props.className, styles.list) }); +} +export function Trigger(props) { + return _jsx(Tabs.Trigger, { ...props, className: clsx(props.className, styles.trigger) }); +} +export function Content(props) { + return _jsx(Tabs.Content, { ...props, className: clsx(props.className, styles.content) }); +} +//# sourceMappingURL=Tabs.js.map \ No newline at end of file diff --git a/_lib/app/components/Tabs.js.map b/_lib/app/components/Tabs.js.map new file mode 100644 index 00000000..2a51d70e --- /dev/null +++ b/_lib/app/components/Tabs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../app/components/Tabs.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,IAAI,MAAM,sBAAsB,CAAA;AAC5C,OAAO,IAAI,MAAM,MAAM,CAAA;AAEvB,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,MAAM,UAAU,IAAI,CAAC,KAAqB;IACxC,OAAO,KAAC,IAAI,CAAC,IAAI,OAAK,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,GAAI,CAAA;AAChF,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,KAAyB;IAC5C,OAAO,KAAC,IAAI,CAAC,IAAI,OAAK,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,GAAI,CAAA;AAChF,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,KAA4B;IAClD,OAAO,KAAC,IAAI,CAAC,OAAO,OAAK,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,GAAI,CAAA;AACtF,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,KAA4B;IAClD,OAAO,KAAC,IAAI,CAAC,OAAO,OAAK,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,GAAI,CAAA;AACtF,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/icons/ArrowDiagonal.d.ts b/_lib/app/components/icons/ArrowDiagonal.d.ts new file mode 100644 index 00000000..6661bd70 --- /dev/null +++ b/_lib/app/components/icons/ArrowDiagonal.d.ts @@ -0,0 +1,2 @@ +export declare function ArrowDiagonal(): import("react/jsx-runtime").JSX.Element; +//# sourceMappingURL=ArrowDiagonal.d.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/ArrowDiagonal.d.ts.map b/_lib/app/components/icons/ArrowDiagonal.d.ts.map new file mode 100644 index 00000000..5a2a5468 --- /dev/null +++ b/_lib/app/components/icons/ArrowDiagonal.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ArrowDiagonal.d.ts","sourceRoot":"","sources":["../../../../app/components/icons/ArrowDiagonal.tsx"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,4CAgB5B"} \ No newline at end of file diff --git a/_lib/app/components/icons/ArrowDiagonal.js b/_lib/app/components/icons/ArrowDiagonal.js new file mode 100644 index 00000000..4b7b5bd4 --- /dev/null +++ b/_lib/app/components/icons/ArrowDiagonal.js @@ -0,0 +1,5 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +export function ArrowDiagonal() { + return (_jsxs("svg", { width: "100%", height: "100%", viewBox: "0 0 29 29", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("title", { children: "Arrow Diagonal" }), _jsx("path", { d: "M29 2C29 0.895431 28.1046 4.68474e-07 27 4.68474e-07L9 4.68474e-07C7.89543 4.68474e-07 7 0.895431 7 2C7 3.10457 7.89543 4 9 4H25V20C25 21.1046 25.8954 22 27 22C28.1046 22 29 21.1046 29 20L29 2ZM3.41421 28.4142L28.4142 3.41421L25.5858 0.585787L0.585786 25.5858L3.41421 28.4142Z", fill: "currentColor" })] })); +} +//# sourceMappingURL=ArrowDiagonal.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/ArrowDiagonal.js.map b/_lib/app/components/icons/ArrowDiagonal.js.map new file mode 100644 index 00000000..f0f23784 --- /dev/null +++ b/_lib/app/components/icons/ArrowDiagonal.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ArrowDiagonal.js","sourceRoot":"","sources":["../../../../app/components/icons/ArrowDiagonal.tsx"],"names":[],"mappings":";AAAA,MAAM,UAAU,aAAa;IAC3B,OAAO,CACL,eACE,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,MAAM,EACb,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,aAElC,6CAA6B,EAC7B,eACE,CAAC,EAAC,sRAAsR,EACxR,IAAI,EAAC,cAAc,GACnB,IACE,CACP,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/icons/ArrowLeft.d.ts b/_lib/app/components/icons/ArrowLeft.d.ts new file mode 100644 index 00000000..b635c59e --- /dev/null +++ b/_lib/app/components/icons/ArrowLeft.d.ts @@ -0,0 +1,2 @@ +export declare function ArrowLeft(): import("react/jsx-runtime").JSX.Element; +//# sourceMappingURL=ArrowLeft.d.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/ArrowLeft.d.ts.map b/_lib/app/components/icons/ArrowLeft.d.ts.map new file mode 100644 index 00000000..237c4d8e --- /dev/null +++ b/_lib/app/components/icons/ArrowLeft.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ArrowLeft.d.ts","sourceRoot":"","sources":["../../../../app/components/icons/ArrowLeft.tsx"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,4CAgBxB"} \ No newline at end of file diff --git a/_lib/app/components/icons/ArrowLeft.js b/_lib/app/components/icons/ArrowLeft.js new file mode 100644 index 00000000..81ac426a --- /dev/null +++ b/_lib/app/components/icons/ArrowLeft.js @@ -0,0 +1,5 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +export function ArrowLeft() { + return (_jsxs("svg", { width: "100%", height: "100%", viewBox: "0 0 72 60", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("title", { children: "Arrow Left" }), _jsx("path", { d: "M0.325684 29.7461C0.325684 30.8203 0.813963 31.8457 1.69286 32.6758L26.8882 57.8223C27.7671 58.6524 28.7437 59.043 29.7691 59.043C31.9175 59.043 33.5777 57.4317 33.5777 55.2344C33.5777 54.209 33.2359 53.1836 32.5035 52.5L25.7652 45.5176L9.26126 30.6738L8.38236 32.7734L21.3706 33.7012H67.4644C69.7593 33.7012 71.3706 32.041 71.3706 29.7461C71.3706 27.4512 69.7593 25.791 67.4644 25.791H21.3706L8.38236 26.7188L9.26126 28.8672L25.7652 13.9746L32.5035 6.99221C33.2359 6.30861 33.5777 5.28322 33.5777 4.25782C33.5777 2.06052 31.9175 0.449219 29.7691 0.449219C28.7437 0.449219 27.7671 0.839814 26.8882 1.66991L1.69286 26.8164C0.813963 27.6465 0.325684 28.6719 0.325684 29.7461Z", fill: "currentColor" })] })); +} +//# sourceMappingURL=ArrowLeft.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/ArrowLeft.js.map b/_lib/app/components/icons/ArrowLeft.js.map new file mode 100644 index 00000000..1b15f79e --- /dev/null +++ b/_lib/app/components/icons/ArrowLeft.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ArrowLeft.js","sourceRoot":"","sources":["../../../../app/components/icons/ArrowLeft.tsx"],"names":[],"mappings":";AAAA,MAAM,UAAU,SAAS;IACvB,OAAO,CACL,eACE,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,MAAM,EACb,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,aAElC,yCAAyB,EACzB,eACE,CAAC,EAAC,mqBAAmqB,EACrqB,IAAI,EAAC,cAAc,GACnB,IACE,CACP,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/icons/ArrowRight.d.ts b/_lib/app/components/icons/ArrowRight.d.ts new file mode 100644 index 00000000..71f46cb0 --- /dev/null +++ b/_lib/app/components/icons/ArrowRight.d.ts @@ -0,0 +1,2 @@ +export declare function ArrowRight(): import("react/jsx-runtime").JSX.Element; +//# sourceMappingURL=ArrowRight.d.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/ArrowRight.d.ts.map b/_lib/app/components/icons/ArrowRight.d.ts.map new file mode 100644 index 00000000..89b94c32 --- /dev/null +++ b/_lib/app/components/icons/ArrowRight.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ArrowRight.d.ts","sourceRoot":"","sources":["../../../../app/components/icons/ArrowRight.tsx"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,4CAgBzB"} \ No newline at end of file diff --git a/_lib/app/components/icons/ArrowRight.js b/_lib/app/components/icons/ArrowRight.js new file mode 100644 index 00000000..8d2744cf --- /dev/null +++ b/_lib/app/components/icons/ArrowRight.js @@ -0,0 +1,5 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +export function ArrowRight() { + return (_jsxs("svg", { width: "100%", height: "100%", viewBox: "0 0 72 60", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("title", { children: "Arrow Right" }), _jsx("path", { d: "M71.3706 29.7461C71.3706 28.6719 70.8824 27.6465 70.0035 26.8164L44.8081 1.66991C43.9292 0.839814 42.9527 0.449219 41.9273 0.449219C39.7789 0.449219 38.1187 2.06052 38.1187 4.25782C38.1187 5.28322 38.4605 6.30861 39.1929 6.99221L45.9312 13.9746L62.4351 28.8672L63.314 26.7188L50.3257 25.791H4.23196C1.93706 25.791 0.325684 27.4512 0.325684 29.7461C0.325684 32.041 1.93706 33.7012 4.23196 33.7012H50.3257L63.314 32.7734L62.4351 30.6738L45.9312 45.5176L39.1929 52.5C38.4605 53.1836 38.1187 54.209 38.1187 55.2344C38.1187 57.4317 39.7789 59.043 41.9273 59.043C42.9527 59.043 43.9292 58.6524 44.8081 57.8223L70.0035 32.6758C70.8824 31.8457 71.3706 30.8203 71.3706 29.7461Z", fill: "currentColor" })] })); +} +//# sourceMappingURL=ArrowRight.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/ArrowRight.js.map b/_lib/app/components/icons/ArrowRight.js.map new file mode 100644 index 00000000..df92bd5d --- /dev/null +++ b/_lib/app/components/icons/ArrowRight.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ArrowRight.js","sourceRoot":"","sources":["../../../../app/components/icons/ArrowRight.tsx"],"names":[],"mappings":";AAAA,MAAM,UAAU,UAAU;IACxB,OAAO,CACL,eACE,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,MAAM,EACb,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,aAElC,0CAA0B,EAC1B,eACE,CAAC,EAAC,8pBAA8pB,EAChqB,IAAI,EAAC,cAAc,GACnB,IACE,CACP,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/icons/Checkmark.d.ts b/_lib/app/components/icons/Checkmark.d.ts new file mode 100644 index 00000000..0d7dac91 --- /dev/null +++ b/_lib/app/components/icons/Checkmark.d.ts @@ -0,0 +1,2 @@ +export declare function Checkmark(): import("react/jsx-runtime").JSX.Element; +//# sourceMappingURL=Checkmark.d.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/Checkmark.d.ts.map b/_lib/app/components/icons/Checkmark.d.ts.map new file mode 100644 index 00000000..5b9cbf06 --- /dev/null +++ b/_lib/app/components/icons/Checkmark.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Checkmark.d.ts","sourceRoot":"","sources":["../../../../app/components/icons/Checkmark.tsx"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,4CAgBxB"} \ No newline at end of file diff --git a/_lib/app/components/icons/Checkmark.js b/_lib/app/components/icons/Checkmark.js new file mode 100644 index 00000000..fb9e1d19 --- /dev/null +++ b/_lib/app/components/icons/Checkmark.js @@ -0,0 +1,5 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +export function Checkmark() { + return (_jsxs("svg", { width: "100%", height: "100%", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 68 67", children: [_jsx("title", { children: "Checkmark" }), _jsx("path", { fill: "currentColor", d: "M26.175 66.121c1.904 0 3.418-.83 4.492-2.49L66.263 7.332c.83-1.27 1.123-2.295 1.123-3.32 0-2.393-1.563-4.004-4.004-4.004-1.758 0-2.734.586-3.809 2.295L25.98 56.209 8.304 32.381c-1.123-1.514-2.198-2.149-3.809-2.149-2.441 0-4.2 1.71-4.2 4.15 0 1.026.44 2.15 1.27 3.224l19.971 25.927c1.367 1.758 2.734 2.588 4.639 2.588Z" })] })); +} +//# sourceMappingURL=Checkmark.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/Checkmark.js.map b/_lib/app/components/icons/Checkmark.js.map new file mode 100644 index 00000000..b9c653b3 --- /dev/null +++ b/_lib/app/components/icons/Checkmark.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Checkmark.js","sourceRoot":"","sources":["../../../../app/components/icons/Checkmark.tsx"],"names":[],"mappings":";AAAA,MAAM,UAAU,SAAS;IACvB,OAAO,CACL,eACE,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,MAAM,EACb,KAAK,EAAC,4BAA4B,EAClC,IAAI,EAAC,MAAM,EACX,OAAO,EAAC,WAAW,aAEnB,wCAAwB,EACxB,eACE,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,+TAA+T,GACjU,IACE,CACP,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/icons/ChevronDown.d.ts b/_lib/app/components/icons/ChevronDown.d.ts new file mode 100644 index 00000000..1ffaeef4 --- /dev/null +++ b/_lib/app/components/icons/ChevronDown.d.ts @@ -0,0 +1,2 @@ +export declare function ChevronDown(): import("react/jsx-runtime").JSX.Element; +//# sourceMappingURL=ChevronDown.d.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/ChevronDown.d.ts.map b/_lib/app/components/icons/ChevronDown.d.ts.map new file mode 100644 index 00000000..57d8dc64 --- /dev/null +++ b/_lib/app/components/icons/ChevronDown.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ChevronDown.d.ts","sourceRoot":"","sources":["../../../../app/components/icons/ChevronDown.tsx"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,4CAgB1B"} \ No newline at end of file diff --git a/_lib/app/components/icons/ChevronDown.js b/_lib/app/components/icons/ChevronDown.js new file mode 100644 index 00000000..5fc87934 --- /dev/null +++ b/_lib/app/components/icons/ChevronDown.js @@ -0,0 +1,5 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +export function ChevronDown() { + return (_jsxs("svg", { width: "100%", height: "100%", viewBox: "0 0 69 39", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("title", { children: "Chevron Down" }), _jsx("path", { d: "M34.8677 38.8398C35.9419 38.8398 37.0161 38.4492 37.7485 37.6191L67.729 7.44339C68.4614 6.71089 68.9009 5.73439 68.9009 4.61129C68.9009 2.31639 67.1919 0.558594 64.897 0.558594C63.8227 0.558594 62.7485 1.04689 62.0161 1.73049L32.5727 31.2715H37.1138L7.67042 1.73049C6.93802 1.04689 5.96142 0.558594 4.83842 0.558594C2.54342 0.558594 0.785645 2.31639 0.785645 4.61129C0.785645 5.73439 1.22512 6.71089 1.95752 7.44339L31.9868 37.6191C32.768 38.4492 33.7446 38.8398 34.8677 38.8398Z", fill: "currentColor" })] })); +} +//# sourceMappingURL=ChevronDown.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/ChevronDown.js.map b/_lib/app/components/icons/ChevronDown.js.map new file mode 100644 index 00000000..24a32ac4 --- /dev/null +++ b/_lib/app/components/icons/ChevronDown.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ChevronDown.js","sourceRoot":"","sources":["../../../../app/components/icons/ChevronDown.tsx"],"names":[],"mappings":";AAAA,MAAM,UAAU,WAAW;IACzB,OAAO,CACL,eACE,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,MAAM,EACb,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,aAElC,2CAA2B,EAC3B,eACE,CAAC,EAAC,ieAAie,EACne,IAAI,EAAC,cAAc,GACnB,IACE,CACP,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/icons/ChevronRight.d.ts b/_lib/app/components/icons/ChevronRight.d.ts new file mode 100644 index 00000000..772f139b --- /dev/null +++ b/_lib/app/components/icons/ChevronRight.d.ts @@ -0,0 +1,2 @@ +export declare function ChevronRight(): import("react/jsx-runtime").JSX.Element; +//# sourceMappingURL=ChevronRight.d.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/ChevronRight.d.ts.map b/_lib/app/components/icons/ChevronRight.d.ts.map new file mode 100644 index 00000000..3bc8b7e9 --- /dev/null +++ b/_lib/app/components/icons/ChevronRight.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ChevronRight.d.ts","sourceRoot":"","sources":["../../../../app/components/icons/ChevronRight.tsx"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,4CAgB3B"} \ No newline at end of file diff --git a/_lib/app/components/icons/ChevronRight.js b/_lib/app/components/icons/ChevronRight.js new file mode 100644 index 00000000..4ef52dfb --- /dev/null +++ b/_lib/app/components/icons/ChevronRight.js @@ -0,0 +1,5 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +export function ChevronRight() { + return (_jsxs("svg", { width: "100%", height: "100%", viewBox: "0 0 39 69", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("title", { children: "Chevron Right" }), _jsx("path", { d: "M38.8697 34.7461C38.8697 33.6719 38.4791 32.6953 37.649 31.8652L7.47318 1.8848C6.74078 1.1035 5.76418 0.712891 4.64118 0.712891C2.34618 0.712891 0.588379 2.42189 0.588379 4.71679C0.588379 5.79099 1.07668 6.81639 1.76028 7.59769L29.0552 34.7461L1.76028 61.8945C1.07668 62.6758 0.588379 63.6523 0.588379 64.7754C0.588379 67.0703 2.34618 68.7793 4.64118 68.7793C5.76418 68.7793 6.74078 68.3887 7.47318 67.6074L37.649 37.627C38.4791 36.7969 38.8697 35.8203 38.8697 34.7461Z", fill: "currentColor" })] })); +} +//# sourceMappingURL=ChevronRight.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/ChevronRight.js.map b/_lib/app/components/icons/ChevronRight.js.map new file mode 100644 index 00000000..d5f742ff --- /dev/null +++ b/_lib/app/components/icons/ChevronRight.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ChevronRight.js","sourceRoot":"","sources":["../../../../app/components/icons/ChevronRight.tsx"],"names":[],"mappings":";AAAA,MAAM,UAAU,YAAY;IAC1B,OAAO,CACL,eACE,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,MAAM,EACb,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,aAElC,4CAA4B,EAC5B,eACE,CAAC,EAAC,udAAud,EACzd,IAAI,EAAC,cAAc,GACnB,IACE,CACP,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/icons/ChevronUp.d.ts b/_lib/app/components/icons/ChevronUp.d.ts new file mode 100644 index 00000000..0d991eed --- /dev/null +++ b/_lib/app/components/icons/ChevronUp.d.ts @@ -0,0 +1,2 @@ +export declare function ChevronUp(): import("react/jsx-runtime").JSX.Element; +//# sourceMappingURL=ChevronUp.d.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/ChevronUp.d.ts.map b/_lib/app/components/icons/ChevronUp.d.ts.map new file mode 100644 index 00000000..50ee92b7 --- /dev/null +++ b/_lib/app/components/icons/ChevronUp.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ChevronUp.d.ts","sourceRoot":"","sources":["../../../../app/components/icons/ChevronUp.tsx"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,4CAgBxB"} \ No newline at end of file diff --git a/_lib/app/components/icons/ChevronUp.js b/_lib/app/components/icons/ChevronUp.js new file mode 100644 index 00000000..d46e5f68 --- /dev/null +++ b/_lib/app/components/icons/ChevronUp.js @@ -0,0 +1,5 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +export function ChevronUp() { + return (_jsxs("svg", { width: "100%", height: "100%", viewBox: "0 0 69 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("title", { children: "Chevron Up" }), _jsx("path", { d: "M1.95752 32.2441C1.22512 32.9277 0.785645 33.9531 0.785645 35.0762C0.785645 37.3711 2.54342 39.1289 4.83842 39.1289C5.96142 39.1289 6.98682 38.6895 7.67042 37.957L37.1138 8.36716H32.5727L62.0161 37.957C62.6997 38.6895 63.8227 39.1289 64.897 39.1289C67.1919 39.1289 68.9009 37.3711 68.9009 35.0762C68.9009 33.9531 68.4614 32.9277 67.729 32.2441L37.7485 2.06836C37.0161 1.23826 35.9419 0.847656 34.8677 0.847656C33.7446 0.847656 32.7192 1.23826 31.9868 2.06836L1.95752 32.2441Z", fill: "currentColor" })] })); +} +//# sourceMappingURL=ChevronUp.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/ChevronUp.js.map b/_lib/app/components/icons/ChevronUp.js.map new file mode 100644 index 00000000..4eb7b574 --- /dev/null +++ b/_lib/app/components/icons/ChevronUp.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ChevronUp.js","sourceRoot":"","sources":["../../../../app/components/icons/ChevronUp.tsx"],"names":[],"mappings":";AAAA,MAAM,UAAU,SAAS;IACvB,OAAO,CACL,eACE,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,MAAM,EACb,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,aAElC,yCAAyB,EACzB,eACE,CAAC,EAAC,6dAA6d,EAC/d,IAAI,EAAC,cAAc,GACnB,IACE,CACP,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/icons/Copy.d.ts b/_lib/app/components/icons/Copy.d.ts new file mode 100644 index 00000000..0b8995e6 --- /dev/null +++ b/_lib/app/components/icons/Copy.d.ts @@ -0,0 +1,2 @@ +export declare function Copy(): import("react/jsx-runtime").JSX.Element; +//# sourceMappingURL=Copy.d.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/Copy.d.ts.map b/_lib/app/components/icons/Copy.d.ts.map new file mode 100644 index 00000000..bec3c766 --- /dev/null +++ b/_lib/app/components/icons/Copy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Copy.d.ts","sourceRoot":"","sources":["../../../../app/components/icons/Copy.tsx"],"names":[],"mappings":"AAAA,wBAAgB,IAAI,4CAqBnB"} \ No newline at end of file diff --git a/_lib/app/components/icons/Copy.js b/_lib/app/components/icons/Copy.js new file mode 100644 index 00000000..2dc70f6c --- /dev/null +++ b/_lib/app/components/icons/Copy.js @@ -0,0 +1,5 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +export function Copy() { + return (_jsxs("svg", { width: "100%", height: "100%", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 82 82", children: [_jsx("title", { children: "Copy" }), _jsx("path", { fill: "currentColor", d: "M12.451 63.281h38.38c8.3 0 12.45-4.053 12.45-12.256v-38.77C63.281 4.054 59.131 0 50.831 0H12.45C4.101 0 0 4.053 0 12.256v38.77C0 59.227 4.102 63.28 12.451 63.28Zm.098-7.031c-3.516 0-5.518-1.904-5.518-5.615V12.647c0-3.711 2.002-5.616 5.518-5.616h38.183c3.516 0 5.518 1.905 5.518 5.615v37.989c0 3.71-2.002 5.615-5.518 5.615H12.55Z" }), _jsx("path", { stroke: "currentColor", strokeWidth: "6.75px", d: "M69.385 78.266h-38.38c-3.679 0-5.782-.894-6.987-2.081-1.196-1.178-2.088-3.219-2.088-6.8v-38.77c0-3.581.892-5.622 2.088-6.8 1.205-1.187 3.308-2.08 6.988-2.08h38.379c3.65 0 5.758.89 6.973 2.084 1.203 1.182 2.103 3.225 2.103 6.796v38.77c0 3.57-.9 5.614-2.103 6.796-1.215 1.193-3.323 2.085-6.973 2.085Z" })] })); +} +//# sourceMappingURL=Copy.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/Copy.js.map b/_lib/app/components/icons/Copy.js.map new file mode 100644 index 00000000..77af6ba1 --- /dev/null +++ b/_lib/app/components/icons/Copy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Copy.js","sourceRoot":"","sources":["../../../../app/components/icons/Copy.tsx"],"names":[],"mappings":";AAAA,MAAM,UAAU,IAAI;IAClB,OAAO,CACL,eACE,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,MAAM,EACb,KAAK,EAAC,4BAA4B,EAClC,IAAI,EAAC,MAAM,EACX,OAAO,EAAC,WAAW,aAEnB,mCAAmB,EACnB,eACE,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,0UAA0U,GAC5U,EACF,eACE,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,QAAQ,EACpB,CAAC,EAAC,4SAA4S,GAC9S,IACE,CACP,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/icons/Discord.d.ts b/_lib/app/components/icons/Discord.d.ts new file mode 100644 index 00000000..9483777e --- /dev/null +++ b/_lib/app/components/icons/Discord.d.ts @@ -0,0 +1,2 @@ +export declare function Discord(): import("react/jsx-runtime").JSX.Element; +//# sourceMappingURL=Discord.d.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/Discord.d.ts.map b/_lib/app/components/icons/Discord.d.ts.map new file mode 100644 index 00000000..f0dc37c9 --- /dev/null +++ b/_lib/app/components/icons/Discord.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Discord.d.ts","sourceRoot":"","sources":["../../../../app/components/icons/Discord.tsx"],"names":[],"mappings":"AAAA,wBAAgB,OAAO,4CAgBtB"} \ No newline at end of file diff --git a/_lib/app/components/icons/Discord.js b/_lib/app/components/icons/Discord.js new file mode 100644 index 00000000..356f023d --- /dev/null +++ b/_lib/app/components/icons/Discord.js @@ -0,0 +1,5 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +export function Discord() { + return (_jsxs("svg", { width: "100%", height: "100%", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 127.14 96.36", children: [_jsx("title", { children: "Discord" }), _jsx("g", { id: "\u56FE\u5C42_2", "data-name": "\u56FE\u5C42 2", children: _jsx("g", { id: "Discord_Logos", "data-name": "Discord Logos", children: _jsx("g", { id: "Discord_Logo_-_Large_-_White", "data-name": "Discord Logo - Large - White", children: _jsx("path", { d: "M107.7,8.07A105.15,105.15,0,0,0,81.47,0a72.06,72.06,0,0,0-3.36,6.83A97.68,97.68,0,0,0,49,6.83,72.37,72.37,0,0,0,45.64,0,105.89,105.89,0,0,0,19.39,8.09C2.79,32.65-1.71,56.6.54,80.21h0A105.73,105.73,0,0,0,32.71,96.36,77.7,77.7,0,0,0,39.6,85.25a68.42,68.42,0,0,1-10.85-5.18c.91-.66,1.8-1.34,2.66-2a75.57,75.57,0,0,0,64.32,0c.87.71,1.76,1.39,2.66,2a68.68,68.68,0,0,1-10.87,5.19,77,77,0,0,0,6.89,11.1A105.25,105.25,0,0,0,126.6,80.22h0C129.24,52.84,122.09,29.11,107.7,8.07ZM42.45,65.69C36.18,65.69,31,60,31,53s5-12.74,11.43-12.74S54,46,53.89,53,48.84,65.69,42.45,65.69Zm42.24,0C78.41,65.69,73.25,60,73.25,53s5-12.74,11.44-12.74S96.23,46,96.12,53,91.08,65.69,84.69,65.69Z", fill: "currentColor" }) }) }) })] })); +} +//# sourceMappingURL=Discord.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/Discord.js.map b/_lib/app/components/icons/Discord.js.map new file mode 100644 index 00000000..1a5baf2e --- /dev/null +++ b/_lib/app/components/icons/Discord.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Discord.js","sourceRoot":"","sources":["../../../../app/components/icons/Discord.tsx"],"names":[],"mappings":";AAAA,MAAM,UAAU,OAAO;IACrB,OAAO,CACL,eAAK,KAAK,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,kBAAkB,aAC3F,sCAAsB,EACtB,YAAG,EAAE,EAAC,gBAAM,eAAW,gBAAM,YAC3B,YAAG,EAAE,EAAC,eAAe,eAAW,eAAe,YAC7C,YAAG,EAAE,EAAC,8BAA8B,eAAW,8BAA8B,YAC3E,eACE,CAAC,EAAC,0pBAA0pB,EAC5pB,IAAI,EAAC,cAAc,GACnB,GACA,GACF,GACF,IACA,CACP,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/icons/File.d.ts b/_lib/app/components/icons/File.d.ts new file mode 100644 index 00000000..a8b2b066 --- /dev/null +++ b/_lib/app/components/icons/File.d.ts @@ -0,0 +1,2 @@ +export declare function File(): import("react/jsx-runtime").JSX.Element; +//# sourceMappingURL=File.d.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/File.d.ts.map b/_lib/app/components/icons/File.d.ts.map new file mode 100644 index 00000000..2116cf40 --- /dev/null +++ b/_lib/app/components/icons/File.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"File.d.ts","sourceRoot":"","sources":["../../../../app/components/icons/File.tsx"],"names":[],"mappings":"AAAA,wBAAgB,IAAI,4CA2BnB"} \ No newline at end of file diff --git a/_lib/app/components/icons/File.js b/_lib/app/components/icons/File.js new file mode 100644 index 00000000..285b1268 --- /dev/null +++ b/_lib/app/components/icons/File.js @@ -0,0 +1,5 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +export function File() { + return (_jsxs("svg", { width: "100%", height: "100%", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 94 99", fill: "none", children: [_jsx("title", { children: "File" }), _jsx("rect", { width: "77px", height: "89px", x: "8px", y: "3px", stroke: "currentColor", strokeWidth: "6px", rx: "7px" }), _jsx("path", { stroke: "currentColor", strokeLinecap: "round", strokeWidth: "6px", d: "M25 22h43M25 35h43M25 48h22" })] })); +} +//# sourceMappingURL=File.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/File.js.map b/_lib/app/components/icons/File.js.map new file mode 100644 index 00000000..e6c7a1cb --- /dev/null +++ b/_lib/app/components/icons/File.js.map @@ -0,0 +1 @@ +{"version":3,"file":"File.js","sourceRoot":"","sources":["../../../../app/components/icons/File.tsx"],"names":[],"mappings":";AAAA,MAAM,UAAU,IAAI;IAClB,OAAO,CACL,eACE,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,MAAM,EACb,KAAK,EAAC,4BAA4B,EAClC,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,aAEX,mCAAmB,EACnB,eACE,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,MAAM,EACb,CAAC,EAAC,KAAK,EACP,CAAC,EAAC,KAAK,EACP,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,KAAK,EACjB,EAAE,EAAC,KAAK,GACR,EACF,eACE,MAAM,EAAC,cAAc,EACrB,aAAa,EAAC,OAAO,EACrB,WAAW,EAAC,KAAK,EACjB,CAAC,EAAC,6BAA6B,GAC/B,IACE,CACP,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/icons/GitHub.d.ts b/_lib/app/components/icons/GitHub.d.ts new file mode 100644 index 00000000..1aee72a0 --- /dev/null +++ b/_lib/app/components/icons/GitHub.d.ts @@ -0,0 +1,2 @@ +export declare function GitHub(): import("react/jsx-runtime").JSX.Element; +//# sourceMappingURL=GitHub.d.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/GitHub.d.ts.map b/_lib/app/components/icons/GitHub.d.ts.map new file mode 100644 index 00000000..e34a42a2 --- /dev/null +++ b/_lib/app/components/icons/GitHub.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"GitHub.d.ts","sourceRoot":"","sources":["../../../../app/components/icons/GitHub.tsx"],"names":[],"mappings":"AAAA,wBAAgB,MAAM,4CAYrB"} \ No newline at end of file diff --git a/_lib/app/components/icons/GitHub.js b/_lib/app/components/icons/GitHub.js new file mode 100644 index 00000000..3dbccdc2 --- /dev/null +++ b/_lib/app/components/icons/GitHub.js @@ -0,0 +1,5 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +export function GitHub() { + return (_jsxs("svg", { width: "100%", height: "100%", viewBox: "0 0 98 96", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("title", { children: "GitHub" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z", fill: "currentColor" })] })); +} +//# sourceMappingURL=GitHub.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/GitHub.js.map b/_lib/app/components/icons/GitHub.js.map new file mode 100644 index 00000000..98751d2c --- /dev/null +++ b/_lib/app/components/icons/GitHub.js.map @@ -0,0 +1 @@ +{"version":3,"file":"GitHub.js","sourceRoot":"","sources":["../../../../app/components/icons/GitHub.tsx"],"names":[],"mappings":";AAAA,MAAM,UAAU,MAAM;IACpB,OAAO,CACL,eAAK,KAAK,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,4BAA4B,aACpF,qCAAqB,EACrB,eACE,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,6zBAA6zB,EAC/zB,IAAI,EAAC,cAAc,GACnB,IACE,CACP,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/icons/Link.d.ts b/_lib/app/components/icons/Link.d.ts new file mode 100644 index 00000000..4b358b51 --- /dev/null +++ b/_lib/app/components/icons/Link.d.ts @@ -0,0 +1,2 @@ +export declare function Link(): import("react/jsx-runtime").JSX.Element; +//# sourceMappingURL=Link.d.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/Link.d.ts.map b/_lib/app/components/icons/Link.d.ts.map new file mode 100644 index 00000000..3ce2f91a --- /dev/null +++ b/_lib/app/components/icons/Link.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../../app/components/icons/Link.tsx"],"names":[],"mappings":"AAAA,wBAAgB,IAAI,4CAgBnB"} \ No newline at end of file diff --git a/_lib/app/components/icons/Link.js b/_lib/app/components/icons/Link.js new file mode 100644 index 00000000..da8a36da --- /dev/null +++ b/_lib/app/components/icons/Link.js @@ -0,0 +1,5 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +export function Link() { + return (_jsxs("svg", { width: "100%", height: "100%", viewBox: "0 0 83 83", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("title", { children: "Link" }), _jsx("path", { d: "M43.6479 25.4375L37.8862 31.2969C42.476 31.9316 45.4546 33.3965 47.7006 35.6426C54.2436 42.1855 54.2436 51.3652 47.7983 57.8105L35.2983 70.3105C28.8042 76.8047 19.6245 76.8047 13.0815 70.3105C6.48974 63.7188 6.53854 54.5391 13.0327 48.0938L19.6245 41.502C18.4038 38.6699 18.1108 35.4473 18.4526 32.7129L7.75924 43.4062C-1.66455 52.7812 -1.71338 66.1113 7.80814 75.584C17.2807 85.1055 30.562 85.0566 39.9858 75.6328L53.0717 62.498C62.4467 53.123 62.4956 39.8418 53.0229 30.3203C50.8745 28.1719 48.0913 26.5605 43.6479 25.4375ZM40.0346 57.4199L45.7475 51.6094C41.1577 50.9746 38.1792 49.5098 35.9819 47.2637C29.4389 40.7207 29.4389 31.541 35.8842 25.0957L48.3842 12.5957C54.8784 6.1016 64.0581 6.0527 70.601 12.5957C77.144 19.1875 77.0952 28.3672 70.6499 34.8125L64.0581 41.4043C65.2788 44.2363 65.5717 47.459 65.2299 50.1934L75.9233 39.5C85.3471 30.0762 85.396 16.7949 75.8745 7.3223C66.4018 -2.1992 53.0717 -2.15041 43.6967 7.27339L30.6108 20.4082C21.2358 29.7832 21.1381 43.0645 30.6596 52.5859C32.8081 54.7344 35.5913 56.3457 40.0346 57.4199Z", fill: "currentColor" })] })); +} +//# sourceMappingURL=Link.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/Link.js.map b/_lib/app/components/icons/Link.js.map new file mode 100644 index 00000000..488134d6 --- /dev/null +++ b/_lib/app/components/icons/Link.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Link.js","sourceRoot":"","sources":["../../../../app/components/icons/Link.tsx"],"names":[],"mappings":";AAAA,MAAM,UAAU,IAAI;IAClB,OAAO,CACL,eACE,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,MAAM,EACb,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,aAElC,mCAAmB,EACnB,eACE,CAAC,EAAC,shCAAshC,EACxhC,IAAI,EAAC,cAAc,GACnB,IACE,CACP,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/icons/Menu.d.ts b/_lib/app/components/icons/Menu.d.ts new file mode 100644 index 00000000..5287f87b --- /dev/null +++ b/_lib/app/components/icons/Menu.d.ts @@ -0,0 +1,2 @@ +export declare function Menu(): import("react/jsx-runtime").JSX.Element; +//# sourceMappingURL=Menu.d.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/Menu.d.ts.map b/_lib/app/components/icons/Menu.d.ts.map new file mode 100644 index 00000000..b73cbc51 --- /dev/null +++ b/_lib/app/components/icons/Menu.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../app/components/icons/Menu.tsx"],"names":[],"mappings":"AAAA,wBAAgB,IAAI,4CAgBnB"} \ No newline at end of file diff --git a/_lib/app/components/icons/Menu.js b/_lib/app/components/icons/Menu.js new file mode 100644 index 00000000..63166af2 --- /dev/null +++ b/_lib/app/components/icons/Menu.js @@ -0,0 +1,5 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +export function Menu() { + return (_jsxs("svg", { width: "100%", height: "100%", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 79 48", fill: "none", children: [_jsx("title", { children: "Menu" }), _jsx("path", { fill: "currentColor", d: "M19.528 47.232h40.87c1.952 0 3.515-1.562 3.515-3.564a3.5 3.5 0 0 0-3.516-3.516H19.528a3.501 3.501 0 0 0-3.515 3.516c0 2.002 1.562 3.564 3.515 3.564ZM12.057 27.262h55.81a3.501 3.501 0 0 0 3.516-3.516 3.501 3.501 0 0 0-3.515-3.515h-55.81a3.501 3.501 0 0 0-3.516 3.515 3.501 3.501 0 0 0 3.515 3.516ZM4.391 7.34H75.29c2.002 0 3.515-1.563 3.515-3.516 0-2.002-1.513-3.564-3.515-3.564H4.39C2.438.26.876 1.822.876 3.824A3.501 3.501 0 0 0 4.39 7.34Z" })] })); +} +//# sourceMappingURL=Menu.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/Menu.js.map b/_lib/app/components/icons/Menu.js.map new file mode 100644 index 00000000..b7d9a05e --- /dev/null +++ b/_lib/app/components/icons/Menu.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Menu.js","sourceRoot":"","sources":["../../../../app/components/icons/Menu.tsx"],"names":[],"mappings":";AAAA,MAAM,UAAU,IAAI;IAClB,OAAO,CACL,eACE,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,MAAM,EACb,KAAK,EAAC,4BAA4B,EAClC,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,aAEX,mCAAmB,EACnB,eACE,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,0bAA0b,GAC5b,IACE,CACP,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/icons/Moon.d.ts b/_lib/app/components/icons/Moon.d.ts new file mode 100644 index 00000000..d8b5a9db --- /dev/null +++ b/_lib/app/components/icons/Moon.d.ts @@ -0,0 +1,2 @@ +export declare function Moon(): import("react/jsx-runtime").JSX.Element; +//# sourceMappingURL=Moon.d.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/Moon.d.ts.map b/_lib/app/components/icons/Moon.d.ts.map new file mode 100644 index 00000000..2576fd7d --- /dev/null +++ b/_lib/app/components/icons/Moon.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Moon.d.ts","sourceRoot":"","sources":["../../../../app/components/icons/Moon.tsx"],"names":[],"mappings":"AAAA,wBAAgB,IAAI,4CAoBnB"} \ No newline at end of file diff --git a/_lib/app/components/icons/Moon.js b/_lib/app/components/icons/Moon.js new file mode 100644 index 00000000..0c908808 --- /dev/null +++ b/_lib/app/components/icons/Moon.js @@ -0,0 +1,5 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +export function Moon() { + return (_jsxs("svg", { width: "100%", height: "100%", viewBox: "0 0 78 82", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("title", { children: "Moon" }), _jsx("path", { d: "M62.8455 45.9668C63.6268 45.9668 64.2127 45.3809 64.3104 44.5508C65.4334 34.3457 66.0682 33.9551 76.4197 32.3438C77.3963 32.1973 77.9334 31.7578 77.9334 30.8789C77.9334 30.0977 77.3963 29.5605 76.6151 29.4629C66.1658 27.4609 65.4334 27.4609 64.3104 17.2559C64.2127 16.377 63.6268 15.8398 62.8455 15.8398C62.0154 15.8398 61.4783 16.377 61.3807 17.207C60.1111 27.6074 59.6229 28.0957 49.0272 29.4629C48.2947 29.5117 47.7088 30.0977 47.7088 30.8789C47.7088 31.709 48.2947 32.1973 49.0272 32.3438C59.6229 34.3457 60.0623 34.4434 61.3807 44.6484C61.4783 45.3809 62.0154 45.9668 62.8455 45.9668ZM44.535 19.5508C45.0233 19.5508 45.3162 19.2578 45.4139 18.7695C46.6834 12.4707 46.5369 12.373 53.1287 11.0547C53.5682 10.957 53.91 10.7129 53.91 10.1758C53.91 9.63868 53.5682 9.39448 53.1287 9.29688C46.5369 7.97848 46.6834 7.88089 45.4139 1.58199C45.3162 1.09379 45.0233 0.800781 44.535 0.800781C43.9979 0.800781 43.7049 1.09379 43.6072 1.58199C42.3377 7.88089 42.4842 7.97848 35.9412 9.29688C35.4529 9.39448 35.1111 9.63868 35.1111 10.1758C35.1111 10.7129 35.4529 10.957 35.9412 11.0547C42.4842 12.373 42.3865 12.4707 43.6072 18.7695C43.7049 19.2578 43.9979 19.5508 44.535 19.5508Z", fill: "currentColor" }), _jsx("path", { d: "M34.3298 81.2696C48.49 81.2696 59.9157 74.043 65.0915 61.7872C65.8239 59.9806 65.5798 58.6134 64.7497 57.7833C64.0173 57.0509 62.7478 56.9044 61.3318 57.4903C58.4509 58.6134 54.9353 59.2481 50.6384 59.2481C33.695 59.2481 22.7575 48.6036 22.7575 32.2462C22.7575 27.4122 23.6853 22.6759 24.7595 20.5763C25.5407 18.9161 25.4919 17.5001 24.8083 16.67C24.0271 15.7423 22.6599 15.4005 20.7068 16.1329C8.64624 20.7716 0.345459 33.4181 0.345459 47.8712C0.345459 66.8165 14.5056 81.2696 34.3298 81.2696ZM34.4275 74.5801C18.4607 74.5801 7.03494 62.9591 7.03494 47.3341C7.03494 38.2521 10.9411 30.0489 17.6306 24.629C16.8005 27.0704 16.361 30.6837 16.361 34.1505C16.361 52.8517 29.5446 65.6935 48.8806 65.6935C52.0544 65.6935 54.9841 65.3517 56.4001 64.9122C51.615 70.918 43.4607 74.5801 34.4275 74.5801Z", fill: "currentColor" })] })); +} +//# sourceMappingURL=Moon.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/Moon.js.map b/_lib/app/components/icons/Moon.js.map new file mode 100644 index 00000000..7f74b42d --- /dev/null +++ b/_lib/app/components/icons/Moon.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Moon.js","sourceRoot":"","sources":["../../../../app/components/icons/Moon.tsx"],"names":[],"mappings":";AAAA,MAAM,UAAU,IAAI;IAClB,OAAO,CACL,eACE,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,MAAM,EACb,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,aAElC,mCAAmB,EACnB,eACE,CAAC,EAAC,spCAAspC,EACxpC,IAAI,EAAC,cAAc,GACnB,EACF,eACE,CAAC,EAAC,2xBAA2xB,EAC7xB,IAAI,EAAC,cAAc,GACnB,IACE,CACP,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/icons/Sun.d.ts b/_lib/app/components/icons/Sun.d.ts new file mode 100644 index 00000000..fac946da --- /dev/null +++ b/_lib/app/components/icons/Sun.d.ts @@ -0,0 +1,2 @@ +export declare function Sun(): import("react/jsx-runtime").JSX.Element; +//# sourceMappingURL=Sun.d.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/Sun.d.ts.map b/_lib/app/components/icons/Sun.d.ts.map new file mode 100644 index 00000000..b6b3b96f --- /dev/null +++ b/_lib/app/components/icons/Sun.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Sun.d.ts","sourceRoot":"","sources":["../../../../app/components/icons/Sun.tsx"],"names":[],"mappings":"AAAA,wBAAgB,GAAG,4CAoBlB"} \ No newline at end of file diff --git a/_lib/app/components/icons/Sun.js b/_lib/app/components/icons/Sun.js new file mode 100644 index 00000000..a37d4915 --- /dev/null +++ b/_lib/app/components/icons/Sun.js @@ -0,0 +1,5 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +export function Sun() { + return (_jsxs("svg", { width: "100%", height: "100%", viewBox: "0 0 84 84", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("title", { children: "Sun" }), _jsx("path", { d: "M41.8675 15.5254C43.9183 15.5254 45.6273 13.7676 45.6273 11.7168V3.80658C45.6273 1.75588 43.9183 0.046875 41.8675 0.046875C39.7679 0.046875 38.0589 1.75588 38.0589 3.80658V11.7168C38.0589 13.7676 39.7679 15.5254 41.8675 15.5254ZM60.3246 23.2402C61.7895 24.7051 64.2309 24.7539 65.7446 23.2402L71.3598 17.6738C72.7758 16.209 72.7758 13.7188 71.3598 12.2539C69.8949 10.7891 67.4535 10.7891 65.9887 12.2539L60.3246 17.918C58.9086 19.3828 58.9086 21.7754 60.3246 23.2402ZM67.9906 41.7461C67.9906 43.7969 69.7485 45.5547 71.7992 45.5547H79.6117C81.7113 45.5547 83.4202 43.7969 83.4202 41.7461C83.4202 39.6953 81.7113 37.9375 79.6117 37.9375H71.7992C69.7485 37.9375 67.9906 39.6953 67.9906 41.7461ZM60.3246 60.3008C58.9086 61.7656 58.9086 64.1582 60.3246 65.623L65.9887 71.2871C67.4535 72.7519 69.8949 72.7031 71.3598 71.2383C72.7758 69.7734 72.7758 67.332 71.3598 65.8672L65.6957 60.3008C64.2309 58.8359 61.7895 58.8359 60.3246 60.3008ZM41.8675 67.9668C39.7679 67.9668 38.0589 69.7246 38.0589 71.7754V79.6855C38.0589 81.7363 39.7679 83.4453 41.8675 83.4453C43.9183 83.4453 45.6273 81.7363 45.6273 79.6855V71.7754C45.6273 69.7246 43.9183 67.9668 41.8675 67.9668ZM23.3617 60.3008C21.8969 58.8359 19.4067 58.8359 17.9418 60.3008L12.3754 65.8184C10.9106 67.2832 10.9106 69.7246 12.3266 71.1894C13.7914 72.6543 16.2328 72.7031 17.6977 71.2383L23.3129 65.623C24.7778 64.1582 24.7778 61.7656 23.3617 60.3008ZM15.6957 41.7461C15.6957 39.6953 13.9867 37.9375 11.8871 37.9375H4.07455C1.97497 37.9375 0.265991 39.6953 0.265991 41.7461C0.265991 43.7969 1.97497 45.5547 4.07455 45.5547H11.8871C13.9867 45.5547 15.6957 43.7969 15.6957 41.7461ZM23.3129 23.2402C24.7778 21.8242 24.7778 19.334 23.3617 17.918L17.7465 12.2539C16.3305 10.8379 13.8403 10.7891 12.4242 12.2539C10.9594 13.7188 10.9594 16.209 12.3754 17.625L17.9418 23.2402C19.4067 24.7051 21.8481 24.7051 23.3129 23.2402Z", fill: "currentColor" }), _jsx("path", { d: "M41.8675 61.668C52.7073 61.668 61.7405 52.6836 61.7405 41.7461C61.7405 30.8086 52.7073 21.8242 41.8675 21.8242C30.9788 21.8242 21.9456 30.8086 21.9456 41.7461C21.9456 52.6836 30.9788 61.668 41.8675 61.668ZM41.8675 55.0273C34.5921 55.0273 28.5862 48.9727 28.5862 41.7461C28.5862 34.5195 34.5921 28.4648 41.8675 28.4648C49.0941 28.4648 55.0999 34.5195 55.0999 41.7461C55.0999 48.9727 49.0941 55.0273 41.8675 55.0273Z", fill: "currentColor" })] })); +} +//# sourceMappingURL=Sun.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/Sun.js.map b/_lib/app/components/icons/Sun.js.map new file mode 100644 index 00000000..345ad353 --- /dev/null +++ b/_lib/app/components/icons/Sun.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Sun.js","sourceRoot":"","sources":["../../../../app/components/icons/Sun.tsx"],"names":[],"mappings":";AAAA,MAAM,UAAU,GAAG;IACjB,OAAO,CACL,eACE,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,MAAM,EACb,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,aAElC,kCAAkB,EAClB,eACE,CAAC,EAAC,u0DAAu0D,EACz0D,IAAI,EAAC,cAAc,GACnB,EACF,eACE,CAAC,EAAC,gaAAga,EACla,IAAI,EAAC,cAAc,GACnB,IACE,CACP,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/icons/Telegram.d.ts b/_lib/app/components/icons/Telegram.d.ts new file mode 100644 index 00000000..fcbdb2e5 --- /dev/null +++ b/_lib/app/components/icons/Telegram.d.ts @@ -0,0 +1,2 @@ +export declare function Telegram(): import("react/jsx-runtime").JSX.Element; +//# sourceMappingURL=Telegram.d.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/Telegram.d.ts.map b/_lib/app/components/icons/Telegram.d.ts.map new file mode 100644 index 00000000..1d2f5cb9 --- /dev/null +++ b/_lib/app/components/icons/Telegram.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Telegram.d.ts","sourceRoot":"","sources":["../../../../app/components/icons/Telegram.tsx"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,4CAUvB"} \ No newline at end of file diff --git a/_lib/app/components/icons/Telegram.js b/_lib/app/components/icons/Telegram.js new file mode 100644 index 00000000..203b0e8b --- /dev/null +++ b/_lib/app/components/icons/Telegram.js @@ -0,0 +1,5 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +export function Telegram() { + return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "100%", height: "100%", viewBox: "0 0 50 50", children: [_jsx("title", { children: "Telegram" }), _jsx("path", { d: "M25 2c12.703 0 23 10.297 23 23S37.703 48 25 48 2 37.703 2 25 12.297 2 25 2zm7.934 32.375c.423-1.298 2.405-14.234 2.65-16.783.074-.772-.17-1.285-.648-1.514-.578-.278-1.434-.139-2.427.219-1.362.491-18.774 7.884-19.78 8.312-.954.405-1.856.847-1.856 1.487 0 .45.267.703 1.003.966.766.273 2.695.858 3.834 1.172 1.097.303 2.346.04 3.046-.395.742-.461 9.305-6.191 9.92-6.693.614-.502 1.104.141.602.644-.502.502-6.38 6.207-7.155 6.997-.941.959-.273 1.953.358 2.351.721.454 5.906 3.932 6.687 4.49.781.558 1.573.811 2.298.811.725 0 1.107-.955 1.468-2.064z", fill: "currentColor" })] })); +} +//# sourceMappingURL=Telegram.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/Telegram.js.map b/_lib/app/components/icons/Telegram.js.map new file mode 100644 index 00000000..e211ce0d --- /dev/null +++ b/_lib/app/components/icons/Telegram.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Telegram.js","sourceRoot":"","sources":["../../../../app/components/icons/Telegram.tsx"],"names":[],"mappings":";AAAA,MAAM,UAAU,QAAQ;IACtB,OAAO,CACL,eAAK,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,aACpF,uCAAuB,EACvB,eACE,CAAC,EAAC,miBAAmiB,EACriB,IAAI,EAAC,cAAc,GACnB,IACE,CACP,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/icons/Terminal.d.ts b/_lib/app/components/icons/Terminal.d.ts new file mode 100644 index 00000000..90ddb23e --- /dev/null +++ b/_lib/app/components/icons/Terminal.d.ts @@ -0,0 +1,2 @@ +export declare function Terminal(): import("react/jsx-runtime").JSX.Element; +//# sourceMappingURL=Terminal.d.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/Terminal.d.ts.map b/_lib/app/components/icons/Terminal.d.ts.map new file mode 100644 index 00000000..37844964 --- /dev/null +++ b/_lib/app/components/icons/Terminal.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Terminal.d.ts","sourceRoot":"","sources":["../../../../app/components/icons/Terminal.tsx"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,4CAiBvB"} \ No newline at end of file diff --git a/_lib/app/components/icons/Terminal.js b/_lib/app/components/icons/Terminal.js new file mode 100644 index 00000000..fd453243 --- /dev/null +++ b/_lib/app/components/icons/Terminal.js @@ -0,0 +1,5 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +export function Terminal() { + return (_jsxs("svg", { width: "100%", height: "100%", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 79 95", fill: "none", children: [_jsx("title", { children: "Terminal" }), _jsx("path", { fill: "currentColor", d: "M38.281 34.033c0-1.074-.39-2.05-1.22-2.88L6.885 1.171C6.152.39 5.175 0 4.053 0 1.758 0 0 1.709 0 4.004c0 1.074.488 2.1 1.172 2.88l27.295 27.15L1.172 61.181C.488 61.962 0 62.939 0 64.062c0 2.295 1.758 4.004 4.053 4.004 1.123 0 2.1-.39 2.832-1.172l30.176-29.98c.83-.83 1.22-1.807 1.22-2.88Z" }), _jsx("path", { stroke: "currentColor", strokeLinecap: "round", strokeWidth: "8px", d: "M36 75h55" })] })); +} +//# sourceMappingURL=Terminal.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/Terminal.js.map b/_lib/app/components/icons/Terminal.js.map new file mode 100644 index 00000000..19868605 --- /dev/null +++ b/_lib/app/components/icons/Terminal.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Terminal.js","sourceRoot":"","sources":["../../../../app/components/icons/Terminal.tsx"],"names":[],"mappings":";AAAA,MAAM,UAAU,QAAQ;IACtB,OAAO,CACL,eACE,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,MAAM,EACb,KAAK,EAAC,4BAA4B,EAClC,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,aAEX,uCAAuB,EACvB,eACE,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,kSAAkS,GACpS,EACF,eAAM,MAAM,EAAC,cAAc,EAAC,aAAa,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,CAAC,EAAC,WAAW,GAAG,IAChF,CACP,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/icons/Warpcast.d.ts b/_lib/app/components/icons/Warpcast.d.ts new file mode 100644 index 00000000..65e460c7 --- /dev/null +++ b/_lib/app/components/icons/Warpcast.d.ts @@ -0,0 +1,2 @@ +export declare function Warpcast(): import("react/jsx-runtime").JSX.Element; +//# sourceMappingURL=Warpcast.d.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/Warpcast.d.ts.map b/_lib/app/components/icons/Warpcast.d.ts.map new file mode 100644 index 00000000..69098c26 --- /dev/null +++ b/_lib/app/components/icons/Warpcast.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Warpcast.d.ts","sourceRoot":"","sources":["../../../../app/components/icons/Warpcast.tsx"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,4CAYvB"} \ No newline at end of file diff --git a/_lib/app/components/icons/Warpcast.js b/_lib/app/components/icons/Warpcast.js new file mode 100644 index 00000000..dab04d7f --- /dev/null +++ b/_lib/app/components/icons/Warpcast.js @@ -0,0 +1,5 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +export function Warpcast() { + return (_jsxs("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("title", { children: "Warpcast" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.92028 31.9901H24.0698C28.4371 31.9901 31.9901 28.4373 31.9901 24.0699V7.92053C31.9901 3.55319 28.4371 0.000137329 24.0698 0.000137329H7.92028C3.55304 0.000137329 0 3.55319 0 7.92053V24.0699C0 28.4373 3.55304 31.9901 7.92028 31.9901ZM19.4134 16.048L20.9908 10.124H25.1383L21.2924 23.2218H17.7062L15.9951 17.1397L14.284 23.2218H10.7055L6.85115 10.124H10.999L12.5915 16.0916L14.1891 10.124H17.8309L19.4134 16.048Z", fill: "currentColor" })] })); +} +//# sourceMappingURL=Warpcast.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/Warpcast.js.map b/_lib/app/components/icons/Warpcast.js.map new file mode 100644 index 00000000..3425683a --- /dev/null +++ b/_lib/app/components/icons/Warpcast.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Warpcast.js","sourceRoot":"","sources":["../../../../app/components/icons/Warpcast.tsx"],"names":[],"mappings":";AAAA,MAAM,UAAU,QAAQ;IACtB,OAAO,CACL,eAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,aAC5F,uCAAuB,EACvB,eACE,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,+ZAA+Z,EACja,IAAI,EAAC,cAAc,GACnB,IACE,CACP,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/icons/X.d.ts b/_lib/app/components/icons/X.d.ts new file mode 100644 index 00000000..f96e9177 --- /dev/null +++ b/_lib/app/components/icons/X.d.ts @@ -0,0 +1,2 @@ +export declare function X(): import("react/jsx-runtime").JSX.Element; +//# sourceMappingURL=X.d.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/X.d.ts.map b/_lib/app/components/icons/X.d.ts.map new file mode 100644 index 00000000..1d547e9e --- /dev/null +++ b/_lib/app/components/icons/X.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"X.d.ts","sourceRoot":"","sources":["../../../../app/components/icons/X.tsx"],"names":[],"mappings":"AAAA,wBAAgB,CAAC,4CAgBhB"} \ No newline at end of file diff --git a/_lib/app/components/icons/X.js b/_lib/app/components/icons/X.js new file mode 100644 index 00000000..ce7a851d --- /dev/null +++ b/_lib/app/components/icons/X.js @@ -0,0 +1,5 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +export function X() { + return (_jsxs("svg", { width: "100%", height: "100%", viewBox: "0 0 1200 1227", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("title", { children: "X" }), _jsx("path", { d: "M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z", fill: "currentColor" })] })); +} +//# sourceMappingURL=X.js.map \ No newline at end of file diff --git a/_lib/app/components/icons/X.js.map b/_lib/app/components/icons/X.js.map new file mode 100644 index 00000000..9d8abe10 --- /dev/null +++ b/_lib/app/components/icons/X.js.map @@ -0,0 +1 @@ +{"version":3,"file":"X.js","sourceRoot":"","sources":["../../../../app/components/icons/X.tsx"],"names":[],"mappings":";AAAA,MAAM,UAAU,CAAC;IACf,OAAO,CACL,eACE,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,MAAM,EACb,OAAO,EAAC,eAAe,EACvB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,aAElC,gCAAgB,EAChB,eACE,CAAC,EAAC,uSAAuS,EACzS,IAAI,EAAC,cAAc,GACnB,IACE,CACP,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Anchor.css.d.ts b/_lib/app/components/mdx/Anchor.css.d.ts new file mode 100644 index 00000000..186ab2fa --- /dev/null +++ b/_lib/app/components/mdx/Anchor.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=Anchor.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Anchor.css.d.ts.map b/_lib/app/components/mdx/Anchor.css.d.ts.map new file mode 100644 index 00000000..446c5e7e --- /dev/null +++ b/_lib/app/components/mdx/Anchor.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Anchor.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Anchor.css.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,IAAI,QAyCf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Anchor.css.js b/_lib/app/components/mdx/Anchor.css.js new file mode 100644 index 00000000..e576691e --- /dev/null +++ b/_lib/app/components/mdx/Anchor.css.js @@ -0,0 +1,56 @@ +import { globalStyle, style } from '@vanilla-extract/css'; +import { fontWeightVars, semanticColorVars, spaceVars } from '../../styles/vars.css.js'; +import { danger, info, success, tip, warning } from '../Callout.css.js'; +import { root as Section } from './Section.css.js'; +export const root = style({ + color: semanticColorVars.link, + fontWeight: fontWeightVars.medium, + textUnderlineOffset: spaceVars['2'], + textDecoration: 'underline', + transition: 'color 0.1s', + selectors: { + [`${danger} &`]: { + color: semanticColorVars.dangerText, + }, + [`${danger} &:hover`]: { + color: semanticColorVars.dangerTextHover, + }, + [`${info} &`]: { + color: semanticColorVars.infoText, + }, + [`${info} &:hover`]: { + color: semanticColorVars.infoTextHover, + }, + [`${success} &`]: { + color: semanticColorVars.successText, + }, + [`${success} &:hover`]: { + color: semanticColorVars.successTextHover, + }, + [`${tip} &`]: { + color: semanticColorVars.tipText, + }, + [`${tip} &:hover`]: { + color: semanticColorVars.tipTextHover, + }, + [`${warning} &`]: { + color: semanticColorVars.warningText, + }, + [`${warning} &:hover`]: { + color: semanticColorVars.warningTextHover, + }, + '&:hover': { + color: semanticColorVars.linkHover, + }, + }, +}); +globalStyle(`${Section} a.data-footnote-backref`, { + color: semanticColorVars.link, + fontWeight: fontWeightVars.medium, + textUnderlineOffset: spaceVars['2'], + textDecoration: 'underline', +}); +globalStyle(`${Section} a.data-footnote-backref:hover`, { + color: semanticColorVars.linkHover, +}); +//# sourceMappingURL=Anchor.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Anchor.css.js.map b/_lib/app/components/mdx/Anchor.css.js.map new file mode 100644 index 00000000..bf7c7204 --- /dev/null +++ b/_lib/app/components/mdx/Anchor.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Anchor.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/Anchor.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAEzD,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACvF,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AACvE,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAElD,MAAM,CAAC,MAAM,IA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I;IAC7B,UAAU,EAAE,cAAc,CAAC,MAAM;IACjC,mBAAmB,EAAE,SAAS,CAAC,GAAG,CAAC;IACnC,cAAc,EAAE,WAAW;CAC5B,CAAC,CAAA;AAEF,WAAW,CAAC,GAAG,OAAO,gCAAgC,EAAE;IACtD,KAAK,EAAE,iBAAiB,CAAC,SAAS;CACnC,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Anchor.d.ts b/_lib/app/components/mdx/Anchor.d.ts new file mode 100644 index 00000000..7bff26c3 --- /dev/null +++ b/_lib/app/components/mdx/Anchor.d.ts @@ -0,0 +1,9 @@ +import type { ReactNode } from 'react'; +type AnchorProps = { + children: ReactNode; + className?: string; + href?: string; +}; +export declare function Anchor(props: AnchorProps): import("react/jsx-runtime.js").JSX.Element; +export {}; +//# sourceMappingURL=Anchor.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Anchor.d.ts.map b/_lib/app/components/mdx/Anchor.d.ts.map new file mode 100644 index 00000000..5fd37904 --- /dev/null +++ b/_lib/app/components/mdx/Anchor.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Anchor.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Anchor.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAOtC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,8CAoBxC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Anchor.js b/_lib/app/components/mdx/Anchor.js new file mode 100644 index 00000000..dc3dfa1c --- /dev/null +++ b/_lib/app/components/mdx/Anchor.js @@ -0,0 +1,21 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import { useLocation } from 'react-router-dom'; +import { Link } from '../Link.js'; +import * as styles from './Anchor.css.js'; +import { Autolink } from './Autolink.js'; +export function Anchor(props) { + const { children, href } = props; + const { pathname } = useLocation(); + // Heading slug links + if (children && + typeof children === 'object' && + 'props' in children && + children.props['data-autolink-icon']) + return _jsx(Autolink, { className: clsx(props.className, styles.root), ...props }); + // ID links + if (href?.match(/^#/)) + return (_jsx("a", { className: clsx(props.className, styles.root), ...props, href: `${pathname}${href}` })); + return _jsx(Link, { className: clsx(props.className, styles.root), ...props }); +} +//# sourceMappingURL=Anchor.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Anchor.js.map b/_lib/app/components/mdx/Anchor.js.map new file mode 100644 index 00000000..7c295dff --- /dev/null +++ b/_lib/app/components/mdx/Anchor.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Anchor.js","sourceRoot":"","sources":["../../../../app/components/mdx/Anchor.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE3B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AACjC,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAQxC,MAAM,UAAU,MAAM,CAAC,KAAkB;IACvC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,KAAK,CAAA;IAChC,MAAM,EAAE,QAAQ,EAAE,GAAG,WAAW,EAAE,CAAA;IAElC,qBAAqB;IACrB,IACE,QAAQ;QACR,OAAO,QAAQ,KAAK,QAAQ;QAC5B,OAAO,IAAI,QAAQ;QACnB,QAAQ,CAAC,KAAK,CAAC,oBAAoB,CAAC;QAEpC,OAAO,KAAC,QAAQ,IAAC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,KAAM,KAAK,GAAI,CAAA;IAE/E,WAAW;IACX,IAAI,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC;QACnB,OAAO,CACL,YAAG,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,KAAM,KAAK,EAAE,IAAI,EAAE,GAAG,QAAQ,GAAG,IAAI,EAAE,GAAI,CAC5F,CAAA;IAEH,OAAO,KAAC,IAAI,IAAC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,KAAM,KAAK,GAAI,CAAA;AAC3E,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Aside.css.d.ts b/_lib/app/components/mdx/Aside.css.d.ts new file mode 100644 index 00000000..9a4b3517 --- /dev/null +++ b/_lib/app/components/mdx/Aside.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=Aside.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Aside.css.d.ts.map b/_lib/app/components/mdx/Aside.css.d.ts.map new file mode 100644 index 00000000..a77ffee2 --- /dev/null +++ b/_lib/app/components/mdx/Aside.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Aside.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Aside.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,QAAY,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Aside.css.js b/_lib/app/components/mdx/Aside.css.js new file mode 100644 index 00000000..1aa9cd2f --- /dev/null +++ b/_lib/app/components/mdx/Aside.css.js @@ -0,0 +1,3 @@ +import { style } from '@vanilla-extract/css'; +export const root = style({}); +//# sourceMappingURL=Aside.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Aside.css.js.map b/_lib/app/components/mdx/Aside.css.js.map new file mode 100644 index 00000000..f67e00ba --- /dev/null +++ b/_lib/app/components/mdx/Aside.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Aside.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/Aside.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE5C,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC,EAAE,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Aside.d.ts b/_lib/app/components/mdx/Aside.d.ts new file mode 100644 index 00000000..ad171caf --- /dev/null +++ b/_lib/app/components/mdx/Aside.d.ts @@ -0,0 +1,3 @@ +import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; +export declare function Aside(props: DetailedHTMLProps, HTMLElement>): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=Aside.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Aside.d.ts.map b/_lib/app/components/mdx/Aside.d.ts.map new file mode 100644 index 00000000..1d1532d1 --- /dev/null +++ b/_lib/app/components/mdx/Aside.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Aside.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Aside.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAKnE,wBAAgB,KAAK,CAAC,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,8CASvF"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Aside.js b/_lib/app/components/mdx/Aside.js new file mode 100644 index 00000000..a61f4d19 --- /dev/null +++ b/_lib/app/components/mdx/Aside.js @@ -0,0 +1,12 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import { Callout } from '../Callout.js'; +import * as styles from './Aside.css.js'; +export function Aside(props) { + const className = clsx(props.className, styles.root); + if ('data-callout' in props) + return (_jsx(Callout, { className: className, type: props['data-callout'], children: props.children })); + return _jsx("aside", { ...props, className: className }); +} +//# sourceMappingURL=Aside.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Aside.js.map b/_lib/app/components/mdx/Aside.js.map new file mode 100644 index 00000000..3ce4b759 --- /dev/null +++ b/_lib/app/components/mdx/Aside.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Aside.js","sourceRoot":"","sources":["../../../../app/components/mdx/Aside.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA+C,MAAM,OAAO,CAAA;AAEnE,OAAO,EAAE,OAAO,EAAqB,MAAM,eAAe,CAAA;AAC1D,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAA;AAExC,MAAM,UAAU,KAAK,CAAC,KAAkE;IACtF,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;IACpD,IAAI,cAAc,IAAI,KAAK;QACzB,OAAO,CACL,KAAC,OAAO,IAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,CAAC,cAAc,CAAyB,YAC/E,KAAK,CAAC,QAAQ,GACP,CACX,CAAA;IACH,OAAO,mBAAW,KAAK,EAAE,SAAS,EAAE,SAAS,GAAI,CAAA;AACnD,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Autolink.css.d.ts b/_lib/app/components/mdx/Autolink.css.d.ts new file mode 100644 index 00000000..9519f6a7 --- /dev/null +++ b/_lib/app/components/mdx/Autolink.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=Autolink.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Autolink.css.d.ts.map b/_lib/app/components/mdx/Autolink.css.d.ts.map new file mode 100644 index 00000000..6b0b8e71 --- /dev/null +++ b/_lib/app/components/mdx/Autolink.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Autolink.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Autolink.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,QAYf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Autolink.css.js b/_lib/app/components/mdx/Autolink.css.js new file mode 100644 index 00000000..52ee8be2 --- /dev/null +++ b/_lib/app/components/mdx/Autolink.css.js @@ -0,0 +1,16 @@ +import { style } from '@vanilla-extract/css'; +import { root as Heading } from './Heading.css.js'; +export const root = style({ + opacity: 0, + marginTop: '0.1em', + position: 'absolute', + transition: 'opacity 0.1s, transform 0.1s,', + transform: 'translateX(-2px) scale(0.98)', + selectors: { + [`${Heading}:hover &`]: { + opacity: 1, + transform: 'translateX(0) scale(1)', + }, + }, +}); +//# sourceMappingURL=Autolink.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Autolink.css.js.map b/_lib/app/components/mdx/Autolink.css.js.map new file mode 100644 index 00000000..ed710f78 --- /dev/null +++ b/_lib/app/components/mdx/Autolink.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Autolink.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/Autolink.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE5C,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAElD,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,OAAO,EAAE,CAAC;IACV,SAAS,EAAE,OAAO;IAClB,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,+BAA+B;IAC3C,SAAS,EAAE,8BAA8B;IACzC,SAAS,EAAE;QACT,CAAC,GAAG,OAAO,UAAU,CAAC,EAAE;YACtB,OAAO,EAAE,CAAC;YACV,SAAS,EAAE,wBAAwB;SACpC;KACF;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Autolink.d.ts b/_lib/app/components/mdx/Autolink.d.ts new file mode 100644 index 00000000..269b1126 --- /dev/null +++ b/_lib/app/components/mdx/Autolink.d.ts @@ -0,0 +1,3 @@ +import { type AnchorHTMLAttributes, type DetailedHTMLProps } from 'react'; +export declare function Autolink(props: Omit, HTMLAnchorElement>, 'ref'>): import("react/jsx-runtime.js").JSX.Element | null; +//# sourceMappingURL=Autolink.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Autolink.d.ts.map b/_lib/app/components/mdx/Autolink.d.ts.map new file mode 100644 index 00000000..fbe87287 --- /dev/null +++ b/_lib/app/components/mdx/Autolink.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Autolink.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Autolink.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,oBAAoB,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAKzE,wBAAgB,QAAQ,CACtB,KAAK,EAAE,IAAI,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC,EAAE,KAAK,CAAC,qDAIlG"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Autolink.js b/_lib/app/components/mdx/Autolink.js new file mode 100644 index 00000000..206b5afc --- /dev/null +++ b/_lib/app/components/mdx/Autolink.js @@ -0,0 +1,11 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import { Link } from 'react-router-dom'; +import * as styles from './Autolink.css.js'; +export function Autolink(props) { + if (!props.href) + return null; + return _jsx(Link, { ...props, className: clsx(props.className, styles.root), to: props.href }); +} +//# sourceMappingURL=Autolink.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Autolink.js.map b/_lib/app/components/mdx/Autolink.js.map new file mode 100644 index 00000000..b1a8f01a --- /dev/null +++ b/_lib/app/components/mdx/Autolink.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Autolink.js","sourceRoot":"","sources":["../../../../app/components/mdx/Autolink.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAqD,MAAM,OAAO,CAAA;AACzE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAEvC,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAA;AAE3C,MAAM,UAAU,QAAQ,CACtB,KAAiG;IAEjG,IAAI,CAAC,KAAK,CAAC,IAAI;QAAE,OAAO,IAAI,CAAA;IAC5B,OAAO,KAAC,IAAI,OAAK,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,KAAK,CAAC,IAAI,GAAI,CAAA;AAC3F,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/AutolinkIcon.css.d.ts b/_lib/app/components/mdx/AutolinkIcon.css.d.ts new file mode 100644 index 00000000..d1f985df --- /dev/null +++ b/_lib/app/components/mdx/AutolinkIcon.css.d.ts @@ -0,0 +1,3 @@ +export declare const iconUrl: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; +export declare const root: string; +//# sourceMappingURL=AutolinkIcon.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/AutolinkIcon.css.d.ts.map b/_lib/app/components/mdx/AutolinkIcon.css.d.ts.map new file mode 100644 index 00000000..1eef0a02 --- /dev/null +++ b/_lib/app/components/mdx/AutolinkIcon.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"AutolinkIcon.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/AutolinkIcon.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,OAAO,oFAAuB,CAAA;AAE3C,eAAO,MAAM,IAAI,QAaf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/AutolinkIcon.css.js b/_lib/app/components/mdx/AutolinkIcon.css.js new file mode 100644 index 00000000..e34b2318 --- /dev/null +++ b/_lib/app/components/mdx/AutolinkIcon.css.js @@ -0,0 +1,19 @@ +import { createVar, style } from '@vanilla-extract/css'; +import { primitiveColorVars } from '../../styles/vars.css.js'; +import { root as Autolink } from './Autolink.css.js'; +export const iconUrl = createVar('iconUrl'); +export const root = style({ + backgroundColor: primitiveColorVars.textAccent, + display: 'inline-block', + marginLeft: '0.25em', + height: '0.8em', + width: '0.8em', + mask: `${iconUrl} no-repeat center / contain`, + transition: 'background-color 0.1s', + selectors: { + [`${Autolink}:hover &`]: { + backgroundColor: primitiveColorVars.textAccentHover, + }, + }, +}); +//# sourceMappingURL=AutolinkIcon.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/AutolinkIcon.css.js.map b/_lib/app/components/mdx/AutolinkIcon.css.js.map new file mode 100644 index 00000000..e1d92f03 --- /dev/null +++ b/_lib/app/components/mdx/AutolinkIcon.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AutolinkIcon.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/AutolinkIcon.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAEvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAEpD,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC,SAAS,CAAC,CAAA;AAE3C,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,eAAe,EAAE,kBAAkB,CAAC,UAAU;IAC9C,OAAO,EAAE,cAAc;IACvB,UAAU,EAAE,QAAQ;IACpB,MAAM,EAAE,OAAO;IACf,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,GAAG,OAAO,6BAA6B;IAC7C,UAAU,EAAE,uBAAuB;IACnC,SAAS,EAAE;QACT,CAAC,GAAG,QAAQ,UAAU,CAAC,EAAE;YACvB,eAAe,EAAE,kBAAkB,CAAC,eAAe;SACpD;KACF;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/AutolinkIcon.d.ts b/_lib/app/components/mdx/AutolinkIcon.d.ts new file mode 100644 index 00000000..975c45f6 --- /dev/null +++ b/_lib/app/components/mdx/AutolinkIcon.d.ts @@ -0,0 +1,3 @@ +import { type DetailedHTMLProps, type ImgHTMLAttributes } from 'react'; +export declare function AutolinkIcon(props: DetailedHTMLProps, HTMLImageElement>): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=AutolinkIcon.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/AutolinkIcon.d.ts.map b/_lib/app/components/mdx/AutolinkIcon.d.ts.map new file mode 100644 index 00000000..8a6cf520 --- /dev/null +++ b/_lib/app/components/mdx/AutolinkIcon.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"AutolinkIcon.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/AutolinkIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAKtE,wBAAgB,YAAY,CAC1B,KAAK,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,8CAahF"} \ No newline at end of file diff --git a/_lib/app/components/mdx/AutolinkIcon.js b/_lib/app/components/mdx/AutolinkIcon.js new file mode 100644 index 00000000..1117fb27 --- /dev/null +++ b/_lib/app/components/mdx/AutolinkIcon.js @@ -0,0 +1,14 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { assignInlineVars } from '@vanilla-extract/dynamic'; +import { clsx } from 'clsx'; +import {} from 'react'; +import { useConfig } from '../../hooks/useConfig.js'; +import * as styles from './AutolinkIcon.css.js'; +export function AutolinkIcon(props) { + const { basePath } = useConfig(); + const assetBasePath = import.meta.env.PROD ? basePath : ''; + return (_jsx("div", { ...props, className: clsx(props.className, styles.root), style: assignInlineVars({ + [styles.iconUrl]: `url(${assetBasePath}/.vocs/icons/link.svg)`, + }) })); +} +//# sourceMappingURL=AutolinkIcon.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/AutolinkIcon.js.map b/_lib/app/components/mdx/AutolinkIcon.js.map new file mode 100644 index 00000000..1f732779 --- /dev/null +++ b/_lib/app/components/mdx/AutolinkIcon.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AutolinkIcon.js","sourceRoot":"","sources":["../../../../app/components/mdx/AutolinkIcon.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAkD,MAAM,OAAO,CAAA;AAEtE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAA;AAE/C,MAAM,UAAU,YAAY,CAC1B,KAA+E;IAE/E,MAAM,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAE,CAAA;IAChC,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAA;IAC1D,OAAO,CACL,iBACM,KAAK,EACT,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,EAC7C,KAAK,EAAE,gBAAgB,CAAC;YACtB,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO,aAAa,wBAAwB;SAC/D,CAAC,GACF,CACH,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Blockquote.css.d.ts b/_lib/app/components/mdx/Blockquote.css.d.ts new file mode 100644 index 00000000..8e0be6ac --- /dev/null +++ b/_lib/app/components/mdx/Blockquote.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=Blockquote.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Blockquote.css.d.ts.map b/_lib/app/components/mdx/Blockquote.css.d.ts.map new file mode 100644 index 00000000..87ff3b2d --- /dev/null +++ b/_lib/app/components/mdx/Blockquote.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Blockquote.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Blockquote.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,QAIf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Blockquote.css.js b/_lib/app/components/mdx/Blockquote.css.js new file mode 100644 index 00000000..7b45cf59 --- /dev/null +++ b/_lib/app/components/mdx/Blockquote.css.js @@ -0,0 +1,8 @@ +import { style } from '@vanilla-extract/css'; +import { semanticColorVars, spaceVars } from '../../styles/vars.css.js'; +export const root = style({ + borderLeft: `2px solid ${semanticColorVars.blockquoteBorder}`, + paddingLeft: spaceVars['16'], + marginBottom: spaceVars['16'], +}); +//# sourceMappingURL=Blockquote.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Blockquote.css.js.map b/_lib/app/components/mdx/Blockquote.css.js.map new file mode 100644 index 00000000..966a8c8a --- /dev/null +++ b/_lib/app/components/mdx/Blockquote.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Blockquote.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/Blockquote.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE5C,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAEvE,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,UAAU,EAAE,aAAa,iBAAiB,CAAC,gBAAgB,EAAE;IAC7D,WAAW,EAAE,SAAS,CAAC,IAAI,CAAC;IAC5B,YAAY,EAAE,SAAS,CAAC,IAAI,CAAC;CAC9B,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Blockquote.d.ts b/_lib/app/components/mdx/Blockquote.d.ts new file mode 100644 index 00000000..50f704ef --- /dev/null +++ b/_lib/app/components/mdx/Blockquote.d.ts @@ -0,0 +1,3 @@ +import { type BlockquoteHTMLAttributes, type DetailedHTMLProps } from 'react'; +export declare function Blockquote(props: DetailedHTMLProps, HTMLQuoteElement>): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=Blockquote.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Blockquote.d.ts.map b/_lib/app/components/mdx/Blockquote.d.ts.map new file mode 100644 index 00000000..deb069bf --- /dev/null +++ b/_lib/app/components/mdx/Blockquote.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Blockquote.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Blockquote.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,wBAAwB,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAI7E,wBAAgB,UAAU,CACxB,KAAK,EAAE,iBAAiB,CAAC,wBAAwB,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,8CAGvF"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Blockquote.js b/_lib/app/components/mdx/Blockquote.js new file mode 100644 index 00000000..d24ebbaf --- /dev/null +++ b/_lib/app/components/mdx/Blockquote.js @@ -0,0 +1,8 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import * as styles from './Blockquote.css.js'; +export function Blockquote(props) { + return _jsx("blockquote", { ...props, className: clsx(props.className, styles.root) }); +} +//# sourceMappingURL=Blockquote.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Blockquote.js.map b/_lib/app/components/mdx/Blockquote.js.map new file mode 100644 index 00000000..eb46dfd0 --- /dev/null +++ b/_lib/app/components/mdx/Blockquote.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Blockquote.js","sourceRoot":"","sources":["../../../../app/components/mdx/Blockquote.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAyD,MAAM,OAAO,CAAA;AAE7E,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAA;AAE7C,MAAM,UAAU,UAAU,CACxB,KAAsF;IAEtF,OAAO,wBAAgB,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,GAAI,CAAA;AACjF,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Code.css.d.ts b/_lib/app/components/mdx/Code.css.d.ts new file mode 100644 index 00000000..0158a962 --- /dev/null +++ b/_lib/app/components/mdx/Code.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=Code.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Code.css.d.ts.map b/_lib/app/components/mdx/Code.css.d.ts.map new file mode 100644 index 00000000..733aff9c --- /dev/null +++ b/_lib/app/components/mdx/Code.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Code.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Code.css.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,IAAI,QA+Cf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Code.css.js b/_lib/app/components/mdx/Code.css.js new file mode 100644 index 00000000..5e91f642 --- /dev/null +++ b/_lib/app/components/mdx/Code.css.js @@ -0,0 +1,55 @@ +import { style } from '@vanilla-extract/css'; +import { borderRadiusVars, fontSizeVars, semanticColorVars, spaceVars, } from '../../styles/vars.css.js'; +import { danger, info, success, tip, warning } from '../Callout.css.js'; +import { root as Anchor } from './Anchor.css.js'; +import { root as Heading } from './Heading.css.js'; +import { root as Pre } from './Pre.css.js'; +export const root = style({ + transition: 'color 0.1s', + selectors: { + [`:not(${Pre})>&`]: { + backgroundColor: semanticColorVars.codeInlineBackground, + border: `1px solid ${semanticColorVars.codeInlineBorder}`, + borderRadius: borderRadiusVars['4'], + color: semanticColorVars.codeInlineText, + fontSize: fontSizeVars.code, + padding: `${spaceVars['3']} ${spaceVars['6']}`, + }, + [`${Anchor}>&`]: { + color: semanticColorVars.link, + textDecoration: 'underline', + textUnderlineOffset: spaceVars['2'], + }, + [`${Anchor}:hover>&`]: { + color: semanticColorVars.linkHover, + }, + [`${danger} &`]: { + color: semanticColorVars.dangerText, + }, + [`${info} &`]: { + color: semanticColorVars.infoText, + }, + [`${success} &`]: { + color: semanticColorVars.successText, + }, + [`${tip} &`]: { + color: semanticColorVars.tipText, + }, + [`${warning} &`]: { + color: semanticColorVars.warningText, + }, + [`${Heading} &`]: { + color: 'inherit', + }, + '.twoslash-popup-info-hover>&': { + backgroundColor: 'inherit', + padding: 0, + // @ts-expect-error + textWrap: 'wrap', + }, + '.twoslash-popup-jsdoc &': { + display: 'inline', + }, + }, +}); +//# sourceMappingURL=Code.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Code.css.js.map b/_lib/app/components/mdx/Code.css.js.map new file mode 100644 index 00000000..a6d1453d --- /dev/null +++ b/_lib/app/components/mdx/Code.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Code.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/Code.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE5C,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,SAAS,GACV,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AACvE,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,IAAI,IAAI,GAAG,EAAE,MAAM,cAAc,CAAA;AAE1C,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,UAAU,EAAE,YAAY;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EAAE;YACzB,OAAO,EAAE,QAAQ;SAClB;KACF;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Code.d.ts b/_lib/app/components/mdx/Code.d.ts new file mode 100644 index 00000000..1267dedd --- /dev/null +++ b/_lib/app/components/mdx/Code.d.ts @@ -0,0 +1,3 @@ +import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; +export declare function Code(props: DetailedHTMLProps, HTMLElement>): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=Code.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Code.d.ts.map b/_lib/app/components/mdx/Code.d.ts.map new file mode 100644 index 00000000..6884497c --- /dev/null +++ b/_lib/app/components/mdx/Code.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Code.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Code.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAInE,wBAAgB,IAAI,CAAC,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,8CAOtF"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Code.js b/_lib/app/components/mdx/Code.js new file mode 100644 index 00000000..026040d1 --- /dev/null +++ b/_lib/app/components/mdx/Code.js @@ -0,0 +1,22 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import * as styles from './Code.css.js'; +export function Code(props) { + const children = filterEmptyLines(props.children); + return (_jsx("code", { ...props, className: clsx(props.className, styles.root), children: children })); +} +function filterEmptyLines(nodes) { + if (!Array.isArray(nodes)) + return nodes; + return nodes + .map((child, index) => child.props && + 'data-line' in child.props && + typeof child.props.children === 'string' && + child.props.children.trim() === '' && + nodes[index + 1]?.props?.className?.includes('twoslash-tag-line') + ? null + : child) + .filter(Boolean); +} +//# sourceMappingURL=Code.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Code.js.map b/_lib/app/components/mdx/Code.js.map new file mode 100644 index 00000000..00119cd4 --- /dev/null +++ b/_lib/app/components/mdx/Code.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Code.js","sourceRoot":"","sources":["../../../../app/components/mdx/Code.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA+C,MAAM,OAAO,CAAA;AAEnE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,MAAM,UAAU,IAAI,CAAC,KAAkE;IACrF,MAAM,QAAQ,GAAG,gBAAgB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;IACjD,OAAO,CACL,kBAAU,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,YAC3D,QAAQ,GACJ,CACR,CAAA;AACH,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAsB;IAC9C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAA;IACvC,OAAO,KAAK;SACT,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CACpB,KAAK,CAAC,KAAK;QACX,WAAW,IAAI,KAAK,CAAC,KAAK;QAC1B,OAAO,KAAK,CAAC,KAAK,CAAC,QAAQ,KAAK,QAAQ;QACxC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE;QAClC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC,mBAAmB,CAAC;QAC/D,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,KAAK,CACV;SACA,MAAM,CAAC,OAAO,CAAC,CAAA;AACpB,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/CodeBlock.css.d.ts b/_lib/app/components/mdx/CodeBlock.css.d.ts new file mode 100644 index 00000000..42fad8ec --- /dev/null +++ b/_lib/app/components/mdx/CodeBlock.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=CodeBlock.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/CodeBlock.css.d.ts.map b/_lib/app/components/mdx/CodeBlock.css.d.ts.map new file mode 100644 index 00000000..165bf755 --- /dev/null +++ b/_lib/app/components/mdx/CodeBlock.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"CodeBlock.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/CodeBlock.css.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,IAAI,QAmBf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/CodeBlock.css.js b/_lib/app/components/mdx/CodeBlock.css.js new file mode 100644 index 00000000..0df5150a --- /dev/null +++ b/_lib/app/components/mdx/CodeBlock.css.js @@ -0,0 +1,145 @@ +import { globalStyle, style } from '@vanilla-extract/css'; +import { borderRadiusVars, fontSizeVars, lineHeightVars, primitiveColorVars, semanticColorVars, spaceVars, viewportVars, } from '../../styles/vars.css.js'; +import { root as Callout } from '../Callout.css.js'; +import { root as Tabs } from '../Tabs.css.js'; +export const root = style({ + border: `1px solid ${semanticColorVars.codeInlineBorder}`, + borderRadius: borderRadiusVars['4'], + '@media': { + [viewportVars['max-720px']]: { + borderRadius: 0, + borderRight: 'none', + borderLeft: 'none', + marginLeft: `calc(-1 * ${spaceVars['16']})`, + marginRight: `calc(-1 * ${spaceVars['16']})`, + }, + }, + selectors: { + [`${Tabs} &, ${Callout} &`]: { + border: 'none', + marginLeft: 'unset', + marginRight: 'unset', + }, + }, +}); +globalStyle(`${root} code`, { + display: 'grid', + fontSize: fontSizeVars.codeBlock, +}); +globalStyle(`${Callout} ${root} code`, { + fontSize: fontSizeVars.calloutCodeBlock, +}); +globalStyle(`${root} pre`, { + backgroundColor: semanticColorVars.codeBlockBackground, + borderRadius: borderRadiusVars['4'], + overflowX: 'auto', + padding: `${spaceVars['20']} ${spaceVars['0']}`, + '@media': { + [viewportVars['max-720px']]: { + borderRadius: 0, + }, + }, +}); +globalStyle(`${Callout} ${root} pre`, { + backgroundColor: `color-mix(in srgb, ${semanticColorVars.codeBlockBackground} 65%, transparent) !important`, + border: `1px solid ${semanticColorVars.codeInlineBorder}`, + borderRadius: borderRadiusVars['4'], + padding: `${spaceVars['12']} ${spaceVars['0']}`, +}); +globalStyle(`${root} .line`, { + borderLeft: '2px solid transparent', + padding: `${spaceVars['0']} ${spaceVars['22']}`, + lineHeight: lineHeightVars.code, +}); +globalStyle(`${Callout} ${root} .line`, { + padding: `${spaceVars['0']} ${spaceVars['12']}`, +}); +globalStyle(`${root} .twoslash-popup-info .line`, { + padding: `${spaceVars['0']} ${spaceVars['4']}`, +}); +globalStyle(`${root} .twoslash-popup-info-hover .line`, { + display: 'inline-block', + padding: `${spaceVars['0']} ${spaceVars['8']}`, +}); +globalStyle(`${root} .twoslash-error-line, ${root} .twoslash-tag-line`, { + padding: `${spaceVars['0']} ${spaceVars['22']}`, +}); +globalStyle(`${root} [data-line-numbers]`, { + counterReset: 'line', +}); +globalStyle(`${root} [data-line-numbers] > .line`, { + padding: `${spaceVars['0']} ${spaceVars['16']}`, +}); +globalStyle(`${root} [data-line-numbers] > .line::before`, { + color: semanticColorVars.lineNumber, + content: 'counter(line)', + display: 'inline-block', + fontSize: fontSizeVars.lineNumber, + marginRight: spaceVars['16'], + textAlign: 'right', + width: '1rem', +}); +globalStyle(`${root} [data-line-numbers] > .line:not(.diff.remove + .diff.add)::before`, { + counterIncrement: 'line', +}); +globalStyle(`${root} [data-line-numbers] > .line.diff::after`, { + marginLeft: `calc(-1 * ${spaceVars['4']})`, +}); +globalStyle(`${root} .highlighted`, { + backgroundColor: semanticColorVars.codeHighlightBackground, + borderLeft: `2px solid ${semanticColorVars.codeHighlightBorder}`, + boxSizing: 'content-box', +}); +globalStyle(`${root} .highlighted-word`, { + borderRadius: borderRadiusVars['2'], + backgroundColor: `${semanticColorVars.codeCharacterHighlightBackground} !important`, + boxShadow: `0 0 0 4px ${semanticColorVars.codeCharacterHighlightBackground}`, +}); +globalStyle(`${root} .has-diff`, { + position: 'relative', +}); +globalStyle(`${root} .line.diff::after`, { + position: 'absolute', + left: spaceVars['8'], +}); +globalStyle(`${root} .line.diff.add`, { + backgroundColor: primitiveColorVars.backgroundGreenTint2, +}); +globalStyle(`${root} .line.diff.add::after`, { + content: '+', + color: primitiveColorVars.textGreen, +}); +globalStyle(`${root} .line.diff.remove`, { + backgroundColor: primitiveColorVars.backgroundRedTint2, + opacity: '0.6', +}); +globalStyle(`${root} .line.diff.remove > span`, { + filter: 'grayscale(1)', +}); +globalStyle(`${root} .line.diff.remove::after`, { + content: '-', + color: primitiveColorVars.textRed, +}); +globalStyle(`${root} .has-focused > code > .line:not(.focused), ${root} .has-focused > code > .twoslash-meta-line:not(.focused)`, { + opacity: '0.3', + transition: 'opacity 0.2s', +}); +globalStyle(`${root}:hover .has-focused .line:not(.focused), ${root}:hover .has-focused .twoslash-meta-line:not(.focused)`, { + opacity: '1', + transition: 'opacity 0.2s', +}); +globalStyle(`${root} .line, ${root} .twoslash-error-line, ${root} .twoslash-tag-line`, { + '@media': { + [viewportVars['max-720px']]: { + padding: `0 ${spaceVars['16']}`, + }, + }, +}); +globalStyle(`${root} .line.diff::after`, { + '@media': { + [viewportVars['max-720px']]: { + left: spaceVars['6'], + }, + }, +}); +//# sourceMappingURL=CodeBlock.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/CodeBlock.css.js.map b/_lib/app/components/mdx/CodeBlock.css.js.map new file mode 100644 index 00000000..5d5ba9ba --- /dev/null +++ b/_lib/app/components/mdx/CodeBlock.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CodeBlock.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/CodeBlock.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,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KACF;CACF,CAAC,CAAA;AAEF,WAAW,CAAC,GAAG,IAAI,oBAAoB,EAAE;IACvC,QAAQ,EAAE;QACR,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,EAAE;YAC3B,IAAI,EAAE,SAAS,CAAC,GAAG,CAAC;SACrB;KACF;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/CodeBlock.d.ts b/_lib/app/components/mdx/CodeBlock.d.ts new file mode 100644 index 00000000..ea281f8d --- /dev/null +++ b/_lib/app/components/mdx/CodeBlock.d.ts @@ -0,0 +1,3 @@ +import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; +export declare function CodeBlock(props: DetailedHTMLProps, HTMLDivElement>): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=CodeBlock.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/CodeBlock.d.ts.map b/_lib/app/components/mdx/CodeBlock.d.ts.map new file mode 100644 index 00000000..fbbaf124 --- /dev/null +++ b/_lib/app/components/mdx/CodeBlock.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"CodeBlock.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/CodeBlock.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAInE,wBAAgB,SAAS,CACvB,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC,8CAGzE"} \ No newline at end of file diff --git a/_lib/app/components/mdx/CodeBlock.js b/_lib/app/components/mdx/CodeBlock.js new file mode 100644 index 00000000..90ad9cfd --- /dev/null +++ b/_lib/app/components/mdx/CodeBlock.js @@ -0,0 +1,8 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import * as styles from './CodeBlock.css.js'; +export function CodeBlock(props) { + return _jsx("div", { ...props, className: clsx(props.className, styles.root) }); +} +//# sourceMappingURL=CodeBlock.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/CodeBlock.js.map b/_lib/app/components/mdx/CodeBlock.js.map new file mode 100644 index 00000000..338bf9fa --- /dev/null +++ b/_lib/app/components/mdx/CodeBlock.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CodeBlock.js","sourceRoot":"","sources":["../../../../app/components/mdx/CodeBlock.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA+C,MAAM,OAAO,CAAA;AAEnE,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAA;AAE5C,MAAM,UAAU,SAAS,CACvB,KAAwE;IAExE,OAAO,iBAAS,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,GAAI,CAAA;AAC1E,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/CodeGroup.css.d.ts b/_lib/app/components/mdx/CodeGroup.css.d.ts new file mode 100644 index 00000000..e18740f6 --- /dev/null +++ b/_lib/app/components/mdx/CodeGroup.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=CodeGroup.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/CodeGroup.css.d.ts.map b/_lib/app/components/mdx/CodeGroup.css.d.ts.map new file mode 100644 index 00000000..aadc3689 --- /dev/null +++ b/_lib/app/components/mdx/CodeGroup.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"CodeGroup.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/CodeGroup.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,QAUf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/CodeGroup.css.js b/_lib/app/components/mdx/CodeGroup.css.js new file mode 100644 index 00000000..8573b796 --- /dev/null +++ b/_lib/app/components/mdx/CodeGroup.css.js @@ -0,0 +1,14 @@ +import { style } from '@vanilla-extract/css'; +import { spaceVars, viewportVars } from '../../styles/vars.css.js'; +export const root = style({ + '@media': { + [viewportVars['max-720px']]: { + borderRadius: 0, + borderRight: 'none', + borderLeft: 'none', + marginLeft: `calc(-1 * ${spaceVars['16']})`, + marginRight: `calc(-1 * ${spaceVars['16']})`, + }, + }, +}); +//# sourceMappingURL=CodeGroup.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/CodeGroup.css.js.map b/_lib/app/components/mdx/CodeGroup.css.js.map new file mode 100644 index 00000000..41dfa731 --- /dev/null +++ b/_lib/app/components/mdx/CodeGroup.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CodeGroup.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/CodeGroup.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE5C,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAElE,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,QAAQ,EAAE;QACR,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,EAAE;YAC3B,YAAY,EAAE,CAAC;YACf,WAAW,EAAE,MAAM;YACnB,UAAU,EAAE,MAAM;YAClB,UAAU,EAAE,aAAa,SAAS,CAAC,IAAI,CAAC,GAAG;YAC3C,WAAW,EAAE,aAAa,SAAS,CAAC,IAAI,CAAC,GAAG;SAC7C;KACF;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/CodeGroup.d.ts b/_lib/app/components/mdx/CodeGroup.d.ts new file mode 100644 index 00000000..5c0092ed --- /dev/null +++ b/_lib/app/components/mdx/CodeGroup.d.ts @@ -0,0 +1,5 @@ +import type { ReactElement } from 'react'; +export declare function CodeGroup({ children }: { + children: ReactElement[]; +}): import("react/jsx-runtime.js").JSX.Element | null; +//# sourceMappingURL=CodeGroup.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/CodeGroup.d.ts.map b/_lib/app/components/mdx/CodeGroup.d.ts.map new file mode 100644 index 00000000..82ddd0e6 --- /dev/null +++ b/_lib/app/components/mdx/CodeGroup.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"CodeGroup.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/CodeGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAKzC,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,YAAY,EAAE,CAAA;CAAE,qDAgCnE"} \ No newline at end of file diff --git a/_lib/app/components/mdx/CodeGroup.js b/_lib/app/components/mdx/CodeGroup.js new file mode 100644 index 00000000..1fda07e0 --- /dev/null +++ b/_lib/app/components/mdx/CodeGroup.js @@ -0,0 +1,19 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +import * as Tabs from '../Tabs.js'; +import * as styles from './CodeGroup.css.js'; +export function CodeGroup({ children }) { + if (!Array.isArray(children)) + return null; + const tabs = children.map((child_) => { + const child = child_.props['data-title'] ? child_ : child_.props.children; + const { props } = child; + const title = props['data-title']; + const content = props.children; + return { title, content }; + }); + return (_jsxs(Tabs.Root, { className: styles.root, defaultValue: tabs[0].title, children: [_jsx(Tabs.List, { "aria-label": "Code group", children: tabs.map(({ title }, i) => (_jsx(Tabs.Trigger, { value: title || i.toString(), children: title }, title || i.toString()))) }), tabs.map(({ title, content }, i) => { + const isShiki = content.props?.className?.includes('shiki'); + return (_jsx(Tabs.Content, { "data-shiki": isShiki, value: title || i.toString(), children: content }, title || i.toString())); + })] })); +} +//# sourceMappingURL=CodeGroup.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/CodeGroup.js.map b/_lib/app/components/mdx/CodeGroup.js.map new file mode 100644 index 00000000..359bea20 --- /dev/null +++ b/_lib/app/components/mdx/CodeGroup.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CodeGroup.js","sourceRoot":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AAM,OAAO,GAAG,OAAO,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;gBAC3D,OAAO,CACL,KAAC,IAAI,CAAC,OAAO,kBAEC,OAAO,EACnB,KAAK,EAAE,KAAK,IAAI,CAAC,CAAC,QAAQ,EAAE,YAE3B,OAAO,IAJH,KAAK,IAAI,CAAC,CAAC,QAAQ,EAAE,CAKb,CAChB,CAAA;YACH,CAAC,CAAC,IACQ,CACb,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/CodeTitle.css.d.ts b/_lib/app/components/mdx/CodeTitle.css.d.ts new file mode 100644 index 00000000..bd1ae65c --- /dev/null +++ b/_lib/app/components/mdx/CodeTitle.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=CodeTitle.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/CodeTitle.css.d.ts.map b/_lib/app/components/mdx/CodeTitle.css.d.ts.map new file mode 100644 index 00000000..699ec8f8 --- /dev/null +++ b/_lib/app/components/mdx/CodeTitle.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"CodeTitle.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/CodeTitle.css.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,IAAI,QAsBf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/CodeTitle.css.js b/_lib/app/components/mdx/CodeTitle.css.js new file mode 100644 index 00000000..e02deea7 --- /dev/null +++ b/_lib/app/components/mdx/CodeTitle.css.js @@ -0,0 +1,27 @@ +import { style } from '@vanilla-extract/css'; +import { fontSizeVars, fontWeightVars, primitiveColorVars, semanticColorVars, spaceVars, viewportVars, } from '../../styles/vars.css.js'; +import { root as CodeGroup } from './CodeGroup.css.js'; +export const root = style({ + alignItems: 'center', + backgroundColor: semanticColorVars.codeTitleBackground, + borderBottom: `1px solid ${primitiveColorVars.border}`, + color: primitiveColorVars.text3, + display: 'flex', + fontSize: fontSizeVars['14'], + fontWeight: fontWeightVars.medium, + gap: spaceVars['6'], + padding: `${spaceVars['8']} ${spaceVars['24']}`, + '@media': { + [viewportVars['max-720px']]: { + borderRadius: 0, + paddingLeft: spaceVars['16'], + paddingRight: spaceVars['16'], + }, + }, + selectors: { + [`${CodeGroup} &`]: { + display: 'none', + }, + }, +}); +//# sourceMappingURL=CodeTitle.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/CodeTitle.css.js.map b/_lib/app/components/mdx/CodeTitle.css.js.map new file mode 100644 index 00000000..c0fc4c70 --- /dev/null +++ b/_lib/app/components/mdx/CodeTitle.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CodeTitle.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/CodeTitle.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EACL,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,EACT,YAAY,GACb,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAEtD,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,UAAU,EAAE,QAAQ;IACpB,eAAe,EAAE,iBAAiB,CAAC,mBAAmB;IACtD,YAAY,EAAE,aAAa,kBAAkB,CAAC,MAAM,EAAE;IACtD,KAAK,EAAE,kBAAkB,CAAC,KAAK;IAC/B,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC;IAC5B,UAAU,EAAE,cAAc,CAAC,MAAM;IACjC,GAAG,EAAE,SAAS,CAAC,GAAG,CAAC;IACnB,OAAO,EAAE,GAAG,SAAS,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,EAAE;IAC/C,QAAQ,EAAE;QACR,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,EAAE;YAC3B,YAAY,EAAE,CAAC;YACf,WAAW,EAAE,SAAS,CAAC,IAAI,CAAC;YAC5B,YAAY,EAAE,SAAS,CAAC,IAAI,CAAC;SAC9B;KACF;IACD,SAAS,EAAE;QACT,CAAC,GAAG,SAAS,IAAI,CAAC,EAAE;YAClB,OAAO,EAAE,MAAM;SAChB;KACF;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/CodeTitle.d.ts b/_lib/app/components/mdx/CodeTitle.d.ts new file mode 100644 index 00000000..2aa905aa --- /dev/null +++ b/_lib/app/components/mdx/CodeTitle.d.ts @@ -0,0 +1,6 @@ +export declare function CodeTitle({ children, className, language, ...props }: { + children: string; + className?: string; + language?: string; +}): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=CodeTitle.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/CodeTitle.d.ts.map b/_lib/app/components/mdx/CodeTitle.d.ts.map new file mode 100644 index 00000000..431cf441 --- /dev/null +++ b/_lib/app/components/mdx/CodeTitle.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"CodeTitle.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/CodeTitle.tsx"],"names":[],"mappings":"AAOA,wBAAgB,SAAS,CAAC,EACxB,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,8CAW7D"} \ No newline at end of file diff --git a/_lib/app/components/mdx/CodeTitle.js b/_lib/app/components/mdx/CodeTitle.js new file mode 100644 index 00000000..fd613957 --- /dev/null +++ b/_lib/app/components/mdx/CodeTitle.js @@ -0,0 +1,10 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import { Icon } from '../Icon.js'; +import { File } from '../icons/File.js'; +import { Terminal } from '../icons/Terminal.js'; +import * as styles from './CodeTitle.css.js'; +export function CodeTitle({ children, className, language, ...props }) { + return (_jsxs("div", { ...props, className: clsx(className, styles.root), children: [language === 'bash' ? (_jsx(Icon, { label: "Terminal", size: "14px", icon: Terminal, style: { marginTop: 3 } })) : children.match(/\.(.*)$/) ? (_jsx(Icon, { label: "File", size: "14px", icon: File, style: { marginTop: 1 } })) : null, children] })); +} +//# sourceMappingURL=CodeTitle.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/CodeTitle.js.map b/_lib/app/components/mdx/CodeTitle.js.map new file mode 100644 index 00000000..c153b508 --- /dev/null +++ b/_lib/app/components/mdx/CodeTitle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CodeTitle.js","sourceRoot":"","sources":["../../../../app/components/mdx/CodeTitle.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE3B,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAA;AAE5C,MAAM,UAAU,SAAS,CAAC,EACxB,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACoD;IAC5D,OAAO,CACL,kBAAS,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,aACpD,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC,CACrB,KAAC,IAAI,IAAC,KAAK,EAAC,UAAU,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,GAAI,CAC/E,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAC9B,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,GAAI,CACvE,CAAC,CAAC,CAAC,IAAI,EACP,QAAQ,IACL,CACP,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Details.css.d.ts b/_lib/app/components/mdx/Details.css.d.ts new file mode 100644 index 00000000..41d6e988 --- /dev/null +++ b/_lib/app/components/mdx/Details.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=Details.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Details.css.d.ts.map b/_lib/app/components/mdx/Details.css.d.ts.map new file mode 100644 index 00000000..6f0630aa --- /dev/null +++ b/_lib/app/components/mdx/Details.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Details.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Details.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,QAMf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Details.css.js b/_lib/app/components/mdx/Details.css.js new file mode 100644 index 00000000..df5f6ffc --- /dev/null +++ b/_lib/app/components/mdx/Details.css.js @@ -0,0 +1,10 @@ +import { style } from '@vanilla-extract/css'; +import { root as Callout } from '../Callout.css.js'; +export const root = style({ + selectors: { + [`${Callout} > * + &`]: { + marginTop: '-8px', + }, + }, +}); +//# sourceMappingURL=Details.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Details.css.js.map b/_lib/app/components/mdx/Details.css.js.map new file mode 100644 index 00000000..4d3976a3 --- /dev/null +++ b/_lib/app/components/mdx/Details.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Details.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/Details.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE5C,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAEnD,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,SAAS,EAAE;QACT,CAAC,GAAG,OAAO,UAAU,CAAC,EAAE;YACtB,SAAS,EAAE,MAAM;SAClB;KACF;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Details.d.ts b/_lib/app/components/mdx/Details.d.ts new file mode 100644 index 00000000..8aa7152d --- /dev/null +++ b/_lib/app/components/mdx/Details.d.ts @@ -0,0 +1,3 @@ +import { type DetailedHTMLProps, type DetailsHTMLAttributes } from 'react'; +export declare function Details(props: DetailedHTMLProps, HTMLDetailsElement>): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=Details.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Details.d.ts.map b/_lib/app/components/mdx/Details.d.ts.map new file mode 100644 index 00000000..dc8519c7 --- /dev/null +++ b/_lib/app/components/mdx/Details.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Details.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Details.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,qBAAqB,EAAE,MAAM,OAAO,CAAA;AAI1E,wBAAgB,OAAO,CACrB,KAAK,EAAE,iBAAiB,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC,8CAGxF"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Details.js b/_lib/app/components/mdx/Details.js new file mode 100644 index 00000000..ac0c8b19 --- /dev/null +++ b/_lib/app/components/mdx/Details.js @@ -0,0 +1,8 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import * as styles from './Details.css.js'; +export function Details(props) { + return _jsx("details", { ...props, className: clsx(props.className, styles.root) }); +} +//# sourceMappingURL=Details.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Details.js.map b/_lib/app/components/mdx/Details.js.map new file mode 100644 index 00000000..d1171126 --- /dev/null +++ b/_lib/app/components/mdx/Details.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Details.js","sourceRoot":"","sources":["../../../../app/components/mdx/Details.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAsD,MAAM,OAAO,CAAA;AAE1E,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAA;AAE1C,MAAM,UAAU,OAAO,CACrB,KAAuF;IAEvF,OAAO,qBAAa,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,GAAI,CAAA;AAC9E,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Div.css.d.ts b/_lib/app/components/mdx/Div.css.d.ts new file mode 100644 index 00000000..525b9420 --- /dev/null +++ b/_lib/app/components/mdx/Div.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=Div.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Div.css.d.ts.map b/_lib/app/components/mdx/Div.css.d.ts.map new file mode 100644 index 00000000..3d819ca9 --- /dev/null +++ b/_lib/app/components/mdx/Div.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Div.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Div.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,QAAY,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Div.css.js b/_lib/app/components/mdx/Div.css.js new file mode 100644 index 00000000..e45ee449 --- /dev/null +++ b/_lib/app/components/mdx/Div.css.js @@ -0,0 +1,3 @@ +import { style } from '@vanilla-extract/css'; +export const root = style({}); +//# sourceMappingURL=Div.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Div.css.js.map b/_lib/app/components/mdx/Div.css.js.map new file mode 100644 index 00000000..51972e20 --- /dev/null +++ b/_lib/app/components/mdx/Div.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Div.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/Div.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE5C,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC,EAAE,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Div.d.ts b/_lib/app/components/mdx/Div.d.ts new file mode 100644 index 00000000..47ac6190 --- /dev/null +++ b/_lib/app/components/mdx/Div.d.ts @@ -0,0 +1,3 @@ +import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; +export declare function Div(props: DetailedHTMLProps, HTMLDivElement>): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=Div.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Div.d.ts.map b/_lib/app/components/mdx/Div.d.ts.map new file mode 100644 index 00000000..d7826c2d --- /dev/null +++ b/_lib/app/components/mdx/Div.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Div.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Div.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAYnE,wBAAgB,GAAG,CAAC,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC,8CAe3F"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Div.js b/_lib/app/components/mdx/Div.js new file mode 100644 index 00000000..5562cc7f --- /dev/null +++ b/_lib/app/components/mdx/Div.js @@ -0,0 +1,32 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import { useLayout } from '../../hooks/useLayout.js'; +import { Authors } from '../Authors.js'; +import { BlogPosts } from '../BlogPosts.js'; +import { Sponsors } from '../Sponsors.js'; +import { AutolinkIcon } from './AutolinkIcon.js'; +import { CodeGroup } from './CodeGroup.js'; +import * as styles from './Div.css.js'; +import { Steps } from './Steps.js'; +import { Subtitle } from './Subtitle.js'; +export function Div(props) { + const { layout } = useLayout(); + const className = clsx(props.className, styles.root); + if (props.className === 'code-group') + return _jsx(CodeGroup, { ...props, className: className }); + if ('data-authors' in props) + return _jsx(Authors, {}); + if ('data-blog-posts' in props) + return _jsx(BlogPosts, {}); + if ('data-sponsors' in props) + return _jsx(Sponsors, {}); + if ('data-autolink-icon' in props && layout === 'docs') + return _jsx(AutolinkIcon, { ...props, className: className }); + if ('data-vocs-steps' in props) + return _jsx(Steps, { ...props, className: className }); + if (props.role === 'doc-subtitle') + return _jsx(Subtitle, { ...props }); + return _jsx("div", { ...props, className: className }); +} +//# sourceMappingURL=Div.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Div.js.map b/_lib/app/components/mdx/Div.js.map new file mode 100644 index 00000000..671adcfd --- /dev/null +++ b/_lib/app/components/mdx/Div.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Div.js","sourceRoot":"","sources":["../../../../app/components/mdx/Div.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA+C,MAAM,OAAO,CAAA;AAEnE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,KAAK,MAAM,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,MAAM,UAAU,GAAG,CAAC,KAAwE;IAC1F,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,CAAA;IAE9B,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;IAEpD,IAAI,KAAK,CAAC,SAAS,KAAK,YAAY;QAClC,OAAO,KAAC,SAAS,OAAM,KAAa,EAAE,SAAS,EAAE,SAAS,GAAI,CAAA;IAChE,IAAI,cAAc,IAAI,KAAK;QAAE,OAAO,KAAC,OAAO,KAAG,CAAA;IAC/C,IAAI,iBAAiB,IAAI,KAAK;QAAE,OAAO,KAAC,SAAS,KAAG,CAAA;IACpD,IAAI,eAAe,IAAI,KAAK;QAAE,OAAO,KAAC,QAAQ,KAAG,CAAA;IACjD,IAAI,oBAAoB,IAAI,KAAK,IAAI,MAAM,KAAK,MAAM;QACpD,OAAO,KAAC,YAAY,OAAM,KAAa,EAAE,SAAS,EAAE,SAAS,GAAI,CAAA;IACnE,IAAI,iBAAiB,IAAI,KAAK;QAAE,OAAO,KAAC,KAAK,OAAM,KAAa,EAAE,SAAS,EAAE,SAAS,GAAI,CAAA;IAC1F,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc;QAAE,OAAO,KAAC,QAAQ,OAAM,KAAa,GAAI,CAAA;IAC1E,OAAO,iBAAS,KAAK,EAAE,SAAS,EAAE,SAAS,GAAI,CAAA;AACjD,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Figcaption.css.d.ts b/_lib/app/components/mdx/Figcaption.css.d.ts new file mode 100644 index 00000000..cb4a3c25 --- /dev/null +++ b/_lib/app/components/mdx/Figcaption.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=Figcaption.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Figcaption.css.d.ts.map b/_lib/app/components/mdx/Figcaption.css.d.ts.map new file mode 100644 index 00000000..3a0bdfab --- /dev/null +++ b/_lib/app/components/mdx/Figcaption.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Figcaption.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Figcaption.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,QAAY,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Figcaption.css.js b/_lib/app/components/mdx/Figcaption.css.js new file mode 100644 index 00000000..e7ffd9ae --- /dev/null +++ b/_lib/app/components/mdx/Figcaption.css.js @@ -0,0 +1,3 @@ +import { style } from '@vanilla-extract/css'; +export const root = style({}); +//# sourceMappingURL=Figcaption.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Figcaption.css.js.map b/_lib/app/components/mdx/Figcaption.css.js.map new file mode 100644 index 00000000..3b5a1839 --- /dev/null +++ b/_lib/app/components/mdx/Figcaption.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Figcaption.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/Figcaption.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE5C,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC,EAAE,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Figcaption.d.ts b/_lib/app/components/mdx/Figcaption.d.ts new file mode 100644 index 00000000..19dd1ec6 --- /dev/null +++ b/_lib/app/components/mdx/Figcaption.d.ts @@ -0,0 +1,3 @@ +import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; +export declare function Figcaption(props: DetailedHTMLProps, HTMLElement>): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=Figcaption.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Figcaption.d.ts.map b/_lib/app/components/mdx/Figcaption.d.ts.map new file mode 100644 index 00000000..64b90a98 --- /dev/null +++ b/_lib/app/components/mdx/Figcaption.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Figcaption.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Figcaption.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAInE,wBAAgB,UAAU,CAAC,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,8CAI5F"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Figcaption.js b/_lib/app/components/mdx/Figcaption.js new file mode 100644 index 00000000..f7dbdc2e --- /dev/null +++ b/_lib/app/components/mdx/Figcaption.js @@ -0,0 +1,9 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import * as styles from './Figcaption.css.js'; +export function Figcaption(props) { + const className = clsx(props.className, styles.root); + return _jsx("figcaption", { ...props, className: className }); +} +//# sourceMappingURL=Figcaption.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Figcaption.js.map b/_lib/app/components/mdx/Figcaption.js.map new file mode 100644 index 00000000..e46c4e1f --- /dev/null +++ b/_lib/app/components/mdx/Figcaption.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Figcaption.js","sourceRoot":"","sources":["../../../../app/components/mdx/Figcaption.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA+C,MAAM,OAAO,CAAA;AAEnE,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAA;AAE7C,MAAM,UAAU,UAAU,CAAC,KAAkE;IAC3F,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;IAEpD,OAAO,wBAAgB,KAAK,EAAE,SAAS,EAAE,SAAS,GAAI,CAAA;AACxD,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Figure.css.d.ts b/_lib/app/components/mdx/Figure.css.d.ts new file mode 100644 index 00000000..30531763 --- /dev/null +++ b/_lib/app/components/mdx/Figure.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=Figure.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Figure.css.d.ts.map b/_lib/app/components/mdx/Figure.css.d.ts.map new file mode 100644 index 00000000..9e8cb3ad --- /dev/null +++ b/_lib/app/components/mdx/Figure.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Figure.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Figure.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,QAAY,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Figure.css.js b/_lib/app/components/mdx/Figure.css.js new file mode 100644 index 00000000..24e94c23 --- /dev/null +++ b/_lib/app/components/mdx/Figure.css.js @@ -0,0 +1,3 @@ +import { style } from '@vanilla-extract/css'; +export const root = style({}); +//# sourceMappingURL=Figure.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Figure.css.js.map b/_lib/app/components/mdx/Figure.css.js.map new file mode 100644 index 00000000..6c0bc26c --- /dev/null +++ b/_lib/app/components/mdx/Figure.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Figure.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/Figure.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE5C,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC,EAAE,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Figure.d.ts b/_lib/app/components/mdx/Figure.d.ts new file mode 100644 index 00000000..8be25f08 --- /dev/null +++ b/_lib/app/components/mdx/Figure.d.ts @@ -0,0 +1,3 @@ +import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; +export declare function Figure(props: DetailedHTMLProps, HTMLElement>): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=Figure.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Figure.d.ts.map b/_lib/app/components/mdx/Figure.d.ts.map new file mode 100644 index 00000000..76b19f4a --- /dev/null +++ b/_lib/app/components/mdx/Figure.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Figure.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Figure.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAInE,wBAAgB,MAAM,CAAC,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,8CAIxF"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Figure.js b/_lib/app/components/mdx/Figure.js new file mode 100644 index 00000000..2e65b84f --- /dev/null +++ b/_lib/app/components/mdx/Figure.js @@ -0,0 +1,9 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import * as styles from './Figure.css.js'; +export function Figure(props) { + const className = clsx(props.className, styles.root); + return _jsx("figure", { ...props, className: className }); +} +//# sourceMappingURL=Figure.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Figure.js.map b/_lib/app/components/mdx/Figure.js.map new file mode 100644 index 00000000..d081325f --- /dev/null +++ b/_lib/app/components/mdx/Figure.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Figure.js","sourceRoot":"","sources":["../../../../app/components/mdx/Figure.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA+C,MAAM,OAAO,CAAA;AAEnE,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAA;AAEzC,MAAM,UAAU,MAAM,CAAC,KAAkE;IACvF,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;IAEpD,OAAO,oBAAY,KAAK,EAAE,SAAS,EAAE,SAAS,GAAI,CAAA;AACpD,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Footnotes.css.d.ts b/_lib/app/components/mdx/Footnotes.css.d.ts new file mode 100644 index 00000000..35ad10c6 --- /dev/null +++ b/_lib/app/components/mdx/Footnotes.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=Footnotes.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Footnotes.css.d.ts.map b/_lib/app/components/mdx/Footnotes.css.d.ts.map new file mode 100644 index 00000000..6e67091a --- /dev/null +++ b/_lib/app/components/mdx/Footnotes.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Footnotes.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Footnotes.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,QAAY,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Footnotes.css.js b/_lib/app/components/mdx/Footnotes.css.js new file mode 100644 index 00000000..10c1b960 --- /dev/null +++ b/_lib/app/components/mdx/Footnotes.css.js @@ -0,0 +1,3 @@ +import { style } from '@vanilla-extract/css'; +export const root = style({}); +//# sourceMappingURL=Footnotes.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Footnotes.css.js.map b/_lib/app/components/mdx/Footnotes.css.js.map new file mode 100644 index 00000000..a1142444 --- /dev/null +++ b/_lib/app/components/mdx/Footnotes.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Footnotes.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/Footnotes.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE5C,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC,EAAE,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Footnotes.d.ts b/_lib/app/components/mdx/Footnotes.d.ts new file mode 100644 index 00000000..9f5fbb18 --- /dev/null +++ b/_lib/app/components/mdx/Footnotes.d.ts @@ -0,0 +1,3 @@ +import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; +export declare function Footnotes(props: DetailedHTMLProps, HTMLElement>): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=Footnotes.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Footnotes.d.ts.map b/_lib/app/components/mdx/Footnotes.d.ts.map new file mode 100644 index 00000000..df0538af --- /dev/null +++ b/_lib/app/components/mdx/Footnotes.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Footnotes.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Footnotes.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAInE,wBAAgB,SAAS,CAAC,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,8CAE3F"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Footnotes.js b/_lib/app/components/mdx/Footnotes.js new file mode 100644 index 00000000..d7b04da1 --- /dev/null +++ b/_lib/app/components/mdx/Footnotes.js @@ -0,0 +1,8 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import * as styles from './Footnotes.css.js'; +export function Footnotes(props) { + return _jsx("section", { ...props, className: clsx(props.className, styles.root) }); +} +//# sourceMappingURL=Footnotes.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Footnotes.js.map b/_lib/app/components/mdx/Footnotes.js.map new file mode 100644 index 00000000..49687a6b --- /dev/null +++ b/_lib/app/components/mdx/Footnotes.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Footnotes.js","sourceRoot":"","sources":["../../../../app/components/mdx/Footnotes.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA+C,MAAM,OAAO,CAAA;AAEnE,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAA;AAE5C,MAAM,UAAU,SAAS,CAAC,KAAkE;IAC1F,OAAO,qBAAa,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,GAAI,CAAA;AAC9E,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/H1.css.d.ts b/_lib/app/components/mdx/H1.css.d.ts new file mode 100644 index 00000000..751b1495 --- /dev/null +++ b/_lib/app/components/mdx/H1.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=H1.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/H1.css.d.ts.map b/_lib/app/components/mdx/H1.css.d.ts.map new file mode 100644 index 00000000..91267294 --- /dev/null +++ b/_lib/app/components/mdx/H1.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"H1.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/H1.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,QAGf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/H1.css.js b/_lib/app/components/mdx/H1.css.js new file mode 100644 index 00000000..723582f9 --- /dev/null +++ b/_lib/app/components/mdx/H1.css.js @@ -0,0 +1,7 @@ +import { style } from '@vanilla-extract/css'; +import { fontSizeVars } from '../../styles/vars.css.js'; +export const root = style({ + fontSize: fontSizeVars.h1, + letterSpacing: '-0.02em', +}); +//# sourceMappingURL=H1.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/H1.css.js.map b/_lib/app/components/mdx/H1.css.js.map new file mode 100644 index 00000000..b64ccd54 --- /dev/null +++ b/_lib/app/components/mdx/H1.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"H1.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/H1.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEvD,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,QAAQ,EAAE,YAAY,CAAC,EAAE;IACzB,aAAa,EAAE,SAAS;CACzB,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/H1.d.ts b/_lib/app/components/mdx/H1.d.ts new file mode 100644 index 00000000..cccac8f1 --- /dev/null +++ b/_lib/app/components/mdx/H1.d.ts @@ -0,0 +1,3 @@ +import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; +export declare function H1(props: DetailedHTMLProps, HTMLHeadingElement>): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=H1.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/H1.d.ts.map b/_lib/app/components/mdx/H1.d.ts.map new file mode 100644 index 00000000..f4ba9e19 --- /dev/null +++ b/_lib/app/components/mdx/H1.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"H1.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/H1.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAKnE,wBAAgB,EAAE,CAChB,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC,8CAGjF"} \ No newline at end of file diff --git a/_lib/app/components/mdx/H1.js b/_lib/app/components/mdx/H1.js new file mode 100644 index 00000000..2a2c0c98 --- /dev/null +++ b/_lib/app/components/mdx/H1.js @@ -0,0 +1,9 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import * as styles from './H1.css.js'; +import { Heading } from './Heading.js'; +export function H1(props) { + return _jsx(Heading, { ...props, className: clsx(props.className, styles.root), level: 1 }); +} +//# sourceMappingURL=H1.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/H1.js.map b/_lib/app/components/mdx/H1.js.map new file mode 100644 index 00000000..3de0c563 --- /dev/null +++ b/_lib/app/components/mdx/H1.js.map @@ -0,0 +1 @@ +{"version":3,"file":"H1.js","sourceRoot":"","sources":["../../../../app/components/mdx/H1.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA+C,MAAM,OAAO,CAAA;AAEnE,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,MAAM,UAAU,EAAE,CAChB,KAAgF;IAEhF,OAAO,KAAC,OAAO,OAAK,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,GAAI,CAAA;AACxF,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/H2.css.d.ts b/_lib/app/components/mdx/H2.css.d.ts new file mode 100644 index 00000000..9b6cd0ec --- /dev/null +++ b/_lib/app/components/mdx/H2.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=H2.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/H2.css.d.ts.map b/_lib/app/components/mdx/H2.css.d.ts.map new file mode 100644 index 00000000..02d0dc11 --- /dev/null +++ b/_lib/app/components/mdx/H2.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"H2.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/H2.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,QAkBf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/H2.css.js b/_lib/app/components/mdx/H2.css.js new file mode 100644 index 00000000..a2ccec0a --- /dev/null +++ b/_lib/app/components/mdx/H2.css.js @@ -0,0 +1,23 @@ +import { style } from '@vanilla-extract/css'; +import { fontSizeVars, primitiveColorVars, spaceVars } from '../../styles/vars.css.js'; +import { root as header } from './Header.css.js'; +export const root = style({ + fontSize: fontSizeVars.h2, + letterSpacing: '-0.02em', + selectors: { + '&&:not(:last-child)': { + marginBottom: spaceVars['24'], + }, + [`:not(${header}) + &:not(:only-child)`]: { + borderTop: `1px solid ${primitiveColorVars.border}`, + marginTop: spaceVars['56'], + paddingTop: spaceVars['24'], + }, + '[data-layout="landing"] &&': { + borderTop: 'none', + marginTop: spaceVars['24'], + paddingTop: 0, + }, + }, +}); +//# sourceMappingURL=H2.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/H2.css.js.map b/_lib/app/components/mdx/H2.css.js.map new file mode 100644 index 00000000..9eca1373 --- /dev/null +++ b/_lib/app/components/mdx/H2.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"H2.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/H2.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACtF,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAEhD,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,QAAQ,EAAE,YAAY,CAAC,EAAE;IACzB,aAAa,EAAE,SAAS;IACxB,SAAS,EAAE;QACT,qBAAqB,EAAE;YACrB,YAAY,EAAE,SAAS,CAAC,IAAI,CAAC;SAC9B;QACD,CAAC,QAAQ,MAAM,wBAAwB,CAAC,EAAE;YACxC,SAAS,EAAE,aAAa,kBAAkB,CAAC,MAAM,EAAE;YACnD,SAAS,EAAE,SAAS,CAAC,IAAI,CAAC;YAC1B,UAAU,EAAE,SAAS,CAAC,IAAI,CAAC;SAC5B;QACD,4BAA4B,EAAE;YAC5B,SAAS,EAAE,MAAM;YACjB,SAAS,EAAE,SAAS,CAAC,IAAI,CAAC;YAC1B,UAAU,EAAE,CAAC;SACd;KACF;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/H2.d.ts b/_lib/app/components/mdx/H2.d.ts new file mode 100644 index 00000000..c52a3937 --- /dev/null +++ b/_lib/app/components/mdx/H2.d.ts @@ -0,0 +1,3 @@ +import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; +export declare function H2(props: DetailedHTMLProps, HTMLHeadingElement>): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=H2.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/H2.d.ts.map b/_lib/app/components/mdx/H2.d.ts.map new file mode 100644 index 00000000..3165bfb7 --- /dev/null +++ b/_lib/app/components/mdx/H2.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"H2.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/H2.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAKnE,wBAAgB,EAAE,CAChB,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC,8CAGjF"} \ No newline at end of file diff --git a/_lib/app/components/mdx/H2.js b/_lib/app/components/mdx/H2.js new file mode 100644 index 00000000..1c60e77b --- /dev/null +++ b/_lib/app/components/mdx/H2.js @@ -0,0 +1,9 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import * as styles from './H2.css.js'; +import { Heading } from './Heading.js'; +export function H2(props) { + return _jsx(Heading, { ...props, className: clsx(props.className, styles.root), level: 2 }); +} +//# sourceMappingURL=H2.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/H2.js.map b/_lib/app/components/mdx/H2.js.map new file mode 100644 index 00000000..3e8e6531 --- /dev/null +++ b/_lib/app/components/mdx/H2.js.map @@ -0,0 +1 @@ +{"version":3,"file":"H2.js","sourceRoot":"","sources":["../../../../app/components/mdx/H2.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA+C,MAAM,OAAO,CAAA;AAEnE,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,MAAM,UAAU,EAAE,CAChB,KAAgF;IAEhF,OAAO,KAAC,OAAO,OAAK,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,GAAI,CAAA;AACxF,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/H3.css.d.ts b/_lib/app/components/mdx/H3.css.d.ts new file mode 100644 index 00000000..11aee3f6 --- /dev/null +++ b/_lib/app/components/mdx/H3.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=H3.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/H3.css.d.ts.map b/_lib/app/components/mdx/H3.css.d.ts.map new file mode 100644 index 00000000..0cb6c1e0 --- /dev/null +++ b/_lib/app/components/mdx/H3.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"H3.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/H3.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,QAcf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/H3.css.js b/_lib/app/components/mdx/H3.css.js new file mode 100644 index 00000000..c823db21 --- /dev/null +++ b/_lib/app/components/mdx/H3.css.js @@ -0,0 +1,19 @@ +import { style } from '@vanilla-extract/css'; +import { fontSizeVars, spaceVars } from '../../styles/vars.css.js'; +import { root as H2 } from './H2.css.js'; +export const root = style({ + fontSize: fontSizeVars.h3, + selectors: { + '&:not(:first-child)': { + marginTop: spaceVars['18'], + paddingTop: spaceVars['18'], + }, + '&&:not(:last-child)': { + marginBottom: spaceVars['24'], + }, + [`${H2}+&`]: { + paddingTop: spaceVars['0'], + }, + }, +}); +//# sourceMappingURL=H3.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/H3.css.js.map b/_lib/app/components/mdx/H3.css.js.map new file mode 100644 index 00000000..c4b51eae --- /dev/null +++ b/_lib/app/components/mdx/H3.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"H3.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/H3.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAClE,OAAO,EAAE,IAAI,IAAI,EAAE,EAAE,MAAM,aAAa,CAAA;AAExC,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,QAAQ,EAAE,YAAY,CAAC,EAAE;IACzB,SAAS,EAAE;QACT,qBAAqB,EAAE;YACrB,SAAS,EAAE,SAAS,CAAC,IAAI,CAAC;YAC1B,UAAU,EAAE,SAAS,CAAC,IAAI,CAAC;SAC5B;QACD,qBAAqB,EAAE;YACrB,YAAY,EAAE,SAAS,CAAC,IAAI,CAAC;SAC9B;QACD,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE;YACX,UAAU,EAAE,SAAS,CAAC,GAAG,CAAC;SAC3B;KACF;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/H3.d.ts b/_lib/app/components/mdx/H3.d.ts new file mode 100644 index 00000000..221ddf91 --- /dev/null +++ b/_lib/app/components/mdx/H3.d.ts @@ -0,0 +1,3 @@ +import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; +export declare function H3(props: DetailedHTMLProps, HTMLHeadingElement>): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=H3.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/H3.d.ts.map b/_lib/app/components/mdx/H3.d.ts.map new file mode 100644 index 00000000..7af0dc0e --- /dev/null +++ b/_lib/app/components/mdx/H3.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"H3.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/H3.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAKnE,wBAAgB,EAAE,CAChB,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC,8CAGjF"} \ No newline at end of file diff --git a/_lib/app/components/mdx/H3.js b/_lib/app/components/mdx/H3.js new file mode 100644 index 00000000..9e613293 --- /dev/null +++ b/_lib/app/components/mdx/H3.js @@ -0,0 +1,9 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import * as styles from './H3.css.js'; +import { Heading } from './Heading.js'; +export function H3(props) { + return _jsx(Heading, { ...props, className: clsx(props.className, styles.root), level: 3 }); +} +//# sourceMappingURL=H3.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/H3.js.map b/_lib/app/components/mdx/H3.js.map new file mode 100644 index 00000000..2efce4d7 --- /dev/null +++ b/_lib/app/components/mdx/H3.js.map @@ -0,0 +1 @@ +{"version":3,"file":"H3.js","sourceRoot":"","sources":["../../../../app/components/mdx/H3.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA+C,MAAM,OAAO,CAAA;AAEnE,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,MAAM,UAAU,EAAE,CAChB,KAAgF;IAEhF,OAAO,KAAC,OAAO,OAAK,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,GAAI,CAAA;AACxF,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/H4.css.d.ts b/_lib/app/components/mdx/H4.css.d.ts new file mode 100644 index 00000000..35d9ab60 --- /dev/null +++ b/_lib/app/components/mdx/H4.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=H4.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/H4.css.d.ts.map b/_lib/app/components/mdx/H4.css.d.ts.map new file mode 100644 index 00000000..35c88c57 --- /dev/null +++ b/_lib/app/components/mdx/H4.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"H4.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/H4.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,QAcf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/H4.css.js b/_lib/app/components/mdx/H4.css.js new file mode 100644 index 00000000..e62454e9 --- /dev/null +++ b/_lib/app/components/mdx/H4.css.js @@ -0,0 +1,19 @@ +import { style } from '@vanilla-extract/css'; +import { fontSizeVars, spaceVars } from '../../styles/vars.css.js'; +import { root as H3 } from './H3.css.js'; +export const root = style({ + fontSize: fontSizeVars.h4, + selectors: { + '&:not(:first-child)': { + marginTop: spaceVars['18'], + paddingTop: spaceVars['12'], + }, + '&&:not(:last-child)': { + marginBottom: spaceVars['24'], + }, + [`${H3}+&`]: { + paddingTop: spaceVars['0'], + }, + }, +}); +//# sourceMappingURL=H4.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/H4.css.js.map b/_lib/app/components/mdx/H4.css.js.map new file mode 100644 index 00000000..38f15418 --- /dev/null +++ b/_lib/app/components/mdx/H4.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"H4.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/H4.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAClE,OAAO,EAAE,IAAI,IAAI,EAAE,EAAE,MAAM,aAAa,CAAA;AAExC,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,QAAQ,EAAE,YAAY,CAAC,EAAE;IACzB,SAAS,EAAE;QACT,qBAAqB,EAAE;YACrB,SAAS,EAAE,SAAS,CAAC,IAAI,CAAC;YAC1B,UAAU,EAAE,SAAS,CAAC,IAAI,CAAC;SAC5B;QACD,qBAAqB,EAAE;YACrB,YAAY,EAAE,SAAS,CAAC,IAAI,CAAC;SAC9B;QACD,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE;YACX,UAAU,EAAE,SAAS,CAAC,GAAG,CAAC;SAC3B;KACF;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/H4.d.ts b/_lib/app/components/mdx/H4.d.ts new file mode 100644 index 00000000..9d958a7b --- /dev/null +++ b/_lib/app/components/mdx/H4.d.ts @@ -0,0 +1,3 @@ +import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; +export declare function H4(props: DetailedHTMLProps, HTMLHeadingElement>): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=H4.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/H4.d.ts.map b/_lib/app/components/mdx/H4.d.ts.map new file mode 100644 index 00000000..df43239b --- /dev/null +++ b/_lib/app/components/mdx/H4.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"H4.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/H4.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAKnE,wBAAgB,EAAE,CAChB,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC,8CAGjF"} \ No newline at end of file diff --git a/_lib/app/components/mdx/H4.js b/_lib/app/components/mdx/H4.js new file mode 100644 index 00000000..1097b2d9 --- /dev/null +++ b/_lib/app/components/mdx/H4.js @@ -0,0 +1,9 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import * as styles from './H4.css.js'; +import { Heading } from './Heading.js'; +export function H4(props) { + return _jsx(Heading, { ...props, className: clsx(props.className, styles.root), level: 4 }); +} +//# sourceMappingURL=H4.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/H4.js.map b/_lib/app/components/mdx/H4.js.map new file mode 100644 index 00000000..54e6d0a3 --- /dev/null +++ b/_lib/app/components/mdx/H4.js.map @@ -0,0 +1 @@ +{"version":3,"file":"H4.js","sourceRoot":"","sources":["../../../../app/components/mdx/H4.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA+C,MAAM,OAAO,CAAA;AAEnE,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,MAAM,UAAU,EAAE,CAChB,KAAgF;IAEhF,OAAO,KAAC,OAAO,OAAK,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,GAAI,CAAA;AACxF,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/H5.css.d.ts b/_lib/app/components/mdx/H5.css.d.ts new file mode 100644 index 00000000..1c04346d --- /dev/null +++ b/_lib/app/components/mdx/H5.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=H5.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/H5.css.d.ts.map b/_lib/app/components/mdx/H5.css.d.ts.map new file mode 100644 index 00000000..bf0ffd2f --- /dev/null +++ b/_lib/app/components/mdx/H5.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"H5.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/H5.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,QAaf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/H5.css.js b/_lib/app/components/mdx/H5.css.js new file mode 100644 index 00000000..3ed1d817 --- /dev/null +++ b/_lib/app/components/mdx/H5.css.js @@ -0,0 +1,18 @@ +import { style } from '@vanilla-extract/css'; +import { fontSizeVars, spaceVars } from '../../styles/vars.css.js'; +import { root as H4 } from './H4.css.js'; +export const root = style({ + fontSize: fontSizeVars.h5, + selectors: { + '&:not(:first-child)': { + marginTop: spaceVars['16'], + }, + '&&:not(:last-child)': { + marginBottom: spaceVars['24'], + }, + [`${H4}+&`]: { + paddingTop: spaceVars['0'], + }, + }, +}); +//# sourceMappingURL=H5.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/H5.css.js.map b/_lib/app/components/mdx/H5.css.js.map new file mode 100644 index 00000000..c2ba1b22 --- /dev/null +++ b/_lib/app/components/mdx/H5.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"H5.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/H5.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAClE,OAAO,EAAE,IAAI,IAAI,EAAE,EAAE,MAAM,aAAa,CAAA;AAExC,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,QAAQ,EAAE,YAAY,CAAC,EAAE;IACzB,SAAS,EAAE;QACT,qBAAqB,EAAE;YACrB,SAAS,EAAE,SAAS,CAAC,IAAI,CAAC;SAC3B;QACD,qBAAqB,EAAE;YACrB,YAAY,EAAE,SAAS,CAAC,IAAI,CAAC;SAC9B;QACD,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE;YACX,UAAU,EAAE,SAAS,CAAC,GAAG,CAAC;SAC3B;KACF;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/H5.d.ts b/_lib/app/components/mdx/H5.d.ts new file mode 100644 index 00000000..595ecc14 --- /dev/null +++ b/_lib/app/components/mdx/H5.d.ts @@ -0,0 +1,3 @@ +import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; +export declare function H5(props: DetailedHTMLProps, HTMLHeadingElement>): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=H5.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/H5.d.ts.map b/_lib/app/components/mdx/H5.d.ts.map new file mode 100644 index 00000000..15fef227 --- /dev/null +++ b/_lib/app/components/mdx/H5.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"H5.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/H5.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAKnE,wBAAgB,EAAE,CAChB,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC,8CAGjF"} \ No newline at end of file diff --git a/_lib/app/components/mdx/H5.js b/_lib/app/components/mdx/H5.js new file mode 100644 index 00000000..c92e1bd7 --- /dev/null +++ b/_lib/app/components/mdx/H5.js @@ -0,0 +1,9 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import * as styles from './H5.css.js'; +import { Heading } from './Heading.js'; +export function H5(props) { + return _jsx(Heading, { ...props, className: clsx(props.className, styles.root), level: 5 }); +} +//# sourceMappingURL=H5.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/H5.js.map b/_lib/app/components/mdx/H5.js.map new file mode 100644 index 00000000..0495336a --- /dev/null +++ b/_lib/app/components/mdx/H5.js.map @@ -0,0 +1 @@ +{"version":3,"file":"H5.js","sourceRoot":"","sources":["../../../../app/components/mdx/H5.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA+C,MAAM,OAAO,CAAA;AAEnE,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,MAAM,UAAU,EAAE,CAChB,KAAgF;IAEhF,OAAO,KAAC,OAAO,OAAK,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,GAAI,CAAA;AACxF,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/H6.css.d.ts b/_lib/app/components/mdx/H6.css.d.ts new file mode 100644 index 00000000..469ab6b1 --- /dev/null +++ b/_lib/app/components/mdx/H6.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=H6.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/H6.css.d.ts.map b/_lib/app/components/mdx/H6.css.d.ts.map new file mode 100644 index 00000000..b01681ac --- /dev/null +++ b/_lib/app/components/mdx/H6.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"H6.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/H6.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,QAaf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/H6.css.js b/_lib/app/components/mdx/H6.css.js new file mode 100644 index 00000000..fc5d2bc1 --- /dev/null +++ b/_lib/app/components/mdx/H6.css.js @@ -0,0 +1,18 @@ +import { style } from '@vanilla-extract/css'; +import { fontSizeVars, spaceVars } from '../../styles/vars.css.js'; +import { root as H5 } from './H5.css.js'; +export const root = style({ + fontSize: fontSizeVars.h6, + selectors: { + '&:not(:first-child)': { + marginTop: spaceVars['16'], + }, + '&&:not(:last-child)': { + marginBottom: spaceVars['24'], + }, + [`${H5}+&`]: { + paddingTop: spaceVars['0'], + }, + }, +}); +//# sourceMappingURL=H6.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/H6.css.js.map b/_lib/app/components/mdx/H6.css.js.map new file mode 100644 index 00000000..5631acc2 --- /dev/null +++ b/_lib/app/components/mdx/H6.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"H6.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/H6.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAClE,OAAO,EAAE,IAAI,IAAI,EAAE,EAAE,MAAM,aAAa,CAAA;AAExC,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,QAAQ,EAAE,YAAY,CAAC,EAAE;IACzB,SAAS,EAAE;QACT,qBAAqB,EAAE;YACrB,SAAS,EAAE,SAAS,CAAC,IAAI,CAAC;SAC3B;QACD,qBAAqB,EAAE;YACrB,YAAY,EAAE,SAAS,CAAC,IAAI,CAAC;SAC9B;QACD,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE;YACX,UAAU,EAAE,SAAS,CAAC,GAAG,CAAC;SAC3B;KACF;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/H6.d.ts b/_lib/app/components/mdx/H6.d.ts new file mode 100644 index 00000000..0fbfaefb --- /dev/null +++ b/_lib/app/components/mdx/H6.d.ts @@ -0,0 +1,3 @@ +import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; +export declare function H6(props: DetailedHTMLProps, HTMLHeadingElement>): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=H6.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/H6.d.ts.map b/_lib/app/components/mdx/H6.d.ts.map new file mode 100644 index 00000000..82bbfce4 --- /dev/null +++ b/_lib/app/components/mdx/H6.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"H6.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/H6.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAKnE,wBAAgB,EAAE,CAChB,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC,8CAGjF"} \ No newline at end of file diff --git a/_lib/app/components/mdx/H6.js b/_lib/app/components/mdx/H6.js new file mode 100644 index 00000000..88b876cf --- /dev/null +++ b/_lib/app/components/mdx/H6.js @@ -0,0 +1,9 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import * as styles from './H6.css.js'; +import { Heading } from './Heading.js'; +export function H6(props) { + return _jsx(Heading, { ...props, className: clsx(props.className, styles.root), level: 6 }); +} +//# sourceMappingURL=H6.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/H6.js.map b/_lib/app/components/mdx/H6.js.map new file mode 100644 index 00000000..c0704abc --- /dev/null +++ b/_lib/app/components/mdx/H6.js.map @@ -0,0 +1 @@ +{"version":3,"file":"H6.js","sourceRoot":"","sources":["../../../../app/components/mdx/H6.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA+C,MAAM,OAAO,CAAA;AAEnE,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,MAAM,UAAU,EAAE,CAChB,KAAgF;IAEhF,OAAO,KAAC,OAAO,OAAK,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,GAAI,CAAA;AACxF,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Header.css.d.ts b/_lib/app/components/mdx/Header.css.d.ts new file mode 100644 index 00000000..ae7760b4 --- /dev/null +++ b/_lib/app/components/mdx/Header.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=Header.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Header.css.d.ts.map b/_lib/app/components/mdx/Header.css.d.ts.map new file mode 100644 index 00000000..cd2018dd --- /dev/null +++ b/_lib/app/components/mdx/Header.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Header.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Header.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,QAcf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Header.css.js b/_lib/app/components/mdx/Header.css.js new file mode 100644 index 00000000..101bf931 --- /dev/null +++ b/_lib/app/components/mdx/Header.css.js @@ -0,0 +1,18 @@ +import { style } from '@vanilla-extract/css'; +import { primitiveColorVars, spaceVars } from '../../styles/vars.css.js'; +export const root = style({ + borderBottom: `1px solid ${primitiveColorVars.border}`, + selectors: { + '&:not(:last-child)': { + marginBottom: spaceVars['28'], + paddingBottom: spaceVars['28'], + }, + '[data-layout="landing"] &': { + paddingBottom: spaceVars['16'], + }, + '[data-layout="landing"] &:not(:first-child)': { + paddingTop: spaceVars['36'], + }, + }, +}); +//# sourceMappingURL=Header.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Header.css.js.map b/_lib/app/components/mdx/Header.css.js.map new file mode 100644 index 00000000..ecbf6212 --- /dev/null +++ b/_lib/app/components/mdx/Header.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Header.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/Header.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAExE,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,YAAY,EAAE,aAAa,kBAAkB,CAAC,MAAM,EAAE;IACtD,SAAS,EAAE;QACT,oBAAoB,EAAE;YACpB,YAAY,EAAE,SAAS,CAAC,IAAI,CAAC;YAC7B,aAAa,EAAE,SAAS,CAAC,IAAI,CAAC;SAC/B;QACD,2BAA2B,EAAE;YAC3B,aAAa,EAAE,SAAS,CAAC,IAAI,CAAC;SAC/B;QACD,6CAA6C,EAAE;YAC7C,UAAU,EAAE,SAAS,CAAC,IAAI,CAAC;SAC5B;KACF;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Header.d.ts b/_lib/app/components/mdx/Header.d.ts new file mode 100644 index 00000000..dd909fdd --- /dev/null +++ b/_lib/app/components/mdx/Header.d.ts @@ -0,0 +1,3 @@ +import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; +export declare function Header(props: DetailedHTMLProps, HTMLElement>): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=Header.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Header.d.ts.map b/_lib/app/components/mdx/Header.d.ts.map new file mode 100644 index 00000000..35ae2cf6 --- /dev/null +++ b/_lib/app/components/mdx/Header.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Header.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAInE,wBAAgB,MAAM,CAAC,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,8CAExF"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Header.js b/_lib/app/components/mdx/Header.js new file mode 100644 index 00000000..517d85f6 --- /dev/null +++ b/_lib/app/components/mdx/Header.js @@ -0,0 +1,8 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import * as styles from './Header.css.js'; +export function Header(props) { + return _jsx("header", { ...props, className: clsx(props.className, styles.root) }); +} +//# sourceMappingURL=Header.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Header.js.map b/_lib/app/components/mdx/Header.js.map new file mode 100644 index 00000000..680f9035 --- /dev/null +++ b/_lib/app/components/mdx/Header.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../../app/components/mdx/Header.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA+C,MAAM,OAAO,CAAA;AAEnE,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAA;AAEzC,MAAM,UAAU,MAAM,CAAC,KAAkE;IACvF,OAAO,oBAAY,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,GAAI,CAAA;AAC7E,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Heading.css.d.ts b/_lib/app/components/mdx/Heading.css.d.ts new file mode 100644 index 00000000..77e47080 --- /dev/null +++ b/_lib/app/components/mdx/Heading.css.d.ts @@ -0,0 +1,3 @@ +export declare const root: string; +export declare const slugTarget: string; +//# sourceMappingURL=Heading.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Heading.css.d.ts.map b/_lib/app/components/mdx/Heading.css.d.ts.map new file mode 100644 index 00000000..dad144c2 --- /dev/null +++ b/_lib/app/components/mdx/Heading.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Heading.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Heading.css.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,IAAI,QAOf,CAAA;AAEF,eAAO,MAAM,UAAU,QAyBtB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Heading.css.js b/_lib/app/components/mdx/Heading.css.js new file mode 100644 index 00000000..affa3c23 --- /dev/null +++ b/_lib/app/components/mdx/Heading.css.js @@ -0,0 +1,36 @@ +import { style } from '@vanilla-extract/css'; +import { fontWeightVars, lineHeightVars, primitiveColorVars, spaceVars, topNavVars, viewportVars, } from '../../styles/vars.css.js'; +import { title as Step_title } from '../Step.css.js'; +import { root as Header } from './Header.css.js'; +export const root = style({ + alignItems: 'center', + color: primitiveColorVars.heading, + fontWeight: fontWeightVars.semibold, + gap: '0.25em', + lineHeight: lineHeightVars.heading, + position: 'relative', +}); +export const slugTarget = style({ + position: 'absolute', + top: '0px', + visibility: 'hidden', + '@media': { + [viewportVars['min-1080px']]: { + top: `calc(-1 * (${topNavVars.height}))`, + selectors: { + [`${Header} &, ${Step_title} &, ${Header} + ${root} &`]: { + top: `calc(-1 * (${topNavVars.height} + ${spaceVars['24']}))`, + }, + }, + }, + [viewportVars['max-1080px']]: { + top: `calc(-1 * ${topNavVars.curtainHeight})`, + selectors: { + [`${Header} &, ${Header} + ${root} &`]: { + top: `calc(-1 * calc(${topNavVars.curtainHeight} + ${spaceVars['24']}))`, + }, + }, + }, + }, +}, 'slugTarget'); +//# sourceMappingURL=Heading.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Heading.css.js.map b/_lib/app/components/mdx/Heading.css.js.map new file mode 100644 index 00000000..cdc7f3a9 --- /dev/null +++ b/_lib/app/components/mdx/Heading.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Heading.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/Heading.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EACL,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,YAAY,GACb,MAAM,0BAA0B,CAAA;AAEjC,OAAO,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAEhD,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,UAAU,EAAE,QAAQ;IACpB,KAAK,EAAE,kBAAkB,CAAC,OAAO;IACjC,UAAU,EAAE,cAAc,CAAC,QAAQ;IACnC,GAAG,EAAE,QAAQ;IACb,UAAU,EAAE,cAAc,CAAC,OAAO;IAClC,QAAQ,EAAE,UAAU;CACrB,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,CAC7B;IACE,QAAQ,EAAE,UAAU;IACpB,GAAG,EAAE,KAAK;IACV,UAAU,EAAE,QAAQ;IACpB,QAAQ,EAAE;QACR,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,EAAE;YAC5B,GAAG,EAAE,cAAc,UAAU,CAAC,MAAM,IAAI;YACxC,SAAS,EAAE;gBACT,CAAC,GAAG,MAAM,OAAO,UAAU,OAAO,MAAM,MAAM,IAAI,IAAI,CAAC,EAAE;oBACvD,GAAG,EAAE,cAAc,UAAU,CAAC,MAAM,MAAM,SAAS,CAAC,IAAI,CAAC,IAAI;iBAC9D;aACF;SACF;QACD,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,EAAE;YAC5B,GAAG,EAAE,aAAa,UAAU,CAAC,aAAa,GAAG;YAC7C,SAAS,EAAE;gBACT,CAAC,GAAG,MAAM,OAAO,MAAM,MAAM,IAAI,IAAI,CAAC,EAAE;oBACtC,GAAG,EAAE,kBAAkB,UAAU,CAAC,aAAa,MAAM,SAAS,CAAC,IAAI,CAAC,IAAI;iBACzE;aACF;SACF;KACF;CACF,EACD,YAAY,CACb,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Heading.d.ts b/_lib/app/components/mdx/Heading.d.ts new file mode 100644 index 00000000..f13cfe32 --- /dev/null +++ b/_lib/app/components/mdx/Heading.d.ts @@ -0,0 +1,5 @@ +import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; +export declare function Heading({ level, ...props }: DetailedHTMLProps, HTMLHeadingElement> & { + level: 1 | 2 | 3 | 4 | 5 | 6; +}): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=Heading.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Heading.d.ts.map b/_lib/app/components/mdx/Heading.d.ts.map new file mode 100644 index 00000000..da72eee6 --- /dev/null +++ b/_lib/app/components/mdx/Heading.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Heading.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAInE,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,GAAG,KAAK,EACT,EAAE,iBAAiB,CAAC,cAAc,CAAC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC,GAAG;IAC7E,KAAK,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;CAC7B,8CAQA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Heading.js b/_lib/app/components/mdx/Heading.js new file mode 100644 index 00000000..fd5ffbb7 --- /dev/null +++ b/_lib/app/components/mdx/Heading.js @@ -0,0 +1,9 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import { root, slugTarget } from './Heading.css.js'; +export function Heading({ level, ...props }) { + const Component = `h${level}`; + return (_jsxs(Component, { ...props, id: undefined, className: clsx(props.className, root), children: [_jsx("div", { id: props.id, className: slugTarget }), props.children] })); +} +//# sourceMappingURL=Heading.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Heading.js.map b/_lib/app/components/mdx/Heading.js.map new file mode 100644 index 00000000..d59c43e1 --- /dev/null +++ b/_lib/app/components/mdx/Heading.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Heading.js","sourceRoot":"","sources":["../../../../app/components/mdx/Heading.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA+C,MAAM,OAAO,CAAA;AAEnE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAEnD,MAAM,UAAU,OAAO,CAAC,EACtB,KAAK,EACL,GAAG,KAAK,EAGT;IACC,MAAM,SAAS,GAAG,IAAI,KAAK,EAAS,CAAA;IACpC,OAAO,CACL,MAAC,SAAS,OAAK,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,aACzE,cAAK,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,SAAS,EAAE,UAAU,GAAI,EAC3C,KAAK,CAAC,QAAQ,IACL,CACb,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/HorizontalRule.css.d.ts b/_lib/app/components/mdx/HorizontalRule.css.d.ts new file mode 100644 index 00000000..5c0385ec --- /dev/null +++ b/_lib/app/components/mdx/HorizontalRule.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=HorizontalRule.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/HorizontalRule.css.d.ts.map b/_lib/app/components/mdx/HorizontalRule.css.d.ts.map new file mode 100644 index 00000000..ed7197bb --- /dev/null +++ b/_lib/app/components/mdx/HorizontalRule.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"HorizontalRule.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/HorizontalRule.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,QAGf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/HorizontalRule.css.js b/_lib/app/components/mdx/HorizontalRule.css.js new file mode 100644 index 00000000..71676b8a --- /dev/null +++ b/_lib/app/components/mdx/HorizontalRule.css.js @@ -0,0 +1,7 @@ +import { style } from '@vanilla-extract/css'; +import { semanticColorVars, spaceVars } from '../../styles/vars.css.js'; +export const root = style({ + borderTop: `1px solid ${semanticColorVars.hr}`, + marginBottom: spaceVars['16'], +}); +//# sourceMappingURL=HorizontalRule.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/HorizontalRule.css.js.map b/_lib/app/components/mdx/HorizontalRule.css.js.map new file mode 100644 index 00000000..b5e220ac --- /dev/null +++ b/_lib/app/components/mdx/HorizontalRule.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"HorizontalRule.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/HorizontalRule.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAEvE,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,SAAS,EAAE,aAAa,iBAAiB,CAAC,EAAE,EAAE;IAC9C,YAAY,EAAE,SAAS,CAAC,IAAI,CAAC;CAC9B,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/HorizontalRule.d.ts b/_lib/app/components/mdx/HorizontalRule.d.ts new file mode 100644 index 00000000..d12c2c70 --- /dev/null +++ b/_lib/app/components/mdx/HorizontalRule.d.ts @@ -0,0 +1,3 @@ +import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; +export declare function HorizontalRule(props: DetailedHTMLProps, HTMLHRElement>): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=HorizontalRule.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/HorizontalRule.d.ts.map b/_lib/app/components/mdx/HorizontalRule.d.ts.map new file mode 100644 index 00000000..8b91fece --- /dev/null +++ b/_lib/app/components/mdx/HorizontalRule.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"HorizontalRule.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/HorizontalRule.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAInE,wBAAgB,cAAc,CAC5B,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC,8CAGvE"} \ No newline at end of file diff --git a/_lib/app/components/mdx/HorizontalRule.js b/_lib/app/components/mdx/HorizontalRule.js new file mode 100644 index 00000000..24ee79f6 --- /dev/null +++ b/_lib/app/components/mdx/HorizontalRule.js @@ -0,0 +1,8 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import * as styles from './HorizontalRule.css.js'; +export function HorizontalRule(props) { + return _jsx("hr", { ...props, className: clsx(props.className, styles.root) }); +} +//# sourceMappingURL=HorizontalRule.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/HorizontalRule.js.map b/_lib/app/components/mdx/HorizontalRule.js.map new file mode 100644 index 00000000..23577d0c --- /dev/null +++ b/_lib/app/components/mdx/HorizontalRule.js.map @@ -0,0 +1 @@ +{"version":3,"file":"HorizontalRule.js","sourceRoot":"","sources":["../../../../app/components/mdx/HorizontalRule.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA+C,MAAM,OAAO,CAAA;AAEnE,OAAO,KAAK,MAAM,MAAM,yBAAyB,CAAA;AAEjD,MAAM,UAAU,cAAc,CAC5B,KAAsE;IAEtE,OAAO,gBAAQ,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,GAAI,CAAA;AACzE,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Kbd.css.d.ts b/_lib/app/components/mdx/Kbd.css.d.ts new file mode 100644 index 00000000..43b38c13 --- /dev/null +++ b/_lib/app/components/mdx/Kbd.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=Kbd.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Kbd.css.d.ts.map b/_lib/app/components/mdx/Kbd.css.d.ts.map new file mode 100644 index 00000000..531ee572 --- /dev/null +++ b/_lib/app/components/mdx/Kbd.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Kbd.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Kbd.css.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,IAAI,QAoBf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Kbd.css.js b/_lib/app/components/mdx/Kbd.css.js new file mode 100644 index 00000000..12a9f10e --- /dev/null +++ b/_lib/app/components/mdx/Kbd.css.js @@ -0,0 +1,23 @@ +import { style } from '@vanilla-extract/css'; +import { borderRadiusVars, fontFamilyVars, fontSizeVars, primitiveColorVars, spaceVars, } from '../../styles/vars.css.js'; +export const root = style({ + color: primitiveColorVars.text2, + display: 'inline-block', + borderRadius: borderRadiusVars['3'], + fontSize: fontSizeVars['11'], + fontFamily: fontFamilyVars.default, + fontFeatureSettings: 'cv08', + lineHeight: '105%', + minWidth: '20px', + padding: spaceVars['3'], + paddingLeft: spaceVars['4'], + paddingRight: spaceVars['4'], + paddingTop: spaceVars['3'], + textAlign: 'center', + textTransform: 'capitalize', + verticalAlign: 'baseline', + border: `0.5px solid ${primitiveColorVars.border}`, + backgroundColor: primitiveColorVars.background3, + boxShadow: `${primitiveColorVars.shadow2} 0px 2px 0px 0px`, +}); +//# sourceMappingURL=Kbd.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Kbd.css.js.map b/_lib/app/components/mdx/Kbd.css.js.map new file mode 100644 index 00000000..88b22908 --- /dev/null +++ b/_lib/app/components/mdx/Kbd.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Kbd.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/Kbd.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE5C,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,SAAS,GACV,MAAM,0BAA0B,CAAA;AAEjC,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,KAAK,EAAE,kBAAkB,CAAC,KAAK;IAC/B,OAAO,EAAE,cAAc;IACvB,YAAY,EAAE,gBAAgB,CAAC,GAAG,CAAC;IACnC,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC;IAC5B,UAAU,EAAE,cAAc,CAAC,OAAO;IAClC,mBAAmB,EAAE,MAAM;IAC3B,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,MAAM;IAChB,OAAO,EAAE,SAAS,CAAC,GAAG,CAAC;IACvB,WAAW,EAAE,SAAS,CAAC,GAAG,CAAC;IAC3B,YAAY,EAAE,SAAS,CAAC,GAAG,CAAC;IAC5B,UAAU,EAAE,SAAS,CAAC,GAAG,CAAC;IAC1B,SAAS,EAAE,QAAQ;IACnB,aAAa,EAAE,YAAY;IAC3B,aAAa,EAAE,UAAU;IAEzB,MAAM,EAAE,eAAe,kBAAkB,CAAC,MAAM,EAAE;IAClD,eAAe,EAAE,kBAAkB,CAAC,WAAW;IAC/C,SAAS,EAAE,GAAG,kBAAkB,CAAC,OAAO,kBAAkB;CAC3D,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Kbd.d.ts b/_lib/app/components/mdx/Kbd.d.ts new file mode 100644 index 00000000..c68544f2 --- /dev/null +++ b/_lib/app/components/mdx/Kbd.d.ts @@ -0,0 +1,3 @@ +import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; +export declare function Kbd(props: DetailedHTMLProps, HTMLElement>): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=Kbd.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Kbd.d.ts.map b/_lib/app/components/mdx/Kbd.d.ts.map new file mode 100644 index 00000000..03ce7b0c --- /dev/null +++ b/_lib/app/components/mdx/Kbd.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Kbd.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Kbd.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAInE,wBAAgB,GAAG,CAAC,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,8CAErF"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Kbd.js b/_lib/app/components/mdx/Kbd.js new file mode 100644 index 00000000..a5220c30 --- /dev/null +++ b/_lib/app/components/mdx/Kbd.js @@ -0,0 +1,8 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import * as styles from './Kbd.css.js'; +export function Kbd(props) { + return _jsx("kbd", { ...props, className: clsx(props.className, styles.root) }); +} +//# sourceMappingURL=Kbd.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Kbd.js.map b/_lib/app/components/mdx/Kbd.js.map new file mode 100644 index 00000000..d264a645 --- /dev/null +++ b/_lib/app/components/mdx/Kbd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Kbd.js","sourceRoot":"","sources":["../../../../app/components/mdx/Kbd.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA+C,MAAM,OAAO,CAAA;AAEnE,OAAO,KAAK,MAAM,MAAM,cAAc,CAAA;AAEtC,MAAM,UAAU,GAAG,CAAC,KAAkE;IACpF,OAAO,iBAAS,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,GAAI,CAAA;AAC1E,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/List.css.d.ts b/_lib/app/components/mdx/List.css.d.ts new file mode 100644 index 00000000..a542c176 --- /dev/null +++ b/_lib/app/components/mdx/List.css.d.ts @@ -0,0 +1,4 @@ +export declare const root: string; +export declare const ordered: string; +export declare const unordered: string; +//# sourceMappingURL=List.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/List.css.d.ts.map b/_lib/app/components/mdx/List.css.d.ts.map new file mode 100644 index 00000000..d2a05948 --- /dev/null +++ b/_lib/app/components/mdx/List.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"List.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/List.css.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,IAAI,QASf,CAAA;AAEF,eAAO,MAAM,OAAO,QAenB,CAAA;AAED,eAAO,MAAM,SAAS,QAYrB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/List.css.js b/_lib/app/components/mdx/List.css.js new file mode 100644 index 00000000..ed336c0f --- /dev/null +++ b/_lib/app/components/mdx/List.css.js @@ -0,0 +1,56 @@ +import { globalStyle, style } from '@vanilla-extract/css'; +import { spaceVars } from '../../styles/vars.css.js'; +import { root as H2 } from './H2.css.js'; +import { root as H3 } from './H3.css.js'; +import { root as H4 } from './H4.css.js'; +import { root as H5 } from './H5.css.js'; +import { root as H6 } from './H6.css.js'; +export const root = style({ + selectors: { + [`${H2}+&,${H3}+&,${H4}+&,${H5}+&,${H6}+&`]: { + marginTop: `calc(${spaceVars['8']} * -1)`, + }, + '.vocs_Paragraph + &': { + marginTop: `calc(-1 * ${spaceVars['8']})`, + }, + }, +}); +export const ordered = style({ + listStyle: 'decimal', + paddingLeft: spaceVars['20'], + marginBottom: spaceVars['16'], + selectors: { + '& &': { + listStyle: 'lower-alpha', + }, + '& & &': { + listStyle: 'lower-roman', + }, + }, +}, 'ordered'); +export const unordered = style({ + listStyle: 'disc', + paddingLeft: spaceVars['24'], + marginBottom: spaceVars['16'], + selectors: { + '& &': { + listStyle: 'circle', + }, + }, +}, 'unordered'); +globalStyle([ + `${ordered} ${ordered}`, + `${unordered} ${unordered}`, + `${ordered} ${unordered}`, + `${unordered} ${ordered}`, +].join(','), { + marginBottom: spaceVars['0'], + paddingTop: spaceVars['8'], + paddingLeft: spaceVars['16'], + paddingBottom: spaceVars['0'], +}); +globalStyle(`${unordered}.contains-task-list`, { + listStyle: 'none', + paddingLeft: spaceVars['12'], +}); +//# sourceMappingURL=List.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/List.css.js.map b/_lib/app/components/mdx/List.css.js.map new file mode 100644 index 00000000..e440ef52 --- /dev/null +++ b/_lib/app/components/mdx/List.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"List.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/List.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,EAAE,IAAI,IAAI,EAAE,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,IAAI,IAAI,EAAE,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,IAAI,IAAI,EAAE,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,IAAI,IAAI,EAAE,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,IAAI,IAAI,EAAE,EAAE,MAAM,aAAa,CAAA;AAExC,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,SAAS,EAAE;QACT,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;YAC3C,SAAS,EAAE,QAAQ,SAAS,CAAC,GAAG,CAAC,QAAQ;SAC1C;QACD,qBAAqB,EAAE;YACrB,SAAS,EAAE,aAAa,SAAS,CAAC,GAAG,CAAC,GAAG;SAC1C;KACF;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAC1B;IACE,SAAS,EAAE,SAAS;IACpB,WAAW,EAAE,SAAS,CAAC,IAAI,CAAC;IAC5B,YAAY,EAAE,SAAS,CAAC,IAAI,CAAC;IAC7B,SAAS,EAAE;QACT,KAAK,EAAE;YACL,SAAS,EAAE,aAAa;SACzB;QACD,OAAO,EAAE;YACP,SAAS,EAAE,aAAa;SACzB;KACF;CACF,EACD,SAAS,CACV,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAC5B;IACE,SAAS,EAAE,MAAM;IACjB,WAAW,EAAE,SAAS,CAAC,IAAI,CAAC;IAC5B,YAAY,EAAE,SAAS,CAAC,IAAI,CAAC;IAC7B,SAAS,EAAE;QACT,KAAK,EAAE;YACL,SAAS,EAAE,QAAQ;SACpB;KACF;CACF,EACD,WAAW,CACZ,CAAA;AAED,WAAW,CACT;IACE,GAAG,OAAO,IAAI,OAAO,EAAE;IACvB,GAAG,SAAS,IAAI,SAAS,EAAE;IAC3B,GAAG,OAAO,IAAI,SAAS,EAAE;IACzB,GAAG,SAAS,IAAI,OAAO,EAAE;CAC1B,CAAC,IAAI,CAAC,GAAG,CAAC,EACX;IACE,YAAY,EAAE,SAAS,CAAC,GAAG,CAAC;IAC5B,UAAU,EAAE,SAAS,CAAC,GAAG,CAAC;IAC1B,WAAW,EAAE,SAAS,CAAC,IAAI,CAAC;IAC5B,aAAa,EAAE,SAAS,CAAC,GAAG,CAAC;CAC9B,CACF,CAAA;AAED,WAAW,CAAC,GAAG,SAAS,qBAAqB,EAAE;IAC7C,SAAS,EAAE,MAAM;IACjB,WAAW,EAAE,SAAS,CAAC,IAAI,CAAC;CAC7B,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/List.d.ts b/_lib/app/components/mdx/List.d.ts new file mode 100644 index 00000000..b022618d --- /dev/null +++ b/_lib/app/components/mdx/List.d.ts @@ -0,0 +1,5 @@ +import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; +export declare function List({ ordered, ...props }: DetailedHTMLProps, any> & { + ordered?: boolean; +}): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=List.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/List.d.ts.map b/_lib/app/components/mdx/List.d.ts.map new file mode 100644 index 00000000..899fe433 --- /dev/null +++ b/_lib/app/components/mdx/List.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/List.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAInE,wBAAgB,IAAI,CAAC,EACnB,OAAO,EACP,GAAG,KAAK,EACT,EAAE,iBAAiB,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,8CAQrE"} \ No newline at end of file diff --git a/_lib/app/components/mdx/List.js b/_lib/app/components/mdx/List.js new file mode 100644 index 00000000..dbebff08 --- /dev/null +++ b/_lib/app/components/mdx/List.js @@ -0,0 +1,9 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import * as styles from './List.css.js'; +export function List({ ordered, ...props }) { + const Element = ordered ? 'ol' : 'ul'; + return (_jsx(Element, { ...props, className: clsx(props.className, styles.root, ordered ? styles.ordered : styles.unordered) })); +} +//# sourceMappingURL=List.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/List.js.map b/_lib/app/components/mdx/List.js.map new file mode 100644 index 00000000..86e25f03 --- /dev/null +++ b/_lib/app/components/mdx/List.js.map @@ -0,0 +1 @@ +{"version":3,"file":"List.js","sourceRoot":"","sources":["../../../../app/components/mdx/List.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA+C,MAAM,OAAO,CAAA;AAEnE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,MAAM,UAAU,IAAI,CAAC,EACnB,OAAO,EACP,GAAG,KAAK,EAC4D;IACpE,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA;IACrC,OAAO,CACL,KAAC,OAAO,OACF,KAAK,EACT,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,GAC1F,CACH,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/ListItem.css.d.ts b/_lib/app/components/mdx/ListItem.css.d.ts new file mode 100644 index 00000000..3ffc3bf0 --- /dev/null +++ b/_lib/app/components/mdx/ListItem.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=ListItem.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/ListItem.css.d.ts.map b/_lib/app/components/mdx/ListItem.css.d.ts.map new file mode 100644 index 00000000..0873794d --- /dev/null +++ b/_lib/app/components/mdx/ListItem.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ListItem.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/ListItem.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,QAOf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/ListItem.css.js b/_lib/app/components/mdx/ListItem.css.js new file mode 100644 index 00000000..1c4a4813 --- /dev/null +++ b/_lib/app/components/mdx/ListItem.css.js @@ -0,0 +1,11 @@ +import { style } from '@vanilla-extract/css'; +import { lineHeightVars } from '../../styles/vars.css.js'; +export const root = style({ + lineHeight: lineHeightVars.listItem, + selectors: { + '&:not(:last-child)': { + marginBottom: '0.5em', + }, + }, +}); +//# sourceMappingURL=ListItem.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/ListItem.css.js.map b/_lib/app/components/mdx/ListItem.css.js.map new file mode 100644 index 00000000..5f32f105 --- /dev/null +++ b/_lib/app/components/mdx/ListItem.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ListItem.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/ListItem.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAEzD,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,UAAU,EAAE,cAAc,CAAC,QAAQ;IACnC,SAAS,EAAE;QACT,oBAAoB,EAAE;YACpB,YAAY,EAAE,OAAO;SACtB;KACF;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/ListItem.d.ts b/_lib/app/components/mdx/ListItem.d.ts new file mode 100644 index 00000000..69264078 --- /dev/null +++ b/_lib/app/components/mdx/ListItem.d.ts @@ -0,0 +1,3 @@ +import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; +export declare function ListItem(props: DetailedHTMLProps, HTMLLIElement>): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=ListItem.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/ListItem.d.ts.map b/_lib/app/components/mdx/ListItem.d.ts.map new file mode 100644 index 00000000..17c76847 --- /dev/null +++ b/_lib/app/components/mdx/ListItem.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/ListItem.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAInE,wBAAgB,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC,8CAE9F"} \ No newline at end of file diff --git a/_lib/app/components/mdx/ListItem.js b/_lib/app/components/mdx/ListItem.js new file mode 100644 index 00000000..84667009 --- /dev/null +++ b/_lib/app/components/mdx/ListItem.js @@ -0,0 +1,8 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import * as styles from './ListItem.css.js'; +export function ListItem(props) { + return _jsx("li", { ...props, className: clsx(props.className, styles.root) }); +} +//# sourceMappingURL=ListItem.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/ListItem.js.map b/_lib/app/components/mdx/ListItem.js.map new file mode 100644 index 00000000..419ab99b --- /dev/null +++ b/_lib/app/components/mdx/ListItem.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ListItem.js","sourceRoot":"","sources":["../../../../app/components/mdx/ListItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA+C,MAAM,OAAO,CAAA;AAEnE,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAA;AAE3C,MAAM,UAAU,QAAQ,CAAC,KAAsE;IAC7F,OAAO,gBAAQ,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,GAAI,CAAA;AACzE,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Paragraph.css.d.ts b/_lib/app/components/mdx/Paragraph.css.d.ts new file mode 100644 index 00000000..7f8db053 --- /dev/null +++ b/_lib/app/components/mdx/Paragraph.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=Paragraph.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Paragraph.css.d.ts.map b/_lib/app/components/mdx/Paragraph.css.d.ts.map new file mode 100644 index 00000000..ea62f3cc --- /dev/null +++ b/_lib/app/components/mdx/Paragraph.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Paragraph.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Paragraph.css.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,IAAI,QAgBf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Paragraph.css.js b/_lib/app/components/mdx/Paragraph.css.js new file mode 100644 index 00000000..24e4a8cc --- /dev/null +++ b/_lib/app/components/mdx/Paragraph.css.js @@ -0,0 +1,27 @@ +import { style } from '@vanilla-extract/css'; +import { lineHeightVars, semanticColorVars, spaceVars } from '../../styles/vars.css.js'; +import { root as Blockquote } from './Blockquote.css.js'; +import { root as H2 } from './H2.css.js'; +import { root as H3 } from './H3.css.js'; +import { root as H4 } from './H4.css.js'; +import { root as H5 } from './H5.css.js'; +import { root as H6 } from './H6.css.js'; +import { root as List } from './List.css.js'; +export const root = style({ + lineHeight: lineHeightVars.paragraph, + get selectors() { + return { + [`${Blockquote}>&`]: { + color: semanticColorVars.blockquoteText, + marginBottom: spaceVars['8'], + }, + [`${H2}+&,${H3}+&,${H4}+&,${H5}+&,${H6}+&,${List}+&`]: { + marginTop: `calc(${spaceVars['8']} * -1)`, + }, + [`${root} + ${root}`]: { + marginTop: `calc(-1 * ${spaceVars['8']})`, + }, + }; + }, +}); +//# sourceMappingURL=Paragraph.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Paragraph.css.js.map b/_lib/app/components/mdx/Paragraph.css.js.map new file mode 100644 index 00000000..2977d2fb --- /dev/null +++ b/_lib/app/components/mdx/Paragraph.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Paragraph.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/Paragraph.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE5C,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACvF,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,EAAE,IAAI,IAAI,EAAE,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,IAAI,IAAI,EAAE,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,IAAI,IAAI,EAAE,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,IAAI,IAAI,EAAE,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,IAAI,IAAI,EAAE,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,IAAI,IAAI,IAAI,EAAE,MAAM,eAAe,CAAA;AAE5C,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,UAAU,EAAE,cAAc,CAAC,SAAS;IACpC,IAAI,SAAS;QACX,OAAO;YACL,CAAC,GAAG,UAAU,IAAI,CAAC,EAAE;gBACnB,KAAK,EAAE,iBAAiB,CAAC,cAAc;gBACvC,YAAY,EAAE,SAAS,CAAC,GAAG,CAAC;aAC7B;YACD,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,IAAI,IAAI,CAAC,EAAE;gBACrD,SAAS,EAAE,QAAQ,SAAS,CAAC,GAAG,CAAC,QAAQ;aAC1C;YACD,CAAC,GAAG,IAAI,MAAM,IAAI,EAAE,CAAC,EAAE;gBACrB,SAAS,EAAE,aAAa,SAAS,CAAC,GAAG,CAAC,GAAG;aAC1C;SACF,CAAA;IACH,CAAC;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Paragraph.d.ts b/_lib/app/components/mdx/Paragraph.d.ts new file mode 100644 index 00000000..adea61a3 --- /dev/null +++ b/_lib/app/components/mdx/Paragraph.d.ts @@ -0,0 +1,3 @@ +import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; +export declare function Paragraph(props: DetailedHTMLProps, HTMLParagraphElement>): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=Paragraph.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Paragraph.d.ts.map b/_lib/app/components/mdx/Paragraph.d.ts.map new file mode 100644 index 00000000..f68bca97 --- /dev/null +++ b/_lib/app/components/mdx/Paragraph.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Paragraph.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Paragraph.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAInE,wBAAgB,SAAS,CACvB,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC,8CAGrF"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Paragraph.js b/_lib/app/components/mdx/Paragraph.js new file mode 100644 index 00000000..2b538c38 --- /dev/null +++ b/_lib/app/components/mdx/Paragraph.js @@ -0,0 +1,8 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import * as styles from './Paragraph.css.js'; +export function Paragraph(props) { + return _jsx("p", { ...props, className: clsx(props.className, styles.root) }); +} +//# sourceMappingURL=Paragraph.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Paragraph.js.map b/_lib/app/components/mdx/Paragraph.js.map new file mode 100644 index 00000000..49905bec --- /dev/null +++ b/_lib/app/components/mdx/Paragraph.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Paragraph.js","sourceRoot":"","sources":["../../../../app/components/mdx/Paragraph.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA+C,MAAM,OAAO,CAAA;AAEnE,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAA;AAE5C,MAAM,UAAU,SAAS,CACvB,KAAoF;IAEpF,OAAO,eAAO,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,GAAI,CAAA;AACxE,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Pre.css.d.ts b/_lib/app/components/mdx/Pre.css.d.ts new file mode 100644 index 00000000..f9afd1e2 --- /dev/null +++ b/_lib/app/components/mdx/Pre.css.d.ts @@ -0,0 +1,3 @@ +export declare const root: string; +export declare const wrapper: string; +//# sourceMappingURL=Pre.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Pre.css.d.ts.map b/_lib/app/components/mdx/Pre.css.d.ts.map new file mode 100644 index 00000000..bd7964ee --- /dev/null +++ b/_lib/app/components/mdx/Pre.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Pre.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Pre.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,QAAY,CAAA;AAE7B,eAAO,MAAM,OAAO,QAKnB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Pre.css.js b/_lib/app/components/mdx/Pre.css.js new file mode 100644 index 00000000..d6bc2bac --- /dev/null +++ b/_lib/app/components/mdx/Pre.css.js @@ -0,0 +1,6 @@ +import { style } from '@vanilla-extract/css'; +export const root = style({}); +export const wrapper = style({ + position: 'relative', +}, 'wrapper'); +//# sourceMappingURL=Pre.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Pre.css.js.map b/_lib/app/components/mdx/Pre.css.js.map new file mode 100644 index 00000000..1bb2f6b3 --- /dev/null +++ b/_lib/app/components/mdx/Pre.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Pre.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/Pre.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE5C,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC,EAAE,CAAC,CAAA;AAE7B,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAC1B;IACE,QAAQ,EAAE,UAAU;CACrB,EACD,SAAS,CACV,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Pre.d.ts b/_lib/app/components/mdx/Pre.d.ts new file mode 100644 index 00000000..096145c3 --- /dev/null +++ b/_lib/app/components/mdx/Pre.d.ts @@ -0,0 +1,6 @@ +import { type DetailedHTMLProps, type HTMLAttributes, type ReactNode } from 'react'; +export declare function Pre({ children, className, ...props }: DetailedHTMLProps, HTMLPreElement> & { + 'data-lang'?: string; + 'data-title'?: string; +}): string | number | boolean | Iterable | import("react/jsx-runtime.js").JSX.Element | null | undefined; +//# sourceMappingURL=Pre.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Pre.d.ts.map b/_lib/app/components/mdx/Pre.d.ts.map new file mode 100644 index 00000000..203a96aa --- /dev/null +++ b/_lib/app/components/mdx/Pre.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Pre.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Pre.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAA;AAQ5F,wBAAgB,GAAG,CAAC,EAClB,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,iBAAiB,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC,GAAG;IACrE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,mHAyCA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Pre.js b/_lib/app/components/mdx/Pre.js new file mode 100644 index 00000000..a6bb3865 --- /dev/null +++ b/_lib/app/components/mdx/Pre.js @@ -0,0 +1,36 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import { useMemo } from 'react'; +import { useCopyCode } from '../../hooks/useCopyCode.js'; +import { CopyButton } from '../CopyButton.js'; +import { CodeBlock } from './CodeBlock.js'; +import { CodeTitle } from './CodeTitle.js'; +import * as styles from './Pre.css.js'; +export function Pre({ children, className, ...props }) { + const { copied, copy, ref } = useCopyCode(); + function recurseChildren(children) { + if (!children) + return children; + if (typeof children !== 'object') + return children; + if ('props' in children) + return { + ...children, + props: { + ...children.props, + children: Array.isArray(children.props.children) + ? children.props.children.map(recurseChildren) + : recurseChildren(children.props.children), + }, + }; + return children; + } + const children_ = useMemo(() => recurseChildren(children), [children]); + const wrap = (children) => { + if (className?.includes('shiki')) + return (_jsxs(CodeBlock, { children: [props['data-title'] && (_jsx(CodeTitle, { language: props['data-lang'], children: props['data-title'] })), children] })); + return children; + }; + return wrap(_jsx("div", { className: clsx(styles.wrapper), children: _jsxs("pre", { ref: ref, ...props, className: clsx(className, styles.root), children: ['data-language' in props && _jsx(CopyButton, { copied: copied, copy: copy }), children_] }) })); +} +//# sourceMappingURL=Pre.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Pre.js.map b/_lib/app/components/mdx/Pre.js.map new file mode 100644 index 00000000..b1294e10 --- /dev/null +++ b/_lib/app/components/mdx/Pre.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Pre.js","sourceRoot":"","sources":["../../../../app/components/mdx/Pre.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA+D,OAAO,EAAE,MAAM,OAAO,CAAA;AAE5F,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,KAAK,MAAM,MAAM,cAAc,CAAA;AAEtC,MAAM,UAAU,GAAG,CAAC,EAClB,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EAIT;IACC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,WAAW,EAAE,CAAA;IAE3C,SAAS,eAAe,CAAC,QAAmB;QAC1C,IAAI,CAAC,QAAQ;YAAE,OAAO,QAAQ,CAAA;QAC9B,IAAI,OAAO,QAAQ,KAAK,QAAQ;YAAE,OAAO,QAAQ,CAAA;QACjD,IAAI,OAAO,IAAI,QAAQ;YACrB,OAAO;gBACL,GAAG,QAAQ;gBACX,KAAK,EAAE;oBACL,GAAG,QAAQ,CAAC,KAAK;oBACjB,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;wBAC9C,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,eAAe,CAAC;wBAC9C,CAAC,CAAC,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;iBAC7C;aACF,CAAA;QACH,OAAO,QAAQ,CAAA;IACjB,CAAC;IACD,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAA;IAEtE,MAAM,IAAI,GAAG,CAAC,QAAmB,EAAE,EAAE;QACnC,IAAI,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC;YAC9B,OAAO,CACL,MAAC,SAAS,eACP,KAAK,CAAC,YAAY,CAAC,IAAI,CACtB,KAAC,SAAS,IAAC,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,YAAG,KAAK,CAAC,YAAY,CAAC,GAAa,CAC3E,EACA,QAAQ,IACC,CACb,CAAA;QACH,OAAO,QAAQ,CAAA;IACjB,CAAC,CAAA;IAED,OAAO,IAAI,CACT,cAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,YAClC,eAAK,GAAG,EAAE,GAAG,KAAM,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,aAC9D,eAAe,IAAI,KAAK,IAAI,KAAC,UAAU,IAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAI,EACtE,SAAS,IACN,GACF,CACP,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Section.css.d.ts b/_lib/app/components/mdx/Section.css.d.ts new file mode 100644 index 00000000..74b962b2 --- /dev/null +++ b/_lib/app/components/mdx/Section.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=Section.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Section.css.d.ts.map b/_lib/app/components/mdx/Section.css.d.ts.map new file mode 100644 index 00000000..00438dde --- /dev/null +++ b/_lib/app/components/mdx/Section.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Section.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Section.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,QAIf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Section.css.js b/_lib/app/components/mdx/Section.css.js new file mode 100644 index 00000000..04568102 --- /dev/null +++ b/_lib/app/components/mdx/Section.css.js @@ -0,0 +1,8 @@ +import { style } from '@vanilla-extract/css'; +import { primitiveColorVars, spaceVars } from '../../styles/vars.css.js'; +export const root = style({ + borderTop: `1px solid ${primitiveColorVars.border}`, + marginTop: spaceVars['56'], + paddingTop: spaceVars['24'], +}); +//# sourceMappingURL=Section.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Section.css.js.map b/_lib/app/components/mdx/Section.css.js.map new file mode 100644 index 00000000..c939cc26 --- /dev/null +++ b/_lib/app/components/mdx/Section.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Section.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/Section.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAExE,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,SAAS,EAAE,aAAa,kBAAkB,CAAC,MAAM,EAAE;IACnD,SAAS,EAAE,SAAS,CAAC,IAAI,CAAC;IAC1B,UAAU,EAAE,SAAS,CAAC,IAAI,CAAC;CAC5B,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Section.d.ts b/_lib/app/components/mdx/Section.d.ts new file mode 100644 index 00000000..7ce38adc --- /dev/null +++ b/_lib/app/components/mdx/Section.d.ts @@ -0,0 +1,3 @@ +import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; +export declare function Section(props: DetailedHTMLProps, HTMLElement>): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=Section.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Section.d.ts.map b/_lib/app/components/mdx/Section.d.ts.map new file mode 100644 index 00000000..dac3d99e --- /dev/null +++ b/_lib/app/components/mdx/Section.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Section.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Section.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAKnE,wBAAgB,OAAO,CAAC,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,8CAIzF"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Section.js b/_lib/app/components/mdx/Section.js new file mode 100644 index 00000000..b6582872 --- /dev/null +++ b/_lib/app/components/mdx/Section.js @@ -0,0 +1,11 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import { Footnotes } from './Footnotes.js'; +import * as styles from './Section.css.js'; +export function Section(props) { + if ('data-footnotes' in props) + return _jsx(Footnotes, { ...props, className: clsx(props.className, styles.root) }); + return _jsx("section", { ...props, className: clsx(props.className, styles.root) }); +} +//# sourceMappingURL=Section.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Section.js.map b/_lib/app/components/mdx/Section.js.map new file mode 100644 index 00000000..d8dcc0f5 --- /dev/null +++ b/_lib/app/components/mdx/Section.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Section.js","sourceRoot":"","sources":["../../../../app/components/mdx/Section.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA+C,MAAM,OAAO,CAAA;AAEnE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAA;AAE1C,MAAM,UAAU,OAAO,CAAC,KAAkE;IACxF,IAAI,gBAAgB,IAAI,KAAK;QAC3B,OAAO,KAAC,SAAS,OAAK,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,GAAI,CAAA;IAChF,OAAO,qBAAa,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,GAAI,CAAA;AAC9E,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Span.css.d.ts b/_lib/app/components/mdx/Span.css.d.ts new file mode 100644 index 00000000..6371e1e5 --- /dev/null +++ b/_lib/app/components/mdx/Span.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=Span.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Span.css.d.ts.map b/_lib/app/components/mdx/Span.css.d.ts.map new file mode 100644 index 00000000..0a17a0b1 --- /dev/null +++ b/_lib/app/components/mdx/Span.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Span.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Span.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,QAAY,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Span.css.js b/_lib/app/components/mdx/Span.css.js new file mode 100644 index 00000000..978d33da --- /dev/null +++ b/_lib/app/components/mdx/Span.css.js @@ -0,0 +1,3 @@ +import { style } from '@vanilla-extract/css'; +export const root = style({}); +//# sourceMappingURL=Span.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Span.css.js.map b/_lib/app/components/mdx/Span.css.js.map new file mode 100644 index 00000000..73c54b1e --- /dev/null +++ b/_lib/app/components/mdx/Span.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Span.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/Span.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE5C,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC,EAAE,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Span.d.ts b/_lib/app/components/mdx/Span.d.ts new file mode 100644 index 00000000..1bf73dcd --- /dev/null +++ b/_lib/app/components/mdx/Span.d.ts @@ -0,0 +1,3 @@ +import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; +export declare function Span(props: DetailedHTMLProps, HTMLSpanElement>): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=Span.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Span.d.ts.map b/_lib/app/components/mdx/Span.d.ts.map new file mode 100644 index 00000000..52c71d57 --- /dev/null +++ b/_lib/app/components/mdx/Span.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Span.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Span.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAKnE,wBAAgB,IAAI,CAAC,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,eAAe,CAAC,8CAM9F"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Span.js b/_lib/app/components/mdx/Span.js new file mode 100644 index 00000000..49889f6e --- /dev/null +++ b/_lib/app/components/mdx/Span.js @@ -0,0 +1,12 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import * as styles from './Span.css.js'; +import { TwoslashPopover } from './TwoslashPopover.js'; +export function Span(props) { + const className = clsx(props.className, styles.root); + if (props.className?.includes('twoslash-hover')) + return _jsx(TwoslashPopover, { ...props, className: className }); + return _jsx("span", { ...props, className: clsx(props.className, styles.root) }); +} +//# sourceMappingURL=Span.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Span.js.map b/_lib/app/components/mdx/Span.js.map new file mode 100644 index 00000000..6eea239f --- /dev/null +++ b/_lib/app/components/mdx/Span.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Span.js","sourceRoot":"","sources":["../../../../app/components/mdx/Span.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA+C,MAAM,OAAO,CAAA;AAEnE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAEtD,MAAM,UAAU,IAAI,CAAC,KAA0E;IAC7F,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;IAEpD,IAAI,KAAK,CAAC,SAAS,EAAE,QAAQ,CAAC,gBAAgB,CAAC;QAC7C,OAAO,KAAC,eAAe,OAAM,KAAa,EAAE,SAAS,EAAE,SAAS,GAAI,CAAA;IACtE,OAAO,kBAAU,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,GAAI,CAAA;AAC3E,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Steps.d.ts b/_lib/app/components/mdx/Steps.d.ts new file mode 100644 index 00000000..22e64db5 --- /dev/null +++ b/_lib/app/components/mdx/Steps.d.ts @@ -0,0 +1,5 @@ +import { type ReactNode } from 'react'; +export declare function Steps({ children }: { + children: ReactNode; +}): import("react/jsx-runtime.js").JSX.Element | null; +//# sourceMappingURL=Steps.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Steps.d.ts.map b/_lib/app/components/mdx/Steps.d.ts.map new file mode 100644 index 00000000..80ef9f1b --- /dev/null +++ b/_lib/app/components/mdx/Steps.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Steps.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Steps.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAgB,MAAM,OAAO,CAAA;AAMpD,wBAAgB,KAAK,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,qDAgB1D"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Steps.js b/_lib/app/components/mdx/Steps.js new file mode 100644 index 00000000..be9123f3 --- /dev/null +++ b/_lib/app/components/mdx/Steps.js @@ -0,0 +1,16 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { cloneElement } from 'react'; +import * as stepStyles from '../Step.css.js'; +import { Step } from '../Step.js'; +import { Steps as Steps_ } from '../Steps.js'; +export function Steps({ children }) { + if (!Array.isArray(children)) + return null; + return (_jsx(Steps_, { children: children.map(({ props }, i) => { + const [title, ...children] = Array.isArray(props.children) + ? props.children + : [props.children]; + return (_jsx(Step, { title: cloneElement(title, { className: stepStyles.title }), children: children }, i)); + }) })); +} +//# sourceMappingURL=Steps.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Steps.js.map b/_lib/app/components/mdx/Steps.js.map new file mode 100644 index 00000000..cec6b20b --- /dev/null +++ b/_lib/app/components/mdx/Steps.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Steps.js","sourceRoot":"","sources":["../../../../app/components/mdx/Steps.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkB,YAAY,EAAE,MAAM,OAAO,CAAA;AAEpD,OAAO,KAAK,UAAU,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AACjC,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,aAAa,CAAA;AAE7C,MAAM,UAAU,KAAK,CAAC,EAAE,QAAQ,EAA2B;IACzD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC;QAAE,OAAO,IAAI,CAAA;IACzC,OAAO,CACL,KAAC,MAAM,cACJ,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE;YAC7B,MAAM,CAAC,KAAK,EAAE,GAAG,QAAQ,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC;gBACxD,CAAC,CAAC,KAAK,CAAC,QAAQ;gBAChB,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;YACpB,OAAO,CACL,KAAC,IAAI,IAAS,KAAK,EAAE,YAAY,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,UAAU,CAAC,KAAK,EAAE,CAAC,YACtE,QAAQ,IADA,CAAC,CAEL,CACR,CAAA;QACH,CAAC,CAAC,GACK,CACV,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Strong.css.d.ts b/_lib/app/components/mdx/Strong.css.d.ts new file mode 100644 index 00000000..8c3e5c66 --- /dev/null +++ b/_lib/app/components/mdx/Strong.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=Strong.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Strong.css.d.ts.map b/_lib/app/components/mdx/Strong.css.d.ts.map new file mode 100644 index 00000000..493ed932 --- /dev/null +++ b/_lib/app/components/mdx/Strong.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Strong.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Strong.css.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,IAAI,QAWf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Strong.css.js b/_lib/app/components/mdx/Strong.css.js new file mode 100644 index 00000000..9076b0b9 --- /dev/null +++ b/_lib/app/components/mdx/Strong.css.js @@ -0,0 +1,17 @@ +import { style } from '@vanilla-extract/css'; +import { fontWeightVars, spaceVars } from '../../styles/vars.css.js'; +import { root as Callout } from '../Callout.css.js'; +import { root as Content } from '../Content.css.js'; +export const root = style({ + fontWeight: fontWeightVars.semibold, + selectors: { + [`${Content} > &`]: { + display: 'block', + }, + [`${Callout} > &`]: { + display: 'block', + marginBottom: spaceVars['4'], + }, + }, +}); +//# sourceMappingURL=Strong.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Strong.css.js.map b/_lib/app/components/mdx/Strong.css.js.map new file mode 100644 index 00000000..ba2ed56a --- /dev/null +++ b/_lib/app/components/mdx/Strong.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Strong.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/Strong.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE5C,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACpE,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAEnD,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,UAAU,EAAE,cAAc,CAAC,QAAQ;IACnC,SAAS,EAAE;QACT,CAAC,GAAG,OAAO,MAAM,CAAC,EAAE;YAClB,OAAO,EAAE,OAAO;SACjB;QACD,CAAC,GAAG,OAAO,MAAM,CAAC,EAAE;YAClB,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE,SAAS,CAAC,GAAG,CAAC;SAC7B;KACF;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Strong.d.ts b/_lib/app/components/mdx/Strong.d.ts new file mode 100644 index 00000000..2a1abc86 --- /dev/null +++ b/_lib/app/components/mdx/Strong.d.ts @@ -0,0 +1,3 @@ +import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; +export declare function Strong(props: DetailedHTMLProps, HTMLElement>): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=Strong.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Strong.d.ts.map b/_lib/app/components/mdx/Strong.d.ts.map new file mode 100644 index 00000000..395b3b13 --- /dev/null +++ b/_lib/app/components/mdx/Strong.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Strong.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Strong.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAKnE,wBAAgB,MAAM,CAAC,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,8CAUxF"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Strong.js b/_lib/app/components/mdx/Strong.js new file mode 100644 index 00000000..40da7315 --- /dev/null +++ b/_lib/app/components/mdx/Strong.js @@ -0,0 +1,11 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import { CalloutTitle } from '../CalloutTitle.js'; +import * as styles from './Strong.css.js'; +export function Strong(props) { + if ('data-callout-title' in props && typeof props.children === 'string') + return (_jsx(CalloutTitle, { ...props, className: clsx(props.className, styles.root), children: props.children })); + return _jsx("strong", { ...props, className: clsx(props.className, styles.root) }); +} +//# sourceMappingURL=Strong.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Strong.js.map b/_lib/app/components/mdx/Strong.js.map new file mode 100644 index 00000000..d61fc9f7 --- /dev/null +++ b/_lib/app/components/mdx/Strong.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Strong.js","sourceRoot":"","sources":["../../../../app/components/mdx/Strong.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA+C,MAAM,OAAO,CAAA;AAEnE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAA;AAEzC,MAAM,UAAU,MAAM,CAAC,KAAkE;IACvF,IAAI,oBAAoB,IAAI,KAAK,IAAI,OAAO,KAAK,CAAC,QAAQ,KAAK,QAAQ;QACrE,OAAO,CACL,KAAC,YAAY,OACP,KAAK,EACT,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,EAC7C,QAAQ,EAAE,KAAK,CAAC,QAAQ,GACxB,CACH,CAAA;IACH,OAAO,oBAAY,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,GAAI,CAAA;AAC7E,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Subtitle.css.d.ts b/_lib/app/components/mdx/Subtitle.css.d.ts new file mode 100644 index 00000000..c579e602 --- /dev/null +++ b/_lib/app/components/mdx/Subtitle.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=Subtitle.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Subtitle.css.d.ts.map b/_lib/app/components/mdx/Subtitle.css.d.ts.map new file mode 100644 index 00000000..e4916048 --- /dev/null +++ b/_lib/app/components/mdx/Subtitle.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Subtitle.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Subtitle.css.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,IAAI,QASf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Subtitle.css.js b/_lib/app/components/mdx/Subtitle.css.js new file mode 100644 index 00000000..0570babd --- /dev/null +++ b/_lib/app/components/mdx/Subtitle.css.js @@ -0,0 +1,13 @@ +import { style } from '@vanilla-extract/css'; +import { fontSizeVars, fontWeightVars, lineHeightVars, primitiveColorVars, spaceVars, } from '../../styles/vars.css.js'; +export const root = style({ + color: primitiveColorVars.text2, + fontSize: fontSizeVars.subtitle, + fontWeight: fontWeightVars.regular, + letterSpacing: '-0.02em', + lineHeight: lineHeightVars.heading, + marginTop: spaceVars['4'], + // @ts-expect-error + textWrap: 'balance', +}); +//# sourceMappingURL=Subtitle.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Subtitle.css.js.map b/_lib/app/components/mdx/Subtitle.css.js.map new file mode 100644 index 00000000..f8380e13 --- /dev/null +++ b/_lib/app/components/mdx/Subtitle.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Subtitle.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/Subtitle.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,SAAS,GACV,MAAM,0BAA0B,CAAA;AAEjC,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,KAAK,EAAE,kBAAkB,CAAC,KAAK;IAC/B,QAAQ,EAAE,YAAY,CAAC,QAAQ;IAC/B,UAAU,EAAE,cAAc,CAAC,OAAO;IAClC,aAAa,EAAE,SAAS;IACxB,UAAU,EAAE,cAAc,CAAC,OAAO;IAClC,SAAS,EAAE,SAAS,CAAC,GAAG,CAAC;IACzB,mBAAmB;IACnB,QAAQ,EAAE,SAAS;CACpB,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Subtitle.d.ts b/_lib/app/components/mdx/Subtitle.d.ts new file mode 100644 index 00000000..4755f91b --- /dev/null +++ b/_lib/app/components/mdx/Subtitle.d.ts @@ -0,0 +1,5 @@ +import type { ReactNode } from 'react'; +export declare function Subtitle({ children }: { + children: ReactNode; +}): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=Subtitle.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Subtitle.d.ts.map b/_lib/app/components/mdx/Subtitle.d.ts.map new file mode 100644 index 00000000..69812302 --- /dev/null +++ b/_lib/app/components/mdx/Subtitle.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Subtitle.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Subtitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItC,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,8CAM7D"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Subtitle.js b/_lib/app/components/mdx/Subtitle.js new file mode 100644 index 00000000..49d1bf27 --- /dev/null +++ b/_lib/app/components/mdx/Subtitle.js @@ -0,0 +1,6 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import * as styles from './Subtitle.css.js'; +export function Subtitle({ children }) { + return (_jsx("div", { className: styles.root, role: "doc-subtitle", children: children })); +} +//# sourceMappingURL=Subtitle.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Subtitle.js.map b/_lib/app/components/mdx/Subtitle.js.map new file mode 100644 index 00000000..64b58558 --- /dev/null +++ b/_lib/app/components/mdx/Subtitle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Subtitle.js","sourceRoot":"","sources":["../../../../app/components/mdx/Subtitle.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAA;AAE3C,MAAM,UAAU,QAAQ,CAAC,EAAE,QAAQ,EAA2B;IAC5D,OAAO,CACL,cAAK,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,EAAC,cAAc,YAC7C,QAAQ,GACL,CACP,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Summary.css.d.ts b/_lib/app/components/mdx/Summary.css.d.ts new file mode 100644 index 00000000..06304dfd --- /dev/null +++ b/_lib/app/components/mdx/Summary.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=Summary.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Summary.css.d.ts.map b/_lib/app/components/mdx/Summary.css.d.ts.map new file mode 100644 index 00000000..dc3c7c53 --- /dev/null +++ b/_lib/app/components/mdx/Summary.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Summary.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Summary.css.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,IAAI,QAgBf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Summary.css.js b/_lib/app/components/mdx/Summary.css.js new file mode 100644 index 00000000..3a7ccd71 --- /dev/null +++ b/_lib/app/components/mdx/Summary.css.js @@ -0,0 +1,22 @@ +import { style } from '@vanilla-extract/css'; +import { fontWeightVars, spaceVars } from '../../styles/vars.css.js'; +import { root as Callout } from '../Callout.css.js'; +import { root as Details } from './Details.css.js'; +export const root = style({ + cursor: 'pointer', + selectors: { + '&&:hover': { + textDecoration: 'underline', + }, + [`${Details}[open] &`]: { + marginBottom: spaceVars['4'], + }, + [`${Callout} &`]: { + fontWeight: fontWeightVars.medium, + }, + [`${Details} &&`]: { + marginBottom: 0, + }, + }, +}); +//# sourceMappingURL=Summary.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Summary.css.js.map b/_lib/app/components/mdx/Summary.css.js.map new file mode 100644 index 00000000..d4478ff0 --- /dev/null +++ b/_lib/app/components/mdx/Summary.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Summary.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/Summary.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE5C,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACpE,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAElD,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,MAAM,EAAE,SAAS;IACjB,SAAS,EAAE;QACT,UAAU,EAAE;YACV,cAAc,EAAE,WAAW;SAC5B;QACD,CAAC,GAAG,OAAO,UAAU,CAAC,EAAE;YACtB,YAAY,EAAE,SAAS,CAAC,GAAG,CAAC;SAC7B;QACD,CAAC,GAAG,OAAO,IAAI,CAAC,EAAE;YAChB,UAAU,EAAE,cAAc,CAAC,MAAM;SAClC;QACD,CAAC,GAAG,OAAO,KAAK,CAAC,EAAE;YACjB,YAAY,EAAE,CAAC;SAChB;KACF;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Summary.d.ts b/_lib/app/components/mdx/Summary.d.ts new file mode 100644 index 00000000..44dec77b --- /dev/null +++ b/_lib/app/components/mdx/Summary.d.ts @@ -0,0 +1,3 @@ +import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; +export declare function Summary(props: DetailedHTMLProps, HTMLElement>): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=Summary.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Summary.d.ts.map b/_lib/app/components/mdx/Summary.d.ts.map new file mode 100644 index 00000000..51009753 --- /dev/null +++ b/_lib/app/components/mdx/Summary.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Summary.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Summary.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAInE,wBAAgB,OAAO,CAAC,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,8CAEzF"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Summary.js b/_lib/app/components/mdx/Summary.js new file mode 100644 index 00000000..474d66f2 --- /dev/null +++ b/_lib/app/components/mdx/Summary.js @@ -0,0 +1,8 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import * as styles from './Summary.css.js'; +export function Summary(props) { + return _jsx("summary", { ...props, className: clsx(props.className, styles.root) }); +} +//# sourceMappingURL=Summary.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Summary.js.map b/_lib/app/components/mdx/Summary.js.map new file mode 100644 index 00000000..45ca7561 --- /dev/null +++ b/_lib/app/components/mdx/Summary.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Summary.js","sourceRoot":"","sources":["../../../../app/components/mdx/Summary.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA+C,MAAM,OAAO,CAAA;AAEnE,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAA;AAE1C,MAAM,UAAU,OAAO,CAAC,KAAkE;IACxF,OAAO,qBAAa,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,GAAI,CAAA;AAC9E,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Table.css.d.ts b/_lib/app/components/mdx/Table.css.d.ts new file mode 100644 index 00000000..d8e02913 --- /dev/null +++ b/_lib/app/components/mdx/Table.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=Table.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Table.css.d.ts.map b/_lib/app/components/mdx/Table.css.d.ts.map new file mode 100644 index 00000000..b12a30db --- /dev/null +++ b/_lib/app/components/mdx/Table.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Table.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Table.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,QAKf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Table.css.js b/_lib/app/components/mdx/Table.css.js new file mode 100644 index 00000000..6d3369e0 --- /dev/null +++ b/_lib/app/components/mdx/Table.css.js @@ -0,0 +1,9 @@ +import { style } from '@vanilla-extract/css'; +import { spaceVars } from '../../styles/vars.css.js'; +export const root = style({ + display: 'block', + borderCollapse: 'collapse', + overflowX: 'auto', + marginBottom: spaceVars['24'], +}); +//# sourceMappingURL=Table.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Table.css.js.map b/_lib/app/components/mdx/Table.css.js.map new file mode 100644 index 00000000..61eabcb9 --- /dev/null +++ b/_lib/app/components/mdx/Table.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Table.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/Table.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAEpD,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,OAAO,EAAE,OAAO;IAChB,cAAc,EAAE,UAAU;IAC1B,SAAS,EAAE,MAAM;IACjB,YAAY,EAAE,SAAS,CAAC,IAAI,CAAC;CAC9B,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Table.d.ts b/_lib/app/components/mdx/Table.d.ts new file mode 100644 index 00000000..035f7ce5 --- /dev/null +++ b/_lib/app/components/mdx/Table.d.ts @@ -0,0 +1,3 @@ +import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; +export declare function Table(props: DetailedHTMLProps, HTMLTableElement>): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=Table.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Table.d.ts.map b/_lib/app/components/mdx/Table.d.ts.map new file mode 100644 index 00000000..8c279586 --- /dev/null +++ b/_lib/app/components/mdx/Table.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/Table.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAInE,wBAAgB,KAAK,CACnB,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,8CAG7E"} \ No newline at end of file diff --git a/_lib/app/components/mdx/Table.js b/_lib/app/components/mdx/Table.js new file mode 100644 index 00000000..68aeb70f --- /dev/null +++ b/_lib/app/components/mdx/Table.js @@ -0,0 +1,8 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import * as styles from './Table.css.js'; +export function Table(props) { + return _jsx("table", { ...props, className: clsx(props.className, styles.root) }); +} +//# sourceMappingURL=Table.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/Table.js.map b/_lib/app/components/mdx/Table.js.map new file mode 100644 index 00000000..8d7e198f --- /dev/null +++ b/_lib/app/components/mdx/Table.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Table.js","sourceRoot":"","sources":["../../../../app/components/mdx/Table.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA+C,MAAM,OAAO,CAAA;AAEnE,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAA;AAExC,MAAM,UAAU,KAAK,CACnB,KAA4E;IAE5E,OAAO,mBAAW,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,GAAI,CAAA;AAC5E,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/TableCell.css.d.ts b/_lib/app/components/mdx/TableCell.css.d.ts new file mode 100644 index 00000000..611e1d5d --- /dev/null +++ b/_lib/app/components/mdx/TableCell.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=TableCell.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/TableCell.css.d.ts.map b/_lib/app/components/mdx/TableCell.css.d.ts.map new file mode 100644 index 00000000..2cfbc9e5 --- /dev/null +++ b/_lib/app/components/mdx/TableCell.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TableCell.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/TableCell.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,QAIf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/TableCell.css.js b/_lib/app/components/mdx/TableCell.css.js new file mode 100644 index 00000000..db319de4 --- /dev/null +++ b/_lib/app/components/mdx/TableCell.css.js @@ -0,0 +1,8 @@ +import { style } from '@vanilla-extract/css'; +import { fontSizeVars, semanticColorVars, spaceVars } from '../../styles/vars.css.js'; +export const root = style({ + border: `1px solid ${semanticColorVars.tableBorder}`, + fontSize: fontSizeVars.td, + padding: `${spaceVars['8']} ${spaceVars['12']}`, +}); +//# sourceMappingURL=TableCell.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/TableCell.css.js.map b/_lib/app/components/mdx/TableCell.css.js.map new file mode 100644 index 00000000..6a72c988 --- /dev/null +++ b/_lib/app/components/mdx/TableCell.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TableCell.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/TableCell.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAErF,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,MAAM,EAAE,aAAa,iBAAiB,CAAC,WAAW,EAAE;IACpD,QAAQ,EAAE,YAAY,CAAC,EAAE;IACzB,OAAO,EAAE,GAAG,SAAS,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,EAAE;CAChD,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/TableCell.d.ts b/_lib/app/components/mdx/TableCell.d.ts new file mode 100644 index 00000000..bf7a43de --- /dev/null +++ b/_lib/app/components/mdx/TableCell.d.ts @@ -0,0 +1,3 @@ +import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; +export declare function TableCell(props: DetailedHTMLProps, HTMLTableCellElement>): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=TableCell.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/TableCell.d.ts.map b/_lib/app/components/mdx/TableCell.d.ts.map new file mode 100644 index 00000000..a2529ee3 --- /dev/null +++ b/_lib/app/components/mdx/TableCell.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TableCell.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/TableCell.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAInE,wBAAgB,SAAS,CACvB,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC,8CAGrF"} \ No newline at end of file diff --git a/_lib/app/components/mdx/TableCell.js b/_lib/app/components/mdx/TableCell.js new file mode 100644 index 00000000..5a5d0ab6 --- /dev/null +++ b/_lib/app/components/mdx/TableCell.js @@ -0,0 +1,8 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import * as styles from './TableCell.css.js'; +export function TableCell(props) { + return _jsx("td", { ...props, className: clsx(props.className, styles.root) }); +} +//# sourceMappingURL=TableCell.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/TableCell.js.map b/_lib/app/components/mdx/TableCell.js.map new file mode 100644 index 00000000..e7856509 --- /dev/null +++ b/_lib/app/components/mdx/TableCell.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TableCell.js","sourceRoot":"","sources":["../../../../app/components/mdx/TableCell.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA+C,MAAM,OAAO,CAAA;AAEnE,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAA;AAE5C,MAAM,UAAU,SAAS,CACvB,KAAoF;IAEpF,OAAO,gBAAQ,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,GAAI,CAAA;AACzE,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/TableHeader.css.d.ts b/_lib/app/components/mdx/TableHeader.css.d.ts new file mode 100644 index 00000000..a27dbad8 --- /dev/null +++ b/_lib/app/components/mdx/TableHeader.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=TableHeader.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/TableHeader.css.d.ts.map b/_lib/app/components/mdx/TableHeader.css.d.ts.map new file mode 100644 index 00000000..c9da532f --- /dev/null +++ b/_lib/app/components/mdx/TableHeader.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TableHeader.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/TableHeader.css.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,IAAI,QAgBf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/TableHeader.css.js b/_lib/app/components/mdx/TableHeader.css.js new file mode 100644 index 00000000..417ea4f5 --- /dev/null +++ b/_lib/app/components/mdx/TableHeader.css.js @@ -0,0 +1,20 @@ +import { style } from '@vanilla-extract/css'; +import { fontSizeVars, fontWeightVars, semanticColorVars, spaceVars, } from '../../styles/vars.css.js'; +export const root = style({ + border: `1px solid ${semanticColorVars.tableBorder}`, + backgroundColor: semanticColorVars.tableHeaderBackground, + color: semanticColorVars.tableHeaderText, + fontSize: fontSizeVars.th, + fontWeight: fontWeightVars.medium, + padding: `${spaceVars['8']} ${spaceVars['12']}`, + textAlign: 'left', + selectors: { + '&[align="center"]': { + textAlign: 'center', + }, + '&[align="right"]': { + textAlign: 'right', + }, + }, +}); +//# sourceMappingURL=TableHeader.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/TableHeader.css.js.map b/_lib/app/components/mdx/TableHeader.css.js.map new file mode 100644 index 00000000..75b419c0 --- /dev/null +++ b/_lib/app/components/mdx/TableHeader.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TableHeader.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/TableHeader.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EACL,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,SAAS,GACV,MAAM,0BAA0B,CAAA;AAEjC,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,MAAM,EAAE,aAAa,iBAAiB,CAAC,WAAW,EAAE;IACpD,eAAe,EAAE,iBAAiB,CAAC,qBAAqB;IACxD,KAAK,EAAE,iBAAiB,CAAC,eAAe;IACxC,QAAQ,EAAE,YAAY,CAAC,EAAE;IACzB,UAAU,EAAE,cAAc,CAAC,MAAM;IACjC,OAAO,EAAE,GAAG,SAAS,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,EAAE;IAC/C,SAAS,EAAE,MAAM;IACjB,SAAS,EAAE;QACT,mBAAmB,EAAE;YACnB,SAAS,EAAE,QAAQ;SACpB;QACD,kBAAkB,EAAE;YAClB,SAAS,EAAE,OAAO;SACnB;KACF;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/TableHeader.d.ts b/_lib/app/components/mdx/TableHeader.d.ts new file mode 100644 index 00000000..041fb251 --- /dev/null +++ b/_lib/app/components/mdx/TableHeader.d.ts @@ -0,0 +1,3 @@ +import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; +export declare function TableHeader(props: DetailedHTMLProps, HTMLTableCellElement>): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=TableHeader.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/TableHeader.d.ts.map b/_lib/app/components/mdx/TableHeader.d.ts.map new file mode 100644 index 00000000..94bc3787 --- /dev/null +++ b/_lib/app/components/mdx/TableHeader.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TableHeader.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/TableHeader.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAInE,wBAAgB,WAAW,CACzB,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC,8CAGrF"} \ No newline at end of file diff --git a/_lib/app/components/mdx/TableHeader.js b/_lib/app/components/mdx/TableHeader.js new file mode 100644 index 00000000..cff8803c --- /dev/null +++ b/_lib/app/components/mdx/TableHeader.js @@ -0,0 +1,8 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import * as styles from './TableHeader.css.js'; +export function TableHeader(props) { + return _jsx("th", { ...props, className: clsx(props.className, styles.root) }); +} +//# sourceMappingURL=TableHeader.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/TableHeader.js.map b/_lib/app/components/mdx/TableHeader.js.map new file mode 100644 index 00000000..17f52c6e --- /dev/null +++ b/_lib/app/components/mdx/TableHeader.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TableHeader.js","sourceRoot":"","sources":["../../../../app/components/mdx/TableHeader.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA+C,MAAM,OAAO,CAAA;AAEnE,OAAO,KAAK,MAAM,MAAM,sBAAsB,CAAA;AAE9C,MAAM,UAAU,WAAW,CACzB,KAAoF;IAEpF,OAAO,gBAAQ,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,GAAI,CAAA;AACzE,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/TableRow.css.d.ts b/_lib/app/components/mdx/TableRow.css.d.ts new file mode 100644 index 00000000..c807b233 --- /dev/null +++ b/_lib/app/components/mdx/TableRow.css.d.ts @@ -0,0 +1,2 @@ +export declare const root: string; +//# sourceMappingURL=TableRow.css.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/TableRow.css.d.ts.map b/_lib/app/components/mdx/TableRow.css.d.ts.map new file mode 100644 index 00000000..bb1db07f --- /dev/null +++ b/_lib/app/components/mdx/TableRow.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TableRow.css.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/TableRow.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,QAOf,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/TableRow.css.js b/_lib/app/components/mdx/TableRow.css.js new file mode 100644 index 00000000..c16ba7fb --- /dev/null +++ b/_lib/app/components/mdx/TableRow.css.js @@ -0,0 +1,11 @@ +import { style } from '@vanilla-extract/css'; +import { primitiveColorVars, semanticColorVars } from '../../styles/vars.css.js'; +export const root = style({ + borderTop: `1px solid ${semanticColorVars.tableBorder}`, + selectors: { + '&:nth-child(2n)': { + backgroundColor: primitiveColorVars.background2, + }, + }, +}); +//# sourceMappingURL=TableRow.css.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/TableRow.css.js.map b/_lib/app/components/mdx/TableRow.css.js.map new file mode 100644 index 00000000..161d4937 --- /dev/null +++ b/_lib/app/components/mdx/TableRow.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TableRow.css.js","sourceRoot":"","sources":["../../../../app/components/mdx/TableRow.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAEhF,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,SAAS,EAAE,aAAa,iBAAiB,CAAC,WAAW,EAAE;IACvD,SAAS,EAAE;QACT,iBAAiB,EAAE;YACjB,eAAe,EAAE,kBAAkB,CAAC,WAAW;SAChD;KACF;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/TableRow.d.ts b/_lib/app/components/mdx/TableRow.d.ts new file mode 100644 index 00000000..fc7b667e --- /dev/null +++ b/_lib/app/components/mdx/TableRow.d.ts @@ -0,0 +1,3 @@ +import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; +export declare function TableRow(props: DetailedHTMLProps, HTMLTableRowElement>): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=TableRow.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/TableRow.d.ts.map b/_lib/app/components/mdx/TableRow.d.ts.map new file mode 100644 index 00000000..e08d2fb2 --- /dev/null +++ b/_lib/app/components/mdx/TableRow.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TableRow.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/TableRow.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAInE,wBAAgB,QAAQ,CACtB,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC,8CAGnF"} \ No newline at end of file diff --git a/_lib/app/components/mdx/TableRow.js b/_lib/app/components/mdx/TableRow.js new file mode 100644 index 00000000..ec397913 --- /dev/null +++ b/_lib/app/components/mdx/TableRow.js @@ -0,0 +1,8 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { clsx } from 'clsx'; +import {} from 'react'; +import * as styles from './TableRow.css.js'; +export function TableRow(props) { + return _jsx("tr", { ...props, className: clsx(props.className, styles.root) }); +} +//# sourceMappingURL=TableRow.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/TableRow.js.map b/_lib/app/components/mdx/TableRow.js.map new file mode 100644 index 00000000..eebb6960 --- /dev/null +++ b/_lib/app/components/mdx/TableRow.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TableRow.js","sourceRoot":"","sources":["../../../../app/components/mdx/TableRow.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAA+C,MAAM,OAAO,CAAA;AAEnE,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAA;AAE3C,MAAM,UAAU,QAAQ,CACtB,KAAkF;IAElF,OAAO,gBAAQ,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,GAAI,CAAA;AACzE,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/TwoslashPopover.d.ts b/_lib/app/components/mdx/TwoslashPopover.d.ts new file mode 100644 index 00000000..ecb976a3 --- /dev/null +++ b/_lib/app/components/mdx/TwoslashPopover.d.ts @@ -0,0 +1,5 @@ +import { type ReactElement } from 'react'; +export declare function TwoslashPopover({ children, ...props }: { + children: ReactElement[]; +}): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=TwoslashPopover.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/TwoslashPopover.d.ts.map b/_lib/app/components/mdx/TwoslashPopover.d.ts.map new file mode 100644 index 00000000..efeafe73 --- /dev/null +++ b/_lib/app/components/mdx/TwoslashPopover.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TwoslashPopover.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/TwoslashPopover.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,YAAY,EAAoB,MAAM,OAAO,CAAA;AAG3D,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE;IAAE,QAAQ,EAAE,YAAY,EAAE,CAAA;CAAE,8CAkDnF"} \ No newline at end of file diff --git a/_lib/app/components/mdx/TwoslashPopover.js b/_lib/app/components/mdx/TwoslashPopover.js new file mode 100644 index 00000000..e4eec7f8 --- /dev/null +++ b/_lib/app/components/mdx/TwoslashPopover.js @@ -0,0 +1,27 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +import { FloatingArrow, arrow, offset, safePolygon, shift, useFloating, useHover, useInteractions, } from '@floating-ui/react'; +import { useRef, useState } from 'react'; +import { primitiveColorVars } from '../../styles/vars.css.js'; +export function TwoslashPopover({ children, ...props }) { + const [popover, target] = children; + const arrowRef = useRef(null); + const [isOpen, setIsOpen] = useState(false); + const { context, refs, floatingStyles } = useFloating({ + middleware: [ + arrow({ + element: arrowRef, + }), + offset(8), + shift(), + ], + open: isOpen, + onOpenChange: setIsOpen, + placement: 'bottom-start', + }); + const hover = useHover(context, { handleClose: safePolygon() }); + const { getReferenceProps, getFloatingProps } = useInteractions([hover]); + const targetChildren = target.props.children; + const popoverChildren = popover.props.children; + return (_jsxs("span", { ...props, children: [_jsx("span", { className: "twoslash-target", ref: refs.setReference, ...getReferenceProps(), children: targetChildren }), isOpen && (_jsxs("div", { className: "twoslash-popup-info-hover", ref: refs.setFloating, style: floatingStyles, ...getFloatingProps(), children: [_jsx(FloatingArrow, { ref: arrowRef, context: context, fill: primitiveColorVars.background5, height: 3, stroke: primitiveColorVars.border2, strokeWidth: 1, width: 7 }), _jsx("div", { className: "twoslash-popup-scroll-container", children: popoverChildren })] }))] })); +} +//# sourceMappingURL=TwoslashPopover.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/TwoslashPopover.js.map b/_lib/app/components/mdx/TwoslashPopover.js.map new file mode 100644 index 00000000..f99696bf --- /dev/null +++ b/_lib/app/components/mdx/TwoslashPopover.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TwoslashPopover.js","sourceRoot":"","sources":["../../../../app/components/mdx/TwoslashPopover.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL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GACV,EACN,MAAM,IAAI,CACT,eACE,SAAS,EAAC,2BAA2B,EACrC,GAAG,EAAE,IAAI,CAAC,WAAW,EACrB,KAAK,EAAE,cAAc,KACjB,gBAAgB,EAAE,aAEtB,KAAC,aAAa,IACZ,GAAG,EAAE,QAAQ,EACb,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,kBAAkB,CAAC,WAAW,EACpC,MAAM,EAAE,CAAC,EACT,MAAM,EAAE,kBAAkB,CAAC,OAAO,EAClC,WAAW,EAAE,CAAC,EACd,KAAK,EAAE,CAAC,GACR,EACF,cAAK,SAAS,EAAC,iCAAiC,YAAE,eAAe,GAAO,IACpE,CACP,IACI,CACR,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/components/mdx/index.d.ts b/_lib/app/components/mdx/index.d.ts new file mode 100644 index 00000000..507d5e54 --- /dev/null +++ b/_lib/app/components/mdx/index.d.ts @@ -0,0 +1,3 @@ +import type { MDXComponents } from 'mdx/types.js'; +export declare const components: MDXComponents; +//# sourceMappingURL=index.d.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/index.d.ts.map b/_lib/app/components/mdx/index.d.ts.map new file mode 100644 index 00000000..64756a1f --- /dev/null +++ b/_lib/app/components/mdx/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../app/components/mdx/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAgCjD,eAAO,MAAM,UAAU,EAAE,aA+BxB,CAAA"} \ No newline at end of file diff --git a/_lib/app/components/mdx/index.js b/_lib/app/components/mdx/index.js new file mode 100644 index 00000000..92a24800 --- /dev/null +++ b/_lib/app/components/mdx/index.js @@ -0,0 +1,63 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { Anchor } from './Anchor.js'; +import { Aside } from './Aside.js'; +import { Blockquote } from './Blockquote.js'; +import { Code } from './Code.js'; +import { Details } from './Details.js'; +import { Div } from './Div.js'; +import { Figcaption } from './Figcaption.js'; +import { Figure } from './Figure.js'; +import { H1 } from './H1.js'; +import { H2 } from './H2.js'; +import { H3 } from './H3.js'; +import { H4 } from './H4.js'; +import { H5 } from './H5.js'; +import { H6 } from './H6.js'; +import { Header } from './Header.js'; +import { HorizontalRule } from './HorizontalRule.js'; +import { Kbd } from './Kbd.js'; +import { List } from './List.js'; +import { ListItem } from './ListItem.js'; +import { Paragraph } from './Paragraph.js'; +import { Pre } from './Pre.js'; +import { Section } from './Section.js'; +import { Span } from './Span.js'; +import { Strong } from './Strong.js'; +import { Summary } from './Summary.js'; +import { Table } from './Table.js'; +import { TableCell } from './TableCell.js'; +import { TableHeader } from './TableHeader.js'; +import { TableRow } from './TableRow.js'; +export const components = { + a: Anchor, + aside: Aside, + blockquote: Blockquote, + code: Code, + details: Details, + div: Div, + pre: Pre, + header: Header, + figcaption: Figcaption, + figure: Figure, + h1: H1, + h2: H2, + h3: H3, + h4: H4, + h5: H5, + h6: H6, + hr: HorizontalRule, + kd: Kbd, + li: ListItem, + ol: (props) => _jsx(List, { ordered: true, ...props }), + p: Paragraph, + section: Section, + span: Span, + strong: Strong, + summary: Summary, + table: Table, + td: TableCell, + th: TableHeader, + tr: TableRow, + ul: (props) => _jsx(List, { ordered: false, ...props }), +}; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/_lib/app/components/mdx/index.js.map b/_lib/app/components/mdx/index.js.map new file mode 100644 index 00000000..48ce66b2 --- /dev/null +++ b/_lib/app/components/mdx/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../app/components/mdx/index.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,C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CAAA;AAExC,MAAM,CAAC,MAAM,UAAU,GAAkB;IACvC,CAAC,EAAE,MAAa;IAChB,KAAK,EAAE,KAAK;IACZ,UAAU,EAAE,UAAU;IACtB,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,OAAO;IAChB,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,MAAM,EAAE,MAAM;IACd,UAAU,EAAE,UAAU;IACtB,MAAM,EAAE,MAAM;IACd,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,cAAc;IAClB,EAAE,EAAE,GAAG;IACP,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAC,IAAI,IAAC,OAAO,WAAK,KAAK,GAAI;IAC1C,CAAC,EAAE,SAAS;IACZ,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,IAAI;IACV,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,KAAK;IACZ,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,WAAW;IACf,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAC,IAAI,IAAC,OAAO,EAAE,KAAK,KAAM,KAAK,GAAI;CACnD,CAAA"} \ No newline at end of file diff --git a/_lib/app/hooks/useActiveNavIds.d.ts b/_lib/app/hooks/useActiveNavIds.d.ts new file mode 100644 index 00000000..d923c2de --- /dev/null +++ b/_lib/app/hooks/useActiveNavIds.d.ts @@ -0,0 +1,6 @@ +import type { ParsedTopNavItem } from '../../config.js'; +export declare function useActiveNavIds({ items, pathname, }: { + items: ParsedTopNavItem[]; + pathname: string; +}): number[]; +//# sourceMappingURL=useActiveNavIds.d.js.map \ No newline at end of file diff --git a/_lib/app/hooks/useActiveNavIds.d.ts.map b/_lib/app/hooks/useActiveNavIds.d.ts.map new file mode 100644 index 00000000..13a7c5d2 --- /dev/null +++ b/_lib/app/hooks/useActiveNavIds.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useActiveNavIds.d.ts","sourceRoot":"","sources":["../../../app/hooks/useActiveNavIds.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAkBvD,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,QAAQ,GACT,EAAE;IAAE,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,EAAE,CAE5D"} \ No newline at end of file diff --git a/_lib/app/hooks/useActiveNavIds.js b/_lib/app/hooks/useActiveNavIds.js new file mode 100644 index 00000000..0610fdbb --- /dev/null +++ b/_lib/app/hooks/useActiveNavIds.js @@ -0,0 +1,19 @@ +import { useMemo } from 'react'; +function getActiveNavIds({ items, pathname, }) { + const path = pathname.replace(/\.html$/, ''); + const activeIds = []; + for (const item of items) { + if (item.link && path.startsWith(item.match || item.link)) + activeIds.push(item.id); + else if (item.items) { + const activeChildItems = getActiveNavIds({ items: item.items, pathname }); + if (activeChildItems.length > 0) + activeIds.push(item.id); + } + } + return activeIds; +} +export function useActiveNavIds({ items, pathname, }) { + return useMemo(() => getActiveNavIds({ items, pathname }), [items, pathname]); +} +//# sourceMappingURL=useActiveNavIds.js.map \ No newline at end of file diff --git a/_lib/app/hooks/useActiveNavIds.js.map b/_lib/app/hooks/useActiveNavIds.js.map new file mode 100644 index 00000000..e6c8888a --- /dev/null +++ b/_lib/app/hooks/useActiveNavIds.js.map @@ -0,0 +1 @@ +{"version":3,"file":"useActiveNavIds.js","sourceRoot":"","sources":["../../../app/hooks/useActiveNavIds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAG/B,SAAS,eAAe,CAAC,EACvB,KAAK,EACL,QAAQ,GACwC;IAChD,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAA;IAC5C,MAAM,SAAS,GAAG,EAAE,CAAA;IACpB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACxB,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC;YAAE,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;aAC7E,IAAI,IAAI,CAAC,KAAK,EAAE;YACnB,MAAM,gBAAgB,GAAG,eAAe,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAA;YACzE,IAAI,gBAAgB,CAAC,MAAM,GAAG,CAAC;gBAAE,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;SACzD;KACF;IACD,OAAO,SAAS,CAAA;AAClB,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,EAC9B,KAAK,EACL,QAAQ,GACwC;IAChD,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAA;AAC/E,CAAC"} \ No newline at end of file diff --git a/_lib/app/hooks/useConfig.d.ts b/_lib/app/hooks/useConfig.d.ts new file mode 100644 index 00000000..32925681 --- /dev/null +++ b/_lib/app/hooks/useConfig.d.ts @@ -0,0 +1,10 @@ +import { type ReactNode } from 'react'; +import { type ParsedConfig } from '../../config.js'; +export declare const configHash: string; +export declare function getConfig(): ParsedConfig; +export declare function ConfigProvider({ children, config: initialConfig, }: { + children: ReactNode; + config?: ParsedConfig; +}): import("react/jsx-runtime.js").JSX.Element; +export declare function useConfig(): ParsedConfig; +//# sourceMappingURL=useConfig.d.js.map \ No newline at end of file diff --git a/_lib/app/hooks/useConfig.d.ts.map b/_lib/app/hooks/useConfig.d.ts.map new file mode 100644 index 00000000..8eb06d95 --- /dev/null +++ b/_lib/app/hooks/useConfig.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useConfig.d.ts","sourceRoot":"","sources":["../../../app/hooks/useConfig.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAkD,MAAM,OAAO,CAAA;AACtF,OAAO,EAAE,KAAK,YAAY,EAAsC,MAAM,iBAAiB,CAAA;AAKvF,eAAO,MAAM,UAAU,QAEjB,CAAA;AAEN,wBAAgB,SAAS,IAAI,YAAY,CAMxC;AAED,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,MAAM,EAAE,aAAa,GACtB,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAC;IAAC,MAAM,CAAC,EAAE,YAAY,CAAA;CAAE,8CAgBhD;AAED,wBAAgB,SAAS,iBAExB"} \ No newline at end of file diff --git a/_lib/app/hooks/useConfig.js b/_lib/app/hooks/useConfig.js new file mode 100644 index 00000000..72e0b4a3 --- /dev/null +++ b/_lib/app/hooks/useConfig.js @@ -0,0 +1,38 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { sha256 } from '@noble/hashes/sha256'; +import { bytesToHex } from '@noble/hashes/utils'; +import { createContext, useContext, useEffect, useState } from 'react'; +import { deserializeConfig, serializeConfig } from '../../config.js'; +import { config as virtualConfig } from 'virtual:config'; +const ConfigContext = createContext(virtualConfig); +export const configHash = import.meta.env.DEV + ? bytesToHex(sha256(serializeConfig(virtualConfig))).slice(0, 8) + : ''; +export function getConfig() { + if (typeof window !== 'undefined' && import.meta.env.DEV) { + const storedConfig = window.localStorage.getItem(`vocs.config.${configHash}`); + if (storedConfig) + return deserializeConfig(storedConfig); + } + return virtualConfig; +} +export function ConfigProvider({ children, config: initialConfig, }) { + const [config, setConfig] = useState(() => { + if (initialConfig) + return initialConfig; + return getConfig(); + }); + useEffect(() => { + if (import.meta.hot) + import.meta.hot.on('vocs:config', setConfig); + }, []); + useEffect(() => { + if (typeof window !== 'undefined' && import.meta.env.DEV) + window.localStorage.setItem(`vocs.config.${configHash}`, serializeConfig(config)); + }, [config]); + return _jsx(ConfigContext.Provider, { value: config, children: children }); +} +export function useConfig() { + return useContext(ConfigContext); +} +//# sourceMappingURL=useConfig.js.map \ No newline at end of file diff --git a/_lib/app/hooks/useConfig.js.map b/_lib/app/hooks/useConfig.js.map new file mode 100644 index 00000000..2c6e15a6 --- /dev/null +++ b/_lib/app/hooks/useConfig.js.map @@ -0,0 +1 @@ +{"version":3,"file":"useConfig.js","sourceRoot":"","sources":["../../../app/hooks/useConfig.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAAkB,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACtF,OAAO,EAAqB,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACvF,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAExD,MAAM,aAAa,GAAG,aAAa,CAAC,aAAa,CAAC,CAAA;AAElD,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG;IAC3C,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;IAChE,CAAC,CAAC,EAAE,CAAA;AAEN,MAAM,UAAU,SAAS;IACvB,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE;QACxD,MAAM,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,eAAe,UAAU,EAAE,CAAC,CAAA;QAC7E,IAAI,YAAY;YAAE,OAAO,iBAAiB,CAAC,YAAY,CAAC,CAAA;KACzD;IACD,OAAO,aAAa,CAAA;AACtB,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,EAC7B,QAAQ,EACR,MAAM,EAAE,aAAa,GAC0B;IAC/C,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE;QACxC,IAAI,aAAa;YAAE,OAAO,aAAa,CAAA;QACvC,OAAO,SAAS,EAAE,CAAA;IACpB,CAAC,CAAC,CAAA;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG;YAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,aAAa,EAAE,SAAS,CAAC,CAAA;IACnE,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG;YACtD,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,eAAe,UAAU,EAAE,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC,CAAA;IACrF,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IAEZ,OAAO,KAAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,MAAM,YAAG,QAAQ,GAA0B,CAAA;AACnF,CAAC;AAED,MAAM,UAAU,SAAS;IACvB,OAAO,UAAU,CAAC,aAAa,CAAC,CAAA;AAClC,CAAC"} \ No newline at end of file diff --git a/_lib/app/hooks/useCopyCode.d.ts b/_lib/app/hooks/useCopyCode.d.ts new file mode 100644 index 00000000..2cabf993 --- /dev/null +++ b/_lib/app/hooks/useCopyCode.d.ts @@ -0,0 +1,7 @@ +/// +export declare function useCopyCode(): { + copied: boolean; + copy: () => void; + ref: import("react").RefObject; +}; +//# sourceMappingURL=useCopyCode.d.js.map \ No newline at end of file diff --git a/_lib/app/hooks/useCopyCode.d.ts.map b/_lib/app/hooks/useCopyCode.d.ts.map new file mode 100644 index 00000000..a65033e1 --- /dev/null +++ b/_lib/app/hooks/useCopyCode.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useCopyCode.d.ts","sourceRoot":"","sources":["../../../app/hooks/useCopyCode.ts"],"names":[],"mappings":";AAEA,wBAAgB,WAAW;;;;EA2B1B"} \ No newline at end of file diff --git a/_lib/app/hooks/useCopyCode.js b/_lib/app/hooks/useCopyCode.js new file mode 100644 index 00000000..9f4fa745 --- /dev/null +++ b/_lib/app/hooks/useCopyCode.js @@ -0,0 +1,25 @@ +import { useEffect, useRef, useState } from 'react'; +export function useCopyCode() { + const ref = useRef(null); + const [copied, setCopied] = useState(false); + useEffect(() => { + if (!copied) + return; + const timeout = setTimeout(() => setCopied(false), 1000); + return () => clearTimeout(timeout); + }, [copied]); + function copy() { + setCopied(true); + const node = ref.current?.cloneNode(true); + const nodesToRemove = node?.querySelectorAll('button,.line.diff.remove,.twoslash-popup-info-hover,.twoslash-popup-info,.twoslash-meta-line,.twoslash-tag-line'); + for (const node of nodesToRemove ?? []) + node.remove(); + navigator.clipboard.writeText(node?.textContent); + } + return { + copied, + copy, + ref, + }; +} +//# sourceMappingURL=useCopyCode.js.map \ No newline at end of file diff --git a/_lib/app/hooks/useCopyCode.js.map b/_lib/app/hooks/useCopyCode.js.map new file mode 100644 index 00000000..5e3e42ff --- /dev/null +++ b/_lib/app/hooks/useCopyCode.js.map @@ -0,0 +1 @@ +{"version":3,"file":"useCopyCode.js","sourceRoot":"","sources":["../../../app/hooks/useCopyCode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEnD,MAAM,UAAU,WAAW;IACzB,MAAM,GAAG,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IAExC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAE3C,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,MAAM;YAAE,OAAM;QACnB,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAA;QACxD,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,CAAA;IACpC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IAEZ,SAAS,IAAI;QACX,SAAS,CAAC,IAAI,CAAC,CAAA;QAEf,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO,EAAE,SAAS,CAAC,IAAI,CAAmB,CAAA;QAC3D,MAAM,aAAa,GAAG,IAAI,EAAE,gBAAgB,CAC1C,iHAAiH,CAClH,CAAA;QACD,KAAK,MAAM,IAAI,IAAI,aAAa,IAAI,EAAE;YAAE,IAAI,CAAC,MAAM,EAAE,CAAA;QACrD,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,WAAqB,CAAC,CAAA;IAC5D,CAAC;IAED,OAAO;QACL,MAAM;QACN,IAAI;QACJ,GAAG;KACJ,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/hooks/useDebounce.d.ts b/_lib/app/hooks/useDebounce.d.ts new file mode 100644 index 00000000..fd417653 --- /dev/null +++ b/_lib/app/hooks/useDebounce.d.ts @@ -0,0 +1,2 @@ +export declare function useDebounce(value: T, delay?: number): T; +//# sourceMappingURL=useDebounce.d.js.map \ No newline at end of file diff --git a/_lib/app/hooks/useDebounce.d.ts.map b/_lib/app/hooks/useDebounce.d.ts.map new file mode 100644 index 00000000..40369886 --- /dev/null +++ b/_lib/app/hooks/useDebounce.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useDebounce.d.ts","sourceRoot":"","sources":["../../../app/hooks/useDebounce.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,CAY1D"} \ No newline at end of file diff --git a/_lib/app/hooks/useDebounce.js b/_lib/app/hooks/useDebounce.js new file mode 100644 index 00000000..078349ad --- /dev/null +++ b/_lib/app/hooks/useDebounce.js @@ -0,0 +1,12 @@ +import { useEffect, useState } from 'react'; +export function useDebounce(value, delay) { + const [debouncedValue, setDebouncedValue] = useState(value); + useEffect(() => { + const timer = setTimeout(() => setDebouncedValue(value), delay || 500); + return () => { + clearTimeout(timer); + }; + }, [value, delay]); + return debouncedValue; +} +//# sourceMappingURL=useDebounce.js.map \ No newline at end of file diff --git a/_lib/app/hooks/useDebounce.js.map b/_lib/app/hooks/useDebounce.js.map new file mode 100644 index 00000000..0913c1e5 --- /dev/null +++ b/_lib/app/hooks/useDebounce.js.map @@ -0,0 +1 @@ +{"version":3,"file":"useDebounce.js","sourceRoot":"","sources":["../../../app/hooks/useDebounce.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE3C,MAAM,UAAU,WAAW,CAAI,KAAQ,EAAE,KAAc;IACrD,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAI,KAAK,CAAC,CAAA;IAE9D,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,KAAK,IAAI,GAAG,CAAC,CAAA;QAEtE,OAAO,GAAG,EAAE;YACV,YAAY,CAAC,KAAK,CAAC,CAAA;QACrB,CAAC,CAAA;IACH,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAA;IAElB,OAAO,cAAc,CAAA;AACvB,CAAC"} \ No newline at end of file diff --git a/_lib/app/hooks/useEditLink.d.ts b/_lib/app/hooks/useEditLink.d.ts new file mode 100644 index 00000000..a9bec2be --- /dev/null +++ b/_lib/app/hooks/useEditLink.d.ts @@ -0,0 +1,5 @@ +export declare function useEditLink(): { + url: string; + text: string; +}; +//# sourceMappingURL=useEditLink.d.js.map \ No newline at end of file diff --git a/_lib/app/hooks/useEditLink.d.ts.map b/_lib/app/hooks/useEditLink.d.ts.map new file mode 100644 index 00000000..b7d9af21 --- /dev/null +++ b/_lib/app/hooks/useEditLink.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useEditLink.d.ts","sourceRoot":"","sources":["../../../app/hooks/useEditLink.ts"],"names":[],"mappings":"AAKA,wBAAgB,WAAW;;;EAc1B"} \ No newline at end of file diff --git a/_lib/app/hooks/useEditLink.js b/_lib/app/hooks/useEditLink.js new file mode 100644 index 00000000..12b9f85d --- /dev/null +++ b/_lib/app/hooks/useEditLink.js @@ -0,0 +1,18 @@ +import { useMemo } from 'react'; +import { useConfig } from './useConfig.js'; +import { usePageData } from './usePageData.js'; +export function useEditLink() { + const pageData = usePageData(); + const config = useConfig(); + return useMemo(() => { + const { pattern = '', text = 'Edit page' } = config.editLink ?? {}; + let url = ''; + // TODO: pattern as function + if (typeof pattern === 'function') + url = ''; + else if (pageData.filePath) + url = pattern.replace(/:path/g, pageData.filePath); + return { url, text }; + }, [config.editLink, pageData.filePath]); +} +//# sourceMappingURL=useEditLink.js.map \ No newline at end of file diff --git a/_lib/app/hooks/useEditLink.js.map b/_lib/app/hooks/useEditLink.js.map new file mode 100644 index 00000000..4330f698 --- /dev/null +++ b/_lib/app/hooks/useEditLink.js.map @@ -0,0 +1 @@ +{"version":3,"file":"useEditLink.js","sourceRoot":"","sources":["../../../app/hooks/useEditLink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,MAAM,UAAU,WAAW;IACzB,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;IAC9B,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAE1B,OAAO,OAAO,CAAC,GAAG,EAAE;QAClB,MAAM,EAAE,OAAO,GAAG,EAAE,EAAE,IAAI,GAAG,WAAW,EAAE,GAAG,MAAM,CAAC,QAAQ,IAAI,EAAE,CAAA;QAElE,IAAI,GAAG,GAAG,EAAE,CAAA;QACZ,4BAA4B;QAC5B,IAAI,OAAO,OAAO,KAAK,UAAU;YAAE,GAAG,GAAG,EAAE,CAAA;aACtC,IAAI,QAAQ,CAAC,QAAQ;YAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAA;QAE9E,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,CAAA;IACtB,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAA;AAC1C,CAAC"} \ No newline at end of file diff --git a/_lib/app/hooks/useLayout.d.ts b/_lib/app/hooks/useLayout.d.ts new file mode 100644 index 00000000..47263d65 --- /dev/null +++ b/_lib/app/hooks/useLayout.d.ts @@ -0,0 +1,3 @@ +import type { Layout } from '../types.js'; +export declare function useLayout(): Layout; +//# sourceMappingURL=useLayout.d.js.map \ No newline at end of file diff --git a/_lib/app/hooks/useLayout.d.ts.map b/_lib/app/hooks/useLayout.d.ts.map new file mode 100644 index 00000000..e61038d0 --- /dev/null +++ b/_lib/app/hooks/useLayout.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useLayout.d.ts","sourceRoot":"","sources":["../../../app/hooks/useLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAIzC,wBAAgB,SAAS,IAAI,MAAM,CA6BlC"} \ No newline at end of file diff --git a/_lib/app/hooks/useLayout.js b/_lib/app/hooks/useLayout.js new file mode 100644 index 00000000..1a2e00fe --- /dev/null +++ b/_lib/app/hooks/useLayout.js @@ -0,0 +1,38 @@ +import { usePageData } from './usePageData.js'; +import { useSidebar } from './useSidebar.js'; +export function useLayout() { + const sidebar = useSidebar(); + const { frontmatter } = usePageData(); + const { layout: layout_, showLogo, showOutline, showSidebar, showTopNav } = frontmatter || {}; + const layout = layout_ ?? 'docs'; + return { + layout, + get showLogo() { + if (typeof showLogo !== 'undefined') + return showLogo; + return true; + }, + get showOutline() { + if (typeof showOutline !== 'undefined') + return showOutline; + return layout === 'docs'; + }, + get showSidebar() { + if (sidebar.items.length === 0) + return false; + if (typeof showSidebar !== 'undefined') + return showSidebar; + if (layout === 'minimal') + return false; + if (layout === 'landing') + return false; + return true; + }, + get showTopNav() { + if (typeof showTopNav !== 'undefined') + return showTopNav; + return true; + }, + }; +} +//# sourceMappingURL=useLayout.js.map \ No newline at end of file diff --git a/_lib/app/hooks/useLayout.js.map b/_lib/app/hooks/useLayout.js.map new file mode 100644 index 00000000..fc38a599 --- /dev/null +++ b/_lib/app/hooks/useLayout.js.map @@ -0,0 +1 @@ +{"version":3,"file":"useLayout.js","sourceRoot":"","sources":["../../../app/hooks/useLayout.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,MAAM,UAAU,SAAS;IACvB,MAAM,OAAO,GAAG,UAAU,EAAE,CAAA;IAC5B,MAAM,EAAE,WAAW,EAAE,GAAG,WAAW,EAAE,CAAA;IACrC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,WAAW,IAAI,EAAE,CAAA;IAE7F,MAAM,MAAM,GAAG,OAAO,IAAI,MAAM,CAAA;IAEhC,OAAO;QACL,MAAM;QACN,IAAI,QAAQ;YACV,IAAI,OAAO,QAAQ,KAAK,WAAW;gBAAE,OAAO,QAAQ,CAAA;YACpD,OAAO,IAAI,CAAA;QACb,CAAC;QACD,IAAI,WAAW;YACb,IAAI,OAAO,WAAW,KAAK,WAAW;gBAAE,OAAO,WAAW,CAAA;YAC1D,OAAO,MAAM,KAAK,MAAM,CAAA;QAC1B,CAAC;QACD,IAAI,WAAW;YACb,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC;gBAAE,OAAO,KAAK,CAAA;YAC5C,IAAI,OAAO,WAAW,KAAK,WAAW;gBAAE,OAAO,WAAW,CAAA;YAC1D,IAAI,MAAM,KAAK,SAAS;gBAAE,OAAO,KAAK,CAAA;YACtC,IAAI,MAAM,KAAK,SAAS;gBAAE,OAAO,KAAK,CAAA;YACtC,OAAO,IAAI,CAAA;QACb,CAAC;QACD,IAAI,UAAU;YACZ,IAAI,OAAO,UAAU,KAAK,WAAW;gBAAE,OAAO,UAAU,CAAA;YACxD,OAAO,IAAI,CAAA;QACb,CAAC;KACF,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/hooks/useLocalStorage.d.ts b/_lib/app/hooks/useLocalStorage.d.ts new file mode 100644 index 00000000..353bdf86 --- /dev/null +++ b/_lib/app/hooks/useLocalStorage.d.ts @@ -0,0 +1,4 @@ +type SetValue = (newVal: type | ((prevVal: type) => type)) => void; +export declare function useLocalStorage(key: string, defaultValue: type | undefined): [type | undefined, SetValue]; +export {}; +//# sourceMappingURL=useLocalStorage.d.js.map \ No newline at end of file diff --git a/_lib/app/hooks/useLocalStorage.d.ts.map b/_lib/app/hooks/useLocalStorage.d.ts.map new file mode 100644 index 00000000..d0ffa4fb --- /dev/null +++ b/_lib/app/hooks/useLocalStorage.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useLocalStorage.d.ts","sourceRoot":"","sources":["../../../app/hooks/useLocalStorage.ts"],"names":[],"mappings":"AAEA,KAAK,QAAQ,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,IAAI,KAAK,IAAI,CAAC,KAAK,IAAI,CAAA;AAExE,wBAAgB,eAAe,CAAC,IAAI,EAClC,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,IAAI,GAAG,SAAS,GAC7B,CAAC,IAAI,GAAG,SAAS,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,CA+BpC"} \ No newline at end of file diff --git a/_lib/app/hooks/useLocalStorage.js b/_lib/app/hooks/useLocalStorage.js new file mode 100644 index 00000000..10693382 --- /dev/null +++ b/_lib/app/hooks/useLocalStorage.js @@ -0,0 +1,41 @@ +import { useState, useEffect, useCallback } from 'react'; +export function useLocalStorage(key, defaultValue) { + const [value, setValue] = useState(); + useEffect(() => { + const initialValue = getItem(key); + if (typeof initialValue === 'undefined' || initialValue === null) { + setValue(typeof defaultValue === 'function' ? defaultValue() : defaultValue); + } + else { + setValue(initialValue); + } + }, [defaultValue, key]); + const setter = useCallback((updater) => { + setValue((old) => { + let newVal; + if (typeof updater === 'function') + newVal = updater(old); + else + newVal = updater; + try { + localStorage.setItem(key, JSON.stringify(newVal)); + } + catch { } + return newVal; + }); + }, [key]); + return [value, setter]; +} +function getItem(key) { + try { + const itemValue = localStorage.getItem(key); + if (typeof itemValue === 'string') { + return JSON.parse(itemValue); + } + return undefined; + } + catch { + return undefined; + } +} +//# sourceMappingURL=useLocalStorage.js.map \ No newline at end of file diff --git a/_lib/app/hooks/useLocalStorage.js.map b/_lib/app/hooks/useLocalStorage.js.map new file mode 100644 index 00000000..44e9a21c --- /dev/null +++ b/_lib/app/hooks/useLocalStorage.js.map @@ -0,0 +1 @@ +{"version":3,"file":"useLocalStorage.js","sourceRoot":"","sources":["../../../app/hooks/useLocalStorage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAIxD,MAAM,UAAU,eAAe,CAC7B,GAAW,EACX,YAA8B;IAE9B,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,G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file diff --git a/_lib/app/hooks/useMounted.d.ts b/_lib/app/hooks/useMounted.d.ts new file mode 100644 index 00000000..2878b4bd --- /dev/null +++ b/_lib/app/hooks/useMounted.d.ts @@ -0,0 +1,2 @@ +export declare function useMounted(): boolean; +//# sourceMappingURL=useMounted.d.js.map \ No newline at end of file diff --git a/_lib/app/hooks/useMounted.d.ts.map b/_lib/app/hooks/useMounted.d.ts.map new file mode 100644 index 00000000..71783bdc --- /dev/null +++ b/_lib/app/hooks/useMounted.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useMounted.d.ts","sourceRoot":"","sources":["../../../app/hooks/useMounted.ts"],"names":[],"mappings":"AAEA,wBAAgB,UAAU,YAMzB"} \ No newline at end of file diff --git a/_lib/app/hooks/useMounted.js b/_lib/app/hooks/useMounted.js new file mode 100644 index 00000000..42532be8 --- /dev/null +++ b/_lib/app/hooks/useMounted.js @@ -0,0 +1,9 @@ +import { useEffect, useState } from 'react'; +export function useMounted() { + const [mounted, setMounted] = useState(false); + useEffect(() => { + setMounted(true); + }, []); + return mounted; +} +//# sourceMappingURL=useMounted.js.map \ No newline at end of file diff --git a/_lib/app/hooks/useMounted.js.map b/_lib/app/hooks/useMounted.js.map new file mode 100644 index 00000000..a013d168 --- /dev/null +++ b/_lib/app/hooks/useMounted.js.map @@ -0,0 +1 @@ +{"version":3,"file":"useMounted.js","sourceRoot":"","sources":["../../../app/hooks/useMounted.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE3C,MAAM,UAAU,UAAU;IACxB,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC7C,SAAS,CAAC,GAAG,EAAE;QACb,UAAU,CAAC,IAAI,CAAC,CAAA;IAClB,CAAC,EAAE,EAAE,CAAC,CAAA;IACN,OAAO,OAAO,CAAA;AAChB,CAAC"} \ No newline at end of file diff --git a/_lib/app/hooks/useOgImageUrl.d.ts b/_lib/app/hooks/useOgImageUrl.d.ts new file mode 100644 index 00000000..0fd540e2 --- /dev/null +++ b/_lib/app/hooks/useOgImageUrl.d.ts @@ -0,0 +1,2 @@ +export declare function useOgImageUrl(): string | undefined; +//# sourceMappingURL=useOgImageUrl.d.js.map \ No newline at end of file diff --git a/_lib/app/hooks/useOgImageUrl.d.ts.map b/_lib/app/hooks/useOgImageUrl.d.ts.map new file mode 100644 index 00000000..f930e3bb --- /dev/null +++ b/_lib/app/hooks/useOgImageUrl.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useOgImageUrl.d.ts","sourceRoot":"","sources":["../../../app/hooks/useOgImageUrl.ts"],"names":[],"mappings":"AAKA,wBAAgB,aAAa,IAAI,MAAM,GAAG,SAAS,CAelD"} \ No newline at end of file diff --git a/_lib/app/hooks/useOgImageUrl.js b/_lib/app/hooks/useOgImageUrl.js new file mode 100644 index 00000000..1a839d12 --- /dev/null +++ b/_lib/app/hooks/useOgImageUrl.js @@ -0,0 +1,20 @@ +import { useMemo } from 'react'; +import { useLocation } from 'react-router-dom'; +import { useConfig } from './useConfig.js'; +export function useOgImageUrl() { + const { pathname } = useLocation(); + const config = useConfig(); + const { ogImageUrl } = config; + if (!ogImageUrl) + return undefined; + if (typeof ogImageUrl === 'string') + return ogImageUrl; + const pathKey = useMemo(() => { + const keys = Object.keys(ogImageUrl).filter((key) => pathname.startsWith(key)); + return keys[keys.length - 1]; + }, [ogImageUrl, pathname]); + if (!pathKey) + return undefined; + return ogImageUrl[pathKey]; +} +//# sourceMappingURL=useOgImageUrl.js.map \ No newline at end of file diff --git a/_lib/app/hooks/useOgImageUrl.js.map b/_lib/app/hooks/useOgImageUrl.js.map new file mode 100644 index 00000000..4e1475d5 --- /dev/null +++ b/_lib/app/hooks/useOgImageUrl.js.map @@ -0,0 +1 @@ +{"version":3,"file":"useOgImageUrl.js","sourceRoot":"","sources":["../../../app/hooks/useOgImageUrl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C,MAAM,UAAU,aAAa;IAC3B,MAAM,EAAE,QAAQ,EAAE,GAAG,WAAW,EAAE,CAAA;IAClC,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAAA;IAE7B,IAAI,CAAC,UAAU;QAAE,OAAO,SAAS,CAAA;IACjC,IAAI,OAAO,UAAU,KAAK,QAAQ;QAAE,OAAO,UAAU,CAAA;IAErD,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,EAAE;QAC3B,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAA;QAC9E,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;IAC9B,CAAC,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAA;IAC1B,IAAI,CAAC,OAAO;QAAE,OAAO,SAAS,CAAA;IAE9B,OAAO,UAAU,CAAC,OAAO,CAAC,CAAA;AAC5B,CAAC"} \ No newline at end of file diff --git a/_lib/app/hooks/usePageData.d.ts b/_lib/app/hooks/usePageData.d.ts new file mode 100644 index 00000000..745113a9 --- /dev/null +++ b/_lib/app/hooks/usePageData.d.ts @@ -0,0 +1,15 @@ +/// +import { type Module } from '../types.js'; +export declare function usePageData(): { + filePath?: string | undefined; + frontmatter: import("../types.js").Frontmatter | undefined; + lastUpdatedAt?: number | undefined; + previousPath?: string | undefined; +}; +export declare const PageDataContext: import("react").Context<{ + filePath?: string | undefined; + frontmatter: Module['frontmatter']; + lastUpdatedAt?: number | undefined; + previousPath?: string | undefined; +} | undefined>; +//# sourceMappingURL=usePageData.d.js.map \ No newline at end of file diff --git a/_lib/app/hooks/usePageData.d.ts.map b/_lib/app/hooks/usePageData.d.ts.map new file mode 100644 index 00000000..b0df44e3 --- /dev/null +++ b/_lib/app/hooks/usePageData.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"usePageData.d.ts","sourceRoot":"","sources":["../../../app/hooks/usePageData.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC,wBAAgB,WAAW;;;;;EAI1B;AAED,eAAO,MAAM,eAAe;;iBAGT,MAAM,CAAC,aAAa,CAAC;;;cAK5B,CAAA"} \ No newline at end of file diff --git a/_lib/app/hooks/usePageData.js b/_lib/app/hooks/usePageData.js new file mode 100644 index 00000000..fdc8df78 --- /dev/null +++ b/_lib/app/hooks/usePageData.js @@ -0,0 +1,10 @@ +import { createContext, useContext } from 'react'; +import {} from '../types.js'; +export function usePageData() { + const pageData = useContext(PageDataContext); + if (!pageData) + throw new Error('`usePageData` must be used within `PageDataContext.Provider`.'); + return pageData; +} +export const PageDataContext = createContext(undefined); +//# sourceMappingURL=usePageData.js.map \ No newline at end of file diff --git a/_lib/app/hooks/usePageData.js.map b/_lib/app/hooks/usePageData.js.map new file mode 100644 index 00000000..66ed1ad0 --- /dev/null +++ b/_lib/app/hooks/usePageData.js.map @@ -0,0 +1 @@ +{"version":3,"file":"usePageData.js","sourceRoot":"","sources":["../../../app/hooks/usePageData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEjD,OAAO,EAAe,MAAM,aAAa,CAAA;AAEzC,MAAM,UAAU,WAAW;IACzB,MAAM,QAAQ,GAAG,UAAU,CAAC,eAAe,CAAC,CAAA;IAC5C,IAAI,CAAC,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAA;IAC/F,OAAO,QAAQ,CAAA;AACjB,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAQ1C,SAAS,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/hooks/useSearchIndex.d.ts b/_lib/app/hooks/useSearchIndex.d.ts new file mode 100644 index 00000000..ba58533b --- /dev/null +++ b/_lib/app/hooks/useSearchIndex.d.ts @@ -0,0 +1,11 @@ +import MiniSearch from 'minisearch'; +export type Result = { + href: string; + html: string; + isPage: boolean; + text?: string; + title: string; + titles: string[]; +}; +export declare function useSearchIndex(): MiniSearch | undefined; +//# sourceMappingURL=useSearchIndex.d.js.map \ No newline at end of file diff --git a/_lib/app/hooks/useSearchIndex.d.ts.map b/_lib/app/hooks/useSearchIndex.d.ts.map new file mode 100644 index 00000000..b001eec7 --- /dev/null +++ b/_lib/app/hooks/useSearchIndex.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useSearchIndex.d.ts","sourceRoot":"","sources":["../../../app/hooks/useSearchIndex.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AAInC,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,OAAO,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB,CAAA;AAID,wBAAgB,cAAc,IAAI,UAAU,CAAC,MAAM,CAAC,GAAG,SAAS,CAqC/D"} \ No newline at end of file diff --git a/_lib/app/hooks/useSearchIndex.js b/_lib/app/hooks/useSearchIndex.js new file mode 100644 index 00000000..79dea316 --- /dev/null +++ b/_lib/app/hooks/useSearchIndex.js @@ -0,0 +1,42 @@ +import MiniSearch from 'minisearch'; +import { useEffect, useState } from 'react'; +import { getSearchIndex } from 'virtual:searchIndex'; +let promise; +export function useSearchIndex() { + const [searchIndex, setSearchIndex] = useState(); + // biome-ignore lint/correctness/useExhaustiveDependencies: + useEffect(() => { + ; + (async () => { + if (!promise) + promise = getSearchIndex(); + const json = await promise; + const searchIndex = MiniSearch.loadJSON(json, { + fields: ['title', 'titles', 'text'], + searchOptions: { + boost: { title: 4, text: 2, titles: 1 }, + fuzzy: 0.2, + prefix: true, + // ...(theme.value.search?.provider === 'local' && + // theme.value.search.options?.miniSearch?.searchOptions), + }, + storeFields: ['href', 'html', 'isPage', 'text', 'title', 'titles'], + // ...(theme.value.search?.provider === 'local' && + // theme.value.search.options?.miniSearch?.options), + }); + setSearchIndex(searchIndex); + })(); + }, []); + useEffect(() => { + if (!import.meta.hot) + return; + // TODO: Update index + import.meta.hot.accept('virtual:searchIndex', (m) => { + if (m) { + console.log('update', m); + } + }); + }, []); + return searchIndex; +} +//# sourceMappingURL=useSearchIndex.js.map \ No newline at end of file diff --git a/_lib/app/hooks/useSearchIndex.js.map b/_lib/app/hooks/useSearchIndex.js.map new file mode 100644 index 00000000..509314a8 --- /dev/null +++ b/_lib/app/hooks/useSearchIndex.js.map @@ -0,0 +1 @@ +{"version":3,"file":"useSearchIndex.js","sourceRoot":"","sources":["../../../app/hooks/useSearchIndex.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAWpD,IAAI,OAAwB,CAAA;AAE5B,MAAM,UAAU,cAAc;IAC5B,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,EAAsB,CAAA;IAEpE,2DAA2D;IAC3D,SAAS,CAAC,GAAG,EAAE;QACb,CAAC;QAAA,CAAC,KAAK,IAAI,EAAE;YACX,IAAI,CAAC,OAAO;gBAAE,OAAO,GAAG,cAAc,EAAE,CAAA;YACxC,MAAM,IAAI,GAAG,MAAM,OAAO,CAAA;YAC1B,MAAM,WAAW,GAAG,UAAU,CAAC,QAAQ,CAAS,IAAI,EAAE;gBACpD,MAAM,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC;gBACnC,aAAa,EAAE;oBACb,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;oBACvC,KAAK,EAAE,GAAG;oBACV,MAAM,EAAE,IAAI;oBACZ,kDAAkD;oBAClD,4DAA4D;iBAC7D;gBACD,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC;gBAClE,kDAAkD;gBAClD,sDAAsD;aACvD,CAAC,CAAA;YACF,cAAc,CAAC,WAAW,CAAC,CAAA;QAC7B,CAAC,CAAC,EAAE,CAAA;IACN,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG;YAAE,OAAM;QAE5B,qBAAqB;QACrB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,qBAAqB,EAAE,CAAC,CAAC,EAAE,EAAE;YAClD,IAAI,CAAC,EAAE;gBACL,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAA;aACzB;QACH,CAAC,CAAC,CAAA;IACJ,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,OAAO,WAAW,CAAA;AACpB,CAAC"} \ No newline at end of file diff --git a/_lib/app/hooks/useSidebar.d.ts b/_lib/app/hooks/useSidebar.d.ts new file mode 100644 index 00000000..bba64c7a --- /dev/null +++ b/_lib/app/hooks/useSidebar.d.ts @@ -0,0 +1,9 @@ +import type { SidebarItem } from '../../config.js'; +type UseSidebarReturnType = { + backLink?: boolean; + items: SidebarItem[]; + key?: string; +}; +export declare function useSidebar(): UseSidebarReturnType; +export {}; +//# sourceMappingURL=useSidebar.d.js.map \ No newline at end of file diff --git a/_lib/app/hooks/useSidebar.d.ts.map b/_lib/app/hooks/useSidebar.d.ts.map new file mode 100644 index 00000000..813e0a51 --- /dev/null +++ b/_lib/app/hooks/useSidebar.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useSidebar.d.ts","sourceRoot":"","sources":["../../../app/hooks/useSidebar.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAGlD,KAAK,oBAAoB,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,WAAW,EAAE,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAEtF,wBAAgB,UAAU,IAAI,oBAAoB,CAiBjD"} \ No newline at end of file diff --git a/_lib/app/hooks/useSidebar.js b/_lib/app/hooks/useSidebar.js new file mode 100644 index 00000000..840a5ca3 --- /dev/null +++ b/_lib/app/hooks/useSidebar.js @@ -0,0 +1,22 @@ +import { useMemo } from 'react'; +import { useLocation } from 'react-router-dom'; +import { useConfig } from './useConfig.js'; +export function useSidebar() { + const { pathname } = useLocation(); + const config = useConfig(); + const { sidebar } = config; + if (!sidebar) + return { items: [] }; + if (Array.isArray(sidebar)) + return { items: sidebar }; + const sidebarKey = useMemo(() => { + const keys = Object.keys(sidebar).filter((key) => pathname.startsWith(key)); + return keys[keys.length - 1]; + }, [sidebar, pathname]); + if (!sidebarKey) + return { items: [] }; + if (Array.isArray(sidebar[sidebarKey])) + return { key: sidebarKey, items: sidebar[sidebarKey] }; + return { ...sidebar[sidebarKey], key: sidebarKey }; +} +//# sourceMappingURL=useSidebar.js.map \ No newline at end of file diff --git a/_lib/app/hooks/useSidebar.js.map b/_lib/app/hooks/useSidebar.js.map new file mode 100644 index 00000000..f225aa05 --- /dev/null +++ b/_lib/app/hooks/useSidebar.js.map @@ -0,0 +1 @@ +{"version":3,"file":"useSidebar.js","sourceRoot":"","sources":["../../../app/hooks/useSidebar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ks/useTheme.d.ts new file mode 100644 index 00000000..997019df --- /dev/null +++ b/_lib/app/hooks/useTheme.d.ts @@ -0,0 +1,5 @@ +export declare function useTheme(): { + theme: string | undefined; + toggle(): void; +}; +//# sourceMappingURL=useTheme.d.js.map \ No newline at end of file diff --git a/_lib/app/hooks/useTheme.d.ts.map b/_lib/app/hooks/useTheme.d.ts.map new file mode 100644 index 00000000..b852f62c --- /dev/null +++ b/_lib/app/hooks/useTheme.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../../app/hooks/useTheme.ts"],"names":[],"mappings":"AAEA,wBAAgB,QAAQ;;;EAuBvB"} \ No newline at end of file diff --git a/_lib/app/hooks/useTheme.js b/_lib/app/hooks/useTheme.js new file mode 100644 index 00000000..62579647 --- /dev/null +++ b/_lib/app/hooks/useTheme.js @@ -0,0 +1,28 @@ +import { useEffect, useState } from 'react'; +export function useTheme() { + const [theme, setTheme] = useState(() => { + if (typeof window === 'undefined') + return undefined; + if (localStorage.getItem('vocs.theme')) { + const storedTheme = localStorage.getItem('vocs.theme'); + if (storedTheme) + return storedTheme; + } + return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'; + }); + useEffect(() => { + if (theme) + localStorage.setItem('vocs.theme', theme); + if (theme === 'dark') + document.documentElement.classList.add('dark'); + else + document.documentElement.classList.remove('dark'); + }, [theme]); + return { + theme, + toggle() { + setTheme((theme) => (theme === 'light' ? 'dark' : 'light')); + }, + }; +} +//# sourceMappingURL=useTheme.js.map \ No newline at end of file diff --git a/_lib/app/hooks/useTheme.js.map b/_lib/app/hooks/useTheme.js.map new file mode 100644 index 00000000..78448fac --- /dev/null +++ b/_lib/app/hooks/useTheme.js.map @@ -0,0 +1 @@ +{"version":3,"file":"useTheme.js","sourceRoot":"","sources":["../../../app/hooks/useTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE3C,MAAM,UAAU,QAAQ;IACtB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE;QACtC,IAAI,OAAO,MAAM,KAAK,WAAW;YAAE,OAAO,SAAS,CAAA;QACnD,IAAI,YAAY,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;YACtC,MAAM,WAAW,GAAG,YAAY,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;YACtD,IAAI,WAAW;gBAAE,OAAO,WAAW,CAAA;SACpC;QACD,OAAO,MAAM,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAA;IACrF,CAAC,CAAC,CAAA;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,KAAK;YAAE,YAAY,CAAC,OAAO,CAAC,YAAY,EAAE,KAAK,CAAC,CAAA;QAEpD,IAAI,KAAK,KAAK,MAAM;YAAE,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;;YAC/D,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IACxD,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAA;IAEX,OAAO;QACL,KAAK;QACL,MAAM;YACJ,QAAQ,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAA;QAC7D,CAAC;KACF,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/index.client.d.ts b/_lib/app/index.client.d.ts new file mode 100644 index 00000000..b49d6ca8 --- /dev/null +++ b/_lib/app/index.client.d.ts @@ -0,0 +1,2 @@ +import './styles/index.css.js'; +//# sourceMappingURL=index.client.d.js.map \ No newline at end of file diff --git a/_lib/app/index.client.d.ts.map b/_lib/app/index.client.d.ts.map new file mode 100644 index 00000000..8d911ed9 --- /dev/null +++ b/_lib/app/index.client.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.client.d.ts","sourceRoot":"","sources":["../../app/index.client.tsx"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,CAAA"} \ No newline at end of file diff --git a/_lib/app/index.client.js b/_lib/app/index.client.js new file mode 100644 index 00000000..2b3910ca --- /dev/null +++ b/_lib/app/index.client.js @@ -0,0 +1,17 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import './styles/index.css.js'; +import { hydrateRoot } from 'react-dom/client'; +import { RouterProvider, createBrowserRouter } from 'react-router-dom'; +import { ConfigProvider, getConfig } from './hooks/useConfig.js'; +import { routes } from './routes.js'; +import { hydrateLazyRoutes } from './utils/hydrateLazyRoutes.js'; +import { removeTempStyles } from './utils/removeTempStyles.js'; +hydrate(); +async function hydrate() { + const basePath = getConfig().basePath; + await hydrateLazyRoutes(routes, basePath); + removeTempStyles(); + const router = createBrowserRouter(routes, { basename: basePath }); + hydrateRoot(document.getElementById('app'), _jsx(ConfigProvider, { children: _jsx(RouterProvider, { router: router }) })); +} +//# sourceMappingURL=index.client.js.map \ No newline at end of file diff --git a/_lib/app/index.client.js.map b/_lib/app/index.client.js.map new file mode 100644 index 00000000..0acc5ea1 --- /dev/null +++ b/_lib/app/index.client.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.client.js","sourceRoot":"","sources":["../../app/index.client.tsx"],"names":[],"mappings":";AAAA,OAAO,uBAAuB,CAAA;AAE9B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACtE,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAE9D,OAAO,EAAE,CAAA;AAET,KAAK,UAAU,OAAO;IACpB,MAAM,QAAQ,GAAG,SAAS,EAAE,CAAC,QAAQ,CAAA;IAErC,MAAM,iBAAiB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IACzC,gBAAgB,EAAE,CAAA;IAElB,MAAM,MAAM,GAAG,mBAAmB,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAA;IAClE,WAAW,CACT,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAE,EAC/B,KAAC,cAAc,cACb,KAAC,cAAc,IAAC,MAAM,EAAE,MAAM,GAAI,GACnB,CAClB,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/index.server.d.ts b/_lib/app/index.server.d.ts new file mode 100644 index 00000000..162ae289 --- /dev/null +++ b/_lib/app/index.server.d.ts @@ -0,0 +1,10 @@ +import './styles/index.css.js'; +export declare function prerender(location: string): Promise<{ + head: string; + body: string; +}>; +export declare function render(req: Request): Promise<{ + head: string; + body: string; +}>; +//# sourceMappingURL=index.server.d.js.map \ No newline at end of file diff --git a/_lib/app/index.server.d.ts.map b/_lib/app/index.server.d.ts.map new file mode 100644 index 00000000..032cc9e6 --- /dev/null +++ b/_lib/app/index.server.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.server.d.ts","sourceRoot":"","sources":["../../app/index.server.tsx"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,CAAA;AAmB9B,wBAAsB,SAAS,CAAC,QAAQ,EAAE,MAAM;;;GAgC/C;AAED,wBAAsB,MAAM,CAAC,GAAG,EAAE,OAAO;;;GAmBxC"} \ No newline at end of file diff --git a/_lib/app/index.server.js b/_lib/app/index.server.js new file mode 100644 index 00000000..dda9b70a --- /dev/null +++ b/_lib/app/index.server.js @@ -0,0 +1,68 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import './styles/index.css.js'; +import { renderToString } from 'react-dom/server'; +import { Helmet } from 'react-helmet'; +import { Route, Routes } from 'react-router-dom'; +import { StaticRouter, StaticRouterProvider, createStaticHandler, createStaticRouter, } from 'react-router-dom/server.js'; +import { resolveVocsConfig } from '../vite/utils/resolveVocsConfig.js'; +import { ConfigProvider } from './hooks/useConfig.js'; +import { routes } from './routes.js'; +import { createFetchRequest } from './utils/createFetchRequest.js'; +export async function prerender(location) { + const unwrappedRoutes = (await Promise.all(routes.map(async (route) => { + const location_ = location === '/' ? '/' : location.replace(/\/$/, ''); + const path = route.path.replace(/\.html$/, ''); + if (path !== location_ && path !== '*') + return null; + const element = route.lazy ? (await route.lazy()).element : route.element; + return { + path: route.path, + element, + }; + }))).filter(Boolean); + const { config } = await resolveVocsConfig(); + const { basePath } = config; + const body = renderToString(_jsx(ConfigProvider, { config: config, children: _jsx(StaticRouter, { location: location, basename: basePath, children: _jsx(Routes, { children: unwrappedRoutes.map((route) => (_jsx(Route, { path: route.path, element: route.element }, route.path))) }) }) })); + return { head: await head({ path: location }), body }; +} +export async function render(req) { + const { config } = await resolveVocsConfig(); + const { basePath } = config; + const { query, dataRoutes } = createStaticHandler(routes, { basename: basePath }); + const fetchRequest = createFetchRequest(req); + const context = (await query(fetchRequest)); + if (context instanceof Response) + throw context; + const router = createStaticRouter(dataRoutes, context); + const body = renderToString(_jsx(ConfigProvider, { config: config, children: _jsx(StaticRouterProvider, { router: router, context: context }) })); + return { head: await head({ path: context.location.pathname }), body }; +} +async function head({ path }) { + const { config } = await resolveVocsConfig(); + const head = await (async () => { + if (typeof config.head === 'function') + return await config.head({ path }); + if (typeof config.head === 'object') { + const entry = Object.entries(config.head) + .reverse() + .find(([key]) => path.startsWith(key)); + return entry?.[1]; + } + return config.head; + })(); + const helmet = Helmet.renderStatic(); + let meta = helmet.meta.toString(); + const match = helmet.meta.toString().match(/property="og:image" content="(.*)"/); + if (match?.[1]) { + meta = meta.replace(/property="og:image" content="(.*)"/, `property="og:image" content="${match[1].replace(/&/g, '&')}"`); + } + return ` + ${helmet.title.toString()} + ${meta} + ${helmet.link.toString()} + ${helmet.style.toString()} + ${helmet.script.toString()} + ${renderToString(head)} + `; +} +//# sourceMappingURL=index.server.js.map \ No newline at end of file diff --git a/_lib/app/index.server.js.map b/_lib/app/index.server.js.map new file mode 100644 index 00000000..bb58c6c0 --- /dev/null +++ b/_lib/app/index.server.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.server.js","sourceRoot":"","sources":["../../app/index.server.tsx"],"names":[],"mappings":";AAAA,OAAO,uBAAuB,CAAA;AAG9B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,KAAK,EAAoB,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAClE,OAAO,EAEL,YAAY,EACZ,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAA;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAElE,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,QAAgB;IAC9C,MAAM,eAAe,GAAG,CACtB,MAAM,OAAO,CAAC,GAAG,CACf,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;QACzB,MAAM,SAAS,GAAG,QAAQ,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;QACtE,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAA;QAC9C,IAAI,IAAI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AC,CAAC,EAAE,CAAA;IAEJ,MAAM,MAAM,GAAG,MAAM,CAAC,YAAY,EAAE,CAAA;IAEpC,IAAI,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAA;IACjC,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAA;IAChF,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE;QACd,IAAI,GAAG,IAAI,CAAC,OAAO,CACjB,oCAAoC,EACpC,gCAAgC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,GAAG,CACnE,CAAA;KACF;IAED,OAAO;MACH,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE;MACvB,IAAI;MACJ,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE;MACtB,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE;MACvB,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;MACxB,cAAc,CAAC,IAAoB,CAAC;GACvC,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/layouts/DocsLayout.css.d.ts b/_lib/app/layouts/DocsLayout.css.d.ts new file mode 100644 index 00000000..adc860bf --- /dev/null +++ b/_lib/app/layouts/DocsLayout.css.d.ts @@ -0,0 +1,18 @@ +export declare const leftGutterWidthVar: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; +export declare const root: string; +export declare const content: string; +export declare const content_withTopNav: string; +export declare const content_withSidebar: string; +export declare const gutterLeft: string; +export declare const gutterTop: string; +export declare const gutterTop_offsetLeftGutter: string; +export declare const gutterTop_sticky: string; +export declare const gutterTopCurtain: string; +export declare const gutterTopCurtain_hidden: string; +export declare const gutterTopCurtain_withSidebar: string; +export declare const gutterRight: string; +export declare const gutterRight_withSidebar: string; +export declare const outlinePopover: string; +export declare const sidebar: string; +export declare const sidebarDrawer: string; +//# sourceMappingURL=DocsLayout.css.d.js.map \ No newline at end of file diff --git a/_lib/app/layouts/DocsLayout.css.d.ts.map b/_lib/app/layouts/DocsLayout.css.d.ts.map new file mode 100644 index 00000000..7ad09ce3 --- /dev/null +++ b/_lib/app/layouts/DocsLayout.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"DocsLayout.css.d.ts","sourceRoot":"","sources":["../../../app/layouts/DocsLayout.css.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,kBAAkB,oFAA+B,CAAA;AAE9D,eAAO,MAAM,IAAI,QAIf,CAAA;AAEF,eAAO,MAAM,OAAO,QAkBnB,CAAA;AAED,eAAO,MAAM,kBAAkB,QAS9B,CAAA;AAED,eAAO,MAAM,mBAAmB,QAM/B,CAAA;AAED,eAAO,MAAM,UAAU,QAiBtB,CAAA;AAED,eAAO,MAAM,SAAS,QAoBrB,CAAA;AAED,eAAO,MAAM,0BAA0B,QAStC,CAAA;AAED,eAAO,MAAM,gBAAgB,QAU5B,CAAA;AAED,eAAO,MAAM,gBAAgB,QAkB5B,CAAA;AAED,eAAO,MAAM,uBAAuB,QAMnC,CAAA;AAED,eAAO,MAAM,4BAA4B,QASxC,CAAA;AAED,eAAO,MAAM,WAAW,QAqBvB,CAAA;AAED,eAAO,MAAM,uBAAuB,QAKnC,CAAA;AAED,eAAO,MAAM,cAAc,QAY1B,CAAA;AAED,eAAO,MAAM,OAAO,QAKnB,CAAA;AAED,eAAO,MAAM,aAAa,QAUzB,CAAA"} \ No newline at end of file diff --git a/_lib/app/layouts/DocsLayout.css.js b/_lib/app/layouts/DocsLayout.css.js new file mode 100644 index 00000000..0aefd312 --- /dev/null +++ b/_lib/app/layouts/DocsLayout.css.js @@ -0,0 +1,155 @@ +import { createVar, fallbackVar, style } from '@vanilla-extract/css'; +import { bannerHeight } from '../components/Banner.css.js'; +import { contentVars, primitiveColorVars, sidebarVars, spaceVars, topNavVars, viewportVars, zIndexVars, } from '../styles/vars.css.js'; +export const leftGutterWidthVar = createVar('leftGutterWidth'); +export const root = style({ + vars: { + [leftGutterWidthVar]: `max(calc((100vw - ${contentVars.width}) / 2), ${sidebarVars.width})`, + }, +}); +export const content = style({ + backgroundColor: primitiveColorVars.background, + marginLeft: 'auto', + marginRight: 'auto', + maxWidth: contentVars.width, + minHeight: '100vh', + '@media': { + [viewportVars['max-720px']]: { + overflowX: 'hidden', + }, + [viewportVars['max-1080px']]: { + marginLeft: 'auto', + marginRight: 'auto', + }, + }, +}, 'content'); +export const content_withTopNav = style({ + '@media': { + [viewportVars['min-1080px']]: { + paddingTop: `calc(${topNavVars.height} + ${fallbackVar(bannerHeight, '0px')})`, + }, + }, +}, 'content_withTopNav'); +export const content_withSidebar = style({ + marginLeft: leftGutterWidthVar, + marginRight: 'unset', +}, 'content_withSidebar'); +export const gutterLeft = style({ + backgroundColor: primitiveColorVars.backgroundDark, + justifyContent: 'flex-end', + display: 'flex', + height: '100vh', + position: 'fixed', + top: fallbackVar(bannerHeight, '0px'), + width: leftGutterWidthVar, + zIndex: zIndexVars.gutterLeft, + '@media': { + [viewportVars['max-1080px']]: { + display: 'none', + }, + }, +}, 'gutterLeft'); +export const gutterTop = style({ + alignItems: 'center', + backgroundColor: `color-mix(in srgb, ${primitiveColorVars.background} 98%, transparent)`, + height: topNavVars.height, + width: '100vw', + zIndex: zIndexVars.gutterTop, + '@media': { + [viewportVars['min-1080px']]: { + paddingLeft: `calc(${leftGutterWidthVar} - ${sidebarVars.width})`, + paddingRight: `calc(${leftGutterWidthVar} - ${sidebarVars.width})`, + position: 'fixed', + top: fallbackVar(bannerHeight, '0px'), + }, + [viewportVars['max-1080px']]: { + position: 'initial', + }, + }, +}, 'gutterTop'); +export const gutterTop_offsetLeftGutter = style({ + '@media': { + [viewportVars['min-1080px']]: { + paddingLeft: leftGutterWidthVar, + }, + }, +}, 'gutterTop_offsetLeftGutter'); +export const gutterTop_sticky = style({ + '@media': { + [viewportVars['max-1080px']]: { + position: 'sticky', + top: 0, + }, + }, +}, 'gutterTop_sticky'); +export const gutterTopCurtain = style({ + display: 'flex', + height: topNavVars.curtainHeight, + width: '100vw', + zIndex: zIndexVars.gutterTopCurtain, + '@media': { + [viewportVars['min-1080px']]: { + position: 'fixed', + top: `calc(${topNavVars.height} + ${fallbackVar(bannerHeight, '0px')})`, + }, + [viewportVars['max-1080px']]: { + position: 'sticky', + top: 0, + }, + }, +}, 'gutterTopCurtain'); +export const gutterTopCurtain_hidden = style({ + background: 'unset', + display: 'none', +}, 'gutterTopCurtain_hidden'); +export const gutterTopCurtain_withSidebar = style({ + '@media': { + [viewportVars['min-1080px']]: { + marginLeft: leftGutterWidthVar, + }, + }, +}, 'gutterTopCurtain_withSidebar'); +export const gutterRight = style({ + display: 'flex', + height: '100vh', + overflowY: 'auto', + padding: `calc(${contentVars.verticalPadding} + ${topNavVars.height} + ${spaceVars['8']}) ${spaceVars['24']} 0 0`, + position: 'fixed', + top: fallbackVar(bannerHeight, '0px'), + right: '0', + width: `calc((100vw - ${contentVars.width}) / 2)`, + zIndex: zIndexVars.gutterRight, + '@media': { + [viewportVars['max-1280px']]: { + display: 'none', + }, + }, + '::-webkit-scrollbar': { + display: 'none', + }, +}, 'gutterRight'); +export const gutterRight_withSidebar = style({ + width: `calc(100vw - ${contentVars.width} - ${leftGutterWidthVar})`, +}, 'gutterRight_withSidebar'); +export const outlinePopover = style({ + display: 'none', + overflowY: 'auto', + height: `calc(100vh - ${topNavVars.height} - ${topNavVars.curtainHeight})`, + '@media': { + [viewportVars['max-1080px']]: { + display: 'block', + }, + }, +}, 'outlinePopover'); +export const sidebar = style({ + padding: `${spaceVars['0']} ${sidebarVars.horizontalPadding} ${spaceVars['24']} ${sidebarVars.horizontalPadding}`, +}, 'sidebar'); +export const sidebarDrawer = style({ + display: 'none', + '@media': { + [viewportVars['max-1080px']]: { + display: 'block', + }, + }, +}, 'sidebarDrawer'); +//# sourceMappingURL=DocsLayout.css.js.map \ No newline at end of file diff --git a/_lib/app/layouts/DocsLayout.css.js.map b/_lib/app/layouts/DocsLayout.css.js.map new file mode 100644 index 00000000..af8f6a1a --- /dev/null +++ b/_lib/app/layouts/DocsLayout.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DocsLayout.css.js","sourceRoot":"","sources":["../../../app/layouts/DocsLayout.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC1D,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,SAAS,EACT,UAAU,EACV,YAAY,EACZ,UAAU,GACX,MAAM,uBAAuB,CAAA;AAE9B,MAAM,CAAC,MAAM,kBAAkB,GAAG,SAAS,CAAC,iBAAiB,CAAC,CAAA;AAE9D,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;IACxB,IAAI,EAAE;QACJ,CAAC,kBAAkB,CAAC,EAAE,qBAAqB,WAAW,CAAC,KAAK,WAAW,WAAW,CAAC,KAAK,GAAG;KAC5F;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAC1B;IACE,eAAe,EAAE,kBAAkB,CAAC,UAAU;IAC9C,UAAU,EAAE,MAAM;IAClB,WAAW,EAAE,MAAM;IACnB,QAAQ,EAAE,WAAW,CAAC,KAAK;IAC3B,SAAS,EAAE,OAAO;IAClB,QAAQ,EAAE;QACR,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,EAAE;YAC3B,SAAS,EAAE,QAAQ;SACpB;QACD,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,EAAE;YAC5B,UAAU,EAAE,MAAM;YAClB,WAAW,EAAE,MAAM;SACpB;KACF;CACF,EACD,SAAS,CACV,CAAA;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CACrC;IACE,QAAQ,EAAE;QACR,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,EAAE;Y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AAiB,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,WAAW,CAAC,iBAAiB,EAAE;CAClH,EACD,SAAS,CACV,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,CAChC;IACE,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE;QACR,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,EAAE;YAC5B,OAAO,EAAE,OAAO;SACjB;KACF;CACF,EACD,eAAe,CAChB,CAAA"} \ No newline at end of file diff --git a/_lib/app/layouts/DocsLayout.d.ts b/_lib/app/layouts/DocsLayout.d.ts new file mode 100644 index 00000000..6249e986 --- /dev/null +++ b/_lib/app/layouts/DocsLayout.d.ts @@ -0,0 +1,5 @@ +import type { ReactNode } from 'react'; +export declare function DocsLayout({ children, }: { + children: ReactNode; +}): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=DocsLayout.d.js.map \ No newline at end of file diff --git a/_lib/app/layouts/DocsLayout.d.ts.map b/_lib/app/layouts/DocsLayout.d.ts.map new file mode 100644 index 00000000..e6b7bebf --- /dev/null +++ b/_lib/app/layouts/DocsLayout.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"DocsLayout.d.ts","sourceRoot":"","sources":["../../../app/layouts/DocsLayout.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAoBtC,wBAAgB,UAAU,CAAC,EACzB,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,SAAS,CAAA;CACpB,8CA0FA"} \ No newline at end of file diff --git a/_lib/app/layouts/DocsLayout.js b/_lib/app/layouts/DocsLayout.js new file mode 100644 index 00000000..ceab3e6d --- /dev/null +++ b/_lib/app/layouts/DocsLayout.js @@ -0,0 +1,44 @@ +import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime"; +import clsx from 'clsx'; +import { useInView } from 'react-intersection-observer'; +import { assignInlineVars } from '@vanilla-extract/dynamic'; +import { bannerHeight } from '../components/Banner.css.js'; +import { Banner } from '../components/Banner.js'; +import { Content } from '../components/Content.js'; +import { DesktopTopNav } from '../components/DesktopTopNav.js'; +import { Footer } from '../components/Footer.js'; +import { MobileTopNav } from '../components/MobileTopNav.js'; +import { Outline } from '../components/Outline.js'; +import { Sidebar } from '../components/Sidebar.js'; +import { SkipLink, skipLinkId } from '../components/SkipLink.js'; +import { useConfig } from '../hooks/useConfig.js'; +import { useLayout } from '../hooks/useLayout.js'; +import { useLocalStorage } from '../hooks/useLocalStorage.js'; +import { usePageData } from '../hooks/usePageData.js'; +import { contentVars, defaultFontFamily, fontFamilyVars } from '../styles/vars.css.js'; +import * as styles from './DocsLayout.css.js'; +export function DocsLayout({ children, }) { + const { banner, font } = useConfig(); + const { frontmatter = {} } = usePageData(); + const { content } = frontmatter; + const { layout, showOutline, showSidebar, showTopNav } = useLayout(); + const { ref, inView } = useInView({ + initialInView: true, + rootMargin: '100px 0px 0px 0px', + }); + const [showBanner, setShowBanner] = useLocalStorage('banner', true); + return (_jsxs("div", { className: styles.root, "data-layout": layout, style: assignInlineVars({ + [bannerHeight]: showBanner ? banner?.height : undefined, + [fontFamilyVars.default]: font?.default?.google + ? `${font.default.google}, ${defaultFontFamily.default}` + : undefined, + [fontFamilyVars.mono]: font?.mono?.google + ? `${font.mono.google}, ${defaultFontFamily.mono}` + : undefined, + }), children: [_jsx(SkipLink, {}), showBanner && _jsx(Banner, { hide: () => setShowBanner(false) }), showSidebar && (_jsx("div", { className: styles.gutterLeft, children: _jsx(Sidebar, { className: styles.sidebar }) })), showTopNav && (_jsxs(_Fragment, { children: [_jsxs("div", { ref: ref, className: clsx(styles.gutterTop, showSidebar && styles.gutterTop_offsetLeftGutter, (layout === 'minimal' || layout === 'landing') && styles.gutterTop_sticky), children: [_jsx(DesktopTopNav, {}), _jsx(MobileTopNav, {})] }), _jsxs("div", { className: clsx(styles.gutterTopCurtain, showSidebar && styles.gutterTopCurtain_withSidebar, (layout === 'minimal' || layout === 'landing') && styles.gutterTopCurtain_hidden), children: [_jsx(DesktopTopNav.Curtain, {}), _jsx(MobileTopNav.Curtain, { enableScrollToTop: !inView })] })] })), showOutline && (_jsx("div", { className: clsx(styles.gutterRight, showSidebar && styles.gutterRight_withSidebar), children: _jsx(Outline, {}) })), _jsxs("div", { id: skipLinkId, className: clsx(styles.content, showSidebar && styles.content_withSidebar, showTopNav && styles.content_withTopNav), style: assignInlineVars({ + [contentVars.horizontalPadding]: content?.horizontalPadding, + [contentVars.width]: content?.width, + [contentVars.verticalPadding]: content?.verticalPadding, + }), children: [_jsx(Content, { children: children }), _jsx(Footer, {})] }), _jsx("div", { "data-bottom-observer": true })] })); +} +//# sourceMappingURL=DocsLayout.js.map \ No newline at end of file diff --git a/_lib/app/layouts/DocsLayout.js.map b/_lib/app/layouts/DocsLayout.js.map new file mode 100644 index 00000000..285c0b4e --- /dev/null +++ b/_lib/app/layouts/DocsLayout.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DocsLayout.js","sourceRoot":"","sources":["../../../app/layouts/DocsLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAA;AAEvB,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAA;AAEvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAClD,O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KAAC,OAAO,KAAG,GACP,CACP,EAED,eACE,EAAE,EAAE,UAAU,EACd,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,OAAO,EACd,WAAW,IAAI,MAAM,CAAC,mBAAmB,EACzC,UAAU,IAAI,MAAM,CAAC,kBAAkB,CACxC,EACD,KAAK,EAAE,gBAAgB,CAAC;oBACtB,CAAC,WAAW,CAAC,iBAAiB,CAAC,EAAE,OAAO,EAAE,iBAAiB;oBAC3D,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,KAAK;oBACnC,CAAC,WAAW,CAAC,eAAe,CAAC,EAAE,OAAO,EAAE,eAAe;iBACxD,CAAC,aAEF,KAAC,OAAO,cAAE,QAAQ,GAAW,EAC7B,KAAC,MAAM,KAAG,IACN,EACN,6CAA4B,IACxB,CACP,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/public/.vocs/icons/arrow-diagonal.svg b/_lib/app/public/.vocs/icons/arrow-diagonal.svg new file mode 100644 index 00000000..09d0d0ad --- /dev/null +++ b/_lib/app/public/.vocs/icons/arrow-diagonal.svg @@ -0,0 +1,3 @@ + + + diff --git a/_lib/app/public/.vocs/icons/chevron-down.svg b/_lib/app/public/.vocs/icons/chevron-down.svg new file mode 100644 index 00000000..3fb4a526 --- /dev/null +++ b/_lib/app/public/.vocs/icons/chevron-down.svg @@ -0,0 +1,13 @@ + + Chevron Down + + \ No newline at end of file diff --git a/_lib/app/public/.vocs/icons/chevron-up.svg b/_lib/app/public/.vocs/icons/chevron-up.svg new file mode 100644 index 00000000..cc18dae4 --- /dev/null +++ b/_lib/app/public/.vocs/icons/chevron-up.svg @@ -0,0 +1,13 @@ + + Chevron Up + + \ No newline at end of file diff --git a/_lib/app/public/.vocs/icons/link.svg b/_lib/app/public/.vocs/icons/link.svg new file mode 100644 index 00000000..4e64236b --- /dev/null +++ b/_lib/app/public/.vocs/icons/link.svg @@ -0,0 +1,3 @@ + + + diff --git a/_lib/app/root.d.ts b/_lib/app/root.d.ts new file mode 100644 index 00000000..2c523c31 --- /dev/null +++ b/_lib/app/root.d.ts @@ -0,0 +1,11 @@ +import { type ReactNode } from 'react'; +import 'virtual:styles'; +import { type Module } from './types.js'; +export declare function Root(props: { + children: ReactNode; + filePath?: string; + frontmatter: Module['frontmatter']; + lastUpdatedAt?: number; + path: string; +}): import("react/jsx-runtime.js").JSX.Element; +//# sourceMappingURL=root.d.js.map \ No newline at end of file diff --git a/_lib/app/root.d.ts.map b/_lib/app/root.d.ts.map new file mode 100644 index 00000000..2dbb482a --- /dev/null +++ b/_lib/app/root.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../app/root.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAA;AAIzD,OAAO,gBAAgB,CAAA;AAMvB,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,YAAY,CAAA;AAExC,wBAAgB,IAAI,CAAC,KAAK,EAAE;IAC1B,QAAQ,EAAE,SAAS,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAC,aAAa,CAAC,CAAA;IAClC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,IAAI,EAAE,MAAM,CAAA;CACb,8CAyBA"} \ No newline at end of file diff --git a/_lib/app/root.js b/_lib/app/root.js new file mode 100644 index 00000000..d28ce4b6 --- /dev/null +++ b/_lib/app/root.js @@ -0,0 +1,52 @@ +import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime"; +import { MDXProvider } from '@mdx-js/react'; +import { useEffect, useRef } from 'react'; +import { Helmet } from 'react-helmet'; +import { ScrollRestoration, useLocation } from 'react-router-dom'; +import { Layout } from 'virtual:consumer-components'; +import 'virtual:styles'; +import { components } from './components/mdx/index.js'; +import { useConfig } from './hooks/useConfig.js'; +import { useOgImageUrl } from './hooks/useOgImageUrl.js'; +import { PageDataContext } from './hooks/usePageData.js'; +import {} from './types.js'; +export function Root(props) { + const { children, filePath, frontmatter, lastUpdatedAt, path } = props; + const { pathname } = useLocation(); + const previousPathRef = useRef(); + // biome-ignore lint/correctness/useExhaustiveDependencies: + useEffect(() => { + previousPathRef.current = pathname; + }); + return (_jsxs(_Fragment, { children: [_jsx(Head, { frontmatter: frontmatter }), typeof window !== 'undefined' && _jsx(ScrollRestoration, {}), _jsx(MDXProvider, { components: components, children: _jsx(Layout, { frontmatter: frontmatter, path: path, children: _jsx(PageDataContext.Provider, { value: { filePath, frontmatter, lastUpdatedAt, previousPath: previousPathRef.current }, children: children }) }) })] })); +} +function Head({ frontmatter }) { + const config = useConfig(); + const ogImageUrl = useOgImageUrl(); + const { baseUrl, font, iconUrl, logoUrl } = config; + const title = frontmatter?.title ?? config.title; + const description = frontmatter?.description ?? config.description; + const enableTitleTemplate = config.title && !title.includes(config.title); + const isLocalhost = typeof window !== 'undefined' && window.location.hostname === 'localhost'; + return (_jsxs(Helmet, { defaultTitle: config.title, titleTemplate: enableTitleTemplate ? config.titleTemplate : undefined, children: [title && _jsx("title", { children: title }), baseUrl && import.meta.env.PROD && !isLocalhost && _jsx("base", { href: baseUrl }), description !== 'undefined' && _jsx("meta", { name: "description", content: description }), iconUrl && typeof iconUrl === 'string' && (_jsx("link", { rel: "icon", href: iconUrl, type: getIconType(iconUrl) })), iconUrl && typeof iconUrl !== 'string' && (_jsx("link", { rel: "icon", href: iconUrl.light, type: getIconType(iconUrl.light) })), iconUrl && typeof iconUrl !== 'string' && (_jsx("link", { rel: "icon", href: iconUrl.dark, type: getIconType(iconUrl.dark), media: "(prefers-color-scheme: dark)" })), _jsx("meta", { property: "og:type", content: "website" }), _jsx("meta", { property: "og:title", content: title || config.title }), baseUrl && _jsx("meta", { property: "og:url", content: baseUrl }), description !== 'undefined' && _jsx("meta", { property: "og:description", content: description }), ogImageUrl && (_jsx("meta", { property: "og:image", content: ogImageUrl + .replace('%logo', `${baseUrl ? baseUrl : ''}${typeof logoUrl === 'string' ? logoUrl : logoUrl?.dark || ''}`) + .replace('%title', title || '') + .replace('%description', (description !== 'undefined' ? description : '') || '') })), (font?.default?.google || font?.mono?.google) && (_jsx("link", { rel: "preconnect", href: "https://fonts.googleapis.com" })), (font?.default?.google || font?.mono?.google) && (_jsx("link", { rel: "preconnect", href: "https://fonts.gstatic.com", crossOrigin: "" })), font?.default?.google && (_jsx("link", { href: `https://fonts.googleapis.com/css2?family=${font.default.google}:wght@300;400;500&display=swap`, rel: "stylesheet" })), font?.mono?.google && (_jsx("link", { href: `https://fonts.googleapis.com/css2?family=${font.mono.google}:wght@300;400;500&display=swap`, rel: "stylesheet" })), _jsx("meta", { name: "twitter:card", content: "summary_large_image" }), ogImageUrl && (_jsx("meta", { property: "twitter:image", content: ogImageUrl + .replace('%logo', `${baseUrl ? baseUrl : ''}${typeof logoUrl === 'string' ? logoUrl : logoUrl?.dark || ''}`) + .replace('%title', title || '') + .replace('%description', (description !== 'undefined' ? description : '') || '') }))] })); +} +function getIconType(iconUrl) { + if (iconUrl.endsWith('.svg')) + return 'image/svg+xml'; + if (iconUrl.endsWith('.png')) + return 'image/png'; + if (iconUrl.endsWith('.jpg')) + return 'image/jpeg'; + if (iconUrl.endsWith('.ico')) + return 'image/x-icon'; + if (iconUrl.endsWith('.webp')) + return 'image/webp'; + return undefined; +} +//# sourceMappingURL=root.js.map \ No newline at end of file diff --git a/_lib/app/root.js.map b/_lib/app/root.js.map new file mode 100644 index 00000000..da43c1f2 --- /dev/null +++ b/_lib/app/root.js.map @@ -0,0 +1 @@ +{"version":3,"file":"root.js","sourceRoot":"","sources":["../../app/root.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAkB,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,iBAAiB,EAAE,W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AI,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;QAAE,OAAO,YAAY,CAAA;IAClD,OAAO,SAAS,CAAA;AAClB,CAAC"} \ No newline at end of file diff --git a/_lib/app/routes.d.ts b/_lib/app/routes.d.ts new file mode 100644 index 00000000..7497277f --- /dev/null +++ b/_lib/app/routes.d.ts @@ -0,0 +1,13 @@ +/// +export declare const routes: ({ + path: string; + lazy: undefined; + element: import("react/jsx-runtime.js").JSX.Element; +} | { + path: string; + lazy: () => Promise<{ + element: import("react/jsx-runtime.js").JSX.Element; + default: import("react").ComponentType<{}>; + }>; +})[]; +//# sourceMappingURL=routes.d.js.map \ No newline at end of file diff --git a/_lib/app/routes.d.ts.map b/_lib/app/routes.d.ts.map new file mode 100644 index 00000000..4334cd04 --- /dev/null +++ b/_lib/app/routes.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../app/routes.tsx"],"names":[],"mappings":";AAyCA,eAAO,MAAM,MAAM;;;;;;;;;;IA0BM,CAAA"} \ No newline at end of file diff --git a/_lib/app/routes.js b/_lib/app/routes.js new file mode 100644 index 00000000..bfe428df --- /dev/null +++ b/_lib/app/routes.js @@ -0,0 +1,41 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import {} from 'react-router-dom'; +import { routes as routes_virtual } from 'virtual:routes'; +import { NotFound } from './components/NotFound.js'; +import { DocsLayout } from './layouts/DocsLayout.js'; +import { Root } from './root.js'; +const notFoundRoute = (() => { + const virtualRoute = routes_virtual.find(({ path }) => path === '*'); + if (virtualRoute) + return { + path: virtualRoute.path, + lazy: async () => { + const { frontmatter, ...route } = await virtualRoute.lazy(); + return { + ...route, + element: (_jsx(Root, { frontmatter: frontmatter, path: virtualRoute.path, children: _jsx(DocsLayout, { children: _jsx(route.default, {}) }) })), + }; + }, + }; + return { + path: '*', + lazy: undefined, + element: (_jsx(Root, { frontmatter: { layout: 'minimal' }, path: "*", children: _jsx(DocsLayout, { children: _jsx(NotFound, {}) }) })), + }; +})(); +export const routes = [ + ...routes_virtual + .filter(({ path }) => path !== '*') + .map((route_virtual) => ({ + path: route_virtual.path, + lazy: async () => { + const { frontmatter, ...route } = await route_virtual.lazy(); + return { + ...route, + element: (_jsx(Root, { filePath: route_virtual.filePath, frontmatter: frontmatter, lastUpdatedAt: route_virtual.lastUpdatedAt, path: route_virtual.path, children: _jsx(DocsLayout, { children: _jsx(route.default, {}) }) })), + }; + }, + })), + notFoundRoute, +]; +//# sourceMappingURL=routes.js.map \ No newline at end of file diff --git a/_lib/app/routes.js.map b/_lib/app/routes.js.map new file mode 100644 index 00000000..4b7ced8a --- /dev/null +++ b/_lib/app/routes.js.map @@ -0,0 +1 @@ +{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../app/routes.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAoB,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAEzD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE;IAC1B,MAAM,YAAY,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,KAAK,GAAG,CAAC,CAAA;IACpE,IAAI,YAAY;QACd,OAAO;YACL,IAAI,EAAE,YAAY,CAAC,IAAI;YACvB,IAAI,EAAE,KAAK,IAAI,EAAE;gBACf,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,YAAY,CAAC,IAAI,EAAE,CAAA;gBAE3D,OAAO;oBACL,GAAG,KAAK;oBACR,OAAO,EAAE,CACP,KAAC,IAAI,IAAC,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,YAAY,CAAC,IAAI,YACrD,KAAC,UAAU,cACT,KAAC,KAAK,CAAC,OAAO,KAAG,GACN,GACR,CACR;iBACoB,CAAA;YACzB,CAAC;SACF,CAAA;IAEH,OAAO;QACL,IAAI,EAAE,GAAG;QACT,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,CACP,KAAC,IAAI,IAAC,WAAW,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,IAAI,EAAC,GAAG,YAChD,KAAC,UAAU,cACT,KAAC,QAAQ,KAAG,GACD,GACR,CACR;KACF,CAAA;AACH,CAAC,CAAC,EAAE,CAAA;AAEJ,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,GAAG,cAAc;SACd,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,KAAK,GAAG,CAAC;SAClC,GAAG,CAAC,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;QACvB,IAAI,EAAE,aAAa,CAAC,IAAI;QACxB,IAAI,EAAE,KAAK,IAAI,EAAE;YACf,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,aAAa,CAAC,IAAI,EAAE,CAAA;YAE5D,OAAO;gBACL,GAAG,KAAK;gBACR,OAAO,EAAE,CACP,KAAC,IAAI,IACH,QAAQ,EAAE,aAAa,CAAC,QAAQ,EAChC,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,aAAa,CAAC,aAAa,EAC1C,IAAI,EAAE,aAAa,CAAC,IAAI,YAExB,KAAC,UAAU,cACT,KAAC,KAAK,CAAC,OAAO,KAAG,GACN,GACR,CACR;aACoB,CAAA;QACzB,CAAC;KACF,CAAC,CAAC;IACL,aAAa;CACU,CAAA"} \ No newline at end of file diff --git a/_lib/app/styles/global.css.d.ts b/_lib/app/styles/global.css.d.ts new file mode 100644 index 00000000..6957a740 --- /dev/null +++ b/_lib/app/styles/global.css.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=global.css.d.js.map \ No newline at end of file diff --git a/_lib/app/styles/global.css.d.ts.map b/_lib/app/styles/global.css.d.ts.map new file mode 100644 index 00000000..309e80de --- /dev/null +++ b/_lib/app/styles/global.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"global.css.d.ts","sourceRoot":"","sources":["../../../app/styles/global.css.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/_lib/app/styles/global.css.js b/_lib/app/styles/global.css.js new file mode 100644 index 00000000..930120d3 --- /dev/null +++ b/_lib/app/styles/global.css.js @@ -0,0 +1,52 @@ +import { globalStyle, layer } from '@vanilla-extract/css'; +import { root as Callout } from '../components/Callout.css.js'; +import { root as Content } from '../components/Content.css.js'; +import { root as Details } from '../components/mdx/Details.css.js'; +import { fontSizeVars, fontWeightVars, lineHeightVars, primitiveColorVars, semanticColorVars, spaceVars, viewportVars, } from './vars.css.js'; +//////////////////////////////////////////////////////////////////////// +// Root +const globalLayer = layer('global'); +globalStyle(':root', { + '@layer': { + [globalLayer]: { + backgroundColor: primitiveColorVars.background, + color: primitiveColorVars.text, + lineHeight: lineHeightVars.paragraph, + fontSize: fontSizeVars.root, + fontWeight: fontWeightVars.regular, + }, + }, + '@media': { + [viewportVars['max-720px']]: { + backgroundColor: primitiveColorVars.backgroundDark, + }, + }, +}); +globalStyle(':root.dark', { + colorScheme: 'dark', +}); +//////////////////////////////////////////////////////////////////////// +// Shiki +globalStyle(':root.dark pre.shiki span:not(.line), :root.dark :not(pre.shiki) .line span', { + color: 'var(--shiki-dark) !important', +}); +globalStyle('pre.shiki', { + backgroundColor: `${semanticColorVars.codeBlockBackground} !important`, +}); +//////////////////////////////////////////////////////////////////////// +// Misc. +globalStyle(`${Content} > *:not(:last-child), ${Details} > *:not(:last-child)`, { + marginBottom: spaceVars['24'], +}); +globalStyle(`${Callout} > *:not(:last-child), ${Callout} > ${Details} > *:not(:last-child)`, { + marginBottom: spaceVars['16'], +}); +globalStyle(`${Content} > *:last-child, ${Callout} > *:last-child, ${Details} > *:last-child`, { + marginBottom: spaceVars['0'], +}); +globalStyle('#app[aria-hidden="true"]', { + background: primitiveColorVars.background, + // TODO: Do we need this? Breaks layout for dialogs + // filter: 'brightness(0.5)', +}); +//# sourceMappingURL=global.css.js.map \ No newline at end of file diff --git a/_lib/app/styles/global.css.js.map b/_lib/app/styles/global.css.js.map new file mode 100644 index 00000000..402debf2 --- /dev/null +++ b/_lib/app/styles/global.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"global.css.js","sourceRoot":"","sources":["../../../app/styles/global.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAEzD,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,kCAAkC,CAAA;AAClE,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,EACT,YAAY,GACb,MAAM,eAAe,CAAA;AAEtB,wEAAwE;AACxE,OAAO;AAEP,MAAM,WAAW,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAA;AAEnC,WAAW,CAAC,OAAO,EAAE;IACnB,QAAQ,EAAE;QACR,CAAC,WAAW,CAAC,EAAE;YACb,eAAe,EAAE,kBAAkB,CAAC,UAAU;YAC9C,KAAK,EAAE,kBAAkB,CAAC,IAAI;YAC9B,UAAU,EAAE,cAAc,CAAC,SAAS;YACpC,QAAQ,EAAE,YAAY,CAAC,IAAI;YAC3B,UAAU,EAAE,cAAc,CAAC,OAAO;SACnC;KACF;IACD,QAAQ,EAAE;QACR,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,EAAE;YAC3B,eAAe,EAAE,kBAAkB,CAAC,cAAc;SACnD;KACF;CACF,CAAC,CAAA;AAEF,WAAW,CAAC,YAAY,EAAE;IACxB,WAAW,EAAE,MAAM;CACpB,CAAC,CAAA;AAEF,wEAAwE;AACxE,QAAQ;AAER,WAAW,CAAC,6EAA6E,EAAE;IACzF,KAAK,EAAE,8BAA8B;CACtC,CAAC,CAAA;AACF,WAAW,CAAC,WAAW,EAAE;IACvB,eAAe,EAAE,GAAG,iBAAiB,CAAC,mBAAmB,aAAa;CACvE,CAAC,CAAA;AAEF,wEAAwE;AACxE,QAAQ;AAER,WAAW,CAAC,GAAG,OAAO,0BAA0B,OAAO,uBAAuB,EAAE;IAC9E,YAAY,EAAE,SAAS,CAAC,IAAI,CAAC;CAC9B,CAAC,CAAA;AAEF,WAAW,CAAC,GAAG,OAAO,0BAA0B,OAAO,MAAM,OAAO,uBAAuB,EAAE;IAC3F,YAAY,EAAE,SAAS,CAAC,IAAI,CAAC;CAC9B,CAAC,CAAA;AAEF,WAAW,CAAC,GAAG,OAAO,oBAAoB,OAAO,oBAAoB,OAAO,iBAAiB,EAAE;IAC7F,YAAY,EAAE,SAAS,CAAC,GAAG,CAAC;CAC7B,CAAC,CAAA;AAEF,WAAW,CAAC,0BAA0B,EAAE;IACtC,UAAU,EAAE,kBAAkB,CAAC,UAAU;IACzC,mDAAmD;IACnD,6BAA6B;CAC9B,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/styles/index.css.d.ts b/_lib/app/styles/index.css.d.ts new file mode 100644 index 00000000..e615a4cc --- /dev/null +++ b/_lib/app/styles/index.css.d.ts @@ -0,0 +1,6 @@ +import './preflight.css.js'; +import './vars.css.js'; +import './reset.css.js'; +import './global.css.js'; +import './twoslash.css.js'; +//# sourceMappingURL=index.css.d.js.map \ No newline at end of file diff --git a/_lib/app/styles/index.css.d.ts.map b/_lib/app/styles/index.css.d.ts.map new file mode 100644 index 00000000..fd81f5c6 --- /dev/null +++ b/_lib/app/styles/index.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.css.d.ts","sourceRoot":"","sources":["../../../app/styles/index.css.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAA;AAE3B,OAAO,eAAe,CAAA;AAEtB,OAAO,gBAAgB,CAAA;AAEvB,OAAO,iBAAiB,CAAA;AAExB,OAAO,mBAAmB,CAAA"} \ No newline at end of file diff --git a/_lib/app/styles/index.css.js b/_lib/app/styles/index.css.js new file mode 100644 index 00000000..4ced4357 --- /dev/null +++ b/_lib/app/styles/index.css.js @@ -0,0 +1,6 @@ +import './preflight.css.js'; +import './vars.css.js'; +import './reset.css.js'; +import './global.css.js'; +import './twoslash.css.js'; +//# sourceMappingURL=index.css.js.map \ No newline at end of file diff --git a/_lib/app/styles/index.css.js.map b/_lib/app/styles/index.css.js.map new file mode 100644 index 00000000..199da41c --- /dev/null +++ b/_lib/app/styles/index.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.css.js","sourceRoot":"","sources":["../../../app/styles/index.css.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAA;AAE3B,OAAO,eAAe,CAAA;AAEtB,OAAO,gBAAgB,CAAA;AAEvB,OAAO,iBAAiB,CAAA;AAExB,OAAO,mBAAmB,CAAA"} \ No newline at end of file diff --git a/_lib/app/styles/preflight.css.d.ts b/_lib/app/styles/preflight.css.d.ts new file mode 100644 index 00000000..28783289 --- /dev/null +++ b/_lib/app/styles/preflight.css.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=preflight.css.d.js.map \ No newline at end of file diff --git a/_lib/app/styles/preflight.css.d.ts.map b/_lib/app/styles/preflight.css.d.ts.map new file mode 100644 index 00000000..59f9b0eb --- /dev/null +++ b/_lib/app/styles/preflight.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"preflight.css.d.ts","sourceRoot":"","sources":["../../../app/styles/preflight.css.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/_lib/app/styles/preflight.css.js b/_lib/app/styles/preflight.css.js new file mode 100644 index 00000000..5efc0914 --- /dev/null +++ b/_lib/app/styles/preflight.css.js @@ -0,0 +1,6 @@ +import { layer } from '@vanilla-extract/css'; +// Preflight layer designed to be used by consumers so +// consumer styles don't override internal Vocs styles. +// Example case: @tailwind CSS directives. +layer(); +//# sourceMappingURL=preflight.css.js.map \ No newline at end of file diff --git a/_lib/app/styles/preflight.css.js.map b/_lib/app/styles/preflight.css.js.map new file mode 100644 index 00000000..17bbc12d --- /dev/null +++ b/_lib/app/styles/preflight.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"preflight.css.js","sourceRoot":"","sources":["../../../app/styles/preflight.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE5C,sDAAsD;AACtD,uDAAuD;AACvD,0CAA0C;AAC1C,KAAK,EAAE,CAAA"} \ No newline at end of file diff --git a/_lib/app/styles/reset.css.d.ts b/_lib/app/styles/reset.css.d.ts new file mode 100644 index 00000000..a79b9894 --- /dev/null +++ b/_lib/app/styles/reset.css.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=reset.css.d.js.map \ No newline at end of file diff --git a/_lib/app/styles/reset.css.d.ts.map b/_lib/app/styles/reset.css.d.ts.map new file mode 100644 index 00000000..2b37c10e --- /dev/null +++ b/_lib/app/styles/reset.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"reset.css.d.ts","sourceRoot":"","sources":["../../../app/styles/reset.css.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/_lib/app/styles/reset.css.js b/_lib/app/styles/reset.css.js new file mode 100644 index 00000000..5ef038c5 --- /dev/null +++ b/_lib/app/styles/reset.css.js @@ -0,0 +1,220 @@ +import { globalStyle, layer } from '@vanilla-extract/css'; +import { root as DocsLayout } from '../layouts/DocsLayout.css.js'; +import { fontFamilyVars, fontSizeVars, primitiveColorVars } from './vars.css.js'; +const resetLayer = layer('reset'); +globalStyle(['*', '::before', '::after'].join(','), { + '@layer': { + [resetLayer]: { + boxSizing: 'border-box', + borderWidth: '0', + borderStyle: 'solid', + }, + }, +}); +globalStyle('*:focus-visible', { + '@layer': { + [resetLayer]: { + outline: `2px solid ${primitiveColorVars.borderAccent}`, + outlineOffset: '2px', + outlineStyle: 'dashed', + }, + }, +}); +globalStyle('html, body', { + '@layer': { + [resetLayer]: { + textSizeAdjust: '100%', + tabSize: 4, + lineHeight: 'inherit', + margin: 0, + padding: 0, + border: 0, + textRendering: 'optimizeLegibility', + }, + }, +}); +globalStyle(`html, body, ${DocsLayout}`, { + fontFamily: fontFamilyVars.default, + fontFeatureSettings: '"rlig" 1, "calt" 1', + fontSize: fontSizeVars.root, +}); +globalStyle('hr', { + '@layer': { + [resetLayer]: { + height: 0, + color: 'inherit', + borderTopWidth: '1px', + }, + }, +}); +globalStyle('abbr:where([title])', { + '@layer': { + [resetLayer]: { + textDecoration: 'underline dotted', + }, + }, +}); +globalStyle('h1,h2,h3,h4,h5,h6', { + '@layer': { + [resetLayer]: { + fontSize: 'inherit', + fontWeight: 'inherit', + // @ts-expect-error + textWrap: 'balance', + }, + }, +}); +globalStyle('a', { + '@layer': { + [resetLayer]: { + color: 'inherit', + textDecoration: 'inherit', + }, + }, +}); +globalStyle('b,strong', { + '@layer': { + [resetLayer]: { + fontWeight: 'bolder', + }, + }, +}); +globalStyle('code,kbd,samp,pre', { + '@layer': { + [resetLayer]: { + fontFamily: fontFamilyVars.mono, + fontSize: fontSizeVars.root, + }, + }, +}); +globalStyle('small', { + '@layer': { + [resetLayer]: { + fontSize: '80%', + }, + }, +}); +globalStyle('sub,sup', { + '@layer': { + [resetLayer]: { + fontSize: '75%', + lineHeight: 0, + position: 'relative', + verticalAlign: 'baseline', + }, + }, +}); +globalStyle('sub', { + '@layer': { + [resetLayer]: { + bottom: '-0.25em', + }, + }, +}); +globalStyle('sup', { + '@layer': { + [resetLayer]: { + top: '-0.5em', + }, + }, +}); +globalStyle('table', { + '@layer': { + [resetLayer]: { + borderColor: 'inherit', + borderCollapse: 'collapse', + textIndent: '0', + }, + }, +}); +globalStyle('button,input,optgroup,select,textarea', { + '@layer': { + [resetLayer]: { + fontFamily: 'inherit', + fontFeatureSettings: 'inherit', + fontVariationSettings: 'inherit', + fontSize: '100%', + fontWeight: 'inherit', + lineHeight: 'inherit', + color: 'inherit', + margin: 0, + padding: 0, + }, + }, +}); +globalStyle('button,select', { + textTransform: 'none', +}); +globalStyle('button,select', { + appearance: 'button', + backgroundColor: 'transparent', + backgroundImage: 'none', +}); +globalStyle(':-moz-focusring', { + outline: 'auto', +}); +globalStyle(':-moz-ui-invalid', { + outline: 'auto', +}); +globalStyle('progress', { + verticalAlign: 'baseline', +}); +globalStyle('::-webkit-inner-spin-button, ::-webkit-outer-spin-button', { + height: 'auto', +}); +globalStyle('[type="search"]', { + appearance: 'textfield', + outlineOffset: '-2px', +}); +globalStyle('::-webkit-search-decoration', { + appearance: 'none', +}); +globalStyle('::-webkit-file-upload-button', { + appearance: 'button', + font: 'inherit', +}); +globalStyle('summary', { + display: 'list-item', +}); +globalStyle('blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre', { + margin: 0, +}); +globalStyle('fieldset', { + margin: 0, + padding: 0, +}); +globalStyle('legend', { + padding: 0, +}); +globalStyle('ol,ul,menu', { + listStyle: 'none', + margin: 0, + padding: 0, +}); +globalStyle('dialog', { + padding: 0, +}); +globalStyle('textarea', { + resize: 'vertical', +}); +globalStyle('input::placeholder,textarea::placeholder', { + opacity: 1, +}); +globalStyle('button,[role="button"]', { + cursor: 'pointer', +}); +globalStyle(':disabled', { + overflow: 'default', +}); +globalStyle('img,svg,video,canvas,audio,iframe,embed,object', { + display: 'block', + verticalAlign: 'middle', +}); +globalStyle('img,video', { + maxWidth: '100%', + height: 'auto', +}); +globalStyle('[hidden]', { + display: 'none', +}); +//# sourceMappingURL=reset.css.js.map \ No newline at end of file diff --git a/_lib/app/styles/reset.css.js.map b/_lib/app/styles/reset.css.js.map new file mode 100644 index 00000000..ced35cb2 --- /dev/null +++ b/_lib/app/styles/reset.css.js.map @@ -0,0 +1 @@ +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,aAAa,EAAE,QAAQ;CACxB,CAAC,CAAA;AAEF,WAAW,CAAC,WAAW,EAAE;IACvB,QAAQ,EAAE,MAAM;IAChB,MAAM,EAAE,MAAM;CACf,CAAC,CAAA;AAEF,WAAW,CAAC,UAAU,EAAE;IACtB,OAAO,EAAE,MAAM;CAChB,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/styles/twoslash.css.d.ts b/_lib/app/styles/twoslash.css.d.ts new file mode 100644 index 00000000..106a1919 --- /dev/null +++ b/_lib/app/styles/twoslash.css.d.ts @@ -0,0 +1,20 @@ +export declare const twoslashVars: { + borderColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + underlineColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + popupBackground: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + popupShadow: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + matchedColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + unmatchedColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + cursorColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + errorColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + errorBackground: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + highlightedBackground: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + highlightedBorder: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + tagColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + tagBackground: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + tagWarnColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + tagWarnBackground: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + tagAnnotateColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + tagAnnotateBackground: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; +}; +//# sourceMappingURL=twoslash.css.d.js.map \ No newline at end of file diff --git a/_lib/app/styles/twoslash.css.d.ts.map b/_lib/app/styles/twoslash.css.d.ts.map new file mode 100644 index 00000000..265c833a --- /dev/null +++ b/_lib/app/styles/twoslash.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"twoslash.css.d.ts","sourceRoot":"","sources":["../../../app/styles/twoslash.css.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;CAqBxB,CAAA"} \ No newline at end of file diff --git a/_lib/app/styles/twoslash.css.js b/_lib/app/styles/twoslash.css.js new file mode 100644 index 00000000..7a4f0541 --- /dev/null +++ b/_lib/app/styles/twoslash.css.js @@ -0,0 +1,279 @@ +import { createGlobalTheme, createGlobalThemeContract, globalStyle } from '@vanilla-extract/css'; +import { borderRadiusVars, primitiveColorVars, semanticColorVars } from './vars.css.js'; +const getVarName = (scope) => (_, path) => `vocs-${scope}_${path.join('-')}`; +export const twoslashVars = createGlobalThemeContract({ + borderColor: 'borderColor', + underlineColor: 'underlineColor', + popupBackground: 'popupBackground', + popupShadow: 'popupShadow', + matchedColor: 'matchedColor', + unmatchedColor: 'unmatchedColor', + cursorColor: 'cursorColor', + errorColor: 'errorColor', + errorBackground: 'errorBackground', + highlightedBackground: 'highlightedBackground', + highlightedBorder: 'highlightedBorder', + tagColor: 'tagColor', + tagBackground: 'tagBackground', + tagWarnColor: 'tagWarnColor', + tagWarnBackground: 'tagWarnBackground', + tagAnnotateColor: 'tagAnnotateColor', + tagAnnotateBackground: 'tagAnnotateBackground', +}, getVarName('twoslash')); +createGlobalTheme(':root', twoslashVars, { + borderColor: primitiveColorVars.border2, + underlineColor: 'currentColor', + popupBackground: primitiveColorVars.background2, + popupShadow: 'rgba(0, 0, 0, 0.08) 0px 1px 4px', + matchedColor: 'inherit', + unmatchedColor: '#888', + cursorColor: '#8888', + errorColor: primitiveColorVars.textRed, + errorBackground: primitiveColorVars.backgroundRedTint2, + highlightedBackground: primitiveColorVars.background, + highlightedBorder: primitiveColorVars.background, + tagColor: primitiveColorVars.textBlue, + tagBackground: primitiveColorVars.backgroundBlueTint, + tagWarnColor: primitiveColorVars.textYellow, + tagWarnBackground: primitiveColorVars.backgroundYellowTint, + tagAnnotateColor: primitiveColorVars.textGreen, + tagAnnotateBackground: primitiveColorVars.backgroundGreenTint2, +}); +createGlobalTheme(':root.dark', twoslashVars, { + borderColor: primitiveColorVars.border2, + underlineColor: 'currentColor', + popupBackground: primitiveColorVars.background5, + popupShadow: 'rgba(0, 0, 0, 0.08) 0px 1px 4px', + matchedColor: 'inherit', + unmatchedColor: '#888', + cursorColor: '#8888', + errorColor: primitiveColorVars.textRed, + errorBackground: primitiveColorVars.backgroundRedTint2, + highlightedBackground: primitiveColorVars.background, + highlightedBorder: primitiveColorVars.background, + tagColor: primitiveColorVars.textBlue, + tagBackground: primitiveColorVars.backgroundBlueTint, + tagWarnColor: primitiveColorVars.textYellow, + tagWarnBackground: primitiveColorVars.backgroundYellowTint, + tagAnnotateColor: primitiveColorVars.textGreen, + tagAnnotateBackground: primitiveColorVars.backgroundGreenTint2, +}); +/* Respect people's wishes to not have animations */ +globalStyle('.twoslash *', { + '@media': { + '(prefers-reduced-motion: reduce)': { + transition: 'none !important', + }, + }, +}); +globalStyle(':root .twoslash-popup-info-hover, :root .twoslash-popup-info', { + vars: { + '--shiki-light-bg': primitiveColorVars.background2, + }, +}); +globalStyle(':root .twoslash-popup-info', { + width: 'max-content', +}); +globalStyle(':root.dark .twoslash-popup-info, :root.dark .twoslash-popup-info-hover', { + vars: { + '--shiki-dark-bg': primitiveColorVars.background5, + }, +}); +globalStyle('.twoslash-query-persisted > .twoslash-popup-info', { + zIndex: 1, +}); +globalStyle(':not(.twoslash-query-persisted) > .twoslash-popup-info', { + zIndex: 2, +}); +globalStyle('.twoslash:hover .twoslash-hover', { + borderColor: twoslashVars.underlineColor, +}); +globalStyle('.twoslash .twoslash-hover', { + borderBottom: '1px dotted transparent', + transitionTimingFunction: 'ease', + transition: 'border-color 0.3s', +}); +globalStyle('.twoslash-query-persisted', { + position: 'relative', +}); +globalStyle('.twoslash .twoslash-popup-info', { + position: 'absolute', + top: '0', + left: '0', + opacity: '0', + display: 'inline-block', + transform: 'translateY(1.1em)', + background: twoslashVars.popupBackground, + border: `1px solid ${twoslashVars.borderColor}`, + transition: 'opacity 0.3s', + borderRadius: '4px', + maxWidth: '540px', + padding: '4px 6px', + pointerEvents: 'none', + textAlign: 'left', + zIndex: 20, + whiteSpace: 'pre-wrap', + userSelect: 'none', + boxShadow: twoslashVars.popupShadow, +}); +globalStyle('.twoslash .twoslash-popup-info-hover', { + background: twoslashVars.popupBackground, + border: `1px solid ${twoslashVars.borderColor}`, + borderRadius: '4px', + boxShadow: twoslashVars.popupShadow, + display: 'inline-block', + maxWidth: '500px', + pointerEvents: 'auto', + position: 'fixed', + opacity: 1, + transition: 'opacity 0.3s', + whiteSpace: 'pre-wrap', + userSelect: 'none', + zIndex: 20, +}); +globalStyle('.twoslash .twoslash-popup-scroll-container', { + maxHeight: '300px', + padding: '4px 0px', + overflowY: 'auto', + msOverflowStyle: 'none', + scrollbarWidth: 'none', +}); +globalStyle('.twoslash-popup-arrow', { + position: 'absolute', + top: '-4px', + left: '1em', + borderTop: `1px solid ${twoslashVars.borderColor}`, + borderRight: `1px solid ${twoslashVars.borderColor}`, + background: twoslashVars.popupBackground, + transform: 'rotate(-45deg)', + width: '6px', + height: '6px', + pointerEvents: 'none', +}); +globalStyle('.twoslash .twoslash-popup-scroll-container::-webkit-scrollbar', { + display: 'none', +}); +globalStyle('.twoslash .twoslash-popup-jsdoc', { + borderTop: `1px solid ${primitiveColorVars.border2}`, + color: primitiveColorVars.text, + fontFamily: 'sans-serif', + fontWeight: '500', + marginTop: '4px', + padding: '4px 10px 0px 10px', +}); +globalStyle('.twoslash-tag-line + .twoslash-tag-line', { + marginTop: '-0.2em', +}); +globalStyle('.twoslash-query-persisted .twoslash-popup-info', { + zIndex: 9, + transform: 'translateY(1.5em)', +}); +globalStyle('.twoslash-hover:hover .twoslash-popup-info, .twoslash-query-persisted .twoslash-popup-info', { + opacity: 1, + pointerEvents: 'auto', +}); +globalStyle('.twoslash-popup-info:hover, .twoslash-popup-info-hover:hover', { + userSelect: 'auto', +}); +globalStyle('.twoslash-error-line', { + position: 'relative', + backgroundColor: twoslashVars.errorBackground, + borderLeft: `2px solid ${twoslashVars.errorColor}`, + color: twoslashVars.errorColor, + margin: '0.2em 0', +}); +globalStyle('.twoslash-error', { + background: `url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%206%203'%20enable-background%3D'new%200%200%206%203'%20height%3D'3'%20width%3D'6'%3E%3Cg%20fill%3D'%23c94824'%3E%3Cpolygon%20points%3D'5.5%2C0%202.5%2C3%201.1%2C3%204.1%2C0'%2F%3E%3Cpolygon%20points%3D'4%2C0%206%2C2%206%2C0.6%205.4%2C0'%2F%3E%3Cpolygon%20points%3D'0%2C2%201%2C3%202.4%2C3%200%2C0.6'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") repeat-x bottom left`, + paddingBottom: '2px', +}); +globalStyle('.twoslash-completion-cursor', { + position: 'relative', +}); +globalStyle('.twoslash-completion-cursor .twoslash-completion-list', { + userSelect: 'none', + position: 'absolute', + top: '0', + left: '0', + transform: 'translate(0, 1.2em)', + margin: '3px 0 0 -1px', + zIndex: 8, + boxShadow: twoslashVars.popupShadow, + background: twoslashVars.popupBackground, + border: `1px solid ${twoslashVars.borderColor}`, +}); +globalStyle('.twoslash-completion-list', { + borderRadius: '4px', + fontSize: '0.8rem', + padding: '4px', + display: 'flex', + flexDirection: 'column', + gap: '4px', + width: '240px', +}); +globalStyle('.twoslash-completion-list:hover', { + userSelect: 'auto', +}); +globalStyle('.twoslash-completion-list::before', { + backgroundColor: twoslashVars.cursorColor, + width: '2px', + position: 'absolute', + top: '-1.6em', + height: '1.4em', + left: '-1px', + content: ' ', +}); +globalStyle('.twoslash-completion-list .twoslash-completion-list-item', { + overflow: 'hidden', + display: 'flex', + alignItems: 'center', + gap: '0.5em', + lineHeight: '1em', +}); +globalStyle('.twoslash-completion-list .twoslash-completion-list-item span.twoslash-completions-unmatched.twoslash-completions-unmatched.twoslash-completions-unmatched', { + color: `${twoslashVars.unmatchedColor} !important`, +}); +globalStyle('.twoslash-completion-list .deprecated', { + textDecoration: 'line-through', + opacity: 0.5, +}); +globalStyle('.twoslash-completion-list .twoslash-completion-list-item span.twoslash-completions-matched.twoslash-completions-unmatched.twoslash-completions-unmatched', { + color: `${twoslashVars.matchedColor} !important`, +}); +globalStyle('.twoslash-tag-line', { + position: 'relative', + backgroundColor: twoslashVars.tagBackground, + borderLeft: `2px solid ${twoslashVars.tagColor}`, + color: twoslashVars.tagColor, + margin: '0.2em 0', + display: 'flex', + alignItems: 'center', + gap: '0.3em', +}); +globalStyle('.twoslash-tag-line+.line[data-empty-line]+.twoslash-tag-line', { + marginTop: 'calc(-1.75em - 0.2em)', +}); +globalStyle('.twoslash-tag-line .twoslash-tag-icon', { + width: '1.1em', + color: 'inherit', +}); +globalStyle('.twoslash-tag-line.twoslash-tag-error-line', { + backgroundColor: twoslashVars.errorBackground, + borderLeft: `2px solid ${twoslashVars.errorColor}`, + color: twoslashVars.errorColor, +}); +globalStyle('.twoslash-tag-line.twoslash-tag-warn-line', { + backgroundColor: twoslashVars.tagWarnBackground, + borderLeft: `2px solid ${twoslashVars.tagWarnColor}`, + color: twoslashVars.tagWarnColor, +}); +globalStyle('.twoslash-tag-line.twoslash-tag-annotate-line', { + backgroundColor: twoslashVars.tagAnnotateBackground, + borderLeft: `2px solid ${twoslashVars.tagAnnotateColor}`, + color: twoslashVars.tagAnnotateColor, +}); +globalStyle('.twoslash-highlighted', { + borderRadius: borderRadiusVars['2'], + backgroundColor: `${semanticColorVars.codeCharacterHighlightBackground} !important`, + boxShadow: `0 0 0 4px ${semanticColorVars.codeCharacterHighlightBackground}`, +}); +//# sourceMappingURL=twoslash.css.js.map \ No newline at end of file diff --git a/_lib/app/styles/twoslash.css.js.map b/_lib/app/styles/twoslash.css.js.map new file mode 100644 index 00000000..45100f88 --- /dev/null +++ b/_lib/app/styles/twoslash.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"twoslash.css.js","sourceRoot":"","sources":["../../../app/styles/twoslash.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAChG,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAEvF,MAAM,UAAU,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,CAAC,CAAgB,EAAE,IAAc,EAAE,EAAE,CACzE,QAAQ,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAA;AAEnC,MAAM,CAAC,MAAM,YAAY,GAAG,yBAAyB,CACnD;IACE,WAAW,EAAE,aAAa;IAC1B,cAAc,EAAE,gBAAgB;IAChC,eAAe,EAAE,iBAAiB;IAClC,WAAW,EAAE,aAAa;IAC1B,YAAY,EAAE,cAAc;IAC5B,cAAc,EAAE,gBAAgB;IAChC,WAAW,EAAE,aAAa;IAC1B,UAAU,EAAE,YAAY;IACxB,eAAe,EAAE,iBAAiB;IAClC,qBAAqB,EAAE,uBAAuB;IAC9C,iBAAiB,EAAE,mBAAmB;IACtC,QAAQ,EAAE,UAAU;IACpB,aAAa,EAAE,eAAe;IAC9B,YAAY,EAAE,cAAc;IAC5B,iBAAiB,EAAE,mBAAmB;IACtC,gBAAgB,EAAE,kBAAkB;IACpC,qBAAqB,EAAE,uBAAuB;CAC/C,EACD,UAAU,CAAC,UAAU,CAAC,CACvB,CAAA;AAED,iBAAiB,CAAC,OAAO,EAAE,YAAY,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aAAa;IAC3C,UAAU,EAAE,aAAa,YAAY,CAAC,QAAQ,EAAE;IAChD,KAAK,EAAE,YAAY,CAAC,QAAQ;IAC5B,MAAM,EAAE,SAAS;IACjB,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,QAAQ;IACpB,GAAG,EAAE,OAAO;CACb,CAAC,CAAA;AAEF,WAAW,CAAC,8DAA8D,EAAE;IAC1E,SAAS,EAAE,uBAAuB;CACnC,CAAC,CAAA;AAEF,WAAW,CAAC,uCAAuC,EAAE;IACnD,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,SAAS;CACjB,CAAC,CAAA;AAEF,WAAW,CAAC,4CAA4C,EAAE;IACxD,eAAe,EAAE,YAAY,CAAC,eAAe;IAC7C,UAAU,EAAE,aAAa,YAAY,CAAC,UAAU,EAAE;IAClD,KAAK,EAAE,YAAY,CAAC,UAAU;CAC/B,CAAC,CAAA;AAEF,WAAW,CAAC,2CAA2C,EAAE;IACvD,eAAe,EAAE,YAAY,CAAC,iBAAiB;IAC/C,UAAU,EAAE,aAAa,YAAY,CAAC,YAAY,EAAE;IACpD,KAAK,EAAE,YAAY,CAAC,YAAY;CACjC,CAAC,CAAA;AAEF,WAAW,CAAC,+CAA+C,EAAE;IAC3D,eAAe,EAAE,YAAY,CAAC,qBAAqB;IACnD,UAAU,EAAE,aAAa,YAAY,CAAC,gBAAgB,EAAE;IACxD,KAAK,EAAE,YAAY,CAAC,gBAAgB;CACrC,CAAC,CAAA;AAEF,WAAW,CAAC,uBAAuB,EAAE;IACnC,YAAY,EAAE,gBAAgB,CAAC,GAAG,CAAC;IACnC,eAAe,EAAE,GAAG,iBAAiB,CAAC,gCAAgC,aAAa;IACnF,SAAS,EAAE,aAAa,iBAAiB,CAAC,gCAAgC,EAAE;CAC7E,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/styles/utils.css.d.ts b/_lib/app/styles/utils.css.d.ts new file mode 100644 index 00000000..6eaea68f --- /dev/null +++ b/_lib/app/styles/utils.css.d.ts @@ -0,0 +1,4 @@ +export declare const visibleDark: string; +export declare const visibleLight: string; +export declare const visuallyHidden: string; +//# sourceMappingURL=utils.css.d.js.map \ No newline at end of file diff --git a/_lib/app/styles/utils.css.d.ts.map b/_lib/app/styles/utils.css.d.ts.map new file mode 100644 index 00000000..fb88c9ea --- /dev/null +++ b/_lib/app/styles/utils.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.css.d.ts","sourceRoot":"","sources":["../../../app/styles/utils.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,QAA2B,CAAA;AAKnD,eAAO,MAAM,YAAY,QAA4B,CAAA;AAKrD,eAAO,MAAM,cAAc,QAW1B,CAAA"} \ No newline at end of file diff --git a/_lib/app/styles/utils.css.js b/_lib/app/styles/utils.css.js new file mode 100644 index 00000000..4baf6a62 --- /dev/null +++ b/_lib/app/styles/utils.css.js @@ -0,0 +1,19 @@ +import { globalStyle, style } from '@vanilla-extract/css'; +export const visibleDark = style({}, 'visibleDark'); +globalStyle(`:root:not(.dark) ${visibleDark}`, { + display: 'none', +}); +export const visibleLight = style({}, 'visibleLight'); +globalStyle(`:root.dark ${visibleLight}`, { + display: 'none', +}); +export const visuallyHidden = style({ + clip: 'rect(0 0 0 0)', + clipPath: 'inset(50%)', + height: 1, + overflow: 'hidden', + position: 'absolute', + whiteSpace: 'nowrap', + width: 1, +}, 'visuallyHidden'); +//# sourceMappingURL=utils.css.js.map \ No newline at end of file diff --git a/_lib/app/styles/utils.css.js.map b/_lib/app/styles/utils.css.js.map new file mode 100644 index 00000000..46e83e4d --- /dev/null +++ b/_lib/app/styles/utils.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.css.js","sourceRoot":"","sources":["../../../app/styles/utils.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAEzD,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAAC,EAAE,EAAE,aAAa,CAAC,CAAA;AACnD,WAAW,CAAC,oBAAoB,WAAW,EAAE,EAAE;IAC7C,OAAO,EAAE,MAAM;CAChB,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAC,EAAE,EAAE,cAAc,CAAC,CAAA;AACrD,WAAW,CAAC,cAAc,YAAY,EAAE,EAAE;IACxC,OAAO,EAAE,MAAM;CAChB,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CACjC;IACE,IAAI,EAAE,eAAe;IACrB,QAAQ,EAAE,YAAY;IACtB,MAAM,EAAE,CAAC;IACT,QAAQ,EAAE,QAAQ;IAClB,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,QAAQ;IACpB,KAAK,EAAE,CAAC;CACT,EACD,gBAAgB,CACjB,CAAA"} \ No newline at end of file diff --git a/_lib/app/styles/vars.css.d.ts b/_lib/app/styles/vars.css.d.ts new file mode 100644 index 00000000..17b0974b --- /dev/null +++ b/_lib/app/styles/vars.css.d.ts @@ -0,0 +1,215 @@ +export declare const primitiveColorVars: { + white: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + black: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + background: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + background2: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + background3: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + background4: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + background5: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + backgroundAccent: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + backgroundAccentHover: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + backgroundAccentText: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + backgroundBlueTint: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + backgroundDark: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + backgroundGreenTint: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + backgroundGreenTint2: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + backgroundIrisTint: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + backgroundRedTint: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + backgroundRedTint2: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + backgroundYellowTint: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + border: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + border2: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + borderAccent: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + borderBlue: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + borderGreen: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + borderIris: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + borderRed: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + borderYellow: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + heading: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + inverted: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + shadow: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + shadow2: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + text: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + text2: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + text3: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + text4: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + textAccent: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + textAccentHover: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + textBlue: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + textBlueHover: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + textGreen: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + textGreenHover: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + textIris: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + textIrisHover: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + textRed: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + textRedHover: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + textYellow: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + textYellowHover: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + title: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; +}; +export declare const semanticColorVars: { + blockquoteBorder: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + blockquoteText: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + dangerBackground: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + dangerBorder: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + dangerText: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + dangerTextHover: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + infoBackground: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + infoBorder: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + infoText: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + infoTextHover: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + noteBackground: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + noteBorder: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + noteText: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + successBackground: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + successBorder: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + successText: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + successTextHover: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + tipBackground: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + tipBorder: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + tipText: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + tipTextHover: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + warningBackground: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + warningBorder: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + warningText: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + warningTextHover: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + codeBlockBackground: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + codeCharacterHighlightBackground: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + codeHighlightBackground: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + codeHighlightBorder: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + codeInlineBackground: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + codeInlineBorder: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + codeInlineText: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + codeTitleBackground: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + lineNumber: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + hr: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + link: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + linkHover: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + searchHighlightBackground: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + searchHighlightText: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + tableBorder: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + tableHeaderBackground: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + tableHeaderText: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; +}; +export declare const borderRadiusVars: { + '0': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '2': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '3': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '4': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '6': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '8': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; +}; +export declare const defaultFontFamily: { + default: string; + mono: string; +}; +export declare const fontFamilyVars: { + default: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + mono: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; +}; +export declare const fontSizeVars: { + root: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '9': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '11': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '12': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '13': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '14': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '15': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '16': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '18': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '20': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '24': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '32': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '64': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + h1: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + h2: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + h3: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + h4: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + h5: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + h6: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + calloutCodeBlock: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + code: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + codeBlock: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + lineNumber: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + subtitle: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + th: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + td: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; +}; +export declare const fontWeightVars: { + regular: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + medium: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + semibold: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; +}; +export declare const lineHeightVars: { + code: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + heading: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + listItem: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + outlineItem: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + paragraph: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + sidebarItem: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; +}; +export declare const spaceVars: { + '0': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '1': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '2': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '3': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '4': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '6': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '8': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '12': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '14': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '16': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '18': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '20': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '22': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '24': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '28': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '32': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '36': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '40': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '44': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '48': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '56': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '64': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '72': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + '80': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; +}; +export declare const viewportVars: { + 'max-480px': string; + 'min-480px': string; + 'max-720px': string; + 'min-720px': string; + 'max-1080px': string; + 'min-1080px': string; + 'max-1280px': string; + 'min-1280px': string; +}; +export declare const zIndexVars: { + backdrop: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + drawer: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + gutterLeft: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + gutterRight: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + gutterTop: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + gutterTopCurtain: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + popover: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + surface: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; +}; +export declare const contentVars: { + horizontalPadding: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + verticalPadding: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + width: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; +}; +export declare const outlineVars: { + width: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; +}; +export declare const sidebarVars: { + horizontalPadding: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + verticalPadding: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + width: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; +}; +export declare const topNavVars: { + height: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + horizontalPadding: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; + curtainHeight: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; +}; +//# sourceMappingURL=vars.css.d.js.map \ No newline at end of file diff --git a/_lib/app/styles/vars.css.d.ts.map b/_lib/app/styles/vars.css.d.ts.map new file mode 100644 index 00000000..15b89918 --- /dev/null +++ b/_lib/app/styles/vars.css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"vars.css.d.ts","sourceRoot":"","sources":["../../../app/styles/vars.css.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmD9B,CAAA;AAoGD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoD7B,CAAA;AA8CD,eAAO,MAAM,gBAAgB;;;;;;;CAU5B,CAAA;AAUD,eAAO,MAAM,iBAAiB;;;CAI7B,CAAA;AACD,eAAO,MAAM,cAAc;;;CAM1B,CAAA;AAMD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BxB,CAAA;AA8BD,eAAO,MAAM,cAAc;;;;CAO1B,CAAA;AAOD,eAAO,MAAM,cAAc;;;;;;;CAU1B,CAAA;AAUD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;CA4BrB,CAAA;AA4BD,eAAO,MAAM,YAAY;;;;;;;;;CASxB,CAAA;AAED,eAAO,MAAM,UAAU;;;;;;;;;CAYtB,CAAA;AAeD,eAAO,MAAM,WAAW;;;;CAOvB,CAAA;AAOD,eAAO,MAAM,WAAW;;CAKvB,CAAA;AAKD,eAAO,MAAM,WAAW;;;;CAOvB,CAAA;AAOD,eAAO,MAAM,UAAU;;;;CAOtB,CAAA"} \ No newline at end of file diff --git a/_lib/app/styles/vars.css.js b/_lib/app/styles/vars.css.js new file mode 100644 index 00000000..4e9538a1 --- /dev/null +++ b/_lib/app/styles/vars.css.js @@ -0,0 +1,491 @@ +import * as globalColors from '@radix-ui/colors'; +import { createGlobalTheme, createGlobalThemeContract, globalStyle } from '@vanilla-extract/css'; +const white = 'rgba(255 255 255 / 100%)'; +const black = 'rgba(0 0 0 / 100%)'; +const getVarName = (scope) => (_, path) => `vocs-${scope}_${path.join('-')}`; +export const primitiveColorVars = createGlobalThemeContract({ + white: 'white', + black: 'black', + background: 'background', + background2: 'background2', + background3: 'background3', + background4: 'background4', + background5: 'background5', + backgroundAccent: 'backgroundAccent', + backgroundAccentHover: 'backgroundAccentHover', + backgroundAccentText: 'backgroundAccentText', + backgroundBlueTint: 'backgroundBlueTint', + backgroundDark: 'backgroundDark', + backgroundGreenTint: 'backgroundGreenTint', + backgroundGreenTint2: 'backgroundGreenTint2', + backgroundIrisTint: 'backgroundIrisTint', + backgroundRedTint: 'backgroundRedTint', + backgroundRedTint2: 'backgroundRedTint2', + backgroundYellowTint: 'backgroundYellowTint', + border: 'border', + border2: 'border2', + borderAccent: 'borderAccent', + borderBlue: 'borderBlue', + borderGreen: 'borderGreen', + borderIris: 'borderIris', + borderRed: 'borderRed', + borderYellow: 'borderYellow', + heading: 'heading', + inverted: 'inverted', + shadow: 'shadow', + shadow2: 'shadow2', + text: 'text', + text2: 'text2', + text3: 'text3', + text4: 'text4', + textAccent: 'textAccent', + textAccentHover: 'textAccentHover', + textBlue: 'textBlue', + textBlueHover: 'textBlueHover', + textGreen: 'textGreen', + textGreenHover: 'textGreenHover', + textIris: 'textIris', + textIrisHover: 'textIrisHover', + textRed: 'textRed', + textRedHover: 'textRedHover', + textYellow: 'textYellow', + textYellowHover: 'textYellowHover', + title: 'title', +}, getVarName('color')); +createGlobalTheme(':root', primitiveColorVars, { + white, + black, + background: white, + background2: globalColors.gray.gray2, + background3: '#f6f6f6', + background4: globalColors.gray.gray3, + background5: globalColors.gray.gray4, + backgroundAccent: globalColors.iris.iris9, + backgroundAccentHover: globalColors.iris.iris10, + backgroundAccentText: white, + backgroundBlueTint: globalColors.blueA.blueA2, + backgroundDark: globalColors.gray.gray2, + backgroundGreenTint: globalColors.greenA.greenA2, + backgroundGreenTint2: globalColors.greenA.greenA3, + backgroundIrisTint: globalColors.irisA.irisA2, + backgroundRedTint: globalColors.redA.redA2, + backgroundRedTint2: globalColors.redA.redA3, + backgroundYellowTint: globalColors.yellowA.yellowA2, + border: '#ececec', + border2: globalColors.gray.gray7, + borderAccent: globalColors.iris.iris11, + borderBlue: globalColors.blueA.blueA4, + borderGreen: globalColors.greenA.greenA5, + borderIris: globalColors.iris.iris5, + borderRed: globalColors.redA.redA4, + borderYellow: globalColors.yellowA.yellowA5, + heading: globalColors.gray.gray12, + inverted: black, + shadow: globalColors.grayA.grayA3, + shadow2: globalColors.grayA.grayA2, + text: '#4c4c4c', + text2: globalColors.gray.gray11, + text3: globalColors.gray.gray10, + text4: globalColors.gray.gray8, + textAccent: globalColors.iris.iris11, + textAccentHover: globalColors.iris.iris12, + textBlue: globalColors.blue.blue11, + textBlueHover: globalColors.blue.blue12, + textGreen: globalColors.green.green11, + textGreenHover: globalColors.green.green12, + textIris: globalColors.iris.iris11, + textIrisHover: globalColors.iris.iris12, + textRed: globalColors.red.red11, + textRedHover: globalColors.red.red12, + textYellow: globalColors.yellow.yellow11, + textYellowHover: globalColors.yellow.yellow12, + title: globalColors.gray.gray12, +}); +createGlobalTheme(':root.dark', primitiveColorVars, { + white, + black, + background: globalColors.mauveDark.mauve3, + background2: globalColors.mauveDark.mauve4, + background3: '#2e2c31', + background4: globalColors.mauveDark.mauve5, + background5: globalColors.mauveDark.mauve6, + backgroundAccent: globalColors.irisDark.iris9, + backgroundAccentHover: globalColors.iris.iris11, + backgroundAccentText: white, + backgroundBlueTint: globalColors.blueA.blueA3, + backgroundDark: '#1e1d1f', + backgroundGreenTint: globalColors.greenA.greenA3, + backgroundGreenTint2: globalColors.greenA.greenA4, + backgroundIrisTint: globalColors.irisA.irisA4, + backgroundRedTint: globalColors.redA.redA3, + backgroundRedTint2: globalColors.redA.redA4, + backgroundYellowTint: globalColors.yellowA.yellowA2, + border: globalColors.mauveDark.mauve6, + border2: globalColors.mauveDark.mauve9, + borderAccent: globalColors.irisDark.iris10, + borderBlue: globalColors.blueA.blueA4, + borderGreen: globalColors.greenA.greenA5, + borderIris: globalColors.irisDark.iris5, + borderRed: globalColors.redA.redA4, + borderYellow: globalColors.yellowA.yellowA2, + heading: '#e9e9ea', + inverted: white, + shadow: globalColors.grayDarkA.grayA1, + shadow2: globalColors.blackA.blackA1, + text: '#cfcfcf', + text2: '#bdbdbe', + text3: '#a7a7a8', + text4: '#656567', + textAccent: globalColors.irisDark.iris11, + textAccentHover: globalColors.irisDark.iris10, + textBlue: globalColors.blueDark.blue11, + textBlueHover: globalColors.blueDark.blue10, + textGreen: globalColors.greenDark.green11, + textGreenHover: globalColors.greenDark.green10, + textIris: globalColors.irisDark.iris11, + textIrisHover: globalColors.irisDark.iris10, + textRed: globalColors.redDark.red11, + textRedHover: globalColors.redDark.red10, + textYellow: globalColors.yellowDark.yellow11, + textYellowHover: globalColors.amber.amber8, + title: white, +}); +export const semanticColorVars = createGlobalThemeContract({ + blockquoteBorder: 'blockquoteBorder', + blockquoteText: 'blockquoteText', + dangerBackground: 'dangerBackground', + dangerBorder: 'dangerBorder', + dangerText: 'dangerText', + dangerTextHover: 'dangerTextHover', + infoBackground: 'infoBackground', + infoBorder: 'infoBorder', + infoText: 'infoText', + infoTextHover: 'infoTextHover', + noteBackground: 'noteBackground', + noteBorder: 'noteBorder', + noteText: 'noteText', + successBackground: 'successBackground', + successBorder: 'successBorder', + successText: 'successText', + successTextHover: 'successTextHover', + tipBackground: 'tipBackground', + tipBorder: 'tipBorder', + tipText: 'tipText', + tipTextHover: 'tipTextHover', + warningBackground: 'warningBackground', + warningBorder: 'warningBorder', + warningText: 'warningText', + warningTextHover: 'warningTextHover', + codeBlockBackground: 'codeBlockBackground', + codeCharacterHighlightBackground: 'codeCharacterHighlightBackground', + codeHighlightBackground: 'codeHighlightBackground', + codeHighlightBorder: 'codeHighlightBorder', + codeInlineBackground: 'codeInlineBackground', + codeInlineBorder: 'codeInlineBorder', + codeInlineText: 'codeInlineText', + codeTitleBackground: 'codeTitleBackground', + lineNumber: 'lineNumber', + hr: 'hr', + link: 'link', + linkHover: 'linkHover', + searchHighlightBackground: 'searchHighlightBackground', + searchHighlightText: 'searchHighlightText', + tableBorder: 'tableBorder', + tableHeaderBackground: 'tableHeaderBackground', + tableHeaderText: 'tableHeaderText', +}, getVarName('color')); +createGlobalTheme(':root', semanticColorVars, { + blockquoteBorder: primitiveColorVars.border, + blockquoteText: primitiveColorVars.text3, + dangerBackground: primitiveColorVars.backgroundRedTint, + dangerBorder: primitiveColorVars.borderRed, + dangerText: primitiveColorVars.textRed, + dangerTextHover: primitiveColorVars.textRedHover, + infoBackground: primitiveColorVars.backgroundBlueTint, + infoBorder: primitiveColorVars.borderBlue, + infoText: primitiveColorVars.textBlue, + infoTextHover: primitiveColorVars.textBlueHover, + noteBackground: primitiveColorVars.background2, + noteBorder: primitiveColorVars.border, + noteText: primitiveColorVars.text2, + successBackground: primitiveColorVars.backgroundGreenTint, + successBorder: primitiveColorVars.borderGreen, + successText: primitiveColorVars.textGreen, + successTextHover: primitiveColorVars.textGreenHover, + tipBackground: primitiveColorVars.backgroundIrisTint, + tipBorder: primitiveColorVars.borderIris, + tipText: primitiveColorVars.textIris, + tipTextHover: primitiveColorVars.textIrisHover, + warningBackground: primitiveColorVars.backgroundYellowTint, + warningBorder: primitiveColorVars.borderYellow, + warningText: primitiveColorVars.textYellow, + warningTextHover: primitiveColorVars.textYellowHover, + codeBlockBackground: primitiveColorVars.background2, + codeCharacterHighlightBackground: primitiveColorVars.background5, + codeHighlightBackground: primitiveColorVars.background4, + codeHighlightBorder: primitiveColorVars.border2, + codeInlineBackground: primitiveColorVars.background4, + codeInlineBorder: primitiveColorVars.border, + codeInlineText: primitiveColorVars.textAccent, + codeTitleBackground: primitiveColorVars.background4, + lineNumber: primitiveColorVars.text4, + hr: primitiveColorVars.border, + link: primitiveColorVars.textAccent, + linkHover: primitiveColorVars.textAccentHover, + searchHighlightBackground: primitiveColorVars.borderAccent, + searchHighlightText: primitiveColorVars.background, + tableBorder: primitiveColorVars.border, + tableHeaderBackground: primitiveColorVars.background2, + tableHeaderText: primitiveColorVars.text2, +}); +export const borderRadiusVars = createGlobalThemeContract({ + '0': '0', + '2': '2', + '3': '3', + '4': '4', + '6': '6', + '8': '8', +}, getVarName('borderRadius')); +createGlobalTheme(':root', borderRadiusVars, { + '0': '0', + '2': '2px', + '3': '3px', + '4': '4px', + '6': '6px', + '8': '8px', +}); +export const defaultFontFamily = { + default: "system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif", + mono: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace', +}; +export const fontFamilyVars = createGlobalThemeContract({ + default: 'default', + mono: 'mono', +}, getVarName('fontFamily')); +createGlobalTheme(':root', fontFamilyVars, { + default: defaultFontFamily.default, + mono: defaultFontFamily.mono, +}); +export const fontSizeVars = createGlobalThemeContract({ + root: 'root', + '9': '9', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', + '16': '16', + '18': '18', + '20': '20', + '24': '24', + '32': '32', + '64': '64', + h1: 'h1', + h2: 'h2', + h3: 'h3', + h4: 'h4', + h5: 'h5', + h6: 'h6', + calloutCodeBlock: 'calloutCodeBlock', + code: 'code', + codeBlock: 'codeBlock', + lineNumber: 'lineNumber', + subtitle: 'subtitle', + th: 'th', + td: 'td', +}, getVarName('fontSize')); +createGlobalTheme(':root', fontSizeVars, { + root: '16px', + '9': '0.5625rem', + '11': '0.6875rem', + '12': '0.75rem', + '13': '0.8125rem', + '14': '0.875rem', + '15': '0.9375rem', + '16': '1rem', + '18': '1.125rem', + '20': '1.25rem', + '24': '1.5rem', + '32': '2rem', + '64': '3rem', + h1: fontSizeVars['32'], + h2: fontSizeVars['24'], + h3: fontSizeVars['20'], + h4: fontSizeVars['18'], + h5: fontSizeVars['16'], + h6: fontSizeVars['16'], + calloutCodeBlock: '0.8em', + code: '0.875em', + codeBlock: fontSizeVars['14'], + lineNumber: fontSizeVars['15'], + subtitle: fontSizeVars['20'], + th: fontSizeVars['14'], + td: fontSizeVars['14'], +}); +export const fontWeightVars = createGlobalThemeContract({ + regular: 'regular', + medium: 'medium', + semibold: 'semibold', +}, getVarName('fontWeight')); +createGlobalTheme(':root', fontWeightVars, { + regular: '300', + medium: '400', + semibold: '500', +}); +export const lineHeightVars = createGlobalThemeContract({ + code: 'code', + heading: 'heading', + listItem: 'listItem', + outlineItem: 'outlineItem', + paragraph: 'paragraph', + sidebarItem: 'sidebarItem', +}, getVarName('lineHeight')); +createGlobalTheme(':root', lineHeightVars, { + code: '1.75em', + heading: '1.5em', + listItem: '1.5em', + outlineItem: '1em', + paragraph: '1.75em', + sidebarItem: '1.375em', +}); +export const spaceVars = createGlobalThemeContract({ + '0': '0', + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '6': '6', + '8': '8', + '12': '12', + '14': '14', + '16': '16', + '18': '18', + '20': '20', + '22': '22', + '24': '24', + '28': '28', + '32': '32', + '36': '36', + '40': '40', + '44': '44', + '48': '48', + '56': '56', + '64': '64', + '72': '72', + '80': '80', +}, getVarName('space')); +createGlobalTheme(':root', spaceVars, { + '0': '0px', + '1': '1px', + '2': '0.125rem', + '3': '0.1875rem', + '4': '0.25rem', + '6': '0.375rem', + '8': '0.5rem', + '12': '0.75rem', + '14': '0.875rem', + '16': '1rem', + '18': '1.125rem', + '20': '1.25rem', + '22': '1.375rem', + '24': '1.5rem', + '28': '1.75rem', + '32': '2rem', + '36': '2.25rem', + '40': '2.5rem', + '44': '2.75rem', + '48': '3rem', + '56': '3.5rem', + '64': '4rem', + '72': '4.5rem', + '80': '5rem', +}); +export const viewportVars = { + 'max-480px': 'screen and (max-width: 480px)', + 'min-480px': 'screen and (min-width: 481px)', + 'max-720px': 'screen and (max-width: 720px)', + 'min-720px': 'screen and (min-width: 721px)', + 'max-1080px': 'screen and (max-width: 1080px)', + 'min-1080px': 'screen and (min-width: 1081px)', + 'max-1280px': 'screen and (max-width: 1280px)', + 'min-1280px': 'screen and (min-width: 1281px)', +}; +export const zIndexVars = createGlobalThemeContract({ + backdrop: 'backdrop', + drawer: 'drawer', + gutterLeft: 'gutterLeft', + gutterRight: 'gutterRight', + gutterTop: 'gutterTop', + gutterTopCurtain: 'gutterTopCurtain', + popover: 'popover', + surface: 'surface', +}, getVarName('zIndex')); +createGlobalTheme(':root', zIndexVars, { + backdrop: '69420', + drawer: '69421', + gutterRight: '11', + gutterLeft: '14', + gutterTop: '13', + gutterTopCurtain: '12', + popover: '69422', + surface: '10', +}); +///////////////////////////////////////////////////////////////////// +// Misc. +export const contentVars = createGlobalThemeContract({ + horizontalPadding: 'horizontalPadding', + verticalPadding: 'verticalPadding', + width: 'width', +}, getVarName('content')); +createGlobalTheme(':root', contentVars, { + horizontalPadding: spaceVars['48'], + verticalPadding: spaceVars['32'], + width: `calc(70ch + (${contentVars.horizontalPadding} * 2))`, +}); +export const outlineVars = createGlobalThemeContract({ + width: 'width', +}, getVarName('outline')); +createGlobalTheme(':root', outlineVars, { + width: '280px', +}); +export const sidebarVars = createGlobalThemeContract({ + horizontalPadding: 'horizontalPadding', + verticalPadding: 'verticalPadding', + width: 'width', +}, getVarName('sidebar')); +createGlobalTheme(':root', sidebarVars, { + horizontalPadding: spaceVars['24'], + verticalPadding: spaceVars['0'], + width: '300px', +}); +export const topNavVars = createGlobalThemeContract({ + height: 'height', + horizontalPadding: 'horizontalPadding', + curtainHeight: 'curtainHeight', +}, getVarName('topNav')); +createGlobalTheme(':root', topNavVars, { + height: '60px', + horizontalPadding: contentVars.horizontalPadding, + curtainHeight: '40px', +}); +globalStyle(':root', { + '@media': { + [viewportVars['max-1080px']]: { + vars: { + [contentVars.verticalPadding]: spaceVars['48'], + [contentVars.horizontalPadding]: spaceVars['24'], + [sidebarVars.horizontalPadding]: spaceVars['16'], + [sidebarVars.verticalPadding]: spaceVars['16'], + [sidebarVars.width]: '300px', + [topNavVars.height]: '48px', + }, + }, + [viewportVars['max-720px']]: { + vars: { + [contentVars.horizontalPadding]: spaceVars['16'], + [contentVars.verticalPadding]: spaceVars['32'], + }, + }, + }, +}); +//# sourceMappingURL=vars.css.js.map \ No newline at end of file diff --git a/_lib/app/styles/vars.css.js.map b/_lib/app/styles/vars.css.js.map new file mode 100644 index 00000000..ea7a38f0 --- /dev/null +++ b/_lib/app/styles/vars.css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"vars.css.js","sourceRoot":"","sources":["../../../app/styles/vars.css.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAEhG,MAAM,KAAK,GAAG,0BAA0B,CAAA;AACxC,MAAM,KAAK,GAAG,oBAAoB,CAAA;AAElC,MAAM,UAAU,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,CAAC,CAAgB,EAAE,IAAc,EAAE,EAAE,CACzE,QAAQ,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAA;AAEnC,MAAM,CAAC,MAAM,kBAAkB,GAAG,yBAAyB,CACzD;IACE,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,UAAU,EAAE,YAAY;IACxB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,aAAa;IAC1B,gBAAgB,EAAE,kBAAkB;IACpC,qBAAqB,EAAE,uB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EF,WAAW,CAAC,OAAO,EAAE;IACnB,QAAQ,EAAE;QACR,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,EAAE;YAC5B,IAAI,EAAE;gBACJ,CAAC,WAAW,CAAC,eAAe,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC;gBAC9C,CAAC,WAAW,CAAC,iBAAiB,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC;gBAChD,CAAC,WAAW,CAAC,iBAAiB,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC;gBAChD,CAAC,WAAW,CAAC,eAAe,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC;gBAC9C,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,OAAO;gBAC5B,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM;aAC5B;SACF;QACD,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,EAAE;YAC3B,IAAI,EAAE;gBACJ,CAAC,WAAW,CAAC,iBAAiB,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC;gBAChD,CAAC,WAAW,CAAC,eAAe,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC;aAC/C;SACF;KACF;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/app/types.d.ts b/_lib/app/types.d.ts new file mode 100644 index 00000000..4d372d24 --- /dev/null +++ b/_lib/app/types.d.ts @@ -0,0 +1,43 @@ +import * as React from 'react'; +export type BlogPost = { + authors?: string | string[]; + date?: string; + path: string; + title: string; + description: string; +}; +export type Frontmatter = { + [key: string]: unknown; + authors?: string | string[]; + content?: { + horizontalPadding?: string; + width?: string; + verticalPadding?: string; + }; + date?: string; + description?: string; + title?: string; +} & Partial; +export type Layout = { + layout: 'docs' | 'landing' | 'minimal'; + showLogo: boolean; + showOutline: number | boolean; + showSidebar: boolean; + showTopNav: boolean; +}; +export type Module = { + default: React.ComponentType; + frontmatter?: Frontmatter; +}; +export type PageData = { + filePath: string; + frontmatter?: Frontmatter; +}; +export type Route = { + filePath: string; + lazy: () => Promise; + lastUpdatedAt?: number; + path: string; + type: 'jsx' | 'mdx'; +}; +//# sourceMappingURL=types.d.js.map \ No newline at end of file diff --git a/_lib/app/types.d.ts.map b/_lib/app/types.d.ts.map new file mode 100644 index 00000000..90fba762 --- /dev/null +++ b/_lib/app/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../app/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,MAAM,MAAM,QAAQ,GAAG;IACrB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;IACtB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC3B,OAAO,CAAC,EAAE;QACR,iBAAiB,CAAC,EAAE,MAAM,CAAA;QAC1B,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,eAAe,CAAC,EAAE,MAAM,CAAA;KACzB,CAAA;IACD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAEnB,MAAM,MAAM,MAAM,GAAG;IACnB,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAAA;IACtC,QAAQ,EAAE,OAAO,CAAA;IACjB,WAAW,EAAE,MAAM,GAAG,OAAO,CAAA;IAC7B,WAAW,EAAE,OAAO,CAAA;IACpB,UAAU,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,MAAM,GAAG;IACnB,OAAO,EAAE,KAAK,CAAC,aAAa,CAAA;IAC5B,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,KAAK,GAAG;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAA;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,KAAK,GAAG,KAAK,CAAA;CACpB,CAAA"} \ No newline at end of file diff --git a/_lib/app/types.js b/_lib/app/types.js new file mode 100644 index 00000000..15c33771 --- /dev/null +++ b/_lib/app/types.js @@ -0,0 +1,2 @@ +import * as React from 'react'; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/_lib/app/types.js.map b/_lib/app/types.js.map new file mode 100644 index 00000000..69a8ebd9 --- /dev/null +++ b/_lib/app/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../app/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA"} \ No newline at end of file diff --git a/_lib/app/utils/createFetchRequest.d.ts b/_lib/app/utils/createFetchRequest.d.ts new file mode 100644 index 00000000..5590e3ce --- /dev/null +++ b/_lib/app/utils/createFetchRequest.d.ts @@ -0,0 +1,2 @@ +export declare function createFetchRequest(req: any): Request; +//# sourceMappingURL=createFetchRequest.d.js.map \ No newline at end of file diff --git a/_lib/app/utils/createFetchRequest.d.ts.map b/_lib/app/utils/createFetchRequest.d.ts.map new file mode 100644 index 00000000..d7dac79c --- /dev/null +++ b/_lib/app/utils/createFetchRequest.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"createFetchRequest.d.ts","sourceRoot":"","sources":["../../../app/utils/createFetchRequest.ts"],"names":[],"mappings":"AAAA,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,GAAG,WAyB1C"} \ No newline at end of file diff --git a/_lib/app/utils/createFetchRequest.js b/_lib/app/utils/createFetchRequest.js new file mode 100644 index 00000000..ff9d03e4 --- /dev/null +++ b/_lib/app/utils/createFetchRequest.js @@ -0,0 +1,25 @@ +export function createFetchRequest(req) { + const origin = `${req.protocol}://${req.headers.host}`; + const url = new URL(req.originalUrl || req.url, origin); + const controller = new AbortController(); + req.on('close', () => controller.abort()); + const headers = new Headers(); + for (const [key, values] of Object.entries(req.headers)) { + if (values) { + if (Array.isArray(values)) + for (const value of values) + headers.append(key, value); + else + headers.set(key, values); + } + } + const init = { + method: req.method, + headers, + signal: controller.signal, + }; + if (req.method !== 'GET' && req.method !== 'HEAD') + init.body = req.body; + return new Request(url.href, init); +} +//# sourceMappingURL=createFetchRequest.js.map \ No newline at end of file diff --git a/_lib/app/utils/createFetchRequest.js.map b/_lib/app/utils/createFetchRequest.js.map new file mode 100644 index 00000000..c512d908 --- /dev/null +++ b/_lib/app/utils/createFetchRequest.js.map @@ -0,0 +1 @@ +{"version":3,"file":"createFetchRequest.js","sourceRoot":"","sources":["../../../app/utils/createFetchRequest.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,kBAAkB,CAAC,GAAQ;IACzC,MAAM,MAAM,GAAG,GAAG,GAAG,CAAC,QAAQ,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAA;IACtD,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;IAEvD,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAA;IACxC,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC,CAAA;IAEzC,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAA;IAE7B,KAAK,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;QACvD,IAAI,MAAM,EAAE;YACV,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;gBAAE,KAAK,MAAM,KAAK,IAAI,MAAM;oBAAE,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;;gBAC5E,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,MAAa,CAAC,CAAA;SACrC;KACF;IAED,MAAM,IAAI,GAAgB;QACxB,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,OAAO;QACP,MAAM,EAAE,UAAU,CAAC,MAAM;KAC1B,CAAA;IAED,IAAI,GAAG,CAAC,MAAM,KAAK,KAAK,IAAI,GAAG,CAAC,MAAM,KAAK,MAAM;QAAE,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;IAEvE,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;AACpC,CAAC"} \ No newline at end of file diff --git a/_lib/app/utils/debounce.d.ts b/_lib/app/utils/debounce.d.ts new file mode 100644 index 00000000..e8d5eb6b --- /dev/null +++ b/_lib/app/utils/debounce.d.ts @@ -0,0 +1,2 @@ +export declare function debounce(fn: () => void, delay: number): () => void; +//# sourceMappingURL=debounce.d.js.map \ No newline at end of file diff --git a/_lib/app/utils/debounce.d.ts.map b/_lib/app/utils/debounce.d.ts.map new file mode 100644 index 00000000..25bd8cae --- /dev/null +++ b/_lib/app/utils/debounce.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../../app/utils/debounce.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,IAAI,CASlE"} \ No newline at end of file diff --git a/_lib/app/utils/debounce.js b/_lib/app/utils/debounce.js new file mode 100644 index 00000000..3316bc3c --- /dev/null +++ b/_lib/app/utils/debounce.js @@ -0,0 +1,12 @@ +export function debounce(fn, delay) { + let invoked = false; + return () => { + invoked = true; + setTimeout(() => { + if (invoked) + fn(); + invoked = false; + }, delay); + }; +} +//# sourceMappingURL=debounce.js.map \ No newline at end of file diff --git a/_lib/app/utils/debounce.js.map b/_lib/app/utils/debounce.js.map new file mode 100644 index 00000000..aacd5243 --- /dev/null +++ b/_lib/app/utils/debounce.js.map @@ -0,0 +1 @@ +{"version":3,"file":"debounce.js","sourceRoot":"","sources":["../../../app/utils/debounce.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,QAAQ,CAAC,EAAc,EAAE,KAAa;IACpD,IAAI,OAAO,GAAG,KAAK,CAAA;IACnB,OAAO,GAAG,EAAE;QACV,OAAO,GAAG,IAAI,CAAA;QACd,UAAU,CAAC,GAAG,EAAE;YACd,IAAI,OAAO;gBAAE,EAAE,EAAE,CAAA;YACjB,OAAO,GAAG,KAAK,CAAA;QACjB,CAAC,EAAE,KAAK,CAAC,CAAA;IACX,CAAC,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/utils/deserializeElement.d.ts b/_lib/app/utils/deserializeElement.d.ts new file mode 100644 index 00000000..ea0f3be9 --- /dev/null +++ b/_lib/app/utils/deserializeElement.d.ts @@ -0,0 +1,3 @@ +import { type ReactElement, type ReactNode } from 'react'; +export declare function deserializeElement(element: ReactElement, key?: number): ReactNode; +//# sourceMappingURL=deserializeElement.d.js.map \ No newline at end of file diff --git a/_lib/app/utils/deserializeElement.d.ts.map b/_lib/app/utils/deserializeElement.d.ts.map new file mode 100644 index 00000000..cbf7f1c2 --- /dev/null +++ b/_lib/app/utils/deserializeElement.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"deserializeElement.d.ts","sourceRoot":"","sources":["../../../app/utils/deserializeElement.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAEhE,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CASjF"} \ No newline at end of file diff --git a/_lib/app/utils/deserializeElement.js b/_lib/app/utils/deserializeElement.js new file mode 100644 index 00000000..1e67ff82 --- /dev/null +++ b/_lib/app/utils/deserializeElement.js @@ -0,0 +1,14 @@ +import React, {} from 'react'; +export function deserializeElement(element, key) { + if (typeof element !== 'object') + return element; + if (element === null) + return element; + if (Array.isArray(element)) + return element.map((el, i) => deserializeElement(el, i)); + const props = element.props.children + ? { ...element.props, children: deserializeElement(element.props.children) } + : element.props; + return React.createElement(element.type, { ...props, key }); +} +//# sourceMappingURL=deserializeElement.js.map \ No newline at end of file diff --git a/_lib/app/utils/deserializeElement.js.map b/_lib/app/utils/deserializeElement.js.map new file mode 100644 index 00000000..f569f5b6 --- /dev/null +++ b/_lib/app/utils/deserializeElement.js.map @@ -0,0 +1 @@ +{"version":3,"file":"deserializeElement.js","sourceRoot":"","sources":["../../../app/utils/deserializeElement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAqC,MAAM,OAAO,CAAA;AAEhE,MAAM,UAAU,kBAAkB,CAAC,OAAqB,EAAE,GAAY;IACpE,IAAI,OAAO,OAAO,KAAK,QAAQ;QAAE,OAAO,OAAO,CAAA;IAC/C,IAAI,OAAO,KAAK,IAAI;QAAE,OAAO,OAAO,CAAA;IACpC,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;QAAE,OAAO,OAAO,CAAC,GAAG,CAAM,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAA;IAEzF,MAAM,KAAK,GAAQ,OAAO,CAAC,KAAK,CAAC,QAAQ;QACvC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,KAAK,EAAE,QAAQ,EAAE,kBAAkB,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;QAC5E,CAAC,CAAC,OAAO,CAAC,KAAK,CAAA;IACjB,OAAO,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,GAAG,KAAK,EAAE,GAAG,EAAE,CAAC,CAAA;AAC7D,CAAC"} \ No newline at end of file diff --git a/_lib/app/utils/hydrateLazyRoutes.d.ts b/_lib/app/utils/hydrateLazyRoutes.d.ts new file mode 100644 index 00000000..ba1bb6c6 --- /dev/null +++ b/_lib/app/utils/hydrateLazyRoutes.d.ts @@ -0,0 +1,3 @@ +import { type RouteObject } from 'react-router-dom'; +export declare function hydrateLazyRoutes(routes: RouteObject[], basePath: string | undefined): Promise; +//# sourceMappingURL=hydrateLazyRoutes.d.js.map \ No newline at end of file diff --git a/_lib/app/utils/hydrateLazyRoutes.d.ts.map b/_lib/app/utils/hydrateLazyRoutes.d.ts.map new file mode 100644 index 00000000..5c313e0e --- /dev/null +++ b/_lib/app/utils/hydrateLazyRoutes.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"hydrateLazyRoutes.d.ts","sourceRoot":"","sources":["../../../app/utils/hydrateLazyRoutes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAe,MAAM,kBAAkB,CAAA;AAEhE,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,iBAiB1F"} \ No newline at end of file diff --git a/_lib/app/utils/hydrateLazyRoutes.js b/_lib/app/utils/hydrateLazyRoutes.js new file mode 100644 index 00000000..1146273c --- /dev/null +++ b/_lib/app/utils/hydrateLazyRoutes.js @@ -0,0 +1,17 @@ +import { matchRoutes } from 'react-router-dom'; +export async function hydrateLazyRoutes(routes, basePath) { + // Determine if any of the initial routes are lazy + const lazyMatches = matchRoutes(routes, window.location, basePath)?.filter((m) => m.route.lazy); + // Load the lazy matches and update the routes before creating your router + // so we can hydrate the SSR-rendered content synchronously + if (lazyMatches && lazyMatches?.length > 0) { + await Promise.all(lazyMatches.map(async (m) => { + const routeModule = await m.route.lazy(); + Object.assign(m.route, { + ...routeModule, + lazy: undefined, + }); + })); + } +} +//# sourceMappingURL=hydrateLazyRoutes.js.map \ No newline at end of file diff --git a/_lib/app/utils/hydrateLazyRoutes.js.map b/_lib/app/utils/hydrateLazyRoutes.js.map new file mode 100644 index 00000000..c797dffa --- /dev/null +++ b/_lib/app/utils/hydrateLazyRoutes.js.map @@ -0,0 +1 @@ +{"version":3,"file":"hydrateLazyRoutes.js","sourceRoot":"","sources":["../../../app/utils/hydrateLazyRoutes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEhE,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,MAAqB,EAAE,QAA4B;IACzF,kDAAkD;IAClD,MAAM,WAAW,GAAG,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IAE/F,0EAA0E;IAC1E,2DAA2D;IAC3D,IAAI,WAAW,IAAI,WAAW,EAAE,MAAM,GAAG,CAAC,EAAE;QAC1C,MAAM,OAAO,CAAC,GAAG,CACf,WAAW,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE;YAC1B,MAAM,WAAW,GAAG,MAAM,CAAC,CAAC,KAAK,CAAC,IAAK,EAAE,CAAA;YACzC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,EAAE;gBACrB,GAAG,WAAW;gBACd,IAAI,EAAE,SAAS;aAChB,CAAC,CAAA;QACJ,CAAC,CAAC,CACH,CAAA;KACF;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/app/utils/initializeTheme.d.ts b/_lib/app/utils/initializeTheme.d.ts new file mode 100644 index 00000000..1bd87386 --- /dev/null +++ b/_lib/app/utils/initializeTheme.d.ts @@ -0,0 +1,3 @@ +declare const darkModeMediaQuery: MediaQueryList; +declare const hasTheme: boolean; +//# sourceMappingURL=initializeTheme.d.js.map \ No newline at end of file diff --git a/_lib/app/utils/initializeTheme.d.ts.map b/_lib/app/utils/initializeTheme.d.ts.map new file mode 100644 index 00000000..195ea804 --- /dev/null +++ b/_lib/app/utils/initializeTheme.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"initializeTheme.d.ts","sourceRoot":"","sources":["../../../app/utils/initializeTheme.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,kBAAkB,gBAAoD,CAAA;AAE5E,QAAA,MAAM,QAAQ,SAEwC,CAAA"} \ No newline at end of file diff --git a/_lib/app/utils/initializeTheme.js b/_lib/app/utils/initializeTheme.js new file mode 100644 index 00000000..c9c481f2 --- /dev/null +++ b/_lib/app/utils/initializeTheme.js @@ -0,0 +1,19 @@ +"use strict"; +const darkModeMediaQuery = window.matchMedia('(prefers-color-scheme: dark)'); +const hasTheme = document.documentElement.classList.contains('dark') || + document.documentElement.classList.contains('light'); +if (!hasTheme) { + const storedTheme = localStorage.getItem('vocs.theme'); + const theme = storedTheme || (darkModeMediaQuery.matches ? 'dark' : 'light'); + if (theme === 'dark') + document.documentElement.classList.add('dark'); + if (!storedTheme) + // Update the theme if the user changes their OS preference + darkModeMediaQuery.addEventListener('change', ({ matches: isDark }) => { + if (isDark) + document.documentElement.classList.add('dark'); + else + document.documentElement.classList.remove('dark'); + }); +} +//# sourceMappingURL=initializeTheme.js.map \ No newline at end of file diff --git a/_lib/app/utils/initializeTheme.js.map b/_lib/app/utils/initializeTheme.js.map new file mode 100644 index 00000000..f7f2363b --- /dev/null +++ b/_lib/app/utils/initializeTheme.js.map @@ -0,0 +1 @@ +{"version":3,"file":"initializeTheme.js","sourceRoot":"","sources":["../../../app/utils/initializeTheme.ts"],"names":[],"mappings":";AAAA,MAAM,kBAAkB,GAAG,MAAM,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAAA;AAE5E,MAAM,QAAQ,GACZ,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC;IACnD,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;AAEtD,IAAI,CAAC,QAAQ,EAAE;IACb,MAAM,WAAW,GAAG,YAAY,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;IACtD,MAAM,KAAK,GAAG,WAAW,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA;IAE5E,IAAI,KAAK,KAAK,MAAM;QAAE,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;IAEpE,IAAI,CAAC,WAAW;QACd,2DAA2D;QAC3D,kBAAkB,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE;YACpE,IAAI,MAAM;gBAAE,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;;gBACrD,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;QACxD,CAAC,CAAC,CAAA;CACL"} \ No newline at end of file diff --git a/_lib/app/utils/mergeRefs.d.ts b/_lib/app/utils/mergeRefs.d.ts new file mode 100644 index 00000000..45d2dc88 --- /dev/null +++ b/_lib/app/utils/mergeRefs.d.ts @@ -0,0 +1,6 @@ +import { type MutableRefObject, type RefCallback } from 'react'; +type MutableRefList = Array | MutableRefObject | undefined | null>; +export declare function mergeRefs(...refs: MutableRefList): RefCallback; +export declare function setRef(val: T, ...refs: MutableRefList): void; +export {}; +//# sourceMappingURL=mergeRefs.d.js.map \ No newline at end of file diff --git a/_lib/app/utils/mergeRefs.d.ts.map b/_lib/app/utils/mergeRefs.d.ts.map new file mode 100644 index 00000000..ee9ee3d8 --- /dev/null +++ b/_lib/app/utils/mergeRefs.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"mergeRefs.d.ts","sourceRoot":"","sources":["../../../app/utils/mergeRefs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,WAAW,EAAE,MAAM,OAAO,CAAA;AAE/D,KAAK,cAAc,CAAC,CAAC,IAAI,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC,CAAA;AAEvF,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAIvE;AAED,wBAAgB,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI,CASlE"} \ No newline at end of file diff --git a/_lib/app/utils/mergeRefs.js b/_lib/app/utils/mergeRefs.js new file mode 100644 index 00000000..4f2807e8 --- /dev/null +++ b/_lib/app/utils/mergeRefs.js @@ -0,0 +1,18 @@ +import {} from 'react'; +export function mergeRefs(...refs) { + return (val) => { + setRef(val, ...refs); + }; +} +export function setRef(val, ...refs) { + // biome-ignore lint/complexity/noForEach: + refs.forEach((ref) => { + if (typeof ref === 'function') { + ref(val); + } + else if (ref != null) { + ref.current = val; + } + }); +} +//# sourceMappingURL=mergeRefs.js.map \ No newline at end of file diff --git a/_lib/app/utils/mergeRefs.js.map b/_lib/app/utils/mergeRefs.js.map new file mode 100644 index 00000000..5bdcf3e4 --- /dev/null +++ b/_lib/app/utils/mergeRefs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mergeRefs.js","sourceRoot":"","sources":["../../../app/utils/mergeRefs.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2C,MAAM,OAAO,CAAA;AAI/D,MAAM,UAAU,SAAS,CAAI,GAAG,IAAuB;IACrD,OAAO,CAAC,GAAM,EAAE,EAAE;QAChB,MAAM,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAA;IACtB,CAAC,CAAA;AACH,CAAC;AAED,MAAM,UAAU,MAAM,CAAI,GAAM,EAAE,GAAG,IAAuB;IAC1D,0CAA0C;IAC1C,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACnB,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;YAC7B,GAAG,CAAC,GAAG,CAAC,CAAA;SACT;aAAM,IAAI,GAAG,IAAI,IAAI,EAAE;YACtB,GAAG,CAAC,OAAO,GAAG,GAAG,CAAA;SAClB;IACH,CAAC,CAAC,CAAA;AACJ,CAAC"} \ No newline at end of file diff --git a/_lib/app/utils/removeTempStyles.d.ts b/_lib/app/utils/removeTempStyles.d.ts new file mode 100644 index 00000000..dd587f0c --- /dev/null +++ b/_lib/app/utils/removeTempStyles.d.ts @@ -0,0 +1,2 @@ +export declare function removeTempStyles(): void; +//# sourceMappingURL=removeTempStyles.d.js.map \ No newline at end of file diff --git a/_lib/app/utils/removeTempStyles.d.ts.map b/_lib/app/utils/removeTempStyles.d.ts.map new file mode 100644 index 00000000..e91c4d11 --- /dev/null +++ b/_lib/app/utils/removeTempStyles.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"removeTempStyles.d.ts","sourceRoot":"","sources":["../../../app/utils/removeTempStyles.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,SAG/B"} \ No newline at end of file diff --git a/_lib/app/utils/removeTempStyles.js b/_lib/app/utils/removeTempStyles.js new file mode 100644 index 00000000..9981d0ff --- /dev/null +++ b/_lib/app/utils/removeTempStyles.js @@ -0,0 +1,6 @@ +export function removeTempStyles() { + const tempStyles = document.querySelectorAll('style[data-vocs-temp-style="true"]'); + for (const style of tempStyles) + style.remove(); +} +//# sourceMappingURL=removeTempStyles.js.map \ No newline at end of file diff --git a/_lib/app/utils/removeTempStyles.js.map b/_lib/app/utils/removeTempStyles.js.map new file mode 100644 index 00000000..d73aa7e2 --- /dev/null +++ b/_lib/app/utils/removeTempStyles.js.map @@ -0,0 +1 @@ +{"version":3,"file":"removeTempStyles.js","sourceRoot":"","sources":["../../../app/utils/removeTempStyles.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,gBAAgB;IAC9B,MAAM,UAAU,GAAG,QAAQ,CAAC,gBAAgB,CAAC,oCAAoC,CAAC,CAAA;IAClF,KAAK,MAAM,KAAK,IAAI,UAAU;QAAE,KAAK,CAAC,MAAM,EAAE,CAAA;AAChD,CAAC"} \ No newline at end of file diff --git a/_lib/cli/commands/build.d.ts b/_lib/cli/commands/build.d.ts new file mode 100644 index 00000000..becdd87c --- /dev/null +++ b/_lib/cli/commands/build.d.ts @@ -0,0 +1,4 @@ +import type { BuildParameters as BuildParameters_ } from '../../vite/build.js'; +export type BuildParameters = Pick; +export declare function build({ clean, logLevel, outDir, publicDir, searchIndex }: BuildParameters): Promise; +//# sourceMappingURL=build.d.js.map \ No newline at end of file diff --git a/_lib/cli/commands/build.d.ts.map b/_lib/cli/commands/build.d.ts.map new file mode 100644 index 00000000..e2db8bff --- /dev/null +++ b/_lib/cli/commands/build.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../cli/commands/build.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAG9E,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,gBAAgB,EAChB,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,WAAW,GAAG,aAAa,CAC9D,CAAA;AAED,wBAAsB,KAAK,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,eAAe,iBAyD/F"} \ No newline at end of file diff --git a/_lib/cli/commands/build.js b/_lib/cli/commands/build.js new file mode 100644 index 00000000..051fc091 --- /dev/null +++ b/_lib/cli/commands/build.js @@ -0,0 +1,63 @@ +import ora from 'ora'; +import pc from 'picocolors'; +import { createLogger } from 'vite'; +import { version } from '../version.js'; +export async function build({ clean, logLevel, outDir, publicDir, searchIndex }) { + const { build } = await import('../../vite/build.js'); + const useLogger = logLevel !== 'info'; + const start = Date.now(); + const logger = createLogger('info', { allowClearScreen: true }); + const spinner = { + client: ora('building bundles...\n'), + prerender: ora('prerendering pages...\n'), + }; + logger.clearScreen('info'); + logger.info(''); + logger.info(` ${pc.blue('[building]')} ${pc.bold('vocs')}@${pc.dim(`v${version}`)}\n`); + await build({ + clean, + hooks: { + onBundleStart() { + if (useLogger) + spinner.client.start(); + }, + onBundleEnd({ error }) { + if (error) { + if (useLogger) + spinner.client.fail(`bundles failed to build: ${error.message}`); + process.exit(1); + } + if (useLogger) + spinner.client.succeed('bundles built'); + else + logger.info(''); + }, + onPrerenderStart() { + if (useLogger) + spinner.prerender.start(); + }, + onPrerenderEnd({ error }) { + if (error) { + if (useLogger) + spinner.client.fail(`prerendering failed: ${error.message}`); + process.exit(1); + } + if (useLogger) + spinner.prerender.succeed('prerendered pages'); + }, + onScriptsEnd() { + if (!useLogger) + logger.info(''); + }, + }, + logger, + logLevel, + outDir, + publicDir, + searchIndex, + }); + const end = Date.now(); + const time = end - start; + logger.info(`\n ${pc.green('[built]')} in ${time / 1000}s`); +} +//# sourceMappingURL=build.js.map \ No newline at end of file diff --git a/_lib/cli/commands/build.js.map b/_lib/cli/commands/build.js.map new file mode 100644 index 00000000..70f17b1b --- /dev/null +++ b/_lib/cli/commands/build.js.map @@ -0,0 +1 @@ +{"version":3,"file":"build.js","sourceRoot":"","sources":["../../../cli/commands/build.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAA;AACrB,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,EAAE,YAAY,EAAE,MAAM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SAAS;oBAAE,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,CAAA;;oBACjD,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;YACtB,CAAC;YACD,gBAAgB;gBACd,IAAI,SAAS;oBAAE,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE,CAAA;YAC1C,CAAC;YACD,cAAc,CAAC,EAAE,KAAK,EAAE;gBACtB,IAAI,KAAK,EAAE;oBACT,IAAI,SAAS;wBAAE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,wBAAwB,KAAK,CAAC,OAAO,EAAE,CAAC,CAAA;oBAC3E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;iBAChB;gBAED,IAAI,SAAS;oBAAE,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAA;YAC/D,CAAC;YACD,YAAY;gBACV,IAAI,CAAC,SAAS;oBAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;YACjC,CAAC;SACF;QACD,MAAM;QACN,QAAQ;QACR,MAAM;QACN,SAAS;QACT,WAAW;KACZ,CAAC,CAAA;IAEF,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;IACtB,MAAM,IAAI,GAAG,GAAG,GAAG,KAAK,CAAA;IACxB,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,IAAI,GAAG,IAAI,GAAG,CAAC,CAAA;AAC9D,CAAC"} \ No newline at end of file diff --git a/_lib/cli/commands/dev.d.ts b/_lib/cli/commands/dev.d.ts new file mode 100644 index 00000000..679650eb --- /dev/null +++ b/_lib/cli/commands/dev.d.ts @@ -0,0 +1,8 @@ +type DevParameters = { + clean?: boolean; + host?: boolean; + port?: number; +}; +export declare function dev(_: any, { clean, host, port }?: DevParameters): Promise; +export {}; +//# sourceMappingURL=dev.d.js.map \ No newline at end of file diff --git a/_lib/cli/commands/dev.d.ts.map b/_lib/cli/commands/dev.d.ts.map new file mode 100644 index 00000000..73bd4f30 --- /dev/null +++ b/_lib/cli/commands/dev.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../../cli/commands/dev.ts"],"names":[],"mappings":"AAIA,KAAK,aAAa,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAEvE,wBAAsB,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,GAAE,aAAkB,iBAY1E"} \ No newline at end of file diff --git a/_lib/cli/commands/dev.js b/_lib/cli/commands/dev.js new file mode 100644 index 00000000..8221ce29 --- /dev/null +++ b/_lib/cli/commands/dev.js @@ -0,0 +1,15 @@ +import pc from 'picocolors'; +import { createLogger } from 'vite'; +import { version } from '../version.js'; +export async function dev(_, { clean, host, port } = {}) { + const { createDevServer } = await import('../../vite/devServer.js'); + const server = await createDevServer({ clean, host, port }); + await server.listen(); + const logger = createLogger(); + logger.clearScreen('info'); + logger.info(''); + logger.info(` ${pc.green('[running]')} ${pc.bold('vocs')}@${pc.dim(`v${version}`)}`); + logger.info(''); + server.printUrls(); +} +//# sourceMappingURL=dev.js.map \ No newline at end of file diff --git a/_lib/cli/commands/dev.js.map b/_lib/cli/commands/dev.js.map new file mode 100644 index 00000000..6a9b556f --- /dev/null +++ b/_lib/cli/commands/dev.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dev.js","sourceRoot":"","sources":["../../../cli/commands/dev.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAIvC,MAAM,CAAC,KAAK,UAAU,GAAG,CAAC,CAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,KAAoB,EAAE;IACzE,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,MAAM,CAAC,yBAAyB,CAAC,CAAA;IAEnE,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAA;IAC3D,MAAM,MAAM,CAAC,MAAM,EAAE,CAAA;IAErB,MAAM,MAAM,GAAG,YAAY,EAAE,CAAA;IAC7B,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;IAC1B,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IACf,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,OAAO,EAAE,CAAC,EAAE,CAAC,CAAA;IACrF,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IACf,MAAM,CAAC,SAAS,EAAE,CAAA;AACpB,CAAC"} \ No newline at end of file diff --git a/_lib/cli/commands/preview.d.ts b/_lib/cli/commands/preview.d.ts new file mode 100644 index 00000000..42093a19 --- /dev/null +++ b/_lib/cli/commands/preview.d.ts @@ -0,0 +1,2 @@ +export declare function preview(): Promise; +//# sourceMappingURL=preview.d.js.map \ No newline at end of file diff --git a/_lib/cli/commands/preview.d.ts.map b/_lib/cli/commands/preview.d.ts.map new file mode 100644 index 00000000..29b7eeb1 --- /dev/null +++ b/_lib/cli/commands/preview.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../../cli/commands/preview.ts"],"names":[],"mappings":"AAMA,wBAAsB,OAAO,kBAkB5B"} \ No newline at end of file diff --git a/_lib/cli/commands/preview.js b/_lib/cli/commands/preview.js new file mode 100644 index 00000000..16a494ce --- /dev/null +++ b/_lib/cli/commands/preview.js @@ -0,0 +1,17 @@ +import pc from 'picocolors'; +import { createLogger } from 'vite'; +import { resolveVocsConfig } from '../../vite/utils/resolveVocsConfig.js'; +import { version } from '../version.js'; +export async function preview() { + const { preview } = await import('../../vite/preview.js'); + const server = await preview(); + const { config } = await resolveVocsConfig(); + const { basePath } = config; + const logger = createLogger(); + logger.clearScreen('info'); + logger.info(''); + logger.info(` ${pc.green('[running]')} ${pc.bold('vocs')}@${pc.dim(`v${version}`)}`); + logger.info(''); + logger.info(` ${pc.green('➜')} ${pc.bold('Local')}: ${pc.cyan(`http://localhost:${server.port}${basePath}`)}`); +} +//# sourceMappingURL=preview.js.map \ No newline at end of file diff --git a/_lib/cli/commands/preview.js.map b/_lib/cli/commands/preview.js.map new file mode 100644 index 00000000..3cd9d980 --- /dev/null +++ b/_lib/cli/commands/preview.js.map @@ -0,0 +1 @@ +{"version":3,"file":"preview.js","sourceRoot":"","sources":["../../../cli/commands/preview.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC,MAAM,CAAC,KAAK,UAAU,OAAO;IAC3B,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,MAAM,CAAC,uBAAuB,CAAC,CAAA;IACzD,MAAM,MAAM,GAAG,MAAM,OAAO,EAAE,CAAA;IAE9B,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,iBAAiB,EAAE,CAAA;IAC5C,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAA;IAE3B,MAAM,MAAM,GAAG,YAAY,EAAE,CAAA;IAC7B,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;IAC1B,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IACf,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,OAAO,EAAE,CAAC,EAAE,CAAC,CAAA;IACrF,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAEf,MAAM,CAAC,IAAI,CACT,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,IAAI,CACnD,oBAAoB,MAAM,CAAC,IAAI,GAAG,QAAQ,EAAE,CAC7C,EAAE,CACJ,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/cli/commands/search-index.d.ts b/_lib/cli/commands/search-index.d.ts new file mode 100644 index 00000000..2ea983a1 --- /dev/null +++ b/_lib/cli/commands/search-index.d.ts @@ -0,0 +1,4 @@ +import type { BuildSearchIndexParameters } from '../../vite/buildSearchIndex.js'; +export type SearchIndexParameters = BuildSearchIndexParameters; +export declare function searchIndex({ outDir }: SearchIndexParameters): Promise; +//# sourceMappingURL=search-index.d.js.map \ No newline at end of file diff --git a/_lib/cli/commands/search-index.d.ts.map b/_lib/cli/commands/search-index.d.ts.map new file mode 100644 index 00000000..5d94d1da --- /dev/null +++ b/_lib/cli/commands/search-index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"search-index.d.ts","sourceRoot":"","sources":["../../../cli/commands/search-index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAA;AAIhF,MAAM,MAAM,qBAAqB,GAAG,0BAA0B,CAAA;AAE9D,wBAAsB,WAAW,CAAC,EAAE,MAAM,EAAE,EAAE,qBAAqB,iBAclE"} \ No newline at end of file diff --git a/_lib/cli/commands/search-index.js b/_lib/cli/commands/search-index.js new file mode 100644 index 00000000..c8c47b67 --- /dev/null +++ b/_lib/cli/commands/search-index.js @@ -0,0 +1,16 @@ +import pc from 'picocolors'; +import { createLogger } from 'vite'; +import { buildSearchIndex } from '../../vite/buildSearchIndex.js'; +import { version } from '../version.js'; +export async function searchIndex({ outDir }) { + const start = Date.now(); + const logger = createLogger('info', { allowClearScreen: true }); + logger.clearScreen('info'); + logger.info(''); + logger.info(` ${pc.blue('[indexing]')} ${pc.bold('vocs')}@${pc.dim(`v${version}`)}\n`); + await buildSearchIndex({ outDir }); + const end = Date.now(); + const time = end - start; + logger.info(`\n ${pc.green('[indexed]')} in ${time / 1000}s`); +} +//# sourceMappingURL=search-index.js.map \ No newline at end of file diff --git a/_lib/cli/commands/search-index.js.map b/_lib/cli/commands/search-index.js.map new file mode 100644 index 00000000..174e5f07 --- /dev/null +++ b/_lib/cli/commands/search-index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"search-index.js","sourceRoot":"","sources":["../../../cli/commands/search-index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAIvC,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,EAAE,MAAM,EAAyB;IACjE,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;IAExB,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAA;IAE/D,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;IAC1B,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IACf,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,OAAO,EAAE,CAAC,IAAI,CAAC,CAAA;IAEvF,MAAM,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAA;IAElC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;IACtB,MAAM,IAAI,GAAG,GAAG,GAAG,KAAK,CAAA;IACxB,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,IAAI,GAAG,IAAI,GAAG,CAAC,CAAA;AAChE,CAAC"} \ No newline at end of file diff --git a/_lib/cli/index.d.ts b/_lib/cli/index.d.ts new file mode 100644 index 00000000..598080af --- /dev/null +++ b/_lib/cli/index.d.ts @@ -0,0 +1,3 @@ +#!/usr/bin/env node +export declare const cli: import("cac").CAC; +//# sourceMappingURL=index.d.js.map \ No newline at end of file diff --git a/_lib/cli/index.d.ts.map b/_lib/cli/index.d.ts.map new file mode 100644 index 00000000..091b07e1 --- /dev/null +++ b/_lib/cli/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../cli/index.ts"],"names":[],"mappings":";AASA,eAAO,MAAM,GAAG,mBAAc,CAAA"} \ No newline at end of file diff --git a/_lib/cli/index.js b/_lib/cli/index.js new file mode 100644 index 00000000..2396ded3 --- /dev/null +++ b/_lib/cli/index.js @@ -0,0 +1,32 @@ +#!/usr/bin/env node +import { cac } from 'cac'; +import { build } from './commands/build.js'; +import { dev } from './commands/dev.js'; +import { preview } from './commands/preview.js'; +import { searchIndex } from './commands/search-index.js'; +import { version } from './version.js'; +export const cli = cac('vocs'); +cli + .command('[root]') + .alias('dev') + .option('-c, --clean', 'clean the cache and re-bundle') + .option('-h, --host', 'Expose host URL') + .option('-p, --port [number]', 'Port used by the server (default: 5173)') + .action(dev); +cli + .command('build') + .option('-c, --clean', 'clean the cache and re-bundle') + .option('-l, --logLevel [level]', 'info | warn | error | silent') + .option('-o, --outDir [dir]', 'output directory (default: dist)') + .option('-p, --publicDir [dir]', 'public (asset) directory (default: public)') + .option('--searchIndex', 'builds the search index (default: true)') + .action(build); +cli.command('preview').action(preview); +cli + .command('search-index') + .option('-o, --outDir [dir]', 'output directory (default: dist)') + .action(searchIndex); +cli.help(); +cli.version(version); +cli.parse(); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/_lib/cli/index.js.map b/_lib/cli/index.js.map new file mode 100644 index 00000000..e1ac549c --- /dev/null +++ b/_lib/cli/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../cli/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAC3C,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,MAAM,CAAC,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAA;AAE9B,GAAG;KACA,OAAO,CAAC,QAAQ,CAAC;KACjB,KAAK,CAAC,KAAK,CAAC;KACZ,MAAM,CAAC,aAAa,EAAE,+BAA+B,CAAC;KACtD,MAAM,CAAC,YAAY,EAAE,iBAAiB,CAAC;KACvC,MAAM,CAAC,qBAAqB,EAAE,yCAAyC,CAAC;KACxE,MAAM,CAAC,GAAG,CAAC,CAAA;AACd,GAAG;KACA,OAAO,CAAC,OAAO,CAAC;KAChB,MAAM,CAAC,aAAa,EAAE,+BAA+B,CAAC;KACtD,MAAM,CAAC,wBAAwB,EAAE,8BAA8B,CAAC;KAChE,MAAM,CAAC,oBAAoB,EAAE,kCAAkC,CAAC;KAChE,MAAM,CAAC,uBAAuB,EAAE,4CAA4C,CAAC;KAC7E,MAAM,CAAC,eAAe,EAAE,yCAAyC,CAAC;KAClE,MAAM,CAAC,KAAK,CAAC,CAAA;AAChB,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;AACtC,GAAG;KACA,OAAO,CAAC,cAAc,CAAC;KACvB,MAAM,CAAC,oBAAoB,EAAE,kCAAkC,CAAC;KAChE,MAAM,CAAC,WAAW,CAAC,CAAA;AAEtB,GAAG,CAAC,IAAI,EAAE,CAAA;AACV,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;AAEpB,GAAG,CAAC,KAAK,EAAE,CAAA"} \ No newline at end of file diff --git a/_lib/cli/version.d.ts b/_lib/cli/version.d.ts new file mode 100644 index 00000000..a27207d6 --- /dev/null +++ b/_lib/cli/version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "1.0.0-alpha.51"; +//# sourceMappingURL=version.d.js.map \ No newline at end of file diff --git a/_lib/cli/version.d.ts.map b/_lib/cli/version.d.ts.map new file mode 100644 index 00000000..0120573a --- /dev/null +++ b/_lib/cli/version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../cli/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,mBAAmB,CAAA"} \ No newline at end of file diff --git a/_lib/cli/version.js b/_lib/cli/version.js new file mode 100644 index 00000000..f829715a --- /dev/null +++ b/_lib/cli/version.js @@ -0,0 +1,2 @@ +export const version = '1.0.0-alpha.51'; +//# sourceMappingURL=version.js.map \ No newline at end of file diff --git a/_lib/cli/version.js.map b/_lib/cli/version.js.map new file mode 100644 index 00000000..97999057 --- /dev/null +++ b/_lib/cli/version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"version.js","sourceRoot":"","sources":["../../cli/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,gBAAgB,CAAA"} \ No newline at end of file diff --git a/_lib/components.d.ts b/_lib/components.d.ts new file mode 100644 index 00000000..da6bc42e --- /dev/null +++ b/_lib/components.d.ts @@ -0,0 +1,11 @@ +export { Authors, type AuthorsProps } from './app/components/Authors.js'; +export { BlogPosts } from './app/components/BlogPosts.js'; +export { Button } from './app/components/Button.js'; +export { Callout, type CalloutProps } from './app/components/Callout.js'; +export * as HomePage from './app/components/HomePage.js'; +export { Raw } from './app/components/Raw.js'; +export { Sponsors } from './app/components/Sponsors.js'; +export { Steps, type StepsProps } from './app/components/Steps.js'; +export { Step, type StepProps } from './app/components/Step.js'; +export { components as MDXComponents } from './app/components/mdx/index.js'; +//# sourceMappingURL=components.d.js.map \ No newline at end of file diff --git a/_lib/components.d.ts.map b/_lib/components.d.ts.map new file mode 100644 index 00000000..3ea94943 --- /dev/null +++ b/_lib/components.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../components.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAA;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAA;AACxE,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAA;AACxD,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAA;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AACvD,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAClE,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAE/D,OAAO,EAAE,UAAU,IAAI,aAAa,EAAE,MAAM,+BAA+B,CAAA"} \ No newline at end of file diff --git a/_lib/components.js b/_lib/components.js new file mode 100644 index 00000000..225a84f5 --- /dev/null +++ b/_lib/components.js @@ -0,0 +1,11 @@ +export { Authors } from './app/components/Authors.js'; +export { BlogPosts } from './app/components/BlogPosts.js'; +export { Button } from './app/components/Button.js'; +export { Callout } from './app/components/Callout.js'; +export * as HomePage from './app/components/HomePage.js'; +export { Raw } from './app/components/Raw.js'; +export { Sponsors } from './app/components/Sponsors.js'; +export { Steps } from './app/components/Steps.js'; +export { Step } from './app/components/Step.js'; +export { components as MDXComponents } from './app/components/mdx/index.js'; +//# sourceMappingURL=components.js.map \ No newline at end of file diff --git a/_lib/components.js.map b/_lib/components.js.map new file mode 100644 index 00000000..f2fcc5a5 --- /dev/null +++ b/_lib/components.js.map @@ -0,0 +1 @@ +{"version":3,"file":"components.js","sourceRoot":"","sources":["../components.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAqB,MAAM,6BAA6B,CAAA;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AACnD,OAAO,EAAE,OAAO,EAAqB,MAAM,6BAA6B,CAAA;AACxE,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAA;AACxD,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAA;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AACvD,OAAO,EAAE,KAAK,EAAmB,MAAM,2BAA2B,CAAA;AAClE,OAAO,EAAE,IAAI,EAAkB,MAAM,0BAA0B,CAAA;AAE/D,OAAO,EAAE,UAAU,IAAI,aAAa,EAAE,MAAM,+BAA+B,CAAA"} \ No newline at end of file diff --git a/_lib/config.d.ts b/_lib/config.d.ts new file mode 100644 index 00000000..66b6593d --- /dev/null +++ b/_lib/config.d.ts @@ -0,0 +1,299 @@ +import type { RehypeShikiOptions } from '@shikijs/rehype'; +import type { SearchOptions } from 'minisearch'; +import type { ReactElement } from 'react'; +import type { TwoslashOptions } from 'twoslash'; +import type { PluggableList } from 'unified'; +import type { UserConfig } from 'vite'; +import type { borderRadiusVars, contentVars, fontFamilyVars, fontSizeVars, fontWeightVars, lineHeightVars, outlineVars, primitiveColorVars, semanticColorVars, sidebarVars, spaceVars, topNavVars, viewportVars, zIndexVars } from './app/styles/vars.css.js'; +type RequiredBy = Omit & Required>; +type RequiredProperties = 'blogDir' | 'markdown' | 'rootDir' | 'title' | 'titleTemplate'; +export type Config = RequiredBy<{ + /** + * Configuration for the banner fixed to the top of the page. + * + * Can be a Markdown string, a React Element, or an object with the following properties: + * - `dismissable`: Whether or not the banner can be dismissed. + * - `backgroundColor`: The background color of the banner. + * - `content`: The content of the banner. + * - `height`: The height of the banner. + * - `textColor`: The text color of the banner. + */ + banner?: Banner; + /** + * The base path the documentation will be deployed at. All assets and pages + * will be prefixed with this path. This is useful for deploying to GitHub Pages. + * For example, if you are deploying to `https://example.github.io/foo`, then the + * basePath should be set to `/foo`. + * + * @example + * /docs + */ + basePath?: string; + /** + * The base URL for your documentation. This is used to populate the `` tag in the + * `` of the page, and is used to form the `%logo` variable for dynamic OG images. + * + * @example + * https://vocs.dev + */ + baseUrl?: string; + /** + * Path to blog pages relative to project root. + * Used to extract posts from the filesystem. + * + * @default "./pages/blog" + */ + blogDir?: string; + /** + * General description for the documentation. + */ + description?: string; + /** + * Edit location for the documentation. + */ + editLink?: Normalize; + /** + * Base font face. + * + * @default { google: "Inter" } + */ + font?: Normalize>; + /** + * Additional tags to include in the `` tag of the page HTML. + */ + head?: ReactElement | { + [path: string]: ReactElement; + } | ((params: { + path: string; + }) => ReactElement | Promise); + /** + * Icon URL. + */ + iconUrl?: Normalize; + /** + * Logo URL. + */ + logoUrl?: Normalize; + /** + * OG Image URL. `null` to disable. + * + * Template variables: `%logo`, `%title`, `%description` + * + * @default "https://vocs.dev/api/og?logo=%logo&title=%title&description=%description" + */ + ogImageUrl?: string | { + [path: string]: string; + }; + /** + * Outline footer. + */ + outlineFooter?: ReactElement; + /** + * Markdown configuration. + */ + markdown?: Normalize>; + /** + * Documentation root directory. Can be an absolute path, or a path relative from + * the location of the config file itself. + * + * @default "docs" + */ + rootDir?: string; + /** + * Configuration for docs search. + */ + search?: Normalize; + /** + * Navigation displayed on the sidebar. + */ + sidebar?: Normalize; + /** + * Social links displayed in the top navigation. + */ + socials?: Normalize>; + /** + * Set of sponsors to display on MDX directives and (optionally) the sidebar. + */ + sponsors?: SponsorSet[]; + /** + * Theme configuration. + */ + theme?: Normalize>; + /** + * Documentation title. + * + * @default "Docs" + */ + title?: string; + /** + * Template for the page title. + * + * @default `%s – ${title}` + */ + titleTemplate?: string; + /** + * Navigation displayed on the top. + */ + topNav?: Normalize>; + /** + * TwoSlash configuration. + */ + twoslash?: Normalize; + /** + * Vite configuration. + */ + vite?: UserConfig; +}, parsed extends true ? RequiredProperties : never>; +export type ParsedConfig = Config; +export declare function defineConfig({ blogDir, head, ogImageUrl, rootDir, title, titleTemplate, ...config }: Config): Promise; +export declare const getDefaultConfig: () => Promise; +export declare function parseViteConfig(viteConfig: UserConfig | undefined, { basePath }: { + basePath?: string; +}): UserConfig; +type Normalize = { + [K in keyof T]: T[K]; +} & {}; +export type Banner = Exclude; +export type ColorScheme = 'light' | 'dark' | 'system' | undefined; +export type EditLink = { + /** + * Link pattern + */ + pattern: string | (() => string); + /** + * Link text + * + * @default "Edit page" + */ + text?: string; +}; +type FontSource = Normalize<{ + /** Name of the Google Font to use. */ + google?: string; +}>; +type ParsedFont = { + default?: FontSource; + mono?: FontSource; +}; +export type Font = parsed extends true ? ParsedFont : FontSource | ParsedFont; +export type ImageUrl = string | { + light: string; + dark: string; +}; +export type IconUrl = ImageUrl; +export type LogoUrl = ImageUrl; +export type Markdown = RequiredBy<{ + code?: Normalize; + remarkPlugins?: PluggableList; + rehypePlugins?: PluggableList; +}, parsed extends true ? 'code' : never>; +export type Search = SearchOptions; +export type SidebarItem = { + /** Whether or not to collapse the sidebar item by default. */ + collapsed?: boolean; + /** Text to display on the sidebar. */ + text: string; + /** Optional pathname to the target documentation page. */ + link?: string; + /** Optional children to nest under this item. */ + items?: SidebarItem[]; +}; +export type Sidebar = SidebarItem[] | { + [path: string]: SidebarItem[] | { + backLink?: boolean; + items: SidebarItem[]; + }; +}; +export type SocialType = 'discord' | 'github' | 'telegram' | 'warpcast' | 'x'; +export type SocialItem = { + /** Social icon to display. */ + icon: SocialType; + /** Label for the social. */ + label?: string; + /** Link to the social. */ + link: string; +}; +export type ParsedSocialItem = Required & { + /** The type of social item. */ + type: SocialType; +}; +export type Socials = parsed extends true ? ParsedSocialItem[] : SocialItem[]; +export type Sponsor = { + /** The name of the sponsor. */ + name: string; + /** The link to the sponsor's website. */ + link: string; + /** The image to display for the sponsor. */ + image: string; +}; +export type SponsorSet = { + /** The list of sponsors to display. */ + items: (Sponsor | null)[][]; + /** The name of the sponsor set (e.g. "Gold Sponsors", "Collaborators", etc). */ + name: string; + /** The height of the sponsor images. */ + height?: number; +}; +export type ThemeVariables, value> = { + [key in keyof variables]?: value; +}; +export type Theme = { + accentColor?: Exclude, colorValue>>, parsed extends true ? string | { + light: string; + dark: string; + } : never>; + colorScheme?: colorScheme; + variables?: { + borderRadius?: ThemeVariables; + color?: ThemeVariables & ThemeVariables; + content?: ThemeVariables; + fontFamily?: ThemeVariables; + fontSize?: ThemeVariables; + fontWeight?: ThemeVariables; + lineHeight?: ThemeVariables; + outline?: ThemeVariables; + sidebar?: ThemeVariables; + space?: ThemeVariables; + topNav?: ThemeVariables; + viewport?: ThemeVariables; + zIndex?: ThemeVariables; + }; +}; +export type TopNavItem = { + match?: string; + text: string; +} & ({ + link: string; + items?: never; +} | { + link?: string; + items: parsed extends true ? ParsedTopNavItem[] : TopNavItem[]; +}); +export type ParsedTopNavItem = TopNavItem & { + id: number; +}; +export type TopNav = parsed extends true ? ParsedTopNavItem[] : TopNavItem[]; +export declare function serializeConfig(config: Config): string; +export declare function deserializeConfig(config: string): any; +export declare function serializeFunctions(value: any, key?: string): any; +export declare function deserializeFunctions(value: any): any; +export declare const deserializeFunctionsStringified = "\n function deserializeFunctions(value) {\n if (Array.isArray(value)) {\n return value.map(deserializeFunctions)\n } else if (typeof value === 'object' && value !== null) {\n return Object.keys(value).reduce((acc, key) => {\n acc[key] = deserializeFunctions(value[key])\n return acc\n }, {})\n } else if (typeof value === 'string' && value.includes('_vocs-fn_')) {\n return new Function(`return ${value.slice(9)}`)()\n } else {\n return value\n }\n }\n"; +export {}; +//# sourceMappingURL=config.d.js.map \ No newline at end of file diff --git a/_lib/config.d.ts.map b/_lib/config.d.ts.map new file mode 100644 index 00000000..4e15cf61 --- /dev/null +++ b/_lib/config.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AACtC,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,YAAY,EACZ,cAAc,EACd,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,WAAW,EACX,SAAS,EACT,UAAU,EACV,YAAY,EACZ,UAAU,EACX,MAAM,0BAA0B,CAAA;AAEjC,KAAK,UAAU,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AAEzE,KAAK,kBAAkB,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,eAAe,CAAA;AAExF,MAAM,MAAM,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D,CAAA;CACF,CAAA;AAED,MAAM,MAAM,UAAU,CAAC,MAAM,SAAS,OAAO,GAAG,KAAK,IAAI;IACvD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;CACb,GAAG,CACA;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,GAC/B;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,SAAS,IAAI,GAAG,gBAAgB,EAAE,GAAG,UAAU,EAAE,CAAA;CAAE,CACpF,CAAA;AACD,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,IAAI,CAAC,GAAG;IAChD,EAAE,EAAE,MAAM,CAAA;CACX,CAAA;AAED,MAAM,MAAM,MAAM,CAAC,MAAM,SAAS,OAAO,GAAG,KAAK,IAAI,MAAM,SAAS,IAAI,GACpE,gBAAgB,EAAE,GAClB,UAAU,EAAE,CAAA;AAKhB,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,UAE7C;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,OAE/C;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,CAkBhE;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,GAAG,GAAG,GAAG,CAapD;AAED,eAAO,MAAM,+BAA+B,igBAe3C,CAAA"} \ No newline at end of file diff --git a/_lib/config.js b/_lib/config.js new file mode 100644 index 00000000..8096594e --- /dev/null +++ b/_lib/config.js @@ -0,0 +1,258 @@ +export async function defineConfig({ blogDir = './pages/blog', head, ogImageUrl, rootDir = 'docs', title = 'Docs', titleTemplate = `%s – ${title}`, ...config }) { + const basePath = parseBasePath(config.basePath); + return { + blogDir, + head, + ogImageUrl, + rootDir, + title, + titleTemplate, + ...config, + basePath, + banner: await parseBanner(config.banner ?? ''), + font: parseFont(config.font ?? {}), + iconUrl: parseImageUrl(config.iconUrl, { + basePath, + }), + logoUrl: parseImageUrl(config.logoUrl, { + basePath, + }), + markdown: parseMarkdown(config.markdown ?? {}), + socials: parseSocials(config.socials ?? []), + topNav: parseTopNav(config.topNav ?? []), + theme: await parseTheme(config.theme ?? {}), + vite: parseViteConfig(config.vite, { + basePath, + }), + }; +} +export const getDefaultConfig = async () => await defineConfig({}); +////////////////////////////////////////////////////// +// Parsers +function parseBasePath(basePath_) { + let basePath = basePath_; + if (!basePath) + return ''; + if (!basePath.startsWith('/')) + basePath = `/${basePath}`; + if (basePath.endsWith('/')) + basePath = basePath.slice(0, -1); + return basePath; +} +async function parseBanner(banner) { + if (!banner) + return undefined; + const bannerContent = (() => { + if (typeof banner === 'string') + return banner; + if (typeof banner === 'object' && 'content' in banner) + return banner.content; + return undefined; + })(); + const content = await (async () => { + if (typeof bannerContent !== 'string') + return bannerContent; + const { compile } = await import('@mdx-js/mdx'); + const remarkGfm = (await import('remark-gfm')).default; + return String(await compile(bannerContent, { + outputFormat: 'function-body', + remarkPlugins: [remarkGfm], + })); + })(); + if (!content) + return undefined; + const textColor = await (async () => { + if (typeof banner === 'string') + return undefined; + if (typeof banner === 'object') { + if ('textColor' in banner) + return banner.textColor; + if ('backgroundColor' in banner && banner.backgroundColor) { + const chroma = (await import('chroma-js')).default; + return chroma.contrast(banner.backgroundColor, 'white') < 4.5 ? 'black' : 'white'; + } + } + return undefined; + })(); + return { + height: '32px', + ...(typeof banner === 'object' ? banner : {}), + content, + textColor, + }; +} +function parseFont(font) { + if ('google' in font) + return { default: font }; + return font; +} +function parseImageUrl(imageUrl, { basePath }) { + if (!imageUrl) + return; + if (process.env.NODE_ENV === 'development') + return imageUrl; + if (typeof imageUrl === 'string') { + if (imageUrl.startsWith('http')) + return imageUrl; + return `${basePath}${imageUrl}`; + } + return { + dark: imageUrl.dark.startsWith('http') ? imageUrl.dark : `${basePath}${imageUrl.dark}`, + light: imageUrl.light.startsWith('http') ? imageUrl.light : `${basePath}${imageUrl.light}`, + }; +} +function parseMarkdown(markdown) { + return { + ...markdown, + code: { + themes: { + dark: 'github-dark-dimmed', + light: 'github-light', + }, + ...markdown.code, + }, + }; +} +const socialsMeta = { + discord: { label: 'Discord', type: 'discord' }, + github: { label: 'GitHub', type: 'github' }, + telegram: { label: 'Telegram', type: 'telegram' }, + warpcast: { label: 'Warpcast', type: 'warpcast' }, + x: { label: 'X (Twitter)', type: 'x' }, +}; +function parseSocials(socials) { + return socials.map((social) => { + return { + icon: social.icon, + link: social.link, + ...socialsMeta[social.icon], + }; + }); +} +let id = 0; +function parseTopNav(topNav) { + const parsedTopNav = []; + for (const item of topNav) { + parsedTopNav.push({ + ...item, + id: id++, + items: item.items ? parseTopNav(item.items) : [], + }); + } + return parsedTopNav; +} +async function parseTheme(theme) { + const chroma = (await import('chroma-js')).default; + const accentColor = (() => { + if (!theme.accentColor) + return theme.accentColor; + if (typeof theme.accentColor === 'object' && + !Object.keys(theme.accentColor).includes('light') && + !Object.keys(theme.accentColor).includes('dark')) + return theme.accentColor; + const accentColor = theme.accentColor; + const accentColorLight = typeof accentColor === 'object' ? accentColor.light : accentColor; + const accentColorDark = typeof accentColor === 'object' ? accentColor.dark : accentColor; + return { + backgroundAccent: { + dark: accentColorDark, + light: accentColorLight, + }, + backgroundAccentHover: { + dark: chroma(accentColorDark).darken(0.25).hex(), + light: chroma(accentColorLight).darken(0.25).hex(), + }, + backgroundAccentText: { + dark: chroma.contrast(accentColorDark, 'white') < 4.5 ? 'black' : 'white', + light: chroma.contrast(accentColorLight, 'white') < 4.5 ? 'black' : 'white', + }, + borderAccent: { + dark: chroma(accentColorDark).brighten(0.5).hex(), + light: chroma(accentColorLight).darken(0.25).hex(), + }, + textAccent: { + dark: accentColorDark, + light: accentColorLight, + }, + textAccentHover: { + dark: chroma(accentColorDark).darken(0.5).hex(), + light: chroma(accentColorLight).darken(0.5).hex(), + }, + }; + })(); + return { + ...theme, + accentColor, + }; +} +export function parseViteConfig(viteConfig, { basePath }) { + return { + ...viteConfig, + ...(basePath ? { base: basePath } : {}), + }; +} +////////////////////////////////////////////////////// +// Utilities +export function serializeConfig(config) { + return JSON.stringify(serializeFunctions(config)); +} +export function deserializeConfig(config) { + return deserializeFunctions(JSON.parse(config)); +} +export function serializeFunctions(value, key) { + if (Array.isArray(value)) { + return value.map((v) => serializeFunctions(v)); + } + else if (typeof value === 'object' && value !== null) { + return Object.keys(value).reduce((acc, key) => { + if (key[0] === '_') + return acc; + acc[key] = serializeFunctions(value[key], key); + return acc; + }, {}); + } + else if (typeof value === 'function') { + let serialized = value.toString(); + if (key && (serialized.startsWith(key) || serialized.startsWith(`async ${key}`))) { + serialized = serialized.replace(key, 'function'); + } + return `_vocs-fn_${serialized}`; + } + else { + return value; + } +} +export function deserializeFunctions(value) { + if (Array.isArray(value)) { + return value.map(deserializeFunctions); + } + else if (typeof value === 'object' && value !== null) { + return Object.keys(value).reduce((acc, key) => { + acc[key] = deserializeFunctions(value[key]); + return acc; + }, {}); + } + else if (typeof value === 'string' && value.includes('_vocs-fn_')) { + return new Function(`return ${value.slice(9)}`)(); + } + else { + return value; + } +} +export const deserializeFunctionsStringified = ` + function deserializeFunctions(value) { + if (Array.isArray(value)) { + return value.map(deserializeFunctions) + } else if (typeof value === 'object' && value !== null) { + return Object.keys(value).reduce((acc, key) => { + acc[key] = deserializeFunctions(value[key]) + return acc + }, {}) + } else if (typeof value === 'string' && value.includes('_vocs-fn_')) { + return new Function(\`return \${value.slice(9)}\`)() + } else { + return value + } + } +`; +//# sourceMappingURL=config.js.map \ No newline at end of file diff --git a/_lib/config.js.map b/_lib/config.js.map new file mode 100644 index 00000000..71f8b78b --- /dev/null +++ b/_lib/config.js.map @@ -0,0 +1 @@ +{"version":3,"file":"config.js","sourceRoot":"","sources":["../config.ts"],"names":[],"mappings":"AA0KA,MAAM,CAAC,KAAK,UAAU,YAAY,CAA8C,EAC9E,OAAO,GAAG,cAAc,EACxB,IAAI,EACJ,UAAU,EACV,OAA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Y,UAAU,EAAE,CAAA;KAChC;SAAM;QACL,OAAO,KAAK,CAAA;KACb;AACH,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,KAAU;IAC7C,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACxB,OAAO,KAAK,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAA;KACvC;SAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE;QACtD,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,GAAQ,EAAE,GAAG,EAAE,EAAE;YACjD,GAAG,CAAC,GAAG,CAAC,GAAG,oBAAoB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAA;YAC3C,OAAO,GAAG,CAAA;QACZ,CAAC,EAAE,EAAE,CAAC,CAAA;KACP;SAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE;QACnE,OAAO,IAAI,QAAQ,CAAC,UAAU,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAA;KAClD;SAAM;QACL,OAAO,KAAK,CAAA;KACb;AACH,CAAC;AAED,MAAM,CAAC,MAAM,+BAA+B,GAAG;;;;;;;;;;;;;;;CAe9C,CAAA"} \ No newline at end of file diff --git a/_lib/head.d.ts b/_lib/head.d.ts new file mode 100644 index 00000000..0a645283 --- /dev/null +++ b/_lib/head.d.ts @@ -0,0 +1,2 @@ +export { Helmet as Head } from 'react-helmet'; +//# sourceMappingURL=head.d.js.map \ No newline at end of file diff --git a/_lib/head.d.ts.map b/_lib/head.d.ts.map new file mode 100644 index 00000000..3ccd2fc9 --- /dev/null +++ b/_lib/head.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"head.d.ts","sourceRoot":"","sources":["../head.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,IAAI,EAAE,MAAM,cAAc,CAAA"} \ No newline at end of file diff --git a/_lib/head.js b/_lib/head.js new file mode 100644 index 00000000..296f6462 --- /dev/null +++ b/_lib/head.js @@ -0,0 +1,2 @@ +export { Helmet as Head } from 'react-helmet'; +//# sourceMappingURL=head.js.map \ No newline at end of file diff --git a/_lib/head.js.map b/_lib/head.js.map new file mode 100644 index 00000000..e1aac2d7 --- /dev/null +++ b/_lib/head.js.map @@ -0,0 +1 @@ +{"version":3,"file":"head.js","sourceRoot":"","sources":["../head.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,IAAI,EAAE,MAAM,cAAc,CAAA"} \ No newline at end of file diff --git a/_lib/index.d.ts b/_lib/index.d.ts new file mode 100644 index 00000000..641a78cd --- /dev/null +++ b/_lib/index.d.ts @@ -0,0 +1,6 @@ +export { defineConfig } from './config.js'; +export type { ColorScheme, Config, EditLink, Font, IconUrl, LogoUrl, Sidebar, SidebarItem, SocialItem, SocialType, Socials, Theme, TopNav, TopNavItem, } from './config.js'; +export { build } from './vite/build.js'; +export { createDevServer } from './vite/devServer.js'; +export { preview } from './vite/preview.js'; +//# sourceMappingURL=index.d.js.map \ No newline at end of file diff --git a/_lib/index.d.ts.map b/_lib/index.d.ts.map new file mode 100644 index 00000000..861e2d26 --- /dev/null +++ b/_lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,YAAY,EACV,WAAW,EACX,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,OAAO,EACP,OAAO,EACP,WAAW,EACX,UAAU,EACV,UAAU,EACV,OAAO,EACP,KAAK,EACL,MAAM,EACN,UAAU,GACX,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA"} \ No newline at end of file diff --git a/_lib/index.js b/_lib/index.js new file mode 100644 index 00000000..1ae55938 --- /dev/null +++ b/_lib/index.js @@ -0,0 +1,5 @@ +export { defineConfig } from './config.js'; +export { build } from './vite/build.js'; +export { createDevServer } from './vite/devServer.js'; +export { preview } from './vite/preview.js'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/_lib/index.js.map b/_lib/index.js.map new file mode 100644 index 00000000..8a902ac8 --- /dev/null +++ b/_lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAkB1C,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA"} \ No newline at end of file diff --git a/_lib/mdx-react.d.ts b/_lib/mdx-react.d.ts new file mode 100644 index 00000000..61802fcb --- /dev/null +++ b/_lib/mdx-react.d.ts @@ -0,0 +1,2 @@ +export * from '@mdx-js/react'; +//# sourceMappingURL=mdx-react.d.js.map \ No newline at end of file diff --git a/_lib/mdx-react.d.ts.map b/_lib/mdx-react.d.ts.map new file mode 100644 index 00000000..1b89a137 --- /dev/null +++ b/_lib/mdx-react.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"mdx-react.d.ts","sourceRoot":"","sources":["../mdx-react.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA"} \ No newline at end of file diff --git a/_lib/mdx-react.js b/_lib/mdx-react.js new file mode 100644 index 00000000..3e617920 --- /dev/null +++ b/_lib/mdx-react.js @@ -0,0 +1,2 @@ +export * from '@mdx-js/react'; +//# sourceMappingURL=mdx-react.js.map \ No newline at end of file diff --git a/_lib/mdx-react.js.map b/_lib/mdx-react.js.map new file mode 100644 index 00000000..f91b18ef --- /dev/null +++ b/_lib/mdx-react.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mdx-react.js","sourceRoot":"","sources":["../mdx-react.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA"} \ No newline at end of file diff --git a/_lib/vite/build.d.ts b/_lib/vite/build.d.ts new file mode 100644 index 00000000..72117d3d --- /dev/null +++ b/_lib/vite/build.d.ts @@ -0,0 +1,25 @@ +import * as vite from 'vite'; +export type BuildParameters = { + clean?: boolean; + logger?: vite.Logger; + hooks?: { + onBundleStart?: () => void; + onBundleEnd?: ({ error }: { + error?: Error; + }) => void; + onPrerenderStart?: () => void; + onPrerenderEnd?: ({ error }: { + error?: Error; + }) => void; + onScriptsStart?: () => void; + onScriptsEnd?: ({ error }: { + error?: Error; + }) => void; + }; + logLevel?: vite.LogLevel; + outDir?: string; + publicDir?: string; + searchIndex?: boolean; +}; +export declare function build({ clean, logger, hooks, logLevel, outDir, publicDir, searchIndex, }?: BuildParameters): Promise; +//# sourceMappingURL=build.d.js.map \ No newline at end of file diff --git a/_lib/vite/build.d.ts.map b/_lib/vite/build.d.ts.map new file mode 100644 index 00000000..f53406ac --- /dev/null +++ b/_lib/vite/build.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../vite/build.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAW5B,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE;QACN,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;QAC1B,WAAW,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE;YAAE,KAAK,CAAC,EAAE,KAAK,CAAA;SAAE,KAAK,IAAI,CAAA;QACpD,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAA;QAC7B,cAAc,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE;YAAE,KAAK,CAAC,EAAE,KAAK,CAAA;SAAE,KAAK,IAAI,CAAA;QACvD,cAAc,CAAC,EAAE,MAAM,IAAI,CAAA;QAC3B,YAAY,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE;YAAE,KAAK,CAAC,EAAE,KAAK,CAAA;SAAE,KAAK,IAAI,CAAA;KACtD,CAAA;IACD,QAAQ,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAA;IACxB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA;AAED,wBAAsB,KAAK,CAAC,EAC1B,KAAK,EACL,MAAM,EACN,KAAK,EACL,QAAmB,EACnB,MAAM,EACN,SAAoB,EACpB,WAAkB,GACnB,GAAE,eAAoB,iBA8EtB"} \ No newline at end of file diff --git a/_lib/vite/build.js b/_lib/vite/build.js new file mode 100644 index 00000000..508bf8b4 --- /dev/null +++ b/_lib/vite/build.js @@ -0,0 +1,86 @@ +import { dirname, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { default as fs } from 'fs-extra'; +import * as vite from 'vite'; +import { postbuild } from './plugins/postbuild.js'; +import { prerender } from './prerender.js'; +import * as cache from './utils/cache.js'; +import { resolveOutDir } from './utils/resolveOutDir.js'; +import { resolveVocsConfig } from './utils/resolveVocsConfig.js'; +import { vercelBuildOutputDir, writeBuildOutputConfig } from './utils/vercel.js'; +const __dirname = dirname(fileURLToPath(import.meta.url)); +export async function build({ clean, logger, hooks, logLevel = 'silent', outDir, publicDir = 'public', searchIndex = true, } = {}) { + const { config } = await resolveVocsConfig(); + const { rootDir } = config; + const outDir_resolved = resolveOutDir(rootDir, outDir); + const publicDir_resolved = resolve(rootDir, publicDir); + if (clean) + cache.clear(); + cache.search.set('buildSearchIndex', searchIndex); + fs.rmSync(outDir_resolved, { recursive: true, force: true }); + hooks?.onBundleStart?.(); + try { + await vite.build({ + build: { + emptyOutDir: false, + outDir: outDir_resolved, + }, + publicDir: publicDir_resolved, + root: __dirname, + logLevel, + plugins: [postbuild({ logger })], + }); + await vite.build({ + build: { + emptyOutDir: false, + outDir: resolve(__dirname, '.vocs/dist'), + ssr: resolve(__dirname, '../app/index.server.js'), + }, + logLevel, + publicDir: publicDir_resolved, + root: __dirname, + }); + hooks?.onBundleEnd?.({}); + } + catch (e) { + const error = e; + hooks?.onBundleEnd?.({ error }); + if (error.message === 'deadlinks found.') + return; + throw error; + } + hooks?.onPrerenderStart?.(); + try { + await prerender({ logger: logLevel === 'info' ? logger : undefined, outDir }); + hooks?.onPrerenderEnd?.({}); + } + catch (error) { + hooks?.onPrerenderEnd?.({ error: error }); + } + // copy public folder + fs.copySync(resolve(__dirname, '../app/public'), outDir_resolved); + hooks?.onScriptsStart?.(); + try { + await vite.build({ + build: { + lib: { + formats: ['iife'], + name: 'theme', + entry: [resolve(__dirname, '../app/utils/initializeTheme.js')], + }, + minify: true, + outDir: outDir_resolved, + emptyOutDir: false, + }, + configFile: undefined, + logLevel, + }); + hooks?.onScriptsEnd?.({}); + } + catch (error) { + hooks?.onScriptsEnd?.({ error: error }); + } + if (outDir_resolved.startsWith(vercelBuildOutputDir)) + writeBuildOutputConfig(); +} +//# sourceMappingURL=build.js.map \ No newline at end of file diff --git a/_lib/vite/build.js.map b/_lib/vite/build.js.map new file mode 100644 index 00000000..74ef698a --- /dev/null +++ b/_lib/vite/build.js.map @@ -0,0 +1 @@ +{"version":3,"file":"build.js","sourceRoot":"","sources":["../../vite/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,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,EAAE,CAAA;IAEzB,IAAI;QACF,MAAM,IAAI,CAAC,KAAK,CAAC;YACf,KAAK,EAAE;gBACL,GAAG,EAAE;oBACH,OAAO,EAAE,CAAC,MAAM,CAAC;oBACjB,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,iCAAiC,CAAC,CAAC;iBAC/D;gBACD,MAAM,EAAE,IAAI;gBACZ,MAAM,EAAE,eAAe;gBACvB,WAAW,EAAE,KAAK;aACnB;YACD,UAAU,EAAE,SAAS;YACrB,QAAQ;SACT,CAAC,CAAA;QAEF,KAAK,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC,CAAA;KAC1B;IAAC,OAAO,KAAK,EAAE;QACd,KAAK,EAAE,YAAY,EAAE,CAAC,EAAE,KAAK,EAAE,KAAc,EAAE,CAAC,CAAA;KACjD;IAED,IAAI,eAAe,CAAC,UAAU,CAAC,oBAAoB,CAAC;QAAE,sBAAsB,EAAE,CAAA;AAChF,CAAC"} \ No newline at end of file diff --git a/_lib/vite/buildSearchIndex.d.ts b/_lib/vite/buildSearchIndex.d.ts new file mode 100644 index 00000000..475d12dc --- /dev/null +++ b/_lib/vite/buildSearchIndex.d.ts @@ -0,0 +1,5 @@ +export type BuildSearchIndexParameters = { + outDir?: string; +}; +export declare function buildSearchIndex({ outDir }: BuildSearchIndexParameters): Promise; +//# sourceMappingURL=buildSearchIndex.d.js.map \ No newline at end of file diff --git a/_lib/vite/buildSearchIndex.d.ts.map b/_lib/vite/buildSearchIndex.d.ts.map new file mode 100644 index 00000000..328bc7d0 --- /dev/null +++ b/_lib/vite/buildSearchIndex.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"buildSearchIndex.d.ts","sourceRoot":"","sources":["../../vite/buildSearchIndex.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,0BAA0B,GAAG;IACvC,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,wBAAsB,gBAAgB,CAAC,EAAE,MAAM,EAAE,EAAE,0BAA0B,iBAO5E"} \ No newline at end of file diff --git a/_lib/vite/buildSearchIndex.js b/_lib/vite/buildSearchIndex.js new file mode 100644 index 00000000..88d19039 --- /dev/null +++ b/_lib/vite/buildSearchIndex.js @@ -0,0 +1,11 @@ +import { resolveOutDir } from './utils/resolveOutDir.js'; +import { resolveVocsConfig } from './utils/resolveVocsConfig.js'; +import { buildIndex, saveIndex } from './utils/search.js'; +export async function buildSearchIndex({ outDir }) { + const { config } = await resolveVocsConfig(); + const { rootDir } = config; + const outDir_resolved = resolveOutDir(rootDir, outDir); + const index = await buildIndex({ baseDir: rootDir }); + saveIndex(outDir_resolved, index); +} +//# sourceMappingURL=buildSearchIndex.js.map \ No newline at end of file diff --git a/_lib/vite/buildSearchIndex.js.map b/_lib/vite/buildSearchIndex.js.map new file mode 100644 index 00000000..66419cab --- /dev/null +++ b/_lib/vite/buildSearchIndex.js.map @@ -0,0 +1 @@ +{"version":3,"file":"buildSearchIndex.js","sourceRoot":"","sources":["../../vite/buildSearchIndex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAMzD,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,EAAE,MAAM,EAA8B;IAC3E,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,iBAAiB,EAAE,CAAA;IAC5C,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAA;IAC1B,MAAM,eAAe,GAAG,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;IAEtD,MAAM,KAAK,GAAG,MAAM,UAAU,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAA;IACpD,SAAS,CAAC,eAAe,EAAE,KAAK,CAAC,CAAA;AACnC,CAAC"} \ No newline at end of file diff --git a/_lib/vite/devServer.d.ts b/_lib/vite/devServer.d.ts new file mode 100644 index 00000000..bd67e44f --- /dev/null +++ b/_lib/vite/devServer.d.ts @@ -0,0 +1,7 @@ +export type CreateDevServerParameters = { + clean?: boolean; + host?: boolean; + port?: number; +}; +export declare function createDevServer(params?: CreateDevServerParameters): Promise; +//# sourceMappingURL=devServer.d.js.map \ No newline at end of file diff --git a/_lib/vite/devServer.d.ts.map b/_lib/vite/devServer.d.ts.map new file mode 100644 index 00000000..f3f75475 --- /dev/null +++ b/_lib/vite/devServer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"devServer.d.ts","sourceRoot":"","sources":["../../vite/devServer.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,yBAAyB,GAAG;IACtC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,wBAAsB,eAAe,CAAC,MAAM,GAAE,yBAA8B,yCAU3E"} \ No newline at end of file diff --git a/_lib/vite/devServer.js b/_lib/vite/devServer.js new file mode 100644 index 00000000..6d0c4f08 --- /dev/null +++ b/_lib/vite/devServer.js @@ -0,0 +1,19 @@ +import { dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { createServer } from 'vite'; +import { dev } from './plugins/dev.js'; +import * as cache from './utils/cache.js'; +const __dirname = dirname(fileURLToPath(import.meta.url)); +export async function createDevServer(params = {}) { + if (params.clean) + cache.clear(); + return createServer({ + root: __dirname, + server: { + host: params.host, + port: params.port, + }, + plugins: [dev()], + }); +} +//# sourceMappingURL=devServer.js.map \ No newline at end of file diff --git a/_lib/vite/devServer.js.map b/_lib/vite/devServer.js.map new file mode 100644 index 00000000..53ea5848 --- /dev/null +++ b/_lib/vite/devServer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"devServer.js","sourceRoot":"","sources":["../../vite/devServer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACtC,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAA;AAEzC,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;AAQzD,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,SAAoC,EAAE;IAC1E,IAAI,MAAM,CAAC,KAAK;QAAE,KAAK,CAAC,KAAK,EAAE,CAAA;IAC/B,OAAO,YAAY,CAAC;QAClB,IAAI,EAAE,SAAS;QACf,MAAM,EAAE;YACN,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,IAAI,EAAE,MAAM,CAAC,IAAI;SAClB;QACD,OAAO,EAAE,CAAC,GAAG,EAAE,CAAC;KACjB,CAAC,CAAA;AACJ,CAAC"} \ No newline at end of file diff --git a/_lib/vite/index.html b/_lib/vite/index.html new file mode 100644 index 00000000..a660d235 --- /dev/null +++ b/_lib/vite/index.html @@ -0,0 +1,13 @@ + + + + + + + + + +
+ + + diff --git a/_lib/vite/plugins/css.d.ts b/_lib/vite/plugins/css.d.ts new file mode 100644 index 00000000..f3cb6ad7 --- /dev/null +++ b/_lib/vite/plugins/css.d.ts @@ -0,0 +1,4 @@ +import type { PluginOption } from 'vite'; +export declare function css(): PluginOption; +export declare function findTailwindConfig(): string | null; +//# sourceMappingURL=css.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/css.d.ts.map b/_lib/vite/plugins/css.d.ts.map new file mode 100644 index 00000000..5bd26364 --- /dev/null +++ b/_lib/vite/plugins/css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../../vite/plugins/css.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAExC,wBAAgB,GAAG,IAAI,YAAY,CAkBlC;AAKD,wBAAgB,kBAAkB,kBAgBjC"} \ No newline at end of file diff --git a/_lib/vite/plugins/css.js b/_lib/vite/plugins/css.js new file mode 100644 index 00000000..dcecfb12 --- /dev/null +++ b/_lib/vite/plugins/css.js @@ -0,0 +1,44 @@ +import { accessSync } from 'node:fs'; +import { resolve } from 'node:path'; +import { default as autoprefixer } from 'autoprefixer'; +import { default as tailwindcss } from 'tailwindcss'; +import { default as tailwindcssNesting } from 'tailwindcss/nesting'; +export function css() { + return { + name: 'css', + async config() { + const tailwindConfig = findTailwindConfig(); + return { + css: { + postcss: { + plugins: [ + autoprefixer(), + tailwindcssNesting(), + tailwindConfig ? tailwindcss() : null, + ].filter(Boolean), + }, + }, + }; + }, + }; +} +////////////////////////////////////////////////// +// Tailwind +export function findTailwindConfig() { + const configFiles = [ + './tailwind.config.js', + './tailwind.config.cjs', + './tailwind.config.mjs', + './tailwind.config.js', + ]; + for (const configFile of configFiles) { + try { + const configPath = resolve(process.cwd(), configFile); + accessSync(configPath); + return configPath; + } + catch (err) { } + } + return null; +} +//# sourceMappingURL=css.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/css.js.map b/_lib/vite/plugins/css.js.map new file mode 100644 index 00000000..f2db7793 --- /dev/null +++ b/_lib/vite/plugins/css.js.map @@ -0,0 +1 @@ +{"version":3,"file":"css.js","sourceRoot":"","sources":["../../../vite/plugins/css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,cAAc,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAGnE,MAAM,UAAU,GAAG;IACjB,OAAO;QACL,IAAI,EAAE,KAAK;QACX,KAAK,CAAC,MAAM;YACV,MAAM,cAAc,GAAG,kBAAkB,EAAE,CAAA;YAC3C,OAAO;gBACL,GAAG,EAAE;oBACH,OAAO,EAAE;wBACP,OAAO,EAAE;4BACP,YAAY,EAAE;4BACd,kBAAkB,EAAE;4BACpB,cAAc,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI;yBACtC,CAAC,MAAM,CAAC,OAAO,CAAQ;qBACzB;iBACF;aACF,CAAA;QACH,CAAC;KACF,CAAA;AACH,CAAC;AAED,kDAAkD;AAClD,WAAW;AAEX,MAAM,UAAU,kBAAkB;IAChC,MAAM,WAAW,GAAG;QAClB,sBAAsB;QACtB,uBAAuB;QACvB,uBAAuB;QACvB,sBAAsB;KACvB,CAAA;IACD,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE;QACpC,IAAI;YACF,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,UAAU,CAAC,CAAA;YACrD,UAAU,CAAC,UAAU,CAAC,CAAA;YACtB,OAAO,UAAU,CAAA;SAClB;QAAC,OAAO,GAAG,EAAE,GAAE;KACjB;IAED,OAAO,IAAI,CAAA;AACb,CAAC"} \ No newline at end of file diff --git a/_lib/vite/plugins/dev.d.ts b/_lib/vite/plugins/dev.d.ts new file mode 100644 index 00000000..0c48995c --- /dev/null +++ b/_lib/vite/plugins/dev.d.ts @@ -0,0 +1,3 @@ +import type { PluginOption } from 'vite'; +export declare function dev(): PluginOption; +//# sourceMappingURL=dev.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/dev.d.ts.map b/_lib/vite/plugins/dev.d.ts.map new file mode 100644 index 00000000..986e6195 --- /dev/null +++ b/_lib/vite/plugins/dev.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../../vite/plugins/dev.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AASxC,wBAAgB,GAAG,IAAI,YAAY,CAiElC"} \ No newline at end of file diff --git a/_lib/vite/plugins/dev.js b/_lib/vite/plugins/dev.js new file mode 100644 index 00000000..1123f967 --- /dev/null +++ b/_lib/vite/plugins/dev.js @@ -0,0 +1,67 @@ +import { readFileSync } from 'node:fs'; +import { dirname, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { default as serveStatic } from 'serve-static'; +import { resolveVocsConfig } from '../utils/resolveVocsConfig.js'; +const __dirname = dirname(fileURLToPath(import.meta.url)); +const cleanUrl = (url) => url.replace(/#.*$/s, '').replace(/\?.*$/s, ''); +export function dev() { + let config = {}; + const styleSet = new Map(); + const styleOverrideSet = new Map(); + return { + name: 'dev', + async buildStart() { + config = (await resolveVocsConfig()).config; + }, + transform(styles, id) { + const { rootDir } = config; + if (id.endsWith('.css')) { + if (id.endsWith('.vocs/theme.css')) + styleOverrideSet.set(id, styles); + else if (id === resolve(rootDir, 'styles.css')) + styleOverrideSet.set(id, styles); + else + styleSet.set(id, styles); + } + }, + async configureServer(server) { + const { config } = await resolveVocsConfig(); + const { rootDir, theme } = config; + server.middlewares.use(serveStatic(resolve(rootDir, 'public'))); + server.middlewares.use(serveStatic(resolve(__dirname, '../../app/public'))); + return () => { + server.middlewares.use(async (req, res, next) => { + const url = req.url && cleanUrl(req.url); + if (!url?.endsWith('.html')) { + next(); + return; + } + res.statusCode = 200; + res.setHeader('Content-Type', 'text/html'); + try { + if (typeof url === 'undefined') + next(); + const indexHtml = readFileSync(resolve(__dirname, '../index.html'), 'utf-8'); + const template = await server.transformIndexHtml(url, indexHtml.replace(/\.\.\/app/g, `/@fs${resolve(__dirname, '../../app')}`)); + const module = await server.ssrLoadModule(resolve(__dirname, '../../app/index.server.js')); + const render = await module.render(req); + const styles = [...styleSet.values(), ...styleOverrideSet.values()] + .map((style) => ``) + .join(''); + const head = `${render.head}${styles}`; + const body = render.body; + let html = template.replace('', head).replace('', body); + if (theme?.colorScheme && theme?.colorScheme !== 'system') + html = html.replace('lang="en"', `lang="en" class="${theme.colorScheme}"`); + res.end(html); + } + finally { + next(); + } + }); + }; + }, + }; +} +//# sourceMappingURL=dev.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/dev.js.map b/_lib/vite/plugins/dev.js.map new file mode 100644 index 00000000..6279e9f9 --- /dev/null +++ b/_lib/vite/plugins/dev.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dev.js","sourceRoot":"","sources":["../../../vite/plugins/dev.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,cAAc,CAAA;AAIrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AAEjE,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;AAEzD,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAU,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;AAExF,MAAM,UAAU,GAAG;IACjB,IAAI,MAAM,GAAG,EAAkB,CAAA;IAC/B,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAE,CAAA;IAC1B,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAE,CAAA;IAClC,OAAO;QACL,IAAI,EAAE,KAAK;QACX,KAAK,CAAC,UAAU;YACd,MAAM,GAAG,CAAC,MAAM,iBAAiB,EAAE,CAAC,CAAC,MAAM,CAAA;QAC7C,CAAC;QACD,SAAS,CAAC,MAAM,EA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BACd;4BAAS;wBACR,IAAI,EAAE,CAAA;qBACP;gBACH,CAAC,CAAC,CAAA;YACJ,CAAC,CAAA;QACH,CAAC;KACF,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/vite/plugins/mdx.d.ts b/_lib/vite/plugins/mdx.d.ts new file mode 100644 index 00000000..036b2151 --- /dev/null +++ b/_lib/vite/plugins/mdx.d.ts @@ -0,0 +1,16 @@ +import type { PluggableList } from 'unified'; +import { type PluginOption } from 'vite'; +import type { ParsedConfig } from '../../config.js'; +type RemarkPluginsParameters = { + markdown?: ParsedConfig['markdown']; +}; +export declare const getRemarkPlugins: ({ markdown }?: RemarkPluginsParameters) => PluggableList; +type RehypePluginsParameters = { + markdown?: ParsedConfig['markdown']; + rootDir?: ParsedConfig['rootDir']; + twoslash?: ParsedConfig['twoslash'] | false; +}; +export declare const getRehypePlugins: ({ markdown, rootDir, twoslash, }?: RehypePluginsParameters) => PluggableList; +export declare function mdx(): Promise; +export {}; +//# sourceMappingURL=mdx.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/mdx.d.ts.map b/_lib/vite/plugins/mdx.d.ts.map new file mode 100644 index 00000000..c8d0fa97 --- /dev/null +++ b/_lib/vite/plugins/mdx.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"mdx.d.ts","sourceRoot":"","sources":["../../../vite/plugins/mdx.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC5C,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,MAAM,CAAA;AAExC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AA6BnD,KAAK,uBAAuB,GAAG;IAC7B,QAAQ,CAAC,EAAE,YAAY,CAAC,UAAU,CAAC,CAAA;CACpC,CAAA;AAED,eAAO,MAAM,gBAAgB,kBAAkB,uBAAuB,kBAqBlD,CAAA;AAEpB,KAAK,uBAAuB,GAAG;IAC7B,QAAQ,CAAC,EAAE,YAAY,CAAC,UAAU,CAAC,CAAA;IACnC,OAAO,CAAC,EAAE,YAAY,CAAC,SAAS,CAAC,CAAA;IACjC,QAAQ,CAAC,EAAE,YAAY,CAAC,UAAU,CAAC,GAAG,KAAK,CAAA;CAC5C,CAAA;AAED,eAAO,MAAM,gBAAgB,sCAI1B,uBAAuB,kBAuDN,CAAA;AAEpB,wBAAsB,GAAG,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CAYnD"} \ No newline at end of file diff --git a/_lib/vite/plugins/mdx.js b/_lib/vite/plugins/mdx.js new file mode 100644 index 00000000..c2e15d19 --- /dev/null +++ b/_lib/vite/plugins/mdx.js @@ -0,0 +1,128 @@ +import mdxPlugin from '@mdx-js/rollup'; +import rehypeShiki, {} from '@shikijs/rehype'; +import { transformerNotationDiff, transformerNotationFocus, transformerNotationHighlight, transformerNotationWordHighlight, } from '@shikijs/transformers'; +import { defaultTwoslashOptions as defaultTwoslashOptions_, transformerTwoslash, } from '@shikijs/twoslash'; +import { h } from 'hastscript'; +import rehypeAutolinkHeadings from 'rehype-autolink-headings'; +import rehypeSlug from 'rehype-slug'; +import remarkDirective from 'remark-directive'; +import remarkFrontmatter from 'remark-frontmatter'; +import remarkGfm from 'remark-gfm'; +import remarkMdxFrontmatter from 'remark-mdx-frontmatter'; +import {} from 'vite'; +import { resolveVocsConfig } from '../utils/resolveVocsConfig.js'; +import { rehypeShikiDisplayNotation } from './rehype/display-shiki-notation.js'; +import { rehypeInlineShiki } from './rehype/inline-shiki.js'; +import { remarkAuthors } from './remark/authors.js'; +import { remarkBlogPosts } from './remark/blog-posts.js'; +import { remarkCallout } from './remark/callout.js'; +import { remarkCodeGroup } from './remark/code-group.js'; +import { remarkCode } from './remark/code.js'; +import { remarkDetails } from './remark/details.js'; +import { remarkFilename } from './remark/filename.js'; +import { remarkInferFrontmatter } from './remark/inferred-frontmatter.js'; +import { remarkLinks } from './remark/links.js'; +import { remarkSponsors } from './remark/sponsors.js'; +import { remarkSteps } from './remark/steps.js'; +import { remarkStrongBlock } from './remark/strong-block.js'; +import { remarkSubheading } from './remark/subheading.js'; +import { remarkTwoslash } from './remark/twoslash.js'; +import { transformerEmptyLine } from './shiki/transformerEmptyLine.js'; +import { transformerLineNumbers } from './shiki/transformerLineNumbers.js'; +import { transformerNotationInclude } from './shiki/transformerNotationInclude.js'; +import { transformerSplitIdentifiers } from './shiki/transformerSplitIdentifiers.js'; +import { transformerTagLine } from './shiki/transformerTagLine.js'; +import { transformerTitle } from './shiki/transformerTitle.js'; +import { twoslashRenderer } from './shiki/twoslashRenderer.js'; +import { twoslasher } from './shiki/twoslasher.js'; +const defaultTwoslashOptions = defaultTwoslashOptions_(); +export const getRemarkPlugins = ({ markdown } = {}) => [ + remarkDirective, + remarkInferFrontmatter, + remarkFrontmatter, + remarkMdxFrontmatter, + remarkGfm, + remarkLinks, + remarkBlogPosts, + remarkCallout, + remarkCode, + remarkCodeGroup, + remarkDetails, + remarkFilename, + remarkSponsors, + remarkSteps, + remarkStrongBlock, + remarkSubheading, + remarkTwoslash, + remarkAuthors, + ...(markdown?.remarkPlugins || []), +]; +export const getRehypePlugins = ({ markdown, rootDir = '', twoslash = {}, } = {}) => [ + rehypeSlug, + [ + rehypeShiki, + { + transformers: [ + transformerLineNumbers(), + transformerNotationDiff(), + transformerNotationFocus(), + transformerNotationHighlight(), + transformerNotationWordHighlight(), + transformerNotationInclude({ rootDir }), + transformerEmptyLine(), + transformerTagLine(), + transformerTitle(), + twoslash !== false + ? transformerTwoslash({ + explicitTrigger: true, + renderer: twoslashRenderer(), + twoslasher, + twoslashOptions: { + ...twoslash, + customTags: [ + ...(defaultTwoslashOptions.customTags ?? []), + ...(twoslash.customTags ?? []), + ], + compilerOptions: { + ...(twoslash.compilerOptions ?? {}), + ...defaultTwoslashOptions.compilerOptions, + }, + }, + }) + : null, + transformerSplitIdentifiers(), + ].filter(Boolean), + themes: { + dark: 'github-dark-dimmed', + light: 'github-light', + }, + ...markdown?.code, + }, + ], + [rehypeInlineShiki, markdown?.code], + rehypeShikiDisplayNotation, + [ + rehypeAutolinkHeadings, + { + behavior: 'append', + content() { + return [h('div', { dataAutolinkIcon: true })]; + }, + }, + ], + ...(markdown?.rehypePlugins || []), +]; +export async function mdx() { + const { config } = await resolveVocsConfig(); + const { markdown, rootDir, twoslash } = config; + const remarkPlugins = getRemarkPlugins({ markdown }); + const rehypePlugins = getRehypePlugins({ markdown, rootDir, twoslash }); + return [ + mdxPlugin({ + providerImportSource: 'vocs/mdx-react', + remarkPlugins, + rehypePlugins, + }), + ]; +} +//# sourceMappingURL=mdx.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/mdx.js.map b/_lib/vite/plugins/mdx.js.map new file mode 100644 index 00000000..54023559 --- /dev/null +++ b/_lib/vite/plugins/mdx.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mdx.js","sourceRoot":"","sources":["../../../vite/plugins/mdx.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,WAAW,EAAE,EAA2B,MAAM,iBAAiB,CAAA;AACtE,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,4BAA4B,EAC5B,gCAAgC,GACjC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACL,sBAAsB,IAAI,uBAAuB,EACjD,mBAAmB,GACpB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,CAAC,EAAE,MAAM,YAAY,CAAA;AAC9B,OAAO,sBAAsB,MAAM,0BAA0B,CAAA;AAC7D,OAAO,UAAU,MAAM,aAAa,CAAA;AACpC,OAAO,eAAe,MAAM,kBAAkB,CAAA;AAC9C,OAAO,iBAAiB,MAAM,oBAAoB,CAAA;AAClD,OAAO,SAAS,MAAM,YAAY,CAAA;AAClC,OAAO,oBAAoB,MAAM,wBAAwB,CAAA;AAEzD,OAAO,EAAqB,MAAM,MAAM,CAAA;AAGxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA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gCACnC,GAAG,sBAAsB,CAAC,eAAe;6BAC1C;yBACF;qBACF,CAAC;oBACJ,CAAC,CAAC,IAAI;gBACR,2BAA2B,EAAE;aAC9B,CAAC,MAAM,CAAC,OAAO,CAAC;YACjB,MAAM,EAAE;gBACN,IAAI,EAAE,oBAAoB;gBAC1B,KAAK,EAAE,cAAc;aACtB;YACD,GAAG,QAAQ,EAAE,IAAI;SACI;KACxB;IACD,CAAC,iBAAiB,EAAE,QAAQ,EAAE,IAAI,CAAC;IACnC,0BAA0B;IAC1B;QACE,sBAAsB;QACtB;YACE,QAAQ,EAAE,QAAQ;YAClB,OAAO;gBACL,OAAO,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;YAC/C,CAAC;SACF;KACF;IACD,GAAG,CAAC,QAAQ,EAAE,aAAa,IAAI,EAAE,CAAC;CAClB,CAAA;AAEpB,MAAM,CAAC,KAAK,UAAU,GAAG;IACvB,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,iBAAiB,EAAE,CAAA;IAC5C,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAA;IAC9C,MAAM,aAAa,GAAG,gBAAgB,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAA;IACpD,MAAM,aAAa,GAAG,gBAAgB,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAA;IACvE,OAAO;QACL,SAAS,CAAC;YACR,oBAAoB,EAAE,eAAe;YACrC,aAAa;YACb,aAAa;SACd,CAAC;KACH,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/vite/plugins/postbuild.d.ts b/_lib/vite/plugins/postbuild.d.ts new file mode 100644 index 00000000..117b9623 --- /dev/null +++ b/_lib/vite/plugins/postbuild.d.ts @@ -0,0 +1,5 @@ +import type { Logger, PluginOption } from 'vite'; +export declare function postbuild({ logger }?: { + logger?: Logger; +}): PluginOption; +//# sourceMappingURL=postbuild.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/postbuild.d.ts.map b/_lib/vite/plugins/postbuild.d.ts.map new file mode 100644 index 00000000..1c0cc289 --- /dev/null +++ b/_lib/vite/plugins/postbuild.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"postbuild.d.ts","sourceRoot":"","sources":["../../../vite/plugins/postbuild.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAKhD,wBAAgB,SAAS,CAAC,EAAE,MAAM,EAAE,GAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,YAAY,CAyB5E"} \ No newline at end of file diff --git a/_lib/vite/plugins/postbuild.js b/_lib/vite/plugins/postbuild.js new file mode 100644 index 00000000..45176e7c --- /dev/null +++ b/_lib/vite/plugins/postbuild.js @@ -0,0 +1,28 @@ +import { dirname, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { default as fs } from 'fs-extra'; +import pc from 'picocolors'; +const __dirname = dirname(fileURLToPath(import.meta.url)); +const deadlinksPath = resolve(__dirname, '../.vocs/cache/deadlinks.json'); +export function postbuild({ logger } = {}) { + return { + name: 'postbuild', + closeBundle() { + if (!fs.existsSync(deadlinksPath)) + return; + const deadlinks = fs.readJSONSync(deadlinksPath); + logger?.error([ + 'found dead links:', + '', + ...deadlinks.map(([link, path]) => `${pc.red(link)} in ${pc.blue(path)}`), + pc.italic(pc.gray('skip by setting link to "#TODO".')), + '\n', + ].join('\n'), { + clear: true, + timestamp: true, + }); + throw new Error('deadlinks found.'); + }, + }; +} +//# sourceMappingURL=postbuild.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/postbuild.js.map b/_lib/vite/plugins/postbuild.js.map new file mode 100644 index 00000000..d80e467f --- /dev/null +++ b/_lib/vite/plugins/postbuild.js.map @@ -0,0 +1 @@ +{"version":3,"file":"postbuild.js","sourceRoot":"","sources":["../../../vite/plugins/postbuild.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,MAAM,YAAY,CAAA;AAG3B,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;AACzD,MAAM,aAAa,GAAG,OAAO,CAAC,SAAS,EAAE,+BAA+B,CAAC,CAAA;AAEzE,MAAM,UAAU,SAAS,CAAC,EAAE,MAAM,KAA0B,EAAE;IAC5D,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,WAAW;YACT,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC;gBAAE,OAAM;YAEzC,MAAM,SAAS,GAAG,EAAE,CAAC,YAAY,CAAC,aAAa,CAAC,CAAA;YAChD,MAAM,EAAE,KAAK,CACX;gBACE,mBAAmB;gBACnB,EAAE;gBACF,GAAG,SAAS,CAAC,GAAG,CACd,CAAC,CAAC,IAAI,EAAE,IAAI,CAAmB,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC1E;gBACD,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAC;gBACtD,IAAI;aACL,CAAC,IAAI,CAAC,IAAI,CAAC,EACZ;gBACE,KAAK,EAAE,IAAI;gBACX,SAAS,EAAE,IAAI;aAChB,CACF,CAAA;YACD,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAA;QACrC,CAAC;KACF,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/vite/plugins/rehype/display-shiki-notation.d.ts b/_lib/vite/plugins/rehype/display-shiki-notation.d.ts new file mode 100644 index 00000000..9786acc2 --- /dev/null +++ b/_lib/vite/plugins/rehype/display-shiki-notation.d.ts @@ -0,0 +1,3 @@ +import type { Root } from 'mdast'; +export declare function rehypeShikiDisplayNotation(): (tree: Root) => void; +//# sourceMappingURL=display-shiki-notation.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/rehype/display-shiki-notation.d.ts.map b/_lib/vite/plugins/rehype/display-shiki-notation.d.ts.map new file mode 100644 index 00000000..40681d4a --- /dev/null +++ b/_lib/vite/plugins/rehype/display-shiki-notation.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"display-shiki-notation.d.ts","sourceRoot":"","sources":["../../../../vite/plugins/rehype/display-shiki-notation.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAGjC,wBAAgB,0BAA0B,WAC1B,IAAI,UAKnB"} \ No newline at end of file diff --git a/_lib/vite/plugins/rehype/display-shiki-notation.js b/_lib/vite/plugins/rehype/display-shiki-notation.js new file mode 100644 index 00000000..a1fa106e --- /dev/null +++ b/_lib/vite/plugins/rehype/display-shiki-notation.js @@ -0,0 +1,12 @@ +/// +/// +import { visit } from 'unist-util-visit'; +export function rehypeShikiDisplayNotation() { + return (tree) => { + visit(tree, 'text', (node) => { + if (node.value.includes('//$')) + node.value = node.value.replace('//$', '//'); + }); + }; +} +//# sourceMappingURL=display-shiki-notation.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/rehype/display-shiki-notation.js.map b/_lib/vite/plugins/rehype/display-shiki-notation.js.map new file mode 100644 index 00000000..75836e06 --- /dev/null +++ b/_lib/vite/plugins/rehype/display-shiki-notation.js.map @@ -0,0 +1 @@ +{"version":3,"file":"display-shiki-notation.js","sourceRoot":"","sources":["../../../../vite/plugins/rehype/display-shiki-notation.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,8CAA8C;AAG9C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAExC,MAAM,UAAU,0BAA0B;IACxC,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;YAC3B,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;gBAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;QAC9E,CAAC,CAAC,CAAA;IACJ,CAAC,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/vite/plugins/rehype/inline-shiki.d.ts b/_lib/vite/plugins/rehype/inline-shiki.d.ts new file mode 100644 index 00000000..147605e3 --- /dev/null +++ b/_lib/vite/plugins/rehype/inline-shiki.d.ts @@ -0,0 +1,15 @@ +import type { RehypeShikiCoreOptions } from '@shikijs/rehype/core'; +import type { Root } from 'hast'; +import type { BuiltinLanguage } from 'shiki'; +import type { LanguageInput } from 'shiki/core'; +import type { Plugin } from 'unified'; +export type RehypeInlineShikiOptions = RehypeShikiCoreOptions & { + /** + * Language names to include. + * + * @default Object.keys(bundledLanguages) + */ + langs?: Array; +}; +export declare const rehypeInlineShiki: Plugin<[RehypeInlineShikiOptions], Root>; +//# sourceMappingURL=inline-shiki.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/rehype/inline-shiki.d.ts.map b/_lib/vite/plugins/rehype/inline-shiki.d.ts.map new file mode 100644 index 00000000..d3211f8d --- /dev/null +++ b/_lib/vite/plugins/rehype/inline-shiki.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"inline-shiki.d.ts","sourceRoot":"","sources":["../../../../vite/plugins/rehype/inline-shiki.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAClE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAChC,OAAO,KAAK,EAAE,eAAe,EAA6B,MAAM,OAAO,CAAA;AAEvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAKrC,MAAM,MAAM,wBAAwB,GAAG,sBAAsB,GAAG;IAC9D;;;;OAIG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,GAAG,eAAe,CAAC,CAAA;CAC/C,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,CAAC,wBAAwB,CAAC,EAAE,IAAI,CAgCtE,CAAA"} \ No newline at end of file diff --git a/_lib/vite/plugins/rehype/inline-shiki.js b/_lib/vite/plugins/rehype/inline-shiki.js new file mode 100644 index 00000000..9873fe8a --- /dev/null +++ b/_lib/vite/plugins/rehype/inline-shiki.js @@ -0,0 +1,30 @@ +import { bundledLanguages, getHighlighter } from 'shiki'; +import { visit } from 'unist-util-visit'; +const inlineShikiRegex = /(.*){:(.*)}$/; +export const rehypeInlineShiki = function (options = {}) { + const themeNames = ('themes' in options ? Object.values(options.themes) : [options.theme]).filter(Boolean); + const langs = options.langs || Object.keys(bundledLanguages); + let promise; + return async function (tree) { + if (!promise) + promise = getHighlighter({ + themes: themeNames, + langs, + }); + const highlighter = await promise; + return visit(tree, 'element', (node, index, parent) => { + if (node.tagName !== 'code') + return; + const match = node.children[0]?.value?.match(inlineShikiRegex); + if (!match) + return; + const [, code, lang] = match; + const hast = highlighter.codeToHast(code, { ...options, lang }); + const inlineCode = hast.children[0].children[0]; + if (!inlineCode) + return; + parent?.children.splice(index ?? 0, 1, inlineCode); + }); + }; +}; +//# sourceMappingURL=inline-shiki.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/rehype/inline-shiki.js.map b/_lib/vite/plugins/rehype/inline-shiki.js.map new file mode 100644 index 00000000..d346e3e1 --- /dev/null +++ b/_lib/vite/plugins/rehype/inline-shiki.js.map @@ -0,0 +1 @@ +{"version":3,"file":"inline-sh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,EAAE,IAAI,EAAE,CAAC,CAAA;YAE/D,MAAM,UAAU,GAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;YACxD,IAAI,CAAC,UAAU;gBAAE,OAAM;YAEvB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,EAAE,CAAC,EAAE,UAAU,CAAC,CAAA;QACpD,CAAC,CAAC,CAAA;IACJ,CAAC,CAAA;AACH,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/vite/plugins/remark/authors.d.ts b/_lib/vite/plugins/remark/authors.d.ts new file mode 100644 index 00000000..2b35bf26 --- /dev/null +++ b/_lib/vite/plugins/remark/authors.d.ts @@ -0,0 +1,3 @@ +import type { Root } from 'mdast'; +export declare function remarkAuthors(): (tree: Root) => void; +//# sourceMappingURL=authors.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/remark/authors.d.ts.map b/_lib/vite/plugins/remark/authors.d.ts.map new file mode 100644 index 00000000..d8c0af0f --- /dev/null +++ b/_lib/vite/plugins/remark/authors.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"authors.d.ts","sourceRoot":"","sources":["../../../../vite/plugins/remark/authors.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAGjC,wBAAgB,aAAa,WACb,IAAI,UAcnB"} \ No newline at end of file diff --git a/_lib/vite/plugins/remark/authors.js b/_lib/vite/plugins/remark/authors.js new file mode 100644 index 00000000..cd27e223 --- /dev/null +++ b/_lib/vite/plugins/remark/authors.js @@ -0,0 +1,23 @@ +/// +/// +import { visit } from 'unist-util-visit'; +export function remarkAuthors() { + return (tree) => { + visit(tree, (node, index, parent) => { + if (node.type !== 'leafDirective') + return; + if (node.name !== 'authors') + return; + if (!index) + return; + (parent?.children[index - 1]).children.push({ + type: 'paragraph', + data: { + hName: 'div', + hProperties: { 'data-authors': true }, + }, + }); + }); + }; +} +//# sourceMappingURL=authors.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/remark/authors.js.map b/_lib/vite/plugins/remark/authors.js.map new file mode 100644 index 00000000..86a6144d --- /dev/null +++ b/_lib/vite/plugins/remark/authors.js.map @@ -0,0 +1 @@ +{"version":3,"file":"authors.js","sourceRoot":"","sources":["../../../../vite/plugins/remark/authors.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,8CAA8C;AAG9C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAExC,MAAM,UAAU,aAAa;IAC3B,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;YAClC,IAAI,IAAI,CAAC,IAAI,KAAK,eAAe;gBAAE,OAAM;YACzC,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS;gBAAE,OAAM;YACnC,IAAI,CAAC,KAAK;gBAAE,OACX;YAAA,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,GAAG,CAAC,CAAS,CAAA,CAAC,QAAQ,CAAC,IAAI,CAAC;gBAClD,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE;oBACJ,KAAK,EAAE,KAAK;oBACZ,WAAW,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE;iBACtC;aACF,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/vite/plugins/remark/blog-posts.d.ts b/_lib/vite/plugins/remark/blog-posts.d.ts new file mode 100644 index 00000000..43e24da5 --- /dev/null +++ b/_lib/vite/plugins/remark/blog-posts.d.ts @@ -0,0 +1,3 @@ +import type { Root } from 'mdast'; +export declare function remarkBlogPosts(): (tree: Root) => void; +//# sourceMappingURL=blog-posts.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/remark/blog-posts.d.ts.map b/_lib/vite/plugins/remark/blog-posts.d.ts.map new file mode 100644 index 00000000..7bdb93d0 --- /dev/null +++ b/_lib/vite/plugins/remark/blog-posts.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"blog-posts.d.ts","sourceRoot":"","sources":["../../../../vite/plugins/remark/blog-posts.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAGjC,wBAAgB,eAAe,WACf,IAAI,UAUnB"} \ No newline at end of file diff --git a/_lib/vite/plugins/remark/blog-posts.js b/_lib/vite/plugins/remark/blog-posts.js new file mode 100644 index 00000000..c298d738 --- /dev/null +++ b/_lib/vite/plugins/remark/blog-posts.js @@ -0,0 +1,17 @@ +/// +/// +import { visit } from 'unist-util-visit'; +export function remarkBlogPosts() { + return (tree) => { + visit(tree, (node) => { + if (node.type !== 'leafDirective') + return; + if (node.name !== 'blog-posts') + return; + const data = node.data || (node.data = {}); + data.hName = 'div'; + data.hProperties = { 'data-blog-posts': true }; + }); + }; +} +//# sourceMappingURL=blog-posts.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/remark/blog-posts.js.map b/_lib/vite/plugins/remark/blog-posts.js.map new file mode 100644 index 00000000..c17f141b --- /dev/null +++ b/_lib/vite/plugins/remark/blog-posts.js.map @@ -0,0 +1 @@ +{"version":3,"file":"blog-posts.js","sourceRoot":"","sources":["../../../../vite/plugins/remark/blog-posts.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,8CAA8C;AAG9C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAExC,MAAM,UAAU,eAAe;IAC7B,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE;YACnB,IAAI,IAAI,CAAC,IAAI,KAAK,eAAe;gBAAE,OAAM;YACzC,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY;gBAAE,OAAM;YAEtC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,CAAA;YAC1C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;YAClB,IAAI,CAAC,WAAW,GAAG,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAA;QAChD,CAAC,CAAC,CAAA;IACJ,CAAC,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/vite/plugins/remark/callout.d.ts b/_lib/vite/plugins/remark/callout.d.ts new file mode 100644 index 00000000..a2eb00e5 --- /dev/null +++ b/_lib/vite/plugins/remark/callout.d.ts @@ -0,0 +1,3 @@ +import type { Root } from 'mdast'; +export declare function remarkCallout(): (tree: Root) => void; +//# sourceMappingURL=callout.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/remark/callout.d.ts.map b/_lib/vite/plugins/remark/callout.d.ts.map new file mode 100644 index 00000000..c47b7362 --- /dev/null +++ b/_lib/vite/plugins/remark/callout.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"callout.d.ts","sourceRoot":"","sources":["../../../../vite/plugins/remark/callout.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAGjC,wBAAgB,aAAa,WACb,IAAI,UAyCnB"} \ No newline at end of file diff --git a/_lib/vite/plugins/remark/callout.js b/_lib/vite/plugins/remark/callout.js new file mode 100644 index 00000000..7a8bc2ae --- /dev/null +++ b/_lib/vite/plugins/remark/callout.js @@ -0,0 +1,43 @@ +/// +/// +import { h } from 'hastscript'; +import { visit } from 'unist-util-visit'; +export function remarkCallout() { + return (tree) => { + visit(tree, (node) => { + if (node.type !== 'containerDirective') + return; + if (node.name !== 'callout' && + node.name !== 'info' && + node.name !== 'warning' && + node.name !== 'danger' && + node.name !== 'tip' && + node.name !== 'success' && + node.name !== 'note') + return; + // @ts-expect-error + const label = node.children.find((child) => child.data?.directiveLabel)?.children[0].value; + const data = node.data || (node.data = {}); + const tagName = 'aside'; + if (label) { + node.children = node.children.filter((child) => !child.data?.directiveLabel); + node.children.unshift({ + type: 'paragraph', + data: { hProperties: { 'data-callout-title': true } }, + children: [ + { + type: 'strong', + children: [{ type: 'text', value: label }], + }, + ], + }); + } + data.hName = tagName; + data.hProperties = { + ...h(tagName, node.attributes || {}).properties, + 'data-callout': node.name !== 'callout' ? node.name : true, + }; + }); + }; +} +//# sourceMappingURL=callout.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/remark/callout.js.map b/_lib/vite/plugins/remark/callout.js.map new file mode 100644 index 00000000..08d7817b --- /dev/null +++ b/_lib/vite/plugins/remark/callout.js.map @@ -0,0 +1 @@ +{"version":3,"file":"callout.js","sourceRoot":"","sources":["../../../../vite/plugins/remark/callout.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,8CAA8C;AAE9C,OAAO,EAAE,CAAC,EAAE,MAAM,YAAY,CAAA;AAE9B,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAExC,MAAM,UAAU,aAAa;IAC3B,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE;YACnB,IAAI,IAAI,CAAC,IAAI,KAAK,oBAAoB;gBAAE,OAAM;YAC9C,IACE,IAAI,CAAC,IAAI,KAAK,SAAS;gBACvB,IAAI,CAAC,IAAI,KAAK,MAAM;gBACpB,IAAI,CAAC,IAAI,KAAK,SAAS;gBACvB,IAAI,CAAC,IAAI,KAAK,QAAQ;gBACtB,IAAI,CAAC,IAAI,KAAK,KAAK;gBACnB,IAAI,CAAC,IAAI,KAAK,SAAS;gBACvB,IAAI,CAAC,IAAI,KAAK,MAAM;gBAEpB,OAAM;YAER,mBAAmB;YACnB,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,cAAc,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA;YAE1F,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,CAAA;YAC1C,MAAM,OAAO,GAAG,OAAO,CAAA;YAEvB,IAAI,KAAK,EAAE;gBACT,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,cAAc,CAAC,CAAA;gBACjF,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;oBACpB,IAAI,EAAE,WAAW;oBACjB,IAAI,EAAE,EAAE,WAAW,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,EAAE;oBACrD,QAAQ,EAAE;wBACR;4BACE,IAAI,EAAE,QAAQ;4BACd,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;yBAC3C;qBACF;iBACF,CAAC,CAAA;aACH;YAED,IAAI,CAAC,KAAK,GAAG,OAAO,CAAA;YACpB,IAAI,CAAC,WAAW,GAAG;gBACjB,GAAG,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,UAAU;gBAC/C,cAAc,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI;aAC3D,CAAA;QACH,CAAC,CAAC,CAAA;IACJ,CAAC,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/vite/plugins/remark/code-group.d.ts b/_lib/vite/plugins/remark/code-group.d.ts new file mode 100644 index 00000000..224d50e5 --- /dev/null +++ b/_lib/vite/plugins/remark/code-group.d.ts @@ -0,0 +1,3 @@ +import type { Root } from 'mdast'; +export declare function remarkCodeGroup(): (tree: Root) => void; +//# sourceMappingURL=code-group.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/remark/code-group.d.ts.map b/_lib/vite/plugins/remark/code-group.d.ts.map new file mode 100644 index 00000000..b30caf90 --- /dev/null +++ b/_lib/vite/plugins/remark/code-group.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"code-group.d.ts","sourceRoot":"","sources":["../../../../vite/plugins/remark/code-group.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAmC,IAAI,EAAE,MAAM,OAAO,CAAA;AAGlE,wBAAgB,eAAe,WACf,IAAI,UAmCnB"} \ No newline at end of file diff --git a/_lib/vite/plugins/remark/code-group.js b/_lib/vite/plugins/remark/code-group.js new file mode 100644 index 00000000..a8c96194 --- /dev/null +++ b/_lib/vite/plugins/remark/code-group.js @@ -0,0 +1,40 @@ +/// +/// +import { h } from 'hastscript'; +import { visit } from 'unist-util-visit'; +export function remarkCodeGroup() { + return (tree) => { + visit(tree, (node) => { + if (node.type !== 'containerDirective') + return; + if (node.name !== 'code-group') + return; + const data = node.data || (node.data = {}); + const tagName = 'div'; + node.attributes = { + ...node.attributes, + class: 'code-group', + }; + data.hName = tagName; + data.hProperties = h(tagName, node.attributes || {}).properties; + node.children = node.children + .map((child) => { + const match = 'meta' in child && child?.meta?.match(/\[(.*)\]/); + return { + type: 'paragraph', + children: [child], + data: { + hName: 'div', + hProperties: match + ? { + 'data-title': match[1], + } + : undefined, + }, + }; + }) + .filter(Boolean); + }); + }; +} +//# sourceMappingURL=code-group.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/remark/code-group.js.map b/_lib/vite/plugins/remark/code-group.js.map new file mode 100644 index 00000000..85d5a194 --- /dev/null +++ b/_lib/vite/plugins/remark/code-group.js.map @@ -0,0 +1 @@ +{"version":3,"file":"code-group.js","sourceRoot":"","sources":["../../../../vite/plugins/remark/code-group.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,8CAA8C;AAE9C,OAAO,EAAE,CAAC,EAAE,MAAM,YAAY,CAAA;AAE9B,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,C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vite/plugins/remark/code.d.ts new file mode 100644 index 00000000..65fbba32 --- /dev/null +++ b/_lib/vite/plugins/remark/code.d.ts @@ -0,0 +1,3 @@ +import type { Root } from 'mdast'; +export declare function remarkCode(): (tree: Root) => void; +//# sourceMappingURL=code.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/remark/code.d.ts.map b/_lib/vite/plugins/remark/code.d.ts.map new file mode 100644 index 00000000..39071330 --- /dev/null +++ b/_lib/vite/plugins/remark/code.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../../../../vite/plugins/remark/code.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAGjC,wBAAgB,UAAU,WACV,IAAI,UAUnB"} \ No newline at end of file diff --git a/_lib/vite/plugins/remark/code.js b/_lib/vite/plugins/remark/code.js new file mode 100644 index 00000000..689c7bea --- /dev/null +++ b/_lib/vite/plugins/remark/code.js @@ -0,0 +1,19 @@ +/// +/// +import { visit } from 'unist-util-visit'; +export function remarkCode() { + return (tree) => { + visit(tree, (node, _, parent) => { + if (node.type !== 'code') + return; + if (!node.lang) + node.lang = 'txt'; + if (parent?.type === 'containerDirective' && parent.name !== 'steps') + return; + const [match, title] = node.meta?.match(/\[(.*)\]/) || []; + if (match) + node.meta = node.meta?.replace(match, `title=\"${title}\"`); + }); + }; +} +//# sourceMappingURL=code.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/remark/code.js.map b/_lib/vite/plugins/remark/code.js.map new file mode 100644 index 00000000..56539b3c --- /dev/null +++ b/_lib/vite/plugins/remark/code.js.map @@ -0,0 +1 @@ +{"version":3,"file":"code.js","sourceRoot":"","sources":["../../../../vite/plugins/remark/code.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,8CAA8C;AAG9C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAExC,MAAM,UAAU,UAAU;IACxB,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE;YAC9B,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM;gBAAE,OAAM;YAChC,IAAI,CAAC,IAAI,CAAC,IAAI;gBAAE,IAAI,CAAC,IAAI,GAAG,KAAK,CAAA;YACjC,IAAI,MAAM,EAAE,IAAI,KAAK,oBAAoB,IAAI,MAAM,CAAC,IAAI,KAAK,OAAO;gBAAE,OAAM;YAE5E,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,CAAA;YACzD,IAAI,KAAK;gBAAE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC,CAAA;QACxE,CAAC,CAAC,CAAA;IACJ,CAAC,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/vite/plugins/remark/details.d.ts b/_lib/vite/plugins/remark/details.d.ts new file mode 100644 index 00000000..60963b19 --- /dev/null +++ b/_lib/vite/plugins/remark/details.d.ts @@ -0,0 +1,3 @@ +import type { Root } from 'mdast'; +export declare function remarkDetails(): (tree: Root) => void; +//# sourceMappingURL=details.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/remark/details.d.ts.map b/_lib/vite/plugins/remark/details.d.ts.map new file mode 100644 index 00000000..282a6bb5 --- /dev/null +++ b/_lib/vite/plugins/remark/details.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"details.d.ts","sourceRoot":"","sources":["../../../../vite/plugins/remark/details.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAGjC,wBAAgB,aAAa,WACb,IAAI,UAqBnB"} \ No newline at end of file diff --git a/_lib/vite/plugins/remark/details.js b/_lib/vite/plugins/remark/details.js new file mode 100644 index 00000000..859ac1e3 --- /dev/null +++ b/_lib/vite/plugins/remark/details.js @@ -0,0 +1,26 @@ +/// +/// +import { visit } from 'unist-util-visit'; +export function remarkDetails() { + return (tree) => { + visit(tree, (node) => { + if (node.type !== 'containerDirective') + return; + if (node.name !== 'details') + return; + const data = node.data || (node.data = {}); + const tagName = 'details'; + const summaryChild = node.children[0]; + if (summaryChild.type === 'paragraph' && summaryChild.data?.directiveLabel) + summaryChild.data.hName = 'summary'; + else + node.children.unshift({ + type: 'paragraph', + children: [{ type: 'text', value: 'Details' }], + data: { hName: 'summary' }, + }); + data.hName = tagName; + }); + }; +} +//# sourceMappingURL=details.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/remark/details.js.map b/_lib/vite/plugins/remark/details.js.map new file mode 100644 index 00000000..478b19fb --- /dev/null +++ b/_lib/vite/plugins/remark/details.js.map @@ -0,0 +1 @@ +{"version":3,"file":"details.js","sourceRoot":"","sources":["../../../../vite/plugins/remark/details.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,8CAA8C;AAG9C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAExC,MAAM,UAAU,aAAa;IAC3B,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE;YACnB,IAAI,IAAI,CAAC,IAAI,KAAK,oBAAoB;gBAAE,OAAM;YAC9C,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS;gBAAE,OAAM;YAEnC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,CAAA;YAC1C,MAAM,OAAO,GAAG,SAAS,CAAA;YAEzB,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;YACrC,IAAI,YAAY,CAAC,IAAI,KAAK,WAAW,IAAI,YAAY,CAAC,IAAI,EAAE,cAAc;gBACxE,YAAY,CAAC,IAAI,CAAC,KAAK,GAAG,SAAS,CAAA;;gBAEnC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;oBACpB,IAAI,EAAE,WAAW;oBACjB,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;oBAC9C,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;iBAC3B,CAAC,CAAA;YAEJ,IAAI,CAAC,KAAK,GAAG,OAAO,CAAA;QACtB,CAAC,CAAC,CAAA;IACJ,CAAC,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/vite/plugins/remark/filename.d.ts b/_lib/vite/plugins/remark/filename.d.ts new file mode 100644 index 00000000..8f1ed1e0 --- /dev/null +++ b/_lib/vite/plugins/remark/filename.d.ts @@ -0,0 +1,4 @@ +import type { Root } from 'mdast'; +export declare const filenameCache: Map>; +export declare function remarkFilename(): (tree: Root) => void; +//# sourceMappingURL=filename.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/remark/filename.d.ts.map b/_lib/vite/plugins/remark/filename.d.ts.map new file mode 100644 index 00000000..8d1f63ef --- /dev/null +++ b/_lib/vite/plugins/remark/filename.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"filename.d.ts","sourceRoot":"","sources":["../../../../vite/plugins/remark/filename.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAWjC,eAAO,MAAM,aAAa,kCAA6C,CAAA;AAEvE,wBAAgB,cAAc,WACd,IAAI,UA6BnB"} \ No newline at end of file diff --git a/_lib/vite/plugins/remark/filename.js b/_lib/vite/plugins/remark/filename.js new file mode 100644 index 00000000..56fd6bbe --- /dev/null +++ b/_lib/vite/plugins/remark/filename.js @@ -0,0 +1,57 @@ +/// +/// +import { visit } from 'unist-util-visit'; +import { processIncludes } from '../shiki/transformerNotationInclude.js'; +const filenameRegex = /filename="(.*)"/; +const importRegex = /from ('|")(.*)('|")/g; +export const filenameCache = new Map(); +export function remarkFilename() { + return (tree) => { + visit(tree, (node) => { + if (node.type === 'code' && node.meta?.includes('filename')) { + // If the code block has a `filename` meta, then we need to process + // the tree and find imports or includes to inject the code into. + const filenameMatch = node.meta?.match(filenameRegex); + if (filenameMatch) { + const [, fileName] = filenameMatch; + const sourceCode = node.value; + visit(tree, 'code', (node) => { + // process `import` statements if we are in twoslash mode + if (node.meta?.includes('twoslash')) { + node.value = processImports({ + code: node.value, + fileName, + sourceCode, + }); + } + // process `// [!include ...]` markers + node.value = processIncludes({ + code: node.value, + getSource: (sourceFileName) => (sourceFileName === fileName ? sourceCode : undefined), + }); + }); + } + } + }); + }; +} +function processImports({ code: code_, fileName, sourceCode, }) { + let code = code_; + const importMatches = code.matchAll(importRegex); + for (const importMatch of importMatches) { + const strippedFileName = stripFileName(fileName); + const strippedSourceFileName = stripFileName(importMatch?.[2]); + if (strippedSourceFileName !== strippedFileName) + continue; + const previous = code; + code = `// @filename: ${fileName}\n${sourceCode}\n`; + if (!previous.includes('@filename: example.js')) + code += '// @filename: example.js\n// ---cut---\n'; + code += previous; + } + return code; +} +function stripFileName(fileName) { + return fileName.replace(/^\.\//, '').replace(/\.(ts|js|tsx|jsx)$/, ''); +} +//# sourceMappingURL=filename.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/remark/filename.js.map b/_lib/vite/plugins/remark/filename.js.map new file mode 100644 index 00000000..5fb7ceba --- /dev/null +++ b/_lib/vite/plugins/remark/filename.js.map @@ -0,0 +1 @@ +{"version":3,"file":"filename.js","sourceRoot":"","sources":["../../../../vite/plugins/remark/filename.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,8CAA8C;AAG9C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAExC,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAA;AAExE,MAAM,aAAa,GAAG,iBAAiB,CAAA;AACvC,MAAM,WAAW,GAAG,sBAAsB,CAAA;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,IAAI,GAAG,KAAK,CAAA;IAEhB,MAAM,aAAa,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAA;IAChD,KAAK,MAAM,WAAW,IAAI,aAAa,EAAE;QACvC,MAAM,gBAAgB,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAA;QAChD,MAAM,sBAAsB,GAAG,aAAa,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;QAC9D,IAAI,sBAAsB,KAAK,gBAAgB;YAAE,SAAQ;QAEzD,MAAM,QAAQ,GAAG,IAAI,CAAA;QACrB,IAAI,GAAG,iBAAiB,QAAQ,KAAK,UAAU,IAAI,CAAA;QACnD,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,uBAAuB,CAAC;YAC7C,IAAI,IAAI,0CAA0C,CAAA;QACpD,IAAI,IAAI,QAAQ,CAAA;KACjB;IAED,OAAO,IAAI,CAAA;AACb,CAAC;AAED,SAAS,aAAa,CAAC,QAAgB;IACrC,OAAO,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAA;AACxE,CAAC"} \ No newline at end of file diff --git a/_lib/vite/plugins/remark/inferred-frontmatter.d.ts b/_lib/vite/plugins/remark/inferred-frontmatter.d.ts new file mode 100644 index 00000000..696fc17f --- /dev/null +++ b/_lib/vite/plugins/remark/inferred-frontmatter.d.ts @@ -0,0 +1,3 @@ +import type { Root } from 'mdast'; +export declare function remarkInferFrontmatter(): (tree: Root) => void; +//# sourceMappingURL=inferred-frontmatter.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/remark/inferred-frontmatter.d.ts.map b/_lib/vite/plugins/remark/inferred-frontmatter.d.ts.map new file mode 100644 index 00000000..9b477127 --- /dev/null +++ b/_lib/vite/plugins/remark/inferred-frontmatter.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"inferred-frontmatter.d.ts","sourceRoot":"","sources":["../../../../vite/plugins/remark/inferred-frontmatter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAQ,MAAM,OAAO,CAAA;AAGvC,wBAAgB,sBAAsB,WACtB,IAAI,UAiCnB"} \ No newline at end of file diff --git a/_lib/vite/plugins/remark/inferred-frontmatter.js b/_lib/vite/plugins/remark/inferred-frontmatter.js new file mode 100644 index 00000000..bc47b5ef --- /dev/null +++ b/_lib/vite/plugins/remark/inferred-frontmatter.js @@ -0,0 +1,39 @@ +/// +/// +import { visit } from 'unist-util-visit'; +export function remarkInferFrontmatter() { + return (tree) => { + visit(tree, (node, _, parent) => { + if (parent?.type !== 'root') + return; + if (node.type === 'heading' && node.depth === 1) { + if (node.children.length === 0) + return; + const child = node.children[0]; + if (!('value' in child)) + return; + const value = child.value; + const [, title, description] = value.includes('[') + ? value.match(/(.*) \[(.*)\]/) || [] + : [undefined, JSON.stringify(value)]; + const frontmatterIndex = parent.children.findIndex((child) => child.type === 'yaml'); + const index = frontmatterIndex > 0 ? frontmatterIndex : 0; + const frontmatter = { + ...(parent.children[frontmatterIndex] || { + value: '', + type: 'yaml', + }), + }; + if (!frontmatter.value.includes('title')) + frontmatter.value += `\ntitle: ${title}\n`; + if (!frontmatter.value.includes('description')) + frontmatter.value += `\ndescription: ${description}\n`; + if (frontmatterIndex === -1) + tree.children.unshift(frontmatter); + else + parent.children.splice(index, 1, frontmatter); + } + }); + }; +} +//# sourceMappingURL=inferred-frontmatter.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/remark/inferred-frontmatter.js.map b/_lib/vite/plugins/remark/inferred-frontmatter.js.map new file mode 100644 index 00000000..924c5415 --- /dev/null +++ b/_lib/vite/plugins/remark/inferred-frontmatter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"inferred-frontmatter.js","sourceRoot":"","sources":["../../../../vite/plugins/remark/inferred-frontmatter.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,8CAA8C;AAG9C,OAAO,EAAE,KAAK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C,WAAW,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC;oBAAE,WAAW,CAAC,KAAK,IAAI,YAAY,KAAK,IAAI,CAAA;gBACpF,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC;oBAC5C,WAAW,CAAC,KAAK,IAAI,kBAAkB,WAAW,IAAI,CAAA;gBAExD,IAAI,gBAAgB,KAAK,CAAC,CAAC;oBAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;;oBAC1D,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,EAAE,WAAW,CAAC,CAAA;aACnD;QACH,CAAC,CAAC,CAAA;IACJ,CAAC,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/vite/plugins/remark/links.d.ts b/_lib/vite/plugins/remark/links.d.ts new file mode 100644 index 00000000..aa43c55c --- /dev/null +++ b/_lib/vite/plugins/remark/links.d.ts @@ -0,0 +1,3 @@ +import type { Root } from 'mdast'; +export declare function remarkLinks(): (tree: Root, file: any) => Promise; +//# sourceMappingURL=links.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/remark/links.d.ts.map b/_lib/vite/plugins/remark/links.d.ts.map new file mode 100644 index 00000000..e2a6c92e --- /dev/null +++ b/_lib/vite/plugins/remark/links.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"links.d.ts","sourceRoot":"","sources":["../../../../vite/plugins/remark/links.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAajC,wBAAgB,WAAW,WAGL,IAAI,QAAQ,GAAG,mBAkDpC"} \ No newline at end of file diff --git a/_lib/vite/plugins/remark/links.js b/_lib/vite/plugins/remark/links.js new file mode 100644 index 00000000..a3ab3e9e --- /dev/null +++ b/_lib/vite/plugins/remark/links.js @@ -0,0 +1,71 @@ +/// +/// +import { dirname, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { default as fs } from 'fs-extra'; +import { globbySync } from 'globby'; +import { visit } from 'unist-util-visit'; +import { createLogger } from 'vite'; +import { resolveVocsConfig } from '../../utils/resolveVocsConfig.js'; +const __dirname = dirname(fileURLToPath(import.meta.url)); +const deadlinksPath = resolve(__dirname, '../../.vocs/cache/deadlinks.json'); +const logger = createLogger('info'); +if (fs.existsSync(deadlinksPath)) + fs.removeSync(deadlinksPath); +export function remarkLinks() { + const deadlinks = new Set(); + return async (tree, file) => { + const { config } = await resolveVocsConfig(); + const { rootDir } = config; + visit(tree, 'link', (node) => { + const filePath = file.history[0]; + if (!filePath) + return; + const directory = dirname(filePath); + const isExternalLink = !node.url.match(/^(\.*\/|#)/); + if (isExternalLink) + return; + // TODO: handle hash links + if (node.url.startsWith('#')) + return; + const [url, after] = (node.url || '').split('#'); + const [pagePath, baseDir] = (() => { + if (url.startsWith('.')) + return [resolve(directory, url), directory]; + return [resolve(rootDir, `./pages${url}`), resolve(rootDir, './pages')]; + })(); + const isFile = (() => { + try { + return fs.statSync(pagePath).isFile(); + } + catch { + return false; + } + })(); + if (isFile) { + node.url = parseLink(pagePath, baseDir); + return; + } + const [resolvedPagePath] = globbySync([ + `${pagePath}/index.{html,md,mdx,js,jsx,ts,tsx}`, + `${pagePath}.{html,md,mdx,js,jsx,ts,tsx}`, + ]); + if (!resolvedPagePath) { + deadlinks.add([node.url, filePath]); + fs.ensureDirSync(resolve(__dirname, '../../.vocs/cache')); + fs.writeFileSync(deadlinksPath, JSON.stringify([...deadlinks], null, 2)); + if (process.env.NODE_ENV === 'development') + logger.warn(`could not resolve URL "${node.url}" in ${filePath}\n`, { timestamp: true }); + return; + } + node.url = `${parseLink(resolvedPagePath, baseDir)}${after ? `#${after}` : ''}`; + }); + }; +} +function parseLink(pagePath, baseDir) { + return pagePath + .replace(baseDir, '') + .replace(/((index)?\.(html|md|mdx|js|jsx|ts|tsx))$/, '') + .replace(/\/$/, ''); +} +//# sourceMappingURL=links.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/remark/links.js.map b/_lib/vite/plugins/remark/links.js.map new file mode 100644 index 00000000..cd066faf --- /dev/null +++ b/_lib/vite/plugins/remark/links.js.map @@ -0,0 +1 @@ +{"version":3,"file":"links.js","sourceRoot":"","sources":["../../../../vite/plugins/remark/links.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,8CAA8C;AAE9C,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AAEnC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AAEpE,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;AACzD,MAAM,aAAa,GAAG,OAAO,CAAC,SAAS,EAAE,kCAAkC,CAAC,CAAA;AAE5E,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,CAAA;AAEnC,IAAI,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC;IAAE,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,CAAA;AAE9D,MAAM,UAAU,WAAW;IACzB,MAAM,SAAS,GAAG,IAAI,GAAG,EAAoB,CAAA;IAE7C,OAAO,KAAK,EAAE,IAAU,EAAE,IAAS,EAAE,EAAE;QACrC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,iBAAiB,EAAE,CAAA;QAC5C,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAA;QAE1B,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,IA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CAAC;gBACpC,GAAG,QAAQ,oCAAoC;gBAC/C,GAAG,QAAQ,8BAA8B;aAC1C,CAAC,CAAA;YACF,IAAI,CAAC,gBAAgB,EAAE;gBACrB,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAA;gBACnC,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,CAAA;gBACzD,EAAE,CAAC,aAAa,CAAC,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,SAAS,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;gBACxE,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa;oBACxC,MAAM,CAAC,IAAI,CAAC,0BAA0B,IAAI,CAAC,GAAG,QAAQ,QAAQ,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;gBAC1F,OAAM;aACP;YACD,IAAI,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,gBAAgB,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAA;QACjF,CAAC,CAAC,CAAA;IACJ,CAAC,CAAA;AACH,CAAC;AAED,SAAS,SAAS,CAAC,QAAgB,EAAE,OAAe;IAClD,OAAO,QAAQ;SACZ,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;SACpB,OAAO,CAAC,0CAA0C,EAAE,EAAE,CAAC;SACvD,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;AACvB,CAAC"} \ No newline at end of file diff --git a/_lib/vite/plugins/remark/sponsors.d.ts b/_lib/vite/plugins/remark/sponsors.d.ts new file mode 100644 index 00000000..f3c0069e --- /dev/null +++ b/_lib/vite/plugins/remark/sponsors.d.ts @@ -0,0 +1,3 @@ +import type { Root } from 'mdast'; +export declare function remarkSponsors(): (tree: Root) => void; +//# sourceMappingURL=sponsors.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/remark/sponsors.d.ts.map b/_lib/vite/plugins/remark/sponsors.d.ts.map new file mode 100644 index 00000000..ead46f08 --- /dev/null +++ b/_lib/vite/plugins/remark/sponsors.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"sponsors.d.ts","sourceRoot":"","sources":["../../../../vite/plugins/remark/sponsors.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAGjC,wBAAgB,cAAc,WACd,IAAI,UAcnB"} \ No newline at end of file diff --git a/_lib/vite/plugins/remark/sponsors.js b/_lib/vite/plugins/remark/sponsors.js new file mode 100644 index 00000000..3d797c6c --- /dev/null +++ b/_lib/vite/plugins/remark/sponsors.js @@ -0,0 +1,23 @@ +/// +/// +import { visit } from 'unist-util-visit'; +export function remarkSponsors() { + return (tree) => { + visit(tree, (node, index, parent) => { + if (node.type !== 'leafDirective') + return; + if (node.name !== 'sponsors') + return; + if (!index) + return; + (parent?.children[index]).children.push({ + type: 'paragraph', + data: { + hName: 'div', + hProperties: { 'data-sponsors': true }, + }, + }); + }); + }; +} +//# sourceMappingURL=sponsors.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/remark/sponsors.js.map b/_lib/vite/plugins/remark/sponsors.js.map new file mode 100644 index 00000000..3f5b28c0 --- /dev/null +++ b/_lib/vite/plugins/remark/sponsors.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sponsors.js","sourceRoot":"","sources":["../../../../vite/plugins/remark/sponsors.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,8CAA8C;AAG9C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAExC,MAAM,UAAU,cAAc;IAC5B,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;YAClC,IAAI,IAAI,CAAC,IAAI,KAAK,eAAe;gBAAE,OAAM;YACzC,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU;gBAAE,OAAM;YACpC,IAAI,CAAC,KAAK;gBAAE,OACX;YAAA,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAS,CAAA,CAAC,QAAQ,CAAC,IAAI,CAAC;gBAC9C,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE;oBACJ,KAAK,EAAE,KAAK;oBACZ,WAAW,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE;iBACvC;aACF,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/vite/plugins/remark/steps.d.ts b/_lib/vite/plugins/remark/steps.d.ts new file mode 100644 index 00000000..795005f2 --- /dev/null +++ b/_lib/vite/plugins/remark/steps.d.ts @@ -0,0 +1,3 @@ +import type { Root } from 'mdast'; +export declare function remarkSteps(): (tree: Root) => void; +//# sourceMappingURL=steps.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/remark/steps.d.ts.map b/_lib/vite/plugins/remark/steps.d.ts.map new file mode 100644 index 00000000..51fe4800 --- /dev/null +++ b/_lib/vite/plugins/remark/steps.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"steps.d.ts","sourceRoot":"","sources":["../../../../vite/plugins/remark/steps.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAW,IAAI,EAAE,MAAM,OAAO,CAAA;AAG1C,wBAAgB,WAAW,WACX,IAAI,UAyCnB"} \ No newline at end of file diff --git a/_lib/vite/plugins/remark/steps.js b/_lib/vite/plugins/remark/steps.js new file mode 100644 index 00000000..d572ea18 --- /dev/null +++ b/_lib/vite/plugins/remark/steps.js @@ -0,0 +1,45 @@ +/// +/// +import { h } from 'hastscript'; +import { visit } from 'unist-util-visit'; +export function remarkSteps() { + return (tree) => { + visit(tree, (node) => { + if (node.type !== 'containerDirective') + return; + if (node.name !== 'steps') + return; + const data = node.data || (node.data = {}); + const tagName = 'div'; + node.attributes = { + ...node.attributes, + 'data-vocs-steps': 'true', + }; + data.hName = tagName; + data.hProperties = h(tagName, node.attributes || {}).properties; + const depth = node.children.find((child) => child.type === 'heading')?.depth ?? 2; + let currentChild; + const children = []; + for (const child of node.children) { + if (child.type === 'heading' && child.depth === depth) { + if (currentChild && currentChild.children.length > 0) + children.push(currentChild); + currentChild = { + type: 'paragraph', + children: [], + data: { + hName: 'div', + hProperties: { + 'data-depth': depth, + }, + }, + }; + } + currentChild.children.push(child); + } + children.push(currentChild); + node.children = children; + }); + }; +} +//# sourceMappingURL=steps.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/remark/steps.js.map b/_lib/vite/plugins/remark/steps.js.map new file mode 100644 index 00000000..4505f399 --- /dev/null +++ b/_lib/vite/plugins/remark/steps.js.map @@ -0,0 +1 @@ +{"version":3,"file":"steps.js","sourceRoot":"","sources":["../../../../vite/plugins/remark/steps.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,8CAA8C;AAE9C,OAAO,EAAE,CAAC,EAAE,MAAM,YAAY,CAAA;AAE9B,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAExC,MAAM,UAAU,WAAW;IACzB,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE;YACnB,IAAI,IAAI,CAAC,IAAI,KAAK,oBAAoB;gBAAE,OAAM;YAC9C,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO;gBAAE,OAAM;YAEjC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,CAAA;YAC1C,MAAM,OAAO,GAAG,KAAK,CAAA;YAErB,IAAI,CAAC,UAAU,GAAG;gBAChB,GAAG,IAAI,CAAC,UAAU;gBAClB,iBAAiB,EAAE,MAAM;aAC1B,CAAA;YAED,IAAI,CAAC,KAAK,GAAG,OAAO,CAAA;YACpB,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,UAAU,CAAA;YAE/D,MAAM,KAAK,GAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS,CAAa,EAAE,KAAK,IAAI,CAAC,CAAA;YAE9F,IAAI,YAAY,CAAA;YAChB,MAAM,QAAQ,GAAG,EAAE,CAAA;YACnB,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACjC,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK,EAAE;oBACrD,IAAI,YAAY,IAAI,YAAY,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC;wBAAE,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;oBACjF,YAAY,GAAG;wBACb,IAAI,EAAE,WAAW;wBACjB,QAAQ,EAAE,EAAE;wBACZ,IAAI,EAAE;4BACJ,KAAK,EAAE,KAAK;4BACZ,WAAW,EAAE;gCACX,YAAY,EAAE,KAAK;6BACpB;yBACF;qBACK,CAAA;iBACT;gBACD,YAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;aACnC;YACD,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;YAE3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QAC1B,CAAC,CAAC,CAAA;IACJ,CAAC,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/vite/plugins/remark/strong-block.d.ts b/_lib/vite/plugins/remark/strong-block.d.ts new file mode 100644 index 00000000..97e8437d --- /dev/null +++ b/_lib/vite/plugins/remark/strong-block.d.ts @@ -0,0 +1,3 @@ +import type { Root } from 'mdast'; +export declare function remarkStrongBlock(): (tree: Root) => void; +//# sourceMappingURL=strong-block.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/remark/strong-block.d.ts.map b/_lib/vite/plugins/remark/strong-block.d.ts.map new file mode 100644 index 00000000..28e76a86 --- /dev/null +++ b/_lib/vite/plugins/remark/strong-block.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"strong-block.d.ts","sourceRoot":"","sources":["../../../../vite/plugins/remark/strong-block.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAGjC,wBAAgB,iBAAiB,WACjB,IAAI,UAUnB"} \ No newline at end of file diff --git a/_lib/vite/plugins/remark/strong-block.js b/_lib/vite/plugins/remark/strong-block.js new file mode 100644 index 00000000..8c5fd279 --- /dev/null +++ b/_lib/vite/plugins/remark/strong-block.js @@ -0,0 +1,18 @@ +/// +/// +import { visit } from 'unist-util-visit'; +export function remarkStrongBlock() { + return (tree) => { + visit(tree, 'strong', (node, _, parent) => { + if (!parent) + return; + if (parent.type !== 'paragraph') + return; + if (parent.children.length > 1) + return; + parent.type = 'strong'; + parent.children = node.children; + }); + }; +} +//# sourceMappingURL=strong-block.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/remark/strong-block.js.map b/_lib/vite/plugins/remark/strong-block.js.map new file mode 100644 index 00000000..a79b8aa1 --- /dev/null +++ b/_lib/vite/plugins/remark/strong-block.js.map @@ -0,0 +1 @@ +{"version":3,"file":"strong-block.js","sourceRoot":"","sources":["../../../../vite/plugins/remark/strong-block.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,8CAA8C;AAG9C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAExC,MAAM,UAAU,iBAAiB;IAC/B,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,KAAK,CAAC,IAAI,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE;YACxC,IAAI,CAAC,MAAM;gBAAE,OAAM;YACnB,IAAI,MAAM,CAAC,IAAI,KAAK,WAAW;gBAAE,OAAM;YACvC,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC;gBAAE,OAAM;YAEtC,MAAM,CAAC,IAAI,GAAG,QAAe,CAAA;YAC7B,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAA;QACjC,CAAC,CAAC,CAAA;IACJ,CAAC,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/vite/plugins/remark/subheading.d.ts b/_lib/vite/plugins/remark/subheading.d.ts new file mode 100644 index 00000000..69722649 --- /dev/null +++ b/_lib/vite/plugins/remark/subheading.d.ts @@ -0,0 +1,3 @@ +import type { Root } from 'mdast'; +export declare function remarkSubheading(): (tree: Root) => void; +//# sourceMappingURL=subheading.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/remark/subheading.d.ts.map b/_lib/vite/plugins/remark/subheading.d.ts.map new file mode 100644 index 00000000..592bc08c --- /dev/null +++ b/_lib/vite/plugins/remark/subheading.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"subheading.d.ts","sourceRoot":"","sources":["../../../../vite/plugins/remark/subheading.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAGjC,wBAAgB,gBAAgB,WAChB,IAAI,UAyCnB"} \ No newline at end of file diff --git a/_lib/vite/plugins/remark/subheading.js b/_lib/vite/plugins/remark/subheading.js new file mode 100644 index 00000000..cc40bcf4 --- /dev/null +++ b/_lib/vite/plugins/remark/subheading.js @@ -0,0 +1,45 @@ +/// +/// +import { visit } from 'unist-util-visit'; +export function remarkSubheading() { + return (tree) => { + visit(tree, 'heading', (node, index, parent) => { + if (!index) + return; + if (node.depth !== 1) + return; + if (node.children.length === 0) + return; + const subheadingRegex = / \[(.*)\]$/; + const subheadingChild = node.children.find((child) => 'value' in child && typeof child.value === 'string' && child.value.match(subheadingRegex)); + const [match, subheading] = subheadingChild?.value?.match(subheadingRegex) ?? []; + if (subheadingChild) + subheadingChild.value = subheadingChild?.value?.replace(match, ''); + // remove original heading + parent?.children.splice(index, 1); + const header = { + type: 'paragraph', + data: { + hName: 'header', + }, + children: [ + node, + subheading + ? { + type: 'paragraph', + children: [{ type: 'text', value: subheading }], + data: { + hName: 'div', + hProperties: { + role: 'doc-subtitle', + }, + }, + } + : undefined, + ].filter(Boolean), + }; + parent?.children.splice(index, 0, header); + }); + }; +} +//# sourceMappingURL=subheading.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/remark/subheading.js.map b/_lib/vite/plugins/remark/subheading.js.map new file mode 100644 index 00000000..a4fe0620 --- /dev/null +++ b/_lib/vite/plugins/remark/subheading.js.map @@ -0,0 +1 @@ +{"version":3,"file":"subheading.js","sourceRoot":"","sources":["../../../../vite/plugins/remark/subheading.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,8CAA8C;AAG9C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAExC,MAAM,UAAU,gBAAgB;IAC9B,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,KAAK,CAAC,IAAI,EAAE,SAAS,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;YAC7C,IAAI,CAAC,KAAK;gBAAE,OAAM;YAClB,IAAI,IAAI,CAAC,KAAK,KAAK,CAAC;gBAAE,OAAM;YAC5B,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC;gBAAE,OAAM;YAEtC,MAAM,eAAe,GAAG,YAAY,CAAA;YACpC,MAAM,eAAe,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CACxC,CAAC,KAAK,EAAE,EAAE,CACR,OAAO,IAAI,KAAK,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,eAAe,CAAC,CACrF,CAAA;YACR,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC,GAAG,eAAe,EAAE,KAAK,EAAE,KAAK,CAAC,eAAe,CAAC,IAAI,EAAE,CAAA;YAChF,IAAI,eAAe;gBAAE,eAAe,CAAC,KAAK,GAAG,eAAe,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;YAEvF,0BAA0B;YAC1B,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;YAEjC,MAAM,MAAM,GAAG;gBACb,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE;oBACJ,KAAK,EAAE,QAAQ;iBAChB;gBACD,QAAQ,EAAE;oBACR,IAAI;oBACJ,UAAU;wBACR,CAAC,CAAC;4BACE,IAAI,EAAE,WAAW;4BACjB,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;4BAC/C,IAAI,EAAE;gCACJ,KAAK,EAAE,KAAK;gCACZ,WAAW,EAAE;oCACX,IAAI,EAAE,cAAc;iCACrB;6BACF;yBACF;wBACH,CAAC,CAAC,SAAS;iBACd,CAAC,MAAM,CAAC,OAAO,CAAC;aACX,CAAA;YACR,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,EAAE,MAAM,CAAC,CAAA;QAC3C,CAAC,CAAC,CAAA;IACJ,CAAC,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/vite/plugins/remark/twoslash.d.ts b/_lib/vite/plugins/remark/twoslash.d.ts new file mode 100644 index 00000000..b52dfffa --- /dev/null +++ b/_lib/vite/plugins/remark/twoslash.d.ts @@ -0,0 +1,3 @@ +import type { Root } from 'mdast'; +export declare function remarkTwoslash(): (tree: Root) => void; +//# sourceMappingURL=twoslash.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/remark/twoslash.d.ts.map b/_lib/vite/plugins/remark/twoslash.d.ts.map new file mode 100644 index 00000000..e7f73d73 --- /dev/null +++ b/_lib/vite/plugins/remark/twoslash.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"twoslash.d.ts","sourceRoot":"","sources":["../../../../vite/plugins/remark/twoslash.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAGjC,wBAAgB,cAAc,WACd,IAAI,UAWnB"} \ No newline at end of file diff --git a/_lib/vite/plugins/remark/twoslash.js b/_lib/vite/plugins/remark/twoslash.js new file mode 100644 index 00000000..fd63a6a4 --- /dev/null +++ b/_lib/vite/plugins/remark/twoslash.js @@ -0,0 +1,17 @@ +/// +/// +import { visit } from 'unist-util-visit'; +export function remarkTwoslash() { + return (tree) => { + visit(tree, (node) => { + if (node.type === 'code') { + // Add extra new lines between multiple twoslash annotations (@log, @error, etc) + // so that they can render correctly. + node.value = node.value + .replace(/(\/\/\s@.*:\s.*)\n(\/\/)/g, '$1\n\n$2') + .replace(/(\/\/\s@.*:\s.*)\n(\/\/)/g, '$1\n\n$2'); + } + }); + }; +} +//# sourceMappingURL=twoslash.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/remark/twoslash.js.map b/_lib/vite/plugins/remark/twoslash.js.map new file mode 100644 index 00000000..ece827b6 --- /dev/null +++ b/_lib/vite/plugins/remark/twoslash.js.map @@ -0,0 +1 @@ +{"version":3,"file":"twoslash.js","sourceRoot":"","sources":["../../../../vite/plugins/remark/twoslash.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,8CAA8C;AAG9C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAExC,MAAM,UAAU,cAAc;IAC5B,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE;YACnB,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,EAAE;gBACxB,gFAAgF;gBAChF,qCAAqC;gBACrC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK;qBACpB,OAAO,CAAC,2BAA2B,EAAE,UAAU,CAAC;qBAChD,OAAO,CAAC,2BAA2B,EAAE,UAAU,CAAC,CAAA;aACpD;QACH,CAAC,CAAC,CAAA;IACJ,CAAC,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/vite/plugins/resolve-vocs-modules.d.ts b/_lib/vite/plugins/resolve-vocs-modules.d.ts new file mode 100644 index 00000000..218e3b93 --- /dev/null +++ b/_lib/vite/plugins/resolve-vocs-modules.d.ts @@ -0,0 +1,3 @@ +import { type PluginOption } from 'vite'; +export declare function resolveVocsModules(): PluginOption; +//# sourceMappingURL=resolve-vocs-modules.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/resolve-vocs-modules.d.ts.map b/_lib/vite/plugins/resolve-vocs-modules.d.ts.map new file mode 100644 index 00000000..3868e589 --- /dev/null +++ b/_lib/vite/plugins/resolve-vocs-modules.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"resolve-vocs-modules.d.ts","sourceRoot":"","sources":["../../../vite/plugins/resolve-vocs-modules.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,MAAM,CAAA;AAOxC,wBAAgB,kBAAkB,IAAI,YAAY,CAwBjD"} \ No newline at end of file diff --git a/_lib/vite/plugins/resolve-vocs-modules.js b/_lib/vite/plugins/resolve-vocs-modules.js new file mode 100644 index 00000000..4d32c628 --- /dev/null +++ b/_lib/vite/plugins/resolve-vocs-modules.js @@ -0,0 +1,25 @@ +import { dirname, extname, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import {} from 'vite'; +import { resolveVocsConfig } from '../utils/resolveVocsConfig.js'; +const __dirname = dirname(fileURLToPath(import.meta.url)); +export function resolveVocsModules() { + let config; + return { + name: 'resolve-vocs', + async buildStart() { + config = (await resolveVocsConfig()).config; + }, + transform(code_, id) { + let code = code_; + if (id.startsWith(resolve(config.rootDir))) { + if (['.js', '.jsx', '.js', '.js', '.md', '.mdx'].includes(extname(id))) { + code = code.replace(/import (.*) from ("|')vocs("|')/g, `import $1 from $2${resolve(__dirname, '../..')}$3`); + code = code.replace(/import (.*) from ("|')vocs\/components("|')/g, `import $1 from $2${resolve(__dirname, '../../components')}$3`); + } + } + return code; + }, + }; +} +//# sourceMappingURL=resolve-vocs-modules.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/resolve-vocs-modules.js.map b/_lib/vite/plugins/resolve-vocs-modules.js.map new file mode 100644 index 00000000..d9942ccf --- /dev/null +++ b/_lib/vite/plugins/resolve-vocs-modules.js.map @@ -0,0 +1 @@ +{"version":3,"file":"resolve-vocs-modules.js","sourceRoot":"","sources":["../../../vite/plugins/resolve-vocs-modules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAqB,MAAM,MAAM,CAAA;AAGxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AAEjE,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;AAEzD,MAAM,UAAU,kBAAkB;IAChC,IAAI,MAAoB,CAAA;IACxB,OAAO;QACL,IAAI,EAAE,cAAc;QACpB,KAAK,CAAC,UAAU;YACd,MAAM,GAAG,CAAC,MAAM,iBAAiB,EAAE,CAAC,CAAC,MAAM,CAAA;QAC7C,CAAC;QACD,SAAS,CAAC,KAAK,EAAE,EAAE;YACjB,IAAI,IAAI,GAAG,KAAK,CAAA;YAChB,IAAI,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE;gBAC1C,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE;oBACvE,IAAI,GAAG,IAAI,CAAC,OAAO,CACjB,kCAAkC,EAClC,oBAAoB,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,IAAI,CACpD,CAAA;oBACD,IAAI,GAAG,IAAI,CAAC,OAAO,CACjB,8CAA8C,EAC9C,oBAAoB,OAAO,CAAC,SAAS,EAAE,kBAAkB,CAAC,IAAI,CAC/D,CAAA;iBACF;aACF;YACD,OAAO,IAAI,CAAA;QACb,CAAC;KACF,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/vite/plugins/search.d.ts b/_lib/vite/plugins/search.d.ts new file mode 100644 index 00000000..02a4aeee --- /dev/null +++ b/_lib/vite/plugins/search.d.ts @@ -0,0 +1,3 @@ +import { type Plugin } from 'vite'; +export declare function search(): Promise; +//# sourceMappingURL=search.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/search.d.ts.map b/_lib/vite/plugins/search.d.ts.map new file mode 100644 index 00000000..493dcb0e --- /dev/null +++ b/_lib/vite/plugins/search.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../vite/plugins/search.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,MAAM,EAAqD,MAAM,MAAM,CAAA;AAgCrF,wBAAsB,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,CAoH9C"} \ No newline at end of file diff --git a/_lib/vite/plugins/search.js b/_lib/vite/plugins/search.js new file mode 100644 index 00000000..319657d2 --- /dev/null +++ b/_lib/vite/plugins/search.js @@ -0,0 +1,127 @@ +import { existsSync, readFileSync } from 'node:fs'; +import { relative, resolve } from 'node:path'; +import MiniSearch from 'minisearch'; +import { createLogger } from 'vite'; +import * as cache from '../utils/cache.js'; +import { hash as hash_ } from '../utils/hash.js'; +import { resolveVocsConfig } from '../utils/resolveVocsConfig.js'; +import { buildIndex, debug, getDocId, processMdx, saveIndex, splitPageIntoSections, } from '../utils/search.js'; +import { slash } from '../utils/slash.js'; +const virtualModuleId = 'virtual:searchIndex'; +const resolvedVirtualModuleId = `\0${virtualModuleId}`; +const logger = createLogger(); +const dev = process.env.NODE_ENV === 'development'; +export async function search() { + const { config } = await resolveVocsConfig(); + let hash; + let index; + let searchPromise; + let server; + let viteConfig; + function onIndexUpdated() { + if (!server) + return; + server.moduleGraph.onFileChange(resolvedVirtualModuleId); + // HMR + const mod = server.moduleGraph.getModuleById(resolvedVirtualModuleId); + if (!mod) + return; + server.ws.send({ + type: 'update', + updates: [ + { + acceptedPath: mod.url, + path: mod.url, + timestamp: Date.now(), + type: 'js-update', + }, + ], + }); + } + return { + name: 'vocs:search', + config(config) { + viteConfig = config; + return { + optimizeDeps: { + include: ['vocs > minisearch'], + }, + }; + }, + async buildStart() { + if (!viteConfig?.build?.ssr) { + const buildSearchIndex = cache.search.get('buildSearchIndex'); + if (!dev && !buildSearchIndex) + return; + searchPromise = buildIndex({ baseDir: config.rootDir }); + if (dev) { + logger.info('building search index...', { timestamp: true }); + index = await searchPromise; + onIndexUpdated(); + searchPromise = undefined; + } + } + }, + async configureServer(devServer) { + server = devServer; + }, + resolveId(id) { + if (id !== virtualModuleId) + return; + return resolvedVirtualModuleId; + }, + async load(id) { + if (id !== resolvedVirtualModuleId) + return; + if (dev) + return `export const getSearchIndex = async () => ${JSON.stringify(JSON.stringify(index))}`; + if (searchPromise) { + index = await searchPromise; + searchPromise = undefined; + hash = saveIndex(viteConfig?.build?.outDir, index); + } + else if (!hash) { + if (!viteConfig?.build?.ssr) + hash = hash_(Date.now().toString(), 8); + else + hash = cache.search.get('hash'); + } + cache.search.set('hash', hash); + return `export const getSearchIndex = async () => JSON.stringify(await ((await fetch("${config.basePath}/.vocs/search-index-${hash}.json")).json()))`; + }, + async handleHotUpdate({ file }) { + if (!file.endsWith('.md') && !file.endsWith('.mdx')) + return; + const fileId = getDocId(config.rootDir, file); + if (!existsSync(file)) + return; + const mdx = readFileSync(file, 'utf-8'); + const rendered = await processMdx(mdx); + const sections = splitPageIntoSections(rendered); + if (sections.length === 0) + return; + const pagesDirPath = resolve(config.rootDir, 'pages'); + const relativePagesDirPath = relative(config.rootDir, pagesDirPath); + for (const section of sections) { + const id = `${fileId}#${section.anchor}`; + if (index.has(id)) { + index.discard(id); + } + const relFile = slash(relative(config.rootDir, fileId)); + const href = relFile.replace(relativePagesDirPath, '').replace(/\.(.*)/, ''); + index.add({ + href: `${href}#${section.anchor}`, + html: section.html, + id, + isPage: section.isPage, + text: section.text, + title: section.titles.at(-1), + titles: section.titles.slice(0, -1), + }); + } + debug('vocs:search > updated', file); + onIndexUpdated(); + }, + }; +} +//# sourceMappingURL=search.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/search.js.map b/_lib/vite/plugins/search.js.map new file mode 100644 index 00000000..e9ef8035 --- /dev/null +++ b/_lib/vite/plugins/search.js.map @@ -0,0 +1 @@ +{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../vite/plugins/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAoD,YAAY,EAAE,MAAM,MAAM,CAAA;AAErF,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAA;AAC1C,OAAO,EAAE,IAAI,IAAI,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EACL,UAAU,EACV,KAAK,EACL,QAAQ,EACR,UAAU,EACV,SAAS,EACT,qBAAqB,GACtB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAEzC,MAAM,eAAe,GAAG,qBAAqB,CAAA;AAC7C,MAAM,uBAAuB,GAAG,KAAK,eAAe,EAAE,CAA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AO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;gBAC5E,KAAK,CAAC,GAAG,CAAC;oBACR,IAAI,EAAE,GAAG,IAAI,IAAI,OAAO,CAAC,MAAM,EAAE;oBACjC,IAAI,EAAE,OAAO,CAAC,IAAI;oBAClB,EAAE;oBACF,MAAM,EAAE,OAAO,CAAC,MAAM;oBACtB,IAAI,EAAE,OAAO,CAAC,IAAI;oBAClB,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAE;oBAC7B,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;iBACpC,CAAC,CAAA;aACH;YAED,KAAK,CAAC,uBAAuB,EAAE,IAAI,CAAC,CAAA;YAEpC,cAAc,EAAE,CAAA;QAClB,CAAC;KACF,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/transformerEmptyLine.d.ts b/_lib/vite/plugins/shiki/transformerEmptyLine.d.ts new file mode 100644 index 00000000..6fb4a4ba --- /dev/null +++ b/_lib/vite/plugins/shiki/transformerEmptyLine.d.ts @@ -0,0 +1,3 @@ +import type { ShikiTransformer } from 'shiki'; +export declare const transformerEmptyLine: () => ShikiTransformer; +//# sourceMappingURL=transformerEmptyLine.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/transformerEmptyLine.d.ts.map b/_lib/vite/plugins/shiki/transformerEmptyLine.d.ts.map new file mode 100644 index 00000000..8a3978e9 --- /dev/null +++ b/_lib/vite/plugins/shiki/transformerEmptyLine.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"transformerEmptyLine.d.ts","sourceRoot":"","sources":["../../../../vite/plugins/shiki/transformerEmptyLine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAA;AAE7C,eAAO,MAAM,oBAAoB,QAAO,gBAatC,CAAA"} \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/transformerEmptyLine.js b/_lib/vite/plugins/shiki/transformerEmptyLine.js new file mode 100644 index 00000000..a6dc35a0 --- /dev/null +++ b/_lib/vite/plugins/shiki/transformerEmptyLine.js @@ -0,0 +1,16 @@ +export const transformerEmptyLine = () => ({ + name: 'empty-line', + line(hast) { + const child = hast.children[0]; + if (child) + return; + hast.properties['data-empty-line'] = true; + hast.children = [ + { + type: 'text', + value: ' ', + }, + ]; + }, +}); +//# sourceMappingURL=transformerEmptyLine.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/transformerEmptyLine.js.map b/_lib/vite/plugins/shiki/transformerEmptyLine.js.map new file mode 100644 index 00000000..cb728e05 --- /dev/null +++ b/_lib/vite/plugins/shiki/transformerEmptyLine.js.map @@ -0,0 +1 @@ +{"version":3,"file":"transformerEmptyLine.js","sourceRoot":"","sources":["../../../../vite/plugins/shiki/transformerEmptyLine.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAqB,EAAE,CAAC,CAAC;IAC3D,IAAI,EAAE,YAAY;IAClB,IAAI,CAAC,IAAI;QACP,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;QAC9B,IAAI,KAAK;YAAE,OAAM;QACjB,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAA;QACzC,IAAI,CAAC,QAAQ,GAAG;YACd;gBACE,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,GAAG;aACX;SACF,CAAA;IACH,CAAC;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/transformerLineNumbers.d.ts b/_lib/vite/plugins/shiki/transformerLineNumbers.d.ts new file mode 100644 index 00000000..e9e9ae4a --- /dev/null +++ b/_lib/vite/plugins/shiki/transformerLineNumbers.d.ts @@ -0,0 +1,3 @@ +import type { ShikiTransformer } from 'shiki'; +export declare const transformerLineNumbers: () => ShikiTransformer; +//# sourceMappingURL=transformerLineNumbers.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/transformerLineNumbers.d.ts.map b/_lib/vite/plugins/shiki/transformerLineNumbers.d.ts.map new file mode 100644 index 00000000..256ef8e2 --- /dev/null +++ b/_lib/vite/plugins/shiki/transformerLineNumbers.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"transformerLineNumbers.d.ts","sourceRoot":"","sources":["../../../../vite/plugins/shiki/transformerLineNumbers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAA;AAE7C,eAAO,MAAM,sBAAsB,QAAO,gBAMxC,CAAA"} \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/transformerLineNumbers.js b/_lib/vite/plugins/shiki/transformerLineNumbers.js new file mode 100644 index 00000000..7211651b --- /dev/null +++ b/_lib/vite/plugins/shiki/transformerLineNumbers.js @@ -0,0 +1,9 @@ +export const transformerLineNumbers = () => ({ + name: 'line-numbers', + code(hast) { + if (!this.options.meta?.__raw?.includes('showLineNumbers')) + return; + hast.properties['data-line-numbers'] = true; + }, +}); +//# sourceMappingURL=transformerLineNumbers.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/transformerLineNumbers.js.map b/_lib/vite/plugins/shiki/transformerLineNumbers.js.map new file mode 100644 index 00000000..ea1dd985 --- /dev/null +++ b/_lib/vite/plugins/shiki/transformerLineNumbers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"transformerLineNumbers.js","sourceRoot":"","sources":["../../../../vite/plugins/shiki/transformerLineNumbers.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAqB,EAAE,CAAC,CAAC;IAC7D,IAAI,EAAE,cAAc;IACpB,IAAI,CAAC,IAAI;QACP,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,iBAAiB,CAAC;YAAE,OAAM;QAClE,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC,GAAG,IAAI,CAAA;IAC7C,CAAC;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/transformerNotationInclude.d.ts b/_lib/vite/plugins/shiki/transformerNotationInclude.d.ts new file mode 100644 index 00000000..b2e05cc2 --- /dev/null +++ b/_lib/vite/plugins/shiki/transformerNotationInclude.d.ts @@ -0,0 +1,10 @@ +import type { ShikiTransformer } from 'shiki'; +export type TransformerNotationIncludeOptions = { + rootDir: string; +}; +export declare const transformerNotationInclude: ({ rootDir, }: TransformerNotationIncludeOptions) => ShikiTransformer; +export declare function processIncludes({ code, getSource, }: { + code: string; + getSource: (fileName: string) => string | undefined; +}): string; +//# sourceMappingURL=transformerNotationInclude.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/transformerNotationInclude.d.ts.map b/_lib/vite/plugins/shiki/transformerNotationInclude.d.ts.map new file mode 100644 index 00000000..4f0904d1 --- /dev/null +++ b/_lib/vite/plugins/shiki/transformerNotationInclude.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"transformerNotationInclude.d.ts","sourceRoot":"","sources":["../../../../vite/plugins/shiki/transformerNotationInclude.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAA;AAQ7C,MAAM,MAAM,iCAAiC,GAAG;IAC9C,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,0BAA0B,iBAEpC,iCAAiC,KAAG,gBAarC,CAAA;AAEF,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,SAAS,GACV,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAA;CAAE,UA+BvE"} \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/transformerNotationInclude.js b/_lib/vite/plugins/shiki/transformerNotationInclude.js new file mode 100644 index 00000000..fecfe5e3 --- /dev/null +++ b/_lib/vite/plugins/shiki/transformerNotationInclude.js @@ -0,0 +1,95 @@ +import { readFileSync } from 'node:fs'; +import { resolve } from 'node:path'; +const includeRegex = /\/\/ \[!include (.*)\]/; +const regionRegex = /\/\/ \[!region (.*)\]/; +const regionRegexLineGlobal = /\/\/ \[!region (.*)\]\n/g; +const endRegionRegex = /\/\/ \[!endregion (.*)\]/; +const endRegionRegexLineGlobal = /\/\/ \[!endregion (.*)\](\n|$)/g; +export const transformerNotationInclude = ({ rootDir, }) => ({ + name: 'includes', + preprocess(code) { + if (!code) + return code; + return processIncludes({ + code, + getSource(fileName) { + if (!fileName.startsWith('~')) + return undefined; + const path = resolve(rootDir, fileName.replace('~', '.')); + return readFileSync(path, { encoding: 'utf-8' }).replace(/\n$/, ''); + }, + }); + }, +}); +export function processIncludes({ code, getSource, }) { + const includes = code.includes('// [!include'); + if (!includes) + return code + .replaceAll(regionRegexLineGlobal, '') + .replaceAll(endRegionRegexLineGlobal, '') + .replace(/\n$/, ''); + const lines = code.split('\n'); + let i = 0; + while (i < lines.length) { + const line = lines[i]; + const match = line.match(includeRegex); + if (match) { + const [, value] = match; + const [file, ...query] = value.split(' '); + const [fileName, region] = file.split(':'); + let contents = getSource(fileName); + if (contents === undefined) { + i++; + continue; + } + contents = extractRegion(contents, region); + contents = findAndReplace(contents, query); + lines.splice(i, 1, contents); + } + i++; + } + return lines.join('\n').replace(/\n$/, ''); +} +function extractRegion(code, region) { + const lines = []; + let inRegion = !region; + for (const line of code.split('\n')) { + const startRegionMatch = line.match(regionRegex); + const endRegionMatch = line.match(endRegionRegex); + // If we are in a region, ignore any other region markers. + if (inRegion && !startRegionMatch && !endRegionMatch) + lines.push(line.replaceAll(/_\$\d*/g, '')); + // If we have have found a `// [!region ${region}]` marker, start including lines. + else if (startRegionMatch) { + const [, regionName] = startRegionMatch; + if (regionName === region) { + inRegion = true; + } + } + // If we have have found a `// [!endregion ${region}]` marker, stop including lines. + else if (endRegionMatch) { + const [, regionName] = endRegionMatch; + if (regionName === region) { + inRegion = false; + } + } + } + return lines.join('\n'); +} +const findAndReplaceRegex = /^\/(.*)([^\\])\/(.*)\/$/; +function findAndReplace(code_, queries) { + if (queries.length === 0) + return code_; + let code = code_; + for (const query of queries) { + const match = query.match(findAndReplaceRegex); + if (!match) + return code; + const [, find1, find2, replace1] = match; + const find = (find1 + find2).replace('\\/', '/'); + const replace = replace1.replace('\\/', '/'); + code = code.replaceAll(find, replace); + } + return code; +} +//# sourceMappingURL=transformerNotationInclude.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/transformerNotationInclude.js.map b/_lib/vite/plugins/shiki/transformerNotationInclude.js.map new file mode 100644 index 00000000..aa3fba3b --- /dev/null +++ b/_lib/vite/plugins/shiki/transformerNotationInclude.js.map @@ -0,0 +1 @@ +{"version":3,"file":"transformerNotationInclude.js","sourceRoot":"","sources":["../../../../vite/plugins/shiki/transformerNotationInclude.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAGnC,MAAM,YAAY,GAAG,wBAAwB,CAAA;AAC7C,MAAM,WAAW,GAAG,uBAAuB,CAAA;AAC3C,MAAM,qBAAqB,GAAG,0BAA0B,CAAA;AACxD,MAAM,cAAc,GAAG,0BAA0B,CAAA;AACjD,MAAM,wBAAwB,GAAG,iCAAiC,CAAA;AAMlE,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,EACzC,OAAO,GAC2B,EAAoB,EAAE,CAAC,CAAC;IAC1D,IAAI,EAAE,UAAU;IAChB,UAAU,CAAC,IAAI;QACb,IAAI,CAAC,IAAI;YAAE,OAAO,IAAI,CAAA;QACtB,OAAO,eAAe,CAAC;YACrB,IAAI;YACJ,SAAS,CAAC,QAAQ;gBAChB,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC;oBAAE,OAA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K,CAAA;aACjB;SACF;KACF;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACzB,CAAC;AAED,MAAM,mBAAmB,GAAG,yBAAyB,CAAA;AAErD,SAAS,cAAc,CAAC,KAAa,EAAE,OAAiB;IACtD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,KAAK,CAAA;IACtC,IAAI,IAAI,GAAG,KAAK,CAAA;IAChB,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE;QAC3B,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAA;QAC9C,IAAI,CAAC,KAAK;YAAE,OAAO,IAAI,CAAA;QACvB,MAAM,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAA;QACxC,MAAM,IAAI,GAAG,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;QAChD,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;QAC5C,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;KACtC;IACD,OAAO,IAAI,CAAA;AACb,CAAC"} \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/transformerShrinkIndent.d.ts b/_lib/vite/plugins/shiki/transformerShrinkIndent.d.ts new file mode 100644 index 00000000..7101c49b --- /dev/null +++ b/_lib/vite/plugins/shiki/transformerShrinkIndent.d.ts @@ -0,0 +1,3 @@ +import type { ShikiTransformer } from 'shiki'; +export declare const transformerShrinkIndent: () => ShikiTransformer; +//# sourceMappingURL=transformerShrinkIndent.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/transformerShrinkIndent.d.ts.map b/_lib/vite/plugins/shiki/transformerShrinkIndent.d.ts.map new file mode 100644 index 00000000..ddaffaf6 --- /dev/null +++ b/_lib/vite/plugins/shiki/transformerShrinkIndent.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"transformerShrinkIndent.d.ts","sourceRoot":"","sources":["../../../../vite/plugins/shiki/transformerShrinkIndent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAA;AAE7C,eAAO,MAAM,uBAAuB,QAAO,gBAUzC,CAAA"} \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/transformerShrinkIndent.js b/_lib/vite/plugins/shiki/transformerShrinkIndent.js new file mode 100644 index 00000000..b4ebb929 --- /dev/null +++ b/_lib/vite/plugins/shiki/transformerShrinkIndent.js @@ -0,0 +1,16 @@ +export const transformerShrinkIndent = () => ({ + name: 'indent', + span(hast, _, __, lineElement) { + const child = hast.children[0]; + if (child.type !== 'text') + return; + if (!child.value) + return; + if (child.value.trim().length !== 0) + return; + if (lineElement.children.length !== 0) + return; + hast.children[0] = { type: 'text', value: child.value.replace(/\s\s/g, ' ') }; + }, +}); +//# sourceMappingURL=transformerShrinkIndent.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/transformerShrinkIndent.js.map b/_lib/vite/plugins/shiki/transformerShrinkIndent.js.map new file mode 100644 index 00000000..a1b2ffd4 --- /dev/null +++ b/_lib/vite/plugins/shiki/transformerShrinkIndent.js.map @@ -0,0 +1 @@ +{"version":3,"file":"transformerShrinkIndent.js","sourceRoot":"","sources":["../../../../vite/plugins/shiki/transformerShrinkIndent.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAqB,EAAE,CAAC,CAAC;IAC9D,IAAI,EAAE,QAAQ;IACd,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,WAAW;QAC3B,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;QAC9B,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM;YAAE,OAAM;QACjC,IAAI,CAAC,KAAK,CAAC,KAAK;YAAE,OAAM;QACxB,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC;YAAE,OAAM;QAC3C,IAAI,WAAW,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC;YAAE,OAAM;QAC7C,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE,CAAA;IAC/E,CAAC;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/transformerSplitIdentifiers.d.ts b/_lib/vite/plugins/shiki/transformerSplitIdentifiers.d.ts new file mode 100644 index 00000000..4c97f221 --- /dev/null +++ b/_lib/vite/plugins/shiki/transformerSplitIdentifiers.d.ts @@ -0,0 +1,3 @@ +import type { ShikiTransformer } from 'shiki'; +export declare const transformerSplitIdentifiers: () => ShikiTransformer; +//# sourceMappingURL=transformerSplitIdentifiers.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/transformerSplitIdentifiers.d.ts.map b/_lib/vite/plugins/shiki/transformerSplitIdentifiers.d.ts.map new file mode 100644 index 00000000..2f82e444 --- /dev/null +++ b/_lib/vite/plugins/shiki/transformerSplitIdentifiers.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"transformerSplitIdentifiers.d.ts","sourceRoot":"","sources":["../../../../vite/plugins/shiki/transformerSplitIdentifiers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAA;AAE7C,eAAO,MAAM,2BAA2B,QAAO,gBAqC7C,CAAA"} \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/transformerSplitIdentifiers.js b/_lib/vite/plugins/shiki/transformerSplitIdentifiers.js new file mode 100644 index 00000000..94c621fc --- /dev/null +++ b/_lib/vite/plugins/shiki/transformerSplitIdentifiers.js @@ -0,0 +1,40 @@ +export const transformerSplitIdentifiers = () => ({ + name: 'split-identifiers', + span(hast) { + // only apply for twoslash code blocks + if (!this.meta.twoslash) + return; + const child = hast.children[0]; + if (child.type !== 'text') + return; + if (child.value.trim().length === 0) + return; + if (child.value.match(/\/\/ \[!/)) + return; + let identifier = false; + let item = ''; + const items = []; + for (const char of child.value) { + if (char.match(/\w/)) { + if (!identifier) { + items.push(item); + item = ''; + } + identifier = true; + item += char; + } + else if (char.match(/\W/)) { + if (identifier) { + items.push(item); + item = ''; + } + identifier = false; + item += char; + } + } + if (item) + items.push(item); + hast.children = items.map((item) => ({ type: 'text', value: item })); + }, +}); +//# sourceMappingURL=transformerSplitIdentifiers.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/transformerSplitIdentifiers.js.map b/_lib/vite/plugins/shiki/transformerSplitIdentifiers.js.map new file mode 100644 index 00000000..ed64ca1d --- /dev/null +++ b/_lib/vite/plugins/shiki/transformerSplitIdentifiers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"transformerSplitIdentifiers.js","sourceRoot":"","sources":["../../../../vite/plugins/shiki/transformerSplitIdentifiers.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAqB,EAAE,CAAC,CAAC;IAClE,IAAI,EAAE,mBAAmB;IACzB,IAAI,CAAC,IAAI;QACP,sCAAsC;QACtC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ;YAAE,OAAM;QAE/B,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;QAC9B,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM;YAAE,OAAM;QACjC,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC;YAAE,OAAM;QAC3C,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC;YAAE,OAAM;QAEzC,IAAI,UAAU,GAAG,KAAK,CAAA;QACtB,IAAI,IAAI,GAAG,EAAE,CAAA;QACb,MAAM,KAAK,GAAG,EAAE,CAAA;QAEhB,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,KAAK,EAAE;YAC9B,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;gBACpB,IAAI,CAAC,UAAU,EAAE;oBACf,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;oBAChB,IAAI,GAAG,EAAE,CAAA;iBACV;gBACD,UAAU,GAAG,IAAI,CAAA;gBACjB,IAAI,IAAI,IAAI,CAAA;aACb;iBAAM,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;gBAC3B,IAAI,UAAU,EAAE;oBACd,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;oBAChB,IAAI,GAAG,EAAE,CAAA;iBACV;gBACD,UAAU,GAAG,KAAK,CAAA;gBAClB,IAAI,IAAI,IAAI,CAAA;aACb;SACF;QAED,IAAI,IAAI;YAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAE1B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;IACtE,CAAC;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/transformerTagLine.d.ts b/_lib/vite/plugins/shiki/transformerTagLine.d.ts new file mode 100644 index 00000000..c6f55571 --- /dev/null +++ b/_lib/vite/plugins/shiki/transformerTagLine.d.ts @@ -0,0 +1,3 @@ +import type { ShikiTransformer } from 'shiki'; +export declare const transformerTagLine: () => ShikiTransformer; +//# sourceMappingURL=transformerTagLine.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/transformerTagLine.d.ts.map b/_lib/vite/plugins/shiki/transformerTagLine.d.ts.map new file mode 100644 index 00000000..f9fd0bbc --- /dev/null +++ b/_lib/vite/plugins/shiki/transformerTagLine.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"transformerTagLine.d.ts","sourceRoot":"","sources":["../../../../vite/plugins/shiki/transformerTagLine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAA;AAE7C,eAAO,MAAM,kBAAkB,QAAO,gBAepC,CAAA"} \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/transformerTagLine.js b/_lib/vite/plugins/shiki/transformerTagLine.js new file mode 100644 index 00000000..ac838c09 --- /dev/null +++ b/_lib/vite/plugins/shiki/transformerTagLine.js @@ -0,0 +1,18 @@ +export const transformerTagLine = () => ({ + name: 'tag-line', + root(hast) { + const lines = hast.children[0]?.children[0]?.children; + if (!lines) + return; + for (let i = 0; i < lines.length; i++) { + const line = lines[i]; + if (line.properties?.class.includes('twoslash-tag-line')) { + lines.splice(i - 1, 0, line); + lines.splice(i + 1, 1); + if (i + 1 === lines.length) + lines.splice(i, 1); + } + } + }, +}); +//# sourceMappingURL=transformerTagLine.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/transformerTagLine.js.map b/_lib/vite/plugins/shiki/transformerTagLine.js.map new file mode 100644 index 00000000..c6e87a90 --- /dev/null +++ b/_lib/vite/plugins/shiki/transformerTagLine.js.map @@ -0,0 +1 @@ +{"version":3,"file":"transformerTagLine.js","sourceRoot":"","sources":["../../../../vite/plugins/shiki/transformerTagLine.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAqB,EAAE,CAAC,CAAC;IACzD,IAAI,EAAE,UAAU;IAChB,IAAI,CAAC,IAAI;QACP,MAAM,KAAK,GAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAA;QAC9D,IAAI,CAAC,KAAK;YAAE,OAAM;QAElB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACrC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;YACrB,IAAI,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,mBAAmB,CAAC,EAAE;gBACxD,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAA;gBAC5B,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAA;gBACtB,IAAI,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,MAAM;oBAAE,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;aAC/C;SACF;IACH,CAAC;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/transformerTitle.d.ts b/_lib/vite/plugins/shiki/transformerTitle.d.ts new file mode 100644 index 00000000..eb4d9af9 --- /dev/null +++ b/_lib/vite/plugins/shiki/transformerTitle.d.ts @@ -0,0 +1,3 @@ +import type { ShikiTransformer } from 'shiki'; +export declare const transformerTitle: () => ShikiTransformer; +//# sourceMappingURL=transformerTitle.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/transformerTitle.d.ts.map b/_lib/vite/plugins/shiki/transformerTitle.d.ts.map new file mode 100644 index 00000000..b44c6dd0 --- /dev/null +++ b/_lib/vite/plugins/shiki/transformerTitle.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"transformerTitle.d.ts","sourceRoot":"","sources":["../../../../vite/plugins/shiki/transformerTitle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAA;AAI7C,eAAO,MAAM,gBAAgB,QAAO,gBAmBlC,CAAA"} \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/transformerTitle.js b/_lib/vite/plugins/shiki/transformerTitle.js new file mode 100644 index 00000000..49eccdfd --- /dev/null +++ b/_lib/vite/plugins/shiki/transformerTitle.js @@ -0,0 +1,22 @@ +const titleRegex = /title="(.*)"|\[(.*)\]/; +export const transformerTitle = () => ({ + name: 'title', + root(hast) { + const titleMatch = this.options.meta?.__raw?.match(titleRegex); + if (!titleMatch) + return; + const title = titleMatch[1] || titleMatch[2]; + const child = hast.children[0]; + hast.children = [ + { + ...child, + properties: { + ...child.properties, + 'data-title': title, + 'data-lang': this.options.lang, + }, + }, + ]; + }, +}); +//# sourceMappingURL=transformerTitle.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/transformerTitle.js.map b/_lib/vite/plugins/shiki/transformerTitle.js.map new file mode 100644 index 00000000..267c5af9 --- /dev/null +++ b/_lib/vite/plugins/shiki/transformerTitle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"transformerTitle.js","sourceRoot":"","sources":["../../../../vite/plugins/shiki/transformerTitle.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,GAAG,uBAAuB,CAAA;AAE1C,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAqB,EAAE,CAAC,CAAC;IACvD,IAAI,EAAE,OAAO;IACb,IAAI,CAAC,IAAI;QACP,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,CAAA;QAC9D,IAAI,CAAC,UAAU;YAAE,OAAM;QAEvB,MAAM,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,CAAA;QAC5C,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAQ,CAAA;QACrC,IAAI,CAAC,QAAQ,GAAG;YACd;gBACE,GAAG,KAAK;gBACR,UAAU,EAAE;oBACV,GAAG,KAAK,CAAC,UAAU;oBACnB,YAAY,EAAE,KAAK;oBACnB,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI;iBAC/B;aACF;SACF,CAAA;IACH,CAAC;CACF,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/twoslashRenderer.d.ts b/_lib/vite/plugins/shiki/twoslashRenderer.d.ts new file mode 100644 index 00000000..8f275141 --- /dev/null +++ b/_lib/vite/plugins/shiki/twoslashRenderer.d.ts @@ -0,0 +1,7 @@ +import type { TwoslashRenderer } from '@shikijs/twoslash'; +export declare function twoslashRenderer(): TwoslashRenderer; +/** + * The default hover info processor, which will do some basic cleanup + */ +export declare function processHoverInfo(type: string): string; +//# sourceMappingURL=twoslashRenderer.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/twoslashRenderer.d.ts.map b/_lib/vite/plugins/shiki/twoslashRenderer.d.ts.map new file mode 100644 index 00000000..ade678ba --- /dev/null +++ b/_lib/vite/plugins/shiki/twoslashRenderer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"twoslashRenderer.d.ts","sourceRoot":"","sources":["../../../../vite/plugins/shiki/twoslashRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AASzD,wBAAgB,gBAAgB,IAAI,gBAAgB,CAuRnD;AAKD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,UAe5C"} \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/twoslashRenderer.js b/_lib/vite/plugins/shiki/twoslashRenderer.js new file mode 100644 index 00000000..e070b690 --- /dev/null +++ b/_lib/vite/plugins/shiki/twoslashRenderer.js @@ -0,0 +1,282 @@ +import { fromMarkdown } from 'mdast-util-from-markdown'; +import { gfmFromMarkdown } from 'mdast-util-gfm'; +import { defaultHandlers, toHast } from 'mdast-util-to-hast'; +import { transformerShrinkIndent } from './transformerShrinkIndent.js'; +export function twoslashRenderer() { + function hightlightPopupContent(codeToHast, shikiOptions, info) { + if (!info.text) + return []; + const text = processHoverInfo(info.text) ?? info.text; + if (!text.trim()) + return []; + const themedContent = codeToHast(text, { + ...shikiOptions, + transformers: [transformerShrinkIndent()], + }).children[0].children[0].children; + if (info.docs) { + const santized = info.docs + .replace(/\n?{(@.*)?\s*\n?/g, '') + .replace(/\s*}\n?/g, '') + .replace(/(.)\n(.)/g, '$1 $2') + .replace(/\n?-\s/g, '\n'); + const mdast = fromMarkdown(santized, { + mdastExtensions: [gfmFromMarkdown()], + }); + const hast = toHast(mdast, { + handlers: { + code: (state, node) => { + const lang = node.lang || ''; + if (lang) { + return codeToHast(node.value, { + ...shikiOptions, + transformers: [], + lang, + }).children[0]; + } + return defaultHandlers.code(state, node); + }, + }, + }); + if (info.docs) { + themedContent.push({ + type: 'element', + tagName: 'div', + properties: { class: 'twoslash-popup-jsdoc' }, + children: hast.children, + }); + } + } + return themedContent; + } + return { + nodeStaticInfo(info, node) { + const themedContent = hightlightPopupContent(this.codeToHast, this.options, info); + if (!themedContent.length) + return node; + return { + type: 'element', + tagName: 'span', + properties: { + class: 'twoslash-hover', + }, + children: [ + { + type: 'element', + tagName: 'div', + properties: { + class: 'twoslash-popup-info-hover', + }, + children: themedContent, + }, + { + type: 'element', + tagName: 'span', + properties: { + class: 'twoslash-target', + }, + children: [node], + }, + ], + }; + }, + nodeQuery(info, node) { + if (!info.text) + return {}; + const themedContent = hightlightPopupContent(this.codeToHast, this.options, info); + return { + type: 'element', + tagName: 'span', + properties: { + class: 'twoslash-query-persisted', + }, + children: [ + { + type: 'element', + tagName: 'span', + properties: { + class: 'twoslash-popup-info', + }, + children: [ + { + type: 'element', + tagName: 'div', + properties: { class: 'twoslash-popup-arrow' }, + children: [], + }, + { + type: 'element', + tagName: 'div', + properties: { class: 'twoslash-popup-scroll-container' }, + children: themedContent, + }, + ], + }, + node, + ], + }; + }, + nodeCompletion(query, node) { + if (node.type !== 'text') + throw new Error(`[shiki-twoslash] nodeCompletion only works on text nodes, got ${node.type}`); + const leftPart = query.completionsPrefix || ''; + const rightPart = node.value.slice(leftPart.length || 0); + return { + type: 'element', + tagName: 'span', + properties: {}, + children: [ + { + type: 'text', + value: leftPart, + }, + { + type: 'element', + tagName: 'span', + properties: { + class: 'twoslash-completion-cursor', + }, + children: [ + { + type: 'element', + tagName: 'div', + properties: { + class: 'twoslash-completion-list', + }, + children: query.completions.map((i) => ({ + type: 'element', + tagName: 'div', + properties: { + class: 'twoslash-completion-list-item', + }, + children: [ + { + type: 'element', + tagName: 'span', + properties: { + class: 'kindModifiers' in i && + typeof i.kindModifiers === 'string' && + i.kindModifiers?.split(',').includes('deprecated') + ? 'deprecated' + : undefined, + }, + children: [ + { + type: 'element', + tagName: 'span', + properties: { class: 'twoslash-completions-matched' }, + children: [ + { + type: 'text', + value: i.name.startsWith(query.completionsPrefix) + ? query.completionsPrefix + : '', + }, + ], + }, + { + type: 'element', + tagName: 'span', + properties: { class: 'twoslash-completions-unmatched' }, + children: [ + { + type: 'text', + value: i.name.startsWith(query.completionsPrefix) + ? i.name.slice(query.completionsPrefix.length || 0) + : i.name, + }, + ], + }, + ], + }, + ], + })), + }, + ], + }, + { + type: 'text', + value: rightPart, + }, + ], + }; + }, + nodeError(_, node) { + return { + type: 'element', + tagName: 'span', + properties: { + class: 'twoslash-error', + }, + children: [node], + }; + }, + lineError(error) { + return [ + { + type: 'element', + tagName: 'div', + properties: { + class: 'twoslash-meta-line twoslash-error-line', + }, + children: [ + { + type: 'text', + value: error.text, + }, + ], + }, + ]; + }, + lineCustomTag(tag) { + return [ + { + type: 'element', + tagName: 'div', + properties: { + class: `twoslash-tag-line twoslash-tag-${tag.name}-line`, + }, + children: [ + { + type: 'text', + value: tag.text || '', + }, + ], + }, + ]; + }, + nodesHighlight(_, nodes) { + return [ + { + type: 'element', + tagName: 'span', + properties: { + class: 'twoslash-highlighted', + }, + children: nodes, + }, + ]; + }, + }; +} +const regexType = /^[A-Z][a-zA-Z0-9_]*(\<[^\>]*\>)?:/; +const regexFunction = /^[a-zA-Z0-9_]*\(/; +/** + * The default hover info processor, which will do some basic cleanup + */ +export function processHoverInfo(type) { + let content = type + // remove leading `(property)` or `(method)` on each line + .replace(/^\(([\w-]+?)\)\s+/gm, '') + // remove import statement + .replace(/\nimport .*$/, '') + // remove interface or namespace lines with only the name + .replace(/^(interface|namespace) \w+$/gm, '') + .trim(); + // Add `type` or `function` keyword if needed + if (content.match(regexType)) + content = `type ${content}`; + else if (content.match(regexFunction)) + content = `function ${content}`; + return content; +} +//# sourceMappingURL=twoslashRenderer.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/twoslashRenderer.js.map b/_lib/vite/plugins/shiki/twoslashRenderer.js.map new file mode 100644 index 00000000..4c15d6f4 --- /dev/null +++ b/_lib/vite/plugins/shiki/twoslashRenderer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"twoslashRenderer.js","sourceRoot":"","sources":["../../../../vite/plugins/shiki/twoslashRenderer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAG5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AAEtE,MAAM,UAAU,gBAAgB;IAC9B,SAAS,sBAAsB,CAC7B,UAAuD,EACvD,YAAsD,EACtD,IAAsC;QAEtC,IAAI,CAAC,IAAI,CAAC,IAAI;YAAE,OAAO,EAAE,CAAA;QAEzB,MAAM,IAAI,GAAG,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAA;QACrD,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;YAAE,OAAO,EAAE,CAAA;QAE3B,MAAM,aAAa,GAEf,UAAU,CAAC,IAAI,EAAE;YACf,GAAG,YAAY;YACf,YAAY,EAAE,CAAC,uBAAuB,EAAE,CAAC;SAC1C,CAAC,CAAC,QAAQ,CAAC,CAAC,CACd,CAAC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AAO,GAAG,QAAQ,OAAO,EAAE,CAAA;SACpD,IAAI,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC;QAAE,OAAO,GAAG,YAAY,OAAO,EAAE,CAAA;IAEtE,OAAO,OAAO,CAAA;AAChB,CAAC"} \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/twoslasher.d.ts b/_lib/vite/plugins/shiki/twoslasher.d.ts new file mode 100644 index 00000000..54feee39 --- /dev/null +++ b/_lib/vite/plugins/shiki/twoslasher.d.ts @@ -0,0 +1,4 @@ +declare const twoslasher_: import("twoslash/dist/shared/twoslash.5646abec.mjs").c; +export declare function twoslasher(...parameters: Parameters): ReturnType; +export {}; +//# sourceMappingURL=twoslasher.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/twoslasher.d.ts.map b/_lib/vite/plugins/shiki/twoslasher.d.ts.map new file mode 100644 index 00000000..ad56bb67 --- /dev/null +++ b/_lib/vite/plugins/shiki/twoslasher.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"twoslasher.d.ts","sourceRoot":"","sources":["../../../../vite/plugins/shiki/twoslasher.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,WAAW,wDAAqB,CAAA;AAEtC,wBAAgB,UAAU,CACxB,GAAG,UAAU,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,GAC5C,UAAU,CAAC,OAAO,WAAW,CAAC,CAqChC"} \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/twoslasher.js b/_lib/vite/plugins/shiki/twoslasher.js new file mode 100644 index 00000000..3dcad163 --- /dev/null +++ b/_lib/vite/plugins/shiki/twoslasher.js @@ -0,0 +1,45 @@ +import { createTwoslasher } from 'twoslash'; +import * as cache from '../../utils/cache.js'; +import { hash } from '../../utils/hash.js'; +const twoslasher_ = createTwoslasher(); +export function twoslasher(...parameters) { + const codeHash = hash(parameters[0]); + if (cache.twoslash.get(codeHash)) + return cache.twoslash.get(codeHash); + try { + const twoslash = twoslasher_(...parameters); + cache.twoslash.set(codeHash, twoslash); + return twoslash; + } + catch (e) { + const error = e; + const lines = parameters[0].split('\n'); + const line = lines.length - 1; + return { + code: parameters[0], + nodes: [ + { + filename: '', + level: 'error', + type: 'error', + code: 0, + length: 100, + start: 0, + line, + character: 0, + text: error.message.replace('\n', ''), + id: '', + }, + ], + // @ts-expect-error + meta: {}, + queries: [], + completions: [], + errors: [], + highlights: [], + hovers: [], + tags: [], + }; + } +} +//# sourceMappingURL=twoslasher.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/shiki/twoslasher.js.map b/_lib/vite/plugins/shiki/twoslasher.js.map new file mode 100644 index 00000000..6eee7c72 --- /dev/null +++ b/_lib/vite/plugins/shiki/twoslasher.js.map @@ -0,0 +1 @@ +{"version":3,"file":"twoslasher.js","sourceRoot":"","sources":["../../../../vite/plugins/shiki/twoslasher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAC3C,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAE1C,MAAM,WAAW,GAAG,gBAAgB,EAAE,CAAA;AAEtC,MAAM,UAAU,UAAU,CACxB,GAAG,UAA0C;IAE7C,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;IACpC,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC;QAAE,OAAO,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;IACrE,IAAI;QACF,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,UAAU,CAAC,CAAA;QAC3C,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;QACtC,OAAO,QAAQ,CAAA;KAChB;IAAC,OAAO,CAAC,EAAE;QACV,MAAM,KAAK,GAAG,CAAU,CAAA;QACxB,MAAM,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QACvC,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAA;QAC7B,OAAO;YACL,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC;YACnB,KAAK,EAAE;gBACL;oBACE,QAAQ,EAAE,EAAE;oBACZ,KAAK,EAAE,OAAO;oBACd,IAAI,EAAE,OAAO;oBACb,IAAI,EAAE,CAAC;oBACP,MAAM,EAAE,GAAG;oBACX,KAAK,EAAE,CAAC;oBACR,IAAI;oBACJ,SAAS,EAAE,CAAC;oBACZ,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;oBACrC,EAAE,EAAE,EAAE;iBACP;aACF;YACD,mBAAmB;YACnB,IAAI,EAAE,EAAE;YACR,OAAO,EAAE,EAAE;YACX,WAAW,EAAE,EAAE;YACf,MAAM,EAAE,EAAE;YACV,UAAU,EAAE,EAAE;YACd,MAAM,EAAE,EAAE;YACV,IAAI,EAAE,EAAE;SACT,CAAA;KACF;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/vite/plugins/virtual-blog.d.ts b/_lib/vite/plugins/virtual-blog.d.ts new file mode 100644 index 00000000..69f6ab9f --- /dev/null +++ b/_lib/vite/plugins/virtual-blog.d.ts @@ -0,0 +1,3 @@ +import { type PluginOption } from 'vite'; +export declare function virtualBlog(): PluginOption; +//# sourceMappingURL=virtual-blog.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/virtual-blog.d.ts.map b/_lib/vite/plugins/virtual-blog.d.ts.map new file mode 100644 index 00000000..58ff4f86 --- /dev/null +++ b/_lib/vite/plugins/virtual-blog.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"virtual-blog.d.ts","sourceRoot":"","sources":["../../../vite/plugins/virtual-blog.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,MAAM,CAAA;AASxC,wBAAgB,WAAW,IAAI,YAAY,CA8F1C"} \ No newline at end of file diff --git a/_lib/vite/plugins/virtual-blog.js b/_lib/vite/plugins/virtual-blog.js new file mode 100644 index 00000000..6d53f484 --- /dev/null +++ b/_lib/vite/plugins/virtual-blog.js @@ -0,0 +1,101 @@ +import { relative, resolve } from 'node:path'; +import { default as fs } from 'fs-extra'; +import { globby } from 'globby'; +import remarkParse from 'remark-parse'; +import { unified } from 'unified'; +import {} from 'vite'; +import { parse } from 'yaml'; +import { resolveVocsConfig } from '../utils/resolveVocsConfig.js'; +import { getRemarkPlugins } from './mdx.js'; +const remarkPlugins = getRemarkPlugins(); +export function virtualBlog() { + const virtualModuleId = 'virtual:blog'; + const resolvedVirtualModuleId = `\0${virtualModuleId}`; + return { + name: 'blog', + resolveId(id) { + if (id === virtualModuleId) + return resolvedVirtualModuleId; + return; + }, + async load(id) { + if (id === resolvedVirtualModuleId) { + const { config } = await resolveVocsConfig(); + const { blogDir, rootDir } = config; + const blogDir_resolved = resolve(rootDir, blogDir); + const files = await globby(`${blogDir_resolved}/**/*.{md,mdx}`); + const posts = []; + for (const file of files) { + if (file.startsWith(`${blogDir_resolved}/index`)) + continue; + const contents = fs.readFileSync(file, 'utf-8'); + const parser = unified().use(remarkParse); + for (const plugin of remarkPlugins) { + parser.use(plugin); + } + const ast = parser.parse(contents); + const frontmatter = (() => { + let frontmatter = {}; + for (const node of ast.children) { + if (node.type === 'yaml') { + frontmatter = parse(node.value); + break; + } + } + return frontmatter; + })(); + let description = (() => { + if (frontmatter.description) + return frontmatter.description; + for (const node of ast.children) { + if (node.type === 'paragraph') { + return node.children[0].value; + } + } + return ''; + })(); + if (description.length > 200) + description = `${description.slice(0, 200)}…`; + const title = (() => { + if (frontmatter.title) + return frontmatter.title; + for (const node of ast.children) { + if (node.type === 'heading' && node.depth === 1) { + return node.children[0].value; + } + } + return ''; + })(); + const date = (() => { + if (frontmatter.date) + return frontmatter.date; + const { mtime } = fs.statSync(file); + return mtime.toISOString(); + })(); + const path = `/${relative(resolve(rootDir, 'pages'), file).replace(/\.(md|mdx)$/, '')}`; + posts.push({ + authors: frontmatter.authors, + date, + description, + path, + title, + }); + } + posts.sort((a, b) => { + if (!a.date) + return 1; + if (!b.date) + return -1; + return new Date(b.date).getTime() - new Date(a.date).getTime(); + }); + return `export const posts = ${JSON.stringify(posts)};`; + } + return; + }, + handleHotUpdate() { + // TODO: handle changes + return; + }, + }; +} +//# sourceMappingURL=virtual-blog.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/virtual-blog.js.map b/_lib/vite/plugins/virtual-blog.js.map new file mode 100644 index 00000000..2e822267 --- /dev/null +++ b/_lib/vite/plugins/virtual-blog.js.map @@ -0,0 +1 @@ +{"version":3,"file":"virtual-blog.js","sourceRoot":"","sources":["../../../vite/plugins/virtual-blog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,WAAW,MAAM,cAAc,CAAA;AACtC,OAAO,EAAe,OAAO,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,EAAqB,MAAM,MAAM,CAAA;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAA;AAG5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAE3C,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAA;AAExC,MAAM,UAAU,WAAW;IACzB,MAAM,eAAe,GAAG,cAAc,CAAA;IACtC,MAAM,uBAAuB,GAAG,KAAK,eAAe,EAAE,CAAA;IAEtD,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,SAAS,CAAC,EAAE;YACV,IAAI,EAAE,KAAK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EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,EAAE,CAAA;oBAEvF,KAAK,CAAC,IAAI,CAAC;wBACT,OAAO,EAAE,WAAW,CAAC,OAAO;wBAC5B,IAAI;wBACJ,WAAW;wBACX,IAAI;wBACJ,KAAK;qBACN,CAAC,CAAA;iBACH;gBAED,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;oBAClB,IAAI,CAAC,CAAC,CAAC,IAAI;wBAAE,OAAO,CAAC,CAAA;oBACrB,IAAI,CAAC,CAAC,CAAC,IAAI;wBAAE,OAAO,CAAC,CAAC,CAAA;oBACtB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAA;gBAChE,CAAC,CAAC,CAAA;gBAEF,OAAO,wBAAwB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAA;aACxD;YACD,OAAM;QACR,CAAC;QACD,eAAe;YACb,uBAAuB;YACvB,OAAM;QACR,CAAC;KACF,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/vite/plugins/virtual-config.d.ts b/_lib/vite/plugins/virtual-config.d.ts new file mode 100644 index 00000000..fb870b41 --- /dev/null +++ b/_lib/vite/plugins/virtual-config.d.ts @@ -0,0 +1,3 @@ +import { type PluginOption } from 'vite'; +export declare function virtualConfig(): PluginOption; +//# sourceMappingURL=virtual-config.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/virtual-config.d.ts.map b/_lib/vite/plugins/virtual-config.d.ts.map new file mode 100644 index 00000000..47c0bb6b --- /dev/null +++ b/_lib/vite/plugins/virtual-config.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"virtual-config.d.ts","sourceRoot":"","sources":["../../../vite/plugins/virtual-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,MAAM,CAAA;AAKxC,wBAAgB,aAAa,IAAI,YAAY,CAmC5C"} \ No newline at end of file diff --git a/_lib/vite/plugins/virtual-config.js b/_lib/vite/plugins/virtual-config.js new file mode 100644 index 00000000..89b70bda --- /dev/null +++ b/_lib/vite/plugins/virtual-config.js @@ -0,0 +1,41 @@ +import {} from 'vite'; +import { deserializeFunctionsStringified, serializeConfig } from '../../config.js'; +import { resolveVocsConfig } from '../utils/resolveVocsConfig.js'; +export function virtualConfig() { + const virtualModuleId = 'virtual:config'; + const resolvedVirtualModuleId = `\0${virtualModuleId}`; + return { + name: 'vocs-config', + async configureServer(server) { + const { configPath } = await resolveVocsConfig(); + if (configPath) { + server.watcher.add(configPath); + server.watcher.on('change', async (path) => { + if (path !== configPath) + return; + server.ws.send('vocs:config', (await resolveVocsConfig()).config); + }); + } + }, + resolveId(id) { + if (id === virtualModuleId) + return resolvedVirtualModuleId; + return; + }, + async load(id) { + if (id === resolvedVirtualModuleId) { + const { config } = await resolveVocsConfig(); + return ` + ${deserializeFunctionsStringified} + + export const config = deserializeFunctions(${serializeConfig(config)})`; + } + return; + }, + handleHotUpdate() { + // TODO: handle changes + return; + }, + }; +} +//# sourceMappingURL=virtual-config.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/virtual-config.js.map b/_lib/vite/plugins/virtual-config.js.map new file mode 100644 index 00000000..bda6fac8 --- /dev/null +++ b/_lib/vite/plugins/virtual-config.js.map @@ -0,0 +1 @@ +{"version":3,"file":"virtual-config.js","sourceRoot":"","sources":["../../../vite/plugins/virtual-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,MAAM,MAAM,CAAA;AAExC,OAAO,EAAE,+BAA+B,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AAEjE,MAAM,UAAU,aAAa;IAC3B,MAAM,eAAe,GAAG,gBAAgB,CAAA;IACxC,MAAM,uBAAuB,GAAG,KAAK,eAAe,EAAE,CAAA;IAEtD,OAAO;QACL,IAAI,EAAE,aAAa;QACnB,KAAK,CAAC,eAAe,CAAC,MAAM;YAC1B,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,iBAAiB,EAAE,CAAA;YAChD,IAAI,UAAU,EAAE;gBACd,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;gBAC9B,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;oBACzC,IAAI,IAAI,KAAK,UAAU;wBAAE,OAAM;oBAC/B,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,MAAM,iBAAiB,EAAE,CAAC,CAAC,MAAM,CAAC,CAAA;gBACnE,CAAC,CAAC,CAAA;aACH;QACH,CAAC;QACD,SAAS,CAAC,EAAE;YACV,IAAI,EAAE,KAAK,eAAe;gBAAE,OAAO,uBAAuB,CAAA;YAC1D,OAAM;QACR,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,KAAK,uBAAuB,EAAE;gBAClC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,iBAAiB,EAAE,CAAA;gBAC5C,OAAO;UACL,+BAA+B;;qDAEY,eAAe,CAAC,MAAM,CAAC,GAAG,CAAA;aACxE;YACD,OAAM;QACR,CAAC;QACD,eAAe;YACb,uBAAuB;YACvB,OAAM;QACR,CAAC;KACF,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/vite/plugins/virtual-consumer-components.d.ts b/_lib/vite/plugins/virtual-consumer-components.d.ts new file mode 100644 index 00000000..4ab21132 --- /dev/null +++ b/_lib/vite/plugins/virtual-consumer-components.d.ts @@ -0,0 +1,3 @@ +import { type PluginOption } from 'vite'; +export declare function virtualConsumerComponents(): PluginOption; +//# sourceMappingURL=virtual-consumer-components.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/virtual-consumer-components.d.ts.map b/_lib/vite/plugins/virtual-consumer-components.d.ts.map new file mode 100644 index 00000000..4dc1e1d1 --- /dev/null +++ b/_lib/vite/plugins/virtual-consumer-components.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"virtual-consumer-components.d.ts","sourceRoot":"","sources":["../../../vite/plugins/virtual-consumer-components.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,MAAM,CAAA;AAIxC,wBAAgB,yBAAyB,IAAI,YAAY,CAqBxD"} \ No newline at end of file diff --git a/_lib/vite/plugins/virtual-consumer-components.js b/_lib/vite/plugins/virtual-consumer-components.js new file mode 100644 index 00000000..4feaabb7 --- /dev/null +++ b/_lib/vite/plugins/virtual-consumer-components.js @@ -0,0 +1,32 @@ +import { existsSync } from 'node:fs'; +import { resolve } from 'node:path'; +import {} from 'vite'; +import { resolveVocsConfig } from '../utils/resolveVocsConfig.js'; +export function virtualConsumerComponents() { + const virtualModuleId = 'virtual:consumer-components'; + const resolvedVirtualModuleId = `\0${virtualModuleId}`; + return { + name: 'routes', + resolveId(id) { + if (id === virtualModuleId) + return resolvedVirtualModuleId; + return; + }, + async load(id) { + if (id !== resolvedVirtualModuleId) + return; + const { config } = await resolveVocsConfig(); + const { rootDir } = config; + return ` + ${exportComponent(resolve(rootDir, 'layout.tsx'), 'Layout')} + ${exportComponent(resolve(rootDir, 'footer.tsx'), 'Footer')} + `; + }, + }; +} +function exportComponent(path, name) { + if (existsSync(path)) + return `export { default as ${name} } from "${path}";`; + return `export const ${name} = ({ children }) => children;`; +} +//# sourceMappingURL=virtual-consumer-components.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/virtual-consumer-components.js.map b/_lib/vite/plugins/virtual-consumer-components.js.map new file mode 100644 index 00000000..9fc734d8 --- /dev/null +++ b/_lib/vite/plugins/virtual-consumer-components.js.map @@ -0,0 +1 @@ +{"version":3,"file":"virtual-consumer-components.js","sourceRoot":"","sources":["../../../vite/plugins/virtual-consumer-components.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAqB,MAAM,MAAM,CAAA;AAExC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AAEjE,MAAM,UAAU,yBAAyB;IACvC,MAAM,eAAe,GAAG,6BAA6B,CAAA;IACrD,MAAM,uBAAuB,GAAG,KAAK,eAAe,EAAE,CAAA;IAEtD,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,SAAS,CAAC,EAAE;YACV,IAAI,EAAE,KAAK,eAAe;gBAAE,OAAO,uBAAuB,CAAA;YAC1D,OAAM;QACR,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,KAAK,uBAAuB;gBAAE,OAAM;YAE1C,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,iBAAiB,EAAE,CAAA;YAC5C,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAA;YAC1B,OAAO;UACH,eAAe,CAAC,OAAO,CAAC,OAAO,EAAE,YAAY,CAAC,EAAE,QAAQ,CAAC;UACzD,eAAe,CAAC,OAAO,CAAC,OAAO,EAAE,YAAY,CAAC,EAAE,QAAQ,CAAC;OAC5D,CAAA;QACH,CAAC;KACF,CAAA;AACH,CAAC;AAED,SAAS,eAAe,CAAC,IAAY,EAAE,IAAY;IACjD,IAAI,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,uBAAuB,IAAI,YAAY,IAAI,IAAI,CAAA;IAC5E,OAAO,gBAAgB,IAAI,gCAAgC,CAAA;AAC7D,CAAC"} \ No newline at end of file diff --git a/_lib/vite/plugins/virtual-routes.d.ts b/_lib/vite/plugins/virtual-routes.d.ts new file mode 100644 index 00000000..6dd99181 --- /dev/null +++ b/_lib/vite/plugins/virtual-routes.d.ts @@ -0,0 +1,3 @@ +import type { PluginOption } from 'vite'; +export declare function virtualRoutes(): PluginOption; +//# sourceMappingURL=virtual-routes.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/virtual-routes.d.ts.map b/_lib/vite/plugins/virtual-routes.d.ts.map new file mode 100644 index 00000000..3d3017e2 --- /dev/null +++ b/_lib/vite/plugins/virtual-routes.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"virtual-routes.d.ts","sourceRoot":"","sources":["../../../vite/plugins/virtual-routes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAKxC,wBAAgB,aAAa,IAAI,YAAY,CAiE5C"} \ No newline at end of file diff --git a/_lib/vite/plugins/virtual-routes.js b/_lib/vite/plugins/virtual-routes.js new file mode 100644 index 00000000..44071d37 --- /dev/null +++ b/_lib/vite/plugins/virtual-routes.js @@ -0,0 +1,67 @@ +import { extname, resolve } from 'node:path'; +import { globby } from 'globby'; +import { resolveVocsConfig } from '../utils/resolveVocsConfig.js'; +import { getGitTimestamp } from '../utils/getGitTimestamp.js'; +export function virtualRoutes() { + const virtualModuleId = 'virtual:routes'; + const resolvedVirtualModuleId = `\0${virtualModuleId}`; + let glob; + let paths = []; + return { + name: 'routes', + async configureServer(server) { + const { config } = await resolveVocsConfig(); + const { rootDir } = config; + const pagesPath = resolve(rootDir, 'pages'); + if (pagesPath) { + server.watcher.add(pagesPath); + server.watcher.on('add', () => server.restart()); + server.watcher.on('unlink', () => server.restart()); + } + }, + resolveId(id) { + if (id === virtualModuleId) + return resolvedVirtualModuleId; + return; + }, + async load(id) { + if (id === resolvedVirtualModuleId) { + const { config } = await resolveVocsConfig(); + const { rootDir } = config; + const pagesPath = resolve(rootDir, 'pages'); + let code = 'export const routes = ['; + for (const path of paths) { + const type = extname(path).match(/(mdx|md)/) ? 'mdx' : 'jsx'; + const replacer = glob.split('*')[0]; + const filePath = path.replace(`${pagesPath}/`, ''); + const fileGitTimestamp = await getGitTimestamp(path); + // fileGitTimestamp can be `NaN` when not in git repo + let lastUpdatedAt; + if (fileGitTimestamp) + lastUpdatedAt = fileGitTimestamp; + let pagePath = path.replace(replacer, '').replace(/\.(.*)/, ''); + if (pagePath.endsWith('index')) + pagePath = pagePath.replace('index', '').replace(/\/$/, ''); + code += ` { lazy: () => import("${path}"), path: "/${pagePath}", type: "${type}", filePath: "${filePath}", lastUpdatedAt: ${lastUpdatedAt} },`; + if (pagePath) + code += ` { lazy: () => import("${path}"), path: "/${pagePath}.html", type: "${type}", filePath: "${filePath}", lastUpdatedAt: ${lastUpdatedAt} },`; + } + code += ']'; + return code; + } + return; + }, + async buildStart() { + const { config } = await resolveVocsConfig(); + const { rootDir } = config; + const pagesPath = resolve(rootDir, 'pages'); + glob = `${pagesPath}/**/*.{md,mdx,ts,tsx,js,jsx}`; + paths = await globby(glob); + }, + handleHotUpdate() { + // TODO: handle changes + return; + }, + }; +} +//# sourceMappingURL=virtual-routes.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/virtual-routes.js.map b/_lib/vite/plugins/virtual-routes.js.map new file mode 100644 index 00000000..b37bbac5 --- /dev/null +++ b/_lib/vite/plugins/virtual-routes.js.map @@ -0,0 +1 @@ +{"version":3,"file":"virtual-routes.js","sourceRoot":"","sources":["../../../vite/plugins/virtual-routes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAG/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAE7D,MAAM,UAAU,aAAa;IAC3B,MAAM,eAAe,GAAG,gBAAgB,CAAA;IACxC,MAAM,uBAAuB,GAAG,KAAK,eAAe,EAAE,CAAA;IAEtD,IAAI,IAAY,CAAA;IAChB,IAAI,KAAK,GAAa,EAAE,CAAA;IAExB,OAAO;QACL,IAAI,EAAE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"} \ No newline at end of file diff --git a/_lib/vite/plugins/virtual-styles.d.ts b/_lib/vite/plugins/virtual-styles.d.ts new file mode 100644 index 00000000..65fb01a8 --- /dev/null +++ b/_lib/vite/plugins/virtual-styles.d.ts @@ -0,0 +1,3 @@ +import { type PluginOption } from 'vite'; +export declare function virtualStyles(): PluginOption; +//# sourceMappingURL=virtual-styles.d.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/virtual-styles.d.ts.map b/_lib/vite/plugins/virtual-styles.d.ts.map new file mode 100644 index 00000000..62ecc3ac --- /dev/null +++ b/_lib/vite/plugins/virtual-styles.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"virtual-styles.d.ts","sourceRoot":"","sources":["../../../vite/plugins/virtual-styles.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,MAAM,CAAA;AAOxC,wBAAgB,aAAa,IAAI,YAAY,CAwC5C"} \ No newline at end of file diff --git a/_lib/vite/plugins/virtual-styles.js b/_lib/vite/plugins/virtual-styles.js new file mode 100644 index 00000000..8a98f41b --- /dev/null +++ b/_lib/vite/plugins/virtual-styles.js @@ -0,0 +1,91 @@ +import { existsSync } from 'node:fs'; +import { dirname, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { default as fs } from 'fs-extra'; +import {} from 'vite'; +import { resolveVocsConfig } from '../utils/resolveVocsConfig.js'; +const __dirname = dirname(fileURLToPath(import.meta.url)); +export function virtualStyles() { + const virtualModuleId = 'virtual:styles'; + const resolvedVirtualModuleId = `\0${virtualModuleId}`; + return { + name: 'styles', + async buildStart() { + const { config } = await resolveVocsConfig(); + const { theme } = config; + createThemeStyles({ theme }); + }, + async configureServer(server) { + const { configPath } = await resolveVocsConfig(); + if (configPath) { + server.watcher.add(configPath); + server.watcher.on('change', async (path) => { + if (path !== configPath) + return; + const { config } = await resolveVocsConfig(); + const { theme } = config; + createThemeStyles({ theme }); + }); + } + }, + resolveId(id) { + if (id === virtualModuleId) + return resolvedVirtualModuleId; + return; + }, + async load(id) { + if (id !== resolvedVirtualModuleId) + return; + const { config } = await resolveVocsConfig(); + const { rootDir } = config; + const themeStyles = resolve(__dirname, '../.vocs/theme.css'); + const rootStyles = resolve(rootDir, 'styles.css'); + let code = ''; + if (existsSync(themeStyles)) + code += `import "${themeStyles}";`; + if (existsSync(rootStyles)) + code += `import "${rootStyles}";`; + return code; + }, + }; +} +function createThemeStyles({ theme }) { + const themeFile = resolve(__dirname, '../.vocs/theme.css'); + if (fs.existsSync(themeFile)) + fs.rmSync(themeFile); + if (!theme) + return; + fs.createFileSync(themeFile); + function createVars(variables) { + let code = ''; + for (const scope in variables) { + for (const name in variables[scope]) { + const value = variables[scope][name]; + if (typeof value === 'string') + code += `:root { --vocs-${scope}_${name}: ${value}; }\n:root.dark { --vocs-${scope}_${name}: ${value}; }\n`; + else { + if (value?.light) + code += `:root { --vocs-${scope}_${name}: ${value.light}; }\n`; + if (value?.dark) + code += `:root.dark { --vocs-${scope}_${name}: ${value.dark}; }\n`; + } + } + } + return code; + } + const { accentColor, variables } = theme; + if (accentColor) + fs.appendFileSync(themeFile, createVars({ + color: { + backgroundAccent: accentColor.backgroundAccent, + backgroundAccentHover: accentColor.backgroundAccentHover, + backgroundAccentText: accentColor.backgroundAccentText, + borderAccent: accentColor.borderAccent, + textAccent: accentColor.textAccent, + textAccentHover: accentColor.textAccentHover, + }, + })); + if (variables) + fs.appendFileSync(themeFile, createVars(variables)); +} +//# sourceMappingURL=virtual-styles.js.map \ No newline at end of file diff --git a/_lib/vite/plugins/virtual-styles.js.map b/_lib/vite/plugins/virtual-styles.js.map new file mode 100644 index 00000000..4c3bfef2 --- /dev/null +++ b/_lib/vite/plugins/virtual-styles.js.map @@ -0,0 +1 @@ +{"version":3,"file":"virtual-styles.js","sourceRoot":"","sources":["../../../vite/plugins/virtual-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,OAA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AK,KAAK,QAAQ;oBAC3B,IAAI,IAAI,kBAAkB,KAAK,IAAI,IAAI,KAAK,KAAK,4BAA4B,KAAK,IAAI,IAAI,KAAK,KAAK,OAAO,CAAA;qBACxG;oBACH,IAAI,KAAK,EAAE,KAAK;wBAAE,IAAI,IAAI,kBAAkB,KAAK,IAAI,IAAI,KAAK,KAAK,CAAC,KAAK,OAAO,CAAA;oBAChF,IAAI,KAAK,EAAE,IAAI;wBAAE,IAAI,IAAI,uBAAuB,KAAK,IAAI,IAAI,KAAK,KAAK,CAAC,IAAI,OAAO,CAAA;iBACpF;aACF;SACF;QACD,OAAO,IAAI,CAAA;IACb,CAAC;IAED,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,KAAK,CAAA;IAExC,IAAI,WAAW;QACb,EAAE,CAAC,cAAc,CACf,SAAS,EACT,UAAU,CAAC;YACT,KAAK,EAAE;gBACL,gBAAgB,EAAE,WAAW,CAAC,gBAAgB;gBAC9C,qBAAqB,EAAE,WAAW,CAAC,qBAAqB;gBACxD,oBAAoB,EAAE,WAAW,CAAC,oBAAoB;gBACtD,YAAY,EAAE,WAAW,CAAC,YAAY;gBACtC,UAAU,EAAE,WAAW,CAAC,UAAU;gBAClC,eAAe,EAAE,WAAW,CAAC,eAAe;aAC7C;SACF,CAAC,CACH,CAAA;IACH,IAAI,SAAS;QAAE,EAAE,CAAC,cAAc,CAAC,SAAS,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,CAAA;AACpE,CAAC"} \ No newline at end of file diff --git a/_lib/vite/prerender.d.ts b/_lib/vite/prerender.d.ts new file mode 100644 index 00000000..00539e10 --- /dev/null +++ b/_lib/vite/prerender.d.ts @@ -0,0 +1,8 @@ +import type { Logger } from 'vite'; +type PrerenderParameters = { + logger?: Logger; + outDir?: string; +}; +export declare function prerender({ logger, outDir }: PrerenderParameters): Promise; +export {}; +//# sourceMappingURL=prerender.d.js.map \ No newline at end of file diff --git a/_lib/vite/prerender.d.ts.map b/_lib/vite/prerender.d.ts.map new file mode 100644 index 00000000..fc8eb679 --- /dev/null +++ b/_lib/vite/prerender.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"prerender.d.ts","sourceRoot":"","sources":["../../vite/prerender.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAIlC,KAAK,mBAAmB,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAI/D,wBAAsB,SAAS,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,mBAAmB,iBAwCtE"} \ No newline at end of file diff --git a/_lib/vite/prerender.js b/_lib/vite/prerender.js new file mode 100644 index 00000000..c0b0fded --- /dev/null +++ b/_lib/vite/prerender.js @@ -0,0 +1,71 @@ +import { mkdirSync, readFileSync, readdirSync, writeFileSync } from 'node:fs'; +import { dirname, relative, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import pc from 'picocolors'; +import { resolveOutDir } from './utils/resolveOutDir.js'; +import { resolveVocsConfig } from './utils/resolveVocsConfig.js'; +const __dirname = dirname(fileURLToPath(import.meta.url)); +export async function prerender({ logger, outDir }) { + const { config } = await resolveVocsConfig(); + const { basePath, rootDir, theme } = config; + const outDir_resolved = resolveOutDir(rootDir, outDir); + const template = readFileSync(resolve(outDir_resolved, 'index.html'), 'utf-8'); + const mod = await import(resolve(__dirname, './.vocs/dist/index.server.js')); + // Get routes to prerender. + const routes = getRoutes(resolve(rootDir, 'pages')); + // Prerender each route. + for (const route of routes) { + const { head, body } = await mod.prerender(route); + let html = template + .replace('', body) + .replace('', head) + .replace('../app/utils/initializeTheme.js', `${basePath}/initializeTheme.iife.js`); + if (theme?.colorScheme && theme?.colorScheme !== 'system') + html = html.replace('lang="en"', `lang="en" class="${theme.colorScheme}"`); + const isIndex = route.endsWith('/'); + const filePath = `${isIndex ? `${route}index` : route}.html`.replace(/^\//, ''); + const path = resolve(outDir_resolved, filePath); + const pathDir = dirname(path); + if (!isDir(pathDir)) + mkdirSync(pathDir, { recursive: true }); + if (isIndex) + writeFileSync(path, html); + else { + const path = resolve(outDir_resolved, route.slice(1)); + if (!isDir(path)) + mkdirSync(path, { recursive: true }); + writeFileSync(resolve(path, 'index.html'), html); + } + const fileName = path.split('/').pop(); + logger?.info(`${pc.dim(relative(rootDir, path).replace(fileName, ''))}${pc.cyan(fileName)}`); + } + logger?.info(`\n${pc.green('✓')} ${routes.length} pages prerendered.`); +} +//////////////////////////////////////////////////////////////////////// +// Utils +function getRoutes(routesDir) { + const routes = []; + function recurseRoutes(dir) { + for (const fileOrDir of readdirSync(dir)) { + const path = resolve(dir, fileOrDir); + if (isDir(path)) { + recurseRoutes(path); + continue; + } + const file = path.replace(routesDir, '').replace(/\..*$/, ''); + routes.push(file.endsWith('/index') ? file.replace('index', '') : file); + } + } + recurseRoutes(routesDir); + return routes; +} +function isDir(dir) { + try { + readdirSync(dir); + return true; + } + catch { + return false; + } +} +//# sourceMappingURL=prerender.js.map \ No newline at end of file diff --git a/_lib/vite/prerender.js.map b/_lib/vite/prerender.js.map new file mode 100644 index 00000000..e02e11b8 --- /dev/null +++ b/_lib/vite/prerender.js.map @@ -0,0 +1 @@ +{"version":3,"file":"prerender.js","sourceRoot":"","sources":["../../vite/prerender.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC7E,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,MAAM,YAAY,CAAA;AAE3B,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAIhE,MAAM,SAAS,GAAG,OAAO,CAA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MAAM,GAAa,EAAE,CAAA;IAE3B,SAAS,aAAa,CAAC,GAAW;QAChC,KAAK,MAAM,SAAS,IAAI,WAAW,CAAC,GAAG,CAAC,EAAE;YACxC,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,SAAS,CAAC,CAAA;YACpC,IAAI,KAAK,CAAC,IAAI,CAAC,EAAE;gBACf,aAAa,CAAC,IAAI,CAAC,CAAA;gBACnB,SAAQ;aACT;YACD,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;YAC7D,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;SACxE;IACH,CAAC;IACD,aAAa,CAAC,SAAS,CAAC,CAAA;IAExB,OAAO,MAAM,CAAA;AACf,CAAC;AAED,SAAS,KAAK,CAAC,GAAW;IACxB,IAAI;QACF,WAAW,CAAC,GAAG,CAAC,CAAA;QAChB,OAAO,IAAI,CAAA;KACZ;IAAC,MAAM;QACN,OAAO,KAAK,CAAA;KACb;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/vite/preview.d.ts b/_lib/vite/preview.d.ts new file mode 100644 index 00000000..b8f20fbc --- /dev/null +++ b/_lib/vite/preview.d.ts @@ -0,0 +1,8 @@ +type PreviewParameters = { + outDir?: string; +}; +export declare function preview({ outDir }?: PreviewParameters): Promise; +export {}; +//# sourceMappingURL=preview.d.js.map \ No newline at end of file diff --git a/_lib/vite/preview.d.ts.map b/_lib/vite/preview.d.ts.map new file mode 100644 index 00000000..b39691e9 --- /dev/null +++ b/_lib/vite/preview.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../vite/preview.ts"],"names":[],"mappings":"AAQA,KAAK,iBAAiB,GAAG;IACvB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,wBAAsB,OAAO,CAAC,EAAE,MAAe,EAAE,GAAE,iBAAsB;UAiBjB,MAAM;GAkB7D"} \ No newline at end of file diff --git a/_lib/vite/preview.js b/_lib/vite/preview.js new file mode 100644 index 00000000..f1c9a61e --- /dev/null +++ b/_lib/vite/preview.js @@ -0,0 +1,36 @@ +import { resolve } from 'node:path'; +import { serve } from '@hono/node-server'; +import { Hono } from 'hono'; +import { compress } from 'hono/compress'; +import { resolveVocsConfig } from './utils/resolveVocsConfig.js'; +import { serveStatic } from './utils/serveStatic.js'; +export async function preview({ outDir = 'dist' } = {}) { + const { config } = await resolveVocsConfig(); + const { basePath, rootDir } = config; + const app = new Hono(); + app.use('*', compress()); + app.use('/*', serveStatic({ + root: resolve(rootDir, outDir), + rewriteRequestPath(path) { + return basePath ? path.replace(basePath, '') : path; + }, + })); + return new Promise((res) => { + async function createServer(port = 4173) { + process.on('uncaughtException', (err) => { + if (err.code !== 'EADDRINUSE') + throw err; + process.removeAllListeners(); + createServer(port + 1); + }); + const server = serve({ + fetch: app.fetch, + port, + }).on('listening', () => { + res(Object.assign(server, { port })); + }); + } + createServer(); + }); +} +//# sourceMappingURL=preview.js.map \ No newline at end of file diff --git a/_lib/vite/preview.js.map b/_lib/vite/preview.js.map new file mode 100644 index 00000000..a408320f --- /dev/null +++ b/_lib/vite/preview.js.map @@ -0,0 +1 @@ +{"version":3,"file":"preview.js","sourceRoot":"","sources":["../../vite/preview.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,C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AAC,CAAC,CAAA;YACtC,CAAC,CAAC,CAAA;QACJ,CAAC;QAED,YAAY,EAAE,CAAA;IAChB,CAAC,CAAC,CAAA;AACJ,CAAC"} \ No newline at end of file diff --git a/_lib/vite/utils/cache.d.ts b/_lib/vite/utils/cache.d.ts new file mode 100644 index 00000000..8e0214ad --- /dev/null +++ b/_lib/vite/utils/cache.d.ts @@ -0,0 +1,24 @@ +export declare const search: { + get(key: string): any; + set(key: string, value: v): void; + delete(key: string): void; + clear(): void; +}; +export declare const twoslash: { + get(key: string): any; + set(key: string, value: v): void; + delete(key: string): void; + clear(): void; +}; +export declare function create(key: string, { cacheDir }?: { + cacheDir?: string; +}): { + get(key: string): any; + set(key: string, value: v): void; + delete(key: string): void; + clear(): void; +}; +export declare function clear({ cacheDir, }?: { + cacheDir?: string; +}): void; +//# sourceMappingURL=cache.d.js.map \ No newline at end of file diff --git a/_lib/vite/utils/cache.d.ts.map b/_lib/vite/utils/cache.d.ts.map new file mode 100644 index 00000000..293de932 --- /dev/null +++ b/_lib/vite/utils/cache.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../vite/utils/cache.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,MAAM;aAsBN,MAAM;gBAIH,MAAM;gBAKN,MAAM;;CA/BgB,CAAA;AACtC,eAAO,MAAM,QAAQ;aAqBR,MAAM;gBAIH,MAAM;gBAKN,MAAM;;CA9BoB,CAAA;AAE1C,wBAAgB,MAAM,CACpB,GAAG,EAAE,MAAM,EACX,EAAE,QAA+C,EAAE,GAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAO;aAiBpE,MAAM;gBAIH,MAAM;gBAKN,MAAM;;EAUrB;AAED,wBAAgB,KAAK,CAAC,EACpB,QAA+C,GAChD,GAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAO,QAG5B"} \ No newline at end of file diff --git a/_lib/vite/utils/cache.js b/_lib/vite/utils/cache.js new file mode 100644 index 00000000..62d018ed --- /dev/null +++ b/_lib/vite/utils/cache.js @@ -0,0 +1,49 @@ +import { dirname, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { default as fs } from 'fs-extra'; +const __dirname = dirname(fileURLToPath(import.meta.url)); +export const search = create('search'); +export const twoslash = create('twoslash'); +export function create(key, { cacheDir = resolve(__dirname, '../.vocs/cache') } = {}) { + let cache = new Map(); + let hydrated = false; + function hydrate() { + const data = fs.readJSONSync(resolve(cacheDir, `${key}.json`), { throws: false }); + if (data) + cache = new Map(JSON.parse(data)); + hydrated = true; + } + function save() { + fs.ensureDirSync(cacheDir); + fs.writeJSONSync(resolve(cacheDir, `${key}.json`), JSON.stringify([...cache])); + } + return { + get(key) { + if (!hydrated) + hydrate(); + return cache.get(key); + }, + set(key, value) { + if (!hydrated) + hydrate(); + cache.set(key, value); + save(); + }, + delete(key) { + if (!hydrated) + hydrate(); + cache.delete(key); + save(); + }, + clear() { + cache.clear(); + save(); + }, + }; +} +export function clear({ cacheDir = resolve(__dirname, '../.vocs/cache'), } = {}) { + if (!fs.existsSync(cacheDir)) + return; + fs.rmSync(cacheDir, { recursive: true }); +} +//# sourceMappingURL=cache.js.map \ No newline at end of file diff --git a/_lib/vite/utils/cache.js.map b/_lib/vite/utils/cache.js.map new file mode 100644 index 00000000..abe280f5 --- /dev/null +++ b/_lib/vite/utils/cache.js.map @@ -0,0 +1 @@ +{"version":3,"file":"cache.js","sourceRoot":"","sources":["../../../vite/utils/cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,MAAM,UAAU,CAAA;AAExC,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;AAEzD,MAAM,CAA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AAQ;gBAAE,OAAO,EAAE,CAAA;YACxB,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;YACjB,IAAI,EAAE,CAAA;QACR,CAAC;QACD,KAAK;YACH,KAAK,CAAC,KAAK,EAAE,CAAA;YACb,IAAI,EAAE,CAAA;QACR,CAAC;KACF,CAAA;AACH,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,EACpB,QAAQ,GAAG,OAAO,CAAC,SAAS,EAAE,gBAAgB,CAAC,MACtB,EAAE;IAC3B,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;QAAE,OAAM;IACpC,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;AAC1C,CAAC"} \ No newline at end of file diff --git a/_lib/vite/utils/getGitTimestamp.d.ts b/_lib/vite/utils/getGitTimestamp.d.ts new file mode 100644 index 00000000..7a3d7af7 --- /dev/null +++ b/_lib/vite/utils/getGitTimestamp.d.ts @@ -0,0 +1,2 @@ +export declare function getGitTimestamp(file: string): number | Promise; +//# sourceMappingURL=getGitTimestamp.d.js.map \ No newline at end of file diff --git a/_lib/vite/utils/getGitTimestamp.d.ts.map b/_lib/vite/utils/getGitTimestamp.d.ts.map new file mode 100644 index 00000000..be35153e --- /dev/null +++ b/_lib/vite/utils/getGitTimestamp.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getGitTimestamp.d.ts","sourceRoot":"","sources":["../../../vite/utils/getGitTimestamp.ts"],"names":[],"mappings":"AAMA,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,4BAoB3C"} \ No newline at end of file diff --git a/_lib/vite/utils/getGitTimestamp.js b/_lib/vite/utils/getGitTimestamp.js new file mode 100644 index 00000000..ea2cbb67 --- /dev/null +++ b/_lib/vite/utils/getGitTimestamp.js @@ -0,0 +1,27 @@ +import { spawn } from 'cross-spawn'; +import fs from 'fs-extra'; +import { basename, dirname } from 'path'; +const cache = new Map(); +export function getGitTimestamp(file) { + const cached = cache.get(file); + if (cached) + return cached; + return new Promise((resolve, reject) => { + const cwd = dirname(file); + if (!fs.existsSync(cwd)) + return resolve(0); + const fileName = basename(file); + const child = spawn('git', ['log', '-1', '--pretty="%ai"', fileName], { + cwd, + }); + let output = ''; + child.stdout.on('data', (d) => (output += String(d))); + child.on('close', () => { + const timestamp = +new Date(output); + cache.set(file, timestamp); + resolve(timestamp); + }); + child.on('error', reject); + }); +} +//# sourceMappingURL=getGitTimestamp.js.map \ No newline at end of file diff --git a/_lib/vite/utils/getGitTimestamp.js.map b/_lib/vite/utils/getGitTimestamp.js.map new file mode 100644 index 00000000..1b3c2744 --- /dev/null +++ b/_lib/vite/utils/getGitTimestamp.js.map @@ -0,0 +1 @@ +{"version":3,"file":"getGitTimestamp.js","sourceRoot":"","sources":["../../../vite/utils/getGitTimestamp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACnC,OAAO,EAAE,MAAM,UAAU,CAAA;AACzB,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAExC,MAAM,KAAK,GAAG,IAAI,GAAG,EAAkB,CAAA;AAEvC,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;IAC9B,IAAI,MAAM;QAAE,OAAO,MAAM,CAAA;IAEzB,OAAO,IAAI,OAAO,CAAS,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC7C,MAAM,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;QACzB,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC;YAAE,OAAO,OAAO,CAAC,CAAC,CAAC,CAAA;QAC1C,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAA;QAC/B,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,QAAQ,CAAC,EAAE;YACpE,GAAG;SACJ,CAAC,CAAA;QACF,IAAI,MAAM,GAAG,EAAE,CAAA;QACf,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QACrD,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;YACrB,MAAM,SAAS,GAAG,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,CAAA;YACnC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;YAC1B,OAAO,CAAC,SAAS,CAAC,CAAA;QACpB,CAAC,CAAC,CAAA;QACF,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;IAC3B,CAAC,CAAC,CAAA;AACJ,CAAC"} \ No newline at end of file diff --git a/_lib/vite/utils/hash.d.ts b/_lib/vite/utils/hash.d.ts new file mode 100644 index 00000000..f7d7d198 --- /dev/null +++ b/_lib/vite/utils/hash.d.ts @@ -0,0 +1,3 @@ +/// +export declare function hash(text: Buffer | string, length?: number): string; +//# sourceMappingURL=hash.d.js.map \ No newline at end of file diff --git a/_lib/vite/utils/hash.d.ts.map b/_lib/vite/utils/hash.d.ts.map new file mode 100644 index 00000000..0ca8a9de --- /dev/null +++ b/_lib/vite/utils/hash.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"hash.d.ts","sourceRoot":"","sources":["../../../vite/utils/hash.ts"],"names":[],"mappings":";AAEA,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAInE"} \ No newline at end of file diff --git a/_lib/vite/utils/hash.js b/_lib/vite/utils/hash.js new file mode 100644 index 00000000..8b233c08 --- /dev/null +++ b/_lib/vite/utils/hash.js @@ -0,0 +1,8 @@ +import { createHash } from 'node:crypto'; +export function hash(text, length) { + let hash = createHash('sha256').update(text).digest('hex'); + if (length) + hash = hash.substring(0, length); + return hash; +} +//# sourceMappingURL=hash.js.map \ No newline at end of file diff --git a/_lib/vite/utils/hash.js.map b/_lib/vite/utils/hash.js.map new file mode 100644 index 00000000..eb3ac92a --- /dev/null +++ b/_lib/vite/utils/hash.js.map @@ -0,0 +1 @@ +{"version":3,"file":"hash.js","sourceRoot":"","sources":["../../../vite/utils/hash.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAExC,MAAM,UAAU,IAAI,CAAC,IAAqB,EAAE,MAAe;IACzD,IAAI,IAAI,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IAC1D,IAAI,MAAM;QAAE,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;IAC5C,OAAO,IAAI,CAAA;AACb,CAAC"} \ No newline at end of file diff --git a/_lib/vite/utils/resolveOutDir.d.ts b/_lib/vite/utils/resolveOutDir.d.ts new file mode 100644 index 00000000..959e33d4 --- /dev/null +++ b/_lib/vite/utils/resolveOutDir.d.ts @@ -0,0 +1,2 @@ +export declare function resolveOutDir(rootDir: string, outDir?: string): string; +//# sourceMappingURL=resolveOutDir.d.js.map \ No newline at end of file diff --git a/_lib/vite/utils/resolveOutDir.d.ts.map b/_lib/vite/utils/resolveOutDir.d.ts.map new file mode 100644 index 00000000..140b5a60 --- /dev/null +++ b/_lib/vite/utils/resolveOutDir.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"resolveOutDir.d.ts","sourceRoot":"","sources":["../../../vite/utils/resolveOutDir.ts"],"names":[],"mappings":"AAGA,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,UAO7D"} \ No newline at end of file diff --git a/_lib/vite/utils/resolveOutDir.js b/_lib/vite/utils/resolveOutDir.js new file mode 100644 index 00000000..91b6d908 --- /dev/null +++ b/_lib/vite/utils/resolveOutDir.js @@ -0,0 +1,12 @@ +import { resolve } from 'node:path'; +import { vercelBuildOutputDir } from './vercel.js'; +export function resolveOutDir(rootDir, outDir) { + if (typeof outDir === 'undefined') { + // If we're in a Vercel environment, use the Vercel Build Output directory. + // https://vercel.com/docs/build-output-api/v3 + if (process.env.VERCEL) + return resolve(vercelBuildOutputDir, 'static'); + } + return resolve(rootDir, outDir ?? 'dist'); +} +//# sourceMappingURL=resolveOutDir.js.map \ No newline at end of file diff --git a/_lib/vite/utils/resolveOutDir.js.map b/_lib/vite/utils/resolveOutDir.js.map new file mode 100644 index 00000000..876d565e --- /dev/null +++ b/_lib/vite/utils/resolveOutDir.js.map @@ -0,0 +1 @@ +{"version":3,"file":"resolveOutDir.js","sourceRoot":"","sources":["../../../vite/utils/resolveOutDir.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAElD,MAAM,UAAU,aAAa,CAAC,OAAe,EAAE,MAAe;IAC5D,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QACjC,2EAA2E;QAC3E,8CAA8C;QAC9C,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM;YAAE,OAAO,OAAO,CAAC,oBAAoB,EAAE,QAAQ,CAAC,CAAA;KACvE;IACD,OAAO,OAAO,CAAC,OAAO,EAAE,MAAM,IAAI,MAAM,CAAC,CAAA;AAC3C,CAAC"} \ No newline at end of file diff --git a/_lib/vite/utils/resolveVocsConfig.d.ts b/_lib/vite/utils/resolveVocsConfig.d.ts new file mode 100644 index 00000000..dde34631 --- /dev/null +++ b/_lib/vite/utils/resolveVocsConfig.d.ts @@ -0,0 +1,13 @@ +import { type ConfigEnv } from 'vite'; +import { type ParsedConfig } from '../../config.js'; +type ResolveVocsConfigParameters = { + command?: ConfigEnv['command']; + configPath?: string; + mode?: ConfigEnv['mode']; +}; +export declare function resolveVocsConfig(parameters?: ResolveVocsConfigParameters): Promise<{ + config: ParsedConfig; + configPath: string | undefined; +}>; +export {}; +//# sourceMappingURL=resolveVocsConfig.d.js.map \ No newline at end of file diff --git a/_lib/vite/utils/resolveVocsConfig.d.ts.map b/_lib/vite/utils/resolveVocsConfig.d.ts.map new file mode 100644 index 00000000..d71c21df --- /dev/null +++ b/_lib/vite/utils/resolveVocsConfig.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"resolveVocsConfig.d.ts","sourceRoot":"","sources":["../../../vite/utils/resolveVocsConfig.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAAsB,MAAM,MAAM,CAAA;AACzD,OAAO,EAAE,KAAK,YAAY,EAAkC,MAAM,iBAAiB,CAAA;AAOnF,KAAK,2BAA2B,GAAG;IACjC,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAA;CACzB,CAAA;AAED,wBAAsB,iBAAiB,CAAC,UAAU,GAAE,2BAAgC;;;GAwCnF"} \ No newline at end of file diff --git a/_lib/vite/utils/resolveVocsConfig.js b/_lib/vite/utils/resolveVocsConfig.js new file mode 100644 index 00000000..da19c48c --- /dev/null +++ b/_lib/vite/utils/resolveVocsConfig.js @@ -0,0 +1,57 @@ +import { existsSync, readFileSync } from 'node:fs'; +import { resolve } from 'node:path'; +import toml from 'toml'; +import { loadConfigFromFile } from 'vite'; +import { defineConfig, getDefaultConfig } from '../../config.js'; +const moduleExtensions = ['js', 'jsx', 'ts', 'tsx', 'mjs', 'mts']; +const staticExtensions = ['toml', 'json']; +const extensions = [...moduleExtensions, ...staticExtensions]; +const defaultConfigPaths = ['.vocs/config', 'vocs.config', 'Vocs']; +export async function resolveVocsConfig(parameters = {}) { + const { command = 'serve', mode = 'development' } = parameters; + const [configPath, ext] = (() => { + for (const ext of extensions) { + if (parameters.configPath) + return parameters.configPath; + for (const filePath of defaultConfigPaths) + if (existsSync(resolve(process.cwd(), `${filePath}.${ext}`))) + return [`${filePath}.${ext}`, ext]; + } + return [undefined, undefined]; + })(); + const result = await (async () => { + if (!ext) + return; + if (moduleExtensions.includes(ext)) + return await loadConfigFromFile({ command, mode }, configPath); + if (staticExtensions.includes(ext)) { + const file = readFileSync(configPath, 'utf8'); + const rawConfig = (() => { + if (ext === 'toml') + return camelCaseKeys(toml.parse(file)); + if (ext === 'json') + return JSON.parse(file); + return; + })(); + const config = await defineConfig(rawConfig); + return config ? { config } : undefined; + } + return; + })(); + const config = (result ? result.config : await getDefaultConfig()); + return { + config, + configPath, + }; +} +function camelCaseKeys(obj) { + if (typeof obj !== 'object') + return obj; + if (Array.isArray(obj)) + return obj.map(camelCaseKeys); + return Object.fromEntries(Object.entries(obj).map(([key, value]) => [ + key.replace(/[-_](.)/g, (_, c) => c.toUpperCase()), + camelCaseKeys(value), + ])); +} +//# sourceMappingURL=resolveVocsConfig.js.map \ No newline at end of file diff --git a/_lib/vite/utils/resolveVocsConfig.js.map b/_lib/vite/utils/resolveVocsConfig.js.map new file mode 100644 index 00000000..e72effe4 --- /dev/null +++ b/_lib/vite/utils/resolveVocsConfig.js.map @@ -0,0 +1 @@ +{"version":3,"file":"resolveVocsConfig.js","sourceRoot":"","sources":["../../../vite/utils/resolveVocsConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAkB,kBAAkB,EAAE,MAAM,MAAM,CAAA;AACzD,OAAO,EAAqB,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,C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AC,CACH,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/_lib/vite/utils/search.d.ts b/_lib/vite/utils/search.d.ts new file mode 100644 index 00000000..2475126e --- /dev/null +++ b/_lib/vite/utils/search.d.ts @@ -0,0 +1,19 @@ +import debug_ from 'debug'; +import MiniSearch from 'minisearch'; +export declare const debug: debug_.Debugger; +export declare function buildIndex({ baseDir, }: { + baseDir: string; +}): Promise>; +export declare function saveIndex(outDir: string, index: MiniSearch): any; +export declare function processMdx(file: string): Promise; +export declare function getDocId(baseDir: string, file: string): string; +type PageSection = { + anchor: string; + html: string; + isPage: boolean; + text: string; + titles: string[]; +}; +export declare function splitPageIntoSections(html: string): PageSection[]; +export {}; +//# sourceMappingURL=search.d.js.map \ No newline at end of file diff --git a/_lib/vite/utils/search.d.ts.map b/_lib/vite/utils/search.d.ts.map new file mode 100644 index 00000000..9895ab62 --- /dev/null +++ b/_lib/vite/utils/search.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../vite/utils/search.ts"],"names":[],"mappings":"AAIA,OAAO,MAAM,MAAM,OAAO,CAAA;AAG1B,OAAO,UAAU,MAAM,YAAY,CAAA;AAanC,eAAO,MAAM,KAAK,iBAAwB,CAAA;AAE1C,wBAAsB,UAAU,CAAC,EAC/B,OAAO,GACR,EAAE;IACD,OAAO,EAAE,MAAM,CAAA;CAChB,4BAsDA;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,OAO1D;AAKD,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,mBAoB5C;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAKrD;AAKD,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,OAAO,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB,CAAA;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,iBA8BjD"} \ No newline at end of file diff --git a/_lib/vite/utils/search.js b/_lib/vite/utils/search.js new file mode 100644 index 00000000..b7ce5a7a --- /dev/null +++ b/_lib/vite/utils/search.js @@ -0,0 +1,134 @@ +import { readFileSync } from 'node:fs'; +import { join, relative, resolve } from 'node:path'; +import { pathToFileURL } from 'url'; +import { compile, run } from '@mdx-js/mdx'; +import debug_ from 'debug'; +import { default as fs } from 'fs-extra'; +import { globby } from 'globby'; +import MiniSearch from 'minisearch'; +import pLimit from 'p-limit'; +import { Fragment } from 'react'; +import { renderToStaticMarkup } from 'react-dom/server'; +import * as runtime from 'react/jsx-runtime'; +import { getRehypePlugins, getRemarkPlugins } from '../plugins/mdx.js'; +import * as cache from './cache.js'; +import { hash } from './hash.js'; +import { slash } from './slash.js'; +const limit = pLimit(30); +export const debug = debug_('vocs:search'); +export async function buildIndex({ baseDir, }) { + const pagesPaths = await globby(`${resolve(baseDir, 'pages')}/**/*.{md,mdx}`); + const documents = await Promise.all(pagesPaths.map((pagePath) => limit(async (pagePath) => { + const mdx = readFileSync(pagePath, 'utf-8'); + const key = `index.${hash(pagePath)}`; + const pageCache = cache.search.get(key) ?? {}; + if (pageCache.mdx === mdx) + return pageCache.document; + const html = await processMdx(mdx); + const sections = splitPageIntoSections(html); + if (sections.length === 0) { + cache.search.set(key, { mdx, document: [] }); + return []; + } + const fileId = getDocId(baseDir, pagePath); + const relFile = slash(relative(baseDir, fileId)); + const href = relFile + .replace(relative(baseDir, resolve(baseDir, 'pages')), '') + .replace(/\.(.*)/, ''); + const document = sections.map((section) => ({ + href: `${href}#${section.anchor}`, + html: section.html, + id: `${fileId}#${section.anchor}`, + isPage: section.isPage, + text: section.text, + title: section.titles.at(-1), + titles: section.titles.slice(0, -1), + })); + cache.search.set(key, { mdx, document }); + return document; + }, pagePath))); + const index = new MiniSearch({ + fields: ['title', 'titles', 'text'], + storeFields: ['href', 'html', 'isPage', 'text', 'title', 'titles'], + // TODO + // ...options.miniSearch?.options, + }); + await index.addAllAsync(documents.flat()); + debug(`vocs:search > indexed ${pagesPaths.length} files`); + return index; +} +export function saveIndex(outDir, index) { + const json = index.toJSON(); + const hash_ = cache.search.get('hash') || hash(JSON.stringify(json), 8); + const dir = join(outDir, '.vocs'); + fs.ensureDirSync(dir); + fs.writeJSONSync(join(dir, `search-index-${hash_}.json`), json); + return hash_; +} +const remarkPlugins = getRemarkPlugins(); +const rehypePlugins = getRehypePlugins({ twoslash: false }); +export async function processMdx(file) { + try { + const compiled = await compile(file, { + baseUrl: pathToFileURL(file).href, + outputFormat: 'function-body', + remarkPlugins, + rehypePlugins, + }); + const { default: MDXContent } = await run(compiled, { ...runtime, Fragment }); + const html = renderToStaticMarkup(MDXContent({ + // TODO: Pass components - vanilla extract and virtual module errors + // components, + })); + return html; + } + catch (error) { + // TODO: Resolve imports (e.g. virtual modules) + return ''; + } +} +export function getDocId(baseDir, file) { + const relFile = slash(relative(baseDir, file)); + let id = slash(join(baseDir, relFile)); + id = id.replace(/(^|\/)index\.(mdx|html)?$/, '$1'); + return id; +} +const headingRegex = /(.*?.*?<\/a>)<\/h\1>/gi; +const headingContentRegex = /(.*?).*?<\/a>/i; +export function splitPageIntoSections(html) { + const result = html.split(headingRegex); + result.shift(); + let parentTitles = []; + const sections = []; + for (let i = 0; i < result.length; i += 3) { + const level = parseInt(result[i]) - 1; + const heading = result[i + 1]; + const headingResult = headingContentRegex.exec(heading); + const title = clearHtmlTags(headingResult?.[1] ?? '').trim(); + const anchor = headingResult?.[2] ?? ''; + const content = result[i + 2]; + if (!title || !content) + continue; + const titles = parentTitles.slice(0, level); + titles[level] = title; + sections.push({ + anchor, + html: content, + isPage: i === 0, + titles, + text: getSearchableText(content), + }); + if (level === 0) + parentTitles = [title]; + else + parentTitles[level] = title; + } + return sections; +} +function getSearchableText(content) { + return clearHtmlTags(content); +} +function clearHtmlTags(str) { + return str.replace(/<[^>]*>/g, ''); +} +//# sourceMappingURL=search.js.map \ No newline at end of file diff --git a/_lib/vite/utils/search.js.map b/_lib/vite/utils/search.js.map new file mode 100644 index 00000000..76c5a66a --- /dev/null +++ b/_lib/vite/utils/search.js.map @@ -0,0 +1 @@ +{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../vite/utils/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,MAAM,MAAM,OAAO,CAAA;AAC1B,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,MAAM,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACtE,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAElC,MAAM,KAAK,GAAG,MAAM,CAAC,EAAE,CAAC,CAAA;AAExB,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,aAAa,CAAC,CAAA;AAE1C,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,EAC/B,OAAO,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AAM;YACN,IAAI,EAAE,OAAO;YACb,MAAM,EAAE,CAAC,KAAK,CAAC;YACf,MAAM;YACN,IAAI,EAAE,iBAAiB,CAAC,OAAO,CAAC;SACjC,CAAC,CAAA;QAEF,IAAI,KAAK,KAAK,CAAC;YAAE,YAAY,GAAG,CAAC,KAAK,CAAC,CAAA;;YAClC,YAAY,CAAC,KAAK,CAAC,GAAG,KAAK,CAAA;KACjC;IAED,OAAO,QAAQ,CAAA;AACjB,CAAC;AAED,SAAS,iBAAiB,CAAC,OAAe;IACxC,OAAO,aAAa,CAAC,OAAO,CAAC,CAAA;AAC/B,CAAC;AAED,SAAS,aAAa,CAAC,GAAW;IAChC,OAAO,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAA;AACpC,CAAC"} \ No newline at end of file diff --git a/_lib/vite/utils/serveStatic.d.ts b/_lib/vite/utils/serveStatic.d.ts new file mode 100644 index 00000000..5628484f --- /dev/null +++ b/_lib/vite/utils/serveStatic.d.ts @@ -0,0 +1,12 @@ +import type { MiddlewareHandler } from 'hono'; +export type ServeStaticOptions = { + /** + * Root path, relative to current working directory. (absolute paths are not supported) + */ + root?: string; + path?: string; + index?: string; + rewriteRequestPath?: (path: string) => string; +}; +export declare const serveStatic: (options?: ServeStaticOptions) => MiddlewareHandler; +//# sourceMappingURL=serveStatic.d.js.map \ No newline at end of file diff --git a/_lib/vite/utils/serveStatic.d.ts.map b/_lib/vite/utils/serveStatic.d.ts.map new file mode 100644 index 00000000..28798678 --- /dev/null +++ b/_lib/vite/utils/serveStatic.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"serveStatic.d.ts","sourceRoot":"","sources":["../../../vite/utils/serveStatic.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAA;AAI7C,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;CAC9C,CAAA;AAoBD,eAAO,MAAM,WAAW,aAAa,kBAAkB,KAAkB,iBA2DxE,CAAA"} \ No newline at end of file diff --git a/_lib/vite/utils/serveStatic.js b/_lib/vite/utils/serveStatic.js new file mode 100644 index 00000000..7fb4e0d9 --- /dev/null +++ b/_lib/vite/utils/serveStatic.js @@ -0,0 +1,69 @@ +// Fork of https://github.com/honojs/node-server/blob/main/src/serve-static.js with support for absolute `root` path. +import { ReadStream, createReadStream, existsSync, lstatSync } from 'fs'; +import { getFilePath } from 'hono/utils/filepath'; +import { getMimeType } from 'hono/utils/mime'; +const createStreamBody = (stream) => { + const body = new ReadableStream({ + start(controller) { + stream.on('data', (chunk) => { + controller.enqueue(chunk); + }); + stream.on('end', () => { + controller.close(); + }); + }, + cancel() { + stream.destroy(); + }, + }); + return body; +}; +export const serveStatic = (options = { root: '' }) => { + return async (c, next) => { + // Do nothing if Response is already set + if (c.finalized) + return next(); + const url = new URL(c.req.url); + const filename = options.path ?? decodeURIComponent(url.pathname); + let path = getFilePath({ + filename: options.rewriteRequestPath ? options.rewriteRequestPath(filename) : filename, + root: options.root, + defaultDocument: options.index ?? 'index.html', + }); + if (!path) + return next(); + path = `/${path}`; + if (!existsSync(path)) + return next(); + const mimeType = getMimeType(path); + if (mimeType) { + c.header('Content-Type', mimeType); + } + const stat = lstatSync(path); + const size = stat.size; + if (c.req.method === 'HEAD' || c.req.method === 'OPTIONS') { + c.header('Content-Length', size.toString()); + c.status(200); + return c.body(null); + } + const range = c.req.header('range') || ''; + if (!range) { + c.header('Content-Length', size.toString()); + return c.body(createStreamBody(createReadStream(path)), 200); + } + c.header('Accept-Ranges', 'bytes'); + c.header('Date', stat.birthtime.toUTCString()); + const parts = range.replace(/bytes=/, '').split('-', 2); + const start = parts[0] ? parseInt(parts[0], 10) : 0; + let end = parts[1] ? parseInt(parts[1], 10) : stat.size - 1; + if (size < end - start + 1) { + end = size - 1; + } + const chunksize = end - start + 1; + const stream = createReadStream(path, { start, end }); + c.header('Content-Length', chunksize.toString()); + c.header('Content-Range', `bytes ${start}-${end}/${stat.size}`); + return c.body(createStreamBody(stream), 206); + }; +}; +//# sourceMappingURL=serveStatic.js.map \ No newline at end of file diff --git a/_lib/vite/utils/serveStatic.js.map b/_lib/vite/utils/serveStatic.js.map new file mode 100644 index 00000000..e0f4722b --- /dev/null +++ b/_lib/vite/utils/serveStatic.js.map @@ -0,0 +1 @@ +{"version":3,"file":"serveStatic.js","sourceRoot":"","sources":["../../../vite/utils/serveStatic.ts"],"names":[],"mappings":"AAAA,qHAAqH;AAErH,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,IAAI,CAAA;AAExE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAY7C,MAAM,gBAAgB,GAAG,CAAC,MAAkB,EAAE,EAAE;IAC9C,MAAM,IAAI,GAAG,IAAI,cAAc,CAAC;QAC9B,KAAK,CAAC,UAAU;YACd,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE;gBAC1B,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;YAC3B,CAAC,CAAC,CAAA;YACF,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;gBACpB,UAAU,CAAC,KAAK,EAAE,CAAA;YACpB,CAAC,CAAC,CAAA;QACJ,CAAC;QAED,MAAM;YACJ,MAAM,CAAC,OAAO,EAAE,CAAA;QAClB,CAAC;KACF,CAAC,CAAA;IACF,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,UAA8B,EAAE,IAAI,EAAE,EAAE,EAA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AAG,EAAE,CAAC,CAAA;QAErD,CAAC,CAAC,MAAM,CAAC,gBAAgB,EAAE,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAA;QAChD,CAAC,CAAC,MAAM,CAAC,eAAe,EAAE,SAAS,KAAK,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA;QAE/D,OAAO,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,CAAA;IAC9C,CAAC,CAAA;AACH,CAAC,CAAA"} \ No newline at end of file diff --git a/_lib/vite/utils/slash.d.ts b/_lib/vite/utils/slash.d.ts new file mode 100644 index 00000000..b4aa0165 --- /dev/null +++ b/_lib/vite/utils/slash.d.ts @@ -0,0 +1,2 @@ +export declare function slash(p: string): string; +//# sourceMappingURL=slash.d.js.map \ No newline at end of file diff --git a/_lib/vite/utils/slash.d.ts.map b/_lib/vite/utils/slash.d.ts.map new file mode 100644 index 00000000..5eb30c81 --- /dev/null +++ b/_lib/vite/utils/slash.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"slash.d.ts","sourceRoot":"","sources":["../../../vite/utils/slash.ts"],"names":[],"mappings":"AAAA,wBAAgB,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAEvC"} \ No newline at end of file diff --git a/_lib/vite/utils/slash.js b/_lib/vite/utils/slash.js new file mode 100644 index 00000000..6e590995 --- /dev/null +++ b/_lib/vite/utils/slash.js @@ -0,0 +1,4 @@ +export function slash(p) { + return p.replace(/\\/g, '/'); +} +//# sourceMappingURL=slash.js.map \ No newline at end of file diff --git a/_lib/vite/utils/slash.js.map b/_lib/vite/utils/slash.js.map new file mode 100644 index 00000000..b68d98da --- /dev/null +++ b/_lib/vite/utils/slash.js.map @@ -0,0 +1 @@ +{"version":3,"file":"slash.js","sourceRoot":"","sources":["../../../vite/utils/slash.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,KAAK,CAAC,CAAS;IAC7B,OAAO,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;AAC9B,CAAC"} \ No newline at end of file diff --git a/_lib/vite/utils/vercel.d.ts b/_lib/vite/utils/vercel.d.ts new file mode 100644 index 00000000..53e7f64e --- /dev/null +++ b/_lib/vite/utils/vercel.d.ts @@ -0,0 +1,3 @@ +export declare const vercelBuildOutputDir: string; +export declare function writeBuildOutputConfig(): void; +//# sourceMappingURL=vercel.d.js.map \ No newline at end of file diff --git a/_lib/vite/utils/vercel.d.ts.map b/_lib/vite/utils/vercel.d.ts.map new file mode 100644 index 00000000..611862d8 --- /dev/null +++ b/_lib/vite/utils/vercel.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"vercel.d.ts","sourceRoot":"","sources":["../../../vite/utils/vercel.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB,QAA2C,CAAA;AAE5E,wBAAgB,sBAAsB,SAErC"} \ No newline at end of file diff --git a/_lib/vite/utils/vercel.js b/_lib/vite/utils/vercel.js new file mode 100644 index 00000000..9684b9d4 --- /dev/null +++ b/_lib/vite/utils/vercel.js @@ -0,0 +1,7 @@ +import { resolve } from 'node:path'; +import { default as fs } from 'fs-extra'; +export const vercelBuildOutputDir = resolve(process.cwd(), '.vercel/output'); +export function writeBuildOutputConfig() { + fs.writeJsonSync(resolve(vercelBuildOutputDir, 'config.json'), { version: 3 }); +} +//# sourceMappingURL=vercel.js.map \ No newline at end of file diff --git a/_lib/vite/utils/vercel.js.map b/_lib/vite/utils/vercel.js.map new file mode 100644 index 00000000..808189ae --- /dev/null +++ b/_lib/vite/utils/vercel.js.map @@ -0,0 +1 @@ +{"version":3,"file":"vercel.js","sourceRoot":"","sources":["../../../vite/utils/vercel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,MAAM,UAAU,CAAA;AAExC,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,gBAAgB,CAAC,CAAA;AAE5E,MAAM,UAAU,sBAAsB;IACpC,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,oBAAoB,EAAE,aAAa,CAAC,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAA;AAChF,CAAC"} \ No newline at end of file diff --git a/_lib/vite/vite.config.d.ts b/_lib/vite/vite.config.d.ts new file mode 100644 index 00000000..d4084802 --- /dev/null +++ b/_lib/vite/vite.config.d.ts @@ -0,0 +1,3 @@ +declare const _default: import("vite").UserConfigExport; +export default _default; +//# sourceMappingURL=vite.config.d.js.map \ No newline at end of file diff --git a/_lib/vite/vite.config.d.ts.map b/_lib/vite/vite.config.d.ts.map new file mode 100644 index 00000000..b7fd8be1 --- /dev/null +++ b/_lib/vite/vite.config.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"vite.config.d.ts","sourceRoot":"","sources":["../../vite/vite.config.ts"],"names":[],"mappings":";AAgBA,wBA0DE"} \ No newline at end of file diff --git a/_lib/vite/vite.config.js b/_lib/vite/vite.config.js new file mode 100644 index 00000000..7b33615e --- /dev/null +++ b/_lib/vite/vite.config.js @@ -0,0 +1,80 @@ +import { basename } from 'node:path'; +import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin'; +import react from '@vitejs/plugin-react'; +import { defineConfig, splitVendorChunkPlugin } from 'vite'; +import { css } from './plugins/css.js'; +import { mdx } from './plugins/mdx.js'; +import { resolveVocsModules } from './plugins/resolve-vocs-modules.js'; +import { search } from './plugins/search.js'; +import { virtualBlog } from './plugins/virtual-blog.js'; +import { virtualConfig } from './plugins/virtual-config.js'; +import { virtualConsumerComponents } from './plugins/virtual-consumer-components.js'; +import { virtualRoutes } from './plugins/virtual-routes.js'; +import { virtualStyles } from './plugins/virtual-styles.js'; +import { resolveVocsConfig } from './utils/resolveVocsConfig.js'; +export default defineConfig(async () => { + const { config } = await resolveVocsConfig(); + const viteConfig = config.vite ?? {}; + const hasReact = await hasReactPlugin(viteConfig.plugins ?? []); + return { + ...viteConfig, + build: { + ...viteConfig?.build, + cssCodeSplit: false, + }, + optimizeDeps: { + ...(viteConfig.optimizeDeps ?? {}), + include: [ + 'acorn-jsx', + 'chroma-js', + 'debug', + 'extend', + 'mark.js', + 'react', + 'react-dom', + 'react-dom/client', + 'react-helmet', + 'style-to-object', + ...(viteConfig.optimizeDeps?.include ?? []), + ], + exclude: ['vocs', ...(viteConfig.optimizeDeps?.exclude ?? [])], + }, + plugins: [ + splitVendorChunkPlugin(), + virtualConfig(), + vanillaExtractPlugin({ + identifiers({ filePath, debugId }) { + const scope = basename(filePath).replace('.css.js', ''); + return `vocs_${scope}${debugId ? `_${debugId}` : ''}`; + }, + emitCssInSsr: true, + }), + css(), + mdx(), + resolveVocsModules(), + search(), + virtualBlog(), + virtualConsumerComponents(), + virtualRoutes(), + virtualStyles(), + ...(hasReact ? [] : react()), + ...(viteConfig.plugins ?? []), + ], + server: { + ...viteConfig.server, + fs: { + ...viteConfig.server?.fs, + allow: ['..', ...(viteConfig.server?.fs?.allow ?? [])], + }, + }, + }; +}); +async function hasReactPlugin(plugins) { + for await (const plugin of plugins) + if (plugin && + ((!Array.isArray(plugin) && plugin.name === 'vite:react-babel') || + (Array.isArray(plugin) && (await hasReactPlugin(plugin))))) + return true; + return false; +} +//# sourceMappingURL=vite.config.js.map \ No newline at end of file diff --git a/_lib/vite/vite.config.js.map b/_lib/vite/vite.config.js.map new file mode 100644 index 00000000..2f7a0ff2 --- /dev/null +++ b/_lib/vite/vite.config.js.map @@ -0,0 +1 @@ +{"version":3,"file":"vite.config.js","sourceRoot":"","sources":["../../vite/vite.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,KAAK,MAAM,sBAAsB,CAAA;AACxC,OAAO,EAAqB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CAAC;gBAC7D,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAE5D,OAAO,IAAI,CAAA;IACf,OAAO,KAAK,CAAA;AACd,CAAC"} \ No newline at end of file diff --git a/app/components/Authors.css.ts b/app/components/Authors.css.ts new file mode 100644 index 00000000..1159769e --- /dev/null +++ b/app/components/Authors.css.ts @@ -0,0 +1,32 @@ +import { style } from '@vanilla-extract/css' +import { fontSizeVars, primitiveColorVars } from '../styles/vars.css.js' + +export const root = style({ + color: primitiveColorVars.text3, + fontSize: fontSizeVars[14], +}) + +export const authors = style( + { + color: primitiveColorVars.text, + }, + 'authors', +) + +export const link = style( + { + textDecoration: 'underline', + textUnderlineOffset: '2px', + ':hover': { + color: primitiveColorVars.text2, + }, + }, + 'link', +) + +export const separator = style( + { + color: primitiveColorVars.text3, + }, + 'separator', +) diff --git a/app/components/Authors.tsx b/app/components/Authors.tsx new file mode 100644 index 00000000..d3836292 --- /dev/null +++ b/app/components/Authors.tsx @@ -0,0 +1,64 @@ +import { Fragment, useMemo } from 'react' +import { usePageData } from '../hooks/usePageData.js' +import * as styles from './Authors.css.js' + +export type AuthorsProps = { + authors?: string | string[] + date?: string +} + +export function Authors(props: AuthorsProps) { + const { frontmatter } = usePageData() + + const { authors: authors_ = frontmatter?.authors, date = frontmatter?.date } = props + + const authors = useMemo(() => { + if (!authors_) return undefined + if (Array.isArray(authors_)) return authors_ + return authors_.split(',').map((author) => author.trim()) + }, [authors_]) + + const formattedDate = useMemo(() => { + if (!date) return null + const dateObject = new Date(date) + return dateObject.toLocaleDateString('en-US', { + year: 'numeric', + month: 'long', + day: 'numeric', + }) + }, [date]) + + return ( +
+ {formattedDate} + {authors && (formattedDate ? ' by ' : 'By ')} + + {authors?.map((author, index) => { + const { text, url } = parseAuthor(author) + return ( + + {url ? ( + + {text} + + ) : ( + text + )} + {index < authors.length - 2 && , } + {index < authors.length - 1 && & } + + ) + })} + +
+ ) +} + +function parseAuthor(author: string) { + const match = author.match(/\[(.+)\]\((.+)\)/) + if (!match) return { text: author, url: undefined } + return { + text: match[1], + url: match[2], + } +} diff --git a/app/components/Banner.css.ts b/app/components/Banner.css.ts new file mode 100644 index 00000000..938cd6fa --- /dev/null +++ b/app/components/Banner.css.ts @@ -0,0 +1,77 @@ +import { createVar, fallbackVar, globalStyle, style } from '@vanilla-extract/css' +import { + fontSizeVars, + primitiveColorVars, + spaceVars, + viewportVars, + zIndexVars, +} from '../styles/vars.css.js' + +export const bannerBackgroundColor = createVar('bannerBackgroundColor') +export const bannerHeight = createVar('bannerHeight') +export const bannerTextColor = createVar('bannerTextColor') + +export const root = style({ + backgroundColor: fallbackVar(bannerBackgroundColor, primitiveColorVars.backgroundAccent), + borderBottom: `1px solid ${fallbackVar(bannerBackgroundColor, primitiveColorVars.borderAccent)}`, + color: fallbackVar(bannerTextColor, primitiveColorVars.backgroundAccentText), + height: fallbackVar(bannerHeight, '36px'), + position: 'fixed', + top: 0, + width: '100%', + zIndex: zIndexVars.gutterTop, + '@media': { + [viewportVars['max-1080px']]: { + position: 'initial', + }, + }, +}) + +export const content = style( + { + fontSize: fontSizeVars[14], + overflowX: 'scroll', + paddingLeft: spaceVars[8], + paddingRight: spaceVars[8], + marginRight: spaceVars[24], + msOverflowStyle: 'none', + scrollbarWidth: 'none', + whiteSpace: 'pre', + '::-webkit-scrollbar': { + display: 'none', + }, + }, + 'content', +) + +export const inner = style( + { + alignItems: 'center', + display: 'flex', + height: '100%', + justifyContent: 'center', + position: 'relative', + width: '100%', + }, + 'inner', +) + +export const closeButton = style( + { + alignItems: 'center', + backgroundColor: fallbackVar(bannerBackgroundColor, primitiveColorVars.backgroundAccent), + display: 'flex', + justifyContent: 'center', + height: '100%', + position: 'absolute', + right: 0, + width: spaceVars[24], + }, + 'closeButton', +) + +globalStyle(`${content} a`, { + fontWeight: '400', + textUnderlineOffset: '2px', + textDecoration: 'underline', +}) diff --git a/app/components/Banner.tsx b/app/components/Banner.tsx new file mode 100644 index 00000000..0555a219 --- /dev/null +++ b/app/components/Banner.tsx @@ -0,0 +1,47 @@ +import { runSync } from '@mdx-js/mdx' +import { Cross1Icon } from '@radix-ui/react-icons' +import { assignInlineVars } from '@vanilla-extract/dynamic' +import clsx from 'clsx' +import { Fragment, useMemo } from 'react' +import * as runtime from 'react/jsx-runtime' + +import { useConfig } from '../hooks/useConfig.js' +import { deserializeElement } from '../utils/deserializeElement.js' +import * as styles from './Banner.css.js' + +export type BannerProps = { + hide?: () => void +} + +export function Banner({ hide }: BannerProps) { + const { banner } = useConfig() + const ConsumerBanner = useMemo(() => { + const content = banner?.content ?? '' + if (!content) return null + if (typeof content !== 'string') return () => deserializeElement(content) + const { default: MDXBanner } = runSync(content, { ...runtime, Fragment }) + return MDXBanner + }, [banner]) + + if (!ConsumerBanner) return null + return ( +
+
+
+ +
+ {banner?.dismissable !== ('false' as unknown as boolean) && ( + + )} +
+
+ ) +} diff --git a/app/components/BlogPosts.css.ts b/app/components/BlogPosts.css.ts new file mode 100644 index 00000000..301a272e --- /dev/null +++ b/app/components/BlogPosts.css.ts @@ -0,0 +1,43 @@ +import { style } from '@vanilla-extract/css' +import { fontSizeVars, fontWeightVars, primitiveColorVars, spaceVars } from '../styles/vars.css.js' + +export const root = style({ + display: 'flex', + flexDirection: 'column', + gap: spaceVars['32'], +}) + +export const description = style( + { + marginTop: spaceVars['16'], + }, + 'description', +) + +export const divider = style( + { + borderColor: primitiveColorVars.background4, + }, + 'divider', +) + +export const post = style({}, 'post') + +export const readMore = style( + { + selectors: { + [`${post}:hover &`]: { + color: primitiveColorVars.textAccent, + }, + }, + }, + 'readMore', +) + +export const title = style( + { + fontSize: fontSizeVars.h2, + fontWeight: fontWeightVars.semibold, + }, + 'title', +) diff --git a/app/components/BlogPosts.tsx b/app/components/BlogPosts.tsx new file mode 100644 index 00000000..222c3a93 --- /dev/null +++ b/app/components/BlogPosts.tsx @@ -0,0 +1,27 @@ +import { Fragment } from 'react' +import { posts } from 'virtual:blog' + +import { Authors } from './Authors.js' +import * as styles from './BlogPosts.css.js' +import { RouterLink } from './RouterLink.js' + +export function BlogPosts() { + return ( +
+ {posts.map((post, index) => ( + +
+ +

{post.title}

+ +

+ {post.description} [→] +

+
+
+ {index < posts.length - 1 &&
} +
+ ))} +
+ ) +} diff --git a/app/components/Button.css.ts b/app/components/Button.css.ts new file mode 100644 index 00000000..3b2ffa6a --- /dev/null +++ b/app/components/Button.css.ts @@ -0,0 +1,46 @@ +import { style } from '@vanilla-extract/css' +import { + borderRadiusVars, + fontSizeVars, + fontWeightVars, + primitiveColorVars, + spaceVars, +} from '../styles/vars.css.js' + +export const button = style( + { + alignItems: 'center', + background: primitiveColorVars.background4, + border: `1px solid ${primitiveColorVars.border}`, + borderRadius: borderRadiusVars['4'], + color: primitiveColorVars.text, + display: 'flex', + fontSize: fontSizeVars['14'], + fontWeight: fontWeightVars.medium, + height: '36px', + padding: `0 ${spaceVars['16']}`, + transition: 'background 0.1s', + selectors: { + '&:hover': { + background: primitiveColorVars.background3, + }, + }, + whiteSpace: 'pre', + width: 'fit-content', + }, + 'button', +) + +export const button_accent = style( + { + background: primitiveColorVars.backgroundAccent, + color: primitiveColorVars.backgroundAccentText, + border: `1px solid ${primitiveColorVars.borderAccent}`, + selectors: { + '&:hover': { + background: primitiveColorVars.backgroundAccentHover, + }, + }, + }, + 'button_accent', +) diff --git a/app/components/Button.tsx b/app/components/Button.tsx new file mode 100644 index 00000000..27dd4b12 --- /dev/null +++ b/app/components/Button.tsx @@ -0,0 +1,24 @@ +import clsx from 'clsx' +import type { ReactNode } from 'react' + +import * as styles from './Button.css.js' +import { Link } from './Link.js' + +export type ButtonProps = { + children: ReactNode + className?: string + href?: string + variant?: 'accent' +} + +export function Button({ children, className, href, variant }: ButtonProps) { + return ( + + {children} + + ) +} diff --git a/app/components/Callout.css.ts b/app/components/Callout.css.ts new file mode 100644 index 00000000..d7d02ee8 --- /dev/null +++ b/app/components/Callout.css.ts @@ -0,0 +1,84 @@ +import { style } from '@vanilla-extract/css' + +import { + borderRadiusVars, + fontSizeVars, + semanticColorVars, + spaceVars, + viewportVars, +} from '../styles/vars.css.js' +import { content as stepContent } from './Step.css.js' + +export const root = style({ + borderRadius: borderRadiusVars['4'], + fontSize: fontSizeVars['14'], + padding: `${spaceVars['16']} ${spaceVars['20']}`, + marginBottom: spaceVars['16'], + selectors: { + [`:not(${stepContent}) > &`]: { + '@media': { + [viewportVars['max-720px']]: { + borderRadius: 0, + borderLeftWidth: 0, + borderRightWidth: 0, + marginLeft: `calc(-1 * ${spaceVars['16']})`, + marginRight: `calc(-1 * ${spaceVars['16']})`, + }, + }, + }, + }, +}) + +export const note = style( + { + backgroundColor: semanticColorVars.noteBackground, + border: `1px solid ${semanticColorVars.noteBorder}`, + color: semanticColorVars.noteText, + }, + 'note', +) + +export const info = style( + { + backgroundColor: semanticColorVars.infoBackground, + border: `1px solid ${semanticColorVars.infoBorder}`, + color: semanticColorVars.infoText, + }, + 'info', +) + +export const warning = style( + { + backgroundColor: semanticColorVars.warningBackground, + border: `1px solid ${semanticColorVars.warningBorder}`, + color: semanticColorVars.warningText, + }, + 'warning', +) + +export const danger = style( + { + backgroundColor: semanticColorVars.dangerBackground, + border: `1px solid ${semanticColorVars.dangerBorder}`, + color: semanticColorVars.dangerText, + }, + 'danger', +) + +export const tip = style( + { + backgroundColor: semanticColorVars.tipBackground, + border: `1px solid ${semanticColorVars.tipBorder}`, + color: semanticColorVars.tipText, + }, + 'tip', +) + +export const success = style( + { + backgroundColor: semanticColorVars.successBackground, + border: `1px solid ${semanticColorVars.successBorder}`, + color: semanticColorVars.successText, + }, + 'success', +) diff --git a/app/components/Callout.tsx b/app/components/Callout.tsx new file mode 100644 index 00000000..281be829 --- /dev/null +++ b/app/components/Callout.tsx @@ -0,0 +1,14 @@ +import { type ClassValue, clsx } from 'clsx' +import { type ReactNode } from 'react' + +import * as styles from './Callout.css.js' + +export type CalloutProps = { + className: ClassValue + children: ReactNode + type: 'note' | 'info' | 'warning' | 'danger' | 'tip' | 'success' +} + +export function Callout({ className, children, type }: CalloutProps) { + return +} diff --git a/app/components/CalloutTitle.css.ts b/app/components/CalloutTitle.css.ts new file mode 100644 index 00000000..0a7a0da6 --- /dev/null +++ b/app/components/CalloutTitle.css.ts @@ -0,0 +1,8 @@ +import { style } from '@vanilla-extract/css' +import { fontSizeVars } from '../styles/vars.css.js' + +export const root = style({ + fontSize: fontSizeVars['12'], + letterSpacing: '0.02em', + textTransform: 'uppercase', +}) diff --git a/app/components/CalloutTitle.tsx b/app/components/CalloutTitle.tsx new file mode 100644 index 00000000..01b253df --- /dev/null +++ b/app/components/CalloutTitle.tsx @@ -0,0 +1,12 @@ +import { type ClassValue, clsx } from 'clsx' + +import * as styles from './CalloutTitle.css.js' + +export type CalloutTitleProps = { + className: ClassValue + children: string +} + +export function CalloutTitle({ className, children }: CalloutTitleProps) { + return {children} +} diff --git a/app/components/Content.css.ts b/app/components/Content.css.ts new file mode 100644 index 00000000..a1e49688 --- /dev/null +++ b/app/components/Content.css.ts @@ -0,0 +1,9 @@ +import { style } from '@vanilla-extract/css' +import { contentVars, primitiveColorVars } from '../styles/vars.css.js' + +export const root = style({ + backgroundColor: primitiveColorVars.background, + maxWidth: contentVars.width, + padding: `${contentVars.verticalPadding} ${contentVars.horizontalPadding}`, + width: '100%', +}) diff --git a/app/components/Content.tsx b/app/components/Content.tsx new file mode 100644 index 00000000..303b25b2 --- /dev/null +++ b/app/components/Content.tsx @@ -0,0 +1,10 @@ +import { type ClassValue, clsx } from 'clsx' + +import * as styles from './Content.css.js' + +export function Content({ + children, + className, +}: { children: React.ReactNode; className?: ClassValue }) { + return
{children}
+} diff --git a/app/components/CopyButton.css.ts b/app/components/CopyButton.css.ts new file mode 100644 index 00000000..0c42a0e7 --- /dev/null +++ b/app/components/CopyButton.css.ts @@ -0,0 +1,40 @@ +import { style } from '@vanilla-extract/css' + +import { borderRadiusVars, primitiveColorVars, spaceVars, zIndexVars } from '../styles/vars.css.js' +import { root as Pre } from './mdx/Pre.css.js' + +export const root = style({ + alignItems: 'center', + backgroundColor: `color-mix(in srgb, ${primitiveColorVars.background2} 75%, transparent)`, + backdropFilter: 'blur(1px)', + border: `1px solid ${primitiveColorVars.border}`, + borderRadius: borderRadiusVars['4'], + color: primitiveColorVars.text3, + display: 'flex', + justifyContent: 'center', + position: 'absolute', + right: spaceVars['18'], + top: spaceVars['18'], + opacity: 0, + height: '32px', + width: '32px', + transition: 'background-color 0.15s, opacity 0.15s', + zIndex: zIndexVars.surface, + selectors: { + '&:hover': { + backgroundColor: primitiveColorVars.background4, + transition: 'background-color 0.05s', + }, + '&:focus-visible': { + backgroundColor: primitiveColorVars.background4, + opacity: 1, + transition: 'background-color 0.05s', + }, + '&:hover:active': { + backgroundColor: primitiveColorVars.background2, + }, + [`${Pre}:hover &`]: { + opacity: 1, + }, + }, +}) diff --git a/app/components/CopyButton.tsx b/app/components/CopyButton.tsx new file mode 100644 index 00000000..3546b163 --- /dev/null +++ b/app/components/CopyButton.tsx @@ -0,0 +1,16 @@ +import * as styles from './CopyButton.css.js' +import { Icon } from './Icon.js' +import { Checkmark } from './icons/Checkmark.js' +import { Copy } from './icons/Copy.js' + +export function CopyButton({ copy, copied }: { copy: () => void; copied: boolean }) { + return ( + + ) +} diff --git a/app/components/DesktopSearch.css.ts b/app/components/DesktopSearch.css.ts new file mode 100644 index 00000000..a3746ba4 --- /dev/null +++ b/app/components/DesktopSearch.css.ts @@ -0,0 +1,54 @@ +import { style } from '@vanilla-extract/css' + +import { + borderRadiusVars, + fontSizeVars, + fontWeightVars, + primitiveColorVars, + spaceVars, +} from '../styles/vars.css.js' + +export const search = style( + { + alignItems: 'center', + backgroundColor: primitiveColorVars.backgroundDark, + border: `1px solid ${primitiveColorVars.backgroundDark}`, + borderRadius: borderRadiusVars[8], + color: primitiveColorVars.text2, + display: 'flex', + fontSize: fontSizeVars[14], + fontWeight: fontWeightVars.medium, + gap: spaceVars[6], + height: spaceVars[40], + maxWidth: '15.5rem', + paddingLeft: spaceVars[12], + paddingRight: spaceVars[12], + position: 'relative', + width: '100%', + transition: 'color 0.1s, border-color 0.1s', + selectors: { + '&:hover': { + color: primitiveColorVars.text, + borderColor: primitiveColorVars.text3, + }, + }, + }, + 'search', +) + +export const searchCommand = style( + { + alignItems: 'center', + border: `1.5px solid ${primitiveColorVars.text3}`, + borderRadius: borderRadiusVars[4], + color: primitiveColorVars.text3, + display: 'flex', + height: spaceVars[12], + justifyContent: 'center', + marginLeft: 'auto', + marginTop: spaceVars[1], + padding: spaceVars[1], + width: spaceVars[12], + }, + 'searchCommand', +) diff --git a/app/components/DesktopSearch.tsx b/app/components/DesktopSearch.tsx new file mode 100644 index 00000000..6410b0ac --- /dev/null +++ b/app/components/DesktopSearch.tsx @@ -0,0 +1,58 @@ +import * as Dialog from '@radix-ui/react-dialog' +import { MagnifyingGlassIcon } from '@radix-ui/react-icons' +import { useEffect, useState } from 'react' + +import { useSearchIndex } from '../hooks/useSearchIndex.js' +import * as styles from './DesktopSearch.css.js' +import { SearchDialog } from './SearchDialog.js' + +export function DesktopSearch() { + useSearchIndex() + const [open, setOpen] = useState(false) + + useEffect(() => { + function keyDownHandler(event: KeyboardEvent) { + const isInput = + document.activeElement instanceof HTMLElement && + (['input', 'select', 'textarea'].includes(document.activeElement.tagName.toLowerCase()) || + document.activeElement.isContentEditable) + + if (event.key === '/' && !open && !isInput) { + event.preventDefault() + setOpen(true) + } else if (event.metaKey === true && event.key === 'k') { + event.preventDefault() + setOpen((x) => !x) + } + } + + window.addEventListener('keydown', keyDownHandler) + return () => { + window.removeEventListener('keydown', keyDownHandler) + } + }, [open]) + + return ( + + + + + + setOpen(false)} /> + + ) +} diff --git a/app/components/DesktopTopNav.css.ts b/app/components/DesktopTopNav.css.ts new file mode 100644 index 00000000..0299b1a1 --- /dev/null +++ b/app/components/DesktopTopNav.css.ts @@ -0,0 +1,128 @@ +import { style } from '@vanilla-extract/css' + +import { leftGutterWidthVar } from '../layouts/DocsLayout.css.js' +import { + borderRadiusVars, + contentVars, + primitiveColorVars, + sidebarVars, + spaceVars, + topNavVars, + viewportVars, +} from '../styles/vars.css.js' + +export const root = style({ + alignItems: 'center', + display: 'flex', + justifyContent: 'space-between', + padding: `0 ${topNavVars.horizontalPadding}`, + height: topNavVars.height, + '@media': { + [viewportVars['max-1080px']]: { + display: 'none', + }, + }, +}) + +export const withLogo = style( + { + paddingLeft: `calc(((100% - ${contentVars.width}) / 2) + ${topNavVars.horizontalPadding})`, + }, + 'withLogo', +) + +export const button = style( + { + borderRadius: borderRadiusVars[4], + padding: spaceVars[8], + }, + 'button', +) + +export const content = style( + { + right: `calc(-1 * ${spaceVars['24']})`, + }, + 'content', +) + +export const curtain = style( + { + background: `linear-gradient(${primitiveColorVars.background}, transparent 70%)`, + height: '30px', + opacity: 0.98, + width: '100%', + '@media': { + [viewportVars['max-1080px']]: { + display: 'none', + }, + }, + }, + 'curtain', +) + +export const divider = style( + { + backgroundColor: primitiveColorVars.border, + height: '35%', + width: '1px', + }, + 'divider', +) + +export const group = style({ alignItems: 'center', display: 'flex' }, 'group') + +export const hideCompact = style( + { + '@media': { + [viewportVars['max-1280px']]: { + display: 'none', + }, + }, + }, + 'hideCompact', +) + +export const icon = style( + { + color: primitiveColorVars.text2, + transition: 'color 0.1s', + selectors: { + [`${button}:hover &`]: { + color: primitiveColorVars.text, + }, + }, + }, + 'icon', +) + +export const item = style( + { alignItems: 'center', display: 'flex', height: '100%', position: 'relative' }, + 'item', +) + +export const logo = style( + { + paddingLeft: sidebarVars.horizontalPadding, + paddingRight: sidebarVars.horizontalPadding, + width: sidebarVars.width, + }, + 'logo', +) + +export const logoWrapper = style( + { + display: 'flex', + height: '100%', + justifyContent: 'flex-end', + left: 0, + position: 'absolute', + width: leftGutterWidthVar, + }, + 'logoWrapper', +) + +export const section = style( + { alignItems: 'center', display: 'flex', height: '100%', gap: spaceVars[24] }, + 'section', +) diff --git a/app/components/DesktopTopNav.tsx b/app/components/DesktopTopNav.tsx new file mode 100644 index 00000000..22f0897b --- /dev/null +++ b/app/components/DesktopTopNav.tsx @@ -0,0 +1,198 @@ +import clsx from 'clsx' +import { type ComponentType } from 'react' +import { useLocation } from 'react-router-dom' + +import type { ParsedSocialItem, ParsedTopNavItem } from '../../config.js' +import { useActiveNavIds } from '../hooks/useActiveNavIds.js' +import { useConfig } from '../hooks/useConfig.js' +import { useLayout } from '../hooks/useLayout.js' +import { useTheme } from '../hooks/useTheme.js' +import { visibleDark, visibleLight } from '../styles/utils.css.js' +import { DesktopSearch } from './DesktopSearch.js' +import * as styles from './DesktopTopNav.css.js' +import { Icon } from './Icon.js' +import { NavLogo } from './NavLogo.js' +import * as NavigationMenu from './NavigationMenu.js' +import { RouterLink } from './RouterLink.js' +import { Discord } from './icons/Discord.js' +import { GitHub } from './icons/GitHub.js' +import { Moon } from './icons/Moon.js' +import { Sun } from './icons/Sun.js' +import { Telegram } from './icons/Telegram.js' +import { Warpcast } from './icons/Warpcast.js' +import { X } from './icons/X.js' + +DesktopTopNav.Curtain = Curtain + +export function DesktopTopNav() { + const config = useConfig() + const { showLogo, showSidebar } = useLayout() + + return ( +
+ + + {showLogo && ( +
+
+ + + +
+
+ )} + +
+ +
+ {(config.topNav?.length || 0) > 0 && ( + <> +
+ +
+
3 ? styles.hideCompact : null, + )} + /> + + )} + + {config.socials && config.socials?.length > 0 && ( + <> +
3 ? styles.hideCompact : null, + )} + style={{ marginLeft: '-8px', marginRight: '-8px' }} + > + {config.socials.map((social, i) => ( +
+ +
+ ))} +
+ {!config.theme?.colorScheme && ( +
+ )} + + )} + + {!config.theme?.colorScheme && ( +
+
+ +
+
+ )} +
+
+ ) +} + +export function Curtain() { + return
+} + +function Navigation() { + const { topNav } = useConfig() + if (!topNav) return null + + const { pathname } = useLocation() + const activeIds = useActiveNavIds({ pathname, items: topNav }) + + return ( + + + {topNav.map((item, i) => + item.link ? ( + + {item.text} + + ) : item.items ? ( + + + {item.text} + + + + + + ) : null, + )} + + + ) +} + +function NavigationMenuContent({ items }: { items: ParsedTopNavItem[] }) { + const { pathname } = useLocation() + const activeIds = useActiveNavIds({ pathname, items }) + return ( +
    + {items?.map((item, i) => ( + + {item.text} + + ))} +
+ ) +} + +function ThemeToggleButton() { + const { toggle } = useTheme() + return ( + + ) +} + +const iconsForIcon = { + discord: Discord, + github: GitHub, + telegram: Telegram, + warpcast: Warpcast, + x: X, +} satisfies Record + +const sizesForType = { + discord: '23px', + github: '20px', + telegram: '21px', + warpcast: '20px', + x: '18px', +} satisfies Record + +function SocialButton({ icon, label, link }: ParsedSocialItem) { + return ( + + + + ) +} diff --git a/app/components/ExternalLink.css.ts b/app/components/ExternalLink.css.ts new file mode 100644 index 00000000..4d94a8b1 --- /dev/null +++ b/app/components/ExternalLink.css.ts @@ -0,0 +1,20 @@ +import { createVar, style } from '@vanilla-extract/css' + +export const arrowColor = createVar('arrowColor') +export const iconUrl = createVar('iconUrl') + +export const root = style({ + selectors: { + '&::after': { + backgroundColor: 'currentColor', + content: '', + color: arrowColor, + display: 'inline-block', + height: '0.5em', + marginLeft: '0.325em', + marginRight: '0.25em', + width: '0.5em', + mask: `${iconUrl} no-repeat center / contain`, + }, + }, +}) diff --git a/app/components/ExternalLink.tsx b/app/components/ExternalLink.tsx new file mode 100644 index 00000000..d2e0113b --- /dev/null +++ b/app/components/ExternalLink.tsx @@ -0,0 +1,36 @@ +import { clsx } from 'clsx' + +import { assignInlineVars } from '@vanilla-extract/dynamic' +import { forwardRef } from 'react' +import { useConfig } from '../hooks/useConfig.js' +import * as styles from './ExternalLink.css.js' + +export type ExternalLinkProps = React.DetailedHTMLProps< + React.AnchorHTMLAttributes, + HTMLAnchorElement +> & { hideExternalIcon?: boolean } + +export const ExternalLink = forwardRef( + ({ className, children, hideExternalIcon, href, ...props }: ExternalLinkProps, ref) => { + const { basePath } = useConfig() + const assetBasePath = import.meta.env.PROD ? basePath : '' + return ( + + {children} + + ) + }, +) diff --git a/app/components/Footer.css.ts b/app/components/Footer.css.ts new file mode 100644 index 00000000..0ab2e889 --- /dev/null +++ b/app/components/Footer.css.ts @@ -0,0 +1,141 @@ +import { createVar, style } from '@vanilla-extract/css' + +import { + contentVars, + fontSizeVars, + fontWeightVars, + primitiveColorVars, + spaceVars, + viewportVars, +} from '../styles/vars.css.js' + +const iconWidthVar = createVar('iconWidth') + +export const root = style({ + display: 'flex', + flexDirection: 'column', + gap: spaceVars['32'], + maxWidth: contentVars.width, + overflowX: 'hidden', + padding: `${spaceVars['28']} ${contentVars.horizontalPadding} ${spaceVars['48']}`, + vars: { + [iconWidthVar]: '24px', + }, +}) + +export const container = style( + { + borderBottom: `1px solid ${primitiveColorVars.border}`, + display: 'flex', + justifyContent: 'space-between', + paddingBottom: spaceVars['16'], + }, + 'container', +) + +export const editLink = style( + { + alignItems: 'center', + display: 'flex', + fontSize: fontSizeVars['14'], + gap: spaceVars['8'], + textDecoration: 'none', + }, + 'editLink', +) + +export const lastUpdated = style( + { + color: primitiveColorVars.text3, + fontSize: fontSizeVars['14'], + }, + 'lastUpdated', +) + +export const navigation = style( + { + display: 'flex', + justifyContent: 'space-between', + }, + 'navigation', +) + +export const navigationIcon = style( + { + width: iconWidthVar, + }, + 'navigationIcon', +) + +export const navigationIcon_left = style( + { + display: 'flex', + '@media': { + [viewportVars['max-720px']]: { + justifyContent: 'center', + }, + }, + }, + 'navigationIcon_left', +) + +export const navigationIcon_right = style( + { + display: 'flex', + justifyContent: 'flex-end', + '@media': { + [viewportVars['max-720px']]: { + justifyContent: 'center', + }, + }, + }, + 'navigationIcon_right', +) + +export const navigationItem = style( + { + display: 'flex', + flexDirection: 'column', + gap: spaceVars['4'], + }, + 'navigationItem', +) + +export const navigationItem_left = style({}, 'navigationItem_left') + +export const navigationItem_right = style( + { + alignItems: 'flex-end', + }, + 'navigationItem_right', +) + +export const navigationText = style( + { + alignItems: 'center', + display: 'flex', + fontSize: fontSizeVars['18'], + fontWeight: fontWeightVars.medium, + '@media': { + [viewportVars['max-720px']]: { + fontSize: fontSizeVars['12'], + }, + }, + }, + 'navigationText', +) + +export const navigationTextInner = style( + { + overflow: 'hidden', + textOverflow: 'ellipsis', + width: '26ch', + whiteSpace: 'pre', + '@media': { + [viewportVars['max-480px']]: { + width: '20ch', + }, + }, + }, + 'navigationTextInner', +) diff --git a/app/components/Footer.tsx b/app/components/Footer.tsx new file mode 100644 index 00000000..f22192a6 --- /dev/null +++ b/app/components/Footer.tsx @@ -0,0 +1,193 @@ +import { Pencil2Icon } from '@radix-ui/react-icons' +import { assignInlineVars } from '@vanilla-extract/dynamic' +import clsx from 'clsx' +import { useEffect, useMemo } from 'react' +import { useLocation, useNavigate } from 'react-router-dom' +import { Footer as ConsumerFooter } from 'virtual:consumer-components' + +import type { SidebarItem } from '../../config.js' +import { useEditLink } from '../hooks/useEditLink.js' +import { useLayout } from '../hooks/useLayout.js' +import { useMounted } from '../hooks/useMounted.js' +import { usePageData } from '../hooks/usePageData.js' +import { useSidebar } from '../hooks/useSidebar.js' +import * as styles from './Footer.css.js' +import { sizeVar } from './Icon.css.js' +import { Icon } from './Icon.js' +import { KeyboardShortcut } from './KeyboardShortcut.js' +import { Link } from './Link.js' +import { ArrowLeft } from './icons/ArrowLeft.js' +import { ArrowRight } from './icons/ArrowRight.js' + +export function Footer() { + const { layout } = useLayout() + const mounted = useMounted() + const pageData = usePageData() + + const lastUpdatedAtDate = useMemo( + () => (pageData.lastUpdatedAt ? new Date(pageData.lastUpdatedAt) : undefined), + [pageData.lastUpdatedAt], + ) + const lastUpdatedAtISOString = useMemo( + () => lastUpdatedAtDate?.toISOString(), + [lastUpdatedAtDate], + ) + + return ( +
+ {layout === 'docs' && ( + <> +
+ + {mounted && pageData.lastUpdatedAt && ( +
+ Last updated:{' '} + +
+ )} +
+ + + )} + +
+ ) +} + +function EditLink() { + const editLink = useEditLink() + + if (!editLink.url) return null + return ( +
+ + {editLink.text} + +
+ ) +} + +function Navigation() { + const mounted = useMounted() + const sidebar = useSidebar() + + const { pathname } = useLocation() + const flattenedSidebar = useMemo( + () => flattenSidebar(sidebar.items || []).filter((item) => item.link), + [sidebar], + ) + const currentPageIndex = useMemo( + () => flattenedSidebar.findIndex((item) => item.link === pathname), + [flattenedSidebar, pathname], + ) + + const [prevPage, nextPage] = useMemo(() => { + if (currentPageIndex < 0) return [] + if (currentPageIndex === 0) return [null, flattenedSidebar[currentPageIndex + 1]] + if (currentPageIndex === flattenedSidebar.length - 1) + return [flattenedSidebar[currentPageIndex - 1], null] + return [flattenedSidebar[currentPageIndex - 1], flattenedSidebar[currentPageIndex + 1]] + }, [currentPageIndex, flattenedSidebar]) + + const navigate = useNavigate() + // biome-ignore lint/correctness/useExhaustiveDependencies: + useEffect(() => { + let index = currentPageIndex + let isListening = false + const keydown = (event: KeyboardEvent) => { + if (event.code === 'ShiftLeft') isListening = true + if (isListening) { + const nextPage = flattenedSidebar[index + 1] + const prevPage = flattenedSidebar[index - 1] + if (event.code === 'ArrowRight' && nextPage?.link) { + navigate(nextPage.link) + index++ + } + if (event.code === 'ArrowLeft' && prevPage?.link) { + navigate(prevPage.link) + index-- + } + } + } + const keyup = (event: KeyboardEvent) => { + if (event.code === 'ShiftLeft') isListening = false + } + + window.addEventListener('keydown', keydown) + window.addEventListener('keyup', keyup) + return () => { + window.removeEventListener('keydown', keydown) + window.removeEventListener('keyup', keyup) + } + }, []) + + if (!mounted) return null + return ( +
+ {prevPage ? ( + +
+
+ +
+
{prevPage.text}
+
+ {/* TODO: Place in hover card */} + + + ) : ( +
+ )} + {nextPage ? ( + +
+
+ {nextPage.text} +
+
+ +
+
+ {/* TODO: Place in hover card */} + + + ) : ( +
+ )} +
+ ) +} + +function flattenSidebar(sidebar: SidebarItem[]) { + const items: SidebarItem[] = [] + + for (const item of sidebar) { + if (item.link) { + items.push(item) + } + if (item.items) { + items.push(...flattenSidebar(item.items)) + } + } + + return items +} diff --git a/app/components/HomePage.css.ts b/app/components/HomePage.css.ts new file mode 100644 index 00000000..44c6da37 --- /dev/null +++ b/app/components/HomePage.css.ts @@ -0,0 +1,117 @@ +import { style } from '@vanilla-extract/css' +import { + fontFamilyVars, + fontSizeVars, + fontWeightVars, + lineHeightVars, + primitiveColorVars, + spaceVars, + viewportVars, +} from '../styles/vars.css.js' + +export const root = style({ + alignItems: 'center', + display: 'flex', + flexDirection: 'column', + paddingTop: spaceVars['64'], + textAlign: 'center', + gap: spaceVars['32'], + '@media': { + [viewportVars['max-720px']]: { + paddingTop: spaceVars['32'], + }, + }, +}) + +export const logo = style( + { + display: 'flex', + justifyContent: 'center', + height: '48px', + '@media': { + [viewportVars['max-720px']]: { + height: '36px', + }, + }, + }, + 'logo', +) + +export const title = style( + { + fontSize: fontSizeVars['64'], + fontWeight: fontWeightVars.semibold, + lineHeight: '1em', + }, + 'title', +) + +export const tagline = style( + { + color: primitiveColorVars.text2, + fontSize: fontSizeVars['20'], + fontWeight: fontWeightVars.medium, + lineHeight: '1.5em', + selectors: { + [`${title} + &`]: { + marginTop: `calc(-1 * ${spaceVars['8']})`, + }, + }, + }, + 'tagline', +) + +export const description = style( + { + color: primitiveColorVars.text, + fontSize: fontSizeVars['16'], + fontWeight: fontWeightVars.regular, + lineHeight: lineHeightVars.paragraph, + selectors: { + [`${tagline} + &`]: { + marginTop: `calc(-1 * ${spaceVars['8']})`, + }, + }, + }, + 'description', +) + +export const buttons = style( + { + display: 'flex', + gap: spaceVars['16'], + }, + 'buttons', +) + +export const button = style({}, 'button') + +export const tabs = style( + { + minWidth: '300px', + }, + 'tabs', +) + +export const tabsList = style( + { + display: 'flex', + justifyContent: 'center', + }, + 'tabsList', +) + +export const tabsContent = style( + { + color: primitiveColorVars.text2, + fontFamily: fontFamilyVars.mono, + }, + 'tabsContent', +) + +export const packageManager = style( + { + color: primitiveColorVars.textAccent, + }, + 'packageManager', +) diff --git a/app/components/HomePage.tsx b/app/components/HomePage.tsx new file mode 100644 index 00000000..98789e20 --- /dev/null +++ b/app/components/HomePage.tsx @@ -0,0 +1,71 @@ +import clsx from 'clsx' +import type { ReactNode } from 'react' + +import { useConfig } from '../hooks/useConfig.js' +import { Button as Button_, type ButtonProps } from './Button.js' +import * as styles from './HomePage.css.js' +import { Logo as Logo_ } from './Logo.js' +import * as Tabs from './Tabs.js' + +export type HomePageProps = { + description?: ReactNode + tagline?: ReactNode +} + +export function Root({ children, className }: { children: ReactNode; className?: string }) { + return
{children}
+} + +export function Logo({ className }: { className?: string }) { + const { logoUrl, title } = useConfig() + return logoUrl ? ( +
+ +
+ ) : ( +

{title}

+ ) +} + +export function Tagline({ children, className }: { children: ReactNode; className?: string }) { + return
{children}
+} + +export function Description({ children, className }: { children: ReactNode; className?: string }) { + return
{children}
+} + +export function Buttons({ children, className }: { children: ReactNode; className?: string }) { + return
{children}
+} + +export function Button(props: ButtonProps) { + return +} + +export function InstallPackage({ + name, + type = 'install', +}: { children: ReactNode; className?: string; name: string; type?: 'install' | 'init' }) { + return ( + + + npm + pnpm + yarn + + + npm {type === 'init' ? 'init' : 'install'}{' '} + {name} + + + pnpm {type === 'init' ? 'create' : 'add'}{' '} + {name} + + + yarn {type === 'init' ? 'create' : 'add'}{' '} + {name} + + + ) +} diff --git a/app/components/Icon.css.ts b/app/components/Icon.css.ts new file mode 100644 index 00000000..9df2655e --- /dev/null +++ b/app/components/Icon.css.ts @@ -0,0 +1,11 @@ +import { createVar, style } from '@vanilla-extract/css' + +export const sizeVar = createVar('size') +export const srcVar = createVar('src') + +export const root = style({ + alignItems: 'center', + display: 'flex', + height: sizeVar, + width: sizeVar, +}) diff --git a/app/components/Icon.tsx b/app/components/Icon.tsx new file mode 100644 index 00000000..6273536d --- /dev/null +++ b/app/components/Icon.tsx @@ -0,0 +1,28 @@ +import { assignInlineVars } from '@vanilla-extract/dynamic' + +import clsx from 'clsx' +import * as styles from './Icon.css.js' + +export type IconProps = { + className?: string + label: string + icon: React.ElementType + size?: string + style?: React.CSSProperties +} + +export function Icon({ className, label, icon: Icon, size, style }: IconProps) { + return ( +
+ +
+ ) +} diff --git a/app/components/KeyboardShortcut.css.ts b/app/components/KeyboardShortcut.css.ts new file mode 100644 index 00000000..1cb93f4b --- /dev/null +++ b/app/components/KeyboardShortcut.css.ts @@ -0,0 +1,24 @@ +import { style } from '@vanilla-extract/css' + +import { fontSizeVars, spaceVars, viewportVars } from '../styles/vars.css.js' + +export const root = style({ + alignItems: 'center', + display: 'inline-flex', + gap: spaceVars[6], + fontSize: fontSizeVars[12], + '@media': { + [viewportVars['max-720px']]: { + display: 'none', + }, + }, +}) + +export const kbdGroup = style( + { + alignItems: 'center', + display: 'inline-flex', + gap: spaceVars[3], + }, + 'kbdGroup', +) diff --git a/app/components/KeyboardShortcut.tsx b/app/components/KeyboardShortcut.tsx new file mode 100644 index 00000000..ce79aac5 --- /dev/null +++ b/app/components/KeyboardShortcut.tsx @@ -0,0 +1,21 @@ +import { Kbd } from './mdx/Kbd.js' + +import * as styles from './KeyboardShortcut.css.js' + +export function KeyboardShortcut(props: { + description: string + keys: string[] +}) { + const { description, keys } = props + return ( + + {description} + + + {keys.map((key) => ( + {key} + ))} + + + ) +} diff --git a/app/components/Link.css.ts b/app/components/Link.css.ts new file mode 100644 index 00000000..0b103a7b --- /dev/null +++ b/app/components/Link.css.ts @@ -0,0 +1,36 @@ +import { style } from '@vanilla-extract/css' + +import { + fontWeightVars, + primitiveColorVars, + semanticColorVars, + spaceVars, +} from '../styles/vars.css.js' +import { arrowColor } from './ExternalLink.css.js' + +export const root = style({}) + +export const accent_underlined = style( + { + color: semanticColorVars.link, + fontWeight: fontWeightVars.medium, + textUnderlineOffset: spaceVars['2'], + textDecoration: 'underline', + transition: 'color 0.1s', + selectors: { + '&:hover': { + color: semanticColorVars.linkHover, + }, + }, + }, + 'accent_underlined', +) + +export const styleless = style( + { + vars: { + [arrowColor]: primitiveColorVars.text3, + }, + }, + 'styleless', +) diff --git a/app/components/Link.tsx b/app/components/Link.tsx new file mode 100644 index 00000000..254def65 --- /dev/null +++ b/app/components/Link.tsx @@ -0,0 +1,55 @@ +import { clsx } from 'clsx' +import { forwardRef } from 'react' + +import { useLocation } from 'react-router-dom' +import { ExternalLink } from './ExternalLink.js' +import * as styles from './Link.css.js' +import { RouterLink, type RouterLinkProps } from './RouterLink.js' + +type LinkProps = { + children: React.ReactNode + className?: string + hideExternalIcon?: boolean + onClick?: () => void + href?: string + variant?: 'accent underlined' | 'styleless' +} + +export const Link = forwardRef((props: LinkProps, ref) => { + const { href, variant = 'accent underlined' } = props + + const { pathname } = useLocation() + + // External links + if (href?.match(/^(www|https?)/)) + return ( + + ) + + // Internal links + const [before, after] = (href || '').split('#') + const to = `${before ? before : pathname}${after ? `#${after}` : ''}` + return ( + + ) +}) diff --git a/app/components/Logo.css.ts b/app/components/Logo.css.ts new file mode 100644 index 00000000..15cb213d --- /dev/null +++ b/app/components/Logo.css.ts @@ -0,0 +1,13 @@ +import { globalStyle, style } from '@vanilla-extract/css' + +export const root = style({}) + +export const logoDark = style({}, 'logoDark') +globalStyle(`:root:not(.dark) ${logoDark}`, { + display: 'none', +}) + +export const logoLight = style({}, 'logoLight') +globalStyle(`:root.dark ${logoLight}`, { + display: 'none', +}) diff --git a/app/components/Logo.tsx b/app/components/Logo.tsx new file mode 100644 index 00000000..b9d7d642 --- /dev/null +++ b/app/components/Logo.tsx @@ -0,0 +1,30 @@ +import clsx from 'clsx' + +import { useConfig } from '../hooks/useConfig.js' +import * as styles from './Logo.css.js' + +export function Logo({ className }: { className?: string }) { + const { logoUrl } = useConfig() + + if (!logoUrl) return null + return ( + <> + {typeof logoUrl === 'string' ? ( + Logo + ) : ( + <> + Logo + Logo + + )} + + ) +} diff --git a/app/components/MobileSearch.css.ts b/app/components/MobileSearch.css.ts new file mode 100644 index 00000000..63bc1f79 --- /dev/null +++ b/app/components/MobileSearch.css.ts @@ -0,0 +1,15 @@ +import { style } from '@vanilla-extract/css' + +import { primitiveColorVars, spaceVars } from '../styles/vars.css.js' + +export const searchButton = style( + { + alignItems: 'center', + display: 'flex', + color: primitiveColorVars.text, + height: spaceVars[28], + justifyContent: 'center', + width: spaceVars[28], + }, + 'searchButton', +) diff --git a/app/components/MobileSearch.tsx b/app/components/MobileSearch.tsx new file mode 100644 index 00000000..a14950d2 --- /dev/null +++ b/app/components/MobileSearch.tsx @@ -0,0 +1,22 @@ +import { useState } from 'react' +import { MagnifyingGlassIcon } from '@radix-ui/react-icons' +import * as Dialog from '@radix-ui/react-dialog' + +import * as styles from './MobileSearch.css.js' +import { SearchDialog } from './SearchDialog.js' + +export function MobileSearch() { + const [open, setOpen] = useState(false) + + return ( + + + + + + setOpen(false)} /> + + ) +} diff --git a/app/components/MobileTopNav.css.ts b/app/components/MobileTopNav.css.ts new file mode 100644 index 00000000..68eb19b1 --- /dev/null +++ b/app/components/MobileTopNav.css.ts @@ -0,0 +1,322 @@ +import { createVar, keyframes, style } from '@vanilla-extract/css' +import { + borderRadiusVars, + contentVars, + fontSizeVars, + fontWeightVars, + lineHeightVars, + primitiveColorVars, + sidebarVars, + spaceVars, + topNavVars, + viewportVars, +} from '../styles/vars.css.js' + +const fadeIn = keyframes( + { + from: { + opacity: 0, + }, + to: { + opacity: 1, + }, + }, + 'fadeIn', +) + +export const root = style({ + alignItems: 'center', + backgroundColor: primitiveColorVars.backgroundDark, + borderBottom: `1px solid ${primitiveColorVars.border}`, + display: 'none', + height: '100%', + justifyContent: 'space-between', + padding: `${spaceVars['0']} ${contentVars.horizontalPadding}`, + width: '100%', + '@media': { + [viewportVars['max-1080px']]: { + display: 'flex', + }, + }, +}) + +export const button = style( + { + borderRadius: borderRadiusVars[4], + padding: spaceVars[8], + }, + 'button', +) + +export const content = style( + { + left: `calc(-1 * ${spaceVars['24']})`, + }, + 'content', +) + +export const curtain = style( + { + alignItems: 'center', + backgroundColor: primitiveColorVars.backgroundDark, + borderBottom: `1px solid ${primitiveColorVars.border}`, + display: 'none', + justifyContent: 'space-between', + fontSize: fontSizeVars['13'], + fontWeight: fontWeightVars.medium, + height: '100%', + padding: `${spaceVars['0']} ${contentVars.horizontalPadding}`, + width: '100%', + '@media': { + [viewportVars['max-1080px']]: { + display: 'flex', + }, + }, + }, + 'curtain', +) + +export const curtainGroup = style( + { + alignItems: 'center', + display: 'flex', + gap: spaceVars['12'], + }, + 'curtainGroup', +) + +export const curtainItem = style({}, 'curtainItem') + +export const divider = style( + { + backgroundColor: primitiveColorVars.border, + height: '35%', + width: '1px', + }, + 'divider', +) + +export const group = style({ alignItems: 'center', display: 'flex', height: '100%' }, 'group') + +export const icon = style( + { + color: primitiveColorVars.text2, + transition: 'color 0.1s', + selectors: { + [`${button}:hover &`]: { + color: primitiveColorVars.text, + }, + }, + }, + 'icon', +) + +export const item = style( + { + position: 'relative', + }, + 'item', +) + +export const logo = style( + { + alignItems: 'center', + display: 'flex', + height: topNavVars.height, + }, + 'logo', +) + +export const logoImage = style( + { + height: '30%', + }, + 'logoImage', +) + +export const menuTrigger = style( + { + alignItems: 'center', + display: 'flex', + gap: spaceVars['8'], + }, + 'menuTrigger', +) + +export const menuTitle = style( + { + maxWidth: '22ch', + overflow: 'hidden', + textAlign: 'left', + textOverflow: 'ellipsis', + whiteSpace: 'pre', + }, + 'menuTitle', +) + +export const navigation_compact = style({}, 'navigation_compact') + +export const navigation = style( + { + marginLeft: spaceVars[8], + selectors: { + [`&:not(${navigation_compact})`]: { + '@media': { + [viewportVars['max-720px']]: { + display: 'none', + }, + }, + }, + [`&${navigation_compact}`]: { + '@media': { + [viewportVars['min-720px']]: { + display: 'none', + }, + }, + }, + }, + }, + 'navigation', +) + +export const navigationContent = style( + { + display: 'flex', + flexDirection: 'column', + marginLeft: spaceVars[8], + }, + 'navigationContent', +) + +export const navigationItem = style( + { + alignItems: 'center', + display: 'flex', + justifyContent: 'flex-start', + fontSize: fontSizeVars[14], + fontWeight: fontWeightVars.medium, + width: '100%', + selectors: { + '&:hover': { color: primitiveColorVars.textAccent }, + '&[data-active="true"]': { color: primitiveColorVars.textAccent }, + '&[data-state="open"]': { color: primitiveColorVars.textAccent }, + }, + }, + 'navigationItem', +) + +export const chevronDownIcon = createVar('chevronDownIcon') +export const chevronUpIcon = createVar('chevronUpIcon') + +export const navigationTrigger = style( + { + selectors: { + '&::after': { + backgroundColor: 'currentColor', + content: '', + display: 'inline-block', + height: '0.625em', + marginLeft: '0.325em', + width: '0.625em', + mask: `${chevronDownIcon} no-repeat center / contain`, + }, + '&[data-state="open"]::after': { + mask: `${chevronUpIcon} no-repeat center / contain`, + }, + }, + }, + 'trigger', +) + +export const outlineTrigger = style( + { + animation: `${fadeIn} 500ms cubic-bezier(0.16, 1, 0.3, 1)`, + alignItems: 'center', + color: primitiveColorVars.text2, + display: 'flex', + gap: spaceVars['6'], + selectors: { + '&[data-state="open"]': { + color: primitiveColorVars.textAccent, + }, + }, + }, + 'outlineTrigger', +) + +export const outlinePopover = style( + { + display: 'none', + overflowY: 'scroll', + padding: spaceVars['16'], + maxHeight: '80vh', + '@media': { + [viewportVars['max-1080px']]: { + display: 'block', + maxWidth: '300px', + }, + }, + }, + 'outlinePopover', +) + +export const section = style( + { + alignItems: 'center', + display: 'flex', + height: '100%', + gap: spaceVars[16], + }, + 'section', +) + +export const separator = style( + { + backgroundColor: primitiveColorVars.border, + height: '1.75em', + width: '1px', + }, + 'separator', +) + +export const sidebarPopover = style( + { + display: 'none', + overflowY: 'scroll', + padding: `0 ${sidebarVars.horizontalPadding}`, + maxHeight: '80vh', + width: sidebarVars.width, + '@media': { + [viewportVars['max-1080px']]: { + display: 'block', + }, + }, + }, + 'sidebarPopover', +) + +export const title = style( + { + fontSize: fontSizeVars['18'], + fontWeight: fontWeightVars.semibold, + lineHeight: lineHeightVars.heading, + }, + 'title', +) + +export const topNavPopover = style( + { + display: 'none', + overflowY: 'scroll', + padding: `${sidebarVars.verticalPadding} ${sidebarVars.horizontalPadding}`, + maxHeight: '80vh', + width: sidebarVars.width, + '@media': { + [viewportVars['max-1080px']]: { + display: 'flex', + flexDirection: 'column', + }, + }, + }, + 'topNavPopover', +) diff --git a/app/components/MobileTopNav.tsx b/app/components/MobileTopNav.tsx new file mode 100644 index 00000000..963899a1 --- /dev/null +++ b/app/components/MobileTopNav.tsx @@ -0,0 +1,321 @@ +import * as Accordion from '@radix-ui/react-accordion' +import { assignInlineVars } from '@vanilla-extract/dynamic' +import clsx from 'clsx' +import { type ComponentType, useMemo, useState } from 'react' +import { useLocation } from 'react-router-dom' + +import type * as Config from '../../config.js' +import { useActiveNavIds } from '../hooks/useActiveNavIds.js' +import { useConfig } from '../hooks/useConfig.js' +import { useLayout } from '../hooks/useLayout.js' +import { usePageData } from '../hooks/usePageData.js' +import { useSidebar } from '../hooks/useSidebar.js' +import { Icon } from './Icon.js' +import { Link } from './Link.js' +import { MobileSearch } from './MobileSearch.js' +import * as styles from './MobileTopNav.css.js' +import { NavLogo } from './NavLogo.js' +import * as NavigationMenu from './NavigationMenu.js' +import { Outline } from './Outline.js' +import { Popover } from './Popover.js' +import { RouterLink } from './RouterLink.js' +import { Sidebar } from './Sidebar.js' +import { ChevronDown } from './icons/ChevronDown.js' +import { ChevronRight } from './icons/ChevronRight.js' +import { ChevronUp } from './icons/ChevronUp.js' +import { Discord } from './icons/Discord.js' +import { GitHub } from './icons/GitHub.js' +import { Menu } from './icons/Menu.js' +import { Telegram } from './icons/Telegram.js' +import { Warpcast } from './icons/Warpcast.js' +import { X } from './icons/X.js' + +MobileTopNav.Curtain = Curtain + +export function MobileTopNav() { + const config = useConfig() + const { showLogo } = useLayout() + + return ( +
+
+ {showLogo && ( +
+
+ + + +
+
+ )} + {config.topNav && ( + <> +
+ + +
+ + )} +
+ +
+
+ +
+ {config.socials && config.socials?.length > 0 && ( + <> +
+
+ {config.socials?.map((social, i) => ( + + ))} +
+ + )} +
+
+ ) +} + +function Navigation({ items }: { items: Config.ParsedTopNavItem[] }) { + const { pathname } = useLocation() + const activeIds = useActiveNavIds({ pathname, items }) + return ( + + + {items.map((item, i) => + item?.link ? ( + + {item.text} + + ) : ( + + + {item.text} + + + + + + ), + )} + + + ) +} + +function NavigationMenuContent({ items }: { items: Config.ParsedTopNavItem[] }) { + const { pathname } = useLocation() + const activeIds = useActiveNavIds({ pathname, items }) + return ( +
    + {items?.map((item, i) => ( + + {item.text} + + ))} +
+ ) +} + +function CompactNavigation({ items }: { items: Config.ParsedTopNavItem[] }) { + const [showPopover, setShowPopover] = useState(false) + + const { pathname } = useLocation() + const activeIds = useActiveNavIds({ pathname, items }) + const activeItem = items.filter((item) => item.id === activeIds[0])[0] + + const { basePath } = useConfig() + const assetBasePath = import.meta.env.PROD ? basePath : '' + + return ( +
+ {activeItem ? ( + + + {activeItem.text} + + + + + {items.map((item, i) => + item?.link ? ( + setShowPopover(false)} + variant="styleless" + > + {item.text} + + ) : ( + + + {item.text} + + + {item.items?.map((item, i) => ( + setShowPopover(false)} + variant="styleless" + > + {item.text} + + ))} + + + ), + )} + + + + ) : items[0]?.link ? ( + + {items[0].text} + + ) : null} +
+ ) +} + +const iconsForIcon = { + discord: Discord, + github: GitHub, + telegram: Telegram, + warpcast: Warpcast, + x: X, +} satisfies Record + +const sizesForTypes = { + discord: '21px', + github: '18px', + telegram: '21px', + warpcast: '18px', + x: '16px', +} satisfies Record + +function SocialButton({ icon, label, link, type }: Config.ParsedSocialItem) { + return ( + + + + ) +} + +export function Curtain({ + enableScrollToTop, +}: { + enableScrollToTop?: boolean +}) { + const { pathname } = useLocation() + const { layout, showSidebar } = useLayout() + const { frontmatter = {} } = usePageData() + const sidebar = useSidebar() + + const [isOutlineOpen, setOutlineOpen] = useState(false) + const [isSidebarOpen, setSidebarOpen] = useState(false) + + const sidebarItemTitle = useMemo(() => { + if (!sidebar || layout === 'minimal') return + const sidebarItem = getSidebarItemFromPathname({ + sidebarItems: sidebar.items, + pathname, + }) + return sidebarItem?.text + }, [layout, pathname, sidebar]) + + const contentTitle = useMemo(() => { + if (typeof window === 'undefined') return + return document.querySelector('.vocs_Content h1')?.textContent + }, []) + + const title = sidebarItemTitle || frontmatter.title || contentTitle + + return ( +
+
+
+ {showSidebar ? ( + + + +
{title}
+
+ + setSidebarOpen(false)} /> + +
+ ) : ( + title + )} +
+
+
+ {enableScrollToTop && ( + <> +
+ +
+
+ + )} + {layout === 'docs' && ( +
+ + + On this page + + + + setOutlineOpen(false)} showTitle={false} /> + + +
+ )} +
+
+ ) +} + +function getSidebarItemFromPathname({ + sidebarItems, + pathname: pathname_, +}: { sidebarItems: Config.SidebarItem[]; pathname: string }): Config.SidebarItem | undefined { + const pathname = pathname_.replace(/(.+)\/$/, '$1') + for (const item of sidebarItems) { + if (item?.link === pathname) return item + if (item.items) { + const childItem = getSidebarItemFromPathname({ sidebarItems: item.items, pathname }) + if (childItem) return childItem + } + } + return undefined +} diff --git a/app/components/NavLogo.css.ts b/app/components/NavLogo.css.ts new file mode 100644 index 00000000..446cb342 --- /dev/null +++ b/app/components/NavLogo.css.ts @@ -0,0 +1,19 @@ +import { style } from '@vanilla-extract/css' +import { fontSizeVars, fontWeightVars, lineHeightVars } from '../styles/vars.css.js' + +export const logoImage = style( + { + height: '50%', + width: 'auto', + }, + 'logoImage', +) + +export const title = style( + { + fontSize: fontSizeVars['18'], + fontWeight: fontWeightVars.semibold, + lineHeight: lineHeightVars.heading, + }, + 'title', +) diff --git a/app/components/NavLogo.tsx b/app/components/NavLogo.tsx new file mode 100644 index 00000000..a63e0118 --- /dev/null +++ b/app/components/NavLogo.tsx @@ -0,0 +1,10 @@ +import { useConfig } from '../hooks/useConfig.js' +import { Logo } from './Logo.js' +import * as styles from './NavLogo.css.js' + +export function NavLogo() { + const config = useConfig() + + if (config.logoUrl) return + return
{config.title}
+} diff --git a/app/components/NavigationMenu.css.ts b/app/components/NavigationMenu.css.ts new file mode 100644 index 00000000..c2f3ec37 --- /dev/null +++ b/app/components/NavigationMenu.css.ts @@ -0,0 +1,91 @@ +import { createVar, keyframes, style } from '@vanilla-extract/css' +import { + borderRadiusVars, + fontSizeVars, + fontWeightVars, + primitiveColorVars, + spaceVars, + zIndexVars, +} from '../styles/vars.css.js' + +const fadeIn = keyframes( + { + from: { + opacity: 0, + transform: 'translateY(-6px)', + }, + to: { + opacity: 1, + transform: 'translateY(0px)', + }, + }, + 'fadeIn', +) + +export const root = style({}) + +export const list = style( + { + display: 'flex', + gap: spaceVars[20], + }, + 'list', +) + +export const link = style( + { + alignItems: 'center', + display: 'flex', + fontSize: fontSizeVars[14], + fontWeight: fontWeightVars.medium, + height: '100%', + selectors: { + '&:hover': { color: primitiveColorVars.textAccent }, + '&[data-active="true"]': { color: primitiveColorVars.textAccent }, + }, + }, + 'link', +) + +export const item = style({}, 'item') + +export const chevronDownIcon = createVar('chevronDownIcon') + +export const trigger = style( + [ + link, + { + selectors: { + '&::after': { + backgroundColor: 'currentColor', + content: '', + color: primitiveColorVars.text3, + display: 'inline-block', + height: '0.625em', + marginLeft: '0.325em', + width: '0.625em', + mask: `${chevronDownIcon} no-repeat center / contain`, + }, + }, + }, + ], + 'trigger', +) + +export const content = style( + { + backgroundColor: primitiveColorVars.background2, + border: `1px solid ${primitiveColorVars.border}`, + borderRadius: borderRadiusVars[4], + boxShadow: `0 3px 10px ${primitiveColorVars.shadow}`, + display: 'flex', + flexDirection: 'column', + padding: `${spaceVars['12']} ${spaceVars['16']}`, + position: 'absolute', + top: `calc(100% + ${spaceVars['8']})`, + minWidth: '200px', + zIndex: zIndexVars.popover, + animation: `${fadeIn} 500ms cubic-bezier(0.16, 1, 0.3, 1)`, + }, + 'content', +) diff --git a/app/components/NavigationMenu.tsx b/app/components/NavigationMenu.tsx new file mode 100644 index 00000000..40f776d6 --- /dev/null +++ b/app/components/NavigationMenu.tsx @@ -0,0 +1,68 @@ +import * as NavigationMenu from '@radix-ui/react-navigation-menu' +import { assignInlineVars } from '@vanilla-extract/dynamic' +import clsx from 'clsx' +import type { ReactNode } from 'react' + +import { useConfig } from '../hooks/useConfig.js' +import { Link as Link_ } from './Link.js' +import * as styles from './NavigationMenu.css.js' + +export const Root = (props: NavigationMenu.NavigationMenuProps) => ( + +) + +export const List = (props: NavigationMenu.NavigationMenuListProps) => ( + +) + +export const Link = ({ + active, + children, + className, + href, +}: { + active?: boolean + children: ReactNode + className?: string + href?: string +}) => ( + + + {children} + + +) + +export const Item = (props: NavigationMenu.NavigationMenuItemProps) => ( + +) + +export const Trigger = ({ + active, + className, + ...props +}: NavigationMenu.NavigationMenuTriggerProps & { + active?: boolean +}) => { + const { basePath } = useConfig() + const assetBasePath = import.meta.env.PROD ? basePath : '' + return ( + + ) +} + +export const Content = (props: NavigationMenu.NavigationMenuContentProps) => ( + +) diff --git a/app/components/NotFound.css.ts b/app/components/NotFound.css.ts new file mode 100644 index 00000000..ce4ca1ba --- /dev/null +++ b/app/components/NotFound.css.ts @@ -0,0 +1,19 @@ +import { style } from '@vanilla-extract/css' +import { primitiveColorVars, spaceVars } from '../styles/vars.css.js' + +export const root = style({ + alignItems: 'center', + display: 'flex', + flexDirection: 'column', + maxWidth: '400px', + margin: '0 auto', + paddingTop: spaceVars['64'], +}) + +export const divider = style( + { + borderColor: primitiveColorVars.border, + width: '50%', + }, + 'divider', +) diff --git a/app/components/NotFound.tsx b/app/components/NotFound.tsx new file mode 100644 index 00000000..5463eae0 --- /dev/null +++ b/app/components/NotFound.tsx @@ -0,0 +1,19 @@ +import { spaceVars } from '../styles/vars.css.js' +import { Link } from './Link.js' +import * as styles from './NotFound.css.js' +import { H1 } from './mdx/H1.js' +import { Paragraph } from './mdx/Paragraph.js' + +export function NotFound() { + return ( +
+

Page Not Found

+
+
+
+ The page you were looking for could not be found. +
+ Go to Home Page +
+ ) +} diff --git a/app/components/Outline.css.ts b/app/components/Outline.css.ts new file mode 100644 index 00000000..be2e841c --- /dev/null +++ b/app/components/Outline.css.ts @@ -0,0 +1,85 @@ +import { style } from '@vanilla-extract/css' + +import { gutterRight as DocsLayout_gutterRight } from '../layouts/DocsLayout.css.js' + +import { + fontSizeVars, + fontWeightVars, + lineHeightVars, + primitiveColorVars, + spaceVars, +} from '../styles/vars.css.js' + +export const root = style({ + width: '100%', +}) + +export const nav = style( + { + display: 'flex', + flexDirection: 'column', + gap: spaceVars[8], + selectors: { + [`${DocsLayout_gutterRight} &`]: { + borderLeft: `1px solid ${primitiveColorVars.border}`, + paddingLeft: spaceVars[16], + }, + }, + }, + 'nav', +) + +export const heading = style( + { + color: primitiveColorVars.title, + fontSize: fontSizeVars[13], + fontWeight: fontWeightVars.semibold, + lineHeight: lineHeightVars.heading, + letterSpacing: '0.025em', + }, + 'heading', +) + +export const items = style( + { + selectors: { + '& &': { + paddingLeft: spaceVars[12], + }, + }, + }, + 'items', +) + +export const item = style( + { + lineHeight: lineHeightVars.outlineItem, + marginBottom: spaceVars[8], + overflow: 'hidden', + textOverflow: 'ellipsis', + // @ts-expect-error + textWrap: 'nowrap', + }, + 'item', +) + +export const link = style( + { + color: primitiveColorVars.text2, + fontWeight: fontWeightVars.medium, + fontSize: fontSizeVars[13], + transition: 'color 0.1s', + selectors: { + '&[data-active="true"]': { + color: primitiveColorVars.textAccent, + }, + '&[data-active="true"]:hover': { + color: primitiveColorVars.textAccentHover, + }, + '&:hover': { + color: primitiveColorVars.text, + }, + }, + }, + 'link', +) diff --git a/app/components/Outline.tsx b/app/components/Outline.tsx new file mode 100644 index 00000000..cf9024a5 --- /dev/null +++ b/app/components/Outline.tsx @@ -0,0 +1,254 @@ +import { Fragment, useEffect, useMemo, useRef, useState, type ReactElement } from 'react' +import { Link, useLocation } from 'react-router-dom' + +import { useConfig } from '../hooks/useConfig.js' +import { useLayout } from '../hooks/useLayout.js' +import { debounce } from '../utils/debounce.js' +import { deserializeElement } from '../utils/deserializeElement.js' +import * as styles from './Outline.css.js' +import { root as Heading, slugTarget } from './mdx/Heading.css.js' + +type OutlineItems = { + id: string + level: number + slugTargetElement: Element + topOffset: number + text: string | null +}[] + +export function Outline({ + minLevel = 2, + maxLevel: maxLevel_ = 3, + highlightActive = true, + onClickItem, + showTitle = true, +}: { + minLevel?: number + maxLevel?: number + highlightActive?: boolean + onClickItem?: () => void + showTitle?: boolean +} = {}) { + const { outlineFooter } = useConfig() + + const { showOutline } = useLayout() + const maxLevel = (() => { + if (typeof showOutline === 'number') return minLevel + showOutline - 1 + return maxLevel_ + })() + + const active = useRef(true) + + const { pathname, hash } = useLocation() + + const [headingElements, setHeadingElements] = useState([]) + // biome-ignore lint/correctness/useExhaustiveDependencies: + useEffect(() => { + if (typeof window === 'undefined') return + const elements = Array.from(document.querySelectorAll(`.${Heading}`)) + setHeadingElements(elements) + }, [pathname]) + + const items = useMemo(() => { + if (!headingElements) return [] + + return headingElements + .map((element) => { + const slugTargetElement = element.querySelector(`.${slugTarget}`) + if (!slugTargetElement) return null + + const box = slugTargetElement.getBoundingClientRect() + + const id = slugTargetElement.id + const level = Number(element.tagName[1]) + const text = element.textContent + const topOffset = window.scrollY + box.top + + if (level < minLevel || level > maxLevel) return null + + return { + id, + level, + slugTargetElement, + text, + topOffset, + } + }) + .filter(Boolean) as OutlineItems + }, [headingElements, maxLevel, minLevel]) + + const [activeId, setActiveId] = useState(hash.replace('#', '')) + + // As the user scrolls the page, we want to make the corresponding outline item active. + useEffect(() => { + if (typeof window === 'undefined') return + + const observer = new IntersectionObserver( + ([entry]) => { + if (!active.current) return + + const id = entry.target.id + + if (entry.isIntersecting) setActiveId(id) + else { + const box = entry.target.getBoundingClientRect() + const isVisible = box.top > 0 + if (!isVisible) return + + const activeIndex = items.findIndex((item) => item.id === activeId) + const previousId = items[activeIndex - 1]?.id + setActiveId(previousId) + } + }, + { + rootMargin: '0px 0px -95% 0px', + }, + ) + + for (const item of items) observer.observe(item.slugTargetElement) + + return () => observer.disconnect() + }, [activeId, items]) + + // When the user hits the bottom of the page, we want to make the last outline item active. + useEffect(() => { + if (typeof window === 'undefined') return + + const observer = new IntersectionObserver(([entry]) => { + if (!active.current) return + + const lastItemId = items[items.length - 1]?.id + + if (entry.isIntersecting) setActiveId(lastItemId) + else if (activeId === lastItemId) setActiveId(items[items.length - 2].id) + }) + + observer.observe(document.querySelector('[data-bottom-observer]')!) + + return () => observer.disconnect() + }, [activeId, items]) + + // Intersection observers are a bit unreliable for fast scrolling, + // use scroll event listener to sync active item. + useEffect(() => { + if (typeof window === 'undefined') return + + const callback = debounce(() => { + if (!active.current) return + + if (window.scrollY === 0) { + setActiveId(items[0]?.id) + return + } + + if ( + window.scrollY + document.documentElement.clientHeight >= + document.documentElement.scrollHeight + ) { + setActiveId(items[items.length - 1]?.id) + return + } + + for (let i = 0; i < items.length; i++) { + const item = items[i] + if (window.scrollY < item.topOffset) { + setActiveId(items[i - 1]?.id) + break + } + } + }, 100) + + window.addEventListener('scroll', callback) + return () => window.removeEventListener('scroll', callback) + }, [items]) + + if (items.length === 0) return null + + const levelItems = items.filter((item) => item.level === minLevel) + return ( + + ) +} + +function Items({ + activeId, + items, + levelItems, + onClickItem, + setActiveId, +}: { + activeId: string | null + items: OutlineItems + levelItems: OutlineItems + onClickItem?: () => void + setActiveId: (id: string) => void +}) { + return ( +
    + {levelItems.map(({ id, level, text }) => { + const hash = `#${id}` + const isActive = activeId === id + + const nextLevelItems = (() => { + const itemIndex = items.findIndex((item) => item.id === id) + const nextIndex = itemIndex + 1 + const nextItemLevel = items[nextIndex]?.level + if (nextItemLevel <= level) return null + + const nextItems = [] + for (let i = nextIndex; i < items.length; i++) { + const item = items[i] + if (item.level !== nextItemLevel) break + nextItems.push(item) + } + return nextItems + })() + + return ( + +
  • + { + onClickItem?.() + setActiveId(id) + }} + className={styles.link} + > + {text} + +
  • + {nextLevelItems && ( + + )} +
    + ) + })} +
+ ) +} diff --git a/app/components/Popover.css.ts b/app/components/Popover.css.ts new file mode 100644 index 00000000..dee5ec5a --- /dev/null +++ b/app/components/Popover.css.ts @@ -0,0 +1,10 @@ +import { style } from '@vanilla-extract/css' +import { borderRadiusVars, primitiveColorVars, spaceVars, zIndexVars } from '../styles/vars.css.js' + +export const root = style({ + backgroundColor: primitiveColorVars.background2, + border: `1px solid ${primitiveColorVars.border}`, + borderRadius: borderRadiusVars[4], + margin: `0 ${spaceVars[6]}`, + zIndex: zIndexVars.popover, +}) diff --git a/app/components/Popover.tsx b/app/components/Popover.tsx new file mode 100644 index 00000000..6fb21dda --- /dev/null +++ b/app/components/Popover.tsx @@ -0,0 +1,18 @@ +import * as Popover_ from '@radix-ui/react-popover' +import type { ReactNode } from 'react' + +import clsx from 'clsx' +import * as styles from './Popover.css.js' + +Popover.Root = Popover_.Root +Popover.Trigger = Popover_.Trigger + +export function Popover({ children, className }: { children: ReactNode; className?: string }) { + return ( + + + {children} + + + ) +} diff --git a/app/components/Raw.tsx b/app/components/Raw.tsx new file mode 100644 index 00000000..b6d5dda8 --- /dev/null +++ b/app/components/Raw.tsx @@ -0,0 +1,6 @@ +import { MDXProvider } from '@mdx-js/react' +import type { ReactNode } from 'react' + +export function Raw({ children }: { children: ReactNode }) { + return {children} +} diff --git a/app/components/RouterLink.tsx b/app/components/RouterLink.tsx new file mode 100644 index 00000000..50e56df5 --- /dev/null +++ b/app/components/RouterLink.tsx @@ -0,0 +1,19 @@ +import { forwardRef, useEffect } from 'react' +import { useInView } from 'react-intersection-observer' +import { Link, type LinkProps } from 'react-router-dom' +import { routes } from 'virtual:routes' + +import { mergeRefs } from '../utils/mergeRefs.js' + +export type RouterLinkProps = LinkProps + +export const RouterLink = forwardRef((props: RouterLinkProps, ref) => { + const loadRoute = () => routes.find((route) => route.path === props.to)?.lazy() + + const { ref: intersectionRef, inView } = useInView() + useEffect(() => { + if (inView) loadRoute() + }, [inView, loadRoute]) + + return +}) diff --git a/app/components/SearchDialog.css.ts b/app/components/SearchDialog.css.ts new file mode 100644 index 00000000..47f09c8a --- /dev/null +++ b/app/components/SearchDialog.css.ts @@ -0,0 +1,317 @@ +import { globalStyle, keyframes, style } from '@vanilla-extract/css' + +import { + borderRadiusVars, + fontSizeVars, + fontWeightVars, + primitiveColorVars, + semanticColorVars, + spaceVars, + viewportVars, + zIndexVars, +} from '../styles/vars.css.js' + +const fadeIn = keyframes( + { + from: { + opacity: 0, + }, + to: { + opacity: 1, + }, + }, + 'fadeIn', +) + +const fadeAndSlideIn = keyframes( + { + from: { + opacity: 0, + transform: 'translate(-50%, -5%) scale(0.96)', + }, + to: { + opacity: 1, + transform: 'translate(-50%, 0%) scale(1)', + }, + }, + 'fadeAndSlideIn', +) + +export const root = style({ + animation: `${fadeAndSlideIn} 0.1s ease-in-out`, + background: primitiveColorVars.background, + borderRadius: borderRadiusVars[6], + display: 'flex', + flexDirection: 'column', + gap: spaceVars[8], + height: 'min-content', + left: '50%', + margin: '64px auto', + maxHeight: 'min(100vh - 128px, 900px)', + padding: spaceVars[12], + paddingBottom: spaceVars[8], + position: 'fixed', + top: 0, + transform: 'translate(-50%, 0%)', + width: 'min(100vw - 60px, 775px)', + zIndex: zIndexVars.backdrop, + + '@media': { + [viewportVars['max-720px']]: { + borderRadius: 0, + // TODO: Not working + height: 'calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom))', + margin: 0, + maxHeight: 'unset', + width: '100vw', + }, + }, +}) + +export const overlay = style( + { + animation: `${fadeIn} 0.1s ease-in-out`, + // TODO: Refactor to variable + background: 'rgba(0, 0, 0, .6)', + position: 'fixed', + inset: 0, + zIndex: zIndexVars.backdrop, + }, + 'overlay', +) + +export const searchBox = style( + { + alignItems: 'center', + border: `1px solid ${primitiveColorVars.border}`, + borderRadius: borderRadiusVars[4], + display: 'flex', + gap: spaceVars[8], + paddingLeft: spaceVars[8], + paddingRight: spaceVars[8], + marginBottom: spaceVars[8], + width: '100%', + selectors: { + '&:focus-within': { + borderColor: primitiveColorVars.borderAccent, + }, + }, + }, + 'searchBox', +) + +export const searchInput = style( + { + background: 'transparent', + display: 'flex', + fontSize: fontSizeVars[16], + height: spaceVars[40], + width: '100%', + selectors: { + '&:focus': { + outline: 'none', + }, + '&::placeholder': { + color: primitiveColorVars.text4, + }, + }, + }, + 'searchInput', +) + +export const searchInputIcon = style( + { + color: primitiveColorVars.text3, + }, + 'searchInputIcon', +) + +export const searchInputIconDesktop = style( + { + '@media': { + [viewportVars['max-720px']]: { + display: 'none', + }, + }, + }, + 'searchInputIconDesktop', +) + +export const searchInputIconMobile = style( + { + display: 'none', + '@media': { + [viewportVars['max-720px']]: { + display: 'block', + }, + }, + }, + 'searchInputIconMobile', +) + +export const results = style( + { + display: 'flex', + flexDirection: 'column', + gap: spaceVars[8], + overflowX: 'hidden', + overflowY: 'auto', + overscrollBehavior: 'contain', + width: '100%', + }, + 'results', +) + +export const result = style( + { + border: `1.5px solid ${primitiveColorVars.border}`, + borderRadius: borderRadiusVars[4], + width: '100%', + selectors: { + '&:focus-within': { + borderColor: primitiveColorVars.borderAccent, + }, + }, + }, + 'result', +) + +globalStyle(`${result} > a`, { + display: 'flex', + flexDirection: 'column', + gap: spaceVars[8], + minHeight: spaceVars[36], + outline: 'none', + justifyContent: 'center', + padding: spaceVars[12], + width: '100%', +}) + +export const resultSelected = style( + { + borderColor: primitiveColorVars.borderAccent, + }, + 'resultSelected', +) + +export const resultIcon = style( + { + color: primitiveColorVars.textAccent, + marginRight: 1, + width: 15, + }, + 'resultIcon', +) + +export const titles = style( + { + alignItems: 'center', + display: 'flex', + flexWrap: 'wrap', + fontWeight: fontWeightVars.medium, + gap: spaceVars[4], + lineHeight: '22px', + }, + 'titles', +) + +export const title = style( + { + alignItems: 'center', + display: 'flex', + gap: spaceVars[4], + whiteSpace: 'nowrap', + }, + 'title', +) + +export const titleIcon = style( + { + color: primitiveColorVars.text, + display: 'inline-block', + opacity: 0.5, + }, + 'titleIcon', +) + +globalStyle(`${resultSelected} ${title}, ${resultSelected} ${titleIcon}`, { + color: primitiveColorVars.textAccent, +}) + +export const content = style({ padding: 0 }, 'content') + +export const excerpt = style( + { + maxHeight: '8.75rem', + overflow: 'hidden', + opacity: 0.5, + position: 'relative', + '::before': { + content: '', + position: 'absolute', + top: '-1px', + left: 0, + width: '100%', + height: '8px', + background: `linear-gradient(${primitiveColorVars.background}, transparent)`, + zIndex: '1000', + }, + '::after': { + content: '', + position: 'absolute', + bottom: '-1px', + left: 0, + width: '100%', + height: '12px', + background: `linear-gradient(transparent, ${primitiveColorVars.background})`, + zIndex: '1000', + }, + '@media': { + [viewportVars['max-720px']]: { + opacity: 1, + }, + }, + }, + 'excerpt', +) + +globalStyle(`${title} mark, ${excerpt} mark`, { + backgroundColor: semanticColorVars.searchHighlightBackground, + color: semanticColorVars.searchHighlightText, + borderRadius: borderRadiusVars[2], + paddingBottom: 0, + paddingLeft: spaceVars[2], + paddingRight: spaceVars[2], + paddingTop: 0, +}) + +globalStyle(`${resultSelected} ${excerpt}`, { + opacity: 1, +}) + +export const searchShortcuts = style( + { + alignItems: 'center', + color: primitiveColorVars.text2, + display: 'flex', + gap: spaceVars[20], + fontSize: fontSizeVars[14], + + '@media': { + [viewportVars['max-720px']]: { + display: 'none', + }, + }, + }, + 'searchShortcuts', +) + +export const searchShortcutsGroup = style( + { + alignItems: 'center', + display: 'inline-flex', + gap: spaceVars[3], + marginRight: spaceVars[6], + }, + 'searchShortcutsGroup', +) diff --git a/app/components/SearchDialog.tsx b/app/components/SearchDialog.tsx new file mode 100644 index 00000000..be9858a4 --- /dev/null +++ b/app/components/SearchDialog.tsx @@ -0,0 +1,299 @@ +import * as Dialog from '@radix-ui/react-dialog' +import { + ArrowLeftIcon, + ChevronRightIcon, + FileIcon, + ListBulletIcon, + MagnifyingGlassIcon, +} from '@radix-ui/react-icons' +import * as Label from '@radix-ui/react-label' +import clsx from 'clsx' +import { default as Mark } from 'mark.js' +import { type SearchResult } from 'minisearch' +import { useCallback, useEffect, useMemo, useRef, useState } from 'react' +import { Link, useNavigate } from 'react-router-dom' + +import { useConfig } from '../hooks/useConfig.js' +import { useDebounce } from '../hooks/useDebounce.js' +import { useLocalStorage } from '../hooks/useLocalStorage.js' +import { type Result, useSearchIndex } from '../hooks/useSearchIndex.js' +import { visuallyHidden } from '../styles/utils.css.js' +import { Content } from './Content.js' +import { KeyboardShortcut } from './KeyboardShortcut.js' +import * as styles from './SearchDialog.css.js' + +export function SearchDialog(props: { open: boolean; onClose(): void }) { + const { search: searchOptions } = useConfig() + const navigate = useNavigate() + const inputRef = useRef(null) + const listRef = useRef(null) + + const [filterText, setFilterText] = useLocalStorage('filterText', '') + const searchTerm = useDebounce(filterText, 200) + const searchIndex = useSearchIndex() + + const [selectedIndex, setSelectedIndex] = useState(-1) + const [disableMouseOver, setDisableMouseOver] = useState(false) + const [showDetailView, setShowDetailView] = useLocalStorage('showDetailView', true) + + const results: (SearchResult & Result)[] = useMemo(() => { + if (!searchIndex) return [] + if (!searchTerm) { + setSelectedIndex(-1) + return [] + } + setSelectedIndex(0) + return searchIndex.search(searchTerm, searchOptions).slice(0, 16) as (SearchResult & Result)[] + }, [searchIndex, searchOptions, searchTerm]) + + const resultsCount = results.length + const selectedResult = results[selectedIndex] + + const highlight = useCallback(() => { + if (!listRef.current) return + + const terms = new Set() + for (const result of results) { + for (const term in result.match) { + terms.add(term) + } + } + + const mark = new Mark(listRef.current) + mark.unmark({ + done() { + mark?.markRegExp(formMarkRegex(terms)) + }, + }) + + const excerptElements = listRef.current.querySelectorAll(`.${styles.excerpt}`) + for (const element of excerptElements) { + element.querySelector('mark[data-markjs="true"]')?.scrollIntoView({ block: 'center' }) + } + listRef.current?.firstElementChild?.scrollIntoView({ block: 'start' }) + }, [results]) + + useEffect(() => { + if (!props.open) return + + function keyDownHandler(event: KeyboardEvent) { + switch (event.key) { + case 'ArrowDown': { + event.preventDefault() + setSelectedIndex((index) => { + let nextIndex = index + 1 + if (nextIndex >= resultsCount) nextIndex = 0 + const element = listRef.current?.children[nextIndex] + element?.scrollIntoView({ block: 'nearest' }) + return nextIndex + }) + setDisableMouseOver(true) + break + } + case 'ArrowUp': { + event.preventDefault() + setSelectedIndex((index) => { + let nextIndex = index - 1 + if (nextIndex < 0) nextIndex = resultsCount - 1 + const element = listRef.current?.children[nextIndex] + element?.scrollIntoView({ block: 'nearest' }) + return nextIndex + }) + setDisableMouseOver(true) + break + } + case 'Backspace': { + if (!event.metaKey) return + event.preventDefault() + setFilterText('') + inputRef.current?.focus() + break + } + case 'Enter': { + if (event.target instanceof HTMLButtonElement && event.target.type !== 'submit') return + if (!selectedResult) return + event.preventDefault() + navigate(selectedResult.href) + props.onClose() + break + } + } + } + + window.addEventListener('keydown', keyDownHandler) + return () => { + window.removeEventListener('keydown', keyDownHandler) + } + }, [navigate, resultsCount, setFilterText, selectedResult, props.open, props.onClose]) + + useEffect(() => { + if (searchTerm === '') return + if (!listRef.current) return + highlight() + }, [highlight, searchTerm]) + + return ( + + + + { + if (inputRef.current) { + event.preventDefault() + inputRef.current.focus() + } + highlight() + }} + onCloseAutoFocus={() => { + setSelectedIndex(0) + }} + className={styles.root} + aria-describedby={undefined} + > + Search + +
+ + + + + + setFilterText(event.target.value)} + placeholder="Search" + type="search" + value={filterText} + /> + + + + +
+ +
    setDisableMouseOver(false)} + ref={listRef} + > + {searchTerm && results.length === 0 && ( +
  • + No results for "{searchTerm}" +
  • + )} + + {results.map((result, index) => ( +
  • Boolean(title)), result.title].join( + ' > ', + )} + > + { + // Don't close the dialog if the user is opening the link in a new tab. + if (event.metaKey) return + props.onClose() + }} + onMouseEnter={() => !disableMouseOver && setSelectedIndex(index)} + onFocus={() => setSelectedIndex(index)} + > +
    + {result.isPage ? ( + + ) : ( + # + )} + {result.titles + .filter((title) => Boolean(title)) + .map((title: string) => ( + + + + + ))} + + + +
    + + {showDetailView && result.text?.trim() && ( +
    + +
    + +
    + )} + +
  • + ))} +
+ +
+ + + + +
+
+
+ ) +} + +function formMarkRegex(terms: Set) { + return new RegExp( + [...terms] + .sort((a, b) => b.length - a.length) + .map((term) => { + return `(${term.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&').replace(/-/g, '\\x2d')})` + }) + .join('|'), + 'gi', + ) +} diff --git a/app/components/Sidebar.css.ts b/app/components/Sidebar.css.ts new file mode 100644 index 00000000..828026de --- /dev/null +++ b/app/components/Sidebar.css.ts @@ -0,0 +1,237 @@ +import { style } from '@vanilla-extract/css' +import { + fontSizeVars, + fontWeightVars, + lineHeightVars, + primitiveColorVars, + sidebarVars, + spaceVars, + topNavVars, + zIndexVars, +} from '../styles/vars.css.js' + +export const root = style({ + display: 'flex', + flexDirection: 'column', + fontSize: fontSizeVars['14'], + overflowY: 'auto', + width: sidebarVars.width, + '@media': { + 'screen and (max-width: 1080px)': { + width: '100%', + }, + }, +}) + +export const backLink = style( + { + textAlign: 'left', + }, + 'backLink', +) + +export const divider = style( + { + backgroundColor: primitiveColorVars.border, + width: '100%', + height: '1px', + }, + 'divider', +) + +export const navigation = style( + { + outline: 0, + selectors: { + '&:first-child': { + paddingTop: spaceVars['16'], + }, + }, + }, + 'navigation', +) + +export const group = style( + { + display: 'flex', + flexDirection: 'column', + }, + 'group', +) + +export const logo = style( + { + alignItems: 'center', + display: 'flex', + height: topNavVars.height, + paddingTop: spaceVars[4], + }, + 'logo', +) + +export const logoWrapper = style( + { + backgroundColor: primitiveColorVars.backgroundDark, + position: 'sticky', + top: 0, + zIndex: zIndexVars.gutterTopCurtain, + '@media': { + 'screen and (max-width: 1080px)': { + display: 'none', + }, + }, + }, + 'logoWrapper', +) + +export const section = style( + { + display: 'flex', + flexDirection: 'column', + fontSize: '1em', + get selectors() { + return { + [`${navigation} > ${group} > ${section} + ${section}`]: { + borderTop: `1px solid ${primitiveColorVars.border}`, + }, + } + }, + }, + 'section', +) + +export const level = style({}, 'level') + +export const levelCollapsed = style( + { + gap: spaceVars['4'], + paddingBottom: spaceVars['12'], + }, + 'levelCollapsed', +) + +export const levelInset = style( + { + borderLeft: `1px solid ${primitiveColorVars.border}`, + fontSize: fontSizeVars['13'], + marginTop: spaceVars['8'], + paddingLeft: spaceVars['12'], + selectors: { + '&&&': { + fontWeight: fontWeightVars.regular, + paddingTop: 0, + paddingBottom: 0, + }, + }, + }, + 'levelInset', +) + +export const items = style( + { + display: 'flex', + flexDirection: 'column', + gap: '0.625em', + paddingTop: spaceVars['16'], + paddingBottom: spaceVars['16'], + fontWeight: fontWeightVars.medium, + selectors: { + [`${level} &`]: { + paddingTop: spaceVars['6'], + }, + }, + }, + 'items', +) + +export const item = style( + { + color: primitiveColorVars.text3, + letterSpacing: '0.25px', + lineHeight: lineHeightVars.sidebarItem, + width: '100%', + transition: 'color 0.1s', + selectors: { + '&:hover': { + color: primitiveColorVars.text, + }, + '&[data-active="true"]': { + color: primitiveColorVars.textAccent, + }, + }, + }, + 'item', +) + +export const sectionHeader = style( + { + alignItems: 'center', + display: 'flex', + justifyContent: 'space-between', + selectors: { + [`${level} > &`]: { + paddingTop: spaceVars['12'], + }, + }, + }, + 'sectionHeader', +) + +export const sectionHeaderActive = style( + { + color: primitiveColorVars.text, + }, + 'sectionHeaderActive', +) + +export const sectionTitle = style( + { + color: primitiveColorVars.title, + fontSize: fontSizeVars['14'], + fontWeight: fontWeightVars.semibold, + letterSpacing: '0.25px', + width: '100%', + }, + 'sectionTitle', +) + +export const sectionTitleActive = style( + { + color: primitiveColorVars.textAccent, + fontSize: fontSizeVars['14'], + fontWeight: fontWeightVars.semibold, + letterSpacing: '0.25px', + width: '100%', + }, + 'sectionTitleActive', +) + +export const sectionTitleLink = style( + { + selectors: { + '&:hover': { + color: primitiveColorVars.text, + }, + '&[data-active="true"]': { + color: primitiveColorVars.textAccent, + }, + }, + }, + 'sectionTitleLink', +) + +export const sectionCollapse = style( + { + color: primitiveColorVars.text3, + transform: 'rotate(90deg)', + transition: 'transform 0.25s', + }, + 'sectionCollapse', +) + +export const sectionCollapseActive = style( + { + transform: 'rotate(0)', + }, + 'sectionCollapseActive', +) diff --git a/app/components/Sidebar.tsx b/app/components/Sidebar.tsx new file mode 100644 index 00000000..a4172a5f --- /dev/null +++ b/app/components/Sidebar.tsx @@ -0,0 +1,298 @@ +import clsx from 'clsx' +import { + type KeyboardEvent, + type MouseEvent, + type MouseEventHandler, + type RefObject, + useCallback, + useEffect, + useMemo, + useRef, + useState, +} from 'react' +import { matchPath, useLocation, useMatch } from 'react-router-dom' + +import { type SidebarItem as SidebarItemType } from '../../config.js' +import { usePageData } from '../hooks/usePageData.js' +import { useSidebar } from '../hooks/useSidebar.js' +import { Icon } from './Icon.js' +import { NavLogo } from './NavLogo.js' +import { RouterLink } from './RouterLink.js' +import * as styles from './Sidebar.css.js' +import { ChevronRight } from './icons/ChevronRight.js' + +function checkSectionTitleActive(items: any[], pathname: string) { + const result = Boolean( + items.find((item) => { + if (item.link) { + return item.link === pathname + } + return false + }), + ) + + return !!result +} + +export function Sidebar(props: { + className?: string + onClickItem?: MouseEventHandler +}) { + const { className, onClickItem } = props + + const { previousPath } = usePageData() + const sidebarRef = useRef(null) + const sidebar = useSidebar() + const [backPath, setBackPath] = useState('/') + + // biome-ignore lint/correctness/useExhaustiveDependencies: + useEffect(() => { + if (typeof window === 'undefined') return + if (!previousPath) return + setBackPath(previousPath) + }, [sidebar.key, sidebar.backLink]) + + if (!sidebar) return null + + const groups = getSidebarGroups(sidebar.items) + + return ( + + ) +} + +function getSidebarGroups(sidebar: SidebarItemType[]): SidebarItemType[] { + const groups: SidebarItemType[] = [] + + let lastGroupIndex = 0 + for (const item of sidebar) { + if (item.items) { + lastGroupIndex = groups.push(item) + continue + } + + if (!groups[lastGroupIndex]) groups.push({ text: '', items: [item] }) + else groups[lastGroupIndex].items!.push(item) + } + + return groups +} + +function getActiveChildItem( + items: SidebarItemType[], + pathname: string, +): SidebarItemType | undefined { + return items.find((item) => { + if (matchPath(pathname, item.link ?? '')) return true + if (item.link === pathname) return true + if (!item.items) return false + return getActiveChildItem(item.items, pathname) + }) +} + +function SidebarItem(props: { + depth: number + item: SidebarItemType + onClick?: MouseEventHandler + sidebarRef?: RefObject +}) { + const { depth, item, onClick, sidebarRef } = props + + const itemRef = useRef(null) + + const { pathname } = useLocation() + const match = useMatch(item.link ?? '') + + const hasActiveChildItem = useMemo( + () => (item.items ? Boolean(getActiveChildItem(item.items, pathname)) : false), + [item.items, pathname], + ) + + const [collapsed, setCollapsed] = useState(() => { + if (match) return false + if (!item.items) return false + if (hasActiveChildItem) return false + return Boolean(item.collapsed) + }) + const isCollapsable = item.collapsed !== undefined && item.items !== undefined + const onCollapseInteraction = useCallback( + (event: KeyboardEvent | MouseEvent) => { + if ('key' in event && event.key !== 'Enter') return + if (item.link) return + setCollapsed((x) => !x) + }, + [item.link], + ) + const onCollapseTriggerInteraction = useCallback( + (event: KeyboardEvent | MouseEvent) => { + if ('key' in event && event.key !== 'Enter') return + if (!item.link) return + setCollapsed((x) => !x) + }, + [item.link], + ) + + const active = useRef(true) + useEffect(() => { + if (!active.current) return + active.current = false + + const match = matchPath(pathname, item.link ?? '') + if (!match) return + + requestAnimationFrame(() => { + const offsetTop = itemRef.current?.offsetTop ?? 0 + const sidebarHeight = sidebarRef?.current?.clientHeight ?? 0 + if (offsetTop < sidebarHeight) return + sidebarRef?.current?.scrollTo({ top: offsetTop - 100 }) + }) + }, [item, pathname, sidebarRef]) + + if (item.items) + return ( +
+ {item.text && ( +
+ {item.text && + (item.link ? ( + + {item.text} + + ) : ( +
+ {item.items && !checkSectionTitleActive(item.items, pathname) && collapsed ? ( + + {item.text} + + ) : ( + item.text + )} +
+ ))} + + {isCollapsable && ( +
+ +
+ )} +
+ )} + + {!collapsed && ( +
+ {item.items && + item.items.length > 0 && + depth < 5 && + item.items.map((item, i) => ( + + ))} +
+ )} +
+ ) + + return ( + <> + {item.link ? ( + + {item.text} + + ) : ( +
{item.text}
+ )} + + ) +} diff --git a/app/components/SkipLink.css.ts b/app/components/SkipLink.css.ts new file mode 100644 index 00000000..f7666ea0 --- /dev/null +++ b/app/components/SkipLink.css.ts @@ -0,0 +1,29 @@ +import { style } from '@vanilla-extract/css' +import { + borderRadiusVars, + fontSizeVars, + fontWeightVars, + primitiveColorVars, + semanticColorVars, + spaceVars, +} from '../styles/vars.css.js' + +export const root = style({ + background: primitiveColorVars.background, + borderRadius: borderRadiusVars['4'], + color: semanticColorVars.link, + fontSize: fontSizeVars['14'], + fontWeight: fontWeightVars.semibold, + left: spaceVars[8], + padding: `${spaceVars['8']} ${spaceVars['16']}`, + position: 'fixed', + textDecoration: 'none', + top: spaceVars[8], + zIndex: 999, + ':focus': { + clip: 'auto', + clipPath: 'none', + height: 'auto', + width: 'auto', + }, +}) diff --git a/app/components/SkipLink.tsx b/app/components/SkipLink.tsx new file mode 100644 index 00000000..27547e99 --- /dev/null +++ b/app/components/SkipLink.tsx @@ -0,0 +1,15 @@ +import clsx from 'clsx' +import { useLocation } from 'react-router-dom' +import { visuallyHidden } from '../styles/utils.css.js' +import * as styles from './SkipLink.css.js' + +export const skipLinkId = 'vocs-content' + +export function SkipLink() { + const { pathname } = useLocation() + return ( + + Skip to content + + ) +} diff --git a/app/components/Sponsors.css.ts b/app/components/Sponsors.css.ts new file mode 100644 index 00000000..05e04292 --- /dev/null +++ b/app/components/Sponsors.css.ts @@ -0,0 +1,84 @@ +import { createVar, style } from '@vanilla-extract/css' +import { + borderRadiusVars, + fontSizeVars, + fontWeightVars, + primitiveColorVars, + spaceVars, +} from '../styles/vars.css.js' + +export const columnsVar = createVar('columns') +export const heightVar = createVar('height') + +export const root = style({ + borderRadius: borderRadiusVars['8'], + display: 'flex', + flexDirection: 'column', + gap: spaceVars['4'], + overflow: 'hidden', +}) + +export const title = style( + { + backgroundColor: primitiveColorVars.background3, + color: primitiveColorVars.text3, + fontSize: fontSizeVars['13'], + fontWeight: fontWeightVars.medium, + padding: `${spaceVars['4']} 0`, + textAlign: 'center', + }, + 'title', +) + +export const row = style( + { + display: 'flex', + flexDirection: 'row', + gap: spaceVars['4'], + }, + 'row', +) + +export const column = style( + { + alignItems: 'center', + backgroundColor: primitiveColorVars.background3, + display: 'flex', + justifyContent: 'center', + padding: spaceVars['32'], + width: `calc(${columnsVar} * 100%)`, + }, + 'column', +) + +export const sponsor = style( + { + transition: 'background-color 0.1s', + selectors: { + '&:hover': { + backgroundColor: primitiveColorVars.background5, + }, + '.dark &:hover': { + backgroundColor: primitiveColorVars.white, + }, + }, + }, + 'sponsor', +) + +export const image = style( + { + filter: 'grayscale(1)', + height: heightVar, + transition: 'filter 0.1s', + selectors: { + '.dark &': { + filter: 'grayscale(1) invert(1)', + }, + [`${column}:hover &`]: { + filter: 'none', + }, + }, + }, + 'image', +) diff --git a/app/components/Sponsors.tsx b/app/components/Sponsors.tsx new file mode 100644 index 00000000..256e44c2 --- /dev/null +++ b/app/components/Sponsors.tsx @@ -0,0 +1,41 @@ +import { assignInlineVars } from '@vanilla-extract/dynamic' +import clsx from 'clsx' +import { Fragment } from 'react' +import { useConfig } from '../hooks/useConfig.js' +import { Link } from './Link.js' +import * as styles from './Sponsors.css.js' + +export function Sponsors() { + const { sponsors } = useConfig() + return ( +
+ {sponsors?.map((sponsorSet, i) => ( + +
{sponsorSet.name}
+ {sponsorSet.items.map((sponsorRow, i) => ( +
+ {sponsorRow.map((sponsor, i) => ( + + {sponsor?.name} + + ))} +
+ ))} +
+ ))} +
+ ) +} diff --git a/app/components/Step.css.ts b/app/components/Step.css.ts new file mode 100644 index 00000000..f894819e --- /dev/null +++ b/app/components/Step.css.ts @@ -0,0 +1,82 @@ +import { globalStyle, style } from '@vanilla-extract/css' + +import { fontWeightVars, primitiveColorVars, spaceVars, viewportVars } from '../styles/vars.css.js' +import { root as Tabs } from './Tabs.css.js' +import { root as CodeBlock } from './mdx/CodeBlock.css.js' +import { root as H2 } from './mdx/H2.css.js' +import { root as H3 } from './mdx/H3.css.js' +import { root as H4 } from './mdx/H4.css.js' +import { root as H5 } from './mdx/H5.css.js' +import { root as H6 } from './mdx/H6.css.js' + +export const root = style({ + selectors: { + '&:not(:last-child)': { + marginBottom: spaceVars['24'], + }, + }, +}) + +export const title = style( + { + marginBottom: spaceVars['8'], + position: 'relative', + '::before': { + alignItems: 'center', + backgroundColor: primitiveColorVars.background5, + borderRadius: '100%', + border: `0.5em solid ${primitiveColorVars.background}`, + boxSizing: 'content-box', + color: primitiveColorVars.text2, + content: 'counter(step)', + counterIncrement: 'step', + display: 'flex', + fontSize: '0.625em', + fontWeight: fontWeightVars.regular, + height: '2em', + justifyContent: 'center', + left: 'calc(-25.125px - 1.45em)', + position: 'absolute', + top: '-0.25em', + width: '2em', + }, + }, + 'title', +) + +export const content = style( + { + selectors: { + [`${H2}+&,${H3}+&,${H4}+&,${H5}+&,${H6}+&`]: { + marginTop: `calc(${spaceVars['8']} * -1)`, + }, + }, + }, + 'content', +) + +globalStyle(`${content} > *:not(:last-child)`, { + marginBottom: spaceVars['16'], +}) + +globalStyle(`${content} > *:last-child`, { + marginBottom: spaceVars['0'], +}) + +globalStyle(`${content} > ${Tabs}, ${content} > ${CodeBlock}`, { + '@media': { + [viewportVars['max-720px']]: { + outline: `6px solid ${primitiveColorVars.background}`, + marginLeft: `calc(-1 * ${spaceVars['44']} - 2px)`, + marginRight: `calc(-1 * ${spaceVars['16']})`, + }, + }, +}) + +globalStyle(`${content} ${Tabs} pre.shiki`, { + '@media': { + [viewportVars['max-720px']]: { + borderTop: 'none', + }, + }, +}) diff --git a/app/components/Step.tsx b/app/components/Step.tsx new file mode 100644 index 00000000..8dda0602 --- /dev/null +++ b/app/components/Step.tsx @@ -0,0 +1,34 @@ +import { type ClassValue, clsx } from 'clsx' +import type { ReactNode } from 'react' + +import * as styles from './Step.css.js' +import { H2 } from './mdx/H2.js' +import { H3 } from './mdx/H3.js' +import { H4 } from './mdx/H4.js' +import { H5 } from './mdx/H5.js' +import { H6 } from './mdx/H6.js' + +export type StepProps = { + children: ReactNode + className?: ClassValue + title: ReactNode | string + titleLevel?: 2 | 3 | 4 | 5 | 6 +} + +export function Step({ children, className, title, titleLevel = 2 }: StepProps) { + const Element = (() => { + if (titleLevel === 2) return H2 + if (titleLevel === 3) return H3 + if (titleLevel === 4) return H4 + if (titleLevel === 5) return H5 + if (titleLevel === 6) return H6 + throw new Error('Invalid.') + })() + + return ( +
+ {typeof title === 'string' ? {title} : title} +
{children}
+
+ ) +} diff --git a/app/components/Steps.css.ts b/app/components/Steps.css.ts new file mode 100644 index 00000000..9b5994a7 --- /dev/null +++ b/app/components/Steps.css.ts @@ -0,0 +1,16 @@ +import { style } from '@vanilla-extract/css' + +import { primitiveColorVars, spaceVars, viewportVars } from '../styles/vars.css.js' + +export const root = style({ + borderLeft: `1.5px solid ${primitiveColorVars.border}`, + counterReset: 'step', + paddingLeft: spaceVars['24'], + marginLeft: spaceVars['12'], + marginTop: spaceVars['24'], + '@media': { + [viewportVars['max-720px']]: { + marginLeft: spaceVars['4'], + }, + }, +}) diff --git a/app/components/Steps.tsx b/app/components/Steps.tsx new file mode 100644 index 00000000..8fd8d92c --- /dev/null +++ b/app/components/Steps.tsx @@ -0,0 +1,13 @@ +import { type ClassValue, clsx } from 'clsx' +import type { ReactNode } from 'react' + +import * as styles from './Steps.css.js' + +export type StepsProps = { + children: ReactNode + className?: ClassValue +} + +export function Steps({ children, className }: StepsProps) { + return
{children}
+} diff --git a/app/components/Tabs.css.ts b/app/components/Tabs.css.ts new file mode 100644 index 00000000..2768ca04 --- /dev/null +++ b/app/components/Tabs.css.ts @@ -0,0 +1,81 @@ +import { globalStyle, style } from '@vanilla-extract/css' +import { + borderRadiusVars, + fontSizeVars, + fontWeightVars, + primitiveColorVars, + semanticColorVars, + spaceVars, + viewportVars, +} from '../styles/vars.css.js' + +export const root = style({ + backgroundColor: semanticColorVars.codeBlockBackground, + border: `1px solid ${semanticColorVars.codeInlineBorder}`, + borderRadius: borderRadiusVars['4'], +}) + +export const list = style( + { + backgroundColor: semanticColorVars.codeTitleBackground, + borderBottom: `1px solid ${primitiveColorVars.border}`, + borderTopLeftRadius: borderRadiusVars['4'], + borderTopRightRadius: borderRadiusVars['4'], + display: 'flex', + padding: `${spaceVars['0']} ${spaceVars['14']}`, + '@media': { + [viewportVars['max-720px']]: { + borderRadius: 0, + padding: `${spaceVars['0']} ${spaceVars['8']}`, + }, + }, + }, + 'list', +) + +export const trigger = style( + { + borderBottom: '2px solid transparent', + color: primitiveColorVars.text3, + fontSize: fontSizeVars['14'], + fontWeight: fontWeightVars.medium, + padding: `${spaceVars['8']} ${spaceVars['8']} ${spaceVars['6']} ${spaceVars['8']}`, + transition: 'color 0.1s', + selectors: { + '&:hover': { + color: primitiveColorVars.text, + }, + '&[data-state="active"]': { + borderBottom: `2px solid ${primitiveColorVars.borderAccent}`, + color: primitiveColorVars.text, + }, + }, + }, + 'trigger', +) + +export const content = style( + { + backgroundColor: semanticColorVars.codeBlockBackground, + selectors: { + '&:not([data-shiki="true"])': { + padding: `${spaceVars['20']} ${spaceVars['22']}`, + '@media': { + [viewportVars['max-720px']]: { + padding: `${spaceVars['20']} ${spaceVars['16']}`, + }, + }, + }, + }, + }, + 'content', +) + +globalStyle(`${root} pre`, { + marginBottom: spaceVars['0'], + '@media': { + [viewportVars['max-720px']]: { + margin: 'unset', + }, + }, +}) diff --git a/app/components/Tabs.tsx b/app/components/Tabs.tsx new file mode 100644 index 00000000..8bc9faab --- /dev/null +++ b/app/components/Tabs.tsx @@ -0,0 +1,20 @@ +import * as Tabs from '@radix-ui/react-tabs' +import clsx from 'clsx' + +import * as styles from './Tabs.css.js' + +export function Root(props: Tabs.TabsProps) { + return +} + +export function List(props: Tabs.TabsListProps) { + return +} + +export function Trigger(props: Tabs.TabsTriggerProps) { + return +} + +export function Content(props: Tabs.TabsContentProps) { + return +} diff --git a/app/components/icons/ArrowDiagonal.tsx b/app/components/icons/ArrowDiagonal.tsx new file mode 100644 index 00000000..3dd5f17e --- /dev/null +++ b/app/components/icons/ArrowDiagonal.tsx @@ -0,0 +1,17 @@ +export function ArrowDiagonal() { + return ( + + Arrow Diagonal + + + ) +} diff --git a/app/components/icons/ArrowLeft.tsx b/app/components/icons/ArrowLeft.tsx new file mode 100644 index 00000000..2b9e072a --- /dev/null +++ b/app/components/icons/ArrowLeft.tsx @@ -0,0 +1,17 @@ +export function ArrowLeft() { + return ( + + Arrow Left + + + ) +} diff --git a/app/components/icons/ArrowRight.tsx b/app/components/icons/ArrowRight.tsx new file mode 100644 index 00000000..4e0f33c1 --- /dev/null +++ b/app/components/icons/ArrowRight.tsx @@ -0,0 +1,17 @@ +export function ArrowRight() { + return ( + + Arrow Right + + + ) +} diff --git a/app/components/icons/Checkmark.tsx b/app/components/icons/Checkmark.tsx new file mode 100644 index 00000000..abd9ab41 --- /dev/null +++ b/app/components/icons/Checkmark.tsx @@ -0,0 +1,17 @@ +export function Checkmark() { + return ( + + Checkmark + + + ) +} diff --git a/app/components/icons/ChevronDown.tsx b/app/components/icons/ChevronDown.tsx new file mode 100644 index 00000000..f4290f62 --- /dev/null +++ b/app/components/icons/ChevronDown.tsx @@ -0,0 +1,17 @@ +export function ChevronDown() { + return ( + + Chevron Down + + + ) +} diff --git a/app/components/icons/ChevronRight.tsx b/app/components/icons/ChevronRight.tsx new file mode 100644 index 00000000..cc4154f9 --- /dev/null +++ b/app/components/icons/ChevronRight.tsx @@ -0,0 +1,17 @@ +export function ChevronRight() { + return ( + + Chevron Right + + + ) +} diff --git a/app/components/icons/ChevronUp.tsx b/app/components/icons/ChevronUp.tsx new file mode 100644 index 00000000..558af4ab --- /dev/null +++ b/app/components/icons/ChevronUp.tsx @@ -0,0 +1,17 @@ +export function ChevronUp() { + return ( + + Chevron Up + + + ) +} diff --git a/app/components/icons/Copy.tsx b/app/components/icons/Copy.tsx new file mode 100644 index 00000000..2e53751f --- /dev/null +++ b/app/components/icons/Copy.tsx @@ -0,0 +1,22 @@ +export function Copy() { + return ( + + Copy + + + + ) +} diff --git a/app/components/icons/Discord.tsx b/app/components/icons/Discord.tsx new file mode 100644 index 00000000..fb910929 --- /dev/null +++ b/app/components/icons/Discord.tsx @@ -0,0 +1,17 @@ +export function Discord() { + return ( + + Discord + + + + + + + + + ) +} diff --git a/app/components/icons/File.tsx b/app/components/icons/File.tsx new file mode 100644 index 00000000..41ab0ab2 --- /dev/null +++ b/app/components/icons/File.tsx @@ -0,0 +1,28 @@ +export function File() { + return ( + + File + + + + ) +} diff --git a/app/components/icons/GitHub.tsx b/app/components/icons/GitHub.tsx new file mode 100644 index 00000000..084195e1 --- /dev/null +++ b/app/components/icons/GitHub.tsx @@ -0,0 +1,13 @@ +export function GitHub() { + return ( + + GitHub + + + ) +} diff --git a/app/components/icons/Link.tsx b/app/components/icons/Link.tsx new file mode 100644 index 00000000..de783a29 --- /dev/null +++ b/app/components/icons/Link.tsx @@ -0,0 +1,17 @@ +export function Link() { + return ( + + Link + + + ) +} diff --git a/app/components/icons/Menu.tsx b/app/components/icons/Menu.tsx new file mode 100644 index 00000000..96419a22 --- /dev/null +++ b/app/components/icons/Menu.tsx @@ -0,0 +1,17 @@ +export function Menu() { + return ( + + Menu + + + ) +} diff --git a/app/components/icons/Moon.tsx b/app/components/icons/Moon.tsx new file mode 100644 index 00000000..4f22100d --- /dev/null +++ b/app/components/icons/Moon.tsx @@ -0,0 +1,21 @@ +export function Moon() { + return ( + + Moon + + + + ) +} diff --git a/app/components/icons/Sun.tsx b/app/components/icons/Sun.tsx new file mode 100644 index 00000000..61ada4af --- /dev/null +++ b/app/components/icons/Sun.tsx @@ -0,0 +1,21 @@ +export function Sun() { + return ( + + Sun + + + + ) +} diff --git a/app/components/icons/Telegram.tsx b/app/components/icons/Telegram.tsx new file mode 100644 index 00000000..476fec56 --- /dev/null +++ b/app/components/icons/Telegram.tsx @@ -0,0 +1,11 @@ +export function Telegram() { + return ( + + Telegram + + + ) +} diff --git a/app/components/icons/Terminal.tsx b/app/components/icons/Terminal.tsx new file mode 100644 index 00000000..4ee4acb3 --- /dev/null +++ b/app/components/icons/Terminal.tsx @@ -0,0 +1,18 @@ +export function Terminal() { + return ( + + Terminal + + + + ) +} diff --git a/app/components/icons/Warpcast.tsx b/app/components/icons/Warpcast.tsx new file mode 100644 index 00000000..ca0bc771 --- /dev/null +++ b/app/components/icons/Warpcast.tsx @@ -0,0 +1,13 @@ +export function Warpcast() { + return ( + + Warpcast + + + ) +} diff --git a/app/components/icons/X.tsx b/app/components/icons/X.tsx new file mode 100644 index 00000000..f8edba15 --- /dev/null +++ b/app/components/icons/X.tsx @@ -0,0 +1,17 @@ +export function X() { + return ( + + X + + + ) +} diff --git a/app/components/mdx/Anchor.css.ts b/app/components/mdx/Anchor.css.ts new file mode 100644 index 00000000..28254908 --- /dev/null +++ b/app/components/mdx/Anchor.css.ts @@ -0,0 +1,59 @@ +import { globalStyle, style } from '@vanilla-extract/css' + +import { fontWeightVars, semanticColorVars, spaceVars } from '../../styles/vars.css.js' +import { danger, info, success, tip, warning } from '../Callout.css.js' +import { root as Section } from './Section.css.js' + +export const root = style({ + color: semanticColorVars.link, + fontWeight: fontWeightVars.medium, + textUnderlineOffset: spaceVars['2'], + textDecoration: 'underline', + transition: 'color 0.1s', + selectors: { + [`${danger} &`]: { + color: semanticColorVars.dangerText, + }, + [`${danger} &:hover`]: { + color: semanticColorVars.dangerTextHover, + }, + [`${info} &`]: { + color: semanticColorVars.infoText, + }, + [`${info} &:hover`]: { + color: semanticColorVars.infoTextHover, + }, + [`${success} &`]: { + color: semanticColorVars.successText, + }, + [`${success} &:hover`]: { + color: semanticColorVars.successTextHover, + }, + [`${tip} &`]: { + color: semanticColorVars.tipText, + }, + [`${tip} &:hover`]: { + color: semanticColorVars.tipTextHover, + }, + [`${warning} &`]: { + color: semanticColorVars.warningText, + }, + [`${warning} &:hover`]: { + color: semanticColorVars.warningTextHover, + }, + '&:hover': { + color: semanticColorVars.linkHover, + }, + }, +}) + +globalStyle(`${Section} a.data-footnote-backref`, { + color: semanticColorVars.link, + fontWeight: fontWeightVars.medium, + textUnderlineOffset: spaceVars['2'], + textDecoration: 'underline', +}) + +globalStyle(`${Section} a.data-footnote-backref:hover`, { + color: semanticColorVars.linkHover, +}) diff --git a/app/components/mdx/Anchor.tsx b/app/components/mdx/Anchor.tsx new file mode 100644 index 00000000..03bec575 --- /dev/null +++ b/app/components/mdx/Anchor.tsx @@ -0,0 +1,35 @@ +import { clsx } from 'clsx' +import type { ReactNode } from 'react' +import { useLocation } from 'react-router-dom' + +import { Link } from '../Link.js' +import * as styles from './Anchor.css.js' +import { Autolink } from './Autolink.js' + +type AnchorProps = { + children: ReactNode + className?: string + href?: string +} + +export function Anchor(props: AnchorProps) { + const { children, href } = props + const { pathname } = useLocation() + + // Heading slug links + if ( + children && + typeof children === 'object' && + 'props' in children && + children.props['data-autolink-icon'] + ) + return + + // ID links + if (href?.match(/^#/)) + return ( + + ) + + return +} diff --git a/app/components/mdx/Aside.css.ts b/app/components/mdx/Aside.css.ts new file mode 100644 index 00000000..3c03259e --- /dev/null +++ b/app/components/mdx/Aside.css.ts @@ -0,0 +1,3 @@ +import { style } from '@vanilla-extract/css' + +export const root = style({}) diff --git a/app/components/mdx/Aside.tsx b/app/components/mdx/Aside.tsx new file mode 100644 index 00000000..c37ca15a --- /dev/null +++ b/app/components/mdx/Aside.tsx @@ -0,0 +1,16 @@ +import { clsx } from 'clsx' +import { type DetailedHTMLProps, type HTMLAttributes } from 'react' + +import { Callout, type CalloutProps } from '../Callout.js' +import * as styles from './Aside.css.js' + +export function Aside(props: DetailedHTMLProps, HTMLElement>) { + const className = clsx(props.className, styles.root) + if ('data-callout' in props) + return ( + + {props.children} + + ) + return