// __SDEFILE__ - This file is a dependency for the stand-alone environment // Dependencies import { nsMerge, capitalize, optionsMenuStructure, optionType, cloudflareImageUrl, horFlexClasses, } from 'shared/utils.mjs' import { designs } from 'shared/config/designs.mjs' import { examples } from 'site/components/design-examples.mjs' // Hooks import { useTranslation } from 'next-i18next' import { useDesign } from 'site/hooks/use-design.mjs' import { useContext, Fragment } from 'react' // Context import { ModalContext } from 'shared/context/modal-context.mjs' // Components import { ModalWrapper } from 'shared/components/wrappers/modal.mjs' import { lineDrawings } from 'shared/components/designs/linedrawings/index.mjs' import { Difficulty } from 'shared/components/designs/difficulty.mjs' import { PageLink, AnchorLink, Link } from 'shared/components/link.mjs' import { DocsLink, DocsTitle } from 'shared/components/mdx/docs-helpers.mjs' import { Popout } from 'shared/components/popout/index.mjs' import { NewPatternIcon, DocsIcon } from 'shared/components/icons.mjs' import { DynamicMdx } from 'shared/components/mdx/dynamic.mjs' // Translation namespaces used on this page export const ns = nsMerge( 'account', 'tags', 'techniques', 'measurements', 'workbench', 'designs', 'tags' ) const Option = ({ id, option, design }) => optionType(option) === 'constant' ? null : (
  • ) const OptionGroup = ({ id, group, t, design }) => (
  • {t(`workbench:${id}`)}
  • ) export const SimpleOptionsList = ({ options, t, design }) => { const structure = optionsMenuStructure(options, {}, true) const output = [] for (const [key, entry] of Object.entries(structure)) { const shared = { key, t, design, id: key } if (entry.isGroup) output.push() else output.push(