@sleetch/react 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/button.css +1 -1
- package/dist/assets/content.css +1 -1
- package/dist/assets/content2.css +1 -1
- package/dist/assets/content3.css +1 -1
- package/dist/assets/file-system.css +1 -1
- package/dist/assets/header.css +1 -1
- package/dist/assets/layout.css +1 -1
- package/dist/assets/navigation.css +1 -1
- package/dist/assets/sidebar.css +1 -1
- package/dist/assets/toc.css +1 -1
- package/dist/{button-WIi-MWq9.js → button-BVRKTAnQ.js} +7 -3
- package/dist/button-BVRKTAnQ.js.map +1 -0
- package/dist/button-rojnIyoM.cjs +2 -0
- package/dist/button-rojnIyoM.cjs.map +1 -0
- package/dist/components/button.cjs.js +1 -1
- package/dist/components/button.d.ts +1 -1
- package/dist/components/button.es.js +1 -1
- package/dist/components/documentation/content.cjs.js +1 -1
- package/dist/components/documentation/content.es.js +1 -1
- package/dist/components/documentation/header.cjs.js +1 -1
- package/dist/components/documentation/header.d.ts +1 -2
- package/dist/components/documentation/header.es.js +2 -1
- package/dist/components/documentation/layout.cjs.js +1 -1
- package/dist/components/documentation/layout.d.ts +0 -7
- package/dist/components/documentation/layout.es.js +2 -2
- package/dist/components/documentation/page/content.cjs.js +1 -1
- package/dist/components/documentation/page/content.d.ts +2 -2
- package/dist/components/documentation/page/content.es.js +1 -1
- package/dist/components/documentation/page/header.cjs.js +1 -1
- package/dist/components/documentation/page/header.cjs.js.map +1 -1
- package/dist/components/documentation/page/header.d.ts +2 -2
- package/dist/components/documentation/page/header.es.js +1 -1
- package/dist/components/documentation/page/header.es.js.map +1 -1
- package/dist/components/documentation/page/navigation.cjs.js +1 -1
- package/dist/components/documentation/page/navigation.d.ts +1 -5
- package/dist/components/documentation/page/navigation.es.js +2 -1
- package/dist/components/documentation/sidebar/content.cjs.js +1 -1
- package/dist/components/documentation/sidebar/content.es.js +1 -1
- package/dist/components/documentation/sidebar/index.cjs.js +1 -1
- package/dist/components/documentation/sidebar/index.d.ts +2 -9
- package/dist/components/documentation/sidebar/index.es.js +2 -1
- package/dist/components/documentation/toc/content.cjs.js +1 -1
- package/dist/components/documentation/toc/content.es.js +1 -1
- package/dist/components/documentation/toc/index.cjs.js +1 -1
- package/dist/components/documentation/toc/index.d.ts +2 -2
- package/dist/components/documentation/toc/index.es.js +1 -1
- package/dist/components/file-system.cjs.js +1 -1
- package/dist/components/file-system.es.js +1 -1
- package/dist/{content-DJNzy3NF.cjs → content-CQ5PQ1-Z.cjs} +2 -2
- package/dist/content-CQ5PQ1-Z.cjs.map +1 -0
- package/dist/{content-Dit2HthD.js → content-CoLxuTJs.js} +2 -2
- package/dist/content-CoLxuTJs.js.map +1 -0
- package/dist/{content-t22ieOoh.cjs → content-DOo3vcgG.cjs} +2 -2
- package/dist/content-DOo3vcgG.cjs.map +1 -0
- package/dist/{content-CqUGhbCF.cjs → content-DsE39ENV.cjs} +2 -2
- package/dist/content-DsE39ENV.cjs.map +1 -0
- package/dist/{content-a-BY0A0H.js → content-DvLxAJYd.js} +2 -2
- package/dist/content-DvLxAJYd.js.map +1 -0
- package/dist/content-KDKeEwv-.cjs +2 -0
- package/dist/content-KDKeEwv-.cjs.map +1 -0
- package/dist/{content-Bnjq-GtR.js → content-Wo136UBd.js} +2 -2
- package/dist/content-Wo136UBd.js.map +1 -0
- package/dist/{content-DusAp8Q6.js → content-xKdbA544.js} +11 -6
- package/dist/content-xKdbA544.js.map +1 -0
- package/dist/contexts/documentation.cjs.js +2 -0
- package/dist/contexts/documentation.cjs.js.map +1 -0
- package/dist/contexts/documentation.d.ts +30 -0
- package/dist/contexts/documentation.es.js +32 -0
- package/dist/contexts/documentation.es.js.map +1 -0
- package/dist/{file-system-BtXBcLmT.js → file-system-CMsswKsJ.js} +12 -12
- package/dist/file-system-CMsswKsJ.js.map +1 -0
- package/dist/{file-system-Dr4N-WNs.cjs → file-system-Ca6fqwTn.cjs} +2 -2
- package/dist/file-system-Ca6fqwTn.cjs.map +1 -0
- package/dist/header-CmQhY5Pa.cjs +2 -0
- package/dist/header-CmQhY5Pa.cjs.map +1 -0
- package/dist/header-DDS6Ak-Z.js +57 -0
- package/dist/header-DDS6Ak-Z.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +2 -3
- package/dist/index.es.js +14 -15
- package/dist/layout-B9nkyVRH.cjs +2 -0
- package/dist/layout-B9nkyVRH.cjs.map +1 -0
- package/dist/layout-C_NguCrO.js +17 -0
- package/dist/layout-C_NguCrO.js.map +1 -0
- package/dist/navigation-BCpfEaXG.cjs +2 -0
- package/dist/navigation-BCpfEaXG.cjs.map +1 -0
- package/dist/navigation-bIVcotMC.js +139 -0
- package/dist/navigation-bIVcotMC.js.map +1 -0
- package/dist/sidebar-CiheJpEa.cjs +2 -0
- package/dist/sidebar-CiheJpEa.cjs.map +1 -0
- package/dist/sidebar-aXd_UA6s.js +162 -0
- package/dist/sidebar-aXd_UA6s.js.map +1 -0
- package/dist/{toc-Do6Ltevt.cjs → toc-CI_8-KFH.cjs} +2 -2
- package/dist/toc-CI_8-KFH.cjs.map +1 -0
- package/dist/{toc-DDk-G4gk.js → toc-Dvn-UEjm.js} +10 -10
- package/dist/toc-Dvn-UEjm.js.map +1 -0
- package/package.json +6 -6
- package/dist/button-BeAWWhRN.cjs +0 -2
- package/dist/button-BeAWWhRN.cjs.map +0 -1
- package/dist/button-WIi-MWq9.js.map +0 -1
- package/dist/components/documentation/connected-header.cjs.js +0 -2
- package/dist/components/documentation/connected-header.cjs.js.map +0 -1
- package/dist/components/documentation/connected-header.d.ts +0 -4
- package/dist/components/documentation/connected-header.es.js +0 -15
- package/dist/components/documentation/connected-header.es.js.map +0 -1
- package/dist/components/documentation/connected-sidebar.cjs.js +0 -2
- package/dist/components/documentation/connected-sidebar.cjs.js.map +0 -1
- package/dist/components/documentation/connected-sidebar.d.ts +0 -9
- package/dist/components/documentation/connected-sidebar.es.js +0 -16
- package/dist/components/documentation/connected-sidebar.es.js.map +0 -1
- package/dist/content-Bnjq-GtR.js.map +0 -1
- package/dist/content-CqUGhbCF.cjs.map +0 -1
- package/dist/content-DJNzy3NF.cjs.map +0 -1
- package/dist/content-Dit2HthD.js.map +0 -1
- package/dist/content-DusAp8Q6.js.map +0 -1
- package/dist/content-a-BY0A0H.js.map +0 -1
- package/dist/content-chbzPH8e.cjs +0 -2
- package/dist/content-chbzPH8e.cjs.map +0 -1
- package/dist/content-t22ieOoh.cjs.map +0 -1
- package/dist/file-system-BtXBcLmT.js.map +0 -1
- package/dist/file-system-Dr4N-WNs.cjs.map +0 -1
- package/dist/header-CYEQU5cQ.cjs +0 -2
- package/dist/header-CYEQU5cQ.cjs.map +0 -1
- package/dist/header-sU8dWMtq.js +0 -55
- package/dist/header-sU8dWMtq.js.map +0 -1
- package/dist/layout-8L0QXbyL.js +0 -29
- package/dist/layout-8L0QXbyL.js.map +0 -1
- package/dist/layout-S6NKDwxp.cjs +0 -2
- package/dist/layout-S6NKDwxp.cjs.map +0 -1
- package/dist/navigation-B9LRrcfi.cjs +0 -2
- package/dist/navigation-B9LRrcfi.cjs.map +0 -1
- package/dist/navigation-C9yFcqfd.js +0 -141
- package/dist/navigation-C9yFcqfd.js.map +0 -1
- package/dist/sidebar-L0Psnc5-.js +0 -168
- package/dist/sidebar-L0Psnc5-.js.map +0 -1
- package/dist/sidebar-itvEMQwG.cjs +0 -2
- package/dist/sidebar-itvEMQwG.cjs.map +0 -1
- package/dist/toc-DDk-G4gk.js.map +0 -1
- package/dist/toc-Do6Ltevt.cjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connected-header.es.js","names":[],"sources":["../../../src/components/documentation/connected-header.tsx"],"sourcesContent":["import type { BaseHTMLAttributes } from 'react';\nimport { DocumentationHeader } from './header';\nimport { useDocumentationLayout } from './layout';\n\nexport interface ConnectedDocumentationHeaderProps extends BaseHTMLAttributes<HTMLDivElement> {}\n\nexport function ConnectedDocumentationHeader(props: ConnectedDocumentationHeaderProps) {\n const { toggleSidebar } = useDocumentationLayout();\n\n return <DocumentationHeader onMenuToggle={toggleSidebar} {...props} />;\n}\n"],"mappings":";;;;AAMA,SAAgB,EAA6B,GAA0C;CACrF,IAAM,EAAE,qBAAkB,EAAuB;CAEjD,OAAO,kBAAC,GAAD;EAAqB,cAAc;EAAe,GAAI;CAAQ,CAAA;AACvE"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../sidebar-itvEMQwG.cjs"),t=require("../../layout-S6NKDwxp.cjs");let n=require("react/jsx-runtime");function r(r){let{isSidebarOpen:i,closeSidebar:a}=t.n();return(0,n.jsx)(e.t,{isOpen:i,onClose:a,...r})}exports.ConnectedDocumentationSidebar=r;
|
|
2
|
-
//# sourceMappingURL=connected-sidebar.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connected-sidebar.cjs.js","names":[],"sources":["../../../src/components/documentation/connected-sidebar.tsx"],"sourcesContent":["import type { BaseHTMLAttributes, ReactNode } from 'react';\nimport { DocumentationSidebar } from './sidebar';\nimport { useDocumentationLayout } from './layout';\nimport type { tree_object } from 'packages/core/dist/compiler';\n\nexport interface ConnectedDocumentationSidebarProps extends BaseHTMLAttributes<HTMLBaseElement> {\n tree: tree_object[];\n currentPath?: string;\n hrefBuilder?: (path: string) => string;\n iconResolver?: (icon?: string) => ReactNode;\n}\n\nexport function ConnectedDocumentationSidebar(props: ConnectedDocumentationSidebarProps) {\n const { isSidebarOpen, closeSidebar } = useDocumentationLayout();\n\n return <DocumentationSidebar isOpen={isSidebarOpen} onClose={closeSidebar} {...props} />;\n}\n"],"mappings":"2LAYA,SAAgB,EAA8B,EAA2C,CACvF,GAAM,CAAE,gBAAe,gBAAiB,EAAA,EAAuB,EAE/D,OAAO,EAAA,EAAA,IAAA,CAAC,EAAA,EAAD,CAAsB,OAAQ,EAAe,QAAS,EAAc,GAAI,CAAQ,CAAA,CACzF"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BaseHTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import { tree_object } from 'packages/core/dist/compiler';
|
|
3
|
-
export interface ConnectedDocumentationSidebarProps extends BaseHTMLAttributes<HTMLBaseElement> {
|
|
4
|
-
tree: tree_object[];
|
|
5
|
-
currentPath?: string;
|
|
6
|
-
hrefBuilder?: (path: string) => string;
|
|
7
|
-
iconResolver?: (icon?: string) => ReactNode;
|
|
8
|
-
}
|
|
9
|
-
export declare function ConnectedDocumentationSidebar(props: ConnectedDocumentationSidebarProps): import("react").JSX.Element;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { t as e } from "../../sidebar-L0Psnc5-.js";
|
|
2
|
-
import { n as t } from "../../layout-8L0QXbyL.js";
|
|
3
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
-
//#region src/components/documentation/connected-sidebar.tsx
|
|
5
|
-
function r(r) {
|
|
6
|
-
let { isSidebarOpen: i, closeSidebar: a } = t();
|
|
7
|
-
return /* @__PURE__ */ n(e, {
|
|
8
|
-
isOpen: i,
|
|
9
|
-
onClose: a,
|
|
10
|
-
...r
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
//#endregion
|
|
14
|
-
export { r as ConnectedDocumentationSidebar };
|
|
15
|
-
|
|
16
|
-
//# sourceMappingURL=connected-sidebar.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connected-sidebar.es.js","names":[],"sources":["../../../src/components/documentation/connected-sidebar.tsx"],"sourcesContent":["import type { BaseHTMLAttributes, ReactNode } from 'react';\nimport { DocumentationSidebar } from './sidebar';\nimport { useDocumentationLayout } from './layout';\nimport type { tree_object } from 'packages/core/dist/compiler';\n\nexport interface ConnectedDocumentationSidebarProps extends BaseHTMLAttributes<HTMLBaseElement> {\n tree: tree_object[];\n currentPath?: string;\n hrefBuilder?: (path: string) => string;\n iconResolver?: (icon?: string) => ReactNode;\n}\n\nexport function ConnectedDocumentationSidebar(props: ConnectedDocumentationSidebarProps) {\n const { isSidebarOpen, closeSidebar } = useDocumentationLayout();\n\n return <DocumentationSidebar isOpen={isSidebarOpen} onClose={closeSidebar} {...props} />;\n}\n"],"mappings":";;;;AAYA,SAAgB,EAA8B,GAA2C;CACvF,IAAM,EAAE,kBAAe,oBAAiB,EAAuB;CAE/D,OAAO,kBAAC,GAAD;EAAsB,QAAQ;EAAe,SAAS;EAAc,GAAI;CAAQ,CAAA;AACzF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content-Bnjq-GtR.js","names":[],"sources":["../../styles/src/components/documentation/toc/content.module.css","../src/components/documentation/toc/content.tsx"],"sourcesContent":["@import '../../../variables.css';\n\n.default {\n color: var(--_sleetch-color-text);\n width: 100%;\n flex: 1;\n padding: 0 2em;\n max-width: 1200px;\n margin: 0 auto;\n}\n\n@media (max-width: 768px) {\n .default {\n padding: 0 1em;\n }\n}\n\n@media (min-width: 769px) and (max-width: 1024px) {\n .default {\n padding: 0 1.5em;\n }\n}\n","import type { BaseHTMLAttributes } from 'react';\nimport styles from '@sleetch/styles/components/documentation/toc/content.module.css';\nimport clsx from 'clsx';\n\nexport interface DocumentationTocContentProps extends BaseHTMLAttributes<HTMLDivElement> {}\n\nexport function DocumentationTocContent({ className, children, ...props }: DocumentationTocContentProps) {\n return (\n <div className={clsx(styles['default'], className)} {...props}>\n {children}\n </div>\n );\n}\n"],"mappings":";;;;;;ACMA,SAAgB,EAAwB,EAAE,cAAW,aAAU,GAAG,KAAuC;CACvG,OACE,kBAAC,OAAD;EAAK,WAAW,EAAK,EAAO,SAAY,CAAS;EAAG,GAAI;EACrD;CACE,CAAA;AAET"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content-CqUGhbCF.cjs","names":[],"sources":["../../styles/src/components/documentation/content.module.css","../src/components/documentation/content.tsx"],"sourcesContent":["@import '../../variables.css';\n\n.default {\n display: flex;\n flex: 1;\n min-height: calc(100vh - var(--_sleetch-header-height));\n}\n\n@media (max-width: 768px) {\n .default {\n flex-direction: column;\n }\n}\n","import type { BaseHTMLAttributes } from 'react';\nimport styles from '@sleetch/styles/components/documentation/content.module.css';\nimport clsx from 'clsx';\n\nexport interface DocumentationContentProps extends BaseHTMLAttributes<HTMLDivElement> {}\n\nexport function DocumentationContent({ className, children, ...props }: DocumentationContentProps) {\n return (\n <div className={clsx(styles['default'], className)} {...props}>\n {children}\n </div>\n );\n}\n"],"mappings":"6GCMA,SAAgB,EAAqB,CAAE,YAAW,WAAU,GAAG,GAAoC,CACjG,OACE,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAW,EAAA,EAAK,EAAO,QAAY,CAAS,EAAG,GAAI,EACrD,UACE,CAAA,CAET"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content-DJNzy3NF.cjs","names":[],"sources":["../../styles/src/components/documentation/toc/content.module.css","../src/components/documentation/toc/content.tsx"],"sourcesContent":["@import '../../../variables.css';\n\n.default {\n color: var(--_sleetch-color-text);\n width: 100%;\n flex: 1;\n padding: 0 2em;\n max-width: 1200px;\n margin: 0 auto;\n}\n\n@media (max-width: 768px) {\n .default {\n padding: 0 1em;\n }\n}\n\n@media (min-width: 769px) and (max-width: 1024px) {\n .default {\n padding: 0 1.5em;\n }\n}\n","import type { BaseHTMLAttributes } from 'react';\nimport styles from '@sleetch/styles/components/documentation/toc/content.module.css';\nimport clsx from 'clsx';\n\nexport interface DocumentationTocContentProps extends BaseHTMLAttributes<HTMLDivElement> {}\n\nexport function DocumentationTocContent({ className, children, ...props }: DocumentationTocContentProps) {\n return (\n <div className={clsx(styles['default'], className)} {...props}>\n {children}\n </div>\n );\n}\n"],"mappings":"6GCMA,SAAgB,EAAwB,CAAE,YAAW,WAAU,GAAG,GAAuC,CACvG,OACE,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAW,EAAA,EAAK,EAAO,QAAY,CAAS,EAAG,GAAI,EACrD,UACE,CAAA,CAET"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content-Dit2HthD.js","names":[],"sources":["../../styles/src/components/documentation/content.module.css","../src/components/documentation/content.tsx"],"sourcesContent":["@import '../../variables.css';\n\n.default {\n display: flex;\n flex: 1;\n min-height: calc(100vh - var(--_sleetch-header-height));\n}\n\n@media (max-width: 768px) {\n .default {\n flex-direction: column;\n }\n}\n","import type { BaseHTMLAttributes } from 'react';\nimport styles from '@sleetch/styles/components/documentation/content.module.css';\nimport clsx from 'clsx';\n\nexport interface DocumentationContentProps extends BaseHTMLAttributes<HTMLDivElement> {}\n\nexport function DocumentationContent({ className, children, ...props }: DocumentationContentProps) {\n return (\n <div className={clsx(styles['default'], className)} {...props}>\n {children}\n </div>\n );\n}\n"],"mappings":";;;;;;ACMA,SAAgB,EAAqB,EAAE,cAAW,aAAU,GAAG,KAAoC;CACjG,OACE,kBAAC,OAAD;EAAK,WAAW,EAAK,EAAO,SAAY,CAAS;EAAG,GAAI;EACrD;CACE,CAAA;AAET"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content-DusAp8Q6.js","names":[],"sources":["../../../node_modules/.bun/@mdx-js+mdx@3.1.1/node_modules/@mdx-js/mdx/lib/run.js","../src/components/documentation/page/content.tsx"],"sourcesContent":["/**\n * @import {MDXModule} from 'mdx/types.js'\n * @import {RunOptions} from './util/resolve-evaluate-options.js'\n */\n\n/** @type {new (code: string, ...args: Array<unknown>) => Function} **/\nconst AsyncFunction = Object.getPrototypeOf(run).constructor\n\n/**\n * Run code compiled with `outputFormat: 'function-body'`.\n *\n * > ☢️ **Danger**: this `eval`s JavaScript.\n *\n * @param {{toString(): string}} code\n * JavaScript function body to run.\n * @param {RunOptions} options\n * Configuration (**required**).\n * @return {Promise<MDXModule>}\n * Promise to a module;\n * the result is an object with a `default` field set to the component;\n * anything else that was exported is available too.\n */\nexport async function run(code, options) {\n return new AsyncFunction(String(code))(options)\n}\n\n/**\n * Run code, synchronously.\n *\n * When possible please use the async `run`.\n *\n * > ☢️ **Danger**: this `eval`s JavaScript.\n *\n * @param {{toString(): string}} code\n * JavaScript function body to run.\n * @param {RunOptions} options\n * Configuration (**required**).\n * @return {MDXModule}\n * Module.\n */\nexport function runSync(code, options) {\n // eslint-disable-next-line no-new-func\n return new Function(String(code))(options)\n}\n","import { use } from 'react';\nimport '@sleetch/styles/markdown.css';\nimport '@sleetch/styles/katex.css';\nimport { run } from '@mdx-js/mdx';\nimport * as runtime from 'react/jsx-runtime';\nimport type { MDXComponents } from 'mdx/types';\nimport type { markdown_module } from '@sleetch/core/compiler';\n\nfunction compileMDX(code: string) {\n return run(code, {\n ...runtime,\n baseUrl: import.meta.url,\n });\n}\n\nexport function PageContent({ page, components }: { page: Promise<markdown_module>; components?: MDXComponents }) {\n const value = use(page);\n\n if (value.default.parsed.type == 'html') {\n return (\n <div className=\"sleetch-markdown\">\n <div dangerouslySetInnerHTML={{ __html: value.default.parsed.html }} />\n </div>\n );\n }\n\n const compiled = use(compileMDX(value.default.parsed.code));\n const Content = compiled.default;\n\n return (\n <div className=\"sleetch-markdown\">\n <Content components={components} />\n </div>\n );\n}\n"],"x_google_ignoreList":[0],"mappings":";;;;AAMA,IAAM,IAAgB,OAAO,eAAe,CAAG,CAAC,CAAC;AAgBjD,eAAsB,EAAI,GAAM,GAAS;CACvC,OAAO,IAAI,EAAc,OAAO,CAAI,CAAC,CAAC,CAAC,CAAO;AAChD;;;AChBA,SAAS,EAAW,GAAc;CAChC,OAAO,EAAI,GAAM;EACf,GAAG;EACH,SAAS,YAAY;CACvB,CAAC;AACH;AAEA,SAAgB,EAAY,EAAE,SAAM,iBAA8E;CAChH,IAAM,IAAQ,EAAI,CAAI;CAEtB,IAAI,EAAM,QAAQ,OAAO,QAAQ,QAC/B,OACE,kBAAC,OAAD;EAAK,WAAU;EACb,UAAA,kBAAC,OAAD,EAAK,yBAAyB,EAAE,QAAQ,EAAM,QAAQ,OAAO,KAAK,EAAI,CAAA;CACnE,CAAA;CAKT,IAAM,IADW,EAAI,EAAW,EAAM,QAAQ,OAAO,IAAI,CACzC,CAAA,CAAS;CAEzB,OACE,kBAAC,OAAD;EAAK,WAAU;EACb,UAAA,kBAAC,GAAD,EAAqB,cAAa,CAAA;CAC/B,CAAA;AAET"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content-a-BY0A0H.js","names":[],"sources":["../../styles/src/components/documentation/sidebar/content.module.css","../src/components/documentation/sidebar/content.tsx"],"sourcesContent":["@import '../../../variables.css';\n\n.default {\n color: var(--_sleetch-color-text);\n width: 100%;\n flex: 1;\n padding: 0 2em;\n max-width: 1200px;\n margin: 0 auto;\n}\n\n@media (max-width: 768px) {\n .default {\n padding: 0 1em;\n }\n}\n\n@media (min-width: 769px) and (max-width: 1024px) {\n .default {\n padding: 0 1.5em;\n }\n}\n","import type { BaseHTMLAttributes } from 'react';\nimport styles from '@sleetch/styles/components/documentation/sidebar/content.module.css';\nimport clsx from 'clsx';\n\nexport interface DocumentationSidebarContentProps extends BaseHTMLAttributes<HTMLDivElement> {}\n\nexport function DocumentationSidebarContent({ className, children, ...props }: DocumentationSidebarContentProps) {\n return (\n <div className={clsx(styles['default'], className)} {...props}>\n {children}\n </div>\n );\n}\n"],"mappings":";;;;;;ACMA,SAAgB,EAA4B,EAAE,cAAW,aAAU,GAAG,KAA2C;CAC/G,OACE,kBAAC,OAAD;EAAK,WAAW,EAAK,EAAO,SAAY,CAAS;EAAG,GAAI;EACrD;CACE,CAAA;AAET"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
require('./assets/content3.css');var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));let c=require("react"),l=require("react/jsx-runtime");l=s(l,1);var u=Object.getPrototypeOf(d).constructor;async function d(e,t){return new u(String(e))(t)}function f(e){return d(e,{...l,baseUrl:{}.url})}function p({page:e,components:t}){let n=(0,c.use)(e);if(n.default.parsed.type==`html`)return(0,l.jsx)(`div`,{className:`sleetch-markdown`,children:(0,l.jsx)(`div`,{dangerouslySetInnerHTML:{__html:n.default.parsed.html}})});let r=(0,c.use)(f(n.default.parsed.code)).default;return(0,l.jsx)(`div`,{className:`sleetch-markdown`,children:(0,l.jsx)(r,{components:t})})}Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return p}});
|
|
2
|
-
//# sourceMappingURL=content-chbzPH8e.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content-chbzPH8e.cjs","names":[],"sources":["../../../node_modules/.bun/@mdx-js+mdx@3.1.1/node_modules/@mdx-js/mdx/lib/run.js","../src/components/documentation/page/content.tsx"],"sourcesContent":["/**\n * @import {MDXModule} from 'mdx/types.js'\n * @import {RunOptions} from './util/resolve-evaluate-options.js'\n */\n\n/** @type {new (code: string, ...args: Array<unknown>) => Function} **/\nconst AsyncFunction = Object.getPrototypeOf(run).constructor\n\n/**\n * Run code compiled with `outputFormat: 'function-body'`.\n *\n * > ☢️ **Danger**: this `eval`s JavaScript.\n *\n * @param {{toString(): string}} code\n * JavaScript function body to run.\n * @param {RunOptions} options\n * Configuration (**required**).\n * @return {Promise<MDXModule>}\n * Promise to a module;\n * the result is an object with a `default` field set to the component;\n * anything else that was exported is available too.\n */\nexport async function run(code, options) {\n return new AsyncFunction(String(code))(options)\n}\n\n/**\n * Run code, synchronously.\n *\n * When possible please use the async `run`.\n *\n * > ☢️ **Danger**: this `eval`s JavaScript.\n *\n * @param {{toString(): string}} code\n * JavaScript function body to run.\n * @param {RunOptions} options\n * Configuration (**required**).\n * @return {MDXModule}\n * Module.\n */\nexport function runSync(code, options) {\n // eslint-disable-next-line no-new-func\n return new Function(String(code))(options)\n}\n","import { use } from 'react';\nimport '@sleetch/styles/markdown.css';\nimport '@sleetch/styles/katex.css';\nimport { run } from '@mdx-js/mdx';\nimport * as runtime from 'react/jsx-runtime';\nimport type { MDXComponents } from 'mdx/types';\nimport type { markdown_module } from '@sleetch/core/compiler';\n\nfunction compileMDX(code: string) {\n return run(code, {\n ...runtime,\n baseUrl: import.meta.url,\n });\n}\n\nexport function PageContent({ page, components }: { page: Promise<markdown_module>; components?: MDXComponents }) {\n const value = use(page);\n\n if (value.default.parsed.type == 'html') {\n return (\n <div className=\"sleetch-markdown\">\n <div dangerouslySetInnerHTML={{ __html: value.default.parsed.html }} />\n </div>\n );\n }\n\n const compiled = use(compileMDX(value.default.parsed.code));\n const Content = compiled.default;\n\n return (\n <div className=\"sleetch-markdown\">\n <Content components={components} />\n </div>\n );\n}\n"],"x_google_ignoreList":[0],"mappings":"mjBAMA,IAAM,EAAgB,OAAO,eAAe,CAAG,CAAC,CAAC,YAgBjD,eAAsB,EAAI,EAAM,EAAS,CACvC,OAAO,IAAI,EAAc,OAAO,CAAI,CAAC,CAAC,CAAC,CAAO,CAChD,CChBA,SAAS,EAAW,EAAc,CAChC,OAAO,EAAI,EAAM,CACf,GAAG,EACH,QAAA,CAAA,EAAqB,GACvB,CAAC,CACH,CAEA,SAAgB,EAAY,CAAE,OAAM,cAA8E,CAChH,IAAM,GAAA,EAAQ,EAAA,IAAA,CAAI,CAAI,EAEtB,GAAI,EAAM,QAAQ,OAAO,MAAQ,OAC/B,OACE,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,mBACb,UAAA,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,wBAAyB,CAAE,OAAQ,EAAM,QAAQ,OAAO,IAAK,CAAI,CAAA,CACnE,CAAA,EAKT,IAAM,GAAA,EADW,EAAA,IAAA,CAAI,EAAW,EAAM,QAAQ,OAAO,IAAI,CACzC,CAAA,CAAS,QAEzB,OACE,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,mBACb,UAAA,EAAA,EAAA,IAAA,CAAC,EAAD,CAAqB,YAAa,CAAA,CAC/B,CAAA,CAET"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content-t22ieOoh.cjs","names":[],"sources":["../../styles/src/components/documentation/sidebar/content.module.css","../src/components/documentation/sidebar/content.tsx"],"sourcesContent":["@import '../../../variables.css';\n\n.default {\n color: var(--_sleetch-color-text);\n width: 100%;\n flex: 1;\n padding: 0 2em;\n max-width: 1200px;\n margin: 0 auto;\n}\n\n@media (max-width: 768px) {\n .default {\n padding: 0 1em;\n }\n}\n\n@media (min-width: 769px) and (max-width: 1024px) {\n .default {\n padding: 0 1.5em;\n }\n}\n","import type { BaseHTMLAttributes } from 'react';\nimport styles from '@sleetch/styles/components/documentation/sidebar/content.module.css';\nimport clsx from 'clsx';\n\nexport interface DocumentationSidebarContentProps extends BaseHTMLAttributes<HTMLDivElement> {}\n\nexport function DocumentationSidebarContent({ className, children, ...props }: DocumentationSidebarContentProps) {\n return (\n <div className={clsx(styles['default'], className)} {...props}>\n {children}\n </div>\n );\n}\n"],"mappings":"6GCMA,SAAgB,EAA4B,CAAE,YAAW,WAAU,GAAG,GAA2C,CAC/G,OACE,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAW,EAAA,EAAK,EAAO,QAAY,CAAS,EAAG,GAAI,EACrD,UACE,CAAA,CAET"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-system-BtXBcLmT.js","names":[],"sources":["../../styles/src/components/file-system.module.css","../src/components/file-system.tsx"],"sourcesContent":[".file-system {\n display: flex;\n flex-direction: column;\n gap: 0.15em;\n color: var(--_sleetch-color-text);\n font-family: var(--_sleetch-font-base);\n font-size: var(--_sleetch-font-size-small);\n line-height: var(--_sleetch-line-height);\n padding: 0.85em;\n background: var(--_sleetch-color-card);\n border-radius: var(--_sleetch-radius);\n border: var(--_sleetch-hr-height) solid var(--_sleetch-color-muted);\n margin: 0 0 1em;\n}\n\n.folder {\n display: flex;\n flex-direction: column;\n}\n\n.folder.hidden {\n opacity: 0.5;\n}\n\n.row {\n display: flex;\n align-items: center;\n gap: 0.55em;\n padding: 0.4em 0.6em;\n border-radius: calc(var(--_sleetch-radius) - 2px);\n transition:\n background-color var(--_sleetch-transition-duration) var(--_sleetch-transition-timing),\n color var(--_sleetch-transition-duration) var(--_sleetch-transition-timing);\n}\n\n.folderRow {\n color: var(--_sleetch-color-muted-foreground);\n}\n\n.icon {\n flex-shrink: 0;\n color: currentColor;\n}\n\n.label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.comment {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--_sleetch-color-muted-foreground);\n font-style: italic;\n}\n\n.children {\n display: flex;\n flex-direction: column;\n gap: 0.15em;\n margin-left: 0.75em;\n padding-left: 0.65em;\n border-left: var(--_sleetch-underline-height) solid var(--_sleetch-color-muted);\n}\n\n.file {\n color: var(--_sleetch-color-text);\n cursor: default;\n}\n\n.file:hover {\n background: var(--_sleetch-color-muted);\n}\n\n.file.selected {\n color: var(--_sleetch-color-text-primary);\n background: color-mix(in srgb, var(--_sleetch-color-text-primary) 12%, transparent);\n}\n\n.file.selected:hover {\n background: color-mix(in srgb, var(--_sleetch-color-text-primary) 18%, transparent);\n}\n","import styles from '@sleetch/styles/components/file-system.module.css';\nimport type { ReactNode, SVGProps } from 'react';\n\ninterface IconProps extends SVGProps<SVGSVGElement> {\n className?: string;\n}\n\nfunction FolderIcon({ className, ...props }: IconProps) {\n return (\n <svg\n className={className}\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.75\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n {...props}\n >\n <path d=\"M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Z\" />\n </svg>\n );\n}\n\nfunction FileIcon({ className, ...props }: IconProps) {\n return (\n <svg\n className={className}\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.75\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n {...props}\n >\n <path d=\"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z\" />\n <path d=\"M14 2v6h6\" />\n </svg>\n );\n}\n\nexport interface FilesProps {\n children?: ReactNode;\n className?: string;\n}\n\nexport function FileSystem({ children, className = '' }: FilesProps) {\n return (\n <div className=\"no-sleetch-markdown\">\n <div className={[styles['file-system'], className].filter(Boolean).join(' ')}>{children}</div>\n </div>\n );\n}\n\nexport interface FolderProps {\n name: string;\n children?: ReactNode;\n hidden?: boolean;\n className?: string;\n}\n\nexport function Folder({ name, children, hidden = false, className = '' }: FolderProps) {\n return (\n <div className={[styles.folder, hidden && styles.hidden, className].filter(Boolean).join(' ')}>\n <div className={[styles.row, styles.folderRow].join(' ')}>\n <FolderIcon className={styles.icon} />\n <span className={styles.label}>{name}</span>\n </div>\n {children && <div className={styles.children}>{children}</div>}\n </div>\n );\n}\n\nexport interface FileProps {\n name: string;\n comment?: string;\n selected?: boolean;\n className?: string;\n}\n\nexport function File({ name, comment, selected = false, className = '' }: FileProps) {\n return (\n <div className={[styles.row, styles.file, selected && styles.selected, className].filter(Boolean).join(' ')}>\n <FileIcon className={styles.icon} />\n <span className={styles.label}>{name}</span>\n <span className={styles.comment}>{comment}</span>\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A,CACxC;EACJ,CAAA,GAAA,KAAY,kBAAC,OAAD;GAAK,WAAW,EAAO;GAAW;EAAc,CAAA,CAC1D;;AAET;AASA,SAAgB,EAAK,EAAE,SAAM,YAAS,cAAW,IAAO,eAAY,MAAiB;CACnF,OACE,kBAAC,OAAD;EAAK,WAAW;GAAC,EAAO;GAAK,EAAO;GAAM,KAAY,EAAO;GAAU;EAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EAA1G,UAAA;GACE,kBAAC,GAAD,EAAU,WAAW,EAAO,KAAO,CAAA;GACnC,kBAAC,QAAD;IAAM,WAAW,EAAO;IAAQ,UAAA;GAAW,CAAA;GAC3C,kBAAC,QAAD;IAAM,WAAW,EAAO;IAAU,UAAA;GAAc,CAAA;EAC7C;;AAET"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-system-Dr4N-WNs.cjs","names":[],"sources":["../../styles/src/components/file-system.module.css","../src/components/file-system.tsx"],"sourcesContent":[".file-system {\n display: flex;\n flex-direction: column;\n gap: 0.15em;\n color: var(--_sleetch-color-text);\n font-family: var(--_sleetch-font-base);\n font-size: var(--_sleetch-font-size-small);\n line-height: var(--_sleetch-line-height);\n padding: 0.85em;\n background: var(--_sleetch-color-card);\n border-radius: var(--_sleetch-radius);\n border: var(--_sleetch-hr-height) solid var(--_sleetch-color-muted);\n margin: 0 0 1em;\n}\n\n.folder {\n display: flex;\n flex-direction: column;\n}\n\n.folder.hidden {\n opacity: 0.5;\n}\n\n.row {\n display: flex;\n align-items: center;\n gap: 0.55em;\n padding: 0.4em 0.6em;\n border-radius: calc(var(--_sleetch-radius) - 2px);\n transition:\n background-color var(--_sleetch-transition-duration) var(--_sleetch-transition-timing),\n color var(--_sleetch-transition-duration) var(--_sleetch-transition-timing);\n}\n\n.folderRow {\n color: var(--_sleetch-color-muted-foreground);\n}\n\n.icon {\n flex-shrink: 0;\n color: currentColor;\n}\n\n.label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.comment {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--_sleetch-color-muted-foreground);\n font-style: italic;\n}\n\n.children {\n display: flex;\n flex-direction: column;\n gap: 0.15em;\n margin-left: 0.75em;\n padding-left: 0.65em;\n border-left: var(--_sleetch-underline-height) solid var(--_sleetch-color-muted);\n}\n\n.file {\n color: var(--_sleetch-color-text);\n cursor: default;\n}\n\n.file:hover {\n background: var(--_sleetch-color-muted);\n}\n\n.file.selected {\n color: var(--_sleetch-color-text-primary);\n background: color-mix(in srgb, var(--_sleetch-color-text-primary) 12%, transparent);\n}\n\n.file.selected:hover {\n background: color-mix(in srgb, var(--_sleetch-color-text-primary) 18%, transparent);\n}\n","import styles from '@sleetch/styles/components/file-system.module.css';\nimport type { ReactNode, SVGProps } from 'react';\n\ninterface IconProps extends SVGProps<SVGSVGElement> {\n className?: string;\n}\n\nfunction FolderIcon({ className, ...props }: IconProps) {\n return (\n <svg\n className={className}\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.75\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n {...props}\n >\n <path d=\"M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Z\" />\n </svg>\n );\n}\n\nfunction FileIcon({ className, ...props }: IconProps) {\n return (\n <svg\n className={className}\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.75\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n {...props}\n >\n <path d=\"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z\" />\n <path d=\"M14 2v6h6\" />\n </svg>\n );\n}\n\nexport interface FilesProps {\n children?: ReactNode;\n className?: string;\n}\n\nexport function FileSystem({ children, className = '' }: FilesProps) {\n return (\n <div className=\"no-sleetch-markdown\">\n <div className={[styles['file-system'], className].filter(Boolean).join(' ')}>{children}</div>\n </div>\n );\n}\n\nexport interface FolderProps {\n name: string;\n children?: ReactNode;\n hidden?: boolean;\n className?: string;\n}\n\nexport function Folder({ name, children, hidden = false, className = '' }: FolderProps) {\n return (\n <div className={[styles.folder, hidden && styles.hidden, className].filter(Boolean).join(' ')}>\n <div className={[styles.row, styles.folderRow].join(' ')}>\n <FolderIcon className={styles.icon} />\n <span className={styles.label}>{name}</span>\n </div>\n {children && <div className={styles.children}>{children}</div>}\n </div>\n );\n}\n\nexport interface FileProps {\n name: string;\n comment?: string;\n selected?: boolean;\n className?: string;\n}\n\nexport function File({ name, comment, selected = false, className = '' }: FileProps) {\n return (\n <div className={[styles.row, styles.file, selected && styles.selected, className].filter(Boolean).join(' ')}>\n <FileIcon className={styles.icon} />\n <span className={styles.label}>{name}</span>\n <span className={styles.comment}>{comment}</span>\n </div>\n );\n}\n"],"mappings":"mVCOA,SAAS,EAAW,CAAE,YAAW,GAAG,GAAoB,CACtD,OACE,EAAA,EAAA,IAAA,CAAC,MAAD,CACa,YACX,MAAM,KACN,OAAO,KACP,QAAQ,YACR,KAAK,OACL,OAAO,eACP,YAAY,OACZ,cAAc,QACd,eAAe,QACf,cAAY,OACZ,GAAI,EAEJ,UAAA,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,EAAE,6EAA+E,CAAA,CACpF,CAAA,CAET,CAEA,SAAS,EAAS,CAAE,YAAW,GAAG,GAAoB,CACpD,OACE,EAAA,EAAA,KAAA,CAAC,MAAD,CACa,YACX,MAAM,KACN,OAAO,KACP,QAAQ,YACR,KAAK,OACL,OAAO,eACP,YAAY,OACZ,cAAc,QACd,eAAe,QACf,cAAY,OACZ,GAAI,EAXN,SAAA,EAaE,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,EAAE,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C,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAW,EAAO,MAAQ,SAAA,CAAW,CAAA,GAC3C,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAW,EAAO,QAAU,SAAA,CAAc,CAAA,CAC7C,GAET"}
|
package/dist/header-CYEQU5cQ.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
require('./assets/header.css');const e=require("./clsx-GLXUd3yb.cjs");let t=require("react/jsx-runtime");var n={default:`_default_1qrxa_3`,"menu-toggle":`_menu-toggle_1qrxa_18`};function r({className:r,children:i,onMenuToggle:a,...o}){return(0,t.jsxs)(`div`,{className:e.t(n.default,r),...o,children:[a&&(0,t.jsx)(`button`,{className:n[`menu-toggle`],onClick:a,"aria-label":`Toggle sidebar`,type:`button`,children:(0,t.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`24`,height:`24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,t.jsx)(`line`,{x1:`3`,y1:`12`,x2:`21`,y2:`12`}),(0,t.jsx)(`line`,{x1:`3`,y1:`6`,x2:`21`,y2:`6`}),(0,t.jsx)(`line`,{x1:`3`,y1:`18`,x2:`21`,y2:`18`})]})}),i]})}Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return r}});
|
|
2
|
-
//# sourceMappingURL=header-CYEQU5cQ.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"header-CYEQU5cQ.cjs","names":[],"sources":["../../styles/src/components/documentation/header.module.css","../src/components/documentation/header.tsx"],"sourcesContent":["@import '../../variables.css';\n\n.default {\n color: var(--_sleetch-color-text);\n height: var(--_sleetch-header-height);\n background-color: color-mix(in srgb, var(--_sleetch-color-card) 30%, transparent);\n backdrop-filter: blur(15px);\n border-bottom: 1px solid var(--_sleetch-color-muted);\n position: sticky;\n top: 0;\n display: flex;\n align-items: center;\n padding: 0 2em;\n gap: 1em;\n z-index: 100;\n}\n\n.menu-toggle {\n display: none;\n background: none;\n border: none;\n color: var(--_sleetch-color-text);\n cursor: pointer;\n padding: 0.5em;\n border-radius: var(--_sleetch-radius);\n transition: background-color var(--_sleetch-transition-duration) var(--_sleetch-transition-timing);\n}\n\n.menu-toggle:hover {\n background-color: var(--_sleetch-color-muted);\n}\n\n.menu-toggle:active {\n transform: scale(0.95);\n}\n\n@media (max-width: 768px) {\n .default {\n padding: 0 1em;\n }\n\n .menu-toggle {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n}\n","import type { BaseHTMLAttributes } from 'react';\nimport styles from '@sleetch/styles/components/documentation/header.module.css';\nimport clsx from 'clsx';\n\nexport interface DocumentationHeaderProps extends BaseHTMLAttributes<HTMLDivElement> {\n onMenuToggle?: () => void;\n}\n\nexport function DocumentationHeader({ className, children, onMenuToggle, ...props }: DocumentationHeaderProps) {\n return (\n <div className={clsx(styles['default'], className)} {...props}>\n {onMenuToggle && (\n <button className={styles['menu-toggle']} onClick={onMenuToggle} aria-label=\"Toggle sidebar\" type=\"button\">\n <svg\n viewBox=\"0 0 24 24\"\n width=\"24\"\n height=\"24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <line x1=\"3\" y1=\"12\" x2=\"21\" y2=\"12\" />\n <line x1=\"3\" y1=\"6\" x2=\"21\" y2=\"6\" />\n <line x1=\"3\" y1=\"18\" x2=\"21\" y2=\"18\" />\n </svg>\n </button>\n )}\n {children}\n </div>\n );\n}\n"],"mappings":"mJCQA,SAAgB,EAAoB,CAAE,YAAW,WAAU,eAAc,GAAG,GAAmC,CAC7G,OACE,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAW,EAAA,EAAK,EAAO,QAAY,CAAS,EAAG,GAAI,EAAxD,SAAA,CACG,IACC,EAAA,EAAA,IAAA,CAAC,SAAD,CAAQ,UAAW,EAAO,eAAgB,QAAS,EAAc,aAAW,iBAAiB,KAAK,SAChG,UAAA,EAAA,EAAA,KAAA,CAAC,MAAD,CACE,QAAQ,YACR,MAAM,KACN,OAAO,KACP,KAAK,OACL,OAAO,eACP,YAAY,IACZ,cAAc,QACd,eAAe,QARjB,SAAA,EAUE,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,IAAM,CAAA,GACtC,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,GAAK,CAAA,GACpC,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,IAAM,CAAA,CACnC,GACC,CAAA,EAET,CACE,GAET"}
|
package/dist/header-sU8dWMtq.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./clsx-CaAiuA5w.js";
|
|
2
|
-
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
-
import './assets/header.css';//#region ../styles/src/components/documentation/header.module.css
|
|
4
|
-
var r = {
|
|
5
|
-
default: "_default_1qrxa_3",
|
|
6
|
-
"menu-toggle": "_menu-toggle_1qrxa_18"
|
|
7
|
-
};
|
|
8
|
-
//#endregion
|
|
9
|
-
//#region src/components/documentation/header.tsx
|
|
10
|
-
function i({ className: i, children: a, onMenuToggle: o, ...s }) {
|
|
11
|
-
return /* @__PURE__ */ n("div", {
|
|
12
|
-
className: e(r.default, i),
|
|
13
|
-
...s,
|
|
14
|
-
children: [o && /* @__PURE__ */ t("button", {
|
|
15
|
-
className: r["menu-toggle"],
|
|
16
|
-
onClick: o,
|
|
17
|
-
"aria-label": "Toggle sidebar",
|
|
18
|
-
type: "button",
|
|
19
|
-
children: /* @__PURE__ */ n("svg", {
|
|
20
|
-
viewBox: "0 0 24 24",
|
|
21
|
-
width: "24",
|
|
22
|
-
height: "24",
|
|
23
|
-
fill: "none",
|
|
24
|
-
stroke: "currentColor",
|
|
25
|
-
strokeWidth: "2",
|
|
26
|
-
strokeLinecap: "round",
|
|
27
|
-
strokeLinejoin: "round",
|
|
28
|
-
children: [
|
|
29
|
-
/* @__PURE__ */ t("line", {
|
|
30
|
-
x1: "3",
|
|
31
|
-
y1: "12",
|
|
32
|
-
x2: "21",
|
|
33
|
-
y2: "12"
|
|
34
|
-
}),
|
|
35
|
-
/* @__PURE__ */ t("line", {
|
|
36
|
-
x1: "3",
|
|
37
|
-
y1: "6",
|
|
38
|
-
x2: "21",
|
|
39
|
-
y2: "6"
|
|
40
|
-
}),
|
|
41
|
-
/* @__PURE__ */ t("line", {
|
|
42
|
-
x1: "3",
|
|
43
|
-
y1: "18",
|
|
44
|
-
x2: "21",
|
|
45
|
-
y2: "18"
|
|
46
|
-
})
|
|
47
|
-
]
|
|
48
|
-
})
|
|
49
|
-
}), a]
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
//#endregion
|
|
53
|
-
export { i as t };
|
|
54
|
-
|
|
55
|
-
//# sourceMappingURL=header-sU8dWMtq.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"header-sU8dWMtq.js","names":[],"sources":["../../styles/src/components/documentation/header.module.css","../src/components/documentation/header.tsx"],"sourcesContent":["@import '../../variables.css';\n\n.default {\n color: var(--_sleetch-color-text);\n height: var(--_sleetch-header-height);\n background-color: color-mix(in srgb, var(--_sleetch-color-card) 30%, transparent);\n backdrop-filter: blur(15px);\n border-bottom: 1px solid var(--_sleetch-color-muted);\n position: sticky;\n top: 0;\n display: flex;\n align-items: center;\n padding: 0 2em;\n gap: 1em;\n z-index: 100;\n}\n\n.menu-toggle {\n display: none;\n background: none;\n border: none;\n color: var(--_sleetch-color-text);\n cursor: pointer;\n padding: 0.5em;\n border-radius: var(--_sleetch-radius);\n transition: background-color var(--_sleetch-transition-duration) var(--_sleetch-transition-timing);\n}\n\n.menu-toggle:hover {\n background-color: var(--_sleetch-color-muted);\n}\n\n.menu-toggle:active {\n transform: scale(0.95);\n}\n\n@media (max-width: 768px) {\n .default {\n padding: 0 1em;\n }\n\n .menu-toggle {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n}\n","import type { BaseHTMLAttributes } from 'react';\nimport styles from '@sleetch/styles/components/documentation/header.module.css';\nimport clsx from 'clsx';\n\nexport interface DocumentationHeaderProps extends BaseHTMLAttributes<HTMLDivElement> {\n onMenuToggle?: () => void;\n}\n\nexport function DocumentationHeader({ className, children, onMenuToggle, ...props }: DocumentationHeaderProps) {\n return (\n <div className={clsx(styles['default'], className)} {...props}>\n {onMenuToggle && (\n <button className={styles['menu-toggle']} onClick={onMenuToggle} aria-label=\"Toggle sidebar\" type=\"button\">\n <svg\n viewBox=\"0 0 24 24\"\n width=\"24\"\n height=\"24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <line x1=\"3\" y1=\"12\" x2=\"21\" y2=\"12\" />\n <line x1=\"3\" y1=\"6\" x2=\"21\" y2=\"6\" />\n <line x1=\"3\" y1=\"18\" x2=\"21\" y2=\"18\" />\n </svg>\n </button>\n )}\n {children}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;ACQA,SAAgB,EAAoB,EAAE,cAAW,aAAU,iBAAc,GAAG,KAAmC;CAC7G,OACE,kBAAC,OAAD;EAAK,WAAW,EAAK,EAAO,SAAY,CAAS;EAAG,GAAI;EAAxD,UAAA,CACG,KACC,kBAAC,UAAD;GAAQ,WAAW,EAAO;GAAgB,SAAS;GAAc,cAAW;GAAiB,MAAK;GAChG,UAAA,kBAAC,OAAD;IACE,SAAQ;IACR,OAAM;IACN,QAAO;IACP,MAAK;IACL,QAAO;IACP,aAAY;IACZ,eAAc;IACd,gBAAe;IARjB,UAAA;KAUE,kBAAC,QAAD;MAAM,IAAG;MAAI,IAAG;MAAK,IAAG;MAAK,IAAG;KAAM,CAAA;KACtC,kBAAC,QAAD;MAAM,IAAG;MAAI,IAAG;MAAI,IAAG;MAAK,IAAG;KAAK,CAAA;KACpC,kBAAC,QAAD;MAAM,IAAG;MAAI,IAAG;MAAK,IAAG;MAAK,IAAG;KAAM,CAAA;IACnC;;EACC,CAAA,GAET,CACE;;AAET"}
|
package/dist/layout-8L0QXbyL.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./clsx-CaAiuA5w.js";
|
|
2
|
-
import { createContext as t, useContext as n, useState as r } from "react";
|
|
3
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
4
|
-
import './assets/layout.css';//#region ../styles/src/components/documentation/layout.module.css
|
|
5
|
-
var a = { default: "_default_1till_3" }, o = t(null);
|
|
6
|
-
function s() {
|
|
7
|
-
let e = n(o);
|
|
8
|
-
if (!e) throw Error("useDocumentationLayout must be used within DocumentationLayout");
|
|
9
|
-
return e;
|
|
10
|
-
}
|
|
11
|
-
function c({ children: t, className: n, ...s }) {
|
|
12
|
-
let [c, l] = r(!1);
|
|
13
|
-
return /* @__PURE__ */ i(o.Provider, {
|
|
14
|
-
value: {
|
|
15
|
-
isSidebarOpen: c,
|
|
16
|
-
toggleSidebar: () => l((e) => !e),
|
|
17
|
-
closeSidebar: () => l(!1)
|
|
18
|
-
},
|
|
19
|
-
children: /* @__PURE__ */ i("main", {
|
|
20
|
-
className: e(a.default, n),
|
|
21
|
-
...s,
|
|
22
|
-
children: t
|
|
23
|
-
})
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
//#endregion
|
|
27
|
-
export { s as n, c as t };
|
|
28
|
-
|
|
29
|
-
//# sourceMappingURL=layout-8L0QXbyL.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"layout-8L0QXbyL.js","names":[],"sources":["../../styles/src/components/documentation/layout.module.css","../src/components/documentation/layout.tsx"],"sourcesContent":["@import '../../variables.css';\n\n.default {\n color: var(--_sleetch-color-text);\n background-color: var(--_sleetch-color-background);\n display: flex;\n flex-direction: column;\n min-height: 100vh;\n}\n","import type { ReactNode, BaseHTMLAttributes } from 'react';\nimport { createContext, useContext, useState } from 'react';\nimport styles from '@sleetch/styles/components/documentation/layout.module.css';\nimport clsx from 'clsx';\n\nexport interface DocumentationLayoutProps extends BaseHTMLAttributes<HTMLDivElement> {}\n\ninterface LayoutContextType {\n isSidebarOpen: boolean;\n toggleSidebar: () => void;\n closeSidebar: () => void;\n}\n\nconst LayoutContext = createContext<LayoutContextType | null>(null);\n\nexport function useDocumentationLayout() {\n const context = useContext(LayoutContext);\n if (!context) {\n throw new Error('useDocumentationLayout must be used within DocumentationLayout');\n }\n return context;\n}\n\nexport function DocumentationLayout({ children, className, ...props }: DocumentationLayoutProps) {\n const [isSidebarOpen, setIsSidebarOpen] = useState(false);\n\n const toggleSidebar = () => setIsSidebarOpen((prev) => !prev);\n const closeSidebar = () => setIsSidebarOpen(false);\n\n return (\n <LayoutContext.Provider value={{ isSidebarOpen, toggleSidebar, closeSidebar }}>\n <main className={clsx(styles['default'], className)} {...props}>\n {children}\n </main>\n </LayoutContext.Provider>\n );\n}\n"],"mappings":";;;;yCCaM,IAAgB,EAAwC,IAAI;AAElE,SAAgB,IAAyB;CACvC,IAAM,IAAU,EAAW,CAAa;CACxC,IAAI,CAAC,GACH,MAAU,MAAM,gEAAgE;CAElF,OAAO;AACT;AAEA,SAAgB,EAAoB,EAAE,aAAU,cAAW,GAAG,KAAmC;CAC/F,IAAM,CAAC,GAAe,KAAoB,EAAS,EAAK;CAKxD,OACE,kBAAC,EAAc,UAAf;EAAwB,OAAO;GAAE;GAAe,qBAJtB,GAAkB,MAAS,CAAC,CAAI;GAIK,oBAHtC,EAAiB,EAAK;EAG6B;EAC1E,UAAA,kBAAC,QAAD;GAAM,WAAW,EAAK,EAAO,SAAY,CAAS;GAAG,GAAI;GACtD;EACG,CAAA;CACgB,CAAA;AAE5B"}
|
package/dist/layout-S6NKDwxp.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
require('./assets/layout.css');const e=require("./clsx-GLXUd3yb.cjs");let t=require("react"),n=require("react/jsx-runtime");var r={default:`_default_1till_3`},i=(0,t.createContext)(null);function a(){let e=(0,t.useContext)(i);if(!e)throw Error(`useDocumentationLayout must be used within DocumentationLayout`);return e}function o({children:a,className:o,...s}){let[c,l]=(0,t.useState)(!1);return(0,n.jsx)(i.Provider,{value:{isSidebarOpen:c,toggleSidebar:()=>l(e=>!e),closeSidebar:()=>l(!1)},children:(0,n.jsx)(`main`,{className:e.t(r.default,o),...s,children:a})})}Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return o}});
|
|
2
|
-
//# sourceMappingURL=layout-S6NKDwxp.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"layout-S6NKDwxp.cjs","names":[],"sources":["../../styles/src/components/documentation/layout.module.css","../src/components/documentation/layout.tsx"],"sourcesContent":["@import '../../variables.css';\n\n.default {\n color: var(--_sleetch-color-text);\n background-color: var(--_sleetch-color-background);\n display: flex;\n flex-direction: column;\n min-height: 100vh;\n}\n","import type { ReactNode, BaseHTMLAttributes } from 'react';\nimport { createContext, useContext, useState } from 'react';\nimport styles from '@sleetch/styles/components/documentation/layout.module.css';\nimport clsx from 'clsx';\n\nexport interface DocumentationLayoutProps extends BaseHTMLAttributes<HTMLDivElement> {}\n\ninterface LayoutContextType {\n isSidebarOpen: boolean;\n toggleSidebar: () => void;\n closeSidebar: () => void;\n}\n\nconst LayoutContext = createContext<LayoutContextType | null>(null);\n\nexport function useDocumentationLayout() {\n const context = useContext(LayoutContext);\n if (!context) {\n throw new Error('useDocumentationLayout must be used within DocumentationLayout');\n }\n return context;\n}\n\nexport function DocumentationLayout({ children, className, ...props }: DocumentationLayoutProps) {\n const [isSidebarOpen, setIsSidebarOpen] = useState(false);\n\n const toggleSidebar = () => setIsSidebarOpen((prev) => !prev);\n const closeSidebar = () => setIsSidebarOpen(false);\n\n return (\n <LayoutContext.Provider value={{ isSidebarOpen, toggleSidebar, closeSidebar }}>\n <main className={clsx(styles['default'], className)} {...props}>\n {children}\n </main>\n </LayoutContext.Provider>\n );\n}\n"],"mappings":"gICaM,GAAA,EAAgB,EAAA,cAAA,CAAwC,IAAI,EAElE,SAAgB,GAAyB,CACvC,IAAM,GAAA,EAAU,EAAA,WAAA,CAAW,CAAa,EACxC,GAAI,CAAC,EACH,MAAU,MAAM,gEAAgE,EAElF,OAAO,CACT,CAEA,SAAgB,EAAoB,CAAE,WAAU,YAAW,GAAG,GAAmC,CAC/F,GAAM,CAAC,EAAe,IAAA,EAAoB,EAAA,SAAA,CAAS,EAAK,EAKxD,OACE,EAAA,EAAA,IAAA,CAAC,EAAc,SAAf,CAAwB,MAAO,CAAE,gBAAe,kBAJtB,EAAkB,GAAS,CAAC,CAAI,EAIK,iBAHtC,EAAiB,EAAK,CAG6B,EAC1E,UAAA,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAW,EAAA,EAAK,EAAO,QAAY,CAAS,EAAG,GAAI,EACtD,UACG,CAAA,CACgB,CAAA,CAE5B"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
require('./assets/navigation.css');const e=require("./clsx-GLXUd3yb.cjs");let t=require("react"),n=require("react/jsx-runtime");var r={navigation:`_navigation_fckni_3`,slot:`_slot_fckni_12`,"slot-end":`_slot-end_fckni_16`,card:`_card_fckni_20`,next:`_next_fckni_47`,previous:`_previous_fckni_52`,meta:`_meta_fckni_57`,chevron:`_chevron_fckni_65`,title:`_title_fckni_71`,description:`_description_fckni_78`},i=e=>e;function a(e){return e.children.find(e=>e.type===`data`)}function o(e){return e.children.find(e=>e.type===`page`&&e.index===!0)}function s(e){return e.type===`category`?a(e)?.frontmatter?.order??1/0:e.type===`page`?e.frontmatter.order??1/0:1/0}function c(e){return e.map((e,t)=>({node:e,index:t})).filter(({node:e})=>e.type!==`data`).sort((e,t)=>{let n=s(e.node)-s(t.node);return n===0?e.index-t.index:n}).map(({node:e})=>e)}function l(e){let t=c(e),n=[];for(let e of t){if(e.type===`page`){n.push(e);continue}if(e.type===`category`){let t=o(e);t&&n.push(t);let r=e.children.filter(e=>e.type!==`data`&&(e.type!==`page`||e.index!==!0));n.push(...l(r))}}return n}function u(){return(0,n.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,className:r.chevron,children:(0,n.jsx)(`polyline`,{points:`15 18 9 12 15 6`})})}function d(){return(0,n.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,className:r.chevron,children:(0,n.jsx)(`polyline`,{points:`9 18 15 12 9 6`})})}function f(e,t){return e&&e!==`No title.`?e:t}function p(e){return e&&e!==`No description.`?e:void 0}function m({node:t,direction:i,hrefBuilder:a}){let o=f(t.frontmatter.title,t.path),s=p(t.frontmatter.description);return(0,n.jsxs)(`a`,{href:a(t.path),className:e.t(r.card,r[i]),"data-direction":i,children:[(0,n.jsxs)(`span`,{className:r.meta,children:[i===`previous`&&(0,n.jsx)(u,{}),(0,n.jsx)(`span`,{className:r.title,children:o}),i===`next`&&(0,n.jsx)(d,{})]}),s&&(0,n.jsx)(`span`,{className:r.description,children:s})]})}function h({className:a,tree:o,currentPath:s,hrefBuilder:c=i,...u}){let{previous:d,next:f}=(0,t.useMemo)(()=>{let e=l(o),t=e.findIndex(e=>e.path===s);return t===-1?{previous:void 0,next:void 0}:{previous:e[t-1],next:e[t+1]}},[o,s]);return!d&&!f?null:(0,n.jsxs)(`nav`,{className:e.t(r.navigation,a),"aria-label":`Pagination`,...u,children:[(0,n.jsx)(`div`,{className:r.slot,children:d&&(0,n.jsx)(m,{node:d,direction:`previous`,hrefBuilder:c})}),(0,n.jsx)(`div`,{className:e.t(r.slot,r[`slot-end`]),children:f&&(0,n.jsx)(m,{node:f,direction:`next`,hrefBuilder:c})})]})}Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return h}});
|
|
2
|
-
//# sourceMappingURL=navigation-B9LRrcfi.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-B9LRrcfi.cjs","names":[],"sources":["../../styles/src/components/documentation/page/navigation.module.css","../src/components/documentation/page/navigation.tsx"],"sourcesContent":["@import '../../../variables.css';\n\n.navigation {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 1em;\n padding: var(--_sleetch-padding-root);\n padding-top: 0px;\n font-family: var(--_sleetch-font-base);\n}\n\n.slot {\n display: flex;\n}\n\n.slot-end {\n justify-content: flex-end;\n}\n\n.card {\n display: flex;\n flex-direction: column;\n gap: 0.25em;\n width: 100%;\n max-width: 320px;\n padding: 1em 1em;\n border-radius: var(--_sleetch-radius);\n border: var(--_sleetch-hr-height) solid var(--_sleetch-color-muted);\n color: var(--_sleetch-color-text);\n text-decoration: none;\n transition:\n border-color var(--_sleetch-transition-duration) var(--_sleetch-transition-timing),\n background-color var(--_sleetch-transition-duration) var(--_sleetch-transition-timing);\n}\n\n.card:hover,\n.card:focus-visible {\n border-color: var(--_sleetch-color-text-primary);\n background-color: color-mix(in srgb, var(--_sleetch-color-text-primary) 8%, var(--_sleetch-color-card));\n}\n\n.card:focus-visible {\n outline: 2px solid var(--_sleetch-color-text-primary);\n outline-offset: 2px;\n}\n\n.next {\n align-items: flex-end;\n text-align: right;\n}\n\n.previous {\n align-items: flex-start;\n text-align: left;\n}\n\n.meta {\n display: flex;\n align-items: center;\n gap: 0.3em;\n font-size: var(--_sleetch-font-size-tiny);\n color: var(--_sleetch-color-muted-foreground);\n}\n\n.chevron {\n flex-shrink: 0;\n width: 20px;\n height: 20px;\n}\n\n.title {\n font-size: var(--_sleetch-font-size-base);\n font-weight: var(--_sleetch-font-weight-heading);\n line-height: var(--_sleetch-line-height-heading);\n color: var(--_sleetch-color-text);\n}\n\n.description {\n font-size: var(--_sleetch-font-size-tiny);\n line-height: var(--_sleetch-line-height);\n color: var(--_sleetch-color-muted-foreground);\n overflow: hidden;\n}\n\n@media (min-width: 769px) and (max-width: 1024px) {\n .navigation {\n padding: 1.5em 2em;\n }\n}\n\n@media (max-width: 768px) {\n .card {\n max-width: 100%;\n }\n\n .navigation {\n grid-template-columns: 1fr;\n\n padding: 1em 1em;\n }\n\n .slot-end {\n justify-content: flex-start;\n }\n\n .next {\n align-items: flex-start;\n text-align: left;\n }\n}\n","/*\n AI Generated :(\n Needs more testing\n*/\n\nimport { useMemo, type BaseHTMLAttributes } from 'react';\nimport clsx from 'clsx';\nimport styles from '@sleetch/styles/components/documentation/page/navigation.module.css';\nimport type { tree_object } from '@sleetch/core/compiler';\n\ntype category_node = Extract<tree_object, { type: 'category' }>;\ntype page_node = Extract<tree_object, { type: 'page' }>;\ntype data_node = Extract<tree_object, { type: 'data' }>;\n\nexport interface DocumentationNavigationProps extends BaseHTMLAttributes<HTMLDivElement> {\n tree: tree_object[];\n currentPath: string;\n hrefBuilder?: (path: string) => string;\n}\n\nconst defaultHrefBuilder = (path: string) => path;\n\n/*\n Meme logique de tri/priorite que la sidebar (getCategoryData, getCategoryIndex,\n getOrder, sortNodes) pour garantir que l'ordre de navigation prev/next\n corresponde exactement a l'ordre affiche dans la sidebar.\n*/\n\nfunction getCategoryData(category: category_node): data_node | undefined {\n return category.children.find((c): c is data_node => c.type === 'data');\n}\n\nfunction getCategoryIndex(category: category_node): page_node | undefined {\n return category.children.find((c): c is page_node => c.type === 'page' && c.index === true);\n}\n\nfunction getOrder(node: tree_object): number {\n if (node.type === 'category') {\n const data = getCategoryData(node);\n return data?.frontmatter?.order ?? Number.POSITIVE_INFINITY;\n }\n if (node.type === 'page') {\n return (node.frontmatter as { order?: number }).order ?? Number.POSITIVE_INFINITY;\n }\n return Number.POSITIVE_INFINITY;\n}\n\nfunction sortNodes(nodes: tree_object[]): tree_object[] {\n return nodes\n .map((node, index) => ({ node, index }))\n .filter(({ node }) => node.type !== 'data')\n .sort((a, b) => {\n const diff = getOrder(a.node) - getOrder(b.node);\n return diff !== 0 ? diff : a.index - b.index;\n })\n .map(({ node }) => node);\n}\n\n/*\n Aplatit l'arbre en une liste ordonnee de pages navigables :\n - l'index d'une categorie arrive en premier (c'est le point d'entree),\n - suivi de ses enfants tries recursivement.\n*/\nfunction flattenPages(nodes: tree_object[]): page_node[] {\n const sorted = sortNodes(nodes);\n const result: page_node[] = [];\n\n for (const node of sorted) {\n if (node.type === 'page') {\n result.push(node);\n continue;\n }\n\n if (node.type === 'category') {\n const indexPage = getCategoryIndex(node);\n if (indexPage) result.push(indexPage);\n\n const rest = node.children.filter((c) => c.type !== 'data' && !(c.type === 'page' && c.index === true));\n result.push(...flattenPages(rest));\n }\n }\n\n return result;\n}\n\nfunction ChevronLeft() {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n width=\"16\"\n height=\"16\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={styles['chevron']}\n >\n <polyline points=\"15 18 9 12 15 6\" />\n </svg>\n );\n}\n\nfunction ChevronRight() {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n width=\"16\"\n height=\"16\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={styles['chevron']}\n >\n <polyline points=\"9 18 15 12 9 6\" />\n </svg>\n );\n}\n\nfunction resolveTitle(title: string, fallbackPath: string): string {\n return title && title !== 'No title.' ? title : fallbackPath;\n}\n\nfunction resolveDescription(description: string): string | undefined {\n return description && description !== 'No description.' ? description : undefined;\n}\n\ninterface NavigationCardProps {\n node: page_node;\n direction: 'previous' | 'next';\n hrefBuilder: (path: string) => string;\n}\n\nfunction NavigationCard({ node, direction, hrefBuilder }: NavigationCardProps) {\n const title = resolveTitle(node.frontmatter.title, node.path);\n const description = resolveDescription(node.frontmatter.description);\n\n return (\n <a href={hrefBuilder(node.path)} className={clsx(styles['card'], styles[direction])} data-direction={direction}>\n <span className={styles['meta']}>\n {direction === 'previous' && <ChevronLeft />}\n <span className={styles['title']}>{title}</span>\n {direction === 'next' && <ChevronRight />}\n </span>\n {description && <span className={styles['description']}>{description}</span>}\n </a>\n );\n}\n\nexport function PageNavigation({ className, tree, currentPath, hrefBuilder = defaultHrefBuilder, ...props }: DocumentationNavigationProps) {\n const { previous, next } = useMemo(() => {\n const pages = flattenPages(tree);\n const currentIndex = pages.findIndex((page) => page.path === currentPath);\n\n if (currentIndex === -1) {\n return { previous: undefined, next: undefined };\n }\n\n return {\n previous: pages[currentIndex - 1],\n next: pages[currentIndex + 1],\n };\n }, [tree, currentPath]);\n\n if (!previous && !next) return null;\n\n return (\n <nav className={clsx(styles['navigation'], className)} aria-label=\"Pagination\" {...props}>\n <div className={styles['slot']}>{previous && <NavigationCard node={previous} direction=\"previous\" hrefBuilder={hrefBuilder} />}</div>\n <div className={clsx(styles['slot'], styles['slot-end'])}>\n {next && <NavigationCard node={next} direction=\"next\" hrefBuilder={hrefBuilder} />}\n </div>\n </nav>\n );\n}\n"],"mappings":"oXCoBM,EAAsB,GAAiB,EAQ7C,SAAS,EAAgB,EAAgD,CACvE,OAAO,EAAS,SAAS,KAAM,GAAsB,EAAE,OAAS,MAAM,CACxE,CAEA,SAAS,EAAiB,EAAgD,CACxE,OAAO,EAAS,SAAS,KAAM,GAAsB,EAAE,OAAS,QAAU,EAAE,QAAU,EAAI,CAC5F,CAEA,SAAS,EAAS,EAA2B,CAQ3C,OAPI,EAAK,OAAS,WACH,EAAgB,CACtB,CAAA,EAAM,aAAa,OAAS,IAEjC,EAAK,OAAS,OACR,EAAK,YAAmC,OAAS,IAEpD,GACT,CAEA,SAAS,EAAU,EAAqC,CACtD,OAAO,EACJ,KAAK,EAAM,KAAW,CAAE,OAAM,OAAM,EAAE,CAAC,CACvC,QAAQ,CAAE,UAAW,EAA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aAAa,GAAI,EAAnF,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAW,EAAO,KAAU,SAAA,IAAY,EAAA,EAAA,IAAA,CAAC,EAAD,CAAgB,KAAM,EAAU,UAAU,WAAwB,aAAc,CAAA,CAAO,CAAA,GACpI,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAW,EAAA,EAAK,EAAO,KAAS,EAAO,WAAW,EACpD,SAAA,IAAQ,EAAA,EAAA,IAAA,CAAC,EAAD,CAAgB,KAAM,EAAM,UAAU,OAAoB,aAAc,CAAA,CAC9E,CAAA,CACF,GAET"}
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./clsx-CaAiuA5w.js";
|
|
2
|
-
import { useMemo as t } from "react";
|
|
3
|
-
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
-
import './assets/navigation.css';var i = {
|
|
5
|
-
navigation: "_navigation_fckni_3",
|
|
6
|
-
slot: "_slot_fckni_12",
|
|
7
|
-
"slot-end": "_slot-end_fckni_16",
|
|
8
|
-
card: "_card_fckni_20",
|
|
9
|
-
next: "_next_fckni_47",
|
|
10
|
-
previous: "_previous_fckni_52",
|
|
11
|
-
meta: "_meta_fckni_57",
|
|
12
|
-
chevron: "_chevron_fckni_65",
|
|
13
|
-
title: "_title_fckni_71",
|
|
14
|
-
description: "_description_fckni_78"
|
|
15
|
-
}, a = (e) => e;
|
|
16
|
-
function o(e) {
|
|
17
|
-
return e.children.find((e) => e.type === "data");
|
|
18
|
-
}
|
|
19
|
-
function s(e) {
|
|
20
|
-
return e.children.find((e) => e.type === "page" && e.index === !0);
|
|
21
|
-
}
|
|
22
|
-
function c(e) {
|
|
23
|
-
return e.type === "category" ? o(e)?.frontmatter?.order ?? Infinity : e.type === "page" ? e.frontmatter.order ?? Infinity : Infinity;
|
|
24
|
-
}
|
|
25
|
-
function l(e) {
|
|
26
|
-
return e.map((e, t) => ({
|
|
27
|
-
node: e,
|
|
28
|
-
index: t
|
|
29
|
-
})).filter(({ node: e }) => e.type !== "data").sort((e, t) => {
|
|
30
|
-
let n = c(e.node) - c(t.node);
|
|
31
|
-
return n === 0 ? e.index - t.index : n;
|
|
32
|
-
}).map(({ node: e }) => e);
|
|
33
|
-
}
|
|
34
|
-
function u(e) {
|
|
35
|
-
let t = l(e), n = [];
|
|
36
|
-
for (let e of t) {
|
|
37
|
-
if (e.type === "page") {
|
|
38
|
-
n.push(e);
|
|
39
|
-
continue;
|
|
40
|
-
}
|
|
41
|
-
if (e.type === "category") {
|
|
42
|
-
let t = s(e);
|
|
43
|
-
t && n.push(t);
|
|
44
|
-
let r = e.children.filter((e) => e.type !== "data" && (e.type !== "page" || e.index !== !0));
|
|
45
|
-
n.push(...u(r));
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return n;
|
|
49
|
-
}
|
|
50
|
-
function d() {
|
|
51
|
-
return /* @__PURE__ */ n("svg", {
|
|
52
|
-
viewBox: "0 0 24 24",
|
|
53
|
-
width: "16",
|
|
54
|
-
height: "16",
|
|
55
|
-
fill: "none",
|
|
56
|
-
stroke: "currentColor",
|
|
57
|
-
strokeWidth: "2.5",
|
|
58
|
-
strokeLinecap: "round",
|
|
59
|
-
strokeLinejoin: "round",
|
|
60
|
-
className: i.chevron,
|
|
61
|
-
children: /* @__PURE__ */ n("polyline", { points: "15 18 9 12 15 6" })
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
function f() {
|
|
65
|
-
return /* @__PURE__ */ n("svg", {
|
|
66
|
-
viewBox: "0 0 24 24",
|
|
67
|
-
width: "16",
|
|
68
|
-
height: "16",
|
|
69
|
-
fill: "none",
|
|
70
|
-
stroke: "currentColor",
|
|
71
|
-
strokeWidth: "2.5",
|
|
72
|
-
strokeLinecap: "round",
|
|
73
|
-
strokeLinejoin: "round",
|
|
74
|
-
className: i.chevron,
|
|
75
|
-
children: /* @__PURE__ */ n("polyline", { points: "9 18 15 12 9 6" })
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
function p(e, t) {
|
|
79
|
-
return e && e !== "No title." ? e : t;
|
|
80
|
-
}
|
|
81
|
-
function m(e) {
|
|
82
|
-
return e && e !== "No description." ? e : void 0;
|
|
83
|
-
}
|
|
84
|
-
function h({ node: t, direction: a, hrefBuilder: o }) {
|
|
85
|
-
let s = p(t.frontmatter.title, t.path), c = m(t.frontmatter.description);
|
|
86
|
-
return /* @__PURE__ */ r("a", {
|
|
87
|
-
href: o(t.path),
|
|
88
|
-
className: e(i.card, i[a]),
|
|
89
|
-
"data-direction": a,
|
|
90
|
-
children: [/* @__PURE__ */ r("span", {
|
|
91
|
-
className: i.meta,
|
|
92
|
-
children: [
|
|
93
|
-
a === "previous" && /* @__PURE__ */ n(d, {}),
|
|
94
|
-
/* @__PURE__ */ n("span", {
|
|
95
|
-
className: i.title,
|
|
96
|
-
children: s
|
|
97
|
-
}),
|
|
98
|
-
a === "next" && /* @__PURE__ */ n(f, {})
|
|
99
|
-
]
|
|
100
|
-
}), c && /* @__PURE__ */ n("span", {
|
|
101
|
-
className: i.description,
|
|
102
|
-
children: c
|
|
103
|
-
})]
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
function g({ className: o, tree: s, currentPath: c, hrefBuilder: l = a, ...d }) {
|
|
107
|
-
let { previous: f, next: p } = t(() => {
|
|
108
|
-
let e = u(s), t = e.findIndex((e) => e.path === c);
|
|
109
|
-
return t === -1 ? {
|
|
110
|
-
previous: void 0,
|
|
111
|
-
next: void 0
|
|
112
|
-
} : {
|
|
113
|
-
previous: e[t - 1],
|
|
114
|
-
next: e[t + 1]
|
|
115
|
-
};
|
|
116
|
-
}, [s, c]);
|
|
117
|
-
return !f && !p ? null : /* @__PURE__ */ r("nav", {
|
|
118
|
-
className: e(i.navigation, o),
|
|
119
|
-
"aria-label": "Pagination",
|
|
120
|
-
...d,
|
|
121
|
-
children: [/* @__PURE__ */ n("div", {
|
|
122
|
-
className: i.slot,
|
|
123
|
-
children: f && /* @__PURE__ */ n(h, {
|
|
124
|
-
node: f,
|
|
125
|
-
direction: "previous",
|
|
126
|
-
hrefBuilder: l
|
|
127
|
-
})
|
|
128
|
-
}), /* @__PURE__ */ n("div", {
|
|
129
|
-
className: e(i.slot, i["slot-end"]),
|
|
130
|
-
children: p && /* @__PURE__ */ n(h, {
|
|
131
|
-
node: p,
|
|
132
|
-
direction: "next",
|
|
133
|
-
hrefBuilder: l
|
|
134
|
-
})
|
|
135
|
-
})]
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
//#endregion
|
|
139
|
-
export { g as t };
|
|
140
|
-
|
|
141
|
-
//# sourceMappingURL=navigation-C9yFcqfd.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-C9yFcqfd.js","names":[],"sources":["../../styles/src/components/documentation/page/navigation.module.css","../src/components/documentation/page/navigation.tsx"],"sourcesContent":["@import '../../../variables.css';\n\n.navigation {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 1em;\n padding: var(--_sleetch-padding-root);\n padding-top: 0px;\n font-family: var(--_sleetch-font-base);\n}\n\n.slot {\n display: flex;\n}\n\n.slot-end {\n justify-content: flex-end;\n}\n\n.card {\n display: flex;\n flex-direction: column;\n gap: 0.25em;\n width: 100%;\n max-width: 320px;\n padding: 1em 1em;\n border-radius: var(--_sleetch-radius);\n border: var(--_sleetch-hr-height) solid var(--_sleetch-color-muted);\n color: var(--_sleetch-color-text);\n text-decoration: none;\n transition:\n border-color var(--_sleetch-transition-duration) var(--_sleetch-transition-timing),\n background-color var(--_sleetch-transition-duration) var(--_sleetch-transition-timing);\n}\n\n.card:hover,\n.card:focus-visible {\n border-color: var(--_sleetch-color-text-primary);\n background-color: color-mix(in srgb, var(--_sleetch-color-text-primary) 8%, var(--_sleetch-color-card));\n}\n\n.card:focus-visible {\n outline: 2px solid var(--_sleetch-color-text-primary);\n outline-offset: 2px;\n}\n\n.next {\n align-items: flex-end;\n text-align: right;\n}\n\n.previous {\n align-items: flex-start;\n text-align: left;\n}\n\n.meta {\n display: flex;\n align-items: center;\n gap: 0.3em;\n font-size: var(--_sleetch-font-size-tiny);\n color: var(--_sleetch-color-muted-foreground);\n}\n\n.chevron {\n flex-shrink: 0;\n width: 20px;\n height: 20px;\n}\n\n.title {\n font-size: var(--_sleetch-font-size-base);\n font-weight: var(--_sleetch-font-weight-heading);\n line-height: var(--_sleetch-line-height-heading);\n color: var(--_sleetch-color-text);\n}\n\n.description {\n font-size: var(--_sleetch-font-size-tiny);\n line-height: var(--_sleetch-line-height);\n color: var(--_sleetch-color-muted-foreground);\n overflow: hidden;\n}\n\n@media (min-width: 769px) and (max-width: 1024px) {\n .navigation {\n padding: 1.5em 2em;\n }\n}\n\n@media (max-width: 768px) {\n .card {\n max-width: 100%;\n }\n\n .navigation {\n grid-template-columns: 1fr;\n\n padding: 1em 1em;\n }\n\n .slot-end {\n justify-content: flex-start;\n }\n\n .next {\n align-items: flex-start;\n text-align: left;\n }\n}\n","/*\n AI Generated :(\n Needs more testing\n*/\n\nimport { useMemo, type BaseHTMLAttributes } from 'react';\nimport clsx from 'clsx';\nimport styles from '@sleetch/styles/components/documentation/page/navigation.module.css';\nimport type { tree_object } from '@sleetch/core/compiler';\n\ntype category_node = Extract<tree_object, { type: 'category' }>;\ntype page_node = Extract<tree_object, { type: 'page' }>;\ntype data_node = Extract<tree_object, { type: 'data' }>;\n\nexport interface DocumentationNavigationProps extends BaseHTMLAttributes<HTMLDivElement> {\n tree: tree_object[];\n currentPath: string;\n hrefBuilder?: (path: string) => string;\n}\n\nconst defaultHrefBuilder = (path: string) => path;\n\n/*\n Meme logique de tri/priorite que la sidebar (getCategoryData, getCategoryIndex,\n getOrder, sortNodes) pour garantir que l'ordre de navigation prev/next\n corresponde exactement a l'ordre affiche dans la sidebar.\n*/\n\nfunction getCategoryData(category: category_node): data_node | undefined {\n return category.children.find((c): c is data_node => c.type === 'data');\n}\n\nfunction getCategoryIndex(category: category_node): page_node | undefined {\n return category.children.find((c): c is page_node => c.type === 'page' && c.index === true);\n}\n\nfunction getOrder(node: tree_object): number {\n if (node.type === 'category') {\n const data = getCategoryData(node);\n return data?.frontmatter?.order ?? Number.POSITIVE_INFINITY;\n }\n if (node.type === 'page') {\n return (node.frontmatter as { order?: number }).order ?? Number.POSITIVE_INFINITY;\n }\n return Number.POSITIVE_INFINITY;\n}\n\nfunction sortNodes(nodes: tree_object[]): tree_object[] {\n return nodes\n .map((node, index) => ({ node, index }))\n .filter(({ node }) => node.type !== 'data')\n .sort((a, b) => {\n const diff = getOrder(a.node) - getOrder(b.node);\n return diff !== 0 ? diff : a.index - b.index;\n })\n .map(({ node }) => node);\n}\n\n/*\n Aplatit l'arbre en une liste ordonnee de pages navigables :\n - l'index d'une categorie arrive en premier (c'est le point d'entree),\n - suivi de ses enfants tries recursivement.\n*/\nfunction flattenPages(nodes: tree_object[]): page_node[] {\n const sorted = sortNodes(nodes);\n const result: page_node[] = [];\n\n for (const node of sorted) {\n if (node.type === 'page') {\n result.push(node);\n continue;\n }\n\n if (node.type === 'category') {\n const indexPage = getCategoryIndex(node);\n if (indexPage) result.push(indexPage);\n\n const rest = node.children.filter((c) => c.type !== 'data' && !(c.type === 'page' && c.index === true));\n result.push(...flattenPages(rest));\n }\n }\n\n return result;\n}\n\nfunction ChevronLeft() {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n width=\"16\"\n height=\"16\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={styles['chevron']}\n >\n <polyline points=\"15 18 9 12 15 6\" />\n </svg>\n );\n}\n\nfunction ChevronRight() {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n width=\"16\"\n height=\"16\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={styles['chevron']}\n >\n <polyline points=\"9 18 15 12 9 6\" />\n </svg>\n );\n}\n\nfunction resolveTitle(title: string, fallbackPath: string): string {\n return title && title !== 'No title.' ? title : fallbackPath;\n}\n\nfunction resolveDescription(description: string): string | undefined {\n return description && description !== 'No description.' ? description : undefined;\n}\n\ninterface NavigationCardProps {\n node: page_node;\n direction: 'previous' | 'next';\n hrefBuilder: (path: string) => string;\n}\n\nfunction NavigationCard({ node, direction, hrefBuilder }: NavigationCardProps) {\n const title = resolveTitle(node.frontmatter.title, node.path);\n const description = resolveDescription(node.frontmatter.description);\n\n return (\n <a href={hrefBuilder(node.path)} className={clsx(styles['card'], styles[direction])} data-direction={direction}>\n <span className={styles['meta']}>\n {direction === 'previous' && <ChevronLeft />}\n <span className={styles['title']}>{title}</span>\n {direction === 'next' && <ChevronRight />}\n </span>\n {description && <span className={styles['description']}>{description}</span>}\n </a>\n );\n}\n\nexport function PageNavigation({ className, tree, currentPath, hrefBuilder = defaultHrefBuilder, ...props }: DocumentationNavigationProps) {\n const { previous, next } = useMemo(() => {\n const pages = flattenPages(tree);\n const currentIndex = pages.findIndex((page) => page.path === currentPath);\n\n if (currentIndex === -1) {\n return { previous: undefined, next: undefined };\n }\n\n return {\n previous: pages[currentIndex - 1],\n next: pages[currentIndex + 1],\n };\n }, [tree, currentPath]);\n\n if (!previous && !next) return null;\n\n return (\n <nav className={clsx(styles['navigation'], className)} aria-label=\"Pagination\" {...props}>\n <div className={styles['slot']}>{previous && <NavigationCard node={previous} direction=\"previous\" hrefBuilder={hrefBuilder} />}</div>\n <div className={clsx(styles['slot'], styles['slot-end'])}>\n {next && <NavigationCard node={next} direction=\"next\" hrefBuilder={hrefBuilder} />}\n </div>\n </nav>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;GCoBM,KAAsB,MAAiB;AAQ7C,SAAS,EAAgB,GAAgD;CACvE,OAAO,EAAS,SAAS,MAAM,MAAsB,EAAE,SAAS,MAAM;AACxE;AAEA,SAAS,EAAiB,GAAgD;CACxE,OAAO,EAAS,SAAS,MAAM,MAAsB,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