// __SDEFILE__ - This file is a dependency for the stand-alone environment import { Popout } from 'shared/components/popout/index.mjs' import { Highlight } from './highlight.mjs' import { YouTube } from './youtube.mjs' //import { Figure } from './figure.mjs' import { ReadMore } from './read-more.mjs' import { Tab, Tabs } from '../tabs.mjs' import { TabbedExample as Example } from './tabbed-example.mjs' import { HttpMethod, HttpStatusCode } from './http.mjs' import { ControlTip } from '../control/tip.mjs' import { DocsTitle, DocsLink } from './docs-helpers.mjs' // Extra components import { DesignInfo } from 'shared/components/designs/info.mjs' import { collection } from 'site/hooks/use-design.mjs' export const components = (site = 'org', slug = []) => { const base = { Comment: (props) => , Fixme: (props) => , Link: (props) => , Note: (props) => , ReadMore: (props) => , Related: (props) => , Tab, Tabs, Tip: (props) => , Tldr: (props) => , Warning: (props) => , } const extra = { pre: (props) => , YouTube, // This Figure component causes hydration errors //img: Figure, table: (props) => ( {props.children}
), ControlTip, Example, DocsTitle: (props) => , DocsLink: (props) => , } if (site === 'sde') return base if (site === 'dev') return { ...base, ...extra, Method: HttpMethod, StatusCode: HttpStatusCode, } const specific = {} if ( site === 'org' && slug && slug.length === 2 && slug[0] === 'designs' && collection.includes(slug[1]) ) specific.DesignInfo = DesignInfo return { ...base, ...extra, ...specific, //PatternDocs: WipWithReadMore, //PatternOptions: WipWithReadMore, //PatternMeasurements: WipWithReadMore, //Gauge: V3Wip, //Legend, } }